UNPKG

@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.

1 lines 163 kB
{"version":3,"file":"index.mjs","sources":["../node_modules/tslib/tslib.es6.js","../src/http/services/baseService.ts","../src/http/services/analytics/analytics.ts","../src/http/services/auth.methods/auth.methods.ts","../src/http/services/auth/auth.ts","../src/http/services/blog/blog.ts","../src/utils/index.ts","../src/http/services/categories/categories.ts","../src/http/services/app.settings/app.settings.types.ts","../src/http/services/content/content.ts","../src/http/services/favorite/favorite.ts","../src/http/services/payments/payments.ts","../src/http/services/sections/sections.ts","../src/http/services/settings/settings.ts","../src/http/services/subscription/subscription.ts","../src/http/services/countries/countries.ts","../src/http/services/user/user.ts","../src/http/services/config/config.ts","../src/http/services/upgrade/upgrade.ts","../src/http/services/release.popup/release.popup.ts","../src/http/services/api.key/api.key.ts","../src/http/services/file.manager/file.manager.ts","../src/http/services/history/history.ts","../src/http/services/reels/reels.ts","../src/http/services/upload/upload.ts","../src/http/services/genres/genres.ts","../src/http/services/language/language.ts","../src/http/services/cast/cast.ts","../src/http/services/transcoding/transcoding.ts","../src/http/services/notifications/notifications.ts","../src/http/services/app.settings/app.settings.ts","../src/http/api-sdk.ts"],"sourcesContent":["/******************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\r\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\r\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\r\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\r\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\r\n var _, done = false;\r\n for (var i = decorators.length - 1; i >= 0; i--) {\r\n var context = {};\r\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\r\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\r\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\r\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\r\n if (kind === \"accessor\") {\r\n if (result === void 0) continue;\r\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\r\n if (_ = accept(result.get)) descriptor.get = _;\r\n if (_ = accept(result.set)) descriptor.set = _;\r\n if (_ = accept(result.init)) initializers.unshift(_);\r\n }\r\n else if (_ = accept(result)) {\r\n if (kind === \"field\") initializers.unshift(_);\r\n else descriptor[key] = _;\r\n }\r\n }\r\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\r\n done = true;\r\n};\r\n\r\nexport function __runInitializers(thisArg, initializers, value) {\r\n var useValue = arguments.length > 2;\r\n for (var i = 0; i < initializers.length; i++) {\r\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\r\n }\r\n return useValue ? value : void 0;\r\n};\r\n\r\nexport function __propKey(x) {\r\n return typeof x === \"symbol\" ? x : \"\".concat(x);\r\n};\r\n\r\nexport function __setFunctionName(f, name, prefix) {\r\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\r\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\r\n};\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\r\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n var desc = Object.getOwnPropertyDescriptor(m, k);\r\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\r\n desc = { enumerable: true, get: function() { return m[k]; } };\r\n }\r\n Object.defineProperty(o, k2, desc);\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\r\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nvar ownKeys = function(o) {\r\n ownKeys = Object.getOwnPropertyNames || function (o) {\r\n var ar = [];\r\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\r\n return ar;\r\n };\r\n return ownKeys(o);\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n\r\nexport function __classPrivateFieldIn(state, receiver) {\r\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\r\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\r\n}\r\n\r\nexport function __addDisposableResource(env, value, async) {\r\n if (value !== null && value !== void 0) {\r\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\r\n var dispose, inner;\r\n if (async) {\r\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\r\n dispose = value[Symbol.asyncDispose];\r\n }\r\n if (dispose === void 0) {\r\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\r\n dispose = value[Symbol.dispose];\r\n if (async) inner = dispose;\r\n }\r\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\r\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\r\n env.stack.push({ value: value, dispose: dispose, async: async });\r\n }\r\n else if (async) {\r\n env.stack.push({ async: true });\r\n }\r\n return value;\r\n\r\n}\r\n\r\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\r\n var e = new Error(message);\r\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\r\n};\r\n\r\nexport function __disposeResources(env) {\r\n function fail(e) {\r\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\r\n env.hasError = true;\r\n }\r\n var r, s = 0;\r\n function next() {\r\n while (r = env.stack.pop()) {\r\n try {\r\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\r\n if (r.dispose) {\r\n var result = r.dispose.call(r.value);\r\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\r\n }\r\n else s |= 1;\r\n }\r\n catch (e) {\r\n fail(e);\r\n }\r\n }\r\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\r\n if (env.hasError) throw env.error;\r\n }\r\n return next();\r\n}\r\n\r\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\r\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\r\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\r\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\r\n });\r\n }\r\n return path;\r\n}\r\n\r\nexport default {\r\n __extends: __extends,\r\n __assign: __assign,\r\n __rest: __rest,\r\n __decorate: __decorate,\r\n __param: __param,\r\n __esDecorate: __esDecorate,\r\n __runInitializers: __runInitializers,\r\n __propKey: __propKey,\r\n __setFunctionName: __setFunctionName,\r\n __metadata: __metadata,\r\n __awaiter: __awaiter,\r\n __generator: __generator,\r\n __createBinding: __createBinding,\r\n __exportStar: __exportStar,\r\n __values: __values,\r\n __read: __read,\r\n __spread: __spread,\r\n __spreadArrays: __spreadArrays,\r\n __spreadArray: __spreadArray,\r\n __await: __await,\r\n __asyncGenerator: __asyncGenerator,\r\n __asyncDelegator: __asyncDelegator,\r\n __asyncValues: __asyncValues,\r\n __makeTemplateObject: __makeTemplateObject,\r\n __importStar: __importStar,\r\n __importDefault: __importDefault,\r\n __classPrivateFieldGet: __classPrivateFieldGet,\r\n __classPrivateFieldSet: __classPrivateFieldSet,\r\n __classPrivateFieldIn: __classPrivateFieldIn,\r\n __addDisposableResource: __addDisposableResource,\r\n __disposeResources: __disposeResources,\r\n __rewriteRelativeImportExtension: __rewriteRelativeImportExtension,\r\n};\r\n","import axios, { AxiosInstance, AxiosRequestConfig } from \"axios\";\nimport { IOptions } from \"../api-sdk\";\n\nclass BaseService {\n protected client: AxiosInstance;\n\n constructor(options: IOptions) {\n this.client = axios.create({\n baseURL: options.baseUrl,\n withCredentials: options?.withCredentials || false,\n headers: {\n \"Content-Type\": \"application/json\",\n Accept: \"application/json\",\n ...(options.headers || {}),\n },\n });\n\n // Attach user-provided interceptors\n if (options.interceptors?.request) {\n this.client.interceptors.request.use(\n (config) =>\n options.interceptors!.request!(config as AxiosRequestConfig) as any\n );\n }\n\n if (options.interceptors?.response || options.interceptors?.responseError) {\n this.client.interceptors.response.use(\n options.interceptors.response || ((r) => r),\n options.interceptors.responseError || ((e) => Promise.reject(e))\n );\n }\n }\n\n protected async request(config: AxiosRequestConfig) {\n try {\n return await this.client.request(config);\n } catch (error) {\n throw error;\n }\n }\n}\n\nexport default BaseService;\n","import { AxiosResponse } from \"axios\";\nimport { IOptions } from \"../../api-sdk\";\nimport BaseService from \"../baseService\";\nimport {\n IReadContentReportAnalyticsResponse,\n IReadContentAnalyticsQueryPayload,\n IReadLatestContentAnalyticsResponse,\n IReadRevenueAnalyticsQueryPayload,\n IReadRevenueAnalyticsResponse,\n IReadUsersAnalyticsQueryPayload,\n IReadUsersAnalyticsResponse,\n IViewCount,\n IWatchTimeCount,\n IGetTvodAnalyticsQueryPayload,\n IGetTvodAnalyticsResponse,\n IGetTrendingAnalyticsQuery,\n ITrending,\n} from \"./analytics.types\";\nimport qs from \"qs\";\n\nclass AnalyticsService extends BaseService {\n constructor(options: IOptions) {\n super(options);\n }\n\n /**\n * Increments the view count for a given content or episode.\n *\n * @param payload the content id, episode id, and other metadata\n * @returns response from the server\n */\n async countView(payload: IViewCount) {\n return this.request({\n method: \"POST\",\n url: \"/views\",\n data: payload,\n });\n }\n\n /**\n * Logs the watch time for a given content or episode.\n *\n * @param payload the content id, episode id, watch time, and other metadata\n * @returns response from the server\n */\n async countWatchTime(payload: IWatchTimeCount) {\n return this.request({\n method: \"POST\",\n url: \"/watch-time\",\n data: payload,\n });\n }\n\n /**\n * Reads the latest content analytics.\n *\n * @param query the query containing the filter options\n * @returns response from the server containing the latest content analytics\n */\n async readContentAnalytics(\n query?: IReadContentAnalyticsQueryPayload\n ): Promise<AxiosResponse<IReadLatestContentAnalyticsResponse>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/api/v1/analytics/content?${qs.stringify(query)}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: \"/api/v1/analytics/content\",\n });\n }\n\n /**\n * Reads the users analytics.\n *\n * @param query the query containing the filter options\n * @returns response from the server containing the users analytics\n */\n async readUsersAnalytics(\n query?: IReadUsersAnalyticsQueryPayload\n ): Promise<AxiosResponse<IReadUsersAnalyticsResponse>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/api/v1/analytics/users?${qs.stringify(query)}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: \"/api/v1/analytics/users\",\n });\n }\n\n /**\n * Reads the content report analytics.\n *\n * @returns response from the server containing the content report analytics\n */\n async readContentReportAnalytics(): Promise<\n AxiosResponse<IReadContentReportAnalyticsResponse>\n > {\n return this.request({\n method: \"GET\",\n url: \"/api/v1/analytics/content-report\",\n });\n }\n\n /**\n * Reads the revenue analytics.\n *\n * @param query Optional query parameters to filter the revenue analytics.\n * @returns A promise that resolves to the server's response containing the revenue analytics.\n */\n async readRevenueAnalytics(\n query?: IReadRevenueAnalyticsQueryPayload\n ): Promise<AxiosResponse<IReadRevenueAnalyticsResponse>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/api/v1/analytics/revenue-report?${qs.stringify(query)}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: \"/api/v1/analytics/revenue-report\",\n });\n }\n\n /**\n * Fetches the TVOD analytics for the given query.\n *\n * @param query Optional query parameters to filter the TVOD analytics.\n * @returns A promise that resolves to the server's response containing the TVOD analytics.\n */\n async getTvodAnalytics(\n query?: IGetTvodAnalyticsQueryPayload\n ): Promise<AxiosResponse<IGetTvodAnalyticsResponse[]>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/api/v1/analytics/tvod/content?${qs.stringify(query)}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: \"/api/v1/analytics/tvod/content\",\n });\n }\n\n /**\n * Fetches the trending analytics for the given query.\n *\n * @param query Optional query parameters to filter the trending analytics.\n * @returns A promise that resolves to the server's response containing the trending analytics.\n */\n async trending(\n query?: IGetTrendingAnalyticsQuery\n ): Promise<AxiosResponse<ITrending[]>> {\n return this.request({\n method: \"GET\",\n url: `/api/v1/analytics/trending?${qs.stringify(query)}`,\n });\n }\n}\n\nexport default AnalyticsService;\n","import { AxiosResponse } from \"axios\";\nimport { IOptions } from \"../../api-sdk\";\nimport BaseService from \"../baseService\";\nimport { IPlatform } from \"../payments/payments.types\";\nimport {\n IAuthMethods,\n IAuthProviderResponse,\n IAuthProviderUpdatePayload,\n IGetAuthProviderQueryPayload,\n} from \"./auth.methods.types\";\nimport qs from \"qs\";\n\nclass AuthMethodsService extends BaseService {\n constructor(options: IOptions) {\n super(options);\n }\n\n /**\n * Retrieves the available authentication methods for the specified platform.\n *\n * @param payload - The platform for which to retrieve authentication methods.\n * @returns A promise that resolves to an object containing the success status,\n * a message, and an array of available authentication methods (email or phone).\n */\n async loginMethods(payload: IPlatform): Promise<AxiosResponse<IAuthMethods>> {\n return this.request({\n method: \"GET\",\n url: `/service/auth-provider?select=${payload.platform}`,\n });\n }\n\n /**\n * Initializes the auth provider.\n *\n * @returns A promise that resolves to the server's response.\n */\n async init(): Promise<AxiosResponse> {\n return this.request({\n method: \"GET\",\n url: \"/service/auth-provider/initiate\",\n });\n }\n\n /**\n * Fetches the list of configured private auth providers.\n *\n * @param query An object of query parameters to filter the results.\n * The available query parameters are:\n * - `select`: The columns to include in the results.\n * - `fields`: The columns to include in the results.\n * @returns A promise that resolves to the server's response containing the list of private auth providers.\n */\n async get(\n query?: IGetAuthProviderQueryPayload\n ): Promise<AxiosResponse<IAuthProviderResponse>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/service/auth-provider/private?${qs.stringify(query)}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: \"/service/auth-provider/private\",\n });\n }\n\n /**\n * Updates the authentication provider configuration.\n *\n * @param payload The payload containing the updated configuration for the authentication provider.\n * @returns A promise that resolves to the server's response.\n */\n async update(payload: IAuthProviderUpdatePayload): Promise<AxiosResponse> {\n return this.request({\n method: \"PUT\",\n url: \"/service/auth-provider\",\n data: payload,\n });\n }\n}\n\nexport default AuthMethodsService;\n","import { AxiosResponse } from \"axios\";\nimport { IOptions } from \"../../api-sdk\";\nimport BaseService from \"../baseService\";\nimport {\n IChangePasswordPayload,\n IForgotPasswordPayload,\n ILoginPayload,\n IRemoveSessionPayload,\n IResetPasswordPayload,\n ISendOTPPayload,\n ISendOTPResponse,\n ISignUpPayload,\n IVerifyOtpPayload,\n IWhoami,\n} from \"./auth.types\";\n\nclass AuthService extends BaseService {\n constructor(options: IOptions) {\n super(options);\n }\n\n /**\n * Send OTP to the user's phone\n * @param payload phone and optional recaptcha token\n * @returns response from the server\n */\n async sendOTP(\n payload: ISendOTPPayload\n ): Promise<AxiosResponse<ISendOTPResponse>> {\n return this.request({\n method: \"POST\",\n url: \"/auth/login?provider=phone\",\n data: payload,\n });\n }\n\n /**\n * Logins the user with the given email and password\n * @param payload email and password\n * @returns response from the server\n */\n async login(payload: ILoginPayload) {\n return this.request({\n method: \"POST\",\n url: \"/auth/login?provider=email\",\n data: payload,\n });\n }\n\n /**\n * Verify the OTP sent to the user\n * @param payload the otp hash and the otp sent to the user\n * @returns response from the server\n */\n async verifyOTP(payload: IVerifyOtpPayload) {\n return this.request({\n method: \"POST\",\n url: \"/auth/verify-otp\",\n data: payload,\n });\n }\n\n /**\n * Sign up a user\n * @param payload name, email, and password\n * @returns response from the server\n */\n async signUp(payload: ISignUpPayload) {\n return this.request({\n method: \"POST\",\n url: \"/auth/register\",\n data: payload,\n });\n }\n\n /**\n * Forgot password\n * @param payload email\n * @returns response from the server\n */\n async forgotPassword(payload: IForgotPasswordPayload) {\n return this.request({\n method: \"POST\",\n url: \"/auth/forgot-password\",\n data: payload,\n });\n }\n\n /**\n * Reset the user's password\n * @param payload the id of the user, token from the forgot password email, and the new password\n * @returns response from the server\n */\n async resetPassword(payload: IResetPasswordPayload) {\n return this.request({\n method: \"POST\",\n url: `/auth/reset-password/${payload.id}`,\n data: {\n token: payload.token,\n password: payload.password,\n },\n });\n }\n\n /**\n * Retrieves the authenticated user's information.\n *\n * @returns An object containing the user's details such as id, name, email, role, and subscription information.\n */\n async whoamI(headers?: Record<string, string>): Promise<{ data: IWhoami }> {\n return this.request({\n method: \"GET\",\n url: \"/auth/whoami\",\n headers,\n });\n }\n\n /**\n * Logs out the user\n * @returns response from the server\n */\n async logout(headers?: Record<string, string>) {\n return this.request({\n method: \"POST\",\n url: \"/auth/logout\",\n headers,\n });\n }\n\n /**\n * Removes a user session based on the provided token ID.\n * @param payload - An object containing the token ID of the session to be removed.\n * @returns Response from the server indicating the result of the session removal.\n */\n\n async removeSession(\n payload: IRemoveSessionPayload,\n headers?: Record<string, string>\n ) {\n return this.request({\n method: \"PATCH\",\n url: \"/auth/self/remove-session\",\n data: payload,\n headers,\n });\n }\n /**\n * Changes the user's password.\n * @param payload - An object containing the current password and the new password.\n * @returns Response from the server indicating the result of the password change.\n */\n async changePassword(payload: IChangePasswordPayload) {\n return this.request({\n method: \"PATCH\",\n url: \"/auth/self/change-password\",\n data: payload,\n });\n }\n}\n\nexport default AuthService;\n","import { AxiosResponse } from \"axios\";\nimport { IOptions } from \"../../api-sdk\";\nimport BaseService from \"../baseService\";\nimport { IBlogQuery, IBlogs } from \"./blog.types\";\n\nclass BlogService extends BaseService {\n constructor(options: IOptions) {\n super(options);\n }\n\n /**\n * Retrieves a blog by slug.\n *\n * @param payload the query with the slug of the blog to retrieve\n * @returns response from the server\n */\n async get(payload: IBlogQuery): Promise<AxiosResponse<IBlogs>> {\n return this.request({\n method: \"GET\",\n url: `/api/blog/blogs?slug=${payload.slug}`,\n });\n }\n}\n\nexport default BlogService;\n","/**\n * @description remove null values from object\n * @param obj object\n */\nexport function filterNonNull(obj: object) {\n return Object.fromEntries(Object.entries(obj).filter(([_k, v]) => v));\n}\n","import { AxiosHeaders, AxiosResponse } from \"axios\";\nimport { IOptions } from \"../../api-sdk\";\nimport BaseService from \"../baseService\";\nimport {\n ICategoryActions,\n ICreateCategory,\n IGetCategories,\n IGetCategoriesData,\n IGetCategoriesQuery,\n IGetManageCategories,\n IUpdateCategory,\n} from \"./categories.types\";\nimport qs from \"qs\";\nimport { IPaginatedResponse } from \"../../../types\";\nimport { filterNonNull } from \"../../../utils\";\n\nclass CategoriesService extends BaseService {\n constructor(options: IOptions) {\n super(options);\n }\n\n /**\n * Creates a new category.\n *\n * @param payload The category data to send to the server.\n * @param headers Optional headers to include in the request.\n * @returns A promise that resolves to the server's response containing the ID of the new category.\n */\n async create(\n payload: ICreateCategory,\n headers?: AxiosHeaders\n ): Promise<AxiosResponse<{ id: string }>> {\n return this.request({\n method: \"POST\",\n url: \"/api/v1/categories\",\n data: payload,\n headers: headers || {\n \"Content-Type\": \"multipart/form-data\",\n },\n });\n }\n\n /**\n * Updates an existing category.\n *\n * @param id The ID of the category to update.\n * @param payload The category data to update on the server.\n * @param headers Optional headers to include in the request.\n * @returns A promise that resolves to the server's response containing the ID of the updated category.\n */\n async update(\n id: string,\n payload: IUpdateCategory,\n headers?: AxiosHeaders\n ): Promise<AxiosResponse<{ id: string }>> {\n return this.request({\n method: \"PUT\",\n url: `/api/v1/categories/${id}`,\n data: payload,\n headers: headers || {\n \"Content-Type\": \"multipart/form-data\",\n },\n });\n }\n\n /**\n * Deletes categories by their IDs.\n *\n * @param ids An array of category IDs to delete.\n * @returns A promise that resolves to the server's response containing the count of deleted categories.\n */\n async delete(\n ids: string[]\n ): Promise<AxiosResponse<{ deletedCount: number }>> {\n return this.request({\n method: \"DELETE\",\n url: \"/api/v1/categories\",\n data: { ids },\n });\n }\n\n /**\n * Performs an action on multiple categories.\n *\n * @param payload The payload containing the action to perform and the IDs of the categories.\n * The available actions are \"active\", \"inactive\", \"trash\", \"pending\", and \"blocked\".\n * @returns A promise that resolves to the server's response containing the count of updated categories.\n */\n async actions(\n payload: ICategoryActions\n ): Promise<AxiosResponse<{ updatedCount: number }>> {\n return this.request({\n method: \"PATCH\",\n url: \"/api/v1/categories\",\n data: payload,\n });\n }\n\n /**\n * Retrieves a list of categories for management.\n *\n * @param query Optional query parameters to filter the results.\n * The available query parameters are:\n * - `page`: The page number to retrieve.\n * - `limit`: The number of items to retrieve per page.\n * - `order`: The order to sort the results by. The available values are `asc` and `desc`.\n * - `fields`: An array of column names to include in the results.\n * - `q`: A search query to filter the results by.\n * - `filters`: An object of filter values to filter the results by.\n * - `populate`: An array of populate options to include associated data in the results.\n * @returns A promise that resolves to the server's response containing the list of categories for management.\n */\n async getManage(\n query?: IGetCategoriesQuery\n ): Promise<AxiosResponse<IPaginatedResponse<IGetManageCategories>>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/api/v1/categories/manage?${qs.stringify(filterNonNull(query))}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: \"/api/v1/categories/manage\",\n });\n }\n\n /**\n * Retrieves a list of categories.\n *\n * @param query Optional query parameters to filter the results.\n * The available query parameters are:\n * - `page`: The page number to retrieve.\n * - `limit`: The number of items to retrieve per page.\n * - `order`: The order to sort the results by. The available values are `asc` and `desc`.\n * - `fields`: An array of column names to include in the results.\n * - `q`: A search query to filter the results by.\n * - `filters`: An object of filter values to filter the results by.\n * - `populate`: An array of populate options to include associated data in the results.\n * @returns A promise that resolves to the server's response containing the list of categories.\n */\n async list(\n query?: IGetCategoriesQuery\n ): Promise<AxiosResponse<IPaginatedResponse<IGetCategoriesData>>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/api/v1/categories?${qs.stringify(filterNonNull(query))}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: \"/api/v1/categories\",\n });\n }\n\n /**\n * Fetches the list of categories.\n * @deprecated Use the `list` method instead.\n * @returns A promise that resolves to the server's response containing\n * the categories data.\n */\n async get(): Promise<AxiosResponse<IGetCategories>> {\n return this.request({\n method: \"GET\",\n url: \"/api/categories\",\n });\n }\n}\n\nexport default CategoriesService;\n","export interface IUpdateAppSettings {\n width?: number;\n height?: number;\n screenTime?: number;\n fullscreen?: boolean;\n resizeMode?: \"contain\" | \"cover\" | \"stretch\" | \"repeat\" | \"center\";\n type?: \"image\" | \"video\" | \"lottie-animation\";\n backgroundTransparent?: boolean;\n backgroundColor?: string;\n\n source?: File;\n}\n\nexport type IUpdateAppSettingsType =\n | \"app_splesh_screen\"\n | \"tv_splesh_screen\"\n | \"logo\"\n | \"login_poster\";\n\nexport interface IAndroidVersion {\n version: string;\n url: string;\n notes: string[];\n forceUpdate: boolean;\n}\n\nexport interface IAppPages {\n icon: string;\n name: string;\n slug: string;\n color: string;\n}\n\nexport interface IUpdateAppPages extends Omit<IAppPages, \"color\"> {\n color?: string;\n}\nexport interface IAppSettings {\n app_splesh_screen: IAppSpleshScreenType;\n tv_splesh_screen: IAppSpleshScreenType;\n logo: string;\n login_poster?: string | null;\n}\n\nexport interface IAppSpleshScreenType {\n source: string;\n width: number;\n height: number;\n screenTime: number;\n fullscreen: boolean;\n resizeMode?: \"contain\" | \"cover\" | \"stretch\" | \"repeat\" | \"center\";\n type?: \"image\" | \"video\" | \"lottie-animation\";\n backgroundTransparent?: boolean;\n backgroundColor?: string;\n}\n\nexport enum ElevationLevels {\n \"level0\",\n \"level1\",\n \"level2\",\n \"level3\",\n \"level4\",\n \"level5\",\n}\n\nexport type MD3ElevationColors = {\n [key in keyof typeof ElevationLevels]: string;\n};\n\nexport type MD3Colors = {\n primary: string;\n primaryContainer: string;\n secondary: string;\n secondaryContainer: string;\n tertiary: string;\n tertiaryContainer: string;\n surface: string;\n surfaceVariant: string;\n surfaceDisabled: string;\n background: string;\n error: string;\n errorContainer: string;\n onPrimary: string;\n onPrimaryContainer: string;\n onSecondary: string;\n onSecondaryContainer: string;\n onTertiary: string;\n onTertiaryContainer: string;\n onSurface: string;\n onSurfaceVariant: string;\n onSurfaceDisabled: string;\n onError: string;\n onErrorContainer: string;\n onBackground: string;\n outline: string;\n outlineVariant: string;\n inverseSurface: string;\n inverseOnSurface: string;\n inversePrimary: string;\n shadow: string;\n scrim: string;\n backdrop: string;\n elevation: MD3ElevationColors;\n text: string;\n white: string;\n black: string;\n transparent: string;\n};\n\nexport interface IUpdateTheme {\n name: string;\n type: string;\n status: boolean;\n colors: MD3Colors;\n}\n\nexport interface ITheme {\n _id: string;\n name: string;\n type: string;\n colors: MD3Colors;\n}\n\nexport interface IThemeManage {\n _id: string;\n name: string;\n type: string;\n colors: MD3Colors;\n status: boolean;\n createdAt: Date;\n updatedAt: Date;\n}\n","import { AxiosHeaders, AxiosResponse } from \"axios\";\nimport { IOptions } from \"../../api-sdk\";\nimport BaseService from \"../baseService\";\nimport {\n IContent,\n IContentActionsPayload,\n IContentActionsResponse,\n IContentData,\n IContentSeasons,\n ICreateContentEpisodePayload,\n ICreateContentPayload,\n ICreateContentResponse,\n ICreateContentSeasonPayload,\n ICreateContentSeasonResponse,\n ICreateImageSize,\n IDeleteContentImage,\n IGetManageContentQueryPayload,\n IGetSeasonManageQueryPayload,\n IImageSize,\n ITvod,\n IUpdateContentEpisodePayload,\n IUpdateContentGeoPayload,\n IUpdateContentPayload,\n IUpdateContentResponse,\n IUpdateContentSeasonPayload,\n IUpdateContentSubtitlesPayload,\n IUploadContentImage,\n} from \"./content.types\";\nimport qs from \"qs\";\nimport { IPaginatedResponse } from \"../../../types\";\nimport { filterNonNull } from \"../../../utils\";\n\nclass ContentService extends BaseService {\n constructor(options: IOptions) {\n super(options);\n }\n\n /**\n * Fetches the list of content.\n *\n * @param query the search query\n * @returns response from the server\n */\n async get(query?: string): Promise<AxiosResponse<IContent>> {\n return this.request({\n method: \"GET\",\n url: `/service/content${query || \"\"}`,\n });\n }\n\n /**\n * Fetches the list of content seasons.\n *\n * @param query the search query\n * @returns response from the server containing the list of content seasons\n */\n async getSeasons(query?: string): Promise<AxiosResponse<IContentSeasons[]>> {\n return this.request({\n method: \"GET\",\n url: `/service/content/seasons${query || \"\"}`,\n });\n }\n\n /**\n * Checks if a content has been bought or rented by the current user.\n * @param contentId the id of the content to check\n * @returns a boolean indicating if the content has been bought or rented\n */\n async getIsContentBuyedOrRented(\n contentId: string,\n headers?: Record<string, string>\n ): Promise<boolean> {\n const response = await this.request({\n method: \"GET\",\n url: `/api/content/buy-or-rent/${contentId}`,\n headers,\n });\n\n if (response?.data?.status === \"valid\") {\n return true;\n } else {\n return false;\n }\n }\n\n /**\n * Fetches the list of content available for rent or buy.\n *\n * @param queryString the query string\n * @returns a promise that resolves to the server's response containing the list of content available for rent or buy\n */\n async getTvod(queryString?: string): Promise<AxiosResponse<ITvod>> {\n return this.request({\n method: \"GET\",\n url: `/service/content/tvod${queryString || \"\"}`,\n });\n }\n\n /**\n * Updates the geo location for a content.\n *\n * @param payload the update geo location payload\n * @returns a promise that resolves to the server's response\n */\n async updateGeoLocation(payload: IUpdateContentGeoPayload) {\n return this.request({\n method: \"PATCH\",\n url: \"/api/v1/content/geo\",\n data: payload,\n });\n }\n\n /**\n * Fetches the list of content for management.\n *\n * @param query Optional query parameters to filter the results.\n * The available query parameters are:\n * - `page`: The page number to retrieve.\n * - `limit`: The number of items to retrieve per page.\n * - `order`: The order to sort the results by. The available values are `asc` and `desc`.\n * - `fields`: An array of column names to include in the results.\n * - `q`: A search query to filter the results by.\n * - `filters`: An object of filter values to filter the results by.\n * - `populate`: An array of populate options to include associated data in the results.\n * - `id`: A content ID to retrieve a single content.\n * @returns A promise that resolves to the server's response containing the list of content for management.\n */\n async getManage<T = IContentData>(\n query?: IGetManageContentQueryPayload\n ): Promise<AxiosResponse<IPaginatedResponse<T>>> {\n if (query) {\n return this.request({\n method: \"GET\",\n url: `/api/v1/content/manage?${qs.stringify(filterNonNull(query))}`,\n });\n }\n return this.request({\n method: \"GET\",\n url: `/api/v1/content/manage`,\n });\n }\n\n /**\n * Creates a new content.\n *\n * @param payload The content data to send to the server.\n * @param headers Optional headers to include in the request.\n * @returns A promise that resolves to the server's response containing the newly created content.\n */\n async create(\n payload: ICreateContentPayload,\n headers?: AxiosHeaders\n ): Promise<AxiosResponse<ICreateContentResponse>> {\n return this.request({\n method: \"POST\",\n url: \"/api/v1/content\",\n data: payload,\n headers: headers || {\n \"Content-Type\": \"multipart/form-data\",\n },\n });\n }\n\n /**\n * Perform an action on a content.\n *\n * @param payload The content action payload.\n * @returns A promise that resolves to the server's response containing the result of the action.\n */\n async actions(\n payload: IContentActionsPayload\n ): Promise<AxiosResponse<IContentActionsResponse>> {\n return this.request({\n method: \"PATCH\",\n url: \"/api/v1/content/action\",\n data: payload,\n });\n }\n\n /**\n * Updates a content.\n *\n * @param contentID The ID of the content to update.\n * @param payload The content data to update on the server.\n * @param headers Optional headers to include in the request.\n * @returns A promise that resolves to the server's response containing the updated content.\n */\n async update(\n contentID: string,\n payload: IUpdateContentPayload,\n headers?: AxiosHeaders\n ): Promise<AxiosResponse<IUpdateContentResponse>> {\n return this.request({\n method: \"PUT\",\n url: `/api/v1/content/${contentID}`,\n