@zezosoft/zezo-ott-api-client
Version:
The official TypeScript SDK for Zezo OTT API. Easily integrate Zezo OTT into your applications with a powerful, developer-friendly package for video streaming, authentication, payments, and more.
3 lines (2 loc) • 39.1 kB
JavaScript
import t from"axios";import n from"qs";var e=function(t,n){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,n){t.__proto__=n}||function(t,n){for(var e in n)Object.prototype.hasOwnProperty.call(n,e)&&(t[e]=n[e])},e(t,n)};function r(t,n){if("function"!=typeof n&&null!==n)throw new TypeError("Class extends value "+String(n)+" is not a constructor or null");function r(){this.constructor=t}e(t,n),t.prototype=null===n?Object.create(n):(r.prototype=n.prototype,new r)}var i=function(){return i=Object.assign||function(t){for(var n,e=1,r=arguments.length;e<r;e++)for(var i in n=arguments[e])Object.prototype.hasOwnProperty.call(n,i)&&(t[i]=n[i]);return t},i.apply(this,arguments)};function o(t,n,e,r){return new(e||(e=Promise))((function(i,o){function u(t){try{c(r.next(t))}catch(t){o(t)}}function s(t){try{c(r.throw(t))}catch(t){o(t)}}function c(t){var n;t.done?i(t.value):(n=t.value,n instanceof e?n:new e((function(t){t(n)}))).then(u,s)}c((r=r.apply(t,n||[])).next())}))}function u(t,n){var e,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},u=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return u.next=s(0),u.throw=s(1),u.return=s(2),"function"==typeof Symbol&&(u[Symbol.iterator]=function(){return this}),u;function s(s){return function(c){return function(s){if(e)throw new TypeError("Generator is already executing.");for(;u&&(u=0,s[0]&&(o=0)),o;)try{if(e=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!(i=o.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=n.call(t,o)}catch(t){s=[6,t],r=0}finally{e=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,c])}}}"function"==typeof SuppressedError&&SuppressedError;var s=function(){function n(n){var e,r,o;this.client=t.create({baseURL:n.baseUrl,withCredentials:(null==n?void 0:n.withCredentials)||!1,headers:i({"Content-Type":"application/json",Accept:"application/json"},n.headers||{})}),(null===(e=n.interceptors)||void 0===e?void 0:e.request)&&this.client.interceptors.request.use((function(t){return n.interceptors.request(t)})),((null===(r=n.interceptors)||void 0===r?void 0:r.response)||(null===(o=n.interceptors)||void 0===o?void 0:o.responseError))&&this.client.interceptors.response.use(n.interceptors.response||function(t){return t},n.interceptors.responseError||function(t){return Promise.reject(t)})}return n.prototype.request=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.client.request(t)];case 1:return[2,n.sent()];case 2:throw n.sent();case 3:return[2]}}))}))},n}(),c=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.countView=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/views",data:t})]}))}))},e.prototype.countWatchTime=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/watch-time",data:t})]}))}))},e.prototype.readContentAnalytics=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/analytics/content?".concat(n.stringify(t))})]:[2,this.request({method:"GET",url:"/api/v1/analytics/content"})]}))}))},e.prototype.readUsersAnalytics=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/analytics/users?".concat(n.stringify(t))})]:[2,this.request({method:"GET",url:"/api/v1/analytics/users"})]}))}))},e.prototype.readContentReportAnalytics=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/v1/analytics/content-report"})]}))}))},e.prototype.readRevenueAnalytics=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/analytics/revenue-report?".concat(n.stringify(t))})]:[2,this.request({method:"GET",url:"/api/v1/analytics/revenue-report"})]}))}))},e.prototype.getTvodAnalytics=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/analytics/tvod/content?".concat(n.stringify(t))})]:[2,this.request({method:"GET",url:"/api/v1/analytics/tvod/content"})]}))}))},e.prototype.trending=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/analytics/trending?".concat(n.stringify(t))})]}))}))},e}(s),a=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.loginMethods=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/service/auth-provider?select=".concat(t.platform)})]}))}))},e.prototype.init=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/service/auth-provider/initiate"})]}))}))},e.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/service/auth-provider/private?".concat(n.stringify(t))})]:[2,this.request({method:"GET",url:"/service/auth-provider/private"})]}))}))},e.prototype.update=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/service/auth-provider",data:t})]}))}))},e}(s),h=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.sendOTP=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/auth/login?provider=phone",data:t})]}))}))},n.prototype.login=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/auth/login?provider=email",data:t})]}))}))},n.prototype.verifyOTP=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/auth/verify-otp",data:t})]}))}))},n.prototype.signUp=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/auth/register",data:t})]}))}))},n.prototype.forgotPassword=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/auth/forgot-password",data:t})]}))}))},n.prototype.resetPassword=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/auth/reset-password/".concat(t.id),data:{token:t.token,password:t.password}})]}))}))},n.prototype.whoamI=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/auth/whoami",headers:t})]}))}))},n.prototype.logout=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/auth/logout",headers:t})]}))}))},n.prototype.removeSession=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PATCH",url:"/auth/self/remove-session",data:t,headers:n})]}))}))},n.prototype.changePassword=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/auth/self/change-password",data:t})]}))}))},n}(s),d=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/api/blog/blogs?slug=".concat(t.slug)})]}))}))},n}(s);function p(t){return Object.fromEntries(Object.entries(t).filter((function(t){return t[0],t[1]})))}var f,v=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/categories",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.update=function(t,n,e){return o(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.request({method:"PUT",url:"/api/v1/categories/".concat(t),data:n,headers:e||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/categories",data:{ids:t}})]}))}))},e.prototype.actions=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/categories",data:t})]}))}))},e.prototype.getManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/categories/manage?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/categories/manage"})]}))}))},e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/categories?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/categories"})]}))}))},e.prototype.get=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/categories"})]}))}))},e}(s),l=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/service/content".concat(t||"")})]}))}))},e.prototype.getSeasons=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/service/content/seasons".concat(t||"")})]}))}))},e.prototype.getIsContentBuyedOrRented=function(t,n){return o(this,void 0,void 0,(function(){var e,r;return u(this,(function(i){switch(i.label){case 0:return[4,this.request({method:"GET",url:"/api/content/buy-or-rent/".concat(t),headers:n})];case 1:return e=i.sent(),"valid"===(null===(r=null==e?void 0:e.data)||void 0===r?void 0:r.status)?[2,!0]:[2,!1]}}))}))},e.prototype.getTvod=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/service/content/tvod".concat(t||"")})]}))}))},e.prototype.updateGeoLocation=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/content/geo",data:t})]}))}))},e.prototype.getManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/content/manage?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/content/manage"})]}))}))},e.prototype.create=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/content",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.actions=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/content/action",data:t})]}))}))},e.prototype.update=function(t,n,e){return o(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.request({method:"PUT",url:"/api/v1/content/".concat(t),data:n,headers:e||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.removeTitleImage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/content/images/title/".concat(t)})]}))}))},e.prototype.getSeasonManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/content/seasons/manage?".concat(n.stringify(p(t)))})]}))}))},e.prototype.createSeason=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/content/seasons",data:t})]}))}))},e.prototype.deleteSeason=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/content/seasons/".concat(t)})]}))}))},e.prototype.updateSeason=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/content/seasons",data:t})]}))}))},e.prototype.createEpisode=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/content/seasons/episodes",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.deleteEpisode=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/content/seasons/episodes/".concat(t)})]}))}))},e.prototype.updateEpisode=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PUT",url:"/api/v1/content/seasons/episodes",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.manageSubtitles=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/content/subtitles",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.uploadImages=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/content/images/upload",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.fetchSearchResults=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/api/search",params:{query:t}})]}))}))},e.prototype.deleteImage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/content/images/delete",data:t})]}))}))},e.prototype.createImageSize=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/content/images/field/create",data:t})]}))}))},e.prototype.listImageSizes=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/v1/content/images/fields"})]}))}))},e.prototype.deleteImageSize=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/content/images/fields/".concat(t)})]}))}))},e}(s),y=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.addToFavorites=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/favorite",data:t})]}))}))},n.prototype.getIsFavorite=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/api/favorite?content_id=".concat(t.id)})]}))}))},n.prototype.removeFromFavorites=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/favorite/".concat(t.id)})]}))}))},n.prototype.get=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/favorite"})]}))}))},n}(s),m=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/payments?".concat(n.stringify(p(t||{})))})]}))}))},e.prototype.checkout=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/payments/checkout",data:t})]}))}))},e.prototype.ready=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/api/v1/payments/ready",headers:{"X-Platform":t.platform}})]}))}))},e}(s),g=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/sections",data:t})]}))}))},e.prototype.getManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/sections/manage?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/sections/manage"})]}))}))},e.prototype.deleteSection=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/sections/".concat(t)})]}))}))},e.prototype.updateStatus=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/sections/status",data:t})]}))}))},e.prototype.updateOrder=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/sections/order",data:{orders:t}})]}))}))},e.prototype.update=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/sections",data:t})]}))}))},e.prototype.createSectionStyle=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/sections/styles",data:t})]}))}))},e.prototype.deleteSectionStyle=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/sections/styles/delete",data:{ids:t}})]}))}))},e.prototype.updateSectionStyle=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PUT",url:"/api/v1/sections/styles/".concat(t),data:n})]}))}))},e.prototype.getSectionStyles=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/sections/styles?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/sections/styles"})]}))}))},e.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/service/sections?".concat(n.stringify(t))})]:[2,this.request({method:"GET",url:"/service/sections"})]}))}))},e}(s),T=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.getManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/settings/manage?".concat(n.stringify(p(t||{})))})]}))}))},e.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/settings?".concat(n.stringify(p(t||{})))})]}))}))},e.prototype.update=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PUT",url:"/api/v1/settings",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.updateSocialMedia=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PATCH",url:"/api/v1/settings/social-media",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.getSettings=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/settings"})]}))}))},e}(s),q=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.initNew=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"POST",url:"/api/v1/subscriptions"})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/subscriptions/".concat(t)})]}))}))},e.prototype.update=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PUT",url:"/api/v1/subscriptions/".concat(t),data:n})]}))}))},e.prototype.get=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/subscriptions"})]}))}))},e.prototype.getManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/subscriptions/manage"+(t?"?".concat(n.stringify(p(t))):"")})]}))}))},e}(s),E=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return t?[2,this.request({method:"GET",url:"api/v1/countries".concat(t)})]:[2,this.request({method:"GET",url:"api/v1/countries"})]}))}))},n.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"api/v1/countries",data:{id:t}})]}))}))},n.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"api/v1/countries",data:t})]}))}))},n.prototype.init=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"POST",url:"api/v1/countries/auto-setup"})]}))}))},n}(s),P=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.export=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/users/export?".concat(n.stringify(t))})]:[2,this.request({method:"GET",url:"/api/v1/users/export"})]}))}))},e.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"api/v1/users?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"api/v1/users"})]}))}))},e.prototype.actions=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/users/actions",data:t})]}))}))},e.prototype.deleteUsers=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/users/delete",data:{id:t}})]}))}))},e.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/users",data:t})]}))}))},e.prototype.updateAvatar=function(t,n,e){return o(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.request({method:"PUT",url:"/api/v1/users/avatar/".concat(t),data:n,headers:e||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.update=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/users",data:t})]}))}))},e.prototype.removeSession=function(t){return o(this,void 0,void 0,(function(){var n;return u(this,(function(e){return n={user_id:t.user_id},t.sid&&(n.sid=t.sid),[2,this.request({method:"PATCH",url:"/api/v1/users/remove-session?type=".concat(t.type||"single"),data:n})]}))}))},e.prototype.updateACL=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/users/acl",data:t})]}))}))},e.prototype.updateSubscription=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/users/subscription?action=".concat(t.action),data:{user_id:t.user_id,subscription_id:t.subscription_id}})]}))}))},e}(s),S=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/config",data:t})]}))}))},e.prototype.update=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/config",data:t})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/config",data:t})]}))}))},e.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/config?".concat(n.stringify(t))})]}))}))},e}(s),G=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.autoSetupAcl=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/v1/upgrade/acl"})]}))}))},n}(s),w=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/release",data:{contentId:t}})]}))}))},n.prototype.update=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/release",data:{contentId:t}})]}))}))},n.prototype.delete=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"DELETE",url:"/api/release"})]}))}))},n.prototype.get=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/release"})]}))}))},n}(s),O=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/apikey",data:t})]}))}))},e.prototype.list=function(t){return o(this,void 0,void 0,(function(){var e;return u(this,(function(r){return e=n.stringify(p({id:t})),[2,this.request({method:"GET",url:"/api/v1/apikey?".concat(e)})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/apikey/".concat(t)})]}))}))},e.prototype.update=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PUT",url:"/api/v1/apikey/".concat(t),data:n})]}))}))},e}(s),b=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/file-manager?".concat(n.stringify(p(t||{}))),data:t})]}))}))},e.prototype.createFolder=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/file-manager/folder",data:t})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/file-manager",data:t})]}))}))},e.prototype.initMultipartUpload=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/file-manager/upload/initialize_multipart",data:{Key:t}})]}))}))},e.prototype.getMultipartPresignedUrl=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/file-manager/upload/get_multipart_presigned_urls",data:t})]}))}))},e.prototype.finalizeMultipartUpload=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/file-manager/upload/finalize_multipart",data:t})]}))}))},e.prototype.createUploadPresignedUrl=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/file-manager/upload/create_pre_sign_url",data:{key:t}})]}))}))},e.prototype.getSignedUrl=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:"/api/v1/file-manager/get-sign-url?key=".concat(t)})]}))}))},e.prototype.getTranscoderSignUrl=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/file-manager/get-sign-url",data:{key:t}})]}))}))},e}(s),C=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.get=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"GET",url:t?"api/history".concat(t):"api/history"})]}))}))},n.prototype.update=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"api/history",data:t})]}))}))},n}(s),U=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/reels",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.update=function(t,n,e){return o(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.request({method:"PUT",url:"/api/v1/reels/".concat(t),data:n,headers:e||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.actions=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/reels",data:t})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/reels",data:{ids:t}})]}))}))},e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/reels?".concat(n.stringify(p(t||{})))})]}))}))},e.prototype.feed=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/reels/feed?".concat(n.stringify(p(t||{})))})]}))}))},e}(s),_=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.init=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/upload/init",data:t})]}))}))},n.prototype.getUrls=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/upload/get_presigned_urls",data:t})]}))}))},n.prototype.finalize=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/upload/finalize",data:t})]}))}))},n}(s),A=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/genre",data:t})]}))}))},e.prototype.update=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PUT",url:"/api/v1/genre/".concat(t),data:n})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/genre",data:{ids:t}})]}))}))},e.prototype.actions=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/genre/action",data:t})]}))}))},e.prototype.listManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/genre/manage?".concat(n.stringify(p(t||{})))})]}))}))},e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/genre?".concat(n.stringify(p(t||{})))})]}))}))},e}(s),L=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/language",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.update=function(t,n,e){return o(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.request({method:"PUT",url:"/api/v1/language/".concat(t),data:n,headers:e||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/language",data:{ids:t}})]}))}))},e.prototype.actions=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/language",data:t})]}))}))},e.prototype.getManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/language/manage?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/language/manage"})]}))}))},e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/language?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/language"})]}))}))},e}(s),D=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"POST",url:"/api/v1/cast",data:t,headers:n||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.update=function(t,n,e){return o(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.request({method:"PUT",url:"/api/v1/cast/".concat(t),data:n,headers:e||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/cast",data:{ids:t}})]}))}))},e.prototype.actions=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PATCH",url:"/api/v1/cast",data:t})]}))}))},e.prototype.getManage=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/cast/manage?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/cast/manage"})]}))}))},e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return t?[2,this.request({method:"GET",url:"/api/v1/cast?".concat(n.stringify(p(t)))})]:[2,this.request({method:"GET",url:"/api/v1/cast"})]}))}))},e}(s),M=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.create=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/transcoding",data:t})]}))}))},e.prototype.list=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/transcoding?".concat(n.stringify(p(t||{})))})]}))}))},e.prototype.delete=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"DELETE",url:"/api/v1/transcoding/".concat(t)})]}))}))},e}(s),k=function(t){function n(n){return t.call(this,n)||this}return r(n,t),n.prototype.registerDevice=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/notification/register-device",data:t})]}))}))},n.prototype.sendPushNotification=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"POST",url:"/api/v1/notification/push",data:t})]}))}))},n}(s),H=function(t){function e(n){return t.call(this,n)||this}return r(e,t),e.prototype.update=function(t,n,e){return o(this,void 0,void 0,(function(){return u(this,(function(r){return[2,this.request({method:"PUT",url:"/api/v1/app/settings?type=".concat(n),data:t,headers:e||{"Content-Type":"multipart/form-data"}})]}))}))},e.prototype.getAndroidVersion=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/v1/app/settings/android"})]}))}))},e.prototype.getPagesList=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/v1/app/settings/pages"})]}))}))},e.prototype.updatePages=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(n){return[2,this.request({method:"PUT",url:"/api/v1/app/settings/pages",data:{appPages:t}})]}))}))},e.prototype.getSettings=function(t){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"GET",url:"/api/v1/app/settings?".concat(n.stringify(p(t||{})))})]}))}))},e.prototype.updateTheme=function(t,n){return o(this,void 0,void 0,(function(){return u(this,(function(e){return[2,this.request({method:"PUT",url:"/api/v1/app/color-scheme/".concat(t),data:n})]}))}))},e.prototype.initTheme=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"POST",url:"/api/v1/app/color-scheme/initiate"})]}))}))},e.prototype.getThemeManage=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/v1/app/app-color-scheme/manage"})]}))}))},e.prototype.getThemes=function(){return o(this,void 0,void 0,(function(){return u(this,(function(t){return[2,this.request({method:"GET",url:"/api/v1/app/app-color-scheme"})]}))}))},e}(s),I=function(t){this.analytics=new c(t),this.auth=new h(t),this.authMethods=new a(t),this.blogs=new d(t),this.categories=new v(t),this.contents=new l(t),this.favorites=new y(t),this.payments=new m(t),this.settings=new T(t),this.subscriptions=new q(t),this.sections=new g(t),this.countries=new E(t),this.users=new P(t),this.config=new S(t),this.upgrade=new G(t),this.releasePopup=new w(t),this.apiKeys=new O(t),this.fileManager=new b(t),this.history=new C(t),this.reels=new U(t),this.upload=new _(t),this.genres=new A(t),this.language=new L(t),this.cast=new D(t),this.transcoding=new M(t),this.notifications=new k(t),this.appSettings=new H(t)};!function(t){t[t.level0=0]="level0",t[t.level1=1]="level1",t[t.level2=2]="level2",t[t.level3=3]="level3",t[t.level4=4]="level4",t[t.level5=5]="level5"}(f||(f={}));export{f as ElevationLevels,I as ZezoOTT};
//# sourceMappingURL=index.mjs.map