@lasuillard/raindrop-client 0.5.2 → 0.5.3
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/dist/index.cjs.js +1 -1
- package/dist/index.d.ts +28 -11
- package/dist/index.es.js +1 -1
- package/package.json +11 -10
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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...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 A=o&&o.headers?o.headers:{};return l.headers={...c,...A,...s.headers},l.data=d,{url:O(r),options:l}}}},R=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=R(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 R(this.configuration).acceptInvitation(t,e).then(s=>s(this.axios,this.basePath))}changeCollaboratorAccessLevel(t,e,s,a){return R(this.configuration).changeCollaboratorAccessLevel(t,e,s,a).then(r=>r(this.axios,this.basePath))}createCollection(t,e){return R(this.configuration).createCollection(t,e).then(s=>s(this.axios,this.basePath))}deleteCollaborator(t,e,s){return R(this.configuration).deleteCollaborator(t,e,s).then(a=>a(this.axios,this.basePath))}emptyTrash(t){return R(this.configuration).emptyTrash(t).then(e=>e(this.axios,this.basePath))}getChildCollections(t){return R(this.configuration).getChildCollections(t).then(e=>e(this.axios,this.basePath))}getCollaborators(t,e){return R(this.configuration).getCollaborators(t,e).then(s=>s(this.axios,this.basePath))}getCollection(t,e){return R(this.configuration).getCollection(t,e).then(s=>s(this.axios,this.basePath))}getFeaturedCovers(t){return R(this.configuration).getFeaturedCovers(t).then(e=>e(this.axios,this.basePath))}getRootCollections(t){return R(this.configuration).getRootCollections(t).then(e=>e(this.axios,this.basePath))}getSystemCollectionStats(t){return R(this.configuration).getSystemCollectionStats(t).then(e=>e(this.axios,this.basePath))}mergeCollections(t,e){return R(this.configuration).mergeCollections(t,e).then(s=>s(this.axios,this.basePath))}removeAllEmptyCollections(t){return R(this.configuration).removeAllEmptyCollections(t).then(e=>e(this.axios,this.basePath))}removeCollection(t,e){return R(this.configuration).removeCollection(t,e).then(s=>s(this.axios,this.basePath))}removeCollections(t,e){return R(this.configuration).removeCollections(t,e).then(s=>s(this.axios,this.basePath))}reorderAllCollections(t,e){return R(this.configuration).reorderAllCollections(t,e).then(s=>s(this.axios,this.basePath))}searchCovers(t,e){return R(this.configuration).searchCovers(t,e).then(s=>s(this.axios,this.basePath))}shareCollection(t,e,s){return R(this.configuration).shareCollection(t,e,s).then(a=>a(this.axios,this.basePath))}unshareOrLeaveCollection(t,e){return R(this.configuration).unshareOrLeaveCollection(t,e).then(s=>s(this.axios,this.basePath))}updateCollection(t,e,s){return R(this.configuration).updateCollection(t,e,s).then(a=>a(this.axios,this.basePath))}uploadCollectionCover(t,e,s){return R(this.configuration).uploadCollectionCover(t,e,s).then(a=>a(this.axios,this.basePath))}};const z=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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...a.headers},{url:O(o),options:c}}}},j=function(n){const t=z(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 D 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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...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},A={},x={};await C(A,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={...A,...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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...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 A=o&&o.headers?o.headers:{};return l.headers={...c,...A,...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 A=o&&o.headers?o.headers:{};return l.headers={...c,...A,...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(A,x)=>v(c,h,p,n)(A,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:R,CollectionRefRefEnum:de,Configuration:ae,ConnectSocialNetworkProviderProviderEnum:ye,DisconnectSocialNetworkProviderProviderEnum:be,FilterApi:D,FilterApiAxiosParamCreator:z,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(l=>({data:l,id:l._id.toString(),parent:null,toNode(){return new k(this.data)}})),a=e.items.map(l=>({data:l,id:l._id.toString(),parent:l.parent.$id.toString(),toNode(){return new k(this.data)}})),r=s.concat(a);return r.sort((l,c)=>l.data.title.localeCompare(c.data.title)||l.data._id-c.data._id),se(null,r)}}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),A=Array.from(Array(d).keys());A.shift();const x=await Promise.all(A.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 D(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
|
+
"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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...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 A=o&&o.headers?o.headers:{};return l.headers={...c,...A,...s.headers},l.data=d,{url:O(r),options:l}}}},R=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=R(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 R(this.configuration).acceptInvitation(t,e).then(s=>s(this.axios,this.basePath))}changeCollaboratorAccessLevel(t,e,s,a){return R(this.configuration).changeCollaboratorAccessLevel(t,e,s,a).then(r=>r(this.axios,this.basePath))}createCollection(t,e){return R(this.configuration).createCollection(t,e).then(s=>s(this.axios,this.basePath))}deleteCollaborator(t,e,s){return R(this.configuration).deleteCollaborator(t,e,s).then(a=>a(this.axios,this.basePath))}emptyTrash(t){return R(this.configuration).emptyTrash(t).then(e=>e(this.axios,this.basePath))}getChildCollections(t){return R(this.configuration).getChildCollections(t).then(e=>e(this.axios,this.basePath))}getCollaborators(t,e){return R(this.configuration).getCollaborators(t,e).then(s=>s(this.axios,this.basePath))}getCollection(t,e){return R(this.configuration).getCollection(t,e).then(s=>s(this.axios,this.basePath))}getFeaturedCovers(t){return R(this.configuration).getFeaturedCovers(t).then(e=>e(this.axios,this.basePath))}getRootCollections(t){return R(this.configuration).getRootCollections(t).then(e=>e(this.axios,this.basePath))}getSystemCollectionStats(t){return R(this.configuration).getSystemCollectionStats(t).then(e=>e(this.axios,this.basePath))}mergeCollections(t,e){return R(this.configuration).mergeCollections(t,e).then(s=>s(this.axios,this.basePath))}removeAllEmptyCollections(t){return R(this.configuration).removeAllEmptyCollections(t).then(e=>e(this.axios,this.basePath))}removeCollection(t,e){return R(this.configuration).removeCollection(t,e).then(s=>s(this.axios,this.basePath))}removeCollections(t,e){return R(this.configuration).removeCollections(t,e).then(s=>s(this.axios,this.basePath))}reorderAllCollections(t,e){return R(this.configuration).reorderAllCollections(t,e).then(s=>s(this.axios,this.basePath))}searchCovers(t,e){return R(this.configuration).searchCovers(t,e).then(s=>s(this.axios,this.basePath))}shareCollection(t,e,s){return R(this.configuration).shareCollection(t,e,s).then(a=>a(this.axios,this.basePath))}unshareOrLeaveCollection(t,e){return R(this.configuration).unshareOrLeaveCollection(t,e).then(s=>s(this.axios,this.basePath))}updateCollection(t,e,s){return R(this.configuration).updateCollection(t,e,s).then(a=>a(this.axios,this.basePath))}uploadCollectionCover(t,e,s){return R(this.configuration).uploadCollectionCover(t,e,s).then(a=>a(this.axios,this.basePath))}};const z=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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...a.headers},{url:O(o),options:c}}}},j=function(n){const t=z(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 D 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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...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},A={},x={};await C(A,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={...A,...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 A=l&&l.headers?l.headers:{};return c.headers={...i,...A,...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 A=o&&o.headers?o.headers:{};return l.headers={...c,...A,...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 A=o&&o.headers?o.headers:{};return l.headers={...c,...A,...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(A,x)=>v(c,h,p,n)(A,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:R,CollectionRefRefEnum:de,Configuration:ae,ConnectSocialNetworkProviderProviderEnum:ye,DisconnectSocialNetworkProviderProviderEnum:be,FilterApi:D,FilterApiAxiosParamCreator:z,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(l=>({data:l,id:l._id.toString(),parent:null,toNode(){return new k(this.data)}})),a=e.items.map(l=>({data:l,id:l._id.toString(),parent:l.parent?.$id.toString()||null,toNode(){return new k(this.data)}})),r=s.concat(a);return r.sort((l,c)=>l.data.title.localeCompare(c.data.title)||l.data._id-c.data._id),se(null,r)}}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),A=Array.from(Array(d).keys());A.shift();const x=await Promise.all(A.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 D(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;
|
package/dist/index.d.ts
CHANGED
|
@@ -346,6 +346,12 @@ declare interface Collection {
|
|
|
346
346
|
* @memberof Collection
|
|
347
347
|
*/
|
|
348
348
|
'author': boolean;
|
|
349
|
+
/**
|
|
350
|
+
*
|
|
351
|
+
* @type {object}
|
|
352
|
+
* @memberof Collection
|
|
353
|
+
*/
|
|
354
|
+
'parent': object | null;
|
|
349
355
|
}
|
|
350
356
|
|
|
351
357
|
/**
|
|
@@ -1203,7 +1209,7 @@ declare interface CreateCollectionRequest {
|
|
|
1203
1209
|
* @type {CollectionRef}
|
|
1204
1210
|
* @memberof CreateCollectionRequest
|
|
1205
1211
|
*/
|
|
1206
|
-
'parent'?: CollectionRef;
|
|
1212
|
+
'parent'?: CollectionRef | null;
|
|
1207
1213
|
/**
|
|
1208
1214
|
*
|
|
1209
1215
|
* @type {Array<string>}
|
|
@@ -1346,6 +1352,12 @@ declare interface CreateCollectionResponseItem {
|
|
|
1346
1352
|
* @memberof CreateCollectionResponseItem
|
|
1347
1353
|
*/
|
|
1348
1354
|
'author': boolean;
|
|
1355
|
+
/**
|
|
1356
|
+
*
|
|
1357
|
+
* @type {object}
|
|
1358
|
+
* @memberof CreateCollectionResponseItem
|
|
1359
|
+
*/
|
|
1360
|
+
'parent': object | null;
|
|
1349
1361
|
/**
|
|
1350
1362
|
*
|
|
1351
1363
|
* @type {number}
|
|
@@ -1529,7 +1541,7 @@ declare interface CreateRaindropResponseItem {
|
|
|
1529
1541
|
* @type {CollectionRef}
|
|
1530
1542
|
* @memberof CreateRaindropResponseItem
|
|
1531
1543
|
*/
|
|
1532
|
-
'collection': CollectionRef;
|
|
1544
|
+
'collection': CollectionRef | null;
|
|
1533
1545
|
/**
|
|
1534
1546
|
*
|
|
1535
1547
|
* @type {number}
|
|
@@ -2167,7 +2179,7 @@ declare interface GetChildCollectionsResponseItemsInner {
|
|
|
2167
2179
|
* @type {CollectionRef}
|
|
2168
2180
|
* @memberof GetChildCollectionsResponseItemsInner
|
|
2169
2181
|
*/
|
|
2170
|
-
'parent': CollectionRef;
|
|
2182
|
+
'parent': CollectionRef | null;
|
|
2171
2183
|
}
|
|
2172
2184
|
|
|
2173
2185
|
/**
|
|
@@ -2514,7 +2526,7 @@ declare interface GetRaindropResponseItem {
|
|
|
2514
2526
|
* @type {CollectionRef}
|
|
2515
2527
|
* @memberof GetRaindropResponseItem
|
|
2516
2528
|
*/
|
|
2517
|
-
'collection': CollectionRef;
|
|
2529
|
+
'collection': CollectionRef | null;
|
|
2518
2530
|
/**
|
|
2519
2531
|
*
|
|
2520
2532
|
* @type {number}
|
|
@@ -4078,7 +4090,7 @@ declare interface RemoveRaindropResponseItem {
|
|
|
4078
4090
|
* @type {CollectionRef}
|
|
4079
4091
|
* @memberof RemoveRaindropResponseItem
|
|
4080
4092
|
*/
|
|
4081
|
-
'collection': CollectionRef;
|
|
4093
|
+
'collection': CollectionRef | null;
|
|
4082
4094
|
/**
|
|
4083
4095
|
*
|
|
4084
4096
|
* @type {number}
|
|
@@ -4726,7 +4738,7 @@ declare interface UpdateCollectionRequest {
|
|
|
4726
4738
|
* @type {CollectionRef}
|
|
4727
4739
|
* @memberof UpdateCollectionRequest
|
|
4728
4740
|
*/
|
|
4729
|
-
'parent'?: CollectionRef;
|
|
4741
|
+
'parent'?: CollectionRef | null;
|
|
4730
4742
|
/**
|
|
4731
4743
|
*
|
|
4732
4744
|
* @type {Array<string>}
|
|
@@ -4988,7 +5000,7 @@ declare interface UpdateCurrentUserResponseUser {
|
|
|
4988
5000
|
* @type {number}
|
|
4989
5001
|
* @memberof UpdateCurrentUserResponseUser
|
|
4990
5002
|
*/
|
|
4991
|
-
'__v'
|
|
5003
|
+
'__v'?: number;
|
|
4992
5004
|
}
|
|
4993
5005
|
|
|
4994
5006
|
/**
|
|
@@ -5034,7 +5046,7 @@ declare interface UpdateRaindropResponseItem {
|
|
|
5034
5046
|
* @type {CollectionRef}
|
|
5035
5047
|
* @memberof UpdateRaindropResponseItem
|
|
5036
5048
|
*/
|
|
5037
|
-
'collection': CollectionRef;
|
|
5049
|
+
'collection': CollectionRef | null;
|
|
5038
5050
|
/**
|
|
5039
5051
|
*
|
|
5040
5052
|
* @type {number}
|
|
@@ -5351,6 +5363,12 @@ declare interface UploadCollectionCoverResponseItem {
|
|
|
5351
5363
|
* @memberof UploadCollectionCoverResponseItem
|
|
5352
5364
|
*/
|
|
5353
5365
|
'author': boolean;
|
|
5366
|
+
/**
|
|
5367
|
+
*
|
|
5368
|
+
* @type {object}
|
|
5369
|
+
* @memberof UploadCollectionCoverResponseItem
|
|
5370
|
+
*/
|
|
5371
|
+
'parent': object | null;
|
|
5354
5372
|
/**
|
|
5355
5373
|
*
|
|
5356
5374
|
* @type {number}
|
|
@@ -5402,7 +5420,7 @@ declare interface UploadFileResponseItem {
|
|
|
5402
5420
|
* @type {CollectionRef}
|
|
5403
5421
|
* @memberof UploadFileResponseItem
|
|
5404
5422
|
*/
|
|
5405
|
-
'collection': CollectionRef;
|
|
5423
|
+
'collection': CollectionRef | null;
|
|
5406
5424
|
/**
|
|
5407
5425
|
*
|
|
5408
5426
|
* @type {number}
|
|
@@ -5576,7 +5594,7 @@ declare interface UploadRaindropCoverResponseItem {
|
|
|
5576
5594
|
* @type {CollectionRef}
|
|
5577
5595
|
* @memberof UploadRaindropCoverResponseItem
|
|
5578
5596
|
*/
|
|
5579
|
-
'collection': CollectionRef;
|
|
5597
|
+
'collection': CollectionRef | null;
|
|
5580
5598
|
/**
|
|
5581
5599
|
*
|
|
5582
5600
|
* @type {number}
|
|
@@ -6192,4 +6210,3 @@ declare module "vitest" {
|
|
|
6192
6210
|
setupTools: SetupTools;
|
|
6193
6211
|
}
|
|
6194
6212
|
}
|
|
6195
|
-
|
package/dist/index.es.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lasuillard/raindrop-client",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.3",
|
|
4
4
|
"description": "Axios client built with OpenAPI generator for Raindrop.io.",
|
|
5
5
|
"keywords": ["raindrop.io", "axios", "openapi"],
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,20 +30,21 @@
|
|
|
30
30
|
"build": "tsc && vite build",
|
|
31
31
|
"preview": "vite preview",
|
|
32
32
|
"test": "yarn test:unit && yarn test:type",
|
|
33
|
-
"test:unit": "vitest --coverage --run",
|
|
34
|
-
"test:type": "vitest --typecheck.only --run",
|
|
33
|
+
"test:unit": "vitest --coverage --run --outputFile.junit=./junit.xml",
|
|
34
|
+
"test:type": "vitest --typecheck.only --run --outputFile.junit=./typecheck.junit.xml",
|
|
35
35
|
"make-docs": "yarn run typedoc --plugin typedoc-plugin-missing-exports src"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@biomejs/biome": "^1.8.0",
|
|
39
|
+
"@codecov/vite-plugin": "^1.1.0",
|
|
39
40
|
"@openapitools/openapi-generator-cli": "^2.13.1",
|
|
40
41
|
"@pollyjs/adapter-node-http": "^6.0.6",
|
|
41
42
|
"@pollyjs/core": "^6.0.6",
|
|
42
43
|
"@pollyjs/persister-fs": "^6.0.6",
|
|
43
|
-
"@types/node": "^
|
|
44
|
-
"@vitest/coverage-v8": "^
|
|
45
|
-
"@vitest/ui": "^
|
|
46
|
-
"axios-mock-adapter": "^
|
|
44
|
+
"@types/node": "^22.0.2",
|
|
45
|
+
"@vitest/coverage-v8": "^2.0.5",
|
|
46
|
+
"@vitest/ui": "^2.0.5",
|
|
47
|
+
"axios-mock-adapter": "^2.0.0",
|
|
47
48
|
"axios-rate-limit": "^1.4.0",
|
|
48
49
|
"dotenv": "^16.4.5",
|
|
49
50
|
"slugify": "^1.6.6",
|
|
@@ -52,9 +53,9 @@
|
|
|
52
53
|
"typedoc-plugin-missing-exports": "^3.0.0",
|
|
53
54
|
"typescript": "^5.4.3",
|
|
54
55
|
"vite": "^5.2.6",
|
|
55
|
-
"vite-plugin-dts": "^
|
|
56
|
-
"vite-tsconfig-paths": "^
|
|
57
|
-
"vitest": "^
|
|
56
|
+
"vite-plugin-dts": "^4.2.1",
|
|
57
|
+
"vite-tsconfig-paths": "^5.0.1",
|
|
58
|
+
"vitest": "^2.0.5"
|
|
58
59
|
},
|
|
59
60
|
"dependencies": {
|
|
60
61
|
"axios": "^1.6.8"
|