@lasuillard/raindrop-client
Version:
Axios client built with OpenAPI generator for Raindrop.io.
1,675 lines • 57.4 kB
JavaScript
import e from "axios";
//#region \0rolldown/runtime.js
var t = Object.defineProperty, n = (e, n) => {
let r = {};
for (var i in e) t(r, i, {
get: e[i],
enumerable: !0
});
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
}, r = "https://api.raindrop.io".replace(/\/+$/, ""), i = class {
basePath;
axios;
configuration;
constructor(t, n = r, i = e) {
this.basePath = n, this.axios = i, t && (this.configuration = t, this.basePath = t.basePath ?? n);
}
}, a = class extends Error {
field;
constructor(e, t) {
super(t), this.field = e, this.name = "RequiredError";
}
}, o = {}, s = "https://example.com", c = function(e, t, n) {
if (n == null) throw new a(t, `Required parameter ${t} was null or undefined when calling ${e}.`);
}, l = async function(e, t) {
t && t.accessToken && (e.Authorization = "Bearer " + (typeof t.accessToken == "function" ? await t.accessToken() : await t.accessToken));
};
function u(e, t, n = "") {
t != null && (typeof t == "object" ? Array.isArray(t) ? t.forEach((t) => u(e, t, n)) : Object.keys(t).forEach((r) => u(e, t[r], `${n}${n === "" ? "" : "."}${r}`)) : e.has(n) ? e.append(n, t) : e.set(n, t));
}
var d = function(e, ...t) {
let n = new URLSearchParams(e.search);
u(n, t), e.search = n.toString();
}, f = function(e, t, n) {
let r = typeof e != "string";
return (r && n && n.isJsonMime ? n.isJsonMime(t.headers["Content-Type"]) : r) ? JSON.stringify(e === void 0 ? {} : p(e)) : e || "";
};
function p(e) {
if (typeof Set > "u" || typeof Map > "u" || typeof e != "object" || !e) return e;
if (e instanceof Set) return Array.from(e).map((e) => p(e));
if (e instanceof Map) {
let t = [];
return e.forEach((e, n) => {
t.push([n, p(e)]);
}), h(t);
}
return Array.isArray(e) ? e.map((e) => p(e)) : h(m(e).map(([e, t]) => [e, p(t)]));
}
function m(e) {
return Object.keys(e).map((t) => [t, e[t]]);
}
function h(e) {
return [...e].reduce((e, [t, n]) => (e[t] = n, e), {});
}
var g = function(e) {
return e.pathname + e.search + e.hash;
}, _ = function(e, t, n, r) {
return (i = t, a = n) => {
let o = {
...e.options,
url: (i.defaults.baseURL ? "" : r?.basePath ?? a) + e.url
};
return i.request(o);
};
}, v = { Collections: "collections" }, y = { AuthorizationCode: "authorization_code" }, b = { RefreshToken: "refresh_token" }, x = {
Member: "member",
Viewer: "viewer"
}, ee = { Bearer: "Bearer" }, S = function(e) {
return {
authorize: async (t, n, r = {}) => {
c("authorize", "redirectUri", t), c("authorize", "clientId", n);
let i = new URL("/v1/oauth/authorize", s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...r
}, l = {}, u = {};
t !== void 0 && (u.redirect_uri = t), n !== void 0 && (u.client_id = n), d(i, u);
let f = a && a.headers ? a.headers : {};
return o.headers = {
...l,
...f,
...r.headers
}, {
url: g(i),
options: o
};
},
getOrRefreshToken: async (t, n = {}) => {
let r = new URL("/v1/oauth/access_token", s), i;
e && (i = e.baseOptions);
let a = {
method: "POST",
...i,
...n
}, o = {};
o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
}
};
}, C = function(t) {
let n = S(t);
return {
async authorize(i, a, s) {
let c = await n.authorize(i, a, s), l = t?.serverIndex ?? 0, u = o["AuthenticationApi.authorize"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async getOrRefreshToken(i, a) {
let s = await n.getOrRefreshToken(i, a), c = t?.serverIndex ?? 0, l = o["AuthenticationApi.getOrRefreshToken"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
}
};
}, te = function(e, t, n) {
let r = C(e);
return {
authorize(e, i, a) {
return r.authorize(e, i, a).then((e) => e(n, t));
},
getOrRefreshToken(e, i) {
return r.getOrRefreshToken(e, i).then((e) => e(n, t));
}
};
}, w = class extends i {
authorize(e, t, n) {
return C(this.configuration).authorize(e, t, n).then((e) => e(this.axios, this.basePath));
}
getOrRefreshToken(e, t) {
return C(this.configuration).getOrRefreshToken(e, t).then((e) => e(this.axios, this.basePath));
}
}, T = function(e) {
return {
acceptInvitation: async (t, n = {}) => {
c("acceptInvitation", "id", t);
let r = "/rest/v1/collection/{id}/join".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "POST",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
changeCollaboratorAccessLevel: async (t, n, r, i = {}) => {
c("changeCollaboratorAccessLevel", "userId", t), c("changeCollaboratorAccessLevel", "id", n);
let a = "/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}", encodeURIComponent(String(t))).replace("{id}", encodeURIComponent(String(n))), o = new URL(a, s), u;
e && (u = e.baseOptions);
let p = {
method: "PUT",
...u,
...i
}, m = {};
await l(m, e), m["Content-Type"] = "application/json", d(o, {});
let h = u && u.headers ? u.headers : {};
return p.headers = {
...m,
...h,
...i.headers
}, p.data = f(r, p, e), {
url: g(o),
options: p
};
},
createCollection: async (t, n = {}) => {
let r = new URL("/rest/v1/collection", s), i;
e && (i = e.baseOptions);
let a = {
method: "POST",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
deleteCollaborator: async (t, n, r = {}) => {
c("deleteCollaborator", "userId", t), c("deleteCollaborator", "id", n);
let i = "/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}", encodeURIComponent(String(t))).replace("{id}", encodeURIComponent(String(n))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "DELETE",
...o,
...r
}, f = {};
await l(f, e), d(a, {});
let p = o && o.headers ? o.headers : {};
return u.headers = {
...f,
...p,
...r.headers
}, {
url: g(a),
options: u
};
},
emptyTrash: async (t = {}) => {
let n = new URL("/rest/v1/collection/-99", s), r;
e && (r = e.baseOptions);
let i = {
method: "DELETE",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
getChildCollections: async (t = {}) => {
let n = new URL("/rest/v1/collections/childrens", s), r;
e && (r = e.baseOptions);
let i = {
method: "GET",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
getCollaborators: async (t, n = {}) => {
c("getCollaborators", "id", t);
let r = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
getCollection: async (t, n = {}) => {
c("getCollection", "id", t);
let r = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
getFeaturedCovers: async (t = {}) => {
let n = new URL("/rest/v1/collections/covers", s), r;
e && (r = e.baseOptions);
let i = {
method: "GET",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
getRootCollections: async (t = {}) => {
let n = new URL("/rest/v1/collections", s), r;
e && (r = e.baseOptions);
let i = {
method: "GET",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
getSystemCollectionStats: async (t = {}) => {
let n = new URL("/rest/v1/user/stats", s), r;
e && (r = e.baseOptions);
let i = {
method: "GET",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
mergeCollections: async (t, n = {}) => {
let r = new URL("/rest/v1/collections/merge", s), i;
e && (i = e.baseOptions);
let a = {
method: "PUT",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
removeAllEmptyCollections: async (t = {}) => {
let n = new URL("/rest/v1/collections/clean", s), r;
e && (r = e.baseOptions);
let i = {
method: "PUT",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
removeCollection: async (t, n = {}) => {
c("removeCollection", "id", t);
let r = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "DELETE",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
removeCollections: async (t, n = {}) => {
let r = new URL("/rest/v1/collections", s), i;
e && (i = e.baseOptions);
let a = {
method: "DELETE",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
reorderAllCollections: async (t, n = {}) => {
let r = new URL("/rest/v1/collections", s), i;
e && (i = e.baseOptions);
let a = {
method: "PUT",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
searchCovers: async (t, n = {}) => {
c("searchCovers", "text", t);
let r = "/rest/v1/collections/covers/{text}".replace("{text}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
shareCollection: async (t, n, r = {}) => {
c("shareCollection", "id", t);
let i = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "POST",
...o,
...r
}, p = {};
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
let m = o && o.headers ? o.headers : {};
return u.headers = {
...p,
...m,
...r.headers
}, u.data = f(n, u, e), {
url: g(a),
options: u
};
},
unshareOrLeaveCollection: async (t, n = {}) => {
c("unshareOrLeaveCollection", "id", t);
let r = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "DELETE",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
updateCollection: async (t, n, r = {}) => {
c("updateCollection", "id", t);
let i = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "PUT",
...o,
...r
}, p = {};
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
let m = o && o.headers ? o.headers : {};
return u.headers = {
...p,
...m,
...r.headers
}, u.data = f(n, u, e), {
url: g(a),
options: u
};
},
uploadCollectionCover: async (t, n, r = {}) => {
c("uploadCollectionCover", "id", t);
let i = "/rest/v1/collection/{id}/cover".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "PUT",
...o,
...r
}, f = {}, p = {}, m = new (e && e.formDataCtor || FormData)();
await l(f, e), n !== void 0 && m.append("cover", n), f["Content-Type"] = "multipart/form-data", d(a, p);
let h = o && o.headers ? o.headers : {};
return u.headers = {
...f,
...h,
...r.headers
}, u.data = m, {
url: g(a),
options: u
};
}
};
}, E = function(t) {
let n = T(t);
return {
async acceptInvitation(i, a) {
let s = await n.acceptInvitation(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.acceptInvitation"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async changeCollaboratorAccessLevel(i, a, s, c) {
let l = await n.changeCollaboratorAccessLevel(i, a, s, c), u = t?.serverIndex ?? 0, d = o["CollectionApi.changeCollaboratorAccessLevel"]?.[u]?.url;
return (n, i) => _(l, e, r, t)(n, d || i);
},
async createCollection(i, a) {
let s = await n.createCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.createCollection"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async deleteCollaborator(i, a, s) {
let c = await n.deleteCollaborator(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.deleteCollaborator"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async emptyTrash(i) {
let a = await n.emptyTrash(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.emptyTrash"]?.[s]?.url;
return (n, i) => _(a, e, r, t)(n, c || i);
},
async getChildCollections(i) {
let a = await n.getChildCollections(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getChildCollections"]?.[s]?.url;
return (n, i) => _(a, e, r, t)(n, c || i);
},
async getCollaborators(i, a) {
let s = await n.getCollaborators(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.getCollaborators"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async getCollection(i, a) {
let s = await n.getCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.getCollection"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async getFeaturedCovers(i) {
let a = await n.getFeaturedCovers(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getFeaturedCovers"]?.[s]?.url;
return (n, i) => _(a, e, r, t)(n, c || i);
},
async getRootCollections(i) {
let a = await n.getRootCollections(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getRootCollections"]?.[s]?.url;
return (n, i) => _(a, e, r, t)(n, c || i);
},
async getSystemCollectionStats(i) {
let a = await n.getSystemCollectionStats(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getSystemCollectionStats"]?.[s]?.url;
return (n, i) => _(a, e, r, t)(n, c || i);
},
async mergeCollections(i, a) {
let s = await n.mergeCollections(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.mergeCollections"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async removeAllEmptyCollections(i) {
let a = await n.removeAllEmptyCollections(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.removeAllEmptyCollections"]?.[s]?.url;
return (n, i) => _(a, e, r, t)(n, c || i);
},
async removeCollection(i, a) {
let s = await n.removeCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.removeCollection"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async removeCollections(i, a) {
let s = await n.removeCollections(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.removeCollections"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async reorderAllCollections(i, a) {
let s = await n.reorderAllCollections(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.reorderAllCollections"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async searchCovers(i, a) {
let s = await n.searchCovers(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.searchCovers"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async shareCollection(i, a, s) {
let c = await n.shareCollection(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.shareCollection"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async unshareOrLeaveCollection(i, a) {
let s = await n.unshareOrLeaveCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.unshareOrLeaveCollection"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async updateCollection(i, a, s) {
let c = await n.updateCollection(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.updateCollection"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async uploadCollectionCover(i, a, s) {
let c = await n.uploadCollectionCover(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.uploadCollectionCover"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
}
};
}, D = function(e, t, n) {
let r = E(e);
return {
acceptInvitation(e, i) {
return r.acceptInvitation(e, i).then((e) => e(n, t));
},
changeCollaboratorAccessLevel(e, i, a, o) {
return r.changeCollaboratorAccessLevel(e, i, a, o).then((e) => e(n, t));
},
createCollection(e, i) {
return r.createCollection(e, i).then((e) => e(n, t));
},
deleteCollaborator(e, i, a) {
return r.deleteCollaborator(e, i, a).then((e) => e(n, t));
},
emptyTrash(e) {
return r.emptyTrash(e).then((e) => e(n, t));
},
getChildCollections(e) {
return r.getChildCollections(e).then((e) => e(n, t));
},
getCollaborators(e, i) {
return r.getCollaborators(e, i).then((e) => e(n, t));
},
getCollection(e, i) {
return r.getCollection(e, i).then((e) => e(n, t));
},
getFeaturedCovers(e) {
return r.getFeaturedCovers(e).then((e) => e(n, t));
},
getRootCollections(e) {
return r.getRootCollections(e).then((e) => e(n, t));
},
getSystemCollectionStats(e) {
return r.getSystemCollectionStats(e).then((e) => e(n, t));
},
mergeCollections(e, i) {
return r.mergeCollections(e, i).then((e) => e(n, t));
},
removeAllEmptyCollections(e) {
return r.removeAllEmptyCollections(e).then((e) => e(n, t));
},
removeCollection(e, i) {
return r.removeCollection(e, i).then((e) => e(n, t));
},
removeCollections(e, i) {
return r.removeCollections(e, i).then((e) => e(n, t));
},
reorderAllCollections(e, i) {
return r.reorderAllCollections(e, i).then((e) => e(n, t));
},
searchCovers(e, i) {
return r.searchCovers(e, i).then((e) => e(n, t));
},
shareCollection(e, i, a) {
return r.shareCollection(e, i, a).then((e) => e(n, t));
},
unshareOrLeaveCollection(e, i) {
return r.unshareOrLeaveCollection(e, i).then((e) => e(n, t));
},
updateCollection(e, i, a) {
return r.updateCollection(e, i, a).then((e) => e(n, t));
},
uploadCollectionCover(e, i, a) {
return r.uploadCollectionCover(e, i, a).then((e) => e(n, t));
}
};
}, O = class extends i {
acceptInvitation(e, t) {
return E(this.configuration).acceptInvitation(e, t).then((e) => e(this.axios, this.basePath));
}
changeCollaboratorAccessLevel(e, t, n, r) {
return E(this.configuration).changeCollaboratorAccessLevel(e, t, n, r).then((e) => e(this.axios, this.basePath));
}
createCollection(e, t) {
return E(this.configuration).createCollection(e, t).then((e) => e(this.axios, this.basePath));
}
deleteCollaborator(e, t, n) {
return E(this.configuration).deleteCollaborator(e, t, n).then((e) => e(this.axios, this.basePath));
}
emptyTrash(e) {
return E(this.configuration).emptyTrash(e).then((e) => e(this.axios, this.basePath));
}
getChildCollections(e) {
return E(this.configuration).getChildCollections(e).then((e) => e(this.axios, this.basePath));
}
getCollaborators(e, t) {
return E(this.configuration).getCollaborators(e, t).then((e) => e(this.axios, this.basePath));
}
getCollection(e, t) {
return E(this.configuration).getCollection(e, t).then((e) => e(this.axios, this.basePath));
}
getFeaturedCovers(e) {
return E(this.configuration).getFeaturedCovers(e).then((e) => e(this.axios, this.basePath));
}
getRootCollections(e) {
return E(this.configuration).getRootCollections(e).then((e) => e(this.axios, this.basePath));
}
getSystemCollectionStats(e) {
return E(this.configuration).getSystemCollectionStats(e).then((e) => e(this.axios, this.basePath));
}
mergeCollections(e, t) {
return E(this.configuration).mergeCollections(e, t).then((e) => e(this.axios, this.basePath));
}
removeAllEmptyCollections(e) {
return E(this.configuration).removeAllEmptyCollections(e).then((e) => e(this.axios, this.basePath));
}
removeCollection(e, t) {
return E(this.configuration).removeCollection(e, t).then((e) => e(this.axios, this.basePath));
}
removeCollections(e, t) {
return E(this.configuration).removeCollections(e, t).then((e) => e(this.axios, this.basePath));
}
reorderAllCollections(e, t) {
return E(this.configuration).reorderAllCollections(e, t).then((e) => e(this.axios, this.basePath));
}
searchCovers(e, t) {
return E(this.configuration).searchCovers(e, t).then((e) => e(this.axios, this.basePath));
}
shareCollection(e, t, n) {
return E(this.configuration).shareCollection(e, t, n).then((e) => e(this.axios, this.basePath));
}
unshareOrLeaveCollection(e, t) {
return E(this.configuration).unshareOrLeaveCollection(e, t).then((e) => e(this.axios, this.basePath));
}
updateCollection(e, t, n) {
return E(this.configuration).updateCollection(e, t, n).then((e) => e(this.axios, this.basePath));
}
uploadCollectionCover(e, t, n) {
return E(this.configuration).uploadCollectionCover(e, t, n).then((e) => e(this.axios, this.basePath));
}
}, k = function(e) {
return { getFilters: async (t, n, r, i = {}) => {
c("getFilters", "collectionId", t);
let a = "/rest/v1/filters/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(a, s), u;
e && (u = e.baseOptions);
let f = {
method: "GET",
...u,
...i
}, p = {}, m = {};
await l(p, e), n !== void 0 && (m.tagsSort = n), r !== void 0 && (m.search = r), d(o, m);
let h = u && u.headers ? u.headers : {};
return f.headers = {
...p,
...h,
...i.headers
}, {
url: g(o),
options: f
};
} };
}, A = function(t) {
let n = k(t);
return { async getFilters(i, a, s, c) {
let l = await n.getFilters(i, a, s, c), u = t?.serverIndex ?? 0, d = o["FilterApi.getFilters"]?.[u]?.url;
return (n, i) => _(l, e, r, t)(n, d || i);
} };
}, ne = function(e, t, n) {
let r = A(e);
return { getFilters(e, i, a, o) {
return r.getFilters(e, i, a, o).then((e) => e(n, t));
} };
}, j = class extends i {
getFilters(e, t, n, r) {
return A(this.configuration).getFilters(e, t, n, r).then((e) => e(this.axios, this.basePath));
}
}, re = {
MinusCount: "-count",
Id: "_id"
}, M = function(e) {
return {
getAllHighlights: async (t, n, r = {}) => {
let i = new URL("/rest/v1/highlights", s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...r
}, c = {}, u = {};
await l(c, e), t !== void 0 && (u.page = t), n !== void 0 && (u.perpage = n), d(i, u);
let f = a && a.headers ? a.headers : {};
return o.headers = {
...c,
...f,
...r.headers
}, {
url: g(i),
options: o
};
},
getHighlightsInCollection: async (t, n, r, i = {}) => {
c("getHighlightsInCollection", "collectionId", t);
let a = "/rest/v1/highlights/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(a, s), u;
e && (u = e.baseOptions);
let f = {
method: "GET",
...u,
...i
}, p = {}, m = {};
await l(p, e), n !== void 0 && (m.page = n), r !== void 0 && (m.perpage = r), d(o, m);
let h = u && u.headers ? u.headers : {};
return f.headers = {
...p,
...h,
...i.headers
}, {
url: g(o),
options: f
};
},
getRaindrop: async (t, n = {}) => {
c("getRaindrop", "id", t);
let r = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
updateRaindrop: async (t, n, r = {}) => {
c("updateRaindrop", "id", t);
let i = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "PUT",
...o,
...r
}, p = {};
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
let m = o && o.headers ? o.headers : {};
return u.headers = {
...p,
...m,
...r.headers
}, u.data = f(n, u, e), {
url: g(a),
options: u
};
}
};
}, N = function(t) {
let n = M(t);
return {
async getAllHighlights(i, a, s) {
let c = await n.getAllHighlights(i, a, s), l = t?.serverIndex ?? 0, u = o["HighlightApi.getAllHighlights"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async getHighlightsInCollection(i, a, s, c) {
let l = await n.getHighlightsInCollection(i, a, s, c), u = t?.serverIndex ?? 0, d = o["HighlightApi.getHighlightsInCollection"]?.[u]?.url;
return (n, i) => _(l, e, r, t)(n, d || i);
},
async getRaindrop(i, a) {
let s = await n.getRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["HighlightApi.getRaindrop"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async updateRaindrop(i, a, s) {
let c = await n.updateRaindrop(i, a, s), l = t?.serverIndex ?? 0, u = o["HighlightApi.updateRaindrop"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
}
};
}, P = function(e, t, n) {
let r = N(e);
return {
getAllHighlights(e, i, a) {
return r.getAllHighlights(e, i, a).then((e) => e(n, t));
},
getHighlightsInCollection(e, i, a, o) {
return r.getHighlightsInCollection(e, i, a, o).then((e) => e(n, t));
},
getRaindrop(e, i) {
return r.getRaindrop(e, i).then((e) => e(n, t));
},
updateRaindrop(e, i, a) {
return r.updateRaindrop(e, i, a).then((e) => e(n, t));
}
};
}, F = class extends i {
getAllHighlights(e, t, n) {
return N(this.configuration).getAllHighlights(e, t, n).then((e) => e(this.axios, this.basePath));
}
getHighlightsInCollection(e, t, n, r) {
return N(this.configuration).getHighlightsInCollection(e, t, n, r).then((e) => e(this.axios, this.basePath));
}
getRaindrop(e, t) {
return N(this.configuration).getRaindrop(e, t).then((e) => e(this.axios, this.basePath));
}
updateRaindrop(e, t, n) {
return N(this.configuration).updateRaindrop(e, t, n).then((e) => e(this.axios, this.basePath));
}
}, I = function(e) {
return {
checkURLsExist: async (t, n = {}) => {
let r = new URL("/rest/v1/import/url/exists", s), i;
e && (i = e.baseOptions);
let a = {
method: "POST",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
importHTMLBookmarkFile: async (t, n = {}) => {
let r = new URL("/rest/v1/import/file", s), i;
e && (i = e.baseOptions);
let a = {
method: "POST",
...i,
...n
}, o = {}, c = {}, u = new (e && e.formDataCtor || FormData)();
await l(o, e), t !== void 0 && u.append("import", t), o["Content-Type"] = "multipart/form-data", d(r, c);
let f = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...f,
...n.headers
}, a.data = u, {
url: g(r),
options: a
};
},
parseURL: async (t, n = {}) => {
let r = new URL("/rest/v1/import/url/parse", s), i;
e && (i = e.baseOptions);
let a = {
method: "GET",
...i,
...n
}, o = {}, c = {};
await l(o, e), t !== void 0 && (c.url = t), d(r, c);
let u = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...u,
...n.headers
}, {
url: g(r),
options: a
};
}
};
}, L = function(t) {
let n = I(t);
return {
async checkURLsExist(i, a) {
let s = await n.checkURLsExist(i, a), c = t?.serverIndex ?? 0, l = o["ImportApi.checkURLsExist"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async importHTMLBookmarkFile(i, a) {
let s = await n.importHTMLBookmarkFile(i, a), c = t?.serverIndex ?? 0, l = o["ImportApi.importHTMLBookmarkFile"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async parseURL(i, a) {
let s = await n.parseURL(i, a), c = t?.serverIndex ?? 0, l = o["ImportApi.parseURL"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
}
};
}, ie = function(e, t, n) {
let r = L(e);
return {
checkURLsExist(e, i) {
return r.checkURLsExist(e, i).then((e) => e(n, t));
},
importHTMLBookmarkFile(e, i) {
return r.importHTMLBookmarkFile(e, i).then((e) => e(n, t));
},
parseURL(e, i) {
return r.parseURL(e, i).then((e) => e(n, t));
}
};
}, R = class extends i {
checkURLsExist(e, t) {
return L(this.configuration).checkURLsExist(e, t).then((e) => e(this.axios, this.basePath));
}
importHTMLBookmarkFile(e, t) {
return L(this.configuration).importHTMLBookmarkFile(e, t).then((e) => e(this.axios, this.basePath));
}
parseURL(e, t) {
return L(this.configuration).parseURL(e, t).then((e) => e(this.axios, this.basePath));
}
}, z = function(e) {
return {
createRaindrop: async (t, n = {}) => {
let r = new URL("/rest/v1/raindrop", s), i;
e && (i = e.baseOptions);
let a = {
method: "POST",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
createRaindrops: async (t, n = {}) => {
let r = new URL("/rest/v1/raindrops", s), i;
e && (i = e.baseOptions);
let a = {
method: "POST",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
getPermanentCopy: async (t, n = {}) => {
c("getPermanentCopy", "id", t);
let r = "/rest/v1/raindrop/{id}/cache".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
getRaindrop: async (t, n = {}) => {
c("getRaindrop", "id", t);
let r = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
getRaindrops: async (t, n, r, i, a, o = {}) => {
c("getRaindrops", "collectionId", t);
let u = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), f = new URL(u, s), p;
e && (p = e.baseOptions);
let m = {
method: "GET",
...p,
...o
}, h = {}, _ = {};
await l(h, e), n !== void 0 && (_.sort = n), r !== void 0 && (_.perpage = r), i !== void 0 && (_.page = i), a !== void 0 && (_.search = a), d(f, _);
let v = p && p.headers ? p.headers : {};
return m.headers = {
...h,
...v,
...o.headers
}, {
url: g(f),
options: m
};
},
removeRaindrop: async (t, n = {}) => {
c("removeRaindrop", "id", t);
let r = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "DELETE",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
removeRaindrops: async (t, n, r, i = {}) => {
c("removeRaindrops", "collectionId", t);
let a = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(a, s), u;
e && (u = e.baseOptions);
let p = {
method: "DELETE",
...u,
...i
}, m = {}, h = {};
await l(m, e), n !== void 0 && (h.search = n), m["Content-Type"] = "application/json", d(o, h);
let _ = u && u.headers ? u.headers : {};
return p.headers = {
...m,
..._,
...i.headers
}, p.data = f(r, p, e), {
url: g(o),
options: p
};
},
suggestForExistingBookmark: async (t, n = {}) => {
c("suggestForExistingBookmark", "id", t);
let r = "/rest/v1/raindrop/{id}/suggest".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
suggestForNewBookmark: async (t, n = {}) => {
let r = new URL("/rest/v1/raindrop/suggest", s), i;
e && (i = e.baseOptions);
let a = {
method: "POST",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
},
updateRaindrop: async (t, n, r = {}) => {
c("updateRaindrop", "id", t);
let i = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "PUT",
...o,
...r
}, p = {};
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
let m = o && o.headers ? o.headers : {};
return u.headers = {
...p,
...m,
...r.headers
}, u.data = f(n, u, e), {
url: g(a),
options: u
};
},
updateRaindrops: async (t, n, r = {}) => {
c("updateRaindrops", "collectionId", t);
let i = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "PUT",
...o,
...r
}, p = {};
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
let m = o && o.headers ? o.headers : {};
return u.headers = {
...p,
...m,
...r.headers
}, u.data = f(n, u, e), {
url: g(a),
options: u
};
},
uploadFile: async (t, n, r = {}) => {
let i = new URL("/rest/v1/raindrop/file", s), a;
e && (a = e.baseOptions);
let o = {
method: "PUT",
...a,
...r
}, c = {}, u = {}, f = new (e && e.formDataCtor || FormData)();
await l(c, e), t !== void 0 && f.append("file", t), n !== void 0 && f.append("collectionId", n), c["Content-Type"] = "multipart/form-data", d(i, u);
let p = a && a.headers ? a.headers : {};
return o.headers = {
...c,
...p,
...r.headers
}, o.data = f, {
url: g(i),
options: o
};
},
uploadRaindropCover: async (t, n, r = {}) => {
c("uploadRaindropCover", "id", t);
let i = "/rest/v1/raindrop/{id}/cover".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let u = {
method: "PUT",
...o,
...r
}, f = {}, p = {}, m = new (e && e.formDataCtor || FormData)();
await l(f, e), n !== void 0 && m.append("cover", n), f["Content-Type"] = "multipart/form-data", d(a, p);
let h = o && o.headers ? o.headers : {};
return u.headers = {
...f,
...h,
...r.headers
}, u.data = m, {
url: g(a),
options: u
};
}
};
}, B = function(t) {
let n = z(t);
return {
async createRaindrop(i, a) {
let s = await n.createRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.createRaindrop"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async createRaindrops(i, a) {
let s = await n.createRaindrops(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.createRaindrops"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async getPermanentCopy(i, a) {
let s = await n.getPermanentCopy(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.getPermanentCopy"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async getRaindrop(i, a) {
let s = await n.getRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.getRaindrop"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async getRaindrops(i, a, s, c, l, u) {
let d = await n.getRaindrops(i, a, s, c, l, u), f = t?.serverIndex ?? 0, p = o["RaindropApi.getRaindrops"]?.[f]?.url;
return (n, i) => _(d, e, r, t)(n, p || i);
},
async removeRaindrop(i, a) {
let s = await n.removeRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.removeRaindrop"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async removeRaindrops(i, a, s, c) {
let l = await n.removeRaindrops(i, a, s, c), u = t?.serverIndex ?? 0, d = o["RaindropApi.removeRaindrops"]?.[u]?.url;
return (n, i) => _(l, e, r, t)(n, d || i);
},
async suggestForExistingBookmark(i, a) {
let s = await n.suggestForExistingBookmark(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.suggestForExistingBookmark"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async suggestForNewBookmark(i, a) {
let s = await n.suggestForNewBookmark(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.suggestForNewBookmark"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async updateRaindrop(i, a, s) {
let c = await n.updateRaindrop(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.updateRaindrop"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async updateRaindrops(i, a, s) {
let c = await n.updateRaindrops(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.updateRaindrops"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async uploadFile(i, a, s) {
let c = await n.uploadFile(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.uploadFile"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async uploadRaindropCover(i, a, s) {
let c = await n.uploadRaindropCover(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.uploadRaindropCover"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
}
};
}, ae = function(e, t, n) {
let r = B(e);
return {
createRaindrop(e, i) {
return r.createRaindrop(e, i).then((e) => e(n, t));
},
createRaindrops(e, i) {
return r.createRaindrops(e, i).then((e) => e(n, t));
},
getPermanentCopy(e, i) {
return r.getPermanentCopy(e, i).then((e) => e(n, t));
},
getRaindrop(e, i) {
return r.getRaindrop(e, i).then((e) => e(n, t));
},
getRaindrops(e, i, a, o, s, c) {
return r.getRaindrops(e, i, a, o, s, c).then((e) => e(n, t));
},
removeRaindrop(e, i) {
return r.removeRaindrop(e, i).then((e) => e(n, t));
},
removeRaindrops(e, i, a, o) {
return r.removeRaindrops(e, i, a, o).then((e) => e(n, t));
},
suggestForExistingBookmark(e, i) {
return r.suggestForExistingBookmark(e, i).then((e) => e(n, t));
},
suggestForNewBookmark(e, i) {
return r.suggestForNewBookmark(e, i).then((e) => e(n, t));
},
updateRaindrop(e, i, a) {
return r.updateRaindrop(e, i, a).then((e) => e(n, t));
},
updateRaindrops(e, i, a) {
return r.updateRaindrops(e, i, a).then((e) => e(n, t));
},
uploadFile(e, i, a) {
return r.uploadFile(e, i, a).then((e) => e(n, t));
},
uploadRaindropCover(e, i, a) {
return r.uploadRaindropCover(e, i, a).then((e) => e(n, t));
}
};
}, V = class extends i {
createRaindrop(e, t) {
return B(this.configuration).createRaindrop(e, t).then((e) => e(this.axios, this.basePath));
}
createRaindrops(e, t) {
return B(this.configuration).createRaindrops(e, t).then((e) => e(this.axios, this.basePath));
}
getPermanentCopy(e, t) {
return B(this.configuration).getPermanentCopy(e, t).then((e) => e(this.axios, this.basePath));
}
getRaindrop(e, t) {
return B(this.configuration).getRaindrop(e, t).then((e) => e(this.axios, this.basePath));
}
getRaindrops(e, t, n, r, i, a) {
return B(this.configuration).getRaindrops(e, t, n, r, i, a).then((e) => e(this.axios, this.basePath));
}
removeRaindrop(e, t) {
return B(this.configuration).removeRaindrop(e, t).then((e) => e(this.axios, this.basePath));
}
removeRaindrops(e, t, n, r) {
return B(this.configuration).removeRaindrops(e, t, n, r).then((e) => e(this.axios, this.basePath));
}
suggestForExistingBookmark(e, t) {
return B(this.configuration).suggestForExistingBookmark(e, t).then((e) => e(this.axios, this.basePath));
}
suggestForNewBookmark(e, t) {
return B(this.configuration).suggestForNewBookmark(e, t).then((e) => e(this.axios, this.basePath));
}
updateRaindrop(e, t, n) {
return B(this.configuration).updateRaindrop(e, t, n).then((e) => e(this.axios, this.basePath));
}
updateRaindrops(e, t, n) {
return B(this.configuration).updateRaindrops(e, t, n).then((e) => e(this.axios, this.basePath));
}
uploadFile(e, t, n) {
return B(this.configuration).uploadFile(e, t, n).then((e) => e(this.axios, this.basePath));
}
uploadRaindropCover(e, t, n) {
return B(this.configuration).uploadRaindropCover(e, t, n).then((e) => e(this.axios, this.basePath));
}
}, H = function(e) {
return {
getTagsInCollection: async (t, n = {}) => {
let r = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, c = {};
await l(c, e), d(i, {});
let u = a && a.headers ? a.headers : {};
return o.headers = {
...c,
...u,
...n.headers
}, {
url: g(i),
options: o
};
},
removeTagsFromCollection: async (t, n, r = {}) => {
let i = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let c = {
method: "DELETE",
...o,
...r
}, u = {};
await l(u, e), u["Content-Type"] = "application/json", d(a, {});
let p = o && o.headers ? o.headers : {};
return c.headers = {
...u,
...p,
...r.headers
}, c.data = f(n, c, e), {
url: g(a),
options: c
};
},
renameOrMergeTags: async (t, n, r = {}) => {
let i = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), a = new URL(i, s), o;
e && (o = e.baseOptions);
let c = {
method: "PUT",
...o,
...r
}, u = {};
await l(u, e), u["Content-Type"] = "application/json", d(a, {});
let p = o && o.headers ? o.headers : {};
return c.headers = {
...u,
...p,
...r.headers
}, c.data = f(n, c, e), {
url: g(a),
options: c
};
}
};
}, U = function(t) {
let n = H(t);
return {
async getTagsInCollection(i, a) {
let s = await n.getTagsInCollection(i, a), c = t?.serverIndex ?? 0, l = o["TagApi.getTagsInCollection"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async removeTagsFromCollection(i, a, s) {
let c = await n.removeTagsFromCollection(i, a, s), l = t?.serverIndex ?? 0, u = o["TagApi.removeTagsFromCollection"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
},
async renameOrMergeTags(i, a, s) {
let c = await n.renameOrMergeTags(i, a, s), l = t?.serverIndex ?? 0, u = o["TagApi.renameOrMergeTags"]?.[l]?.url;
return (n, i) => _(c, e, r, t)(n, u || i);
}
};
}, oe = function(e, t, n) {
let r = U(e);
return {
getTagsInCollection(e, i) {
return r.getTagsInCollection(e, i).then((e) => e(n, t));
},
removeTagsFromCollection(e, i, a) {
return r.removeTagsFromCollection(e, i, a).then((e) => e(n, t));
},
renameOrMergeTags(e, i, a) {
return r.renameOrMergeTags(e, i, a).then((e) => e(n, t));
}
};
}, W = class extends i {
getTagsInCollection(e, t) {
return U(this.configuration).getTagsInCollection(e, t).then((e) => e(this.axios, this.basePath));
}
removeTagsFromCollection(e, t, n) {
return U(this.configuration).removeTagsFromCollection(e, t, n).then((e) => e(this.axios, this.basePath));
}
renameOrMergeTags(e, t, n) {
return U(this.configuration).renameOrMergeTags(e, t, n).then((e) => e(this.axios, this.basePath));
}
}, G = function(e) {
return {
connectSocialNetworkProvider: async (t, n = {}) => {
c("connectSocialNetworkProvider", "provider", t);
let r = "/rest/v1/user/connect/{provider}".replace("{provider}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
disconnectSocialNetworkProvider: async (t, n = {}) => {
c("disconnectSocialNetworkProvider", "provider", t);
let r = "/rest/v1/user/connect/{provider}/revoke".replace("{provider}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
getCurrentUser: async (t = {}) => {
let n = new URL("/rest/v1/user", s), r;
e && (r = e.baseOptions);
let i = {
method: "GET",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
getPublicUserByName: async (t, n = {}) => {
c("getPublicUserByName", "name", t);
let r = "/rest/v1/user/{name}".replace("{name}", encodeURIComponent(String(t))), i = new URL(r, s), a;
e && (a = e.baseOptions);
let o = {
method: "GET",
...a,
...n
}, u = {};
await l(u, e), d(i, {});
let f = a && a.headers ? a.headers : {};
return o.headers = {
...u,
...f,
...n.headers
}, {
url: g(i),
options: o
};
},
getSystemCollectionStats: async (t = {}) => {
let n = new URL("/rest/v1/user/stats", s), r;
e && (r = e.baseOptions);
let i = {
method: "GET",
...r,
...t
}, a = {};
await l(a, e), d(n, {});
let o = r && r.headers ? r.headers : {};
return i.headers = {
...a,
...o,
...t.headers
}, {
url: g(n),
options: i
};
},
updateCurrentUser: async (t, n = {}) => {
let r = new URL("/rest/v1/user", s), i;
e && (i = e.baseOptions);
let a = {
method: "PUT",
...i,
...n
}, o = {};
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
let c = i && i.headers ? i.headers : {};
return a.headers = {
...o,
...c,
...n.headers
}, a.data = f(t, a, e), {
url: g(r),
options: a
};
}
};
}, K = function(t) {
let n = G(t);
return {
async connectSocialNetworkProvider(i, a) {
let s = await n.connectSocialNetworkProvider(i, a), c = t?.serverIndex ?? 0, l = o["UserApi.connectSocialNetworkProvider"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async disconnectSocialNetworkProvider(i, a) {
let s = await n.disconnectSocialNetworkProvider(i, a), c = t?.serverIndex ?? 0, l = o["UserApi.disconnectSocialNetworkProvider"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async getCurrentUser(i) {
let a = await n.getCurrentUser(i), s = t?.serverIndex ?? 0, c = o["UserApi.getCurrentUser"]?.[s]?.url;
return (n, i) => _(a, e, r, t)(n, c || i);
},
async getPublicUserByName(i, a) {
let s = await n.getPublicUserByName(i, a), c = t?.serverIndex ?? 0, l = o["UserApi.getPublicUserByName"]?.[c]?.url;
return (n, i) => _(s, e, r, t)(n, l || i);
},
async getSystemCollectio