upload-api-client-internal
Advanced tools
Comparing version 1.69.0 to 1.70.0
@@ -48,2 +48,3 @@ export { ApiError } from "./core/ApiError"; | ||
export type { InitializeAccountRequest } from "./models/InitializeAccountRequest"; | ||
export type { IssueSubscriptionNonceResponse } from "./models/IssueSubscriptionNonceResponse"; | ||
export type { JsonObject } from "./models/JsonObject"; | ||
@@ -93,2 +94,3 @@ export type { JsonPrimitive } from "./models/JsonPrimitive"; | ||
export type { StorageStatisticsSegment } from "./models/StorageStatisticsSegment"; | ||
export type { SubscriptionNonce } from "./models/SubscriptionNonce"; | ||
export type { Template } from "./models/Template"; | ||
@@ -132,2 +134,3 @@ export type { TemplateCategory } from "./models/TemplateCategory"; | ||
export { ApiKeysService } from "./services/ApiKeysService"; | ||
export { BillingService } from "./services/BillingService"; | ||
export { CdnAccessTokensService } from "./services/CdnAccessTokensService"; | ||
@@ -134,0 +137,0 @@ export { FilesService } from "./services/FilesService"; |
@@ -1,1 +0,1 @@ | ||
module.exports=function(){"use strict";var t={828:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return c(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i(r,t)})(t)}function c(t,e,n){return(c=a()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.r(e),n.d(e,{AccountsService:function(){return _},AllowedOriginsService:function(){return z},ApiError:function(){return p},ApiKeyType:function(){return f},ApiKeysService:function(){return N},CdnAccessTokensService:function(){return G},FilesService:function(){return K},NpmService:function(){return H},OpenAPI:function(){return v},PluginsService:function(){return Q},PublicKeyFingerprintHashAlgorithm:function(){return l},PublicKeysService:function(){return J},StatisticsService:function(){return tt},TemplateIcon:function(){return h},TransformationCacheStatus:function(){return d},TransformationsService:function(){return rt},UserRoleType:function(){return y},UsersService:function(){return ct}});var f,l,h,d,y,p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,r=(e=u,n=a(),function(){var t,r=s(e);if(n){var u=s(this).constructor;t=Reflect.construct(r,arguments,u)}else t=r.apply(this,arguments);return o(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=r.call(this,e)).url=t.url,n.status=t.status,n.statusText=t.statusText,n.body=t.body,n}return u}(u(Error)),v={BASE:"/",VERSION:"0.1.941",WITH_CREDENTIALS:!1,TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0};function b(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function m(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function E(t){return null!=t}function P(t){return"string"==typeof t}function T(t){return P(t)&&""!==t}function U(t){return t instanceof Blob}!function(t){t.PUBLIC="public",t.SECRET="secret"}(f||(f={})),function(t){t.SHA256="sha256"}(l||(l={})),function(t){t.VIDEO_WATERMARK="VideoWatermark",t.VIDEO_TRIM="VideoTrim",t.VIDEO_TRANSCODE="VideoTranscode",t.VIDEO_THUMBNAILS="VideoThumbnails",t.VIDEO_RESIZE="VideoResize",t.VIDEO_QUALITY="VideoQuality",t.ANTI_VIRUS="AntiVirus",t.ARCHIVE_COMPRESS="ArchiveCompress",t.ARCHIVE_EXTRACT="ArchiveExtract",t.CUSTOM_CODE="CustomCode",t.IMAGE_WATERMARK="ImageWatermark",t.IMAGE_RESIZE="ImageResize",t.IMAGE_CROP="ImageCrop",t.IMAGE_CONVERT="ImageConvert",t.IMAGE_QUALITY="ImageQuality"}(h||(h={})),function(t){t.OK="ok",t.DELETING="deleting"}(d||(d={})),function(t){t.ACCOUNT_ADMIN="AccountAdmin",t.ACCOUNT_OBSERVER="AccountObserver",t.SYSTEM_ADMIN="SystemAdmin",t.SYSTEM_OBSERVER="SystemObserver"}(y||(y={}));var g=b((function(t){var e=function(t){var e,n,r=t.path.replace(/[:]/g,"_"),o="".concat(v.BASE).concat(r);return t.query?"".concat(o).concat((e=t.query,n=[],Object.keys(e).forEach((function(t){var r=e[t];E(r)&&(Array.isArray(r)?r.forEach((function(e){n.push("".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(String(e))))})):n.push("".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(String(r)))))})),n.length>0?"?".concat(n.join("&")):"")):o}(t);return m(k(t,e),(function(n){return m(S(n),(function(r){var o=function(t,e){if(e){var n=t.headers.get(e);if(P(n))return n}return null}(n,t.responseHeader),u={url:e,ok:n.ok,status:n.status,statusText:n.statusText,body:o||r};return function(t,e){var n=Object.assign({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(n)throw new p(e,n);if(!e.ok)throw new p(e,"Generic Error")}(t,u),u}))}))})),S=b((function(t){var e,n,r=!1;return n=function(t){return r?t:null},(e=function(e,n){try{var o=(u=t.headers.get("Content-Type"),function(){if(u)return u.toLowerCase().startsWith("application/json")?(r=!0,m(t.json())):(r=!0,m(t.text()))}())}catch(t){return n(t)}var u;return o&&o.then?o.then(void 0,n):o}(0,(function(t){console.error(t)})))&&e.then?e.then(n):n(e)})),k=b((function(t,e){var n=t.method;return m(j(t),(function(r){var o={method:n,headers:r,body:w(t)};return v.WITH_CREDENTIALS&&(o.credentials="include"),m(fetch(e,o))}))})),j=b((function(t){return m(O(t,v.TOKEN),(function(e){return m(O(t,v.USERNAME),(function(n){return m(O(t,v.PASSWORD),(function(r){return m(O(t,v.HEADERS),(function(o){var u=new Headers(Object.assign(Object.assign({Accept:"application/json"},o),t.headers));if(T(e)&&u.append("Authorization","Bearer ".concat(e)),T(n)&&T(r)){var c=btoa("".concat(n,":").concat(r));u.append("Authorization","Basic ".concat(c))}return t.body&&(U(t.body)?u.append("Content-Type",t.body.type||"application/octet-stream"):P(t.body)?u.append("Content-Type","text/plain"):u.append("Content-Type","application/json")),u}))}))}))}))})),O=b((function(t,e){return"function"==typeof e?e(t):e}));function w(t){return t.formData?(e=t.formData,n=new FormData,Object.keys(e).forEach((function(t){var r=e[t];E(r)&&n.append(t,r)})),n):t.body?P(t.body)||U(t.body)?t.body:JSON.stringify(t.body):void 0;var e,n}function A(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var _=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"initializeAccount",value:function(t){try{return A(g({method:"PUT",path:"/v1/accounts/primary",body:t,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"setUploadDownloadAuthSettings",value:function(t,e){try{return A(g({method:"PUT",path:"/v1/accounts/".concat(t,"/security/upload_download_auth_settings"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&C(e.prototype,null),n&&C(e,n),t}();function I(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var z=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"addAllowedOrigin",value:function(t,e){try{return I(g({method:"POST",path:"/v1/accounts/".concat(t,"/security/allowed_origins"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"removeAllowedOrigin",value:function(t,e){try{return I(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/security/allowed_origins"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&R(e.prototype,null),n&&R(e,n),t}();function D(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function M(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var N=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"createApiKey",value:function(t,e,n){try{return D(g({method:"POST",path:"/v1/accounts/".concat(t,"/security/api_keys/").concat(e),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteApiKey",value:function(t,e){try{return D(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/security/api_keys/").concat(e),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteApiKeyBatch",value:function(t,e){try{return D(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/security/api_keys"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&M(e.prototype,null),n&&M(e,n),t}();function V(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function x(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var G=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"getPublicKey",value:function(){try{return V(g({method:"GET",path:"/v1/auth/cdn_access_tokens/public_key"}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"generateCdnAccessToken",value:function(){try{return V(g({method:"GET",path:"/v1/auth/cdn_access_tokens/current",errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&x(e.prototype,null),n&&x(e,n),t}();function L(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function B(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var K=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"beginUpload",value:function(t){try{return L(g({method:"POST",path:"/v1/files",body:t,errors:{401:"Unauthenticated."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteFileBatch",value:function(t){try{return L(g({method:"DELETE",path:"/v1/files",body:t,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getFiles",value:function(t,e,n,r,o,u){try{return L(g({method:"GET",path:"/v1/files",query:{accountId:t,pageSize:e,fileTag:n,fileTagPrefixSearch:r,backwardToken:o,forwardToken:u},errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"completeUploadPart",value:function(t,e,n){try{return L(g({method:"PUT",path:"/v1/files/".concat(t,"/upload_parts/").concat(e),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"File or upload part not found."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getUploadPart",value:function(t,e){try{return L(g({method:"GET",path:"/v1/files/".concat(t,"/upload_parts/").concat(e),errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"File or upload part not found."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteFile",value:function(t){try{return L(g({method:"DELETE",path:"/v1/files/".concat(t),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getFile",value:function(t){try{return L(g({method:"GET",path:"/v1/files/".concat(t,"/details"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getUploadParts",value:function(t){try{return L(g({method:"GET",path:"/v1/files/".concat(t,"/upload_parts"),errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"File not found."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&B(e.prototype,null),n&&B(e,n),t}();function F(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var H=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"getPackageVersions",value:function(t){try{return e=g({method:"GET",path:"/v1/npm/packages/".concat(t,"/versions"),errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"Not found."}}),n=function(t){return t.body},e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e}catch(t){return Promise.reject(t)}var e,n}}],null&&F(e.prototype,null),n&&F(e,n),t}();function W(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Q=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"installCustomPlugin",value:function(t,e,n){try{return W(g({method:"PUT",path:"/v1/accounts/".concat(t,"/plugins/").concat(e,"/").concat(n),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"uninstallCustomPlugin",value:function(t,e,n){try{return W(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/plugins/").concat(e,"/").concat(n),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&q(e.prototype,null),n&&q(e,n),t}();function Y(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Z(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var J=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"addPublicKey",value:function(t,e){try{return Y(g({method:"POST",path:"/v1/accounts/".concat(t,"/public_keys"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"removePublicKeyBatch",value:function(t,e){try{return Y(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/public_keys"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"removePublicKey",value:function(t,e){try{return Y(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/public_keys/").concat(e),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&Z(e.prototype,null),n&&Z(e,n),t}();function X(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function $(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var tt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"getDownloadStatistics",value:function(t){try{return X(g({method:"GET",path:"/v1/accounts/".concat(t,"/statistics/downloads"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getStorageStatistics",value:function(t){try{return X(g({method:"GET",path:"/v1/accounts/".concat(t,"/statistics/storage"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getTransformationStatistics",value:function(t){try{return X(g({method:"GET",path:"/v1/accounts/".concat(t,"/statistics/transformations"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&$(e.prototype,null),n&&$(e,n),t}();function et(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function nt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var rt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"createTransformation",value:function(t,e){try{return et(g({method:"POST",path:"/v1/accounts/".concat(t,"/transformations"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteTransformationBatch",value:function(t,e,n){try{return et(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/transformations"),query:{deleteMountedCaches:e},body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"updateTransformation",value:function(t,e,n){try{return et(g({method:"PUT",path:"/v1/accounts/".concat(t,"/transformations/").concat(e),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteTransformation",value:function(t,e,n){try{return et(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/transformations/").concat(e),query:{deleteMountedCache:n},errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"mountNewEmptyCache",value:function(t,e,n){try{return et(g({method:"POST",path:"/v1/accounts/".concat(t,"/transformations/").concat(e,"/cache"),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"mountExistingCache",value:function(t,e,n){try{return et(g({method:"PUT",path:"/v1/accounts/".concat(t,"/transformations/").concat(e,"/cache"),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&nt(e.prototype,null),n&&nt(e,n),t}();function ot(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function ut(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ct=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"context",value:function(){try{return ot(g({method:"GET",path:"/v1/users/current/context",errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteCurrentUser",value:function(){try{return ot(g({method:"DELETE",path:"/v1/users/current",errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"updateBasicInformation",value:function(t){try{return ot(g({method:"PUT",path:"/v1/users/current/basic_information",body:t,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&ut(e.prototype,null),n&&ut(e,n),t}()}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(828)}(); | ||
module.exports=function(){"use strict";var t={872:function(t,e,n){function r(t){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return!e||"object"!==r(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function u(t){var e="function"==typeof Map?new Map:void 0;return(u=function(t){if(null===t||(n=t,-1===Function.toString.call(n).indexOf("[native code]")))return t;var n;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return c(t,arguments,s(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),i(r,t)})(t)}function c(t,e,n){return(c=a()?Reflect.construct:function(t,e,n){var r=[null];r.push.apply(r,e);var o=new(Function.bind.apply(t,r));return n&&i(o,n.prototype),o}).apply(null,arguments)}function a(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(t){return!1}}function i(t,e){return(i=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}n.r(e),n.d(e,{AccountsService:function(){return _},AllowedOriginsService:function(){return z},ApiError:function(){return p},ApiKeyType:function(){return f},ApiKeysService:function(){return N},BillingService:function(){return x},CdnAccessTokensService:function(){return B},FilesService:function(){return H},NpmService:function(){return q},OpenAPI:function(){return v},PluginsService:function(){return Z},PublicKeyFingerprintHashAlgorithm:function(){return l},PublicKeysService:function(){return $},StatisticsService:function(){return nt},TemplateIcon:function(){return h},TransformationCacheStatus:function(){return d},TransformationsService:function(){return ut},UserRoleType:function(){return y},UsersService:function(){return it}});var f,l,h,d,y,p=function(t){!function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&i(t,e)}(u,t);var e,n,r=(e=u,n=a(),function(){var t,r=s(e);if(n){var u=s(this).constructor;t=Reflect.construct(r,arguments,u)}else t=r.apply(this,arguments);return o(this,t)});function u(t,e){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,u),(n=r.call(this,e)).url=t.url,n.status=t.status,n.statusText=t.statusText,n.body=t.body,n}return u}(u(Error)),v={BASE:"/",VERSION:"0.1.957",WITH_CREDENTIALS:!1,TOKEN:void 0,USERNAME:void 0,PASSWORD:void 0,HEADERS:void 0};function b(t){return function(){for(var e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];try{return Promise.resolve(t.apply(this,e))}catch(t){return Promise.reject(t)}}}function m(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function E(t){return null!=t}function P(t){return"string"==typeof t}function T(t){return P(t)&&""!==t}function U(t){return t instanceof Blob}!function(t){t.PUBLIC="public",t.SECRET="secret"}(f||(f={})),function(t){t.SHA256="sha256"}(l||(l={})),function(t){t.VIDEO_WATERMARK="VideoWatermark",t.VIDEO_TRIM="VideoTrim",t.VIDEO_TRANSCODE="VideoTranscode",t.VIDEO_THUMBNAILS="VideoThumbnails",t.VIDEO_RESIZE="VideoResize",t.VIDEO_QUALITY="VideoQuality",t.ANTI_VIRUS="AntiVirus",t.ARCHIVE_COMPRESS="ArchiveCompress",t.ARCHIVE_EXTRACT="ArchiveExtract",t.CUSTOM_CODE="CustomCode",t.IMAGE_WATERMARK="ImageWatermark",t.IMAGE_RESIZE="ImageResize",t.IMAGE_CROP="ImageCrop",t.IMAGE_CONVERT="ImageConvert",t.IMAGE_QUALITY="ImageQuality"}(h||(h={})),function(t){t.OK="ok",t.DELETING="deleting"}(d||(d={})),function(t){t.ACCOUNT_ADMIN="AccountAdmin",t.ACCOUNT_OBSERVER="AccountObserver",t.SYSTEM_ADMIN="SystemAdmin",t.SYSTEM_OBSERVER="SystemObserver"}(y||(y={}));var g=b((function(t){var e=function(t){var e,n,r=t.path.replace(/[:]/g,"_"),o="".concat(v.BASE).concat(r);return t.query?"".concat(o).concat((e=t.query,n=[],Object.keys(e).forEach((function(t){var r=e[t];E(r)&&(Array.isArray(r)?r.forEach((function(e){n.push("".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(String(e))))})):n.push("".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(String(r)))))})),n.length>0?"?".concat(n.join("&")):"")):o}(t);return m(k(t,e),(function(n){return m(S(n),(function(r){var o=function(t,e){if(e){var n=t.headers.get(e);if(P(n))return n}return null}(n,t.responseHeader),u={url:e,ok:n.ok,status:n.status,statusText:n.statusText,body:o||r};return function(t,e){var n=Object.assign({400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",500:"Internal Server Error",502:"Bad Gateway",503:"Service Unavailable"},t.errors)[e.status];if(n)throw new p(e,n);if(!e.ok)throw new p(e,"Generic Error")}(t,u),u}))}))})),S=b((function(t){var e,n,r=!1;return n=function(t){return r?t:null},(e=function(e,n){try{var o=(u=t.headers.get("Content-Type"),function(){if(u)return u.toLowerCase().startsWith("application/json")?(r=!0,m(t.json())):(r=!0,m(t.text()))}())}catch(t){return n(t)}var u;return o&&o.then?o.then(void 0,n):o}(0,(function(t){console.error(t)})))&&e.then?e.then(n):n(e)})),k=b((function(t,e){var n=t.method;return m(j(t),(function(r){var o={method:n,headers:r,body:O(t)};return v.WITH_CREDENTIALS&&(o.credentials="include"),m(fetch(e,o))}))})),j=b((function(t){return m(w(t,v.TOKEN),(function(e){return m(w(t,v.USERNAME),(function(n){return m(w(t,v.PASSWORD),(function(r){return m(w(t,v.HEADERS),(function(o){var u=new Headers(Object.assign(Object.assign({Accept:"application/json"},o),t.headers));if(T(e)&&u.append("Authorization","Bearer ".concat(e)),T(n)&&T(r)){var c=btoa("".concat(n,":").concat(r));u.append("Authorization","Basic ".concat(c))}return t.body&&(U(t.body)?u.append("Content-Type",t.body.type||"application/octet-stream"):P(t.body)?u.append("Content-Type","text/plain"):u.append("Content-Type","application/json")),u}))}))}))}))})),w=b((function(t,e){return"function"==typeof e?e(t):e}));function O(t){return t.formData?(e=t.formData,n=new FormData,Object.keys(e).forEach((function(t){var r=e[t];E(r)&&n.append(t,r)})),n):t.body?P(t.body)||U(t.body)?t.body:JSON.stringify(t.body):void 0;var e,n}function A(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function C(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var _=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"initializeAccount",value:function(t){try{return A(g({method:"PUT",path:"/v1/accounts/primary",body:t,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"setUploadDownloadAuthSettings",value:function(t,e){try{return A(g({method:"PUT",path:"/v1/accounts/".concat(t,"/security/upload_download_auth_settings"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&C(e.prototype,null),n&&C(e,n),t}();function I(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function R(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var z=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"addAllowedOrigin",value:function(t,e){try{return I(g({method:"POST",path:"/v1/accounts/".concat(t,"/security/allowed_origins"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"removeAllowedOrigin",value:function(t,e){try{return I(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/security/allowed_origins"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&R(e.prototype,null),n&&R(e,n),t}();function D(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function M(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var N=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"createApiKey",value:function(t,e,n){try{return D(g({method:"POST",path:"/v1/accounts/".concat(t,"/security/api_keys/").concat(e),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteApiKey",value:function(t,e){try{return D(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/security/api_keys/").concat(e),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteApiKeyBatch",value:function(t,e){try{return D(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/security/api_keys"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&M(e.prototype,null),n&&M(e,n),t}();function V(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var x=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"issueSubscriptionNonce",value:function(t){try{return e=g({method:"POST",path:"/v1/accounts/".concat(t,"/billing/subscription_nonces"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),n=function(t){return t.body},e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e}catch(t){return Promise.reject(t)}var e,n}}],null&&V(e.prototype,null),n&&V(e,n),t}();function G(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function L(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var B=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"getPublicKey",value:function(){try{return G(g({method:"GET",path:"/v1/auth/cdn_access_tokens/public_key"}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"generateCdnAccessToken",value:function(){try{return G(g({method:"GET",path:"/v1/auth/cdn_access_tokens/current",errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&L(e.prototype,null),n&&L(e,n),t}();function K(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function F(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var H=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"beginUpload",value:function(t){try{return K(g({method:"POST",path:"/v1/files",body:t,errors:{401:"Unauthenticated."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteFileBatch",value:function(t){try{return K(g({method:"DELETE",path:"/v1/files",body:t,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getFiles",value:function(t,e,n,r,o,u){try{return K(g({method:"GET",path:"/v1/files",query:{accountId:t,pageSize:e,fileTag:n,fileTagPrefixSearch:r,backwardToken:o,forwardToken:u},errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"completeUploadPart",value:function(t,e,n){try{return K(g({method:"PUT",path:"/v1/files/".concat(t,"/upload_parts/").concat(e),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"File or upload part not found."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getUploadPart",value:function(t,e){try{return K(g({method:"GET",path:"/v1/files/".concat(t,"/upload_parts/").concat(e),errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"File or upload part not found."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteFile",value:function(t){try{return K(g({method:"DELETE",path:"/v1/files/".concat(t),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getFile",value:function(t){try{return K(g({method:"GET",path:"/v1/files/".concat(t,"/details"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getUploadParts",value:function(t){try{return K(g({method:"GET",path:"/v1/files/".concat(t,"/upload_parts"),errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"File not found."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&F(e.prototype,null),n&&F(e,n),t}();function W(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var q=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"getPackageVersions",value:function(t){try{return e=g({method:"GET",path:"/v1/npm/packages/".concat(t,"/versions"),errors:{401:"Unauthenticated.",403:"Unauthorized.",404:"Not found."}}),n=function(t){return t.body},e&&e.then||(e=Promise.resolve(e)),n?e.then(n):e}catch(t){return Promise.reject(t)}var e,n}}],null&&W(e.prototype,null),n&&W(e,n),t}();function Q(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function Y(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Z=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"installCustomPlugin",value:function(t,e,n){try{return Q(g({method:"PUT",path:"/v1/accounts/".concat(t,"/plugins/").concat(e,"/").concat(n),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"uninstallCustomPlugin",value:function(t,e,n){try{return Q(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/plugins/").concat(e,"/").concat(n),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&Y(e.prototype,null),n&&Y(e,n),t}();function J(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function X(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var $=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"addPublicKey",value:function(t,e){try{return J(g({method:"POST",path:"/v1/accounts/".concat(t,"/public_keys"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"removePublicKeyBatch",value:function(t,e){try{return J(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/public_keys"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"removePublicKey",value:function(t,e){try{return J(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/public_keys/").concat(e),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&X(e.prototype,null),n&&X(e,n),t}();function tt(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function et(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var nt=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"getDownloadStatistics",value:function(t){try{return tt(g({method:"GET",path:"/v1/accounts/".concat(t,"/statistics/downloads"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getStorageStatistics",value:function(t){try{return tt(g({method:"GET",path:"/v1/accounts/".concat(t,"/statistics/storage"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"getTransformationStatistics",value:function(t){try{return tt(g({method:"GET",path:"/v1/accounts/".concat(t,"/statistics/transformations"),errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&et(e.prototype,null),n&&et(e,n),t}();function rt(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var ut=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"createTransformation",value:function(t,e){try{return rt(g({method:"POST",path:"/v1/accounts/".concat(t,"/transformations"),body:e,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteTransformationBatch",value:function(t,e,n){try{return rt(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/transformations"),query:{deleteMountedCaches:e},body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"updateTransformation",value:function(t,e,n){try{return rt(g({method:"PUT",path:"/v1/accounts/".concat(t,"/transformations/").concat(e),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteTransformation",value:function(t,e,n){try{return rt(g({method:"DELETE",path:"/v1/accounts/".concat(t,"/transformations/").concat(e),query:{deleteMountedCache:n},errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"mountNewEmptyCache",value:function(t,e,n){try{return rt(g({method:"POST",path:"/v1/accounts/".concat(t,"/transformations/").concat(e,"/cache"),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"mountExistingCache",value:function(t,e,n){try{return rt(g({method:"PUT",path:"/v1/accounts/".concat(t,"/transformations/").concat(e,"/cache"),body:n,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&ot(e.prototype,null),n&&ot(e,n),t}();function ct(t,e,n){return n?e?e(t):t:(t&&t.then||(t=Promise.resolve(t)),e?t.then(e):t)}function at(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var it=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)}var e,n;return e=t,n=[{key:"context",value:function(){try{return ct(g({method:"GET",path:"/v1/users/current/context",errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"deleteCurrentUser",value:function(){try{return ct(g({method:"DELETE",path:"/v1/users/current",errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}},{key:"updateBasicInformation",value:function(t){try{return ct(g({method:"PUT",path:"/v1/users/current/basic_information",body:t,errors:{401:"Unauthenticated.",403:"Unauthorized."}}),(function(t){return t.body}))}catch(t){return Promise.reject(t)}}}],null&&at(e.prototype,null),n&&at(e,n),t}()}},e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={exports:{}};return t[r](o,o.exports,n),o.exports}return n.d=function(t,e){for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n(872)}(); |
{ | ||
"name": "upload-api-client-internal", | ||
"version": "1.69.0", | ||
"version": "1.70.0", | ||
"description": "Upload API Client (Internal)", | ||
@@ -5,0 +5,0 @@ "author": "Upload <hello@upload.io> (https://upload.io)", |
@@ -21,3 +21,3 @@ /* istanbul ignore file */ | ||
BASE: "/", | ||
VERSION: "0.1.941", | ||
VERSION: "0.1.957", | ||
WITH_CREDENTIALS: false, | ||
@@ -24,0 +24,0 @@ TOKEN: undefined, |
@@ -52,2 +52,3 @@ /* istanbul ignore file */ | ||
export type { InitializeAccountRequest } from "./models/InitializeAccountRequest"; | ||
export type { IssueSubscriptionNonceResponse } from "./models/IssueSubscriptionNonceResponse"; | ||
export type { JsonObject } from "./models/JsonObject"; | ||
@@ -97,2 +98,3 @@ export type { JsonPrimitive } from "./models/JsonPrimitive"; | ||
export type { StorageStatisticsSegment } from "./models/StorageStatisticsSegment"; | ||
export type { SubscriptionNonce } from "./models/SubscriptionNonce"; | ||
export type { Template } from "./models/Template"; | ||
@@ -137,2 +139,3 @@ export type { TemplateCategory } from "./models/TemplateCategory"; | ||
export { ApiKeysService } from "./services/ApiKeysService"; | ||
export { BillingService } from "./services/BillingService"; | ||
export { CdnAccessTokensService } from "./services/CdnAccessTokensService"; | ||
@@ -139,0 +142,0 @@ export { FilesService } from "./services/FilesService"; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
377899
303
9262