@lasuillard/raindrop-client 0.7.6 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1901 -3098
- package/dist/src/client/auth.d.ts +18 -0
- package/dist/src/client/client.d.ts +25 -0
- package/dist/src/client/collection.d.ts +14 -0
- package/dist/src/client/index.d.ts +1 -0
- package/dist/src/client/raindrop.d.ts +23 -0
- package/dist/{index.d.ts → src/generated/api.d.ts} +5559 -6223
- package/dist/src/generated/base.d.ts +55 -0
- package/dist/src/generated/common.d.ts +54 -0
- package/dist/src/generated/configuration.d.ts +91 -0
- package/dist/src/generated/index.d.ts +13 -0
- package/dist/src/index.d.ts +6 -0
- package/dist/src/utils/index.d.ts +2 -0
- package/dist/src/utils/tree.d.ts +49 -0
- package/dist/tests/__typechecks__/checkURLsExist.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/createCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/createRaindrop.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/createRaindrops.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/emptyTrash.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getAllHighlights.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getChildCollections.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getCurrentUser.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getFeaturedCovers.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getFilters.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getHighlightsInCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getPublicUserByName.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getRaindrop.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getRaindrops.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getRootCollections.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getSystemCollectionStats.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/getTagsInCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/importHTMLBookmarkFile.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/mergeCollections.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/parseURL.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/removeAllEmptyCollections.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/removeCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/removeCollections.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/removeRaindrop.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/removeRaindrops.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/removeTagsFromCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/renameOrMergeTags.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/reorderAllCollections.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/searchCovers.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/shareCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/updateCollection.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/updateCurrentUser.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/updateRaindrop.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/updateRaindrops.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/uploadCollectionCover.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/uploadFile.test-d.d.ts +1 -0
- package/dist/tests/__typechecks__/uploadRaindropCover.test-d.d.ts +1 -0
- package/dist/tests/_helpers/axios.d.ts +11 -0
- package/dist/tests/_helpers/common.d.ts +2 -0
- package/dist/tests/_helpers/polly.d.ts +5 -0
- package/dist/tests/_helpers/raindrop.d.ts +17 -0
- package/dist/tests/_helpers/typechecks.d.ts +14 -0
- package/dist/tests/_helpers/utils.d.ts +1 -0
- package/dist/tests/_helpers/vitest.d.ts +29 -0
- package/dist/tests/client/auth.test.d.ts +1 -0
- package/dist/tests/client/client.test.d.ts +1 -0
- package/dist/tests/client/collection.test.d.ts +1 -0
- package/dist/tests/client/raindrop.test.d.ts +1 -0
- package/dist/tests/generated/auth.test.d.ts +1 -0
- package/dist/tests/generated/collection.test.d.ts +1 -0
- package/dist/tests/generated/filter.test.d.ts +1 -0
- package/dist/tests/generated/highlight.test.d.ts +1 -0
- package/dist/tests/generated/import.test.d.ts +1 -0
- package/dist/tests/generated/raindrop.test.d.ts +1 -0
- package/dist/tests/generated/tag.test.d.ts +1 -0
- package/dist/tests/generated/user.test.d.ts +1 -0
- package/dist/tests/setup.d.ts +1 -0
- package/dist/tests/utils/tree.test.d.ts +1 -0
- package/package.json +79 -71
package/README.md
CHANGED
|
@@ -39,7 +39,7 @@ You may need Java installed as openapi-generator-cli uses it.
|
|
|
39
39
|
|
|
40
40
|
## 💖 Contributing
|
|
41
41
|
|
|
42
|
-
|
|
42
|
+
Please refer to [CONTRIBUTING.md](./CONTRIBUTING.md)
|
|
43
43
|
|
|
44
44
|
## 📜 License
|
|
45
45
|
|
package/dist/index.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const h=require("axios"),p="https://api.raindrop.io".replace(/\/+$/,"");class S{constructor(t,e=p,s=h){this.basePath=e,this.axios=s,t&&(this.configuration=t,this.basePath=t.basePath??e)}configuration}class ce extends Error{constructor(t,e){super(e),this.field=t,this.name="RequiredError"}}const u={},m="https://example.com",P=function(n,t,e){if(e==null)throw new ce(t,`Required parameter ${t} was null or undefined when calling ${n}.`)},C=async function(n,t){if(t&&t.accessToken){const e=typeof t.accessToken=="function"?await t.accessToken():await t.accessToken;n.Authorization="Bearer "+e}};function E(n,t,e=""){t!=null&&(typeof t=="object"?Array.isArray(t)?t.forEach(s=>E(n,s,e)):Object.keys(t).forEach(s=>E(n,t[s],`${e}${e!==""?".":""}${s}`)):n.has(e)?n.append(e,t):n.set(e,t))}const V=function(n,...t){const e=new URLSearchParams(n.search);E(e,t),n.search=e.toString()},y=function(n,t,e){const s=typeof n!="string";return(s&&e&&e.isJsonMime?e.isJsonMime(t.headers["Content-Type"]):s)?JSON.stringify(n!==void 0?U(n):{}):n||""};function U(n){if(typeof Set>"u"||typeof Map>"u"||typeof n!="object"||!n)return n;if(n instanceof Set)return Array.from(n).map(t=>U(t));if(n instanceof Map){const t=[];return n.forEach((e,s)=>{t.push([s,U(e)])}),H(t)}return Array.isArray(n)?n.map(t=>U(t)):H(ie(n).map(([t,e])=>[t,U(e)]))}function ie(n){return Object.keys(n).map(t=>[t,n[t]])}function H(n){return[...n].reduce((t,[e,s])=>(t[e]=s,t),{})}const O=function(n){return n.pathname+n.search+n.hash},v=function(n,t,e,s){return(a=t,r=e)=>{const o={...n.options,url:(a.defaults.baseURL?"":s?.basePath??r)+n.url};return a.request(o)}},de={Collections:"collections"},Q={AuthorizationCode:"authorization_code"},N={RefreshToken:"refresh_token"},he={Member:"member",Viewer:"viewer"},pe={Bearer:"Bearer"},$=function(n){return{authorize:async(t,e,s={})=>{P("authorize","redirectUri",t),P("authorize","clientId",e);const a="/v1/oauth/authorize",r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"GET",...o,...s},c={},i={};t!==void 0&&(i.redirect_uri=t),e!==void 0&&(i.client_id=e),V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},{url:O(r),options:l}},getOrRefreshToken:async(t,e={})=>{const s="/v1/oauth/access_token",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={};l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}}}},B=function(n){const t=$(n);return{async authorize(e,s,a){const r=await t.authorize(e,s,a),o=n?.serverIndex??0,l=u["AuthenticationApi.authorize"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async getOrRefreshToken(e,s){const a=await t.getOrRefreshToken(e,s),r=n?.serverIndex??0,o=u["AuthenticationApi.getOrRefreshToken"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)}}},ue=function(n,t,e){const s=B(n);return{authorize(a,r,o){return s.authorize(a,r,o).then(l=>l(e,t))},getOrRefreshToken(a,r){return s.getOrRefreshToken(a,r).then(o=>o(e,t))}}};let _=class extends S{authorize(t,e,s){return B(this.configuration).authorize(t,e,s).then(a=>a(this.axios,this.basePath))}getOrRefreshToken(t,e){return B(this.configuration).getOrRefreshToken(t,e).then(s=>s(this.axios,this.basePath))}};const M=function(n){return{acceptInvitation:async(t,e={})=>{P("acceptInvitation","id",t);const s="/rest/v1/collection/{id}/join".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},changeCollaboratorAccessLevel:async(t,e,s,a={})=>{P("changeCollaboratorAccessLevel","userId",t),P("changeCollaboratorAccessLevel","id",e);const r="/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))),o=new URL(r,m);let l;n&&(l=n.baseOptions);const c={method:"PUT",...l,...a},i={},d={};await C(i,n),i["Content-Type"]="application/json",V(o,d);let R=l&&l.headers?l.headers:{};return c.headers={...i,...R,...a.headers},c.data=y(s,c,n),{url:O(o),options:c}},createCollection:async(t,e={})=>{const s="/rest/v1/collection",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},deleteCollaborator:async(t,e,s={})=>{P("deleteCollaborator","userId",t),P("deleteCollaborator","id",e);const a="/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}",encodeURIComponent(String(t))).replace("{id}",encodeURIComponent(String(e))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"DELETE",...o,...s},c={},i={};await C(c,n),V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},{url:O(r),options:l}},emptyTrash:async(t={})=>{const e="/rest/v1/collection/-99",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"DELETE",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},getChildCollections:async(t={})=>{const e="/rest/v1/collections/childrens",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"GET",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},getCollaborators:async(t,e={})=>{P("getCollaborators","id",t);const s="/rest/v1/collection/{id}/sharing".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},getCollection:async(t,e={})=>{P("getCollection","id",t);const s="/rest/v1/collection/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},getFeaturedCovers:async(t={})=>{const e="/rest/v1/collections/covers",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"GET",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},getRootCollections:async(t={})=>{const e="/rest/v1/collections",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"GET",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},getSystemCollectionStats:async(t={})=>{const e="/rest/v1/user/stats",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"GET",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},mergeCollections:async(t,e={})=>{const s="/rest/v1/collections/merge",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"PUT",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},removeAllEmptyCollections:async(t={})=>{const e="/rest/v1/collections/clean",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"PUT",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},removeCollection:async(t,e={})=>{P("removeCollection","id",t);const s="/rest/v1/collection/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"DELETE",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},removeCollections:async(t,e={})=>{const s="/rest/v1/collections",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"DELETE",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},reorderAllCollections:async(t,e={})=>{const s="/rest/v1/collections",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"PUT",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},searchCovers:async(t,e={})=>{P("searchCovers","text",t);const s="/rest/v1/collections/covers/{text}".replace("{text}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},shareCollection:async(t,e,s={})=>{P("shareCollection","id",t);const a="/rest/v1/collection/{id}/sharing".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"POST",...o,...s},c={},i={};await C(c,n),c["Content-Type"]="application/json",V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},l.data=y(e,l,n),{url:O(r),options:l}},unshareOrLeaveCollection:async(t,e={})=>{P("unshareOrLeaveCollection","id",t);const s="/rest/v1/collection/{id}/sharing".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"DELETE",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},updateCollection:async(t,e,s={})=>{P("updateCollection","id",t);const a="/rest/v1/collection/{id}".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={};await C(c,n),c["Content-Type"]="application/json",V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},l.data=y(e,l,n),{url:O(r),options:l}},uploadCollectionCover:async(t,e,s={})=>{P("uploadCollectionCover","id",t);const a="/rest/v1/collection/{id}/cover".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={},d=new(n&&n.formDataCtor||FormData);await C(c,n),e!==void 0&&d.append("cover",e),c["Content-Type"]="multipart/form-data",V(r,i);let R=o&&o.headers?o.headers:{};return l.headers={...c,...R,...s.headers},l.data=d,{url:O(r),options:l}}}},A=function(n){const t=M(n);return{async acceptInvitation(e,s){const a=await t.acceptInvitation(e,s),r=n?.serverIndex??0,o=u["CollectionApi.acceptInvitation"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async changeCollaboratorAccessLevel(e,s,a,r){const o=await t.changeCollaboratorAccessLevel(e,s,a,r),l=n?.serverIndex??0,c=u["CollectionApi.changeCollaboratorAccessLevel"]?.[l]?.url;return(i,d)=>v(o,h,p,n)(i,c||d)},async createCollection(e,s){const a=await t.createCollection(e,s),r=n?.serverIndex??0,o=u["CollectionApi.createCollection"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async deleteCollaborator(e,s,a){const r=await t.deleteCollaborator(e,s,a),o=n?.serverIndex??0,l=u["CollectionApi.deleteCollaborator"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async emptyTrash(e){const s=await t.emptyTrash(e),a=n?.serverIndex??0,r=u["CollectionApi.emptyTrash"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async getChildCollections(e){const s=await t.getChildCollections(e),a=n?.serverIndex??0,r=u["CollectionApi.getChildCollections"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async getCollaborators(e,s){const a=await t.getCollaborators(e,s),r=n?.serverIndex??0,o=u["CollectionApi.getCollaborators"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async getCollection(e,s){const a=await t.getCollection(e,s),r=n?.serverIndex??0,o=u["CollectionApi.getCollection"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async getFeaturedCovers(e){const s=await t.getFeaturedCovers(e),a=n?.serverIndex??0,r=u["CollectionApi.getFeaturedCovers"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async getRootCollections(e){const s=await t.getRootCollections(e),a=n?.serverIndex??0,r=u["CollectionApi.getRootCollections"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async getSystemCollectionStats(e){const s=await t.getSystemCollectionStats(e),a=n?.serverIndex??0,r=u["CollectionApi.getSystemCollectionStats"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async mergeCollections(e,s){const a=await t.mergeCollections(e,s),r=n?.serverIndex??0,o=u["CollectionApi.mergeCollections"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async removeAllEmptyCollections(e){const s=await t.removeAllEmptyCollections(e),a=n?.serverIndex??0,r=u["CollectionApi.removeAllEmptyCollections"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async removeCollection(e,s){const a=await t.removeCollection(e,s),r=n?.serverIndex??0,o=u["CollectionApi.removeCollection"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async removeCollections(e,s){const a=await t.removeCollections(e,s),r=n?.serverIndex??0,o=u["CollectionApi.removeCollections"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async reorderAllCollections(e,s){const a=await t.reorderAllCollections(e,s),r=n?.serverIndex??0,o=u["CollectionApi.reorderAllCollections"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async searchCovers(e,s){const a=await t.searchCovers(e,s),r=n?.serverIndex??0,o=u["CollectionApi.searchCovers"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async shareCollection(e,s,a){const r=await t.shareCollection(e,s,a),o=n?.serverIndex??0,l=u["CollectionApi.shareCollection"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async unshareOrLeaveCollection(e,s){const a=await t.unshareOrLeaveCollection(e,s),r=n?.serverIndex??0,o=u["CollectionApi.unshareOrLeaveCollection"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async updateCollection(e,s,a){const r=await t.updateCollection(e,s,a),o=n?.serverIndex??0,l=u["CollectionApi.updateCollection"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async uploadCollectionCover(e,s,a){const r=await t.uploadCollectionCover(e,s,a),o=n?.serverIndex??0,l=u["CollectionApi.uploadCollectionCover"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)}}},me=function(n,t,e){const s=A(n);return{acceptInvitation(a,r){return s.acceptInvitation(a,r).then(o=>o(e,t))},changeCollaboratorAccessLevel(a,r,o,l){return s.changeCollaboratorAccessLevel(a,r,o,l).then(c=>c(e,t))},createCollection(a,r){return s.createCollection(a,r).then(o=>o(e,t))},deleteCollaborator(a,r,o){return s.deleteCollaborator(a,r,o).then(l=>l(e,t))},emptyTrash(a){return s.emptyTrash(a).then(r=>r(e,t))},getChildCollections(a){return s.getChildCollections(a).then(r=>r(e,t))},getCollaborators(a,r){return s.getCollaborators(a,r).then(o=>o(e,t))},getCollection(a,r){return s.getCollection(a,r).then(o=>o(e,t))},getFeaturedCovers(a){return s.getFeaturedCovers(a).then(r=>r(e,t))},getRootCollections(a){return s.getRootCollections(a).then(r=>r(e,t))},getSystemCollectionStats(a){return s.getSystemCollectionStats(a).then(r=>r(e,t))},mergeCollections(a,r){return s.mergeCollections(a,r).then(o=>o(e,t))},removeAllEmptyCollections(a){return s.removeAllEmptyCollections(a).then(r=>r(e,t))},removeCollection(a,r){return s.removeCollection(a,r).then(o=>o(e,t))},removeCollections(a,r){return s.removeCollections(a,r).then(o=>o(e,t))},reorderAllCollections(a,r){return s.reorderAllCollections(a,r).then(o=>o(e,t))},searchCovers(a,r){return s.searchCovers(a,r).then(o=>o(e,t))},shareCollection(a,r,o){return s.shareCollection(a,r,o).then(l=>l(e,t))},unshareOrLeaveCollection(a,r){return s.unshareOrLeaveCollection(a,r).then(o=>o(e,t))},updateCollection(a,r,o){return s.updateCollection(a,r,o).then(l=>l(e,t))},uploadCollectionCover(a,r,o){return s.uploadCollectionCover(a,r,o).then(l=>l(e,t))}}};let G=class extends S{acceptInvitation(t,e){return A(this.configuration).acceptInvitation(t,e).then(s=>s(this.axios,this.basePath))}changeCollaboratorAccessLevel(t,e,s,a){return A(this.configuration).changeCollaboratorAccessLevel(t,e,s,a).then(r=>r(this.axios,this.basePath))}createCollection(t,e){return A(this.configuration).createCollection(t,e).then(s=>s(this.axios,this.basePath))}deleteCollaborator(t,e,s){return A(this.configuration).deleteCollaborator(t,e,s).then(a=>a(this.axios,this.basePath))}emptyTrash(t){return A(this.configuration).emptyTrash(t).then(e=>e(this.axios,this.basePath))}getChildCollections(t){return A(this.configuration).getChildCollections(t).then(e=>e(this.axios,this.basePath))}getCollaborators(t,e){return A(this.configuration).getCollaborators(t,e).then(s=>s(this.axios,this.basePath))}getCollection(t,e){return A(this.configuration).getCollection(t,e).then(s=>s(this.axios,this.basePath))}getFeaturedCovers(t){return A(this.configuration).getFeaturedCovers(t).then(e=>e(this.axios,this.basePath))}getRootCollections(t){return A(this.configuration).getRootCollections(t).then(e=>e(this.axios,this.basePath))}getSystemCollectionStats(t){return A(this.configuration).getSystemCollectionStats(t).then(e=>e(this.axios,this.basePath))}mergeCollections(t,e){return A(this.configuration).mergeCollections(t,e).then(s=>s(this.axios,this.basePath))}removeAllEmptyCollections(t){return A(this.configuration).removeAllEmptyCollections(t).then(e=>e(this.axios,this.basePath))}removeCollection(t,e){return A(this.configuration).removeCollection(t,e).then(s=>s(this.axios,this.basePath))}removeCollections(t,e){return A(this.configuration).removeCollections(t,e).then(s=>s(this.axios,this.basePath))}reorderAllCollections(t,e){return A(this.configuration).reorderAllCollections(t,e).then(s=>s(this.axios,this.basePath))}searchCovers(t,e){return A(this.configuration).searchCovers(t,e).then(s=>s(this.axios,this.basePath))}shareCollection(t,e,s){return A(this.configuration).shareCollection(t,e,s).then(a=>a(this.axios,this.basePath))}unshareOrLeaveCollection(t,e){return A(this.configuration).unshareOrLeaveCollection(t,e).then(s=>s(this.axios,this.basePath))}updateCollection(t,e,s){return A(this.configuration).updateCollection(t,e,s).then(a=>a(this.axios,this.basePath))}uploadCollectionCover(t,e,s){return A(this.configuration).uploadCollectionCover(t,e,s).then(a=>a(this.axios,this.basePath))}};const D=function(n){return{getFilters:async(t,e,s,a={})=>{P("getFilters","collectionId",t);const r="/rest/v1/filters/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),o=new URL(r,m);let l;n&&(l=n.baseOptions);const c={method:"GET",...l,...a},i={},d={};await C(i,n),e!==void 0&&(d.tagsSort=e),s!==void 0&&(d.search=s),V(o,d);let R=l&&l.headers?l.headers:{};return c.headers={...i,...R,...a.headers},{url:O(o),options:c}}}},j=function(n){const t=D(n);return{async getFilters(e,s,a,r){const o=await t.getFilters(e,s,a,r),l=n?.serverIndex??0,c=u["FilterApi.getFilters"]?.[l]?.url;return(i,d)=>v(o,h,p,n)(i,c||d)}}},Ve=function(n,t,e){const s=j(n);return{getFilters(a,r,o,l){return s.getFilters(a,r,o,l).then(c=>c(e,t))}}};class z extends S{getFilters(t,e,s,a){return j(this.configuration).getFilters(t,e,s,a).then(r=>r(this.axios,this.basePath))}}const Oe={MinusCount:"-count",Id:"_id"},J=function(n){return{getAllHighlights:async(t,e,s={})=>{const a="/rest/v1/highlights",r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"GET",...o,...s},c={},i={};await C(c,n),t!==void 0&&(i.page=t),e!==void 0&&(i.perpage=e),V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},{url:O(r),options:l}},getHighlightsInCollection:async(t,e,s,a={})=>{P("getHighlightsInCollection","collectionId",t);const r="/rest/v1/highlights/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),o=new URL(r,m);let l;n&&(l=n.baseOptions);const c={method:"GET",...l,...a},i={},d={};await C(i,n),e!==void 0&&(d.page=e),s!==void 0&&(d.perpage=s),V(o,d);let R=l&&l.headers?l.headers:{};return c.headers={...i,...R,...a.headers},{url:O(o),options:c}},getRaindrop:async(t,e={})=>{P("getRaindrop","id",t);const s="/rest/v1/raindrop/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},updateRaindrop:async(t,e,s={})=>{P("updateRaindrop","id",t);const a="/rest/v1/raindrop/{id}".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={};await C(c,n),c["Content-Type"]="application/json",V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},l.data=y(e,l,n),{url:O(r),options:l}}}},g=function(n){const t=J(n);return{async getAllHighlights(e,s,a){const r=await t.getAllHighlights(e,s,a),o=n?.serverIndex??0,l=u["HighlightApi.getAllHighlights"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async getHighlightsInCollection(e,s,a,r){const o=await t.getHighlightsInCollection(e,s,a,r),l=n?.serverIndex??0,c=u["HighlightApi.getHighlightsInCollection"]?.[l]?.url;return(i,d)=>v(o,h,p,n)(i,c||d)},async getRaindrop(e,s){const a=await t.getRaindrop(e,s),r=n?.serverIndex??0,o=u["HighlightApi.getRaindrop"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async updateRaindrop(e,s,a){const r=await t.updateRaindrop(e,s,a),o=n?.serverIndex??0,l=u["HighlightApi.updateRaindrop"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)}}},ve=function(n,t,e){const s=g(n);return{getAllHighlights(a,r,o){return s.getAllHighlights(a,r,o).then(l=>l(e,t))},getHighlightsInCollection(a,r,o,l){return s.getHighlightsInCollection(a,r,o,l).then(c=>c(e,t))},getRaindrop(a,r){return s.getRaindrop(a,r).then(o=>o(e,t))},updateRaindrop(a,r,o){return s.updateRaindrop(a,r,o).then(l=>l(e,t))}}};class K extends S{getAllHighlights(t,e,s){return g(this.configuration).getAllHighlights(t,e,s).then(a=>a(this.axios,this.basePath))}getHighlightsInCollection(t,e,s,a){return g(this.configuration).getHighlightsInCollection(t,e,s,a).then(r=>r(this.axios,this.basePath))}getRaindrop(t,e){return g(this.configuration).getRaindrop(t,e).then(s=>s(this.axios,this.basePath))}updateRaindrop(t,e,s){return g(this.configuration).updateRaindrop(t,e,s).then(a=>a(this.axios,this.basePath))}}const Y=function(n){return{checkURLsExist:async(t,e={})=>{const s="/rest/v1/import/url/exists",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},importHTMLBookmarkFile:async(t,e={})=>{const s="/rest/v1/import/file",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={},i=new(n&&n.formDataCtor||FormData);await C(l,n),t!==void 0&&i.append("import",t),l["Content-Type"]="multipart/form-data",V(a,c);let d=r&&r.headers?r.headers:{};return o.headers={...l,...d,...e.headers},o.data=i,{url:O(a),options:o}},parseURL:async(t,e={})=>{const s="/rest/v1/import/url/parse",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),t!==void 0&&(c.url=t),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}}}},I=function(n){const t=Y(n);return{async checkURLsExist(e,s){const a=await t.checkURLsExist(e,s),r=n?.serverIndex??0,o=u["ImportApi.checkURLsExist"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async importHTMLBookmarkFile(e,s){const a=await t.importHTMLBookmarkFile(e,s),r=n?.serverIndex??0,o=u["ImportApi.importHTMLBookmarkFile"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async parseURL(e,s){const a=await t.parseURL(e,s),r=n?.serverIndex??0,o=u["ImportApi.parseURL"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)}}},Ce=function(n,t,e){const s=I(n);return{checkURLsExist(a,r){return s.checkURLsExist(a,r).then(o=>o(e,t))},importHTMLBookmarkFile(a,r){return s.importHTMLBookmarkFile(a,r).then(o=>o(e,t))},parseURL(a,r){return s.parseURL(a,r).then(o=>o(e,t))}}};class W extends S{checkURLsExist(t,e){return I(this.configuration).checkURLsExist(t,e).then(s=>s(this.axios,this.basePath))}importHTMLBookmarkFile(t,e){return I(this.configuration).importHTMLBookmarkFile(t,e).then(s=>s(this.axios,this.basePath))}parseURL(t,e){return I(this.configuration).parseURL(t,e).then(s=>s(this.axios,this.basePath))}}const X=function(n){return{createRaindrop:async(t,e={})=>{const s="/rest/v1/raindrop",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},createRaindrops:async(t,e={})=>{const s="/rest/v1/raindrops",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},getPermanentCopy:async(t,e={})=>{P("getPermanentCopy","id",t);const s="/rest/v1/raindrop/{id}/cache".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},getRaindrop:async(t,e={})=>{P("getRaindrop","id",t);const s="/rest/v1/raindrop/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},getRaindrops:async(t,e,s,a,r,o={})=>{P("getRaindrops","collectionId",t);const l="/rest/v1/raindrops/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),c=new URL(l,m);let i;n&&(i=n.baseOptions);const d={method:"GET",...i,...o},R={},x={};await C(R,n),e!==void 0&&(x.sort=e),s!==void 0&&(x.perpage=s),a!==void 0&&(x.page=a),r!==void 0&&(x.search=r),V(c,x);let F=i&&i.headers?i.headers:{};return d.headers={...R,...F,...o.headers},{url:O(c),options:d}},removeRaindrop:async(t,e={})=>{P("removeRaindrop","id",t);const s="/rest/v1/raindrop/{id}".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"DELETE",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},removeRaindrops:async(t,e,s,a={})=>{P("removeRaindrops","collectionId",t);const r="/rest/v1/raindrops/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),o=new URL(r,m);let l;n&&(l=n.baseOptions);const c={method:"DELETE",...l,...a},i={},d={};await C(i,n),e!==void 0&&(d.search=e),i["Content-Type"]="application/json",V(o,d);let R=l&&l.headers?l.headers:{};return c.headers={...i,...R,...a.headers},c.data=y(s,c,n),{url:O(o),options:c}},suggestForExistingBookmark:async(t,e={})=>{P("suggestForExistingBookmark","id",t);const s="/rest/v1/raindrop/{id}/suggest".replace("{id}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},suggestForNewBookmark:async(t,e={})=>{const s="/rest/v1/raindrop/suggest",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"POST",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}},updateRaindrop:async(t,e,s={})=>{P("updateRaindrop","id",t);const a="/rest/v1/raindrop/{id}".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={};await C(c,n),c["Content-Type"]="application/json",V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},l.data=y(e,l,n),{url:O(r),options:l}},updateRaindrops:async(t,e,s={})=>{P("updateRaindrops","collectionId",t);const a="/rest/v1/raindrops/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={};await C(c,n),c["Content-Type"]="application/json",V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},l.data=y(e,l,n),{url:O(r),options:l}},uploadFile:async(t,e,s={})=>{const a="/rest/v1/raindrop/file",r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={},d=new(n&&n.formDataCtor||FormData);await C(c,n),t!==void 0&&d.append("file",t),e!==void 0&&d.append("collectionId",e),c["Content-Type"]="multipart/form-data",V(r,i);let R=o&&o.headers?o.headers:{};return l.headers={...c,...R,...s.headers},l.data=d,{url:O(r),options:l}},uploadRaindropCover:async(t,e,s={})=>{P("uploadRaindropCover","id",t);const a="/rest/v1/raindrop/{id}/cover".replace("{id}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={},d=new(n&&n.formDataCtor||FormData);await C(c,n),e!==void 0&&d.append("cover",e),c["Content-Type"]="multipart/form-data",V(r,i);let R=o&&o.headers?o.headers:{};return l.headers={...c,...R,...s.headers},l.data=d,{url:O(r),options:l}}}},b=function(n){const t=X(n);return{async createRaindrop(e,s){const a=await t.createRaindrop(e,s),r=n?.serverIndex??0,o=u["RaindropApi.createRaindrop"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async createRaindrops(e,s){const a=await t.createRaindrops(e,s),r=n?.serverIndex??0,o=u["RaindropApi.createRaindrops"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async getPermanentCopy(e,s){const a=await t.getPermanentCopy(e,s),r=n?.serverIndex??0,o=u["RaindropApi.getPermanentCopy"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async getRaindrop(e,s){const a=await t.getRaindrop(e,s),r=n?.serverIndex??0,o=u["RaindropApi.getRaindrop"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async getRaindrops(e,s,a,r,o,l){const c=await t.getRaindrops(e,s,a,r,o,l),i=n?.serverIndex??0,d=u["RaindropApi.getRaindrops"]?.[i]?.url;return(R,x)=>v(c,h,p,n)(R,d||x)},async removeRaindrop(e,s){const a=await t.removeRaindrop(e,s),r=n?.serverIndex??0,o=u["RaindropApi.removeRaindrop"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async removeRaindrops(e,s,a,r){const o=await t.removeRaindrops(e,s,a,r),l=n?.serverIndex??0,c=u["RaindropApi.removeRaindrops"]?.[l]?.url;return(i,d)=>v(o,h,p,n)(i,c||d)},async suggestForExistingBookmark(e,s){const a=await t.suggestForExistingBookmark(e,s),r=n?.serverIndex??0,o=u["RaindropApi.suggestForExistingBookmark"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async suggestForNewBookmark(e,s){const a=await t.suggestForNewBookmark(e,s),r=n?.serverIndex??0,o=u["RaindropApi.suggestForNewBookmark"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async updateRaindrop(e,s,a){const r=await t.updateRaindrop(e,s,a),o=n?.serverIndex??0,l=u["RaindropApi.updateRaindrop"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async updateRaindrops(e,s,a){const r=await t.updateRaindrops(e,s,a),o=n?.serverIndex??0,l=u["RaindropApi.updateRaindrops"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async uploadFile(e,s,a){const r=await t.uploadFile(e,s,a),o=n?.serverIndex??0,l=u["RaindropApi.uploadFile"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async uploadRaindropCover(e,s,a){const r=await t.uploadRaindropCover(e,s,a),o=n?.serverIndex??0,l=u["RaindropApi.uploadRaindropCover"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)}}},Pe=function(n,t,e){const s=b(n);return{createRaindrop(a,r){return s.createRaindrop(a,r).then(o=>o(e,t))},createRaindrops(a,r){return s.createRaindrops(a,r).then(o=>o(e,t))},getPermanentCopy(a,r){return s.getPermanentCopy(a,r).then(o=>o(e,t))},getRaindrop(a,r){return s.getRaindrop(a,r).then(o=>o(e,t))},getRaindrops(a,r,o,l,c,i){return s.getRaindrops(a,r,o,l,c,i).then(d=>d(e,t))},removeRaindrop(a,r){return s.removeRaindrop(a,r).then(o=>o(e,t))},removeRaindrops(a,r,o,l){return s.removeRaindrops(a,r,o,l).then(c=>c(e,t))},suggestForExistingBookmark(a,r){return s.suggestForExistingBookmark(a,r).then(o=>o(e,t))},suggestForNewBookmark(a,r){return s.suggestForNewBookmark(a,r).then(o=>o(e,t))},updateRaindrop(a,r,o){return s.updateRaindrop(a,r,o).then(l=>l(e,t))},updateRaindrops(a,r,o){return s.updateRaindrops(a,r,o).then(l=>l(e,t))},uploadFile(a,r,o){return s.uploadFile(a,r,o).then(l=>l(e,t))},uploadRaindropCover(a,r,o){return s.uploadRaindropCover(a,r,o).then(l=>l(e,t))}}};let Z=class extends S{createRaindrop(t,e){return b(this.configuration).createRaindrop(t,e).then(s=>s(this.axios,this.basePath))}createRaindrops(t,e){return b(this.configuration).createRaindrops(t,e).then(s=>s(this.axios,this.basePath))}getPermanentCopy(t,e){return b(this.configuration).getPermanentCopy(t,e).then(s=>s(this.axios,this.basePath))}getRaindrop(t,e){return b(this.configuration).getRaindrop(t,e).then(s=>s(this.axios,this.basePath))}getRaindrops(t,e,s,a,r,o){return b(this.configuration).getRaindrops(t,e,s,a,r,o).then(l=>l(this.axios,this.basePath))}removeRaindrop(t,e){return b(this.configuration).removeRaindrop(t,e).then(s=>s(this.axios,this.basePath))}removeRaindrops(t,e,s,a){return b(this.configuration).removeRaindrops(t,e,s,a).then(r=>r(this.axios,this.basePath))}suggestForExistingBookmark(t,e){return b(this.configuration).suggestForExistingBookmark(t,e).then(s=>s(this.axios,this.basePath))}suggestForNewBookmark(t,e){return b(this.configuration).suggestForNewBookmark(t,e).then(s=>s(this.axios,this.basePath))}updateRaindrop(t,e,s){return b(this.configuration).updateRaindrop(t,e,s).then(a=>a(this.axios,this.basePath))}updateRaindrops(t,e,s){return b(this.configuration).updateRaindrops(t,e,s).then(a=>a(this.axios,this.basePath))}uploadFile(t,e,s){return b(this.configuration).uploadFile(t,e,s).then(a=>a(this.axios,this.basePath))}uploadRaindropCover(t,e,s){return b(this.configuration).uploadRaindropCover(t,e,s).then(a=>a(this.axios,this.basePath))}};const f=function(n){return{getTagsInCollection:async(t,e={})=>{const s="/rest/v1/tags/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},removeTagsFromCollection:async(t,e,s={})=>{const a="/rest/v1/tags/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"DELETE",...o,...s},c={},i={};await C(c,n),c["Content-Type"]="application/json",V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},l.data=y(e,l,n),{url:O(r),options:l}},renameOrMergeTags:async(t,e,s={})=>{const a="/rest/v1/tags/{collectionId}".replace("{collectionId}",encodeURIComponent(String(t))),r=new URL(a,m);let o;n&&(o=n.baseOptions);const l={method:"PUT",...o,...s},c={},i={};await C(c,n),c["Content-Type"]="application/json",V(r,i);let d=o&&o.headers?o.headers:{};return l.headers={...c,...d,...s.headers},l.data=y(e,l,n),{url:O(r),options:l}}}},T=function(n){const t=f(n);return{async getTagsInCollection(e,s){const a=await t.getTagsInCollection(e,s),r=n?.serverIndex??0,o=u["TagApi.getTagsInCollection"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async removeTagsFromCollection(e,s,a){const r=await t.removeTagsFromCollection(e,s,a),o=n?.serverIndex??0,l=u["TagApi.removeTagsFromCollection"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)},async renameOrMergeTags(e,s,a){const r=await t.renameOrMergeTags(e,s,a),o=n?.serverIndex??0,l=u["TagApi.renameOrMergeTags"]?.[o]?.url;return(c,i)=>v(r,h,p,n)(c,l||i)}}},Re=function(n,t,e){const s=T(n);return{getTagsInCollection(a,r){return s.getTagsInCollection(a,r).then(o=>o(e,t))},removeTagsFromCollection(a,r,o){return s.removeTagsFromCollection(a,r,o).then(l=>l(e,t))},renameOrMergeTags(a,r,o){return s.renameOrMergeTags(a,r,o).then(l=>l(e,t))}}};class ee extends S{getTagsInCollection(t,e){return T(this.configuration).getTagsInCollection(t,e).then(s=>s(this.axios,this.basePath))}removeTagsFromCollection(t,e,s){return T(this.configuration).removeTagsFromCollection(t,e,s).then(a=>a(this.axios,this.basePath))}renameOrMergeTags(t,e,s){return T(this.configuration).renameOrMergeTags(t,e,s).then(a=>a(this.axios,this.basePath))}}const re=function(n){return{connectSocialNetworkProvider:async(t,e={})=>{P("connectSocialNetworkProvider","provider",t);const s="/rest/v1/user/connect/{provider}".replace("{provider}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},disconnectSocialNetworkProvider:async(t,e={})=>{P("disconnectSocialNetworkProvider","provider",t);const s="/rest/v1/user/connect/{provider}/revoke".replace("{provider}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},getCurrentUser:async(t={})=>{const e="/rest/v1/user",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"GET",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},getPublicUserByName:async(t,e={})=>{P("getPublicUserByName","name",t);const s="/rest/v1/user/{name}".replace("{name}",encodeURIComponent(String(t))),a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"GET",...r,...e},l={},c={};await C(l,n),V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},{url:O(a),options:o}},getSystemCollectionStats:async(t={})=>{const e="/rest/v1/user/stats",s=new URL(e,m);let a;n&&(a=n.baseOptions);const r={method:"GET",...a,...t},o={},l={};await C(o,n),V(s,l);let c=a&&a.headers?a.headers:{};return r.headers={...o,...c,...t.headers},{url:O(s),options:r}},updateCurrentUser:async(t,e={})=>{const s="/rest/v1/user",a=new URL(s,m);let r;n&&(r=n.baseOptions);const o={method:"PUT",...r,...e},l={},c={};await C(l,n),l["Content-Type"]="application/json",V(a,c);let i=r&&r.headers?r.headers:{};return o.headers={...l,...i,...e.headers},o.data=y(t,o,n),{url:O(a),options:o}}}},w=function(n){const t=re(n);return{async connectSocialNetworkProvider(e,s){const a=await t.connectSocialNetworkProvider(e,s),r=n?.serverIndex??0,o=u["UserApi.connectSocialNetworkProvider"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async disconnectSocialNetworkProvider(e,s){const a=await t.disconnectSocialNetworkProvider(e,s),r=n?.serverIndex??0,o=u["UserApi.disconnectSocialNetworkProvider"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async getCurrentUser(e){const s=await t.getCurrentUser(e),a=n?.serverIndex??0,r=u["UserApi.getCurrentUser"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async getPublicUserByName(e,s){const a=await t.getPublicUserByName(e,s),r=n?.serverIndex??0,o=u["UserApi.getPublicUserByName"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)},async getSystemCollectionStats(e){const s=await t.getSystemCollectionStats(e),a=n?.serverIndex??0,r=u["UserApi.getSystemCollectionStats"]?.[a]?.url;return(o,l)=>v(s,h,p,n)(o,r||l)},async updateCurrentUser(e,s){const a=await t.updateCurrentUser(e,s),r=n?.serverIndex??0,o=u["UserApi.updateCurrentUser"]?.[r]?.url;return(l,c)=>v(a,h,p,n)(l,o||c)}}},Ae=function(n,t,e){const s=w(n);return{connectSocialNetworkProvider(a,r){return s.connectSocialNetworkProvider(a,r).then(o=>o(e,t))},disconnectSocialNetworkProvider(a,r){return s.disconnectSocialNetworkProvider(a,r).then(o=>o(e,t))},getCurrentUser(a){return s.getCurrentUser(a).then(r=>r(e,t))},getPublicUserByName(a,r){return s.getPublicUserByName(a,r).then(o=>o(e,t))},getSystemCollectionStats(a){return s.getSystemCollectionStats(a).then(r=>r(e,t))},updateCurrentUser(a,r){return s.updateCurrentUser(a,r).then(o=>o(e,t))}}};class te extends S{connectSocialNetworkProvider(t,e){return w(this.configuration).connectSocialNetworkProvider(t,e).then(s=>s(this.axios,this.basePath))}disconnectSocialNetworkProvider(t,e){return w(this.configuration).disconnectSocialNetworkProvider(t,e).then(s=>s(this.axios,this.basePath))}getCurrentUser(t){return w(this.configuration).getCurrentUser(t).then(e=>e(this.axios,this.basePath))}getPublicUserByName(t,e){return w(this.configuration).getPublicUserByName(t,e).then(s=>s(this.axios,this.basePath))}getSystemCollectionStats(t){return w(this.configuration).getSystemCollectionStats(t).then(e=>e(this.axios,this.basePath))}updateCurrentUser(t,e){return w(this.configuration).updateCurrentUser(t,e).then(s=>s(this.axios,this.basePath))}}const ye={Facebook:"facebook",Google:"google",Twitter:"twitter",Vkontate:"vkontate",Dropbox:"dropbox",Gdrive:"gdrive"},be={Facebook:"facebook",Google:"google",Twitter:"twitter",Vkontate:"vkontate",Dropbox:"dropbox",Gdrive:"gdrive"};class ae{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(t={}){this.apiKey=t.apiKey,this.username=t.username,this.password=t.password,this.accessToken=t.accessToken,this.basePath=t.basePath,this.serverIndex=t.serverIndex,this.baseOptions=t.baseOptions,this.formDataCtor=t.formDataCtor}isJsonMime(t){const e=new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$","i");return t!==null&&(e.test(t)||t.toLowerCase()==="application/json-patch+json")}}const xe=Object.freeze(Object.defineProperty({__proto__:null,AuthenticationApi:_,AuthenticationApiAxiosParamCreator:$,AuthenticationApiFactory:ue,AuthenticationApiFp:B,CollectionApi:G,CollectionApiAxiosParamCreator:M,CollectionApiFactory:me,CollectionApiFp:A,CollectionRefRefEnum:de,Configuration:ae,ConnectSocialNetworkProviderProviderEnum:ye,DisconnectSocialNetworkProviderProviderEnum:be,FilterApi:z,FilterApiAxiosParamCreator:D,FilterApiFactory:Ve,FilterApiFp:j,GetFiltersTagsSortEnum:Oe,HighlightApi:K,HighlightApiAxiosParamCreator:J,HighlightApiFactory:ve,HighlightApiFp:g,ImportApi:W,ImportApiAxiosParamCreator:Y,ImportApiFactory:Ce,ImportApiFp:I,ObtainTokenGrantTypeEnum:Q,RaindropApi:Z,RaindropApiAxiosParamCreator:X,RaindropApiFactory:Pe,RaindropApiFp:b,RefreshTokenGrantTypeEnum:N,Role:he,TagApi:ee,TagApiAxiosParamCreator:f,TagApiFactory:Re,TagApiFp:T,TokenResponseTokenTypeEnum:pe,UserApi:te,UserApiAxiosParamCreator:re,UserApiFactory:Ae,UserApiFp:w},Symbol.toStringTag,{value:"Module"}));class we extends _{async exchangeToken(t,e){return this.getOrRefreshToken({...t,grant_type:Q.AuthorizationCode},e).then(s=>{if(q(s.data))throw new Error(`Request failed with error: ${s.data.errorMessage}`);return s})}async refreshToken(t,e){return this.getOrRefreshToken({...t,grant_type:N.RefreshToken},e).then(s=>{if(q(s.data))throw new Error(`Request failed with error: ${s.data.errorMessage}`);return s})}}function q(n){return"result"in n&&n.result===!1}class k{_data;_parent=null;_children=[];constructor(t,e){this._data=t,e&&this.addChildren(...e)}get data(){return this._data}get parent(){return this._parent}set parent(t){this._parent=t,t._children.push(this)}isRoot(){return this._parent===null}get children(){return this._children}addChildren(...t){this._children.push(...t);for(const e of t)e._parent=this}traverse(t){t(this);for(const e of this.children)e.traverse(t)}}function oe(n,t,e){const s=e.filter(a=>a.parent===t);for(const a of s){const r=a.toNode();oe(r,a.id,e),n.addChildren(r)}}function se(n,t){const e=new k(n);return oe(e,null,t),e}const Se=Object.freeze(Object.defineProperty({__proto__:null,TreeNode:k,makeTree:se},Symbol.toStringTag,{value:"Module"}));class ge extends G{async getCollectionTree(){const[{data:t},{data:e}]=await Promise.all([this.getRootCollections(),this.getChildCollections()]),s=t.items.map(c=>({data:c,id:c._id.toString(),parent:null,toNode(){return new k(this.data)}})),a=e.items.map(c=>({data:c,id:c._id.toString(),parent:c.parent?.$id.toString()||null,toNode(){return new k(this.data)}})),r=s.concat(a);r.sort((c,i)=>c.data.title.localeCompare(i.data.title)||c.data._id-i.data._id);const o=r.filter((c,i,d)=>d.findIndex(R=>R.id===c.id)===i);return se(null,o)}}class Ue extends Z{async getAllRaindrops(t,e,s){const a=t??0,r=e?.sort??"",o=e?.pageSize??50,l=e?.search??"",{data:c}=await this.getRaindrops(a,r,o,0,l,s),i=c.count,d=Math.ceil(i/o),R=Array.from(Array(d).keys());R.shift();const x=await Promise.all(R.map(L=>this.getRaindrops(a,r,o,L,l,s).then(({data:le})=>le))),F=[...c.items];for(const L of x)F.push(...L.items);return F}}class ne{client;configuration;auth;user;collection;filter;highlight;import;raindrop;tag;constructor(t,e){this.client=e??h,this.configuration=t??new ae,this.auth=new we(t,void 0,this.client),this.collection=new ge(t,void 0,this.client),this.filter=new z(t,void 0,this.client),this.highlight=new K(t,void 0,this.client),this.import=new W(t,void 0,this.client),this.raindrop=new Ue(t,void 0,this.client),this.tag=new ee(t,void 0,this.client),this.user=new te(t,void 0,this.client)}}const Ie=Object.freeze(Object.defineProperty({__proto__:null,Raindrop:ne},Symbol.toStringTag,{value:"Module"})),Te=Object.freeze(Object.defineProperty({__proto__:null,tree:Se},Symbol.toStringTag,{value:"Module"})),Fe=ne;exports.client=Ie;exports.default=Fe;exports.generated=xe;exports.utils=Te;
|
|
1
|
+
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(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},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require("axios");l=c(l);var u=`https://api.raindrop.io`.replace(/\/+$/,``),d=class{basePath;axios;configuration;constructor(e,t=u,n=l.default){this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath??t)}},f=class extends Error{field;constructor(e,t){super(t),this.field=e,this.name=`RequiredError`}},p={},m=`https://example.com`,h=function(e,t,n){if(n==null)throw new f(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},g=async function(e,t){t&&t.accessToken&&(e.Authorization=`Bearer `+(typeof t.accessToken==`function`?await t.accessToken():await t.accessToken))};function _(e,t,n=``){t!=null&&(typeof t==`object`?Array.isArray(t)?t.forEach(t=>_(e,t,n)):Object.keys(t).forEach(r=>_(e,t[r],`${n}${n===``?``:`.`}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}var v=function(e,...t){let n=new URLSearchParams(e.search);_(n,t),e.search=n.toString()},y=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?{}:b(e)):e||``};function b(e){if(typeof Set>`u`||typeof Map>`u`||typeof e!=`object`||!e)return e;if(e instanceof Set)return Array.from(e).map(e=>b(e));if(e instanceof Map){let t=[];return e.forEach((e,n)=>{t.push([n,b(e)])}),x(t)}return Array.isArray(e)?e.map(e=>b(e)):x(ee(e).map(([e,t])=>[e,b(t)]))}function ee(e){return Object.keys(e).map(t=>[t,e[t]])}function x(e){return[...e].reduce((e,[t,n])=>(e[t]=n,e),{})}var S=function(e){return e.pathname+e.search+e.hash},C=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)}},te={Collections:`collections`},w={AuthorizationCode:`authorization_code`},T={RefreshToken:`refresh_token`},ne={Member:`member`,Viewer:`viewer`},re={Bearer:`Bearer`},E=function(e){return{authorize:async(t,n,r={})=>{h(`authorize`,`redirectUri`,t),h(`authorize`,`clientId`,n);let i=new URL(`/v1/oauth/authorize`,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...r},s={},c={};t!==void 0&&(c.redirect_uri=t),n!==void 0&&(c.client_id=n),v(i,c);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...r.headers},{url:S(i),options:o}},getOrRefreshToken:async(t,n={})=>{let r=new URL(`/v1/oauth/access_token`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}}}},D=function(e){let t=E(e);return{async authorize(n,r,i){let a=await t.authorize(n,r,i),o=e?.serverIndex??0,s=p[`AuthenticationApi.authorize`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async getOrRefreshToken(n,r){let i=await t.getOrRefreshToken(n,r),a=e?.serverIndex??0,o=p[`AuthenticationApi.getOrRefreshToken`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)}}},ie=function(e,t,n){let r=D(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))}}},O=class extends d{authorize(e,t,n){return D(this.configuration).authorize(e,t,n).then(e=>e(this.axios,this.basePath))}getOrRefreshToken(e,t){return D(this.configuration).getOrRefreshToken(e,t).then(e=>e(this.axios,this.basePath))}},k=function(e){return{acceptInvitation:async(t,n={})=>{h(`acceptInvitation`,`id`,t);let r=`/rest/v1/collection/{id}/join`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},changeCollaboratorAccessLevel:async(t,n,r,i={})=>{h(`changeCollaboratorAccessLevel`,`userId`,t),h(`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,m),s;e&&(s=e.baseOptions);let c={method:`PUT`,...s,...i},l={};await g(l,e),l[`Content-Type`]=`application/json`,v(o,{});let u=s&&s.headers?s.headers:{};return c.headers={...l,...u,...i.headers},c.data=y(r,c,e),{url:S(o),options:c}},createCollection:async(t,n={})=>{let r=new URL(`/rest/v1/collection`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},deleteCollaborator:async(t,n,r={})=>{h(`deleteCollaborator`,`userId`,t),h(`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,m),o;e&&(o=e.baseOptions);let s={method:`DELETE`,...o,...r},c={};await g(c,e),v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},{url:S(a),options:s}},emptyTrash:async(t={})=>{let n=new URL(`/rest/v1/collection/-99`,m),r;e&&(r=e.baseOptions);let i={method:`DELETE`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getChildCollections:async(t={})=>{let n=new URL(`/rest/v1/collections/childrens`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getCollaborators:async(t,n={})=>{h(`getCollaborators`,`id`,t);let r=`/rest/v1/collection/{id}/sharing`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getCollection:async(t,n={})=>{h(`getCollection`,`id`,t);let r=`/rest/v1/collection/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getFeaturedCovers:async(t={})=>{let n=new URL(`/rest/v1/collections/covers`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getRootCollections:async(t={})=>{let n=new URL(`/rest/v1/collections`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getSystemCollectionStats:async(t={})=>{let n=new URL(`/rest/v1/user/stats`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},mergeCollections:async(t,n={})=>{let r=new URL(`/rest/v1/collections/merge`,m),i;e&&(i=e.baseOptions);let a={method:`PUT`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},removeAllEmptyCollections:async(t={})=>{let n=new URL(`/rest/v1/collections/clean`,m),r;e&&(r=e.baseOptions);let i={method:`PUT`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},removeCollection:async(t,n={})=>{h(`removeCollection`,`id`,t);let r=`/rest/v1/collection/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},removeCollections:async(t,n={})=>{let r=new URL(`/rest/v1/collections`,m),i;e&&(i=e.baseOptions);let a={method:`DELETE`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},reorderAllCollections:async(t,n={})=>{let r=new URL(`/rest/v1/collections`,m),i;e&&(i=e.baseOptions);let a={method:`PUT`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},searchCovers:async(t,n={})=>{h(`searchCovers`,`text`,t);let r=`/rest/v1/collections/covers/{text}`.replace(`{text}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},shareCollection:async(t,n,r={})=>{h(`shareCollection`,`id`,t);let i=`/rest/v1/collection/{id}/sharing`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`POST`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},unshareOrLeaveCollection:async(t,n={})=>{h(`unshareOrLeaveCollection`,`id`,t);let r=`/rest/v1/collection/{id}/sharing`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},updateCollection:async(t,n,r={})=>{h(`updateCollection`,`id`,t);let i=`/rest/v1/collection/{id}`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},uploadCollectionCover:async(t,n,r={})=>{h(`uploadCollectionCover`,`id`,t);let i=`/rest/v1/collection/{id}/cover`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={},l={},u=new(e&&e.formDataCtor||FormData);await g(c,e),n!==void 0&&u.append(`cover`,n),c[`Content-Type`]=`multipart/form-data`,v(a,l);let d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},s.data=u,{url:S(a),options:s}}}},A=function(e){let t=k(e);return{async acceptInvitation(n,r){let i=await t.acceptInvitation(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.acceptInvitation`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async changeCollaboratorAccessLevel(n,r,i,a){let o=await t.changeCollaboratorAccessLevel(n,r,i,a),s=e?.serverIndex??0,c=p[`CollectionApi.changeCollaboratorAccessLevel`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)},async createCollection(n,r){let i=await t.createCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.createCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async deleteCollaborator(n,r,i){let a=await t.deleteCollaborator(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.deleteCollaborator`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async emptyTrash(n){let r=await t.emptyTrash(n),i=e?.serverIndex??0,a=p[`CollectionApi.emptyTrash`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getChildCollections(n){let r=await t.getChildCollections(n),i=e?.serverIndex??0,a=p[`CollectionApi.getChildCollections`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getCollaborators(n,r){let i=await t.getCollaborators(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.getCollaborators`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getCollection(n,r){let i=await t.getCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.getCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getFeaturedCovers(n){let r=await t.getFeaturedCovers(n),i=e?.serverIndex??0,a=p[`CollectionApi.getFeaturedCovers`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getRootCollections(n){let r=await t.getRootCollections(n),i=e?.serverIndex??0,a=p[`CollectionApi.getRootCollections`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getSystemCollectionStats(n){let r=await t.getSystemCollectionStats(n),i=e?.serverIndex??0,a=p[`CollectionApi.getSystemCollectionStats`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async mergeCollections(n,r){let i=await t.mergeCollections(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.mergeCollections`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeAllEmptyCollections(n){let r=await t.removeAllEmptyCollections(n),i=e?.serverIndex??0,a=p[`CollectionApi.removeAllEmptyCollections`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async removeCollection(n,r){let i=await t.removeCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.removeCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeCollections(n,r){let i=await t.removeCollections(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.removeCollections`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async reorderAllCollections(n,r){let i=await t.reorderAllCollections(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.reorderAllCollections`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async searchCovers(n,r){let i=await t.searchCovers(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.searchCovers`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async shareCollection(n,r,i){let a=await t.shareCollection(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.shareCollection`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async unshareOrLeaveCollection(n,r){let i=await t.unshareOrLeaveCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.unshareOrLeaveCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async updateCollection(n,r,i){let a=await t.updateCollection(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.updateCollection`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async uploadCollectionCover(n,r,i){let a=await t.uploadCollectionCover(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.uploadCollectionCover`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},ae=function(e,t,n){let r=A(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))}}},j=class extends d{acceptInvitation(e,t){return A(this.configuration).acceptInvitation(e,t).then(e=>e(this.axios,this.basePath))}changeCollaboratorAccessLevel(e,t,n,r){return A(this.configuration).changeCollaboratorAccessLevel(e,t,n,r).then(e=>e(this.axios,this.basePath))}createCollection(e,t){return A(this.configuration).createCollection(e,t).then(e=>e(this.axios,this.basePath))}deleteCollaborator(e,t,n){return A(this.configuration).deleteCollaborator(e,t,n).then(e=>e(this.axios,this.basePath))}emptyTrash(e){return A(this.configuration).emptyTrash(e).then(e=>e(this.axios,this.basePath))}getChildCollections(e){return A(this.configuration).getChildCollections(e).then(e=>e(this.axios,this.basePath))}getCollaborators(e,t){return A(this.configuration).getCollaborators(e,t).then(e=>e(this.axios,this.basePath))}getCollection(e,t){return A(this.configuration).getCollection(e,t).then(e=>e(this.axios,this.basePath))}getFeaturedCovers(e){return A(this.configuration).getFeaturedCovers(e).then(e=>e(this.axios,this.basePath))}getRootCollections(e){return A(this.configuration).getRootCollections(e).then(e=>e(this.axios,this.basePath))}getSystemCollectionStats(e){return A(this.configuration).getSystemCollectionStats(e).then(e=>e(this.axios,this.basePath))}mergeCollections(e,t){return A(this.configuration).mergeCollections(e,t).then(e=>e(this.axios,this.basePath))}removeAllEmptyCollections(e){return A(this.configuration).removeAllEmptyCollections(e).then(e=>e(this.axios,this.basePath))}removeCollection(e,t){return A(this.configuration).removeCollection(e,t).then(e=>e(this.axios,this.basePath))}removeCollections(e,t){return A(this.configuration).removeCollections(e,t).then(e=>e(this.axios,this.basePath))}reorderAllCollections(e,t){return A(this.configuration).reorderAllCollections(e,t).then(e=>e(this.axios,this.basePath))}searchCovers(e,t){return A(this.configuration).searchCovers(e,t).then(e=>e(this.axios,this.basePath))}shareCollection(e,t,n){return A(this.configuration).shareCollection(e,t,n).then(e=>e(this.axios,this.basePath))}unshareOrLeaveCollection(e,t){return A(this.configuration).unshareOrLeaveCollection(e,t).then(e=>e(this.axios,this.basePath))}updateCollection(e,t,n){return A(this.configuration).updateCollection(e,t,n).then(e=>e(this.axios,this.basePath))}uploadCollectionCover(e,t,n){return A(this.configuration).uploadCollectionCover(e,t,n).then(e=>e(this.axios,this.basePath))}},M=function(e){return{getFilters:async(t,n,r,i={})=>{h(`getFilters`,`collectionId`,t);let a=`/rest/v1/filters/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),o=new URL(a,m),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l={},u={};await g(l,e),n!==void 0&&(u.tagsSort=n),r!==void 0&&(u.search=r),v(o,u);let d=s&&s.headers?s.headers:{};return c.headers={...l,...d,...i.headers},{url:S(o),options:c}}}},N=function(e){let t=M(e);return{async getFilters(n,r,i,a){let o=await t.getFilters(n,r,i,a),s=e?.serverIndex??0,c=p[`FilterApi.getFilters`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)}}},oe=function(e,t,n){let r=N(e);return{getFilters(e,i,a,o){return r.getFilters(e,i,a,o).then(e=>e(n,t))}}},P=class extends d{getFilters(e,t,n,r){return N(this.configuration).getFilters(e,t,n,r).then(e=>e(this.axios,this.basePath))}},se={MinusCount:`-count`,Id:`_id`},F=function(e){return{getAllHighlights:async(t,n,r={})=>{let i=new URL(`/rest/v1/highlights`,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...r},s={},c={};await g(s,e),t!==void 0&&(c.page=t),n!==void 0&&(c.perpage=n),v(i,c);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...r.headers},{url:S(i),options:o}},getHighlightsInCollection:async(t,n,r,i={})=>{h(`getHighlightsInCollection`,`collectionId`,t);let a=`/rest/v1/highlights/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),o=new URL(a,m),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l={},u={};await g(l,e),n!==void 0&&(u.page=n),r!==void 0&&(u.perpage=r),v(o,u);let d=s&&s.headers?s.headers:{};return c.headers={...l,...d,...i.headers},{url:S(o),options:c}},getRaindrop:async(t,n={})=>{h(`getRaindrop`,`id`,t);let r=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},updateRaindrop:async(t,n,r={})=>{h(`updateRaindrop`,`id`,t);let i=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}}}},I=function(e){let t=F(e);return{async getAllHighlights(n,r,i){let a=await t.getAllHighlights(n,r,i),o=e?.serverIndex??0,s=p[`HighlightApi.getAllHighlights`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async getHighlightsInCollection(n,r,i,a){let o=await t.getHighlightsInCollection(n,r,i,a),s=e?.serverIndex??0,c=p[`HighlightApi.getHighlightsInCollection`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)},async getRaindrop(n,r){let i=await t.getRaindrop(n,r),a=e?.serverIndex??0,o=p[`HighlightApi.getRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async updateRaindrop(n,r,i){let a=await t.updateRaindrop(n,r,i),o=e?.serverIndex??0,s=p[`HighlightApi.updateRaindrop`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},ce=function(e,t,n){let r=I(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))}}},L=class extends d{getAllHighlights(e,t,n){return I(this.configuration).getAllHighlights(e,t,n).then(e=>e(this.axios,this.basePath))}getHighlightsInCollection(e,t,n,r){return I(this.configuration).getHighlightsInCollection(e,t,n,r).then(e=>e(this.axios,this.basePath))}getRaindrop(e,t){return I(this.configuration).getRaindrop(e,t).then(e=>e(this.axios,this.basePath))}updateRaindrop(e,t,n){return I(this.configuration).updateRaindrop(e,t,n).then(e=>e(this.axios,this.basePath))}},R=function(e){return{checkURLsExist:async(t,n={})=>{let r=new URL(`/rest/v1/import/url/exists`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},importHTMLBookmarkFile:async(t,n={})=>{let r=new URL(`/rest/v1/import/file`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={},s={},c=new(e&&e.formDataCtor||FormData);await g(o,e),t!==void 0&&c.append(`import`,t),o[`Content-Type`]=`multipart/form-data`,v(r,s);let l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...n.headers},a.data=c,{url:S(r),options:a}},parseURL:async(t,n={})=>{let r=new URL(`/rest/v1/import/url/parse`,m),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...n},o={},s={};await g(o,e),t!==void 0&&(s.url=t),v(r,s);let c=i&&i.headers?i.headers:{};return a.headers={...o,...c,...n.headers},{url:S(r),options:a}}}},z=function(e){let t=R(e);return{async checkURLsExist(n,r){let i=await t.checkURLsExist(n,r),a=e?.serverIndex??0,o=p[`ImportApi.checkURLsExist`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async importHTMLBookmarkFile(n,r){let i=await t.importHTMLBookmarkFile(n,r),a=e?.serverIndex??0,o=p[`ImportApi.importHTMLBookmarkFile`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async parseURL(n,r){let i=await t.parseURL(n,r),a=e?.serverIndex??0,o=p[`ImportApi.parseURL`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)}}},le=function(e,t,n){let r=z(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))}}},B=class extends d{checkURLsExist(e,t){return z(this.configuration).checkURLsExist(e,t).then(e=>e(this.axios,this.basePath))}importHTMLBookmarkFile(e,t){return z(this.configuration).importHTMLBookmarkFile(e,t).then(e=>e(this.axios,this.basePath))}parseURL(e,t){return z(this.configuration).parseURL(e,t).then(e=>e(this.axios,this.basePath))}},V=function(e){return{createRaindrop:async(t,n={})=>{let r=new URL(`/rest/v1/raindrop`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},createRaindrops:async(t,n={})=>{let r=new URL(`/rest/v1/raindrops`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},getPermanentCopy:async(t,n={})=>{h(`getPermanentCopy`,`id`,t);let r=`/rest/v1/raindrop/{id}/cache`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getRaindrop:async(t,n={})=>{h(`getRaindrop`,`id`,t);let r=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getRaindrops:async(t,n,r,i,a,o={})=>{h(`getRaindrops`,`collectionId`,t);let s=`/rest/v1/raindrops/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),c=new URL(s,m),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d={},f={};await g(d,e),n!==void 0&&(f.sort=n),r!==void 0&&(f.perpage=r),i!==void 0&&(f.page=i),a!==void 0&&(f.search=a),v(c,f);let p=l&&l.headers?l.headers:{};return u.headers={...d,...p,...o.headers},{url:S(c),options:u}},removeRaindrop:async(t,n={})=>{h(`removeRaindrop`,`id`,t);let r=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},removeRaindrops:async(t,n,r,i={})=>{h(`removeRaindrops`,`collectionId`,t);let a=`/rest/v1/raindrops/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),o=new URL(a,m),s;e&&(s=e.baseOptions);let c={method:`DELETE`,...s,...i},l={},u={};await g(l,e),n!==void 0&&(u.search=n),l[`Content-Type`]=`application/json`,v(o,u);let d=s&&s.headers?s.headers:{};return c.headers={...l,...d,...i.headers},c.data=y(r,c,e),{url:S(o),options:c}},suggestForExistingBookmark:async(t,n={})=>{h(`suggestForExistingBookmark`,`id`,t);let r=`/rest/v1/raindrop/{id}/suggest`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},suggestForNewBookmark:async(t,n={})=>{let r=new URL(`/rest/v1/raindrop/suggest`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},updateRaindrop:async(t,n,r={})=>{h(`updateRaindrop`,`id`,t);let i=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},updateRaindrops:async(t,n,r={})=>{h(`updateRaindrops`,`collectionId`,t);let i=`/rest/v1/raindrops/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},uploadFile:async(t,n,r={})=>{let i=new URL(`/rest/v1/raindrop/file`,m),a;e&&(a=e.baseOptions);let o={method:`PUT`,...a,...r},s={},c={},l=new(e&&e.formDataCtor||FormData);await g(s,e),t!==void 0&&l.append(`file`,t),n!==void 0&&l.append(`collectionId`,n),s[`Content-Type`]=`multipart/form-data`,v(i,c);let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...r.headers},o.data=l,{url:S(i),options:o}},uploadRaindropCover:async(t,n,r={})=>{h(`uploadRaindropCover`,`id`,t);let i=`/rest/v1/raindrop/{id}/cover`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={},l={},u=new(e&&e.formDataCtor||FormData);await g(c,e),n!==void 0&&u.append(`cover`,n),c[`Content-Type`]=`multipart/form-data`,v(a,l);let d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},s.data=u,{url:S(a),options:s}}}},H=function(e){let t=V(e);return{async createRaindrop(n,r){let i=await t.createRaindrop(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.createRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async createRaindrops(n,r){let i=await t.createRaindrops(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.createRaindrops`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getPermanentCopy(n,r){let i=await t.getPermanentCopy(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.getPermanentCopy`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getRaindrop(n,r){let i=await t.getRaindrop(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.getRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getRaindrops(n,r,i,a,o,s){let c=await t.getRaindrops(n,r,i,a,o,s),d=e?.serverIndex??0,f=p[`RaindropApi.getRaindrops`]?.[d]?.url;return(t,n)=>C(c,l.default,u,e)(t,f||n)},async removeRaindrop(n,r){let i=await t.removeRaindrop(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.removeRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeRaindrops(n,r,i,a){let o=await t.removeRaindrops(n,r,i,a),s=e?.serverIndex??0,c=p[`RaindropApi.removeRaindrops`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)},async suggestForExistingBookmark(n,r){let i=await t.suggestForExistingBookmark(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.suggestForExistingBookmark`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async suggestForNewBookmark(n,r){let i=await t.suggestForNewBookmark(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.suggestForNewBookmark`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async updateRaindrop(n,r,i){let a=await t.updateRaindrop(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.updateRaindrop`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async updateRaindrops(n,r,i){let a=await t.updateRaindrops(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.updateRaindrops`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async uploadFile(n,r,i){let a=await t.uploadFile(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.uploadFile`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async uploadRaindropCover(n,r,i){let a=await t.uploadRaindropCover(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.uploadRaindropCover`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},ue=function(e,t,n){let r=H(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))}}},U=class extends d{createRaindrop(e,t){return H(this.configuration).createRaindrop(e,t).then(e=>e(this.axios,this.basePath))}createRaindrops(e,t){return H(this.configuration).createRaindrops(e,t).then(e=>e(this.axios,this.basePath))}getPermanentCopy(e,t){return H(this.configuration).getPermanentCopy(e,t).then(e=>e(this.axios,this.basePath))}getRaindrop(e,t){return H(this.configuration).getRaindrop(e,t).then(e=>e(this.axios,this.basePath))}getRaindrops(e,t,n,r,i,a){return H(this.configuration).getRaindrops(e,t,n,r,i,a).then(e=>e(this.axios,this.basePath))}removeRaindrop(e,t){return H(this.configuration).removeRaindrop(e,t).then(e=>e(this.axios,this.basePath))}removeRaindrops(e,t,n,r){return H(this.configuration).removeRaindrops(e,t,n,r).then(e=>e(this.axios,this.basePath))}suggestForExistingBookmark(e,t){return H(this.configuration).suggestForExistingBookmark(e,t).then(e=>e(this.axios,this.basePath))}suggestForNewBookmark(e,t){return H(this.configuration).suggestForNewBookmark(e,t).then(e=>e(this.axios,this.basePath))}updateRaindrop(e,t,n){return H(this.configuration).updateRaindrop(e,t,n).then(e=>e(this.axios,this.basePath))}updateRaindrops(e,t,n){return H(this.configuration).updateRaindrops(e,t,n).then(e=>e(this.axios,this.basePath))}uploadFile(e,t,n){return H(this.configuration).uploadFile(e,t,n).then(e=>e(this.axios,this.basePath))}uploadRaindropCover(e,t,n){return H(this.configuration).uploadRaindropCover(e,t,n).then(e=>e(this.axios,this.basePath))}},W=function(e){return{getTagsInCollection:async(t,n={})=>{let r=`/rest/v1/tags/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},removeTagsFromCollection:async(t,n,r={})=>{let i=`/rest/v1/tags/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`DELETE`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},renameOrMergeTags:async(t,n,r={})=>{let i=`/rest/v1/tags/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}}}},G=function(e){let t=W(e);return{async getTagsInCollection(n,r){let i=await t.getTagsInCollection(n,r),a=e?.serverIndex??0,o=p[`TagApi.getTagsInCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeTagsFromCollection(n,r,i){let a=await t.removeTagsFromCollection(n,r,i),o=e?.serverIndex??0,s=p[`TagApi.removeTagsFromCollection`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async renameOrMergeTags(n,r,i){let a=await t.renameOrMergeTags(n,r,i),o=e?.serverIndex??0,s=p[`TagApi.renameOrMergeTags`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},de=function(e,t,n){let r=G(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))}}},K=class extends d{getTagsInCollection(e,t){return G(this.configuration).getTagsInCollection(e,t).then(e=>e(this.axios,this.basePath))}removeTagsFromCollection(e,t,n){return G(this.configuration).removeTagsFromCollection(e,t,n).then(e=>e(this.axios,this.basePath))}renameOrMergeTags(e,t,n){return G(this.configuration).renameOrMergeTags(e,t,n).then(e=>e(this.axios,this.basePath))}},q=function(e){return{connectSocialNetworkProvider:async(t,n={})=>{h(`connectSocialNetworkProvider`,`provider`,t);let r=`/rest/v1/user/connect/{provider}`.replace(`{provider}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},disconnectSocialNetworkProvider:async(t,n={})=>{h(`disconnectSocialNetworkProvider`,`provider`,t);let r=`/rest/v1/user/connect/{provider}/revoke`.replace(`{provider}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getCurrentUser:async(t={})=>{let n=new URL(`/rest/v1/user`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getPublicUserByName:async(t,n={})=>{h(`getPublicUserByName`,`name`,t);let r=`/rest/v1/user/{name}`.replace(`{name}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getSystemCollectionStats:async(t={})=>{let n=new URL(`/rest/v1/user/stats`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},updateCurrentUser:async(t,n={})=>{let r=new URL(`/rest/v1/user`,m),i;e&&(i=e.baseOptions);let a={method:`PUT`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}}}},J=function(e){let t=q(e);return{async connectSocialNetworkProvider(n,r){let i=await t.connectSocialNetworkProvider(n,r),a=e?.serverIndex??0,o=p[`UserApi.connectSocialNetworkProvider`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async disconnectSocialNetworkProvider(n,r){let i=await t.disconnectSocialNetworkProvider(n,r),a=e?.serverIndex??0,o=p[`UserApi.disconnectSocialNetworkProvider`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getCurrentUser(n){let r=await t.getCurrentUser(n),i=e?.serverIndex??0,a=p[`UserApi.getCurrentUser`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getPublicUserByName(n,r){let i=await t.getPublicUserByName(n,r),a=e?.serverIndex??0,o=p[`UserApi.getPublicUserByName`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getSystemCollectionStats(n){let r=await t.getSystemCollectionStats(n),i=e?.serverIndex??0,a=p[`UserApi.getSystemCollectionStats`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async updateCurrentUser(n,r){let i=await t.updateCurrentUser(n,r),a=e?.serverIndex??0,o=p[`UserApi.updateCurrentUser`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)}}},fe=function(e,t,n){let r=J(e);return{connectSocialNetworkProvider(e,i){return r.connectSocialNetworkProvider(e,i).then(e=>e(n,t))},disconnectSocialNetworkProvider(e,i){return r.disconnectSocialNetworkProvider(e,i).then(e=>e(n,t))},getCurrentUser(e){return r.getCurrentUser(e).then(e=>e(n,t))},getPublicUserByName(e,i){return r.getPublicUserByName(e,i).then(e=>e(n,t))},getSystemCollectionStats(e){return r.getSystemCollectionStats(e).then(e=>e(n,t))},updateCurrentUser(e,i){return r.updateCurrentUser(e,i).then(e=>e(n,t))}}},Y=class extends d{connectSocialNetworkProvider(e,t){return J(this.configuration).connectSocialNetworkProvider(e,t).then(e=>e(this.axios,this.basePath))}disconnectSocialNetworkProvider(e,t){return J(this.configuration).disconnectSocialNetworkProvider(e,t).then(e=>e(this.axios,this.basePath))}getCurrentUser(e){return J(this.configuration).getCurrentUser(e).then(e=>e(this.axios,this.basePath))}getPublicUserByName(e,t){return J(this.configuration).getPublicUserByName(e,t).then(e=>e(this.axios,this.basePath))}getSystemCollectionStats(e){return J(this.configuration).getSystemCollectionStats(e).then(e=>e(this.axios,this.basePath))}updateCurrentUser(e,t){return J(this.configuration).updateCurrentUser(e,t).then(e=>e(this.axios,this.basePath))}},pe={Facebook:`facebook`,Google:`google`,Twitter:`twitter`,Vkontate:`vkontate`,Dropbox:`dropbox`,Gdrive:`gdrive`},me={Facebook:`facebook`,Google:`google`,Twitter:`twitter`,Vkontate:`vkontate`,Dropbox:`dropbox`,Gdrive:`gdrive`},X=class{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.serverIndex=e.serverIndex,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){return e!==null&&(RegExp(`^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$`,`i`).test(e)||e.toLowerCase()===`application/json-patch+json`)}},he=o({AuthenticationApi:()=>O,AuthenticationApiAxiosParamCreator:()=>E,AuthenticationApiFactory:()=>ie,AuthenticationApiFp:()=>D,CollectionApi:()=>j,CollectionApiAxiosParamCreator:()=>k,CollectionApiFactory:()=>ae,CollectionApiFp:()=>A,CollectionRefRefEnum:()=>te,Configuration:()=>X,ConnectSocialNetworkProviderProviderEnum:()=>pe,DisconnectSocialNetworkProviderProviderEnum:()=>me,FilterApi:()=>P,FilterApiAxiosParamCreator:()=>M,FilterApiFactory:()=>oe,FilterApiFp:()=>N,GetFiltersTagsSortEnum:()=>se,HighlightApi:()=>L,HighlightApiAxiosParamCreator:()=>F,HighlightApiFactory:()=>ce,HighlightApiFp:()=>I,ImportApi:()=>B,ImportApiAxiosParamCreator:()=>R,ImportApiFactory:()=>le,ImportApiFp:()=>z,ObtainTokenGrantTypeEnum:()=>w,RaindropApi:()=>U,RaindropApiAxiosParamCreator:()=>V,RaindropApiFactory:()=>ue,RaindropApiFp:()=>H,RefreshTokenGrantTypeEnum:()=>T,Role:()=>ne,TagApi:()=>K,TagApiAxiosParamCreator:()=>W,TagApiFactory:()=>de,TagApiFp:()=>G,TokenResponseTokenTypeEnum:()=>re,UserApi:()=>Y,UserApiAxiosParamCreator:()=>q,UserApiFactory:()=>fe,UserApiFp:()=>J}),ge=class extends O{async exchangeToken(e,t){return this.getOrRefreshToken({...e,grant_type:w.AuthorizationCode},t).then(e=>{if(Z(e.data))throw Error(`Request failed with error: ${e.data.errorMessage}`);return e})}async refreshToken(e,t){return this.getOrRefreshToken({...e,grant_type:T.RefreshToken},t).then(e=>{if(Z(e.data))throw Error(`Request failed with error: ${e.data.errorMessage}`);return e})}};function Z(e){return`result`in e&&e.result===!1}var _e=o({TreeNode:()=>Q,makeTree:()=>ve}),Q=class{_data;_parent=null;_children=[];constructor(e,t){this._data=e,t&&this.addChildren(...t)}get data(){return this._data}get parent(){return this._parent}set parent(e){this._parent=e,e._children.push(this)}isRoot(){return this._parent===null}get children(){return this._children}addChildren(...e){this._children.push(...e);for(let t of e)t._parent=this}traverse(e){e(this);for(let t of this.children)t.traverse(e)}};function $(e,t,n){let r=n.filter(e=>e.parent===t);for(let t of r){let r=t.toNode();$(r,t.id,n),e.addChildren(r)}}function ve(e,t){let n=new Q(e);return $(n,null,t),n}var ye=class extends j{async getCollectionTree(){let[{data:e},{data:t}]=await Promise.all([this.getRootCollections(),this.getChildCollections()]),n=e.items.map(e=>({data:e,id:e._id.toString(),parent:null,toNode(){return new Q(this.data)}})),r=t.items.map(e=>({data:e,id:e._id.toString(),parent:e.parent?.$id.toString()||null,toNode(){return new Q(this.data)}})),i=n.concat(r);return i.sort((e,t)=>e.data.title.localeCompare(t.data.title)||e.data._id-t.data._id),ve(null,i.filter((e,t,n)=>n.findIndex(t=>t.id===e.id)===t))}},be=class extends U{async getAllRaindrops(e,t,n){let r=e??0,i=t?.sort??``,a=t?.pageSize??50,o=t?.search??``,{data:s}=await this.getRaindrops(r,i,a,0,o,n),c=s.count,l=Math.ceil(c/a),u=Array.from(Array(l).keys());u.shift();let d=await Promise.all(u.map(e=>this.getRaindrops(r,i,a,e,o,n).then(({data:e})=>e))),f=[...s.items];for(let e of d)f.push(...e.items);return f}},xe=class{client;configuration;auth;user;collection;filter;highlight;import;raindrop;tag;constructor(e,t){this.client=t??l.default,this.configuration=e??new X,this.auth=new ge(e,void 0,this.client),this.collection=new ye(e,void 0,this.client),this.filter=new P(e,void 0,this.client),this.highlight=new L(e,void 0,this.client),this.import=new B(e,void 0,this.client),this.raindrop=new be(e,void 0,this.client),this.tag=new K(e,void 0,this.client),this.user=new Y(e,void 0,this.client)}},Se=o({Raindrop:()=>xe}),Ce=o({tree:()=>_e}),we=xe;Object.defineProperty(exports,"client",{enumerable:!0,get:function(){return Se}}),exports.default=we,Object.defineProperty(exports,"generated",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"utils",{enumerable:!0,get:function(){return Ce}});
|