@lasuillard/raindrop-client 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -21
- package/dist/{src/generated/api.d.ts → index.d.mts} +638 -206
- package/dist/index.d.ts +5992 -0
- package/dist/index.js +3872 -0
- package/dist/index.mjs +3839 -0
- package/package.json +95 -79
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -1912
- package/dist/src/client/auth.d.ts +0 -18
- package/dist/src/client/client.d.ts +0 -25
- package/dist/src/client/collection.d.ts +0 -14
- package/dist/src/client/index.d.ts +0 -1
- package/dist/src/client/raindrop.d.ts +0 -23
- package/dist/src/generated/base.d.ts +0 -55
- package/dist/src/generated/common.d.ts +0 -54
- package/dist/src/generated/configuration.d.ts +0 -91
- package/dist/src/generated/index.d.ts +0 -13
- package/dist/src/index.d.ts +0 -6
- package/dist/src/utils/index.d.ts +0 -2
- package/dist/src/utils/tree.d.ts +0 -49
- package/dist/tests/__typechecks__/checkURLsExist.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/createCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/createRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/createRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/emptyTrash.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getAllHighlights.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getChildCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getCurrentUser.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getFeaturedCovers.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getFilters.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getHighlightsInCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getPublicUserByName.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getRootCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getSystemCollectionStats.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getTagsInCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/importHTMLBookmarkFile.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/mergeCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/parseURL.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeAllEmptyCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeTagsFromCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/renameOrMergeTags.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/reorderAllCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/searchCovers.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/shareCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateCurrentUser.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/uploadCollectionCover.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/uploadFile.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/uploadRaindropCover.test-d.d.ts +0 -1
- package/dist/tests/_helpers/axios.d.ts +0 -11
- package/dist/tests/_helpers/common.d.ts +0 -2
- package/dist/tests/_helpers/polly.d.ts +0 -5
- package/dist/tests/_helpers/raindrop.d.ts +0 -17
- package/dist/tests/_helpers/typechecks.d.ts +0 -14
- package/dist/tests/_helpers/utils.d.ts +0 -1
- package/dist/tests/_helpers/vitest.d.ts +0 -29
- package/dist/tests/client/auth.test.d.ts +0 -1
- package/dist/tests/client/client.test.d.ts +0 -1
- package/dist/tests/client/collection.test.d.ts +0 -1
- package/dist/tests/client/raindrop.test.d.ts +0 -1
- package/dist/tests/generated/auth.test.d.ts +0 -1
- package/dist/tests/generated/collection.test.d.ts +0 -1
- package/dist/tests/generated/filter.test.d.ts +0 -1
- package/dist/tests/generated/highlight.test.d.ts +0 -1
- package/dist/tests/generated/import.test.d.ts +0 -1
- package/dist/tests/generated/raindrop.test.d.ts +0 -1
- package/dist/tests/generated/tag.test.d.ts +0 -1
- package/dist/tests/generated/user.test.d.ts +0 -1
- package/dist/tests/setup.d.ts +0 -1
- package/dist/tests/utils/tree.test.d.ts +0 -1
package/package.json
CHANGED
|
@@ -1,81 +1,97 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
2
|
+
"name": "@lasuillard/raindrop-client",
|
|
3
|
+
"version": "0.8.2",
|
|
4
|
+
"publishConfig": {
|
|
5
|
+
"access": "public"
|
|
6
|
+
},
|
|
7
|
+
"description": "An Axios client for Raindrop.io, generated with OpenAPI Generator.",
|
|
8
|
+
"keywords": [
|
|
9
|
+
"raindrop.io",
|
|
10
|
+
"axios",
|
|
11
|
+
"openapi"
|
|
12
|
+
],
|
|
13
|
+
"license": "MIT",
|
|
14
|
+
"repository": {
|
|
15
|
+
"type": "git",
|
|
16
|
+
"url": "git+https://github.com/lasuillard-s/raindrop-client.git"
|
|
17
|
+
},
|
|
18
|
+
"author": {
|
|
19
|
+
"name": "Yuchan Lee",
|
|
20
|
+
"url": "https://github.com/lasuillard",
|
|
21
|
+
"email": "lasuillard@gmail.com"
|
|
22
|
+
},
|
|
23
|
+
"homepage": "https://github.com/lasuillard-s/raindrop-client",
|
|
24
|
+
"bugs": {
|
|
25
|
+
"url": "https://github.com/lasuillard-s/raindrop-client/issues"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"dist/",
|
|
29
|
+
"README.md",
|
|
30
|
+
"LICENSE"
|
|
31
|
+
],
|
|
32
|
+
"main": "./dist/index.js",
|
|
33
|
+
"module": "./dist/index.mjs",
|
|
34
|
+
"types": "./dist/index.d.ts",
|
|
35
|
+
"exports": {
|
|
36
|
+
".": {
|
|
37
|
+
"types": {
|
|
38
|
+
"import": "./dist/index.d.mts",
|
|
39
|
+
"require": "./dist/index.d.ts"
|
|
40
|
+
},
|
|
41
|
+
"source": "./src/index.ts",
|
|
42
|
+
"import": "./dist/index.mjs",
|
|
43
|
+
"require": "./dist/index.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"scripts": {
|
|
47
|
+
"generate": "openapi-generator-cli generate --input-spec openapi.yaml --generator-name typescript-axios --output ./src/generated/ --skip-validate-spec --additional-properties enumPropertyNamingReplaceSpecialChar=true",
|
|
48
|
+
"dev": "vite",
|
|
49
|
+
"build": "tsup",
|
|
50
|
+
"fmt": "biome format --write .",
|
|
51
|
+
"fmt:check": "biome format .",
|
|
52
|
+
"lint": "biome lint .",
|
|
53
|
+
"lint:fix": "biome lint --fix .",
|
|
54
|
+
"typecheck": "tsc --noEmit",
|
|
55
|
+
"test": "npm run test:unit && npm run test:type",
|
|
56
|
+
"test:unit": "vitest --coverage --run --outputFile.junit=./junit.xml",
|
|
57
|
+
"test:type": "vitest --typecheck.only --run --outputFile.junit=./typecheck.junit.xml",
|
|
58
|
+
"make-docs": "typedoc --plugin typedoc-plugin-missing-exports --out ./typedoc src"
|
|
59
|
+
},
|
|
60
|
+
"dependencies": {
|
|
61
|
+
"axios": "1.*"
|
|
62
|
+
},
|
|
63
|
+
"devEngines": {
|
|
64
|
+
"runtime": {
|
|
65
|
+
"name": "node",
|
|
66
|
+
"version": ">=24",
|
|
67
|
+
"onFail": "error"
|
|
68
|
+
},
|
|
69
|
+
"packageManager": {
|
|
70
|
+
"name": "npm",
|
|
71
|
+
"version": ">=11",
|
|
72
|
+
"onFail": "error"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"devDependencies": {
|
|
76
|
+
"@biomejs/biome": "2.5.0",
|
|
77
|
+
"@codecov/vite-plugin": "2.0.1",
|
|
78
|
+
"@openapitools/openapi-generator-cli": "2.38.0",
|
|
79
|
+
"@pollyjs/adapter-node-http": "6.0.6",
|
|
80
|
+
"@pollyjs/core": "6.0.6",
|
|
81
|
+
"@pollyjs/persister-fs": "6.0.6",
|
|
82
|
+
"@types/node": "25.9.3",
|
|
83
|
+
"@vitest/coverage-v8": "4.1.9",
|
|
84
|
+
"@vitest/ui": "4.1.9",
|
|
85
|
+
"axios-mock-adapter": "2.1.0",
|
|
86
|
+
"axios-rate-limit": "1.9.0",
|
|
87
|
+
"http-server": "14.1.1",
|
|
88
|
+
"slugify": "1.6.9",
|
|
89
|
+
"tslib": "2.8.1",
|
|
90
|
+
"tsup": "8.5.1",
|
|
91
|
+
"typedoc": "0.28.19",
|
|
92
|
+
"typedoc-plugin-missing-exports": "4.1.3",
|
|
93
|
+
"typescript": "6.0.3",
|
|
94
|
+
"vite-tsconfig-paths": "6.1.1",
|
|
95
|
+
"vitest": "4.1.9"
|
|
96
|
+
}
|
|
81
97
|
}
|
package/dist/index.cjs.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:`Module`}});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},s=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},c=(n,r,a)=>(a=n==null?{}:e(i(n)),s(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n));let l=require("axios");l=c(l);var u=`https://api.raindrop.io`.replace(/\/+$/,``),d=class{basePath;axios;configuration;constructor(e,t=u,n=l.default){this.basePath=t,this.axios=n,e&&(this.configuration=e,this.basePath=e.basePath??t)}},f=class extends Error{field;constructor(e,t){super(t),this.field=e,this.name=`RequiredError`}},p={},m=`https://example.com`,h=function(e,t,n){if(n==null)throw new f(t,`Required parameter ${t} was null or undefined when calling ${e}.`)},g=async function(e,t){t&&t.accessToken&&(e.Authorization=`Bearer `+(typeof t.accessToken==`function`?await t.accessToken():await t.accessToken))};function _(e,t,n=``){t!=null&&(typeof t==`object`?Array.isArray(t)?t.forEach(t=>_(e,t,n)):Object.keys(t).forEach(r=>_(e,t[r],`${n}${n===``?``:`.`}${r}`)):e.has(n)?e.append(n,t):e.set(n,t))}var v=function(e,...t){let n=new URLSearchParams(e.search);_(n,t),e.search=n.toString()},y=function(e,t,n){let r=typeof e!=`string`;return(r&&n&&n.isJsonMime?n.isJsonMime(t.headers[`Content-Type`]):r)?JSON.stringify(e===void 0?{}:b(e)):e||``};function b(e){if(typeof Set>`u`||typeof Map>`u`||typeof e!=`object`||!e)return e;if(e instanceof Set)return Array.from(e).map(e=>b(e));if(e instanceof Map){let t=[];return e.forEach((e,n)=>{t.push([n,b(e)])}),x(t)}return Array.isArray(e)?e.map(e=>b(e)):x(ee(e).map(([e,t])=>[e,b(t)]))}function ee(e){return Object.keys(e).map(t=>[t,e[t]])}function x(e){return[...e].reduce((e,[t,n])=>(e[t]=n,e),{})}var S=function(e){return e.pathname+e.search+e.hash},C=function(e,t,n,r){return(i=t,a=n)=>{let o={...e.options,url:(i.defaults.baseURL?``:r?.basePath??a)+e.url};return i.request(o)}},te={Collections:`collections`},w={AuthorizationCode:`authorization_code`},T={RefreshToken:`refresh_token`},ne={Member:`member`,Viewer:`viewer`},re={Bearer:`Bearer`},E=function(e){return{authorize:async(t,n,r={})=>{h(`authorize`,`redirectUri`,t),h(`authorize`,`clientId`,n);let i=new URL(`/v1/oauth/authorize`,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...r},s={},c={};t!==void 0&&(c.redirect_uri=t),n!==void 0&&(c.client_id=n),v(i,c);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...r.headers},{url:S(i),options:o}},getOrRefreshToken:async(t,n={})=>{let r=new URL(`/v1/oauth/access_token`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}}}},D=function(e){let t=E(e);return{async authorize(n,r,i){let a=await t.authorize(n,r,i),o=e?.serverIndex??0,s=p[`AuthenticationApi.authorize`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async getOrRefreshToken(n,r){let i=await t.getOrRefreshToken(n,r),a=e?.serverIndex??0,o=p[`AuthenticationApi.getOrRefreshToken`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)}}},ie=function(e,t,n){let r=D(e);return{authorize(e,i,a){return r.authorize(e,i,a).then(e=>e(n,t))},getOrRefreshToken(e,i){return r.getOrRefreshToken(e,i).then(e=>e(n,t))}}},O=class extends d{authorize(e,t,n){return D(this.configuration).authorize(e,t,n).then(e=>e(this.axios,this.basePath))}getOrRefreshToken(e,t){return D(this.configuration).getOrRefreshToken(e,t).then(e=>e(this.axios,this.basePath))}},k=function(e){return{acceptInvitation:async(t,n={})=>{h(`acceptInvitation`,`id`,t);let r=`/rest/v1/collection/{id}/join`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`POST`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},changeCollaboratorAccessLevel:async(t,n,r,i={})=>{h(`changeCollaboratorAccessLevel`,`userId`,t),h(`changeCollaboratorAccessLevel`,`id`,n);let a=`/rest/v1/collection/{id}/sharing/{userId}`.replace(`{userId}`,encodeURIComponent(String(t))).replace(`{id}`,encodeURIComponent(String(n))),o=new URL(a,m),s;e&&(s=e.baseOptions);let c={method:`PUT`,...s,...i},l={};await g(l,e),l[`Content-Type`]=`application/json`,v(o,{});let u=s&&s.headers?s.headers:{};return c.headers={...l,...u,...i.headers},c.data=y(r,c,e),{url:S(o),options:c}},createCollection:async(t,n={})=>{let r=new URL(`/rest/v1/collection`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},deleteCollaborator:async(t,n,r={})=>{h(`deleteCollaborator`,`userId`,t),h(`deleteCollaborator`,`id`,n);let i=`/rest/v1/collection/{id}/sharing/{userId}`.replace(`{userId}`,encodeURIComponent(String(t))).replace(`{id}`,encodeURIComponent(String(n))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`DELETE`,...o,...r},c={};await g(c,e),v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},{url:S(a),options:s}},emptyTrash:async(t={})=>{let n=new URL(`/rest/v1/collection/-99`,m),r;e&&(r=e.baseOptions);let i={method:`DELETE`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getChildCollections:async(t={})=>{let n=new URL(`/rest/v1/collections/childrens`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getCollaborators:async(t,n={})=>{h(`getCollaborators`,`id`,t);let r=`/rest/v1/collection/{id}/sharing`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getCollection:async(t,n={})=>{h(`getCollection`,`id`,t);let r=`/rest/v1/collection/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getFeaturedCovers:async(t={})=>{let n=new URL(`/rest/v1/collections/covers`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getRootCollections:async(t={})=>{let n=new URL(`/rest/v1/collections`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getSystemCollectionStats:async(t={})=>{let n=new URL(`/rest/v1/user/stats`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},mergeCollections:async(t,n={})=>{let r=new URL(`/rest/v1/collections/merge`,m),i;e&&(i=e.baseOptions);let a={method:`PUT`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},removeAllEmptyCollections:async(t={})=>{let n=new URL(`/rest/v1/collections/clean`,m),r;e&&(r=e.baseOptions);let i={method:`PUT`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},removeCollection:async(t,n={})=>{h(`removeCollection`,`id`,t);let r=`/rest/v1/collection/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},removeCollections:async(t,n={})=>{let r=new URL(`/rest/v1/collections`,m),i;e&&(i=e.baseOptions);let a={method:`DELETE`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},reorderAllCollections:async(t,n={})=>{let r=new URL(`/rest/v1/collections`,m),i;e&&(i=e.baseOptions);let a={method:`PUT`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},searchCovers:async(t,n={})=>{h(`searchCovers`,`text`,t);let r=`/rest/v1/collections/covers/{text}`.replace(`{text}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},shareCollection:async(t,n,r={})=>{h(`shareCollection`,`id`,t);let i=`/rest/v1/collection/{id}/sharing`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`POST`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},unshareOrLeaveCollection:async(t,n={})=>{h(`unshareOrLeaveCollection`,`id`,t);let r=`/rest/v1/collection/{id}/sharing`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},updateCollection:async(t,n,r={})=>{h(`updateCollection`,`id`,t);let i=`/rest/v1/collection/{id}`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},uploadCollectionCover:async(t,n,r={})=>{h(`uploadCollectionCover`,`id`,t);let i=`/rest/v1/collection/{id}/cover`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={},l={},u=new(e&&e.formDataCtor||FormData);await g(c,e),n!==void 0&&u.append(`cover`,n),c[`Content-Type`]=`multipart/form-data`,v(a,l);let d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},s.data=u,{url:S(a),options:s}}}},A=function(e){let t=k(e);return{async acceptInvitation(n,r){let i=await t.acceptInvitation(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.acceptInvitation`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async changeCollaboratorAccessLevel(n,r,i,a){let o=await t.changeCollaboratorAccessLevel(n,r,i,a),s=e?.serverIndex??0,c=p[`CollectionApi.changeCollaboratorAccessLevel`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)},async createCollection(n,r){let i=await t.createCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.createCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async deleteCollaborator(n,r,i){let a=await t.deleteCollaborator(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.deleteCollaborator`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async emptyTrash(n){let r=await t.emptyTrash(n),i=e?.serverIndex??0,a=p[`CollectionApi.emptyTrash`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getChildCollections(n){let r=await t.getChildCollections(n),i=e?.serverIndex??0,a=p[`CollectionApi.getChildCollections`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getCollaborators(n,r){let i=await t.getCollaborators(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.getCollaborators`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getCollection(n,r){let i=await t.getCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.getCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getFeaturedCovers(n){let r=await t.getFeaturedCovers(n),i=e?.serverIndex??0,a=p[`CollectionApi.getFeaturedCovers`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getRootCollections(n){let r=await t.getRootCollections(n),i=e?.serverIndex??0,a=p[`CollectionApi.getRootCollections`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getSystemCollectionStats(n){let r=await t.getSystemCollectionStats(n),i=e?.serverIndex??0,a=p[`CollectionApi.getSystemCollectionStats`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async mergeCollections(n,r){let i=await t.mergeCollections(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.mergeCollections`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeAllEmptyCollections(n){let r=await t.removeAllEmptyCollections(n),i=e?.serverIndex??0,a=p[`CollectionApi.removeAllEmptyCollections`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async removeCollection(n,r){let i=await t.removeCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.removeCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeCollections(n,r){let i=await t.removeCollections(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.removeCollections`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async reorderAllCollections(n,r){let i=await t.reorderAllCollections(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.reorderAllCollections`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async searchCovers(n,r){let i=await t.searchCovers(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.searchCovers`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async shareCollection(n,r,i){let a=await t.shareCollection(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.shareCollection`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async unshareOrLeaveCollection(n,r){let i=await t.unshareOrLeaveCollection(n,r),a=e?.serverIndex??0,o=p[`CollectionApi.unshareOrLeaveCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async updateCollection(n,r,i){let a=await t.updateCollection(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.updateCollection`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async uploadCollectionCover(n,r,i){let a=await t.uploadCollectionCover(n,r,i),o=e?.serverIndex??0,s=p[`CollectionApi.uploadCollectionCover`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},ae=function(e,t,n){let r=A(e);return{acceptInvitation(e,i){return r.acceptInvitation(e,i).then(e=>e(n,t))},changeCollaboratorAccessLevel(e,i,a,o){return r.changeCollaboratorAccessLevel(e,i,a,o).then(e=>e(n,t))},createCollection(e,i){return r.createCollection(e,i).then(e=>e(n,t))},deleteCollaborator(e,i,a){return r.deleteCollaborator(e,i,a).then(e=>e(n,t))},emptyTrash(e){return r.emptyTrash(e).then(e=>e(n,t))},getChildCollections(e){return r.getChildCollections(e).then(e=>e(n,t))},getCollaborators(e,i){return r.getCollaborators(e,i).then(e=>e(n,t))},getCollection(e,i){return r.getCollection(e,i).then(e=>e(n,t))},getFeaturedCovers(e){return r.getFeaturedCovers(e).then(e=>e(n,t))},getRootCollections(e){return r.getRootCollections(e).then(e=>e(n,t))},getSystemCollectionStats(e){return r.getSystemCollectionStats(e).then(e=>e(n,t))},mergeCollections(e,i){return r.mergeCollections(e,i).then(e=>e(n,t))},removeAllEmptyCollections(e){return r.removeAllEmptyCollections(e).then(e=>e(n,t))},removeCollection(e,i){return r.removeCollection(e,i).then(e=>e(n,t))},removeCollections(e,i){return r.removeCollections(e,i).then(e=>e(n,t))},reorderAllCollections(e,i){return r.reorderAllCollections(e,i).then(e=>e(n,t))},searchCovers(e,i){return r.searchCovers(e,i).then(e=>e(n,t))},shareCollection(e,i,a){return r.shareCollection(e,i,a).then(e=>e(n,t))},unshareOrLeaveCollection(e,i){return r.unshareOrLeaveCollection(e,i).then(e=>e(n,t))},updateCollection(e,i,a){return r.updateCollection(e,i,a).then(e=>e(n,t))},uploadCollectionCover(e,i,a){return r.uploadCollectionCover(e,i,a).then(e=>e(n,t))}}},j=class extends d{acceptInvitation(e,t){return A(this.configuration).acceptInvitation(e,t).then(e=>e(this.axios,this.basePath))}changeCollaboratorAccessLevel(e,t,n,r){return A(this.configuration).changeCollaboratorAccessLevel(e,t,n,r).then(e=>e(this.axios,this.basePath))}createCollection(e,t){return A(this.configuration).createCollection(e,t).then(e=>e(this.axios,this.basePath))}deleteCollaborator(e,t,n){return A(this.configuration).deleteCollaborator(e,t,n).then(e=>e(this.axios,this.basePath))}emptyTrash(e){return A(this.configuration).emptyTrash(e).then(e=>e(this.axios,this.basePath))}getChildCollections(e){return A(this.configuration).getChildCollections(e).then(e=>e(this.axios,this.basePath))}getCollaborators(e,t){return A(this.configuration).getCollaborators(e,t).then(e=>e(this.axios,this.basePath))}getCollection(e,t){return A(this.configuration).getCollection(e,t).then(e=>e(this.axios,this.basePath))}getFeaturedCovers(e){return A(this.configuration).getFeaturedCovers(e).then(e=>e(this.axios,this.basePath))}getRootCollections(e){return A(this.configuration).getRootCollections(e).then(e=>e(this.axios,this.basePath))}getSystemCollectionStats(e){return A(this.configuration).getSystemCollectionStats(e).then(e=>e(this.axios,this.basePath))}mergeCollections(e,t){return A(this.configuration).mergeCollections(e,t).then(e=>e(this.axios,this.basePath))}removeAllEmptyCollections(e){return A(this.configuration).removeAllEmptyCollections(e).then(e=>e(this.axios,this.basePath))}removeCollection(e,t){return A(this.configuration).removeCollection(e,t).then(e=>e(this.axios,this.basePath))}removeCollections(e,t){return A(this.configuration).removeCollections(e,t).then(e=>e(this.axios,this.basePath))}reorderAllCollections(e,t){return A(this.configuration).reorderAllCollections(e,t).then(e=>e(this.axios,this.basePath))}searchCovers(e,t){return A(this.configuration).searchCovers(e,t).then(e=>e(this.axios,this.basePath))}shareCollection(e,t,n){return A(this.configuration).shareCollection(e,t,n).then(e=>e(this.axios,this.basePath))}unshareOrLeaveCollection(e,t){return A(this.configuration).unshareOrLeaveCollection(e,t).then(e=>e(this.axios,this.basePath))}updateCollection(e,t,n){return A(this.configuration).updateCollection(e,t,n).then(e=>e(this.axios,this.basePath))}uploadCollectionCover(e,t,n){return A(this.configuration).uploadCollectionCover(e,t,n).then(e=>e(this.axios,this.basePath))}},M=function(e){return{getFilters:async(t,n,r,i={})=>{h(`getFilters`,`collectionId`,t);let a=`/rest/v1/filters/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),o=new URL(a,m),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l={},u={};await g(l,e),n!==void 0&&(u.tagsSort=n),r!==void 0&&(u.search=r),v(o,u);let d=s&&s.headers?s.headers:{};return c.headers={...l,...d,...i.headers},{url:S(o),options:c}}}},N=function(e){let t=M(e);return{async getFilters(n,r,i,a){let o=await t.getFilters(n,r,i,a),s=e?.serverIndex??0,c=p[`FilterApi.getFilters`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)}}},oe=function(e,t,n){let r=N(e);return{getFilters(e,i,a,o){return r.getFilters(e,i,a,o).then(e=>e(n,t))}}},P=class extends d{getFilters(e,t,n,r){return N(this.configuration).getFilters(e,t,n,r).then(e=>e(this.axios,this.basePath))}},se={MinusCount:`-count`,Id:`_id`},F=function(e){return{getAllHighlights:async(t,n,r={})=>{let i=new URL(`/rest/v1/highlights`,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...r},s={},c={};await g(s,e),t!==void 0&&(c.page=t),n!==void 0&&(c.perpage=n),v(i,c);let l=a&&a.headers?a.headers:{};return o.headers={...s,...l,...r.headers},{url:S(i),options:o}},getHighlightsInCollection:async(t,n,r,i={})=>{h(`getHighlightsInCollection`,`collectionId`,t);let a=`/rest/v1/highlights/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),o=new URL(a,m),s;e&&(s=e.baseOptions);let c={method:`GET`,...s,...i},l={},u={};await g(l,e),n!==void 0&&(u.page=n),r!==void 0&&(u.perpage=r),v(o,u);let d=s&&s.headers?s.headers:{};return c.headers={...l,...d,...i.headers},{url:S(o),options:c}},getRaindrop:async(t,n={})=>{h(`getRaindrop`,`id`,t);let r=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},updateRaindrop:async(t,n,r={})=>{h(`updateRaindrop`,`id`,t);let i=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}}}},I=function(e){let t=F(e);return{async getAllHighlights(n,r,i){let a=await t.getAllHighlights(n,r,i),o=e?.serverIndex??0,s=p[`HighlightApi.getAllHighlights`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async getHighlightsInCollection(n,r,i,a){let o=await t.getHighlightsInCollection(n,r,i,a),s=e?.serverIndex??0,c=p[`HighlightApi.getHighlightsInCollection`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)},async getRaindrop(n,r){let i=await t.getRaindrop(n,r),a=e?.serverIndex??0,o=p[`HighlightApi.getRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async updateRaindrop(n,r,i){let a=await t.updateRaindrop(n,r,i),o=e?.serverIndex??0,s=p[`HighlightApi.updateRaindrop`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},ce=function(e,t,n){let r=I(e);return{getAllHighlights(e,i,a){return r.getAllHighlights(e,i,a).then(e=>e(n,t))},getHighlightsInCollection(e,i,a,o){return r.getHighlightsInCollection(e,i,a,o).then(e=>e(n,t))},getRaindrop(e,i){return r.getRaindrop(e,i).then(e=>e(n,t))},updateRaindrop(e,i,a){return r.updateRaindrop(e,i,a).then(e=>e(n,t))}}},L=class extends d{getAllHighlights(e,t,n){return I(this.configuration).getAllHighlights(e,t,n).then(e=>e(this.axios,this.basePath))}getHighlightsInCollection(e,t,n,r){return I(this.configuration).getHighlightsInCollection(e,t,n,r).then(e=>e(this.axios,this.basePath))}getRaindrop(e,t){return I(this.configuration).getRaindrop(e,t).then(e=>e(this.axios,this.basePath))}updateRaindrop(e,t,n){return I(this.configuration).updateRaindrop(e,t,n).then(e=>e(this.axios,this.basePath))}},R=function(e){return{checkURLsExist:async(t,n={})=>{let r=new URL(`/rest/v1/import/url/exists`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},importHTMLBookmarkFile:async(t,n={})=>{let r=new URL(`/rest/v1/import/file`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={},s={},c=new(e&&e.formDataCtor||FormData);await g(o,e),t!==void 0&&c.append(`import`,t),o[`Content-Type`]=`multipart/form-data`,v(r,s);let l=i&&i.headers?i.headers:{};return a.headers={...o,...l,...n.headers},a.data=c,{url:S(r),options:a}},parseURL:async(t,n={})=>{let r=new URL(`/rest/v1/import/url/parse`,m),i;e&&(i=e.baseOptions);let a={method:`GET`,...i,...n},o={},s={};await g(o,e),t!==void 0&&(s.url=t),v(r,s);let c=i&&i.headers?i.headers:{};return a.headers={...o,...c,...n.headers},{url:S(r),options:a}}}},z=function(e){let t=R(e);return{async checkURLsExist(n,r){let i=await t.checkURLsExist(n,r),a=e?.serverIndex??0,o=p[`ImportApi.checkURLsExist`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async importHTMLBookmarkFile(n,r){let i=await t.importHTMLBookmarkFile(n,r),a=e?.serverIndex??0,o=p[`ImportApi.importHTMLBookmarkFile`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async parseURL(n,r){let i=await t.parseURL(n,r),a=e?.serverIndex??0,o=p[`ImportApi.parseURL`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)}}},le=function(e,t,n){let r=z(e);return{checkURLsExist(e,i){return r.checkURLsExist(e,i).then(e=>e(n,t))},importHTMLBookmarkFile(e,i){return r.importHTMLBookmarkFile(e,i).then(e=>e(n,t))},parseURL(e,i){return r.parseURL(e,i).then(e=>e(n,t))}}},B=class extends d{checkURLsExist(e,t){return z(this.configuration).checkURLsExist(e,t).then(e=>e(this.axios,this.basePath))}importHTMLBookmarkFile(e,t){return z(this.configuration).importHTMLBookmarkFile(e,t).then(e=>e(this.axios,this.basePath))}parseURL(e,t){return z(this.configuration).parseURL(e,t).then(e=>e(this.axios,this.basePath))}},V=function(e){return{createRaindrop:async(t,n={})=>{let r=new URL(`/rest/v1/raindrop`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},createRaindrops:async(t,n={})=>{let r=new URL(`/rest/v1/raindrops`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},getPermanentCopy:async(t,n={})=>{h(`getPermanentCopy`,`id`,t);let r=`/rest/v1/raindrop/{id}/cache`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getRaindrop:async(t,n={})=>{h(`getRaindrop`,`id`,t);let r=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getRaindrops:async(t,n,r,i,a,o={})=>{h(`getRaindrops`,`collectionId`,t);let s=`/rest/v1/raindrops/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),c=new URL(s,m),l;e&&(l=e.baseOptions);let u={method:`GET`,...l,...o},d={},f={};await g(d,e),n!==void 0&&(f.sort=n),r!==void 0&&(f.perpage=r),i!==void 0&&(f.page=i),a!==void 0&&(f.search=a),v(c,f);let p=l&&l.headers?l.headers:{};return u.headers={...d,...p,...o.headers},{url:S(c),options:u}},removeRaindrop:async(t,n={})=>{h(`removeRaindrop`,`id`,t);let r=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`DELETE`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},removeRaindrops:async(t,n,r,i={})=>{h(`removeRaindrops`,`collectionId`,t);let a=`/rest/v1/raindrops/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),o=new URL(a,m),s;e&&(s=e.baseOptions);let c={method:`DELETE`,...s,...i},l={},u={};await g(l,e),n!==void 0&&(u.search=n),l[`Content-Type`]=`application/json`,v(o,u);let d=s&&s.headers?s.headers:{};return c.headers={...l,...d,...i.headers},c.data=y(r,c,e),{url:S(o),options:c}},suggestForExistingBookmark:async(t,n={})=>{h(`suggestForExistingBookmark`,`id`,t);let r=`/rest/v1/raindrop/{id}/suggest`.replace(`{id}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},suggestForNewBookmark:async(t,n={})=>{let r=new URL(`/rest/v1/raindrop/suggest`,m),i;e&&(i=e.baseOptions);let a={method:`POST`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}},updateRaindrop:async(t,n,r={})=>{h(`updateRaindrop`,`id`,t);let i=`/rest/v1/raindrop/{id}`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},updateRaindrops:async(t,n,r={})=>{h(`updateRaindrops`,`collectionId`,t);let i=`/rest/v1/raindrops/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},uploadFile:async(t,n,r={})=>{let i=new URL(`/rest/v1/raindrop/file`,m),a;e&&(a=e.baseOptions);let o={method:`PUT`,...a,...r},s={},c={},l=new(e&&e.formDataCtor||FormData);await g(s,e),t!==void 0&&l.append(`file`,t),n!==void 0&&l.append(`collectionId`,n),s[`Content-Type`]=`multipart/form-data`,v(i,c);let u=a&&a.headers?a.headers:{};return o.headers={...s,...u,...r.headers},o.data=l,{url:S(i),options:o}},uploadRaindropCover:async(t,n,r={})=>{h(`uploadRaindropCover`,`id`,t);let i=`/rest/v1/raindrop/{id}/cover`.replace(`{id}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={},l={},u=new(e&&e.formDataCtor||FormData);await g(c,e),n!==void 0&&u.append(`cover`,n),c[`Content-Type`]=`multipart/form-data`,v(a,l);let d=o&&o.headers?o.headers:{};return s.headers={...c,...d,...r.headers},s.data=u,{url:S(a),options:s}}}},H=function(e){let t=V(e);return{async createRaindrop(n,r){let i=await t.createRaindrop(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.createRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async createRaindrops(n,r){let i=await t.createRaindrops(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.createRaindrops`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getPermanentCopy(n,r){let i=await t.getPermanentCopy(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.getPermanentCopy`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getRaindrop(n,r){let i=await t.getRaindrop(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.getRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getRaindrops(n,r,i,a,o,s){let c=await t.getRaindrops(n,r,i,a,o,s),d=e?.serverIndex??0,f=p[`RaindropApi.getRaindrops`]?.[d]?.url;return(t,n)=>C(c,l.default,u,e)(t,f||n)},async removeRaindrop(n,r){let i=await t.removeRaindrop(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.removeRaindrop`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeRaindrops(n,r,i,a){let o=await t.removeRaindrops(n,r,i,a),s=e?.serverIndex??0,c=p[`RaindropApi.removeRaindrops`]?.[s]?.url;return(t,n)=>C(o,l.default,u,e)(t,c||n)},async suggestForExistingBookmark(n,r){let i=await t.suggestForExistingBookmark(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.suggestForExistingBookmark`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async suggestForNewBookmark(n,r){let i=await t.suggestForNewBookmark(n,r),a=e?.serverIndex??0,o=p[`RaindropApi.suggestForNewBookmark`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async updateRaindrop(n,r,i){let a=await t.updateRaindrop(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.updateRaindrop`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async updateRaindrops(n,r,i){let a=await t.updateRaindrops(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.updateRaindrops`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async uploadFile(n,r,i){let a=await t.uploadFile(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.uploadFile`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async uploadRaindropCover(n,r,i){let a=await t.uploadRaindropCover(n,r,i),o=e?.serverIndex??0,s=p[`RaindropApi.uploadRaindropCover`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},ue=function(e,t,n){let r=H(e);return{createRaindrop(e,i){return r.createRaindrop(e,i).then(e=>e(n,t))},createRaindrops(e,i){return r.createRaindrops(e,i).then(e=>e(n,t))},getPermanentCopy(e,i){return r.getPermanentCopy(e,i).then(e=>e(n,t))},getRaindrop(e,i){return r.getRaindrop(e,i).then(e=>e(n,t))},getRaindrops(e,i,a,o,s,c){return r.getRaindrops(e,i,a,o,s,c).then(e=>e(n,t))},removeRaindrop(e,i){return r.removeRaindrop(e,i).then(e=>e(n,t))},removeRaindrops(e,i,a,o){return r.removeRaindrops(e,i,a,o).then(e=>e(n,t))},suggestForExistingBookmark(e,i){return r.suggestForExistingBookmark(e,i).then(e=>e(n,t))},suggestForNewBookmark(e,i){return r.suggestForNewBookmark(e,i).then(e=>e(n,t))},updateRaindrop(e,i,a){return r.updateRaindrop(e,i,a).then(e=>e(n,t))},updateRaindrops(e,i,a){return r.updateRaindrops(e,i,a).then(e=>e(n,t))},uploadFile(e,i,a){return r.uploadFile(e,i,a).then(e=>e(n,t))},uploadRaindropCover(e,i,a){return r.uploadRaindropCover(e,i,a).then(e=>e(n,t))}}},U=class extends d{createRaindrop(e,t){return H(this.configuration).createRaindrop(e,t).then(e=>e(this.axios,this.basePath))}createRaindrops(e,t){return H(this.configuration).createRaindrops(e,t).then(e=>e(this.axios,this.basePath))}getPermanentCopy(e,t){return H(this.configuration).getPermanentCopy(e,t).then(e=>e(this.axios,this.basePath))}getRaindrop(e,t){return H(this.configuration).getRaindrop(e,t).then(e=>e(this.axios,this.basePath))}getRaindrops(e,t,n,r,i,a){return H(this.configuration).getRaindrops(e,t,n,r,i,a).then(e=>e(this.axios,this.basePath))}removeRaindrop(e,t){return H(this.configuration).removeRaindrop(e,t).then(e=>e(this.axios,this.basePath))}removeRaindrops(e,t,n,r){return H(this.configuration).removeRaindrops(e,t,n,r).then(e=>e(this.axios,this.basePath))}suggestForExistingBookmark(e,t){return H(this.configuration).suggestForExistingBookmark(e,t).then(e=>e(this.axios,this.basePath))}suggestForNewBookmark(e,t){return H(this.configuration).suggestForNewBookmark(e,t).then(e=>e(this.axios,this.basePath))}updateRaindrop(e,t,n){return H(this.configuration).updateRaindrop(e,t,n).then(e=>e(this.axios,this.basePath))}updateRaindrops(e,t,n){return H(this.configuration).updateRaindrops(e,t,n).then(e=>e(this.axios,this.basePath))}uploadFile(e,t,n){return H(this.configuration).uploadFile(e,t,n).then(e=>e(this.axios,this.basePath))}uploadRaindropCover(e,t,n){return H(this.configuration).uploadRaindropCover(e,t,n).then(e=>e(this.axios,this.basePath))}},W=function(e){return{getTagsInCollection:async(t,n={})=>{let r=`/rest/v1/tags/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},removeTagsFromCollection:async(t,n,r={})=>{let i=`/rest/v1/tags/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`DELETE`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}},renameOrMergeTags:async(t,n,r={})=>{let i=`/rest/v1/tags/{collectionId}`.replace(`{collectionId}`,encodeURIComponent(String(t))),a=new URL(i,m),o;e&&(o=e.baseOptions);let s={method:`PUT`,...o,...r},c={};await g(c,e),c[`Content-Type`]=`application/json`,v(a,{});let l=o&&o.headers?o.headers:{};return s.headers={...c,...l,...r.headers},s.data=y(n,s,e),{url:S(a),options:s}}}},G=function(e){let t=W(e);return{async getTagsInCollection(n,r){let i=await t.getTagsInCollection(n,r),a=e?.serverIndex??0,o=p[`TagApi.getTagsInCollection`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async removeTagsFromCollection(n,r,i){let a=await t.removeTagsFromCollection(n,r,i),o=e?.serverIndex??0,s=p[`TagApi.removeTagsFromCollection`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)},async renameOrMergeTags(n,r,i){let a=await t.renameOrMergeTags(n,r,i),o=e?.serverIndex??0,s=p[`TagApi.renameOrMergeTags`]?.[o]?.url;return(t,n)=>C(a,l.default,u,e)(t,s||n)}}},de=function(e,t,n){let r=G(e);return{getTagsInCollection(e,i){return r.getTagsInCollection(e,i).then(e=>e(n,t))},removeTagsFromCollection(e,i,a){return r.removeTagsFromCollection(e,i,a).then(e=>e(n,t))},renameOrMergeTags(e,i,a){return r.renameOrMergeTags(e,i,a).then(e=>e(n,t))}}},K=class extends d{getTagsInCollection(e,t){return G(this.configuration).getTagsInCollection(e,t).then(e=>e(this.axios,this.basePath))}removeTagsFromCollection(e,t,n){return G(this.configuration).removeTagsFromCollection(e,t,n).then(e=>e(this.axios,this.basePath))}renameOrMergeTags(e,t,n){return G(this.configuration).renameOrMergeTags(e,t,n).then(e=>e(this.axios,this.basePath))}},q=function(e){return{connectSocialNetworkProvider:async(t,n={})=>{h(`connectSocialNetworkProvider`,`provider`,t);let r=`/rest/v1/user/connect/{provider}`.replace(`{provider}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},disconnectSocialNetworkProvider:async(t,n={})=>{h(`disconnectSocialNetworkProvider`,`provider`,t);let r=`/rest/v1/user/connect/{provider}/revoke`.replace(`{provider}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getCurrentUser:async(t={})=>{let n=new URL(`/rest/v1/user`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},getPublicUserByName:async(t,n={})=>{h(`getPublicUserByName`,`name`,t);let r=`/rest/v1/user/{name}`.replace(`{name}`,encodeURIComponent(String(t))),i=new URL(r,m),a;e&&(a=e.baseOptions);let o={method:`GET`,...a,...n},s={};await g(s,e),v(i,{});let c=a&&a.headers?a.headers:{};return o.headers={...s,...c,...n.headers},{url:S(i),options:o}},getSystemCollectionStats:async(t={})=>{let n=new URL(`/rest/v1/user/stats`,m),r;e&&(r=e.baseOptions);let i={method:`GET`,...r,...t},a={};await g(a,e),v(n,{});let o=r&&r.headers?r.headers:{};return i.headers={...a,...o,...t.headers},{url:S(n),options:i}},updateCurrentUser:async(t,n={})=>{let r=new URL(`/rest/v1/user`,m),i;e&&(i=e.baseOptions);let a={method:`PUT`,...i,...n},o={};await g(o,e),o[`Content-Type`]=`application/json`,v(r,{});let s=i&&i.headers?i.headers:{};return a.headers={...o,...s,...n.headers},a.data=y(t,a,e),{url:S(r),options:a}}}},J=function(e){let t=q(e);return{async connectSocialNetworkProvider(n,r){let i=await t.connectSocialNetworkProvider(n,r),a=e?.serverIndex??0,o=p[`UserApi.connectSocialNetworkProvider`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async disconnectSocialNetworkProvider(n,r){let i=await t.disconnectSocialNetworkProvider(n,r),a=e?.serverIndex??0,o=p[`UserApi.disconnectSocialNetworkProvider`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getCurrentUser(n){let r=await t.getCurrentUser(n),i=e?.serverIndex??0,a=p[`UserApi.getCurrentUser`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async getPublicUserByName(n,r){let i=await t.getPublicUserByName(n,r),a=e?.serverIndex??0,o=p[`UserApi.getPublicUserByName`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)},async getSystemCollectionStats(n){let r=await t.getSystemCollectionStats(n),i=e?.serverIndex??0,a=p[`UserApi.getSystemCollectionStats`]?.[i]?.url;return(t,n)=>C(r,l.default,u,e)(t,a||n)},async updateCurrentUser(n,r){let i=await t.updateCurrentUser(n,r),a=e?.serverIndex??0,o=p[`UserApi.updateCurrentUser`]?.[a]?.url;return(t,n)=>C(i,l.default,u,e)(t,o||n)}}},fe=function(e,t,n){let r=J(e);return{connectSocialNetworkProvider(e,i){return r.connectSocialNetworkProvider(e,i).then(e=>e(n,t))},disconnectSocialNetworkProvider(e,i){return r.disconnectSocialNetworkProvider(e,i).then(e=>e(n,t))},getCurrentUser(e){return r.getCurrentUser(e).then(e=>e(n,t))},getPublicUserByName(e,i){return r.getPublicUserByName(e,i).then(e=>e(n,t))},getSystemCollectionStats(e){return r.getSystemCollectionStats(e).then(e=>e(n,t))},updateCurrentUser(e,i){return r.updateCurrentUser(e,i).then(e=>e(n,t))}}},Y=class extends d{connectSocialNetworkProvider(e,t){return J(this.configuration).connectSocialNetworkProvider(e,t).then(e=>e(this.axios,this.basePath))}disconnectSocialNetworkProvider(e,t){return J(this.configuration).disconnectSocialNetworkProvider(e,t).then(e=>e(this.axios,this.basePath))}getCurrentUser(e){return J(this.configuration).getCurrentUser(e).then(e=>e(this.axios,this.basePath))}getPublicUserByName(e,t){return J(this.configuration).getPublicUserByName(e,t).then(e=>e(this.axios,this.basePath))}getSystemCollectionStats(e){return J(this.configuration).getSystemCollectionStats(e).then(e=>e(this.axios,this.basePath))}updateCurrentUser(e,t){return J(this.configuration).updateCurrentUser(e,t).then(e=>e(this.axios,this.basePath))}},pe={Facebook:`facebook`,Google:`google`,Twitter:`twitter`,Vkontate:`vkontate`,Dropbox:`dropbox`,Gdrive:`gdrive`},me={Facebook:`facebook`,Google:`google`,Twitter:`twitter`,Vkontate:`vkontate`,Dropbox:`dropbox`,Gdrive:`gdrive`},X=class{apiKey;username;password;accessToken;basePath;serverIndex;baseOptions;formDataCtor;constructor(e={}){this.apiKey=e.apiKey,this.username=e.username,this.password=e.password,this.accessToken=e.accessToken,this.basePath=e.basePath,this.serverIndex=e.serverIndex,this.baseOptions=e.baseOptions,this.formDataCtor=e.formDataCtor}isJsonMime(e){return e!==null&&(RegExp(`^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$`,`i`).test(e)||e.toLowerCase()===`application/json-patch+json`)}},he=o({AuthenticationApi:()=>O,AuthenticationApiAxiosParamCreator:()=>E,AuthenticationApiFactory:()=>ie,AuthenticationApiFp:()=>D,CollectionApi:()=>j,CollectionApiAxiosParamCreator:()=>k,CollectionApiFactory:()=>ae,CollectionApiFp:()=>A,CollectionRefRefEnum:()=>te,Configuration:()=>X,ConnectSocialNetworkProviderProviderEnum:()=>pe,DisconnectSocialNetworkProviderProviderEnum:()=>me,FilterApi:()=>P,FilterApiAxiosParamCreator:()=>M,FilterApiFactory:()=>oe,FilterApiFp:()=>N,GetFiltersTagsSortEnum:()=>se,HighlightApi:()=>L,HighlightApiAxiosParamCreator:()=>F,HighlightApiFactory:()=>ce,HighlightApiFp:()=>I,ImportApi:()=>B,ImportApiAxiosParamCreator:()=>R,ImportApiFactory:()=>le,ImportApiFp:()=>z,ObtainTokenGrantTypeEnum:()=>w,RaindropApi:()=>U,RaindropApiAxiosParamCreator:()=>V,RaindropApiFactory:()=>ue,RaindropApiFp:()=>H,RefreshTokenGrantTypeEnum:()=>T,Role:()=>ne,TagApi:()=>K,TagApiAxiosParamCreator:()=>W,TagApiFactory:()=>de,TagApiFp:()=>G,TokenResponseTokenTypeEnum:()=>re,UserApi:()=>Y,UserApiAxiosParamCreator:()=>q,UserApiFactory:()=>fe,UserApiFp:()=>J}),ge=class extends O{async exchangeToken(e,t){return this.getOrRefreshToken({...e,grant_type:w.AuthorizationCode},t).then(e=>{if(Z(e.data))throw Error(`Request failed with error: ${e.data.errorMessage}`);return e})}async refreshToken(e,t){return this.getOrRefreshToken({...e,grant_type:T.RefreshToken},t).then(e=>{if(Z(e.data))throw Error(`Request failed with error: ${e.data.errorMessage}`);return e})}};function Z(e){return`result`in e&&e.result===!1}var _e=o({TreeNode:()=>Q,makeTree:()=>ve}),Q=class{_data;_parent=null;_children=[];constructor(e,t){this._data=e,t&&this.addChildren(...t)}get data(){return this._data}get parent(){return this._parent}set parent(e){this._parent=e,e._children.push(this)}isRoot(){return this._parent===null}get children(){return this._children}addChildren(...e){this._children.push(...e);for(let t of e)t._parent=this}traverse(e){e(this);for(let t of this.children)t.traverse(e)}};function $(e,t,n){let r=n.filter(e=>e.parent===t);for(let t of r){let r=t.toNode();$(r,t.id,n),e.addChildren(r)}}function ve(e,t){let n=new Q(e);return $(n,null,t),n}var ye=class extends j{async getCollectionTree(){let[{data:e},{data:t}]=await Promise.all([this.getRootCollections(),this.getChildCollections()]),n=e.items.map(e=>({data:e,id:e._id.toString(),parent:null,toNode(){return new Q(this.data)}})),r=t.items.map(e=>({data:e,id:e._id.toString(),parent:e.parent?.$id.toString()||null,toNode(){return new Q(this.data)}})),i=n.concat(r);return i.sort((e,t)=>e.data.title.localeCompare(t.data.title)||e.data._id-t.data._id),ve(null,i.filter((e,t,n)=>n.findIndex(t=>t.id===e.id)===t))}},be=class extends U{async getAllRaindrops(e,t,n){let r=e??0,i=t?.sort??``,a=t?.pageSize??50,o=t?.search??``,{data:s}=await this.getRaindrops(r,i,a,0,o,n),c=s.count,l=Math.ceil(c/a),u=Array.from(Array(l).keys());u.shift();let d=await Promise.all(u.map(e=>this.getRaindrops(r,i,a,e,o,n).then(({data:e})=>e))),f=[...s.items];for(let e of d)f.push(...e.items);return f}},xe=class{client;configuration;auth;user;collection;filter;highlight;import;raindrop;tag;constructor(e,t){this.client=t??l.default,this.configuration=e??new X,this.auth=new ge(e,void 0,this.client),this.collection=new ye(e,void 0,this.client),this.filter=new P(e,void 0,this.client),this.highlight=new L(e,void 0,this.client),this.import=new B(e,void 0,this.client),this.raindrop=new be(e,void 0,this.client),this.tag=new K(e,void 0,this.client),this.user=new Y(e,void 0,this.client)}},Se=o({Raindrop:()=>xe}),Ce=o({tree:()=>_e}),we=xe;Object.defineProperty(exports,"client",{enumerable:!0,get:function(){return Se}}),exports.default=we,Object.defineProperty(exports,"generated",{enumerable:!0,get:function(){return he}}),Object.defineProperty(exports,"utils",{enumerable:!0,get:function(){return Ce}});
|