@kittycad/lib 0.0.10 → 0.0.13

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/dist/index.es.js CHANGED
@@ -1,3 +1,3 @@
1
1
  import t from"node-fetch";function e(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof f?e:f,o=Object.create(a.prototype),s=new b(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return A()}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=k(s,r);if(c){if(c===h)continue;return c}}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 i=p(t,e,r);if("normal"===i.type){if(n=r.done?"completed":"suspendedYield",i.arg===h)continue;return{value:i.arg,done:r.done}}"throw"===i.type&&(n="completed",r.method="throw",r.arg=i.arg)}}}(t,r,s),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function l(){}var y={};i(y,o,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(g([])));_&&_!==r&&n.call(_,o)&&(y=_);var m=l.prototype=f.prototype=Object.create(y);function T(t){["next","throw","return"].forEach((function(e){i(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(a,o,s,c){var i=p(t[a],t,o);if("throw"!==i.type){var u=i.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(i.arg)}var a;this._invoke=function(t,n){function o(){return new e((function(e,a){r(t,n,e,a)}))}return a=a?a.then(o,o):o()}}function k(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,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function b(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function g(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 r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:A}}function A(){return{value:void 0,done:!0}}return d.prototype=l,i(m,"constructor",l),i(l,"constructor",d),d.displayName=i(l,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,i(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},T(x.prototype),i(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,a),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},T(m),i(m,c,"Generator"),i(m,o,(function(){return this})),i(m,"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=g,b.prototype={constructor:b,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(O),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),i=n.call(o,"finallyLoc");if(c&&i){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},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),h},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),O(r),h}},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 a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:g(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function r(t,e,r,n,a,o,s){try{var c=t[o](s),i=c.value}catch(t){return void r(t)}c.done?e(i):Promise.resolve(i).then(n,a)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(a,o){var s=t.apply(e,n);function c(t){r(s,a,o,c,i,"next",t)}function i(t){r(s,a,o,c,i,"throw",t)}c(void 0)}))}}function a(){return(a=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/","https://api.kittycad.io/",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function o(){return(o=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/_meta/info","https://api.kittycad.io/_meta/info",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/_meta/info",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function s(){return(s=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/ping","https://api.kittycad.io/ping",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/ping",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function c(){return(c=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.group_by,o="/api-call-metrics?group_by=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function i(){return(i=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function u(){return(u=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function p(){return(p=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c=n.status,i="/async/operations?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s,"&status=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},e.next=8,t(u,f);case 8:return d=e.sent,e.next=11,d.json();case 11:return l=e.sent,e.abrupt("return",l);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function h(){return(h=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/async/operations/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function f(){return(f=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function d(){return(d=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/user/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function l(){return(l=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o=n.limit,s=n.page_token,c=n.sort_by,i="/users/".concat(a,"/api-calls?limit=").concat(o,"&page_token=").concat(s,"&sort_by=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},e.next=8,t(u,f);case 8:return d=e.sent,e.next=11,d.json();case 11:return l=e.sent,e.abrupt("return",l);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function y(){return(y=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.output_format,o=n.src_format,s=n.body,c="/file/conversion/".concat(o,"/").concat(a),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function v(){return(v=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.material_mass,o=n.src_format,s=n.body,c="/file/density?material_mass=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function _(){return(_=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function m(){return(m=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.lang,o=n.output,s=n.body,c="/file/execute/".concat(a,"?output=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function T(){return(T=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.material_density,o=n.src_format,s=n.body,c="/file/mass?material_density=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function x(){return(x=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.src_format,o=n.body,s="/file/volume?src_format=".concat(a),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u,body:o},e.next=8,t(c,p);case 8:return h=e.sent,e.next=11,h.json();case 11:return f=e.sent,e.abrupt("return",f);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function k(){return(k=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/user/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function w(){return(w=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/oauth2/device/auth","https://api.kittycad.io/oauth2/device/auth",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/oauth2/device/auth",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function O(){return(O=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/oauth2/device/confirm","https://api.kittycad.io/oauth2/device/confirm",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/oauth2/device/confirm",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function b(){return(b=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/oauth2/device/token","https://api.kittycad.io/oauth2/device/token",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/oauth2/device/token",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function g(){return(g=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.user_code,o="/oauth2/device/verify?user_code=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function A(){return(A=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.provider,o=n.code,s=n.state,c="/oauth2/provider/".concat(a,"/callback?code=").concat(o,"&state=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function K(){return(K=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.provider,o=n.callback_url,s="/oauth2/provider/".concat(a,"/consent?callback_url=").concat(o),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u},e.next=8,t(c,p);case 8:return h=e.sent,e.next=11,h.json();case 11:return f=e.sent,e.abrupt("return",f);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function E(){return(E=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.output_format,o=n.src_format,s=n.value,c="/unit/conversion/".concat(o,"/").concat(a,"?value=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function j(){return(j=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function N(){return(N=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function P(){return(P=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function S(){return(S=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/extended","https://api.kittycad.io/user/extended",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/extended",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function I(){return(I=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/users-extended/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function Y(){return(Y=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function z(){return(z=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users-extended?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function B(){return(B=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/users/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function C(){return(C=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-tokens?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function D(){return(D=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/api-tokens","https://api.kittycad.io/user/api-tokens",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/api-tokens",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function L(){return(L=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function G(){return(G=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function F(){return(F=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function q(){return(q=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function H(){return(H=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function J(){return(J=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function M(){return(M=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/invoices","https://api.kittycad.io/user/payment/invoices",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/invoices",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function Q(){return(Q=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/intent","https://api.kittycad.io/user/payment/intent",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/intent",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function R(){return(R=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/balance","https://api.kittycad.io/user/payment/balance",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/balance",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function U(){return(U=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/methods","https://api.kittycad.io/user/payment/methods",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/methods",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function V(){return(V=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/user/payment/methods/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function W(){return(W=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.token,o="/user/session/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}var X={get_schema:function(){return a.apply(this,arguments)},get_metadata:function(){return o.apply(this,arguments)},ping:function(){return s.apply(this,arguments)}},Z={get_api_call_metrics:function(t){return c.apply(this,arguments)},list_api_calls:function(t){return i.apply(this,arguments)},get_api_call:function(t){return u.apply(this,arguments)},list_async_operations:function(t){return p.apply(this,arguments)},get_async_operation:function(t){return h.apply(this,arguments)},user_list_api_calls:function(t){return f.apply(this,arguments)},get_api_call_for_user:function(t){return d.apply(this,arguments)},list_api_calls_for_user:function(t){return l.apply(this,arguments)}},$={create_file_conversion:function(t){return y.apply(this,arguments)},create_file_density:function(t){return v.apply(this,arguments)},get_file_conversion:function(t){return _.apply(this,arguments)},create_file_execution:function(t){return m.apply(this,arguments)},create_file_mass:function(t){return T.apply(this,arguments)},create_file_volume:function(t){return x.apply(this,arguments)},get_file_conversion_for_user:function(t){return k.apply(this,arguments)}},tt={device_auth_request:function(){return w.apply(this,arguments)},device_auth_confirm:function(){return O.apply(this,arguments)},device_access_token:function(){return b.apply(this,arguments)},device_auth_verify:function(t){return g.apply(this,arguments)},listen_oauth2_provider_callback:function(t){return A.apply(this,arguments)},listen_oauth2_provider_consent:function(t){return K.apply(this,arguments)}},et={create_unit_conversion:function(t){return E.apply(this,arguments)}},rt={delete_user_self:function(){return j.apply(this,arguments)},update_user_self:function(){return N.apply(this,arguments)},get_user_self:function(){return P.apply(this,arguments)},get_user_self_extended:function(){return S.apply(this,arguments)},get_user_extended:function(t){return I.apply(this,arguments)},list_users:function(t){return Y.apply(this,arguments)},list_users_extended:function(t){return z.apply(this,arguments)},get_user:function(t){return B.apply(this,arguments)}},nt={list_api_tokens_for_user:function(t){return C.apply(this,arguments)},create_api_token_for_user:function(){return D.apply(this,arguments)},delete_api_token_for_user:function(t){return L.apply(this,arguments)},get_api_token_for_user:function(t){return G.apply(this,arguments)}},at={delete_payment_information_for_user:function(){return F.apply(this,arguments)},get_payment_information_for_user:function(){return q.apply(this,arguments)},update_payment_information_for_user:function(){return H.apply(this,arguments)},create_payment_information_for_user:function(){return J.apply(this,arguments)},list_invoices_for_user:function(){return M.apply(this,arguments)},create_payment_intent_for_user:function(){return Q.apply(this,arguments)},get_payment_balance_for_user:function(){return R.apply(this,arguments)},list_payment_methods_for_user:function(){return U.apply(this,arguments)},delete_payment_method_for_user:function(t){return V.apply(this,arguments)}},ot={get_session_for_user:function(t){return W.apply(this,arguments)}};export{Z as api_calls,nt as api_tokens,$ as file,X as meta,tt as oauth2,at as payments,ot as sessions,et as unit,rt as users};
3
+ e=function(){return t};var t={},r=Object.prototype,n=r.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof f?e:f,o=Object.create(a.prototype),s=new b(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return A()}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=k(s,r);if(c){if(c===h)continue;return c}}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 i=p(t,e,r);if("normal"===i.type){if(n=r.done?"completed":"suspendedYield",i.arg===h)continue;return{value:i.arg,done:r.done}}"throw"===i.type&&(n="completed",r.method="throw",r.arg=i.arg)}}}(t,r,s),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function l(){}var y={};i(y,o,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(g([])));_&&_!==r&&n.call(_,o)&&(y=_);var m=l.prototype=f.prototype=Object.create(y);function T(t){["next","throw","return"].forEach((function(e){i(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(a,o,s,c){var i=p(t[a],t,o);if("throw"!==i.type){var u=i.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(i.arg)}var a;this._invoke=function(t,n){function o(){return new e((function(e,a){r(t,n,e,a)}))}return a=a?a.then(o,o):o()}}function k(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,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function b(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function g(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 r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:A}}function A(){return{value:void 0,done:!0}}return d.prototype=l,i(m,"constructor",l),i(l,"constructor",d),d.displayName=i(l,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,i(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},T(x.prototype),i(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,a),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},T(m),i(m,c,"Generator"),i(m,o,(function(){return this})),i(m,"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=g,b.prototype={constructor:b,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(O),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),i=n.call(o,"finallyLoc");if(c&&i){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},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),h},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),O(r),h}},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 a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:g(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function r(t,e,r,n,a,o,s){try{var c=t[o](s),i=c.value}catch(t){return void r(t)}c.done?e(i):Promise.resolve(i).then(n,a)}function n(t){return function(){var e=this,n=arguments;return new Promise((function(a,o){var s=t.apply(e,n);function c(t){r(s,a,o,c,i,"next",t)}function i(t){r(s,a,o,c,i,"throw",t)}c(void 0)}))}}function a(){return(a=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/","https://api.kittycad.io/",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function o(){return(o=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/_meta/info","https://api.kittycad.io/_meta/info",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/_meta/info",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function s(){return(s=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/ping","https://api.kittycad.io/ping",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/ping",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function c(){return(c=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.group_by,o="/api-call-metrics?group_by=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function i(){return(i=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function u(){return(u=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function p(){return(p=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c=n.status,i="/async/operations?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s,"&status=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},e.next=8,t(u,f);case 8:return d=e.sent,e.next=11,d.json();case 11:return l=e.sent,e.abrupt("return",l);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function h(){return(h=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/async/operations/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function f(){return(f=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function d(){return(d=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/user/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function l(){return(l=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d,l;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o=n.limit,s=n.page_token,c=n.sort_by,i="/users/".concat(a,"/api-calls?limit=").concat(o,"&page_token=").concat(s,"&sort_by=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},e.next=8,t(u,f);case 8:return d=e.sent,e.next=11,d.json();case 11:return l=e.sent,e.abrupt("return",l);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function y(){return(y=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.output_format,o=n.src_format,s=n.body,c="/file/conversion/".concat(o,"/").concat(a),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function v(){return(v=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function _(){return(_=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.material_mass,o=n.src_format,s=n.body,c="/file/density?material_mass=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function m(){return(m=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.lang,o=n.output,s=n.body,c="/file/execute/".concat(a,"?output=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function T(){return(T=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.material_density,o=n.src_format,s=n.body,c="/file/mass?material_density=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function x(){return(x=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.src_format,o=n.body,s="/file/volume?src_format=".concat(a),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u,body:o},e.next=8,t(c,p);case 8:return h=e.sent,e.next=11,h.json();case 11:return f=e.sent,e.abrupt("return",f);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function k(){return(k=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/user/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function w(){return(w=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/oauth2/device/auth","https://api.kittycad.io/oauth2/device/auth",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/oauth2/device/auth",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function O(){return(O=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/oauth2/device/confirm","https://api.kittycad.io/oauth2/device/confirm",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/oauth2/device/confirm",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function b(){return(b=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.user_code,o="/oauth2/device/verify?user_code=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function g(){return(g=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/oauth2/device/token","https://api.kittycad.io/oauth2/device/token",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/oauth2/device/token",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function A(){return(A=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.provider,o=n.code,s=n.state,c="/oauth2/provider/".concat(a,"/callback?code=").concat(o,"&state=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function K(){return(K=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.provider,o=n.callback_url,s="/oauth2/provider/".concat(a,"/consent?callback_url=").concat(o),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u},e.next=8,t(c,p);case 8:return h=e.sent,e.next=11,h.json();case 11:return f=e.sent,e.abrupt("return",f);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function E(){return(E=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.output_format,o=n.src_format,s=n.value,c="/unit/conversion/".concat(o,"/").concat(a,"?value=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function j(){return(j=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function N(){return(N=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function P(){return(P=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function S(){return(S=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/extended","https://api.kittycad.io/user/extended",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/extended",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function I(){return(I=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function Y(){return(Y=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users-extended?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function z(){return(z=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/users-extended/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function B(){return(B=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/users/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function C(){return(C=n(e().mark((function r(n){var a,o,s,c,i,u,p,h,f,d;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-tokens?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},e.next=8,t(i,h);case 8:return f=e.sent,e.next=11,f.json();case 11:return d=e.sent,e.abrupt("return",d);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function D(){return(D=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/api-tokens","https://api.kittycad.io/user/api-tokens",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/api-tokens",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function L(){return(L=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function G(){return(G=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function F(){return(F=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function q(){return(q=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function H(){return(H=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function J(){return(J=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function M(){return(M=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/balance","https://api.kittycad.io/user/payment/balance",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/balance",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function Q(){return(Q=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/intent","https://api.kittycad.io/user/payment/intent",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/intent",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function R(){return(R=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/invoices","https://api.kittycad.io/user/payment/invoices",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/invoices",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function U(){return(U=n(e().mark((function r(){var n,a,o,s,c;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return"/user/payment/methods","https://api.kittycad.io/user/payment/methods",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},e.next=7,t("https://api.kittycad.io/user/payment/methods",o);case 7:return s=e.sent,e.next=10,s.json();case 10:return c=e.sent,e.abrupt("return",c);case 12:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function V(){return(V=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.id,o="/user/payment/methods/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}function W(){return(W=n(e().mark((function r(n){var a,o,s,c,i,u,p,h;return e().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return a=n.token,o="/user/session/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},e.next=8,t(s,u);case 8:return p=e.sent,e.next=11,p.json();case 11:return h=e.sent,e.abrupt("return",h);case 13:case"end":return e.stop()}}),r)})))).apply(this,arguments)}var X={get_schema:function(){return a.apply(this,arguments)},get_metadata:function(){return o.apply(this,arguments)},ping:function(){return s.apply(this,arguments)}},Z={get_api_call_metrics:function(t){return c.apply(this,arguments)},list_api_calls:function(t){return i.apply(this,arguments)},get_api_call:function(t){return u.apply(this,arguments)},list_async_operations:function(t){return p.apply(this,arguments)},get_async_operation:function(t){return h.apply(this,arguments)},user_list_api_calls:function(t){return f.apply(this,arguments)},get_api_call_for_user:function(t){return d.apply(this,arguments)},list_api_calls_for_user:function(t){return l.apply(this,arguments)}},$={create_file_conversion:function(t){return y.apply(this,arguments)},get_file_conversion:function(t){return v.apply(this,arguments)},create_file_density:function(t){return _.apply(this,arguments)},create_file_execution:function(t){return m.apply(this,arguments)},create_file_mass:function(t){return T.apply(this,arguments)},create_file_volume:function(t){return x.apply(this,arguments)},get_file_conversion_for_user:function(t){return k.apply(this,arguments)}},tt={device_auth_request:function(){return w.apply(this,arguments)},device_auth_confirm:function(){return O.apply(this,arguments)},device_auth_verify:function(t){return b.apply(this,arguments)},device_access_token:function(){return g.apply(this,arguments)},listen_oauth2_provider_callback:function(t){return A.apply(this,arguments)},listen_oauth2_provider_consent:function(t){return K.apply(this,arguments)}},et={create_unit_conversion:function(t){return E.apply(this,arguments)}},rt={delete_user_self:function(){return j.apply(this,arguments)},get_user_self:function(){return N.apply(this,arguments)},update_user_self:function(){return P.apply(this,arguments)},get_user_self_extended:function(){return S.apply(this,arguments)},list_users:function(t){return I.apply(this,arguments)},list_users_extended:function(t){return Y.apply(this,arguments)},get_user_extended:function(t){return z.apply(this,arguments)},get_user:function(t){return B.apply(this,arguments)}},nt={list_api_tokens_for_user:function(t){return C.apply(this,arguments)},create_api_token_for_user:function(){return D.apply(this,arguments)},delete_api_token_for_user:function(t){return L.apply(this,arguments)},get_api_token_for_user:function(t){return G.apply(this,arguments)}},at={delete_payment_information_for_user:function(){return F.apply(this,arguments)},get_payment_information_for_user:function(){return q.apply(this,arguments)},create_payment_information_for_user:function(){return H.apply(this,arguments)},update_payment_information_for_user:function(){return J.apply(this,arguments)},get_payment_balance_for_user:function(){return M.apply(this,arguments)},create_payment_intent_for_user:function(){return Q.apply(this,arguments)},list_invoices_for_user:function(){return R.apply(this,arguments)},list_payment_methods_for_user:function(){return U.apply(this,arguments)},delete_payment_method_for_user:function(t){return V.apply(this,arguments)}},ot={get_session_for_user:function(t){return W.apply(this,arguments)}};export{Z as api_calls,nt as api_tokens,$ as file,X as meta,tt as oauth2,at as payments,ot as sessions,et as unit,rt as users};
package/dist/index.js CHANGED
@@ -1,3 +1,3 @@
1
1
  "use strict";function t(t){return t&&"object"==typeof t&&"default"in t?t:{default:t}}Object.defineProperty(exports,"__esModule",{value:!0});var e=t(require("node-fetch"));function r(){
2
2
  /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
3
- r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof f?e:f,o=Object.create(a.prototype),s=new b(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return A()}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=k(s,r);if(c){if(c===h)continue;return c}}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 i=p(t,e,r);if("normal"===i.type){if(n=r.done?"completed":"suspendedYield",i.arg===h)continue;return{value:i.arg,done:r.done}}"throw"===i.type&&(n="completed",r.method="throw",r.arg=i.arg)}}}(t,r,s),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function l(){}var y={};i(y,o,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(g([])));_&&_!==e&&n.call(_,o)&&(y=_);var m=l.prototype=f.prototype=Object.create(y);function T(t){["next","throw","return"].forEach((function(e){i(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(a,o,s,c){var i=p(t[a],t,o);if("throw"!==i.type){var u=i.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(i.arg)}var a;this._invoke=function(t,n){function o(){return new e((function(e,a){r(t,n,e,a)}))}return a=a?a.then(o,o):o()}}function k(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,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function b(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function g(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 r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:A}}function A(){return{value:void 0,done:!0}}return d.prototype=l,i(m,"constructor",l),i(l,"constructor",d),d.displayName=i(l,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,i(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},T(x.prototype),i(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,a),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},T(m),i(m,c,"Generator"),i(m,o,(function(){return this})),i(m,"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=g,b.prototype={constructor:b,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(O),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),i=n.call(o,"finallyLoc");if(c&&i){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},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),h},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),O(r),h}},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 a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:g(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,a,o,s){try{var c=t[o](s),i=c.value}catch(t){return void r(t)}c.done?e(i):Promise.resolve(i).then(n,a)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(a,o){var s=t.apply(e,r);function c(t){n(s,a,o,c,i,"next",t)}function i(t){n(s,a,o,c,i,"throw",t)}c(void 0)}))}}function o(){return(o=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/","https://api.kittycad.io/",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function s(){return(s=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/_meta/info","https://api.kittycad.io/_meta/info",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/_meta/info",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(){return(c=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/ping","https://api.kittycad.io/ping",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/ping",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function i(){return(i=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.group_by,o="/api-call-metrics?group_by=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function u(){return(u=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(){return(p=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(){return(h=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c=n.status,i="/async/operations?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s,"&status=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},t.next=8,e.default(u,f);case 8:return d=t.sent,t.next=11,d.json();case 11:return l=t.sent,t.abrupt("return",l);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(){return(f=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/async/operations/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function d(){return(d=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(){return(l=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/user/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function y(){return(y=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o=n.limit,s=n.page_token,c=n.sort_by,i="/users/".concat(a,"/api-calls?limit=").concat(o,"&page_token=").concat(s,"&sort_by=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},t.next=8,e.default(u,f);case 8:return d=t.sent,t.next=11,d.json();case 11:return l=t.sent,t.abrupt("return",l);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(){return(v=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.output_format,o=n.src_format,s=n.body,c="/file/conversion/".concat(o,"/").concat(a),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _(){return(_=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.material_mass,o=n.src_format,s=n.body,c="/file/density?material_mass=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(){return(m=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(){return(T=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.lang,o=n.output,s=n.body,c="/file/execute/".concat(a,"?output=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(){return(x=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.material_density,o=n.src_format,s=n.body,c="/file/mass?material_density=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(){return(k=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.src_format,o=n.body,s="/file/volume?src_format=".concat(a),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u,body:o},t.next=8,e.default(c,p);case 8:return h=t.sent,t.next=11,h.json();case 11:return f=t.sent,t.abrupt("return",f);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(){return(w=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/user/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(){return(O=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/oauth2/device/auth","https://api.kittycad.io/oauth2/device/auth",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/oauth2/device/auth",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(){return(b=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/oauth2/device/confirm","https://api.kittycad.io/oauth2/device/confirm",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/oauth2/device/confirm",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(){return(g=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/oauth2/device/token","https://api.kittycad.io/oauth2/device/token",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/oauth2/device/token",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(){return(A=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.user_code,o="/oauth2/device/verify?user_code=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(){return(K=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.provider,o=n.code,s=n.state,c="/oauth2/provider/".concat(a,"/callback?code=").concat(o,"&state=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(){return(E=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.provider,o=n.callback_url,s="/oauth2/provider/".concat(a,"/consent?callback_url=").concat(o),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u},t.next=8,e.default(c,p);case 8:return h=t.sent,t.next=11,h.json();case 11:return f=t.sent,t.abrupt("return",f);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(){return(j=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.output_format,o=n.src_format,s=n.value,c="/unit/conversion/".concat(o,"/").concat(a,"?value=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(){return(P=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(){return(N=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(){return(S=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function I(){return(I=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/extended","https://api.kittycad.io/user/extended",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/extended",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Y(){return(Y=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/users-extended/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function z(){return(z=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(){return(B=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users-extended?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(){return(C=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/users/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(){return(D=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-tokens?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(){return(L=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/api-tokens","https://api.kittycad.io/user/api-tokens",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/api-tokens",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(){return(G=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function F(){return(F=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function q(){return(q=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function M(){return(M=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(){return(H=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function J(){return(J=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Q(){return(Q=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/invoices","https://api.kittycad.io/user/payment/invoices",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/invoices",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(){return(R=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/intent","https://api.kittycad.io/user/payment/intent",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/intent",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function U(){return(U=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/balance","https://api.kittycad.io/user/payment/balance",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/balance",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function V(){return(V=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/methods","https://api.kittycad.io/user/payment/methods",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/methods",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(){return(W=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/user/payment/methods/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function X(){return(X=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.token,o="/user/session/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Z={get_schema:function(){return o.apply(this,arguments)},get_metadata:function(){return s.apply(this,arguments)},ping:function(){return c.apply(this,arguments)}},$={get_api_call_metrics:function(t){return i.apply(this,arguments)},list_api_calls:function(t){return u.apply(this,arguments)},get_api_call:function(t){return p.apply(this,arguments)},list_async_operations:function(t){return h.apply(this,arguments)},get_async_operation:function(t){return f.apply(this,arguments)},user_list_api_calls:function(t){return d.apply(this,arguments)},get_api_call_for_user:function(t){return l.apply(this,arguments)},list_api_calls_for_user:function(t){return y.apply(this,arguments)}},tt={create_file_conversion:function(t){return v.apply(this,arguments)},create_file_density:function(t){return _.apply(this,arguments)},get_file_conversion:function(t){return m.apply(this,arguments)},create_file_execution:function(t){return T.apply(this,arguments)},create_file_mass:function(t){return x.apply(this,arguments)},create_file_volume:function(t){return k.apply(this,arguments)},get_file_conversion_for_user:function(t){return w.apply(this,arguments)}},et={device_auth_request:function(){return O.apply(this,arguments)},device_auth_confirm:function(){return b.apply(this,arguments)},device_access_token:function(){return g.apply(this,arguments)},device_auth_verify:function(t){return A.apply(this,arguments)},listen_oauth2_provider_callback:function(t){return K.apply(this,arguments)},listen_oauth2_provider_consent:function(t){return E.apply(this,arguments)}},rt={create_unit_conversion:function(t){return j.apply(this,arguments)}},nt={delete_user_self:function(){return P.apply(this,arguments)},update_user_self:function(){return N.apply(this,arguments)},get_user_self:function(){return S.apply(this,arguments)},get_user_self_extended:function(){return I.apply(this,arguments)},get_user_extended:function(t){return Y.apply(this,arguments)},list_users:function(t){return z.apply(this,arguments)},list_users_extended:function(t){return B.apply(this,arguments)},get_user:function(t){return C.apply(this,arguments)}},at={list_api_tokens_for_user:function(t){return D.apply(this,arguments)},create_api_token_for_user:function(){return L.apply(this,arguments)},delete_api_token_for_user:function(t){return G.apply(this,arguments)},get_api_token_for_user:function(t){return F.apply(this,arguments)}},ot={delete_payment_information_for_user:function(){return q.apply(this,arguments)},get_payment_information_for_user:function(){return M.apply(this,arguments)},update_payment_information_for_user:function(){return H.apply(this,arguments)},create_payment_information_for_user:function(){return J.apply(this,arguments)},list_invoices_for_user:function(){return Q.apply(this,arguments)},create_payment_intent_for_user:function(){return R.apply(this,arguments)},get_payment_balance_for_user:function(){return U.apply(this,arguments)},list_payment_methods_for_user:function(){return V.apply(this,arguments)},delete_payment_method_for_user:function(t){return W.apply(this,arguments)}},st={get_session_for_user:function(t){return X.apply(this,arguments)}};exports.api_calls=$,exports.api_tokens=at,exports.file=tt,exports.meta=Z,exports.oauth2=et,exports.payments=ot,exports.sessions=st,exports.unit=rt,exports.users=nt;
3
+ r=function(){return t};var t={},e=Object.prototype,n=e.hasOwnProperty,a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",s=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function i(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{i({},"")}catch(t){i=function(t,e,r){return t[e]=r}}function u(t,e,r,n){var a=e&&e.prototype instanceof f?e:f,o=Object.create(a.prototype),s=new b(n||[]);return o._invoke=function(t,e,r){var n="suspendedStart";return function(a,o){if("executing"===n)throw new Error("Generator is already running");if("completed"===n){if("throw"===a)throw o;return A()}for(r.method=a,r.arg=o;;){var s=r.delegate;if(s){var c=k(s,r);if(c){if(c===h)continue;return c}}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 i=p(t,e,r);if("normal"===i.type){if(n=r.done?"completed":"suspendedYield",i.arg===h)continue;return{value:i.arg,done:r.done}}"throw"===i.type&&(n="completed",r.method="throw",r.arg=i.arg)}}}(t,r,s),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=u;var h={};function f(){}function d(){}function l(){}var y={};i(y,o,(function(){return this}));var v=Object.getPrototypeOf,_=v&&v(v(g([])));_&&_!==e&&n.call(_,o)&&(y=_);var m=l.prototype=f.prototype=Object.create(y);function T(t){["next","throw","return"].forEach((function(e){i(t,e,(function(t){return this._invoke(e,t)}))}))}function x(t,e){function r(a,o,s,c){var i=p(t[a],t,o);if("throw"!==i.type){var u=i.arg,h=u.value;return h&&"object"==typeof h&&n.call(h,"__await")?e.resolve(h.__await).then((function(t){r("next",t,s,c)}),(function(t){r("throw",t,s,c)})):e.resolve(h).then((function(t){u.value=t,s(u)}),(function(t){return r("throw",t,s,c)}))}c(i.arg)}var a;this._invoke=function(t,n){function o(){return new e((function(e,a){r(t,n,e,a)}))}return a=a?a.then(o,o):o()}}function k(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,k(t,e),"throw"===e.method))return h;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var n=p(r,t.iterator,e.arg);if("throw"===n.type)return e.method="throw",e.arg=n.arg,e.delegate=null,h;var a=n.arg;return a?a.done?(e[t.resultName]=a.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=void 0),e.delegate=null,h):a:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,h)}function w(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 O(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function b(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(w,this),this.reset(!0)}function g(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 r=-1,a=function e(){for(;++r<t.length;)if(n.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=void 0,e.done=!0,e};return a.next=a}}return{next:A}}function A(){return{value:void 0,done:!0}}return d.prototype=l,i(m,"constructor",l),i(l,"constructor",d),d.displayName=i(l,c,"GeneratorFunction"),t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,i(t,c,"GeneratorFunction")),t.prototype=Object.create(m),t},t.awrap=function(t){return{__await:t}},T(x.prototype),i(x.prototype,s,(function(){return this})),t.AsyncIterator=x,t.async=function(e,r,n,a,o){void 0===o&&(o=Promise);var s=new x(u(e,r,n,a),o);return t.isGeneratorFunction(r)?s:s.next().then((function(t){return t.done?t.value:s.next()}))},T(m),i(m,c,"Generator"),i(m,o,(function(){return this})),i(m,"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=g,b.prototype={constructor:b,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(O),!t)for(var e in this)"t"===e.charAt(0)&&n.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 r(r,n){return s.type="throw",s.arg=t,e.next=r,n&&(e.method="next",e.arg=void 0),!!n}for(var a=this.tryEntries.length-1;a>=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return r("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),i=n.call(o,"finallyLoc");if(c&&i){if(this.prev<o.catchLoc)return r(o.catchLoc,!0);if(this.prev<o.finallyLoc)return r(o.finallyLoc)}else if(c){if(this.prev<o.catchLoc)return r(o.catchLoc,!0)}else{if(!i)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return r(o.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var a=this.tryEntries[r];if(a.tryLoc<=this.prev&&n.call(a,"finallyLoc")&&this.prev<a.finallyLoc){var o=a;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var s=o?o.completion:{};return s.type=t,s.arg=e,o?(this.method="next",this.next=o.finallyLoc,h):this.complete(s)},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),h},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),O(r),h}},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 a=n.arg;O(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:g(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=void 0),h}},t}function n(t,e,r,n,a,o,s){try{var c=t[o](s),i=c.value}catch(t){return void r(t)}c.done?e(i):Promise.resolve(i).then(n,a)}function a(t){return function(){var e=this,r=arguments;return new Promise((function(a,o){var s=t.apply(e,r);function c(t){n(s,a,o,c,i,"next",t)}function i(t){n(s,a,o,c,i,"throw",t)}c(void 0)}))}}function o(){return(o=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/","https://api.kittycad.io/",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function s(){return(s=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/_meta/info","https://api.kittycad.io/_meta/info",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/_meta/info",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function c(){return(c=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/ping","https://api.kittycad.io/ping",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/ping",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function i(){return(i=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.group_by,o="/api-call-metrics?group_by=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function u(){return(u=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function p(){return(p=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function h(){return(h=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c=n.status,i="/async/operations?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s,"&status=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},t.next=8,e.default(u,f);case 8:return d=t.sent,t.next=11,d.json();case 11:return l=t.sent,t.abrupt("return",l);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function f(){return(f=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/async/operations/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function d(){return(d=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-calls?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function l(){return(l=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/user/api-calls/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function y(){return(y=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d,l;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o=n.limit,s=n.page_token,c=n.sort_by,i="/users/".concat(a,"/api-calls?limit=").concat(o,"&page_token=").concat(s,"&sort_by=").concat(c),u="https://api.kittycad.io"+i,p=process.env.KITTYCAD_TOKEN||"",h={Authorization:"Bearer ".concat(p)},f={method:"POST",headers:h},t.next=8,e.default(u,f);case 8:return d=t.sent,t.next=11,d.json();case 11:return l=t.sent,t.abrupt("return",l);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function v(){return(v=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.output_format,o=n.src_format,s=n.body,c="/file/conversion/".concat(o,"/").concat(a),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function _(){return(_=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function m(){return(m=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.material_mass,o=n.src_format,s=n.body,c="/file/density?material_mass=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function T(){return(T=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.lang,o=n.output,s=n.body,c="/file/execute/".concat(a,"?output=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function x(){return(x=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.material_density,o=n.src_format,s=n.body,c="/file/mass?material_density=".concat(a,"&src_format=").concat(o),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p,body:s},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function k(){return(k=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.src_format,o=n.body,s="/file/volume?src_format=".concat(a),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u,body:o},t.next=8,e.default(c,p);case 8:return h=t.sent,t.next=11,h.json();case 11:return f=t.sent,t.abrupt("return",f);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function w(){return(w=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/user/file/conversions/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function O(){return(O=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/oauth2/device/auth","https://api.kittycad.io/oauth2/device/auth",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/oauth2/device/auth",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function b(){return(b=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/oauth2/device/confirm","https://api.kittycad.io/oauth2/device/confirm",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/oauth2/device/confirm",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function g(){return(g=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.user_code,o="/oauth2/device/verify?user_code=".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function A(){return(A=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/oauth2/device/token","https://api.kittycad.io/oauth2/device/token",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/oauth2/device/token",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function K(){return(K=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.provider,o=n.code,s=n.state,c="/oauth2/provider/".concat(a,"/callback?code=").concat(o,"&state=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function E(){return(E=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.provider,o=n.callback_url,s="/oauth2/provider/".concat(a,"/consent?callback_url=").concat(o),c="https://api.kittycad.io"+s,i=process.env.KITTYCAD_TOKEN||"",u={Authorization:"Bearer ".concat(i)},p={method:"POST",headers:u},t.next=8,e.default(c,p);case 8:return h=t.sent,t.next=11,h.json();case 11:return f=t.sent,t.abrupt("return",f);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function j(){return(j=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.output_format,o=n.src_format,s=n.value,c="/unit/conversion/".concat(o,"/").concat(a,"?value=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function P(){return(P=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function N(){return(N=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function S(){return(S=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user","https://api.kittycad.io/user",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function I(){return(I=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/extended","https://api.kittycad.io/user/extended",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/extended",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Y(){return(Y=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function z(){return(z=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/users-extended?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function B(){return(B=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/users-extended/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function C(){return(C=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/users/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function D(){return(D=a(r().mark((function t(n){var a,o,s,c,i,u,p,h,f,d;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.limit,o=n.page_token,s=n.sort_by,c="/user/api-tokens?limit=".concat(a,"&page_token=").concat(o,"&sort_by=").concat(s),i="https://api.kittycad.io"+c,u=process.env.KITTYCAD_TOKEN||"",p={Authorization:"Bearer ".concat(u)},h={method:"POST",headers:p},t.next=8,e.default(i,h);case 8:return f=t.sent,t.next=11,f.json();case 11:return d=t.sent,t.abrupt("return",d);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function L(){return(L=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/api-tokens","https://api.kittycad.io/user/api-tokens",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/api-tokens",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function G(){return(G=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function F(){return(F=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.token,o="/user/api-tokens/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function q(){return(q=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function M(){return(M=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function H(){return(H=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function J(){return(J=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment","https://api.kittycad.io/user/payment",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function Q(){return(Q=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/balance","https://api.kittycad.io/user/payment/balance",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/balance",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function R(){return(R=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/intent","https://api.kittycad.io/user/payment/intent",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/intent",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function U(){return(U=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/invoices","https://api.kittycad.io/user/payment/invoices",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/invoices",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function V(){return(V=a(r().mark((function t(){var n,a,o,s,c;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return"/user/payment/methods","https://api.kittycad.io/user/payment/methods",n=process.env.KITTYCAD_TOKEN||"",a={Authorization:"Bearer ".concat(n)},o={method:"POST",headers:a},t.next=7,e.default("https://api.kittycad.io/user/payment/methods",o);case 7:return s=t.sent,t.next=10,s.json();case 10:return c=t.sent,t.abrupt("return",c);case 12:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function W(){return(W=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.id,o="/user/payment/methods/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}function X(){return(X=a(r().mark((function t(n){var a,o,s,c,i,u,p,h;return r().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return a=n.token,o="/user/session/".concat(a),s="https://api.kittycad.io"+o,c=process.env.KITTYCAD_TOKEN||"",i={Authorization:"Bearer ".concat(c)},u={method:"POST",headers:i},t.next=8,e.default(s,u);case 8:return p=t.sent,t.next=11,p.json();case 11:return h=t.sent,t.abrupt("return",h);case 13:case"end":return t.stop()}}),t)})))).apply(this,arguments)}var Z={get_schema:function(){return o.apply(this,arguments)},get_metadata:function(){return s.apply(this,arguments)},ping:function(){return c.apply(this,arguments)}},$={get_api_call_metrics:function(t){return i.apply(this,arguments)},list_api_calls:function(t){return u.apply(this,arguments)},get_api_call:function(t){return p.apply(this,arguments)},list_async_operations:function(t){return h.apply(this,arguments)},get_async_operation:function(t){return f.apply(this,arguments)},user_list_api_calls:function(t){return d.apply(this,arguments)},get_api_call_for_user:function(t){return l.apply(this,arguments)},list_api_calls_for_user:function(t){return y.apply(this,arguments)}},tt={create_file_conversion:function(t){return v.apply(this,arguments)},get_file_conversion:function(t){return _.apply(this,arguments)},create_file_density:function(t){return m.apply(this,arguments)},create_file_execution:function(t){return T.apply(this,arguments)},create_file_mass:function(t){return x.apply(this,arguments)},create_file_volume:function(t){return k.apply(this,arguments)},get_file_conversion_for_user:function(t){return w.apply(this,arguments)}},et={device_auth_request:function(){return O.apply(this,arguments)},device_auth_confirm:function(){return b.apply(this,arguments)},device_auth_verify:function(t){return g.apply(this,arguments)},device_access_token:function(){return A.apply(this,arguments)},listen_oauth2_provider_callback:function(t){return K.apply(this,arguments)},listen_oauth2_provider_consent:function(t){return E.apply(this,arguments)}},rt={create_unit_conversion:function(t){return j.apply(this,arguments)}},nt={delete_user_self:function(){return P.apply(this,arguments)},get_user_self:function(){return N.apply(this,arguments)},update_user_self:function(){return S.apply(this,arguments)},get_user_self_extended:function(){return I.apply(this,arguments)},list_users:function(t){return Y.apply(this,arguments)},list_users_extended:function(t){return z.apply(this,arguments)},get_user_extended:function(t){return B.apply(this,arguments)},get_user:function(t){return C.apply(this,arguments)}},at={list_api_tokens_for_user:function(t){return D.apply(this,arguments)},create_api_token_for_user:function(){return L.apply(this,arguments)},delete_api_token_for_user:function(t){return G.apply(this,arguments)},get_api_token_for_user:function(t){return F.apply(this,arguments)}},ot={delete_payment_information_for_user:function(){return q.apply(this,arguments)},get_payment_information_for_user:function(){return M.apply(this,arguments)},create_payment_information_for_user:function(){return H.apply(this,arguments)},update_payment_information_for_user:function(){return J.apply(this,arguments)},get_payment_balance_for_user:function(){return Q.apply(this,arguments)},create_payment_intent_for_user:function(){return R.apply(this,arguments)},list_invoices_for_user:function(){return U.apply(this,arguments)},list_payment_methods_for_user:function(){return V.apply(this,arguments)},delete_payment_method_for_user:function(t){return W.apply(this,arguments)}},st={get_session_for_user:function(t){return X.apply(this,arguments)}};exports.api_calls=$,exports.api_tokens=at,exports.file=tt,exports.meta=Z,exports.oauth2=et,exports.payments=ot,exports.sessions=st,exports.unit=rt,exports.users=nt;