@lasuillard/raindrop-client 0.7.5 → 0.7.7
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.es.js +1901 -3098
- package/package.json +79 -71
package/dist/index.es.js
CHANGED
|
@@ -1,3109 +1,1912 @@
|
|
|
1
|
-
import
|
|
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
|
-
) : n.has(e) ? n.append(e, t) : n.set(e, t));
|
|
27
|
-
}
|
|
28
|
-
const V = function(n, ...t) {
|
|
29
|
-
const e = new URLSearchParams(n.search);
|
|
30
|
-
E(e, t), n.search = e.toString();
|
|
31
|
-
}, y = function(n, t, e) {
|
|
32
|
-
const s = typeof n != "string";
|
|
33
|
-
return (s && e && e.isJsonMime ? e.isJsonMime(t.headers["Content-Type"]) : s) ? JSON.stringify(n !== void 0 ? U(n) : {}) : n || "";
|
|
34
|
-
};
|
|
35
|
-
function U(n) {
|
|
36
|
-
if (typeof Set > "u" || typeof Map > "u" || typeof n != "object" || !n)
|
|
37
|
-
return n;
|
|
38
|
-
if (n instanceof Set)
|
|
39
|
-
return Array.from(n).map((t) => U(t));
|
|
40
|
-
if (n instanceof Map) {
|
|
41
|
-
const t = [];
|
|
42
|
-
return n.forEach((e, s) => {
|
|
43
|
-
t.push([s, U(e)]);
|
|
44
|
-
}), H(t);
|
|
45
|
-
}
|
|
46
|
-
return Array.isArray(n) ? n.map((t) => U(t)) : H(ie(n).map(([t, e]) => [t, U(e)]));
|
|
47
|
-
}
|
|
48
|
-
function ie(n) {
|
|
49
|
-
return Object.keys(n).map((t) => [t, n[t]]);
|
|
50
|
-
}
|
|
51
|
-
function H(n) {
|
|
52
|
-
return [...n].reduce((t, [e, s]) => (t[e] = s, t), {});
|
|
53
|
-
}
|
|
54
|
-
const O = function(n) {
|
|
55
|
-
return n.pathname + n.search + n.hash;
|
|
56
|
-
}, v = function(n, t, e, s) {
|
|
57
|
-
return (a = t, r = e) => {
|
|
58
|
-
const o = { ...n.options, url: (a.defaults.baseURL ? "" : s?.basePath ?? r) + n.url };
|
|
59
|
-
return a.request(o);
|
|
60
|
-
};
|
|
61
|
-
}, de = {
|
|
62
|
-
Collections: "collections"
|
|
63
|
-
}, Q = {
|
|
64
|
-
AuthorizationCode: "authorization_code"
|
|
65
|
-
}, N = {
|
|
66
|
-
RefreshToken: "refresh_token"
|
|
67
|
-
}, he = {
|
|
68
|
-
Member: "member",
|
|
69
|
-
Viewer: "viewer"
|
|
70
|
-
}, pe = {
|
|
71
|
-
Bearer: "Bearer"
|
|
72
|
-
}, $ = function(n) {
|
|
73
|
-
return {
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
* @param {string} redirectUri
|
|
77
|
-
* @param {string} clientId
|
|
78
|
-
* @param {*} [options] Override http request option.
|
|
79
|
-
* @throws {RequiredError}
|
|
80
|
-
*/
|
|
81
|
-
authorize: async (t, e, s = {}) => {
|
|
82
|
-
P("authorize", "redirectUri", t), P("authorize", "clientId", e);
|
|
83
|
-
const a = "/v1/oauth/authorize", r = new URL(a, m);
|
|
84
|
-
let o;
|
|
85
|
-
n && (o = n.baseOptions);
|
|
86
|
-
const l = { method: "GET", ...o, ...s }, c = {}, i = {};
|
|
87
|
-
t !== void 0 && (i.redirect_uri = t), e !== void 0 && (i.client_id = e), V(r, i);
|
|
88
|
-
let d = o && o.headers ? o.headers : {};
|
|
89
|
-
return l.headers = { ...c, ...d, ...s.headers }, {
|
|
90
|
-
url: O(r),
|
|
91
|
-
options: l
|
|
92
|
-
};
|
|
93
|
-
},
|
|
94
|
-
/**
|
|
95
|
-
*
|
|
96
|
-
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
97
|
-
* @param {*} [options] Override http request option.
|
|
98
|
-
* @throws {RequiredError}
|
|
99
|
-
*/
|
|
100
|
-
getOrRefreshToken: async (t, e = {}) => {
|
|
101
|
-
const s = "/v1/oauth/access_token", a = new URL(s, m);
|
|
102
|
-
let r;
|
|
103
|
-
n && (r = n.baseOptions);
|
|
104
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {};
|
|
105
|
-
l["Content-Type"] = "application/json", V(a, c);
|
|
106
|
-
let i = r && r.headers ? r.headers : {};
|
|
107
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
108
|
-
url: O(a),
|
|
109
|
-
options: o
|
|
110
|
-
};
|
|
111
|
-
}
|
|
112
|
-
};
|
|
113
|
-
}, B = function(n) {
|
|
114
|
-
const t = $(n);
|
|
115
|
-
return {
|
|
116
|
-
/**
|
|
117
|
-
*
|
|
118
|
-
* @param {string} redirectUri
|
|
119
|
-
* @param {string} clientId
|
|
120
|
-
* @param {*} [options] Override http request option.
|
|
121
|
-
* @throws {RequiredError}
|
|
122
|
-
*/
|
|
123
|
-
async authorize(e, s, a) {
|
|
124
|
-
const r = await t.authorize(e, s, a), o = n?.serverIndex ?? 0, l = u["AuthenticationApi.authorize"]?.[o]?.url;
|
|
125
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
126
|
-
},
|
|
127
|
-
/**
|
|
128
|
-
*
|
|
129
|
-
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
130
|
-
* @param {*} [options] Override http request option.
|
|
131
|
-
* @throws {RequiredError}
|
|
132
|
-
*/
|
|
133
|
-
async getOrRefreshToken(e, s) {
|
|
134
|
-
const a = await t.getOrRefreshToken(e, s), r = n?.serverIndex ?? 0, o = u["AuthenticationApi.getOrRefreshToken"]?.[r]?.url;
|
|
135
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
}, ue = function(n, t, e) {
|
|
139
|
-
const s = B(n);
|
|
140
|
-
return {
|
|
141
|
-
/**
|
|
142
|
-
*
|
|
143
|
-
* @param {string} redirectUri
|
|
144
|
-
* @param {string} clientId
|
|
145
|
-
* @param {*} [options] Override http request option.
|
|
146
|
-
* @throws {RequiredError}
|
|
147
|
-
*/
|
|
148
|
-
authorize(a, r, o) {
|
|
149
|
-
return s.authorize(a, r, o).then((l) => l(e, t));
|
|
150
|
-
},
|
|
151
|
-
/**
|
|
152
|
-
*
|
|
153
|
-
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
154
|
-
* @param {*} [options] Override http request option.
|
|
155
|
-
* @throws {RequiredError}
|
|
156
|
-
*/
|
|
157
|
-
getOrRefreshToken(a, r) {
|
|
158
|
-
return s.getOrRefreshToken(a, r).then((o) => o(e, t));
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
|
-
};
|
|
162
|
-
let _ = class extends S {
|
|
163
|
-
/**
|
|
164
|
-
*
|
|
165
|
-
* @param {string} redirectUri
|
|
166
|
-
* @param {string} clientId
|
|
167
|
-
* @param {*} [options] Override http request option.
|
|
168
|
-
* @throws {RequiredError}
|
|
169
|
-
* @memberof AuthenticationApi
|
|
170
|
-
*/
|
|
171
|
-
authorize(t, e, s) {
|
|
172
|
-
return B(this.configuration).authorize(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
173
|
-
}
|
|
174
|
-
/**
|
|
175
|
-
*
|
|
176
|
-
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
177
|
-
* @param {*} [options] Override http request option.
|
|
178
|
-
* @throws {RequiredError}
|
|
179
|
-
* @memberof AuthenticationApi
|
|
180
|
-
*/
|
|
181
|
-
getOrRefreshToken(t, e) {
|
|
182
|
-
return B(this.configuration).getOrRefreshToken(t, e).then((s) => s(this.axios, this.basePath));
|
|
183
|
-
}
|
|
184
|
-
};
|
|
185
|
-
const M = function(n) {
|
|
186
|
-
return {
|
|
187
|
-
/**
|
|
188
|
-
*
|
|
189
|
-
* @param {number} id
|
|
190
|
-
* @param {*} [options] Override http request option.
|
|
191
|
-
* @throws {RequiredError}
|
|
192
|
-
*/
|
|
193
|
-
acceptInvitation: async (t, e = {}) => {
|
|
194
|
-
P("acceptInvitation", "id", t);
|
|
195
|
-
const s = "/rest/v1/collection/{id}/join".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
196
|
-
let r;
|
|
197
|
-
n && (r = n.baseOptions);
|
|
198
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {};
|
|
199
|
-
await C(l, n), V(a, c);
|
|
200
|
-
let i = r && r.headers ? r.headers : {};
|
|
201
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
202
|
-
url: O(a),
|
|
203
|
-
options: o
|
|
204
|
-
};
|
|
205
|
-
},
|
|
206
|
-
/**
|
|
207
|
-
*
|
|
208
|
-
* @param {number} userId
|
|
209
|
-
* @param {number} id
|
|
210
|
-
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
211
|
-
* @param {*} [options] Override http request option.
|
|
212
|
-
* @throws {RequiredError}
|
|
213
|
-
*/
|
|
214
|
-
changeCollaboratorAccessLevel: async (t, e, s, a = {}) => {
|
|
215
|
-
P("changeCollaboratorAccessLevel", "userId", t), P("changeCollaboratorAccessLevel", "id", e);
|
|
216
|
-
const r = "/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}", encodeURIComponent(String(t))).replace("{id}", encodeURIComponent(String(e))), o = new URL(r, m);
|
|
217
|
-
let l;
|
|
218
|
-
n && (l = n.baseOptions);
|
|
219
|
-
const c = { method: "PUT", ...l, ...a }, i = {}, d = {};
|
|
220
|
-
await C(i, n), i["Content-Type"] = "application/json", V(o, d);
|
|
221
|
-
let R = l && l.headers ? l.headers : {};
|
|
222
|
-
return c.headers = { ...i, ...R, ...a.headers }, c.data = y(s, c, n), {
|
|
223
|
-
url: O(o),
|
|
224
|
-
options: c
|
|
225
|
-
};
|
|
226
|
-
},
|
|
227
|
-
/**
|
|
228
|
-
*
|
|
229
|
-
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
230
|
-
* @param {*} [options] Override http request option.
|
|
231
|
-
* @throws {RequiredError}
|
|
232
|
-
*/
|
|
233
|
-
createCollection: async (t, e = {}) => {
|
|
234
|
-
const s = "/rest/v1/collection", a = new URL(s, m);
|
|
235
|
-
let r;
|
|
236
|
-
n && (r = n.baseOptions);
|
|
237
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {};
|
|
238
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
239
|
-
let i = r && r.headers ? r.headers : {};
|
|
240
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
241
|
-
url: O(a),
|
|
242
|
-
options: o
|
|
243
|
-
};
|
|
244
|
-
},
|
|
245
|
-
/**
|
|
246
|
-
*
|
|
247
|
-
* @param {number} userId
|
|
248
|
-
* @param {number} id
|
|
249
|
-
* @param {*} [options] Override http request option.
|
|
250
|
-
* @throws {RequiredError}
|
|
251
|
-
*/
|
|
252
|
-
deleteCollaborator: async (t, e, s = {}) => {
|
|
253
|
-
P("deleteCollaborator", "userId", t), P("deleteCollaborator", "id", e);
|
|
254
|
-
const a = "/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}", encodeURIComponent(String(t))).replace("{id}", encodeURIComponent(String(e))), r = new URL(a, m);
|
|
255
|
-
let o;
|
|
256
|
-
n && (o = n.baseOptions);
|
|
257
|
-
const l = { method: "DELETE", ...o, ...s }, c = {}, i = {};
|
|
258
|
-
await C(c, n), V(r, i);
|
|
259
|
-
let d = o && o.headers ? o.headers : {};
|
|
260
|
-
return l.headers = { ...c, ...d, ...s.headers }, {
|
|
261
|
-
url: O(r),
|
|
262
|
-
options: l
|
|
263
|
-
};
|
|
264
|
-
},
|
|
265
|
-
/**
|
|
266
|
-
*
|
|
267
|
-
* @param {*} [options] Override http request option.
|
|
268
|
-
* @throws {RequiredError}
|
|
269
|
-
*/
|
|
270
|
-
emptyTrash: async (t = {}) => {
|
|
271
|
-
const e = "/rest/v1/collection/-99", s = new URL(e, m);
|
|
272
|
-
let a;
|
|
273
|
-
n && (a = n.baseOptions);
|
|
274
|
-
const r = { method: "DELETE", ...a, ...t }, o = {}, l = {};
|
|
275
|
-
await C(o, n), V(s, l);
|
|
276
|
-
let c = a && a.headers ? a.headers : {};
|
|
277
|
-
return r.headers = { ...o, ...c, ...t.headers }, {
|
|
278
|
-
url: O(s),
|
|
279
|
-
options: r
|
|
280
|
-
};
|
|
281
|
-
},
|
|
282
|
-
/**
|
|
283
|
-
*
|
|
284
|
-
* @param {*} [options] Override http request option.
|
|
285
|
-
* @throws {RequiredError}
|
|
286
|
-
*/
|
|
287
|
-
getChildCollections: async (t = {}) => {
|
|
288
|
-
const e = "/rest/v1/collections/childrens", s = new URL(e, m);
|
|
289
|
-
let a;
|
|
290
|
-
n && (a = n.baseOptions);
|
|
291
|
-
const r = { method: "GET", ...a, ...t }, o = {}, l = {};
|
|
292
|
-
await C(o, n), V(s, l);
|
|
293
|
-
let c = a && a.headers ? a.headers : {};
|
|
294
|
-
return r.headers = { ...o, ...c, ...t.headers }, {
|
|
295
|
-
url: O(s),
|
|
296
|
-
options: r
|
|
297
|
-
};
|
|
298
|
-
},
|
|
299
|
-
/**
|
|
300
|
-
*
|
|
301
|
-
* @param {number} id
|
|
302
|
-
* @param {*} [options] Override http request option.
|
|
303
|
-
* @throws {RequiredError}
|
|
304
|
-
*/
|
|
305
|
-
getCollaborators: async (t, e = {}) => {
|
|
306
|
-
P("getCollaborators", "id", t);
|
|
307
|
-
const s = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
308
|
-
let r;
|
|
309
|
-
n && (r = n.baseOptions);
|
|
310
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
311
|
-
await C(l, n), V(a, c);
|
|
312
|
-
let i = r && r.headers ? r.headers : {};
|
|
313
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
314
|
-
url: O(a),
|
|
315
|
-
options: o
|
|
316
|
-
};
|
|
317
|
-
},
|
|
318
|
-
/**
|
|
319
|
-
*
|
|
320
|
-
* @param {number} id
|
|
321
|
-
* @param {*} [options] Override http request option.
|
|
322
|
-
* @throws {RequiredError}
|
|
323
|
-
*/
|
|
324
|
-
getCollection: async (t, e = {}) => {
|
|
325
|
-
P("getCollection", "id", t);
|
|
326
|
-
const s = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
327
|
-
let r;
|
|
328
|
-
n && (r = n.baseOptions);
|
|
329
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
330
|
-
await C(l, n), V(a, c);
|
|
331
|
-
let i = r && r.headers ? r.headers : {};
|
|
332
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
333
|
-
url: O(a),
|
|
334
|
-
options: o
|
|
335
|
-
};
|
|
336
|
-
},
|
|
337
|
-
/**
|
|
338
|
-
*
|
|
339
|
-
* @param {*} [options] Override http request option.
|
|
340
|
-
* @throws {RequiredError}
|
|
341
|
-
*/
|
|
342
|
-
getFeaturedCovers: async (t = {}) => {
|
|
343
|
-
const e = "/rest/v1/collections/covers", s = new URL(e, m);
|
|
344
|
-
let a;
|
|
345
|
-
n && (a = n.baseOptions);
|
|
346
|
-
const r = { method: "GET", ...a, ...t }, o = {}, l = {};
|
|
347
|
-
await C(o, n), V(s, l);
|
|
348
|
-
let c = a && a.headers ? a.headers : {};
|
|
349
|
-
return r.headers = { ...o, ...c, ...t.headers }, {
|
|
350
|
-
url: O(s),
|
|
351
|
-
options: r
|
|
352
|
-
};
|
|
353
|
-
},
|
|
354
|
-
/**
|
|
355
|
-
*
|
|
356
|
-
* @param {*} [options] Override http request option.
|
|
357
|
-
* @throws {RequiredError}
|
|
358
|
-
*/
|
|
359
|
-
getRootCollections: async (t = {}) => {
|
|
360
|
-
const e = "/rest/v1/collections", s = new URL(e, m);
|
|
361
|
-
let a;
|
|
362
|
-
n && (a = n.baseOptions);
|
|
363
|
-
const r = { method: "GET", ...a, ...t }, o = {}, l = {};
|
|
364
|
-
await C(o, n), V(s, l);
|
|
365
|
-
let c = a && a.headers ? a.headers : {};
|
|
366
|
-
return r.headers = { ...o, ...c, ...t.headers }, {
|
|
367
|
-
url: O(s),
|
|
368
|
-
options: r
|
|
369
|
-
};
|
|
370
|
-
},
|
|
371
|
-
/**
|
|
372
|
-
*
|
|
373
|
-
* @param {*} [options] Override http request option.
|
|
374
|
-
* @throws {RequiredError}
|
|
375
|
-
*/
|
|
376
|
-
getSystemCollectionStats: async (t = {}) => {
|
|
377
|
-
const e = "/rest/v1/user/stats", s = new URL(e, m);
|
|
378
|
-
let a;
|
|
379
|
-
n && (a = n.baseOptions);
|
|
380
|
-
const r = { method: "GET", ...a, ...t }, o = {}, l = {};
|
|
381
|
-
await C(o, n), V(s, l);
|
|
382
|
-
let c = a && a.headers ? a.headers : {};
|
|
383
|
-
return r.headers = { ...o, ...c, ...t.headers }, {
|
|
384
|
-
url: O(s),
|
|
385
|
-
options: r
|
|
386
|
-
};
|
|
387
|
-
},
|
|
388
|
-
/**
|
|
389
|
-
*
|
|
390
|
-
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
391
|
-
* @param {*} [options] Override http request option.
|
|
392
|
-
* @throws {RequiredError}
|
|
393
|
-
*/
|
|
394
|
-
mergeCollections: async (t, e = {}) => {
|
|
395
|
-
const s = "/rest/v1/collections/merge", a = new URL(s, m);
|
|
396
|
-
let r;
|
|
397
|
-
n && (r = n.baseOptions);
|
|
398
|
-
const o = { method: "PUT", ...r, ...e }, l = {}, c = {};
|
|
399
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
400
|
-
let i = r && r.headers ? r.headers : {};
|
|
401
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
402
|
-
url: O(a),
|
|
403
|
-
options: o
|
|
404
|
-
};
|
|
405
|
-
},
|
|
406
|
-
/**
|
|
407
|
-
*
|
|
408
|
-
* @param {*} [options] Override http request option.
|
|
409
|
-
* @throws {RequiredError}
|
|
410
|
-
*/
|
|
411
|
-
removeAllEmptyCollections: async (t = {}) => {
|
|
412
|
-
const e = "/rest/v1/collections/clean", s = new URL(e, m);
|
|
413
|
-
let a;
|
|
414
|
-
n && (a = n.baseOptions);
|
|
415
|
-
const r = { method: "PUT", ...a, ...t }, o = {}, l = {};
|
|
416
|
-
await C(o, n), V(s, l);
|
|
417
|
-
let c = a && a.headers ? a.headers : {};
|
|
418
|
-
return r.headers = { ...o, ...c, ...t.headers }, {
|
|
419
|
-
url: O(s),
|
|
420
|
-
options: r
|
|
421
|
-
};
|
|
422
|
-
},
|
|
423
|
-
/**
|
|
424
|
-
*
|
|
425
|
-
* @param {number} id
|
|
426
|
-
* @param {*} [options] Override http request option.
|
|
427
|
-
* @throws {RequiredError}
|
|
428
|
-
*/
|
|
429
|
-
removeCollection: async (t, e = {}) => {
|
|
430
|
-
P("removeCollection", "id", t);
|
|
431
|
-
const s = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
432
|
-
let r;
|
|
433
|
-
n && (r = n.baseOptions);
|
|
434
|
-
const o = { method: "DELETE", ...r, ...e }, l = {}, c = {};
|
|
435
|
-
await C(l, n), V(a, c);
|
|
436
|
-
let i = r && r.headers ? r.headers : {};
|
|
437
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
438
|
-
url: O(a),
|
|
439
|
-
options: o
|
|
440
|
-
};
|
|
441
|
-
},
|
|
442
|
-
/**
|
|
443
|
-
*
|
|
444
|
-
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
445
|
-
* @param {*} [options] Override http request option.
|
|
446
|
-
* @throws {RequiredError}
|
|
447
|
-
*/
|
|
448
|
-
removeCollections: async (t, e = {}) => {
|
|
449
|
-
const s = "/rest/v1/collections", a = new URL(s, m);
|
|
450
|
-
let r;
|
|
451
|
-
n && (r = n.baseOptions);
|
|
452
|
-
const o = { method: "DELETE", ...r, ...e }, l = {}, c = {};
|
|
453
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
454
|
-
let i = r && r.headers ? r.headers : {};
|
|
455
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
456
|
-
url: O(a),
|
|
457
|
-
options: o
|
|
458
|
-
};
|
|
459
|
-
},
|
|
460
|
-
/**
|
|
461
|
-
*
|
|
462
|
-
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
463
|
-
* @param {*} [options] Override http request option.
|
|
464
|
-
* @throws {RequiredError}
|
|
465
|
-
*/
|
|
466
|
-
reorderAllCollections: async (t, e = {}) => {
|
|
467
|
-
const s = "/rest/v1/collections", a = new URL(s, m);
|
|
468
|
-
let r;
|
|
469
|
-
n && (r = n.baseOptions);
|
|
470
|
-
const o = { method: "PUT", ...r, ...e }, l = {}, c = {};
|
|
471
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
472
|
-
let i = r && r.headers ? r.headers : {};
|
|
473
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
474
|
-
url: O(a),
|
|
475
|
-
options: o
|
|
476
|
-
};
|
|
477
|
-
},
|
|
478
|
-
/**
|
|
479
|
-
*
|
|
480
|
-
* @param {string} text
|
|
481
|
-
* @param {*} [options] Override http request option.
|
|
482
|
-
* @throws {RequiredError}
|
|
483
|
-
*/
|
|
484
|
-
searchCovers: async (t, e = {}) => {
|
|
485
|
-
P("searchCovers", "text", t);
|
|
486
|
-
const s = "/rest/v1/collections/covers/{text}".replace("{text}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
487
|
-
let r;
|
|
488
|
-
n && (r = n.baseOptions);
|
|
489
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
490
|
-
await C(l, n), V(a, c);
|
|
491
|
-
let i = r && r.headers ? r.headers : {};
|
|
492
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
493
|
-
url: O(a),
|
|
494
|
-
options: o
|
|
495
|
-
};
|
|
496
|
-
},
|
|
497
|
-
/**
|
|
498
|
-
*
|
|
499
|
-
* @param {number} id
|
|
500
|
-
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
501
|
-
* @param {*} [options] Override http request option.
|
|
502
|
-
* @throws {RequiredError}
|
|
503
|
-
*/
|
|
504
|
-
shareCollection: async (t, e, s = {}) => {
|
|
505
|
-
P("shareCollection", "id", t);
|
|
506
|
-
const a = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
507
|
-
let o;
|
|
508
|
-
n && (o = n.baseOptions);
|
|
509
|
-
const l = { method: "POST", ...o, ...s }, c = {}, i = {};
|
|
510
|
-
await C(c, n), c["Content-Type"] = "application/json", V(r, i);
|
|
511
|
-
let d = o && o.headers ? o.headers : {};
|
|
512
|
-
return l.headers = { ...c, ...d, ...s.headers }, l.data = y(e, l, n), {
|
|
513
|
-
url: O(r),
|
|
514
|
-
options: l
|
|
515
|
-
};
|
|
516
|
-
},
|
|
517
|
-
/**
|
|
518
|
-
*
|
|
519
|
-
* @param {number} id
|
|
520
|
-
* @param {*} [options] Override http request option.
|
|
521
|
-
* @throws {RequiredError}
|
|
522
|
-
*/
|
|
523
|
-
unshareOrLeaveCollection: async (t, e = {}) => {
|
|
524
|
-
P("unshareOrLeaveCollection", "id", t);
|
|
525
|
-
const s = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
526
|
-
let r;
|
|
527
|
-
n && (r = n.baseOptions);
|
|
528
|
-
const o = { method: "DELETE", ...r, ...e }, l = {}, c = {};
|
|
529
|
-
await C(l, n), V(a, c);
|
|
530
|
-
let i = r && r.headers ? r.headers : {};
|
|
531
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
532
|
-
url: O(a),
|
|
533
|
-
options: o
|
|
534
|
-
};
|
|
535
|
-
},
|
|
536
|
-
/**
|
|
537
|
-
*
|
|
538
|
-
* @param {number} id
|
|
539
|
-
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
540
|
-
* @param {*} [options] Override http request option.
|
|
541
|
-
* @throws {RequiredError}
|
|
542
|
-
*/
|
|
543
|
-
updateCollection: async (t, e, s = {}) => {
|
|
544
|
-
P("updateCollection", "id", t);
|
|
545
|
-
const a = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
546
|
-
let o;
|
|
547
|
-
n && (o = n.baseOptions);
|
|
548
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {};
|
|
549
|
-
await C(c, n), c["Content-Type"] = "application/json", V(r, i);
|
|
550
|
-
let d = o && o.headers ? o.headers : {};
|
|
551
|
-
return l.headers = { ...c, ...d, ...s.headers }, l.data = y(e, l, n), {
|
|
552
|
-
url: O(r),
|
|
553
|
-
options: l
|
|
554
|
-
};
|
|
555
|
-
},
|
|
556
|
-
/**
|
|
557
|
-
*
|
|
558
|
-
* @param {number} id
|
|
559
|
-
* @param {File} [cover]
|
|
560
|
-
* @param {*} [options] Override http request option.
|
|
561
|
-
* @throws {RequiredError}
|
|
562
|
-
*/
|
|
563
|
-
uploadCollectionCover: async (t, e, s = {}) => {
|
|
564
|
-
P("uploadCollectionCover", "id", t);
|
|
565
|
-
const a = "/rest/v1/collection/{id}/cover".replace("{id}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
566
|
-
let o;
|
|
567
|
-
n && (o = n.baseOptions);
|
|
568
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {}, d = new (n && n.formDataCtor || FormData)();
|
|
569
|
-
await C(c, n), e !== void 0 && d.append("cover", e), c["Content-Type"] = "multipart/form-data", V(r, i);
|
|
570
|
-
let R = o && o.headers ? o.headers : {};
|
|
571
|
-
return l.headers = { ...c, ...R, ...s.headers }, l.data = d, {
|
|
572
|
-
url: O(r),
|
|
573
|
-
options: l
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
};
|
|
577
|
-
}, A = function(n) {
|
|
578
|
-
const t = M(n);
|
|
579
|
-
return {
|
|
580
|
-
/**
|
|
581
|
-
*
|
|
582
|
-
* @param {number} id
|
|
583
|
-
* @param {*} [options] Override http request option.
|
|
584
|
-
* @throws {RequiredError}
|
|
585
|
-
*/
|
|
586
|
-
async acceptInvitation(e, s) {
|
|
587
|
-
const a = await t.acceptInvitation(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.acceptInvitation"]?.[r]?.url;
|
|
588
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
589
|
-
},
|
|
590
|
-
/**
|
|
591
|
-
*
|
|
592
|
-
* @param {number} userId
|
|
593
|
-
* @param {number} id
|
|
594
|
-
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
595
|
-
* @param {*} [options] Override http request option.
|
|
596
|
-
* @throws {RequiredError}
|
|
597
|
-
*/
|
|
598
|
-
async changeCollaboratorAccessLevel(e, s, a, r) {
|
|
599
|
-
const o = await t.changeCollaboratorAccessLevel(e, s, a, r), l = n?.serverIndex ?? 0, c = u["CollectionApi.changeCollaboratorAccessLevel"]?.[l]?.url;
|
|
600
|
-
return (i, d) => v(o, h, p, n)(i, c || d);
|
|
601
|
-
},
|
|
602
|
-
/**
|
|
603
|
-
*
|
|
604
|
-
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
605
|
-
* @param {*} [options] Override http request option.
|
|
606
|
-
* @throws {RequiredError}
|
|
607
|
-
*/
|
|
608
|
-
async createCollection(e, s) {
|
|
609
|
-
const a = await t.createCollection(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.createCollection"]?.[r]?.url;
|
|
610
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
611
|
-
},
|
|
612
|
-
/**
|
|
613
|
-
*
|
|
614
|
-
* @param {number} userId
|
|
615
|
-
* @param {number} id
|
|
616
|
-
* @param {*} [options] Override http request option.
|
|
617
|
-
* @throws {RequiredError}
|
|
618
|
-
*/
|
|
619
|
-
async deleteCollaborator(e, s, a) {
|
|
620
|
-
const r = await t.deleteCollaborator(e, s, a), o = n?.serverIndex ?? 0, l = u["CollectionApi.deleteCollaborator"]?.[o]?.url;
|
|
621
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
622
|
-
},
|
|
623
|
-
/**
|
|
624
|
-
*
|
|
625
|
-
* @param {*} [options] Override http request option.
|
|
626
|
-
* @throws {RequiredError}
|
|
627
|
-
*/
|
|
628
|
-
async emptyTrash(e) {
|
|
629
|
-
const s = await t.emptyTrash(e), a = n?.serverIndex ?? 0, r = u["CollectionApi.emptyTrash"]?.[a]?.url;
|
|
630
|
-
return (o, l) => v(s, h, p, n)(o, r || l);
|
|
631
|
-
},
|
|
632
|
-
/**
|
|
633
|
-
*
|
|
634
|
-
* @param {*} [options] Override http request option.
|
|
635
|
-
* @throws {RequiredError}
|
|
636
|
-
*/
|
|
637
|
-
async getChildCollections(e) {
|
|
638
|
-
const s = await t.getChildCollections(e), a = n?.serverIndex ?? 0, r = u["CollectionApi.getChildCollections"]?.[a]?.url;
|
|
639
|
-
return (o, l) => v(s, h, p, n)(o, r || l);
|
|
640
|
-
},
|
|
641
|
-
/**
|
|
642
|
-
*
|
|
643
|
-
* @param {number} id
|
|
644
|
-
* @param {*} [options] Override http request option.
|
|
645
|
-
* @throws {RequiredError}
|
|
646
|
-
*/
|
|
647
|
-
async getCollaborators(e, s) {
|
|
648
|
-
const a = await t.getCollaborators(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.getCollaborators"]?.[r]?.url;
|
|
649
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
650
|
-
},
|
|
651
|
-
/**
|
|
652
|
-
*
|
|
653
|
-
* @param {number} id
|
|
654
|
-
* @param {*} [options] Override http request option.
|
|
655
|
-
* @throws {RequiredError}
|
|
656
|
-
*/
|
|
657
|
-
async getCollection(e, s) {
|
|
658
|
-
const a = await t.getCollection(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.getCollection"]?.[r]?.url;
|
|
659
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
660
|
-
},
|
|
661
|
-
/**
|
|
662
|
-
*
|
|
663
|
-
* @param {*} [options] Override http request option.
|
|
664
|
-
* @throws {RequiredError}
|
|
665
|
-
*/
|
|
666
|
-
async getFeaturedCovers(e) {
|
|
667
|
-
const s = await t.getFeaturedCovers(e), a = n?.serverIndex ?? 0, r = u["CollectionApi.getFeaturedCovers"]?.[a]?.url;
|
|
668
|
-
return (o, l) => v(s, h, p, n)(o, r || l);
|
|
669
|
-
},
|
|
670
|
-
/**
|
|
671
|
-
*
|
|
672
|
-
* @param {*} [options] Override http request option.
|
|
673
|
-
* @throws {RequiredError}
|
|
674
|
-
*/
|
|
675
|
-
async getRootCollections(e) {
|
|
676
|
-
const s = await t.getRootCollections(e), a = n?.serverIndex ?? 0, r = u["CollectionApi.getRootCollections"]?.[a]?.url;
|
|
677
|
-
return (o, l) => v(s, h, p, n)(o, r || l);
|
|
678
|
-
},
|
|
679
|
-
/**
|
|
680
|
-
*
|
|
681
|
-
* @param {*} [options] Override http request option.
|
|
682
|
-
* @throws {RequiredError}
|
|
683
|
-
*/
|
|
684
|
-
async getSystemCollectionStats(e) {
|
|
685
|
-
const s = await t.getSystemCollectionStats(e), a = n?.serverIndex ?? 0, r = u["CollectionApi.getSystemCollectionStats"]?.[a]?.url;
|
|
686
|
-
return (o, l) => v(s, h, p, n)(o, r || l);
|
|
687
|
-
},
|
|
688
|
-
/**
|
|
689
|
-
*
|
|
690
|
-
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
691
|
-
* @param {*} [options] Override http request option.
|
|
692
|
-
* @throws {RequiredError}
|
|
693
|
-
*/
|
|
694
|
-
async mergeCollections(e, s) {
|
|
695
|
-
const a = await t.mergeCollections(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.mergeCollections"]?.[r]?.url;
|
|
696
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
697
|
-
},
|
|
698
|
-
/**
|
|
699
|
-
*
|
|
700
|
-
* @param {*} [options] Override http request option.
|
|
701
|
-
* @throws {RequiredError}
|
|
702
|
-
*/
|
|
703
|
-
async removeAllEmptyCollections(e) {
|
|
704
|
-
const s = await t.removeAllEmptyCollections(e), a = n?.serverIndex ?? 0, r = u["CollectionApi.removeAllEmptyCollections"]?.[a]?.url;
|
|
705
|
-
return (o, l) => v(s, h, p, n)(o, r || l);
|
|
706
|
-
},
|
|
707
|
-
/**
|
|
708
|
-
*
|
|
709
|
-
* @param {number} id
|
|
710
|
-
* @param {*} [options] Override http request option.
|
|
711
|
-
* @throws {RequiredError}
|
|
712
|
-
*/
|
|
713
|
-
async removeCollection(e, s) {
|
|
714
|
-
const a = await t.removeCollection(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.removeCollection"]?.[r]?.url;
|
|
715
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
716
|
-
},
|
|
717
|
-
/**
|
|
718
|
-
*
|
|
719
|
-
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
720
|
-
* @param {*} [options] Override http request option.
|
|
721
|
-
* @throws {RequiredError}
|
|
722
|
-
*/
|
|
723
|
-
async removeCollections(e, s) {
|
|
724
|
-
const a = await t.removeCollections(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.removeCollections"]?.[r]?.url;
|
|
725
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
726
|
-
},
|
|
727
|
-
/**
|
|
728
|
-
*
|
|
729
|
-
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
730
|
-
* @param {*} [options] Override http request option.
|
|
731
|
-
* @throws {RequiredError}
|
|
732
|
-
*/
|
|
733
|
-
async reorderAllCollections(e, s) {
|
|
734
|
-
const a = await t.reorderAllCollections(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.reorderAllCollections"]?.[r]?.url;
|
|
735
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
736
|
-
},
|
|
737
|
-
/**
|
|
738
|
-
*
|
|
739
|
-
* @param {string} text
|
|
740
|
-
* @param {*} [options] Override http request option.
|
|
741
|
-
* @throws {RequiredError}
|
|
742
|
-
*/
|
|
743
|
-
async searchCovers(e, s) {
|
|
744
|
-
const a = await t.searchCovers(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.searchCovers"]?.[r]?.url;
|
|
745
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
746
|
-
},
|
|
747
|
-
/**
|
|
748
|
-
*
|
|
749
|
-
* @param {number} id
|
|
750
|
-
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
751
|
-
* @param {*} [options] Override http request option.
|
|
752
|
-
* @throws {RequiredError}
|
|
753
|
-
*/
|
|
754
|
-
async shareCollection(e, s, a) {
|
|
755
|
-
const r = await t.shareCollection(e, s, a), o = n?.serverIndex ?? 0, l = u["CollectionApi.shareCollection"]?.[o]?.url;
|
|
756
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
757
|
-
},
|
|
758
|
-
/**
|
|
759
|
-
*
|
|
760
|
-
* @param {number} id
|
|
761
|
-
* @param {*} [options] Override http request option.
|
|
762
|
-
* @throws {RequiredError}
|
|
763
|
-
*/
|
|
764
|
-
async unshareOrLeaveCollection(e, s) {
|
|
765
|
-
const a = await t.unshareOrLeaveCollection(e, s), r = n?.serverIndex ?? 0, o = u["CollectionApi.unshareOrLeaveCollection"]?.[r]?.url;
|
|
766
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
767
|
-
},
|
|
768
|
-
/**
|
|
769
|
-
*
|
|
770
|
-
* @param {number} id
|
|
771
|
-
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
772
|
-
* @param {*} [options] Override http request option.
|
|
773
|
-
* @throws {RequiredError}
|
|
774
|
-
*/
|
|
775
|
-
async updateCollection(e, s, a) {
|
|
776
|
-
const r = await t.updateCollection(e, s, a), o = n?.serverIndex ?? 0, l = u["CollectionApi.updateCollection"]?.[o]?.url;
|
|
777
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
778
|
-
},
|
|
779
|
-
/**
|
|
780
|
-
*
|
|
781
|
-
* @param {number} id
|
|
782
|
-
* @param {File} [cover]
|
|
783
|
-
* @param {*} [options] Override http request option.
|
|
784
|
-
* @throws {RequiredError}
|
|
785
|
-
*/
|
|
786
|
-
async uploadCollectionCover(e, s, a) {
|
|
787
|
-
const r = await t.uploadCollectionCover(e, s, a), o = n?.serverIndex ?? 0, l = u["CollectionApi.uploadCollectionCover"]?.[o]?.url;
|
|
788
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
789
|
-
}
|
|
790
|
-
};
|
|
791
|
-
}, me = function(n, t, e) {
|
|
792
|
-
const s = A(n);
|
|
793
|
-
return {
|
|
794
|
-
/**
|
|
795
|
-
*
|
|
796
|
-
* @param {number} id
|
|
797
|
-
* @param {*} [options] Override http request option.
|
|
798
|
-
* @throws {RequiredError}
|
|
799
|
-
*/
|
|
800
|
-
acceptInvitation(a, r) {
|
|
801
|
-
return s.acceptInvitation(a, r).then((o) => o(e, t));
|
|
802
|
-
},
|
|
803
|
-
/**
|
|
804
|
-
*
|
|
805
|
-
* @param {number} userId
|
|
806
|
-
* @param {number} id
|
|
807
|
-
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
808
|
-
* @param {*} [options] Override http request option.
|
|
809
|
-
* @throws {RequiredError}
|
|
810
|
-
*/
|
|
811
|
-
changeCollaboratorAccessLevel(a, r, o, l) {
|
|
812
|
-
return s.changeCollaboratorAccessLevel(a, r, o, l).then((c) => c(e, t));
|
|
813
|
-
},
|
|
814
|
-
/**
|
|
815
|
-
*
|
|
816
|
-
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
817
|
-
* @param {*} [options] Override http request option.
|
|
818
|
-
* @throws {RequiredError}
|
|
819
|
-
*/
|
|
820
|
-
createCollection(a, r) {
|
|
821
|
-
return s.createCollection(a, r).then((o) => o(e, t));
|
|
822
|
-
},
|
|
823
|
-
/**
|
|
824
|
-
*
|
|
825
|
-
* @param {number} userId
|
|
826
|
-
* @param {number} id
|
|
827
|
-
* @param {*} [options] Override http request option.
|
|
828
|
-
* @throws {RequiredError}
|
|
829
|
-
*/
|
|
830
|
-
deleteCollaborator(a, r, o) {
|
|
831
|
-
return s.deleteCollaborator(a, r, o).then((l) => l(e, t));
|
|
832
|
-
},
|
|
833
|
-
/**
|
|
834
|
-
*
|
|
835
|
-
* @param {*} [options] Override http request option.
|
|
836
|
-
* @throws {RequiredError}
|
|
837
|
-
*/
|
|
838
|
-
emptyTrash(a) {
|
|
839
|
-
return s.emptyTrash(a).then((r) => r(e, t));
|
|
840
|
-
},
|
|
841
|
-
/**
|
|
842
|
-
*
|
|
843
|
-
* @param {*} [options] Override http request option.
|
|
844
|
-
* @throws {RequiredError}
|
|
845
|
-
*/
|
|
846
|
-
getChildCollections(a) {
|
|
847
|
-
return s.getChildCollections(a).then((r) => r(e, t));
|
|
848
|
-
},
|
|
849
|
-
/**
|
|
850
|
-
*
|
|
851
|
-
* @param {number} id
|
|
852
|
-
* @param {*} [options] Override http request option.
|
|
853
|
-
* @throws {RequiredError}
|
|
854
|
-
*/
|
|
855
|
-
getCollaborators(a, r) {
|
|
856
|
-
return s.getCollaborators(a, r).then((o) => o(e, t));
|
|
857
|
-
},
|
|
858
|
-
/**
|
|
859
|
-
*
|
|
860
|
-
* @param {number} id
|
|
861
|
-
* @param {*} [options] Override http request option.
|
|
862
|
-
* @throws {RequiredError}
|
|
863
|
-
*/
|
|
864
|
-
getCollection(a, r) {
|
|
865
|
-
return s.getCollection(a, r).then((o) => o(e, t));
|
|
866
|
-
},
|
|
867
|
-
/**
|
|
868
|
-
*
|
|
869
|
-
* @param {*} [options] Override http request option.
|
|
870
|
-
* @throws {RequiredError}
|
|
871
|
-
*/
|
|
872
|
-
getFeaturedCovers(a) {
|
|
873
|
-
return s.getFeaturedCovers(a).then((r) => r(e, t));
|
|
874
|
-
},
|
|
875
|
-
/**
|
|
876
|
-
*
|
|
877
|
-
* @param {*} [options] Override http request option.
|
|
878
|
-
* @throws {RequiredError}
|
|
879
|
-
*/
|
|
880
|
-
getRootCollections(a) {
|
|
881
|
-
return s.getRootCollections(a).then((r) => r(e, t));
|
|
882
|
-
},
|
|
883
|
-
/**
|
|
884
|
-
*
|
|
885
|
-
* @param {*} [options] Override http request option.
|
|
886
|
-
* @throws {RequiredError}
|
|
887
|
-
*/
|
|
888
|
-
getSystemCollectionStats(a) {
|
|
889
|
-
return s.getSystemCollectionStats(a).then((r) => r(e, t));
|
|
890
|
-
},
|
|
891
|
-
/**
|
|
892
|
-
*
|
|
893
|
-
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
894
|
-
* @param {*} [options] Override http request option.
|
|
895
|
-
* @throws {RequiredError}
|
|
896
|
-
*/
|
|
897
|
-
mergeCollections(a, r) {
|
|
898
|
-
return s.mergeCollections(a, r).then((o) => o(e, t));
|
|
899
|
-
},
|
|
900
|
-
/**
|
|
901
|
-
*
|
|
902
|
-
* @param {*} [options] Override http request option.
|
|
903
|
-
* @throws {RequiredError}
|
|
904
|
-
*/
|
|
905
|
-
removeAllEmptyCollections(a) {
|
|
906
|
-
return s.removeAllEmptyCollections(a).then((r) => r(e, t));
|
|
907
|
-
},
|
|
908
|
-
/**
|
|
909
|
-
*
|
|
910
|
-
* @param {number} id
|
|
911
|
-
* @param {*} [options] Override http request option.
|
|
912
|
-
* @throws {RequiredError}
|
|
913
|
-
*/
|
|
914
|
-
removeCollection(a, r) {
|
|
915
|
-
return s.removeCollection(a, r).then((o) => o(e, t));
|
|
916
|
-
},
|
|
917
|
-
/**
|
|
918
|
-
*
|
|
919
|
-
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
920
|
-
* @param {*} [options] Override http request option.
|
|
921
|
-
* @throws {RequiredError}
|
|
922
|
-
*/
|
|
923
|
-
removeCollections(a, r) {
|
|
924
|
-
return s.removeCollections(a, r).then((o) => o(e, t));
|
|
925
|
-
},
|
|
926
|
-
/**
|
|
927
|
-
*
|
|
928
|
-
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
929
|
-
* @param {*} [options] Override http request option.
|
|
930
|
-
* @throws {RequiredError}
|
|
931
|
-
*/
|
|
932
|
-
reorderAllCollections(a, r) {
|
|
933
|
-
return s.reorderAllCollections(a, r).then((o) => o(e, t));
|
|
934
|
-
},
|
|
935
|
-
/**
|
|
936
|
-
*
|
|
937
|
-
* @param {string} text
|
|
938
|
-
* @param {*} [options] Override http request option.
|
|
939
|
-
* @throws {RequiredError}
|
|
940
|
-
*/
|
|
941
|
-
searchCovers(a, r) {
|
|
942
|
-
return s.searchCovers(a, r).then((o) => o(e, t));
|
|
943
|
-
},
|
|
944
|
-
/**
|
|
945
|
-
*
|
|
946
|
-
* @param {number} id
|
|
947
|
-
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
948
|
-
* @param {*} [options] Override http request option.
|
|
949
|
-
* @throws {RequiredError}
|
|
950
|
-
*/
|
|
951
|
-
shareCollection(a, r, o) {
|
|
952
|
-
return s.shareCollection(a, r, o).then((l) => l(e, t));
|
|
953
|
-
},
|
|
954
|
-
/**
|
|
955
|
-
*
|
|
956
|
-
* @param {number} id
|
|
957
|
-
* @param {*} [options] Override http request option.
|
|
958
|
-
* @throws {RequiredError}
|
|
959
|
-
*/
|
|
960
|
-
unshareOrLeaveCollection(a, r) {
|
|
961
|
-
return s.unshareOrLeaveCollection(a, r).then((o) => o(e, t));
|
|
962
|
-
},
|
|
963
|
-
/**
|
|
964
|
-
*
|
|
965
|
-
* @param {number} id
|
|
966
|
-
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
967
|
-
* @param {*} [options] Override http request option.
|
|
968
|
-
* @throws {RequiredError}
|
|
969
|
-
*/
|
|
970
|
-
updateCollection(a, r, o) {
|
|
971
|
-
return s.updateCollection(a, r, o).then((l) => l(e, t));
|
|
972
|
-
},
|
|
973
|
-
/**
|
|
974
|
-
*
|
|
975
|
-
* @param {number} id
|
|
976
|
-
* @param {File} [cover]
|
|
977
|
-
* @param {*} [options] Override http request option.
|
|
978
|
-
* @throws {RequiredError}
|
|
979
|
-
*/
|
|
980
|
-
uploadCollectionCover(a, r, o) {
|
|
981
|
-
return s.uploadCollectionCover(a, r, o).then((l) => l(e, t));
|
|
982
|
-
}
|
|
983
|
-
};
|
|
984
|
-
};
|
|
985
|
-
let G = class extends S {
|
|
986
|
-
/**
|
|
987
|
-
*
|
|
988
|
-
* @param {number} id
|
|
989
|
-
* @param {*} [options] Override http request option.
|
|
990
|
-
* @throws {RequiredError}
|
|
991
|
-
* @memberof CollectionApi
|
|
992
|
-
*/
|
|
993
|
-
acceptInvitation(t, e) {
|
|
994
|
-
return A(this.configuration).acceptInvitation(t, e).then((s) => s(this.axios, this.basePath));
|
|
995
|
-
}
|
|
996
|
-
/**
|
|
997
|
-
*
|
|
998
|
-
* @param {number} userId
|
|
999
|
-
* @param {number} id
|
|
1000
|
-
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
1001
|
-
* @param {*} [options] Override http request option.
|
|
1002
|
-
* @throws {RequiredError}
|
|
1003
|
-
* @memberof CollectionApi
|
|
1004
|
-
*/
|
|
1005
|
-
changeCollaboratorAccessLevel(t, e, s, a) {
|
|
1006
|
-
return A(this.configuration).changeCollaboratorAccessLevel(t, e, s, a).then((r) => r(this.axios, this.basePath));
|
|
1007
|
-
}
|
|
1008
|
-
/**
|
|
1009
|
-
*
|
|
1010
|
-
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
1011
|
-
* @param {*} [options] Override http request option.
|
|
1012
|
-
* @throws {RequiredError}
|
|
1013
|
-
* @memberof CollectionApi
|
|
1014
|
-
*/
|
|
1015
|
-
createCollection(t, e) {
|
|
1016
|
-
return A(this.configuration).createCollection(t, e).then((s) => s(this.axios, this.basePath));
|
|
1017
|
-
}
|
|
1018
|
-
/**
|
|
1019
|
-
*
|
|
1020
|
-
* @param {number} userId
|
|
1021
|
-
* @param {number} id
|
|
1022
|
-
* @param {*} [options] Override http request option.
|
|
1023
|
-
* @throws {RequiredError}
|
|
1024
|
-
* @memberof CollectionApi
|
|
1025
|
-
*/
|
|
1026
|
-
deleteCollaborator(t, e, s) {
|
|
1027
|
-
return A(this.configuration).deleteCollaborator(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
1028
|
-
}
|
|
1029
|
-
/**
|
|
1030
|
-
*
|
|
1031
|
-
* @param {*} [options] Override http request option.
|
|
1032
|
-
* @throws {RequiredError}
|
|
1033
|
-
* @memberof CollectionApi
|
|
1034
|
-
*/
|
|
1035
|
-
emptyTrash(t) {
|
|
1036
|
-
return A(this.configuration).emptyTrash(t).then((e) => e(this.axios, this.basePath));
|
|
1037
|
-
}
|
|
1038
|
-
/**
|
|
1039
|
-
*
|
|
1040
|
-
* @param {*} [options] Override http request option.
|
|
1041
|
-
* @throws {RequiredError}
|
|
1042
|
-
* @memberof CollectionApi
|
|
1043
|
-
*/
|
|
1044
|
-
getChildCollections(t) {
|
|
1045
|
-
return A(this.configuration).getChildCollections(t).then((e) => e(this.axios, this.basePath));
|
|
1046
|
-
}
|
|
1047
|
-
/**
|
|
1048
|
-
*
|
|
1049
|
-
* @param {number} id
|
|
1050
|
-
* @param {*} [options] Override http request option.
|
|
1051
|
-
* @throws {RequiredError}
|
|
1052
|
-
* @memberof CollectionApi
|
|
1053
|
-
*/
|
|
1054
|
-
getCollaborators(t, e) {
|
|
1055
|
-
return A(this.configuration).getCollaborators(t, e).then((s) => s(this.axios, this.basePath));
|
|
1056
|
-
}
|
|
1057
|
-
/**
|
|
1058
|
-
*
|
|
1059
|
-
* @param {number} id
|
|
1060
|
-
* @param {*} [options] Override http request option.
|
|
1061
|
-
* @throws {RequiredError}
|
|
1062
|
-
* @memberof CollectionApi
|
|
1063
|
-
*/
|
|
1064
|
-
getCollection(t, e) {
|
|
1065
|
-
return A(this.configuration).getCollection(t, e).then((s) => s(this.axios, this.basePath));
|
|
1066
|
-
}
|
|
1067
|
-
/**
|
|
1068
|
-
*
|
|
1069
|
-
* @param {*} [options] Override http request option.
|
|
1070
|
-
* @throws {RequiredError}
|
|
1071
|
-
* @memberof CollectionApi
|
|
1072
|
-
*/
|
|
1073
|
-
getFeaturedCovers(t) {
|
|
1074
|
-
return A(this.configuration).getFeaturedCovers(t).then((e) => e(this.axios, this.basePath));
|
|
1075
|
-
}
|
|
1076
|
-
/**
|
|
1077
|
-
*
|
|
1078
|
-
* @param {*} [options] Override http request option.
|
|
1079
|
-
* @throws {RequiredError}
|
|
1080
|
-
* @memberof CollectionApi
|
|
1081
|
-
*/
|
|
1082
|
-
getRootCollections(t) {
|
|
1083
|
-
return A(this.configuration).getRootCollections(t).then((e) => e(this.axios, this.basePath));
|
|
1084
|
-
}
|
|
1085
|
-
/**
|
|
1086
|
-
*
|
|
1087
|
-
* @param {*} [options] Override http request option.
|
|
1088
|
-
* @throws {RequiredError}
|
|
1089
|
-
* @memberof CollectionApi
|
|
1090
|
-
*/
|
|
1091
|
-
getSystemCollectionStats(t) {
|
|
1092
|
-
return A(this.configuration).getSystemCollectionStats(t).then((e) => e(this.axios, this.basePath));
|
|
1093
|
-
}
|
|
1094
|
-
/**
|
|
1095
|
-
*
|
|
1096
|
-
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
1097
|
-
* @param {*} [options] Override http request option.
|
|
1098
|
-
* @throws {RequiredError}
|
|
1099
|
-
* @memberof CollectionApi
|
|
1100
|
-
*/
|
|
1101
|
-
mergeCollections(t, e) {
|
|
1102
|
-
return A(this.configuration).mergeCollections(t, e).then((s) => s(this.axios, this.basePath));
|
|
1103
|
-
}
|
|
1104
|
-
/**
|
|
1105
|
-
*
|
|
1106
|
-
* @param {*} [options] Override http request option.
|
|
1107
|
-
* @throws {RequiredError}
|
|
1108
|
-
* @memberof CollectionApi
|
|
1109
|
-
*/
|
|
1110
|
-
removeAllEmptyCollections(t) {
|
|
1111
|
-
return A(this.configuration).removeAllEmptyCollections(t).then((e) => e(this.axios, this.basePath));
|
|
1112
|
-
}
|
|
1113
|
-
/**
|
|
1114
|
-
*
|
|
1115
|
-
* @param {number} id
|
|
1116
|
-
* @param {*} [options] Override http request option.
|
|
1117
|
-
* @throws {RequiredError}
|
|
1118
|
-
* @memberof CollectionApi
|
|
1119
|
-
*/
|
|
1120
|
-
removeCollection(t, e) {
|
|
1121
|
-
return A(this.configuration).removeCollection(t, e).then((s) => s(this.axios, this.basePath));
|
|
1122
|
-
}
|
|
1123
|
-
/**
|
|
1124
|
-
*
|
|
1125
|
-
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
1126
|
-
* @param {*} [options] Override http request option.
|
|
1127
|
-
* @throws {RequiredError}
|
|
1128
|
-
* @memberof CollectionApi
|
|
1129
|
-
*/
|
|
1130
|
-
removeCollections(t, e) {
|
|
1131
|
-
return A(this.configuration).removeCollections(t, e).then((s) => s(this.axios, this.basePath));
|
|
1132
|
-
}
|
|
1133
|
-
/**
|
|
1134
|
-
*
|
|
1135
|
-
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
1136
|
-
* @param {*} [options] Override http request option.
|
|
1137
|
-
* @throws {RequiredError}
|
|
1138
|
-
* @memberof CollectionApi
|
|
1139
|
-
*/
|
|
1140
|
-
reorderAllCollections(t, e) {
|
|
1141
|
-
return A(this.configuration).reorderAllCollections(t, e).then((s) => s(this.axios, this.basePath));
|
|
1142
|
-
}
|
|
1143
|
-
/**
|
|
1144
|
-
*
|
|
1145
|
-
* @param {string} text
|
|
1146
|
-
* @param {*} [options] Override http request option.
|
|
1147
|
-
* @throws {RequiredError}
|
|
1148
|
-
* @memberof CollectionApi
|
|
1149
|
-
*/
|
|
1150
|
-
searchCovers(t, e) {
|
|
1151
|
-
return A(this.configuration).searchCovers(t, e).then((s) => s(this.axios, this.basePath));
|
|
1152
|
-
}
|
|
1153
|
-
/**
|
|
1154
|
-
*
|
|
1155
|
-
* @param {number} id
|
|
1156
|
-
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
1157
|
-
* @param {*} [options] Override http request option.
|
|
1158
|
-
* @throws {RequiredError}
|
|
1159
|
-
* @memberof CollectionApi
|
|
1160
|
-
*/
|
|
1161
|
-
shareCollection(t, e, s) {
|
|
1162
|
-
return A(this.configuration).shareCollection(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
1163
|
-
}
|
|
1164
|
-
/**
|
|
1165
|
-
*
|
|
1166
|
-
* @param {number} id
|
|
1167
|
-
* @param {*} [options] Override http request option.
|
|
1168
|
-
* @throws {RequiredError}
|
|
1169
|
-
* @memberof CollectionApi
|
|
1170
|
-
*/
|
|
1171
|
-
unshareOrLeaveCollection(t, e) {
|
|
1172
|
-
return A(this.configuration).unshareOrLeaveCollection(t, e).then((s) => s(this.axios, this.basePath));
|
|
1173
|
-
}
|
|
1174
|
-
/**
|
|
1175
|
-
*
|
|
1176
|
-
* @param {number} id
|
|
1177
|
-
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
1178
|
-
* @param {*} [options] Override http request option.
|
|
1179
|
-
* @throws {RequiredError}
|
|
1180
|
-
* @memberof CollectionApi
|
|
1181
|
-
*/
|
|
1182
|
-
updateCollection(t, e, s) {
|
|
1183
|
-
return A(this.configuration).updateCollection(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
1184
|
-
}
|
|
1185
|
-
/**
|
|
1186
|
-
*
|
|
1187
|
-
* @param {number} id
|
|
1188
|
-
* @param {File} [cover]
|
|
1189
|
-
* @param {*} [options] Override http request option.
|
|
1190
|
-
* @throws {RequiredError}
|
|
1191
|
-
* @memberof CollectionApi
|
|
1192
|
-
*/
|
|
1193
|
-
uploadCollectionCover(t, e, s) {
|
|
1194
|
-
return A(this.configuration).uploadCollectionCover(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
1195
|
-
}
|
|
1196
|
-
};
|
|
1197
|
-
const D = function(n) {
|
|
1198
|
-
return {
|
|
1199
|
-
/**
|
|
1200
|
-
*
|
|
1201
|
-
* @param {number} collectionId
|
|
1202
|
-
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1203
|
-
* @param {string} [search]
|
|
1204
|
-
* @param {*} [options] Override http request option.
|
|
1205
|
-
* @throws {RequiredError}
|
|
1206
|
-
*/
|
|
1207
|
-
getFilters: async (t, e, s, a = {}) => {
|
|
1208
|
-
P("getFilters", "collectionId", t);
|
|
1209
|
-
const r = "/rest/v1/filters/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(r, m);
|
|
1210
|
-
let l;
|
|
1211
|
-
n && (l = n.baseOptions);
|
|
1212
|
-
const c = { method: "GET", ...l, ...a }, i = {}, d = {};
|
|
1213
|
-
await C(i, n), e !== void 0 && (d.tagsSort = e), s !== void 0 && (d.search = s), V(o, d);
|
|
1214
|
-
let R = l && l.headers ? l.headers : {};
|
|
1215
|
-
return c.headers = { ...i, ...R, ...a.headers }, {
|
|
1216
|
-
url: O(o),
|
|
1217
|
-
options: c
|
|
1218
|
-
};
|
|
1219
|
-
}
|
|
1220
|
-
};
|
|
1221
|
-
}, j = function(n) {
|
|
1222
|
-
const t = D(n);
|
|
1223
|
-
return {
|
|
1224
|
-
/**
|
|
1225
|
-
*
|
|
1226
|
-
* @param {number} collectionId
|
|
1227
|
-
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1228
|
-
* @param {string} [search]
|
|
1229
|
-
* @param {*} [options] Override http request option.
|
|
1230
|
-
* @throws {RequiredError}
|
|
1231
|
-
*/
|
|
1232
|
-
async getFilters(e, s, a, r) {
|
|
1233
|
-
const o = await t.getFilters(e, s, a, r), l = n?.serverIndex ?? 0, c = u["FilterApi.getFilters"]?.[l]?.url;
|
|
1234
|
-
return (i, d) => v(o, h, p, n)(i, c || d);
|
|
1235
|
-
}
|
|
1236
|
-
};
|
|
1237
|
-
}, Ve = function(n, t, e) {
|
|
1238
|
-
const s = j(n);
|
|
1239
|
-
return {
|
|
1240
|
-
/**
|
|
1241
|
-
*
|
|
1242
|
-
* @param {number} collectionId
|
|
1243
|
-
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1244
|
-
* @param {string} [search]
|
|
1245
|
-
* @param {*} [options] Override http request option.
|
|
1246
|
-
* @throws {RequiredError}
|
|
1247
|
-
*/
|
|
1248
|
-
getFilters(a, r, o, l) {
|
|
1249
|
-
return s.getFilters(a, r, o, l).then((c) => c(e, t));
|
|
1250
|
-
}
|
|
1251
|
-
};
|
|
1
|
+
import e from "axios";
|
|
2
|
+
//#region \0rolldown/runtime.js
|
|
3
|
+
var t = Object.defineProperty, n = (e, n) => {
|
|
4
|
+
let r = {};
|
|
5
|
+
for (var i in e) t(r, i, {
|
|
6
|
+
get: e[i],
|
|
7
|
+
enumerable: !0
|
|
8
|
+
});
|
|
9
|
+
return n || t(r, Symbol.toStringTag, { value: "Module" }), r;
|
|
10
|
+
}, r = "https://api.raindrop.io".replace(/\/+$/, ""), i = class {
|
|
11
|
+
basePath;
|
|
12
|
+
axios;
|
|
13
|
+
configuration;
|
|
14
|
+
constructor(t, n = r, i = e) {
|
|
15
|
+
this.basePath = n, this.axios = i, t && (this.configuration = t, this.basePath = t.basePath ?? n);
|
|
16
|
+
}
|
|
17
|
+
}, a = class extends Error {
|
|
18
|
+
field;
|
|
19
|
+
constructor(e, t) {
|
|
20
|
+
super(t), this.field = e, this.name = "RequiredError";
|
|
21
|
+
}
|
|
22
|
+
}, o = {}, s = "https://example.com", c = function(e, t, n) {
|
|
23
|
+
if (n == null) throw new a(t, `Required parameter ${t} was null or undefined when calling ${e}.`);
|
|
24
|
+
}, l = async function(e, t) {
|
|
25
|
+
t && t.accessToken && (e.Authorization = "Bearer " + (typeof t.accessToken == "function" ? await t.accessToken() : await t.accessToken));
|
|
1252
26
|
};
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
*
|
|
1256
|
-
* @param {number} collectionId
|
|
1257
|
-
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1258
|
-
* @param {string} [search]
|
|
1259
|
-
* @param {*} [options] Override http request option.
|
|
1260
|
-
* @throws {RequiredError}
|
|
1261
|
-
* @memberof FilterApi
|
|
1262
|
-
*/
|
|
1263
|
-
getFilters(t, e, s, a) {
|
|
1264
|
-
return j(this.configuration).getFilters(t, e, s, a).then((r) => r(this.axios, this.basePath));
|
|
1265
|
-
}
|
|
27
|
+
function u(e, t, n = "") {
|
|
28
|
+
t != null && (typeof t == "object" ? Array.isArray(t) ? t.forEach((t) => u(e, t, n)) : Object.keys(t).forEach((r) => u(e, t[r], `${n}${n === "" ? "" : "."}${r}`)) : e.has(n) ? e.append(n, t) : e.set(n, t));
|
|
1266
29
|
}
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
},
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
*
|
|
1274
|
-
* @param {number} [page]
|
|
1275
|
-
* @param {number} [perpage]
|
|
1276
|
-
* @param {*} [options] Override http request option.
|
|
1277
|
-
* @throws {RequiredError}
|
|
1278
|
-
*/
|
|
1279
|
-
getAllHighlights: async (t, e, s = {}) => {
|
|
1280
|
-
const a = "/rest/v1/highlights", r = new URL(a, m);
|
|
1281
|
-
let o;
|
|
1282
|
-
n && (o = n.baseOptions);
|
|
1283
|
-
const l = { method: "GET", ...o, ...s }, c = {}, i = {};
|
|
1284
|
-
await C(c, n), t !== void 0 && (i.page = t), e !== void 0 && (i.perpage = e), V(r, i);
|
|
1285
|
-
let d = o && o.headers ? o.headers : {};
|
|
1286
|
-
return l.headers = { ...c, ...d, ...s.headers }, {
|
|
1287
|
-
url: O(r),
|
|
1288
|
-
options: l
|
|
1289
|
-
};
|
|
1290
|
-
},
|
|
1291
|
-
/**
|
|
1292
|
-
*
|
|
1293
|
-
* @param {number} collectionId
|
|
1294
|
-
* @param {number} [page]
|
|
1295
|
-
* @param {number} [perpage]
|
|
1296
|
-
* @param {*} [options] Override http request option.
|
|
1297
|
-
* @throws {RequiredError}
|
|
1298
|
-
*/
|
|
1299
|
-
getHighlightsInCollection: async (t, e, s, a = {}) => {
|
|
1300
|
-
P("getHighlightsInCollection", "collectionId", t);
|
|
1301
|
-
const r = "/rest/v1/highlights/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(r, m);
|
|
1302
|
-
let l;
|
|
1303
|
-
n && (l = n.baseOptions);
|
|
1304
|
-
const c = { method: "GET", ...l, ...a }, i = {}, d = {};
|
|
1305
|
-
await C(i, n), e !== void 0 && (d.page = e), s !== void 0 && (d.perpage = s), V(o, d);
|
|
1306
|
-
let R = l && l.headers ? l.headers : {};
|
|
1307
|
-
return c.headers = { ...i, ...R, ...a.headers }, {
|
|
1308
|
-
url: O(o),
|
|
1309
|
-
options: c
|
|
1310
|
-
};
|
|
1311
|
-
},
|
|
1312
|
-
/**
|
|
1313
|
-
*
|
|
1314
|
-
* @param {number} id
|
|
1315
|
-
* @param {*} [options] Override http request option.
|
|
1316
|
-
* @throws {RequiredError}
|
|
1317
|
-
*/
|
|
1318
|
-
getRaindrop: async (t, e = {}) => {
|
|
1319
|
-
P("getRaindrop", "id", t);
|
|
1320
|
-
const s = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
1321
|
-
let r;
|
|
1322
|
-
n && (r = n.baseOptions);
|
|
1323
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
1324
|
-
await C(l, n), V(a, c);
|
|
1325
|
-
let i = r && r.headers ? r.headers : {};
|
|
1326
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
1327
|
-
url: O(a),
|
|
1328
|
-
options: o
|
|
1329
|
-
};
|
|
1330
|
-
},
|
|
1331
|
-
/**
|
|
1332
|
-
*
|
|
1333
|
-
* @param {number} id
|
|
1334
|
-
* @param {object} [body]
|
|
1335
|
-
* @param {*} [options] Override http request option.
|
|
1336
|
-
* @throws {RequiredError}
|
|
1337
|
-
*/
|
|
1338
|
-
updateRaindrop: async (t, e, s = {}) => {
|
|
1339
|
-
P("updateRaindrop", "id", t);
|
|
1340
|
-
const a = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
1341
|
-
let o;
|
|
1342
|
-
n && (o = n.baseOptions);
|
|
1343
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {};
|
|
1344
|
-
await C(c, n), c["Content-Type"] = "application/json", V(r, i);
|
|
1345
|
-
let d = o && o.headers ? o.headers : {};
|
|
1346
|
-
return l.headers = { ...c, ...d, ...s.headers }, l.data = y(e, l, n), {
|
|
1347
|
-
url: O(r),
|
|
1348
|
-
options: l
|
|
1349
|
-
};
|
|
1350
|
-
}
|
|
1351
|
-
};
|
|
1352
|
-
}, g = function(n) {
|
|
1353
|
-
const t = J(n);
|
|
1354
|
-
return {
|
|
1355
|
-
/**
|
|
1356
|
-
*
|
|
1357
|
-
* @param {number} [page]
|
|
1358
|
-
* @param {number} [perpage]
|
|
1359
|
-
* @param {*} [options] Override http request option.
|
|
1360
|
-
* @throws {RequiredError}
|
|
1361
|
-
*/
|
|
1362
|
-
async getAllHighlights(e, s, a) {
|
|
1363
|
-
const r = await t.getAllHighlights(e, s, a), o = n?.serverIndex ?? 0, l = u["HighlightApi.getAllHighlights"]?.[o]?.url;
|
|
1364
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
1365
|
-
},
|
|
1366
|
-
/**
|
|
1367
|
-
*
|
|
1368
|
-
* @param {number} collectionId
|
|
1369
|
-
* @param {number} [page]
|
|
1370
|
-
* @param {number} [perpage]
|
|
1371
|
-
* @param {*} [options] Override http request option.
|
|
1372
|
-
* @throws {RequiredError}
|
|
1373
|
-
*/
|
|
1374
|
-
async getHighlightsInCollection(e, s, a, r) {
|
|
1375
|
-
const o = await t.getHighlightsInCollection(e, s, a, r), l = n?.serverIndex ?? 0, c = u["HighlightApi.getHighlightsInCollection"]?.[l]?.url;
|
|
1376
|
-
return (i, d) => v(o, h, p, n)(i, c || d);
|
|
1377
|
-
},
|
|
1378
|
-
/**
|
|
1379
|
-
*
|
|
1380
|
-
* @param {number} id
|
|
1381
|
-
* @param {*} [options] Override http request option.
|
|
1382
|
-
* @throws {RequiredError}
|
|
1383
|
-
*/
|
|
1384
|
-
async getRaindrop(e, s) {
|
|
1385
|
-
const a = await t.getRaindrop(e, s), r = n?.serverIndex ?? 0, o = u["HighlightApi.getRaindrop"]?.[r]?.url;
|
|
1386
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1387
|
-
},
|
|
1388
|
-
/**
|
|
1389
|
-
*
|
|
1390
|
-
* @param {number} id
|
|
1391
|
-
* @param {object} [body]
|
|
1392
|
-
* @param {*} [options] Override http request option.
|
|
1393
|
-
* @throws {RequiredError}
|
|
1394
|
-
*/
|
|
1395
|
-
async updateRaindrop(e, s, a) {
|
|
1396
|
-
const r = await t.updateRaindrop(e, s, a), o = n?.serverIndex ?? 0, l = u["HighlightApi.updateRaindrop"]?.[o]?.url;
|
|
1397
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
1398
|
-
}
|
|
1399
|
-
};
|
|
1400
|
-
}, ve = function(n, t, e) {
|
|
1401
|
-
const s = g(n);
|
|
1402
|
-
return {
|
|
1403
|
-
/**
|
|
1404
|
-
*
|
|
1405
|
-
* @param {number} [page]
|
|
1406
|
-
* @param {number} [perpage]
|
|
1407
|
-
* @param {*} [options] Override http request option.
|
|
1408
|
-
* @throws {RequiredError}
|
|
1409
|
-
*/
|
|
1410
|
-
getAllHighlights(a, r, o) {
|
|
1411
|
-
return s.getAllHighlights(a, r, o).then((l) => l(e, t));
|
|
1412
|
-
},
|
|
1413
|
-
/**
|
|
1414
|
-
*
|
|
1415
|
-
* @param {number} collectionId
|
|
1416
|
-
* @param {number} [page]
|
|
1417
|
-
* @param {number} [perpage]
|
|
1418
|
-
* @param {*} [options] Override http request option.
|
|
1419
|
-
* @throws {RequiredError}
|
|
1420
|
-
*/
|
|
1421
|
-
getHighlightsInCollection(a, r, o, l) {
|
|
1422
|
-
return s.getHighlightsInCollection(a, r, o, l).then((c) => c(e, t));
|
|
1423
|
-
},
|
|
1424
|
-
/**
|
|
1425
|
-
*
|
|
1426
|
-
* @param {number} id
|
|
1427
|
-
* @param {*} [options] Override http request option.
|
|
1428
|
-
* @throws {RequiredError}
|
|
1429
|
-
*/
|
|
1430
|
-
getRaindrop(a, r) {
|
|
1431
|
-
return s.getRaindrop(a, r).then((o) => o(e, t));
|
|
1432
|
-
},
|
|
1433
|
-
/**
|
|
1434
|
-
*
|
|
1435
|
-
* @param {number} id
|
|
1436
|
-
* @param {object} [body]
|
|
1437
|
-
* @param {*} [options] Override http request option.
|
|
1438
|
-
* @throws {RequiredError}
|
|
1439
|
-
*/
|
|
1440
|
-
updateRaindrop(a, r, o) {
|
|
1441
|
-
return s.updateRaindrop(a, r, o).then((l) => l(e, t));
|
|
1442
|
-
}
|
|
1443
|
-
};
|
|
30
|
+
var d = function(e, ...t) {
|
|
31
|
+
let n = new URLSearchParams(e.search);
|
|
32
|
+
u(n, t), e.search = n.toString();
|
|
33
|
+
}, f = function(e, t, n) {
|
|
34
|
+
let r = typeof e != "string";
|
|
35
|
+
return (r && n && n.isJsonMime ? n.isJsonMime(t.headers["Content-Type"]) : r) ? JSON.stringify(e === void 0 ? {} : p(e)) : e || "";
|
|
1444
36
|
};
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
return g(this.configuration).getAllHighlights(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
1456
|
-
}
|
|
1457
|
-
/**
|
|
1458
|
-
*
|
|
1459
|
-
* @param {number} collectionId
|
|
1460
|
-
* @param {number} [page]
|
|
1461
|
-
* @param {number} [perpage]
|
|
1462
|
-
* @param {*} [options] Override http request option.
|
|
1463
|
-
* @throws {RequiredError}
|
|
1464
|
-
* @memberof HighlightApi
|
|
1465
|
-
*/
|
|
1466
|
-
getHighlightsInCollection(t, e, s, a) {
|
|
1467
|
-
return g(this.configuration).getHighlightsInCollection(t, e, s, a).then((r) => r(this.axios, this.basePath));
|
|
1468
|
-
}
|
|
1469
|
-
/**
|
|
1470
|
-
*
|
|
1471
|
-
* @param {number} id
|
|
1472
|
-
* @param {*} [options] Override http request option.
|
|
1473
|
-
* @throws {RequiredError}
|
|
1474
|
-
* @memberof HighlightApi
|
|
1475
|
-
*/
|
|
1476
|
-
getRaindrop(t, e) {
|
|
1477
|
-
return g(this.configuration).getRaindrop(t, e).then((s) => s(this.axios, this.basePath));
|
|
1478
|
-
}
|
|
1479
|
-
/**
|
|
1480
|
-
*
|
|
1481
|
-
* @param {number} id
|
|
1482
|
-
* @param {object} [body]
|
|
1483
|
-
* @param {*} [options] Override http request option.
|
|
1484
|
-
* @throws {RequiredError}
|
|
1485
|
-
* @memberof HighlightApi
|
|
1486
|
-
*/
|
|
1487
|
-
updateRaindrop(t, e, s) {
|
|
1488
|
-
return g(this.configuration).updateRaindrop(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
1489
|
-
}
|
|
37
|
+
function p(e) {
|
|
38
|
+
if (typeof Set > "u" || typeof Map > "u" || typeof e != "object" || !e) return e;
|
|
39
|
+
if (e instanceof Set) return Array.from(e).map((e) => p(e));
|
|
40
|
+
if (e instanceof Map) {
|
|
41
|
+
let t = [];
|
|
42
|
+
return e.forEach((e, n) => {
|
|
43
|
+
t.push([n, p(e)]);
|
|
44
|
+
}), h(t);
|
|
45
|
+
}
|
|
46
|
+
return Array.isArray(e) ? e.map((e) => p(e)) : h(m(e).map(([e, t]) => [e, p(t)]));
|
|
1490
47
|
}
|
|
1491
|
-
|
|
1492
|
-
|
|
1493
|
-
/**
|
|
1494
|
-
*
|
|
1495
|
-
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
1496
|
-
* @param {*} [options] Override http request option.
|
|
1497
|
-
* @throws {RequiredError}
|
|
1498
|
-
*/
|
|
1499
|
-
checkURLsExist: async (t, e = {}) => {
|
|
1500
|
-
const s = "/rest/v1/import/url/exists", a = new URL(s, m);
|
|
1501
|
-
let r;
|
|
1502
|
-
n && (r = n.baseOptions);
|
|
1503
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {};
|
|
1504
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
1505
|
-
let i = r && r.headers ? r.headers : {};
|
|
1506
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
1507
|
-
url: O(a),
|
|
1508
|
-
options: o
|
|
1509
|
-
};
|
|
1510
|
-
},
|
|
1511
|
-
/**
|
|
1512
|
-
*
|
|
1513
|
-
* @param {File} [_import]
|
|
1514
|
-
* @param {*} [options] Override http request option.
|
|
1515
|
-
* @throws {RequiredError}
|
|
1516
|
-
*/
|
|
1517
|
-
importHTMLBookmarkFile: async (t, e = {}) => {
|
|
1518
|
-
const s = "/rest/v1/import/file", a = new URL(s, m);
|
|
1519
|
-
let r;
|
|
1520
|
-
n && (r = n.baseOptions);
|
|
1521
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {}, i = new (n && n.formDataCtor || FormData)();
|
|
1522
|
-
await C(l, n), t !== void 0 && i.append("import", t), l["Content-Type"] = "multipart/form-data", V(a, c);
|
|
1523
|
-
let d = r && r.headers ? r.headers : {};
|
|
1524
|
-
return o.headers = { ...l, ...d, ...e.headers }, o.data = i, {
|
|
1525
|
-
url: O(a),
|
|
1526
|
-
options: o
|
|
1527
|
-
};
|
|
1528
|
-
},
|
|
1529
|
-
/**
|
|
1530
|
-
*
|
|
1531
|
-
* @param {string} [url]
|
|
1532
|
-
* @param {*} [options] Override http request option.
|
|
1533
|
-
* @throws {RequiredError}
|
|
1534
|
-
*/
|
|
1535
|
-
parseURL: async (t, e = {}) => {
|
|
1536
|
-
const s = "/rest/v1/import/url/parse", a = new URL(s, m);
|
|
1537
|
-
let r;
|
|
1538
|
-
n && (r = n.baseOptions);
|
|
1539
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
1540
|
-
await C(l, n), t !== void 0 && (c.url = t), V(a, c);
|
|
1541
|
-
let i = r && r.headers ? r.headers : {};
|
|
1542
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
1543
|
-
url: O(a),
|
|
1544
|
-
options: o
|
|
1545
|
-
};
|
|
1546
|
-
}
|
|
1547
|
-
};
|
|
1548
|
-
}, I = function(n) {
|
|
1549
|
-
const t = Y(n);
|
|
1550
|
-
return {
|
|
1551
|
-
/**
|
|
1552
|
-
*
|
|
1553
|
-
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
1554
|
-
* @param {*} [options] Override http request option.
|
|
1555
|
-
* @throws {RequiredError}
|
|
1556
|
-
*/
|
|
1557
|
-
async checkURLsExist(e, s) {
|
|
1558
|
-
const a = await t.checkURLsExist(e, s), r = n?.serverIndex ?? 0, o = u["ImportApi.checkURLsExist"]?.[r]?.url;
|
|
1559
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1560
|
-
},
|
|
1561
|
-
/**
|
|
1562
|
-
*
|
|
1563
|
-
* @param {File} [_import]
|
|
1564
|
-
* @param {*} [options] Override http request option.
|
|
1565
|
-
* @throws {RequiredError}
|
|
1566
|
-
*/
|
|
1567
|
-
async importHTMLBookmarkFile(e, s) {
|
|
1568
|
-
const a = await t.importHTMLBookmarkFile(e, s), r = n?.serverIndex ?? 0, o = u["ImportApi.importHTMLBookmarkFile"]?.[r]?.url;
|
|
1569
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1570
|
-
},
|
|
1571
|
-
/**
|
|
1572
|
-
*
|
|
1573
|
-
* @param {string} [url]
|
|
1574
|
-
* @param {*} [options] Override http request option.
|
|
1575
|
-
* @throws {RequiredError}
|
|
1576
|
-
*/
|
|
1577
|
-
async parseURL(e, s) {
|
|
1578
|
-
const a = await t.parseURL(e, s), r = n?.serverIndex ?? 0, o = u["ImportApi.parseURL"]?.[r]?.url;
|
|
1579
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1580
|
-
}
|
|
1581
|
-
};
|
|
1582
|
-
}, Ce = function(n, t, e) {
|
|
1583
|
-
const s = I(n);
|
|
1584
|
-
return {
|
|
1585
|
-
/**
|
|
1586
|
-
*
|
|
1587
|
-
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
1588
|
-
* @param {*} [options] Override http request option.
|
|
1589
|
-
* @throws {RequiredError}
|
|
1590
|
-
*/
|
|
1591
|
-
checkURLsExist(a, r) {
|
|
1592
|
-
return s.checkURLsExist(a, r).then((o) => o(e, t));
|
|
1593
|
-
},
|
|
1594
|
-
/**
|
|
1595
|
-
*
|
|
1596
|
-
* @param {File} [_import]
|
|
1597
|
-
* @param {*} [options] Override http request option.
|
|
1598
|
-
* @throws {RequiredError}
|
|
1599
|
-
*/
|
|
1600
|
-
importHTMLBookmarkFile(a, r) {
|
|
1601
|
-
return s.importHTMLBookmarkFile(a, r).then((o) => o(e, t));
|
|
1602
|
-
},
|
|
1603
|
-
/**
|
|
1604
|
-
*
|
|
1605
|
-
* @param {string} [url]
|
|
1606
|
-
* @param {*} [options] Override http request option.
|
|
1607
|
-
* @throws {RequiredError}
|
|
1608
|
-
*/
|
|
1609
|
-
parseURL(a, r) {
|
|
1610
|
-
return s.parseURL(a, r).then((o) => o(e, t));
|
|
1611
|
-
}
|
|
1612
|
-
};
|
|
1613
|
-
};
|
|
1614
|
-
class W extends S {
|
|
1615
|
-
/**
|
|
1616
|
-
*
|
|
1617
|
-
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
1618
|
-
* @param {*} [options] Override http request option.
|
|
1619
|
-
* @throws {RequiredError}
|
|
1620
|
-
* @memberof ImportApi
|
|
1621
|
-
*/
|
|
1622
|
-
checkURLsExist(t, e) {
|
|
1623
|
-
return I(this.configuration).checkURLsExist(t, e).then((s) => s(this.axios, this.basePath));
|
|
1624
|
-
}
|
|
1625
|
-
/**
|
|
1626
|
-
*
|
|
1627
|
-
* @param {File} [_import]
|
|
1628
|
-
* @param {*} [options] Override http request option.
|
|
1629
|
-
* @throws {RequiredError}
|
|
1630
|
-
* @memberof ImportApi
|
|
1631
|
-
*/
|
|
1632
|
-
importHTMLBookmarkFile(t, e) {
|
|
1633
|
-
return I(this.configuration).importHTMLBookmarkFile(t, e).then((s) => s(this.axios, this.basePath));
|
|
1634
|
-
}
|
|
1635
|
-
/**
|
|
1636
|
-
*
|
|
1637
|
-
* @param {string} [url]
|
|
1638
|
-
* @param {*} [options] Override http request option.
|
|
1639
|
-
* @throws {RequiredError}
|
|
1640
|
-
* @memberof ImportApi
|
|
1641
|
-
*/
|
|
1642
|
-
parseURL(t, e) {
|
|
1643
|
-
return I(this.configuration).parseURL(t, e).then((s) => s(this.axios, this.basePath));
|
|
1644
|
-
}
|
|
48
|
+
function m(e) {
|
|
49
|
+
return Object.keys(e).map((t) => [t, e[t]]);
|
|
1645
50
|
}
|
|
1646
|
-
|
|
1647
|
-
|
|
1648
|
-
/**
|
|
1649
|
-
*
|
|
1650
|
-
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
1651
|
-
* @param {*} [options] Override http request option.
|
|
1652
|
-
* @throws {RequiredError}
|
|
1653
|
-
*/
|
|
1654
|
-
createRaindrop: async (t, e = {}) => {
|
|
1655
|
-
const s = "/rest/v1/raindrop", a = new URL(s, m);
|
|
1656
|
-
let r;
|
|
1657
|
-
n && (r = n.baseOptions);
|
|
1658
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {};
|
|
1659
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
1660
|
-
let i = r && r.headers ? r.headers : {};
|
|
1661
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
1662
|
-
url: O(a),
|
|
1663
|
-
options: o
|
|
1664
|
-
};
|
|
1665
|
-
},
|
|
1666
|
-
/**
|
|
1667
|
-
*
|
|
1668
|
-
* @param {object} [body]
|
|
1669
|
-
* @param {*} [options] Override http request option.
|
|
1670
|
-
* @throws {RequiredError}
|
|
1671
|
-
*/
|
|
1672
|
-
createRaindrops: async (t, e = {}) => {
|
|
1673
|
-
const s = "/rest/v1/raindrops", a = new URL(s, m);
|
|
1674
|
-
let r;
|
|
1675
|
-
n && (r = n.baseOptions);
|
|
1676
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {};
|
|
1677
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
1678
|
-
let i = r && r.headers ? r.headers : {};
|
|
1679
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
1680
|
-
url: O(a),
|
|
1681
|
-
options: o
|
|
1682
|
-
};
|
|
1683
|
-
},
|
|
1684
|
-
/**
|
|
1685
|
-
*
|
|
1686
|
-
* @param {number} id
|
|
1687
|
-
* @param {*} [options] Override http request option.
|
|
1688
|
-
* @throws {RequiredError}
|
|
1689
|
-
*/
|
|
1690
|
-
getPermanentCopy: async (t, e = {}) => {
|
|
1691
|
-
P("getPermanentCopy", "id", t);
|
|
1692
|
-
const s = "/rest/v1/raindrop/{id}/cache".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
1693
|
-
let r;
|
|
1694
|
-
n && (r = n.baseOptions);
|
|
1695
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
1696
|
-
await C(l, n), V(a, c);
|
|
1697
|
-
let i = r && r.headers ? r.headers : {};
|
|
1698
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
1699
|
-
url: O(a),
|
|
1700
|
-
options: o
|
|
1701
|
-
};
|
|
1702
|
-
},
|
|
1703
|
-
/**
|
|
1704
|
-
*
|
|
1705
|
-
* @param {number} id
|
|
1706
|
-
* @param {*} [options] Override http request option.
|
|
1707
|
-
* @throws {RequiredError}
|
|
1708
|
-
*/
|
|
1709
|
-
getRaindrop: async (t, e = {}) => {
|
|
1710
|
-
P("getRaindrop", "id", t);
|
|
1711
|
-
const s = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
1712
|
-
let r;
|
|
1713
|
-
n && (r = n.baseOptions);
|
|
1714
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
1715
|
-
await C(l, n), V(a, c);
|
|
1716
|
-
let i = r && r.headers ? r.headers : {};
|
|
1717
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
1718
|
-
url: O(a),
|
|
1719
|
-
options: o
|
|
1720
|
-
};
|
|
1721
|
-
},
|
|
1722
|
-
/**
|
|
1723
|
-
*
|
|
1724
|
-
* @param {number} collectionId
|
|
1725
|
-
* @param {string} [sort]
|
|
1726
|
-
* @param {number} [perpage]
|
|
1727
|
-
* @param {number} [page]
|
|
1728
|
-
* @param {string} [search]
|
|
1729
|
-
* @param {*} [options] Override http request option.
|
|
1730
|
-
* @throws {RequiredError}
|
|
1731
|
-
*/
|
|
1732
|
-
getRaindrops: async (t, e, s, a, r, o = {}) => {
|
|
1733
|
-
P("getRaindrops", "collectionId", t);
|
|
1734
|
-
const l = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), c = new URL(l, m);
|
|
1735
|
-
let i;
|
|
1736
|
-
n && (i = n.baseOptions);
|
|
1737
|
-
const d = { method: "GET", ...i, ...o }, R = {}, x = {};
|
|
1738
|
-
await C(R, n), e !== void 0 && (x.sort = e), s !== void 0 && (x.perpage = s), a !== void 0 && (x.page = a), r !== void 0 && (x.search = r), V(c, x);
|
|
1739
|
-
let F = i && i.headers ? i.headers : {};
|
|
1740
|
-
return d.headers = { ...R, ...F, ...o.headers }, {
|
|
1741
|
-
url: O(c),
|
|
1742
|
-
options: d
|
|
1743
|
-
};
|
|
1744
|
-
},
|
|
1745
|
-
/**
|
|
1746
|
-
*
|
|
1747
|
-
* @param {number} id
|
|
1748
|
-
* @param {*} [options] Override http request option.
|
|
1749
|
-
* @throws {RequiredError}
|
|
1750
|
-
*/
|
|
1751
|
-
removeRaindrop: async (t, e = {}) => {
|
|
1752
|
-
P("removeRaindrop", "id", t);
|
|
1753
|
-
const s = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
1754
|
-
let r;
|
|
1755
|
-
n && (r = n.baseOptions);
|
|
1756
|
-
const o = { method: "DELETE", ...r, ...e }, l = {}, c = {};
|
|
1757
|
-
await C(l, n), V(a, c);
|
|
1758
|
-
let i = r && r.headers ? r.headers : {};
|
|
1759
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
1760
|
-
url: O(a),
|
|
1761
|
-
options: o
|
|
1762
|
-
};
|
|
1763
|
-
},
|
|
1764
|
-
/**
|
|
1765
|
-
*
|
|
1766
|
-
* @param {number} collectionId
|
|
1767
|
-
* @param {string} [search]
|
|
1768
|
-
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
1769
|
-
* @param {*} [options] Override http request option.
|
|
1770
|
-
* @throws {RequiredError}
|
|
1771
|
-
*/
|
|
1772
|
-
removeRaindrops: async (t, e, s, a = {}) => {
|
|
1773
|
-
P("removeRaindrops", "collectionId", t);
|
|
1774
|
-
const r = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(r, m);
|
|
1775
|
-
let l;
|
|
1776
|
-
n && (l = n.baseOptions);
|
|
1777
|
-
const c = { method: "DELETE", ...l, ...a }, i = {}, d = {};
|
|
1778
|
-
await C(i, n), e !== void 0 && (d.search = e), i["Content-Type"] = "application/json", V(o, d);
|
|
1779
|
-
let R = l && l.headers ? l.headers : {};
|
|
1780
|
-
return c.headers = { ...i, ...R, ...a.headers }, c.data = y(s, c, n), {
|
|
1781
|
-
url: O(o),
|
|
1782
|
-
options: c
|
|
1783
|
-
};
|
|
1784
|
-
},
|
|
1785
|
-
/**
|
|
1786
|
-
*
|
|
1787
|
-
* @param {number} id
|
|
1788
|
-
* @param {*} [options] Override http request option.
|
|
1789
|
-
* @throws {RequiredError}
|
|
1790
|
-
*/
|
|
1791
|
-
suggestForExistingBookmark: async (t, e = {}) => {
|
|
1792
|
-
P("suggestForExistingBookmark", "id", t);
|
|
1793
|
-
const s = "/rest/v1/raindrop/{id}/suggest".replace("{id}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
1794
|
-
let r;
|
|
1795
|
-
n && (r = n.baseOptions);
|
|
1796
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
1797
|
-
await C(l, n), V(a, c);
|
|
1798
|
-
let i = r && r.headers ? r.headers : {};
|
|
1799
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
1800
|
-
url: O(a),
|
|
1801
|
-
options: o
|
|
1802
|
-
};
|
|
1803
|
-
},
|
|
1804
|
-
/**
|
|
1805
|
-
*
|
|
1806
|
-
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
1807
|
-
* @param {*} [options] Override http request option.
|
|
1808
|
-
* @throws {RequiredError}
|
|
1809
|
-
*/
|
|
1810
|
-
suggestForNewBookmark: async (t, e = {}) => {
|
|
1811
|
-
const s = "/rest/v1/raindrop/suggest", a = new URL(s, m);
|
|
1812
|
-
let r;
|
|
1813
|
-
n && (r = n.baseOptions);
|
|
1814
|
-
const o = { method: "POST", ...r, ...e }, l = {}, c = {};
|
|
1815
|
-
await C(l, n), l["Content-Type"] = "application/json", V(a, c);
|
|
1816
|
-
let i = r && r.headers ? r.headers : {};
|
|
1817
|
-
return o.headers = { ...l, ...i, ...e.headers }, o.data = y(t, o, n), {
|
|
1818
|
-
url: O(a),
|
|
1819
|
-
options: o
|
|
1820
|
-
};
|
|
1821
|
-
},
|
|
1822
|
-
/**
|
|
1823
|
-
*
|
|
1824
|
-
* @param {number} id
|
|
1825
|
-
* @param {object} [body]
|
|
1826
|
-
* @param {*} [options] Override http request option.
|
|
1827
|
-
* @throws {RequiredError}
|
|
1828
|
-
*/
|
|
1829
|
-
updateRaindrop: async (t, e, s = {}) => {
|
|
1830
|
-
P("updateRaindrop", "id", t);
|
|
1831
|
-
const a = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
1832
|
-
let o;
|
|
1833
|
-
n && (o = n.baseOptions);
|
|
1834
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {};
|
|
1835
|
-
await C(c, n), c["Content-Type"] = "application/json", V(r, i);
|
|
1836
|
-
let d = o && o.headers ? o.headers : {};
|
|
1837
|
-
return l.headers = { ...c, ...d, ...s.headers }, l.data = y(e, l, n), {
|
|
1838
|
-
url: O(r),
|
|
1839
|
-
options: l
|
|
1840
|
-
};
|
|
1841
|
-
},
|
|
1842
|
-
/**
|
|
1843
|
-
*
|
|
1844
|
-
* @param {number} collectionId
|
|
1845
|
-
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
1846
|
-
* @param {*} [options] Override http request option.
|
|
1847
|
-
* @throws {RequiredError}
|
|
1848
|
-
*/
|
|
1849
|
-
updateRaindrops: async (t, e, s = {}) => {
|
|
1850
|
-
P("updateRaindrops", "collectionId", t);
|
|
1851
|
-
const a = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
1852
|
-
let o;
|
|
1853
|
-
n && (o = n.baseOptions);
|
|
1854
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {};
|
|
1855
|
-
await C(c, n), c["Content-Type"] = "application/json", V(r, i);
|
|
1856
|
-
let d = o && o.headers ? o.headers : {};
|
|
1857
|
-
return l.headers = { ...c, ...d, ...s.headers }, l.data = y(e, l, n), {
|
|
1858
|
-
url: O(r),
|
|
1859
|
-
options: l
|
|
1860
|
-
};
|
|
1861
|
-
},
|
|
1862
|
-
/**
|
|
1863
|
-
*
|
|
1864
|
-
* @param {File} [file]
|
|
1865
|
-
* @param {number} [collectionId]
|
|
1866
|
-
* @param {*} [options] Override http request option.
|
|
1867
|
-
* @throws {RequiredError}
|
|
1868
|
-
*/
|
|
1869
|
-
uploadFile: async (t, e, s = {}) => {
|
|
1870
|
-
const a = "/rest/v1/raindrop/file", r = new URL(a, m);
|
|
1871
|
-
let o;
|
|
1872
|
-
n && (o = n.baseOptions);
|
|
1873
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {}, d = new (n && n.formDataCtor || FormData)();
|
|
1874
|
-
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);
|
|
1875
|
-
let R = o && o.headers ? o.headers : {};
|
|
1876
|
-
return l.headers = { ...c, ...R, ...s.headers }, l.data = d, {
|
|
1877
|
-
url: O(r),
|
|
1878
|
-
options: l
|
|
1879
|
-
};
|
|
1880
|
-
},
|
|
1881
|
-
/**
|
|
1882
|
-
*
|
|
1883
|
-
* @param {number} id
|
|
1884
|
-
* @param {File} [cover]
|
|
1885
|
-
* @param {*} [options] Override http request option.
|
|
1886
|
-
* @throws {RequiredError}
|
|
1887
|
-
*/
|
|
1888
|
-
uploadRaindropCover: async (t, e, s = {}) => {
|
|
1889
|
-
P("uploadRaindropCover", "id", t);
|
|
1890
|
-
const a = "/rest/v1/raindrop/{id}/cover".replace("{id}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
1891
|
-
let o;
|
|
1892
|
-
n && (o = n.baseOptions);
|
|
1893
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {}, d = new (n && n.formDataCtor || FormData)();
|
|
1894
|
-
await C(c, n), e !== void 0 && d.append("cover", e), c["Content-Type"] = "multipart/form-data", V(r, i);
|
|
1895
|
-
let R = o && o.headers ? o.headers : {};
|
|
1896
|
-
return l.headers = { ...c, ...R, ...s.headers }, l.data = d, {
|
|
1897
|
-
url: O(r),
|
|
1898
|
-
options: l
|
|
1899
|
-
};
|
|
1900
|
-
}
|
|
1901
|
-
};
|
|
1902
|
-
}, b = function(n) {
|
|
1903
|
-
const t = X(n);
|
|
1904
|
-
return {
|
|
1905
|
-
/**
|
|
1906
|
-
*
|
|
1907
|
-
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
1908
|
-
* @param {*} [options] Override http request option.
|
|
1909
|
-
* @throws {RequiredError}
|
|
1910
|
-
*/
|
|
1911
|
-
async createRaindrop(e, s) {
|
|
1912
|
-
const a = await t.createRaindrop(e, s), r = n?.serverIndex ?? 0, o = u["RaindropApi.createRaindrop"]?.[r]?.url;
|
|
1913
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1914
|
-
},
|
|
1915
|
-
/**
|
|
1916
|
-
*
|
|
1917
|
-
* @param {object} [body]
|
|
1918
|
-
* @param {*} [options] Override http request option.
|
|
1919
|
-
* @throws {RequiredError}
|
|
1920
|
-
*/
|
|
1921
|
-
async createRaindrops(e, s) {
|
|
1922
|
-
const a = await t.createRaindrops(e, s), r = n?.serverIndex ?? 0, o = u["RaindropApi.createRaindrops"]?.[r]?.url;
|
|
1923
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1924
|
-
},
|
|
1925
|
-
/**
|
|
1926
|
-
*
|
|
1927
|
-
* @param {number} id
|
|
1928
|
-
* @param {*} [options] Override http request option.
|
|
1929
|
-
* @throws {RequiredError}
|
|
1930
|
-
*/
|
|
1931
|
-
async getPermanentCopy(e, s) {
|
|
1932
|
-
const a = await t.getPermanentCopy(e, s), r = n?.serverIndex ?? 0, o = u["RaindropApi.getPermanentCopy"]?.[r]?.url;
|
|
1933
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1934
|
-
},
|
|
1935
|
-
/**
|
|
1936
|
-
*
|
|
1937
|
-
* @param {number} id
|
|
1938
|
-
* @param {*} [options] Override http request option.
|
|
1939
|
-
* @throws {RequiredError}
|
|
1940
|
-
*/
|
|
1941
|
-
async getRaindrop(e, s) {
|
|
1942
|
-
const a = await t.getRaindrop(e, s), r = n?.serverIndex ?? 0, o = u["RaindropApi.getRaindrop"]?.[r]?.url;
|
|
1943
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1944
|
-
},
|
|
1945
|
-
/**
|
|
1946
|
-
*
|
|
1947
|
-
* @param {number} collectionId
|
|
1948
|
-
* @param {string} [sort]
|
|
1949
|
-
* @param {number} [perpage]
|
|
1950
|
-
* @param {number} [page]
|
|
1951
|
-
* @param {string} [search]
|
|
1952
|
-
* @param {*} [options] Override http request option.
|
|
1953
|
-
* @throws {RequiredError}
|
|
1954
|
-
*/
|
|
1955
|
-
async getRaindrops(e, s, a, r, o, l) {
|
|
1956
|
-
const c = await t.getRaindrops(e, s, a, r, o, l), i = n?.serverIndex ?? 0, d = u["RaindropApi.getRaindrops"]?.[i]?.url;
|
|
1957
|
-
return (R, x) => v(c, h, p, n)(R, d || x);
|
|
1958
|
-
},
|
|
1959
|
-
/**
|
|
1960
|
-
*
|
|
1961
|
-
* @param {number} id
|
|
1962
|
-
* @param {*} [options] Override http request option.
|
|
1963
|
-
* @throws {RequiredError}
|
|
1964
|
-
*/
|
|
1965
|
-
async removeRaindrop(e, s) {
|
|
1966
|
-
const a = await t.removeRaindrop(e, s), r = n?.serverIndex ?? 0, o = u["RaindropApi.removeRaindrop"]?.[r]?.url;
|
|
1967
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1968
|
-
},
|
|
1969
|
-
/**
|
|
1970
|
-
*
|
|
1971
|
-
* @param {number} collectionId
|
|
1972
|
-
* @param {string} [search]
|
|
1973
|
-
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
1974
|
-
* @param {*} [options] Override http request option.
|
|
1975
|
-
* @throws {RequiredError}
|
|
1976
|
-
*/
|
|
1977
|
-
async removeRaindrops(e, s, a, r) {
|
|
1978
|
-
const o = await t.removeRaindrops(e, s, a, r), l = n?.serverIndex ?? 0, c = u["RaindropApi.removeRaindrops"]?.[l]?.url;
|
|
1979
|
-
return (i, d) => v(o, h, p, n)(i, c || d);
|
|
1980
|
-
},
|
|
1981
|
-
/**
|
|
1982
|
-
*
|
|
1983
|
-
* @param {number} id
|
|
1984
|
-
* @param {*} [options] Override http request option.
|
|
1985
|
-
* @throws {RequiredError}
|
|
1986
|
-
*/
|
|
1987
|
-
async suggestForExistingBookmark(e, s) {
|
|
1988
|
-
const a = await t.suggestForExistingBookmark(e, s), r = n?.serverIndex ?? 0, o = u["RaindropApi.suggestForExistingBookmark"]?.[r]?.url;
|
|
1989
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
1990
|
-
},
|
|
1991
|
-
/**
|
|
1992
|
-
*
|
|
1993
|
-
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
1994
|
-
* @param {*} [options] Override http request option.
|
|
1995
|
-
* @throws {RequiredError}
|
|
1996
|
-
*/
|
|
1997
|
-
async suggestForNewBookmark(e, s) {
|
|
1998
|
-
const a = await t.suggestForNewBookmark(e, s), r = n?.serverIndex ?? 0, o = u["RaindropApi.suggestForNewBookmark"]?.[r]?.url;
|
|
1999
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
2000
|
-
},
|
|
2001
|
-
/**
|
|
2002
|
-
*
|
|
2003
|
-
* @param {number} id
|
|
2004
|
-
* @param {object} [body]
|
|
2005
|
-
* @param {*} [options] Override http request option.
|
|
2006
|
-
* @throws {RequiredError}
|
|
2007
|
-
*/
|
|
2008
|
-
async updateRaindrop(e, s, a) {
|
|
2009
|
-
const r = await t.updateRaindrop(e, s, a), o = n?.serverIndex ?? 0, l = u["RaindropApi.updateRaindrop"]?.[o]?.url;
|
|
2010
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
2011
|
-
},
|
|
2012
|
-
/**
|
|
2013
|
-
*
|
|
2014
|
-
* @param {number} collectionId
|
|
2015
|
-
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
2016
|
-
* @param {*} [options] Override http request option.
|
|
2017
|
-
* @throws {RequiredError}
|
|
2018
|
-
*/
|
|
2019
|
-
async updateRaindrops(e, s, a) {
|
|
2020
|
-
const r = await t.updateRaindrops(e, s, a), o = n?.serverIndex ?? 0, l = u["RaindropApi.updateRaindrops"]?.[o]?.url;
|
|
2021
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
2022
|
-
},
|
|
2023
|
-
/**
|
|
2024
|
-
*
|
|
2025
|
-
* @param {File} [file]
|
|
2026
|
-
* @param {number} [collectionId]
|
|
2027
|
-
* @param {*} [options] Override http request option.
|
|
2028
|
-
* @throws {RequiredError}
|
|
2029
|
-
*/
|
|
2030
|
-
async uploadFile(e, s, a) {
|
|
2031
|
-
const r = await t.uploadFile(e, s, a), o = n?.serverIndex ?? 0, l = u["RaindropApi.uploadFile"]?.[o]?.url;
|
|
2032
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
2033
|
-
},
|
|
2034
|
-
/**
|
|
2035
|
-
*
|
|
2036
|
-
* @param {number} id
|
|
2037
|
-
* @param {File} [cover]
|
|
2038
|
-
* @param {*} [options] Override http request option.
|
|
2039
|
-
* @throws {RequiredError}
|
|
2040
|
-
*/
|
|
2041
|
-
async uploadRaindropCover(e, s, a) {
|
|
2042
|
-
const r = await t.uploadRaindropCover(e, s, a), o = n?.serverIndex ?? 0, l = u["RaindropApi.uploadRaindropCover"]?.[o]?.url;
|
|
2043
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
2044
|
-
}
|
|
2045
|
-
};
|
|
2046
|
-
}, Pe = function(n, t, e) {
|
|
2047
|
-
const s = b(n);
|
|
2048
|
-
return {
|
|
2049
|
-
/**
|
|
2050
|
-
*
|
|
2051
|
-
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
2052
|
-
* @param {*} [options] Override http request option.
|
|
2053
|
-
* @throws {RequiredError}
|
|
2054
|
-
*/
|
|
2055
|
-
createRaindrop(a, r) {
|
|
2056
|
-
return s.createRaindrop(a, r).then((o) => o(e, t));
|
|
2057
|
-
},
|
|
2058
|
-
/**
|
|
2059
|
-
*
|
|
2060
|
-
* @param {object} [body]
|
|
2061
|
-
* @param {*} [options] Override http request option.
|
|
2062
|
-
* @throws {RequiredError}
|
|
2063
|
-
*/
|
|
2064
|
-
createRaindrops(a, r) {
|
|
2065
|
-
return s.createRaindrops(a, r).then((o) => o(e, t));
|
|
2066
|
-
},
|
|
2067
|
-
/**
|
|
2068
|
-
*
|
|
2069
|
-
* @param {number} id
|
|
2070
|
-
* @param {*} [options] Override http request option.
|
|
2071
|
-
* @throws {RequiredError}
|
|
2072
|
-
*/
|
|
2073
|
-
getPermanentCopy(a, r) {
|
|
2074
|
-
return s.getPermanentCopy(a, r).then((o) => o(e, t));
|
|
2075
|
-
},
|
|
2076
|
-
/**
|
|
2077
|
-
*
|
|
2078
|
-
* @param {number} id
|
|
2079
|
-
* @param {*} [options] Override http request option.
|
|
2080
|
-
* @throws {RequiredError}
|
|
2081
|
-
*/
|
|
2082
|
-
getRaindrop(a, r) {
|
|
2083
|
-
return s.getRaindrop(a, r).then((o) => o(e, t));
|
|
2084
|
-
},
|
|
2085
|
-
/**
|
|
2086
|
-
*
|
|
2087
|
-
* @param {number} collectionId
|
|
2088
|
-
* @param {string} [sort]
|
|
2089
|
-
* @param {number} [perpage]
|
|
2090
|
-
* @param {number} [page]
|
|
2091
|
-
* @param {string} [search]
|
|
2092
|
-
* @param {*} [options] Override http request option.
|
|
2093
|
-
* @throws {RequiredError}
|
|
2094
|
-
*/
|
|
2095
|
-
getRaindrops(a, r, o, l, c, i) {
|
|
2096
|
-
return s.getRaindrops(a, r, o, l, c, i).then((d) => d(e, t));
|
|
2097
|
-
},
|
|
2098
|
-
/**
|
|
2099
|
-
*
|
|
2100
|
-
* @param {number} id
|
|
2101
|
-
* @param {*} [options] Override http request option.
|
|
2102
|
-
* @throws {RequiredError}
|
|
2103
|
-
*/
|
|
2104
|
-
removeRaindrop(a, r) {
|
|
2105
|
-
return s.removeRaindrop(a, r).then((o) => o(e, t));
|
|
2106
|
-
},
|
|
2107
|
-
/**
|
|
2108
|
-
*
|
|
2109
|
-
* @param {number} collectionId
|
|
2110
|
-
* @param {string} [search]
|
|
2111
|
-
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
2112
|
-
* @param {*} [options] Override http request option.
|
|
2113
|
-
* @throws {RequiredError}
|
|
2114
|
-
*/
|
|
2115
|
-
removeRaindrops(a, r, o, l) {
|
|
2116
|
-
return s.removeRaindrops(a, r, o, l).then((c) => c(e, t));
|
|
2117
|
-
},
|
|
2118
|
-
/**
|
|
2119
|
-
*
|
|
2120
|
-
* @param {number} id
|
|
2121
|
-
* @param {*} [options] Override http request option.
|
|
2122
|
-
* @throws {RequiredError}
|
|
2123
|
-
*/
|
|
2124
|
-
suggestForExistingBookmark(a, r) {
|
|
2125
|
-
return s.suggestForExistingBookmark(a, r).then((o) => o(e, t));
|
|
2126
|
-
},
|
|
2127
|
-
/**
|
|
2128
|
-
*
|
|
2129
|
-
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
2130
|
-
* @param {*} [options] Override http request option.
|
|
2131
|
-
* @throws {RequiredError}
|
|
2132
|
-
*/
|
|
2133
|
-
suggestForNewBookmark(a, r) {
|
|
2134
|
-
return s.suggestForNewBookmark(a, r).then((o) => o(e, t));
|
|
2135
|
-
},
|
|
2136
|
-
/**
|
|
2137
|
-
*
|
|
2138
|
-
* @param {number} id
|
|
2139
|
-
* @param {object} [body]
|
|
2140
|
-
* @param {*} [options] Override http request option.
|
|
2141
|
-
* @throws {RequiredError}
|
|
2142
|
-
*/
|
|
2143
|
-
updateRaindrop(a, r, o) {
|
|
2144
|
-
return s.updateRaindrop(a, r, o).then((l) => l(e, t));
|
|
2145
|
-
},
|
|
2146
|
-
/**
|
|
2147
|
-
*
|
|
2148
|
-
* @param {number} collectionId
|
|
2149
|
-
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
2150
|
-
* @param {*} [options] Override http request option.
|
|
2151
|
-
* @throws {RequiredError}
|
|
2152
|
-
*/
|
|
2153
|
-
updateRaindrops(a, r, o) {
|
|
2154
|
-
return s.updateRaindrops(a, r, o).then((l) => l(e, t));
|
|
2155
|
-
},
|
|
2156
|
-
/**
|
|
2157
|
-
*
|
|
2158
|
-
* @param {File} [file]
|
|
2159
|
-
* @param {number} [collectionId]
|
|
2160
|
-
* @param {*} [options] Override http request option.
|
|
2161
|
-
* @throws {RequiredError}
|
|
2162
|
-
*/
|
|
2163
|
-
uploadFile(a, r, o) {
|
|
2164
|
-
return s.uploadFile(a, r, o).then((l) => l(e, t));
|
|
2165
|
-
},
|
|
2166
|
-
/**
|
|
2167
|
-
*
|
|
2168
|
-
* @param {number} id
|
|
2169
|
-
* @param {File} [cover]
|
|
2170
|
-
* @param {*} [options] Override http request option.
|
|
2171
|
-
* @throws {RequiredError}
|
|
2172
|
-
*/
|
|
2173
|
-
uploadRaindropCover(a, r, o) {
|
|
2174
|
-
return s.uploadRaindropCover(a, r, o).then((l) => l(e, t));
|
|
2175
|
-
}
|
|
2176
|
-
};
|
|
2177
|
-
};
|
|
2178
|
-
let Z = class extends S {
|
|
2179
|
-
/**
|
|
2180
|
-
*
|
|
2181
|
-
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
2182
|
-
* @param {*} [options] Override http request option.
|
|
2183
|
-
* @throws {RequiredError}
|
|
2184
|
-
* @memberof RaindropApi
|
|
2185
|
-
*/
|
|
2186
|
-
createRaindrop(t, e) {
|
|
2187
|
-
return b(this.configuration).createRaindrop(t, e).then((s) => s(this.axios, this.basePath));
|
|
2188
|
-
}
|
|
2189
|
-
/**
|
|
2190
|
-
*
|
|
2191
|
-
* @param {object} [body]
|
|
2192
|
-
* @param {*} [options] Override http request option.
|
|
2193
|
-
* @throws {RequiredError}
|
|
2194
|
-
* @memberof RaindropApi
|
|
2195
|
-
*/
|
|
2196
|
-
createRaindrops(t, e) {
|
|
2197
|
-
return b(this.configuration).createRaindrops(t, e).then((s) => s(this.axios, this.basePath));
|
|
2198
|
-
}
|
|
2199
|
-
/**
|
|
2200
|
-
*
|
|
2201
|
-
* @param {number} id
|
|
2202
|
-
* @param {*} [options] Override http request option.
|
|
2203
|
-
* @throws {RequiredError}
|
|
2204
|
-
* @memberof RaindropApi
|
|
2205
|
-
*/
|
|
2206
|
-
getPermanentCopy(t, e) {
|
|
2207
|
-
return b(this.configuration).getPermanentCopy(t, e).then((s) => s(this.axios, this.basePath));
|
|
2208
|
-
}
|
|
2209
|
-
/**
|
|
2210
|
-
*
|
|
2211
|
-
* @param {number} id
|
|
2212
|
-
* @param {*} [options] Override http request option.
|
|
2213
|
-
* @throws {RequiredError}
|
|
2214
|
-
* @memberof RaindropApi
|
|
2215
|
-
*/
|
|
2216
|
-
getRaindrop(t, e) {
|
|
2217
|
-
return b(this.configuration).getRaindrop(t, e).then((s) => s(this.axios, this.basePath));
|
|
2218
|
-
}
|
|
2219
|
-
/**
|
|
2220
|
-
*
|
|
2221
|
-
* @param {number} collectionId
|
|
2222
|
-
* @param {string} [sort]
|
|
2223
|
-
* @param {number} [perpage]
|
|
2224
|
-
* @param {number} [page]
|
|
2225
|
-
* @param {string} [search]
|
|
2226
|
-
* @param {*} [options] Override http request option.
|
|
2227
|
-
* @throws {RequiredError}
|
|
2228
|
-
* @memberof RaindropApi
|
|
2229
|
-
*/
|
|
2230
|
-
getRaindrops(t, e, s, a, r, o) {
|
|
2231
|
-
return b(this.configuration).getRaindrops(t, e, s, a, r, o).then((l) => l(this.axios, this.basePath));
|
|
2232
|
-
}
|
|
2233
|
-
/**
|
|
2234
|
-
*
|
|
2235
|
-
* @param {number} id
|
|
2236
|
-
* @param {*} [options] Override http request option.
|
|
2237
|
-
* @throws {RequiredError}
|
|
2238
|
-
* @memberof RaindropApi
|
|
2239
|
-
*/
|
|
2240
|
-
removeRaindrop(t, e) {
|
|
2241
|
-
return b(this.configuration).removeRaindrop(t, e).then((s) => s(this.axios, this.basePath));
|
|
2242
|
-
}
|
|
2243
|
-
/**
|
|
2244
|
-
*
|
|
2245
|
-
* @param {number} collectionId
|
|
2246
|
-
* @param {string} [search]
|
|
2247
|
-
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
2248
|
-
* @param {*} [options] Override http request option.
|
|
2249
|
-
* @throws {RequiredError}
|
|
2250
|
-
* @memberof RaindropApi
|
|
2251
|
-
*/
|
|
2252
|
-
removeRaindrops(t, e, s, a) {
|
|
2253
|
-
return b(this.configuration).removeRaindrops(t, e, s, a).then((r) => r(this.axios, this.basePath));
|
|
2254
|
-
}
|
|
2255
|
-
/**
|
|
2256
|
-
*
|
|
2257
|
-
* @param {number} id
|
|
2258
|
-
* @param {*} [options] Override http request option.
|
|
2259
|
-
* @throws {RequiredError}
|
|
2260
|
-
* @memberof RaindropApi
|
|
2261
|
-
*/
|
|
2262
|
-
suggestForExistingBookmark(t, e) {
|
|
2263
|
-
return b(this.configuration).suggestForExistingBookmark(t, e).then((s) => s(this.axios, this.basePath));
|
|
2264
|
-
}
|
|
2265
|
-
/**
|
|
2266
|
-
*
|
|
2267
|
-
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
2268
|
-
* @param {*} [options] Override http request option.
|
|
2269
|
-
* @throws {RequiredError}
|
|
2270
|
-
* @memberof RaindropApi
|
|
2271
|
-
*/
|
|
2272
|
-
suggestForNewBookmark(t, e) {
|
|
2273
|
-
return b(this.configuration).suggestForNewBookmark(t, e).then((s) => s(this.axios, this.basePath));
|
|
2274
|
-
}
|
|
2275
|
-
/**
|
|
2276
|
-
*
|
|
2277
|
-
* @param {number} id
|
|
2278
|
-
* @param {object} [body]
|
|
2279
|
-
* @param {*} [options] Override http request option.
|
|
2280
|
-
* @throws {RequiredError}
|
|
2281
|
-
* @memberof RaindropApi
|
|
2282
|
-
*/
|
|
2283
|
-
updateRaindrop(t, e, s) {
|
|
2284
|
-
return b(this.configuration).updateRaindrop(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
2285
|
-
}
|
|
2286
|
-
/**
|
|
2287
|
-
*
|
|
2288
|
-
* @param {number} collectionId
|
|
2289
|
-
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
2290
|
-
* @param {*} [options] Override http request option.
|
|
2291
|
-
* @throws {RequiredError}
|
|
2292
|
-
* @memberof RaindropApi
|
|
2293
|
-
*/
|
|
2294
|
-
updateRaindrops(t, e, s) {
|
|
2295
|
-
return b(this.configuration).updateRaindrops(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
2296
|
-
}
|
|
2297
|
-
/**
|
|
2298
|
-
*
|
|
2299
|
-
* @param {File} [file]
|
|
2300
|
-
* @param {number} [collectionId]
|
|
2301
|
-
* @param {*} [options] Override http request option.
|
|
2302
|
-
* @throws {RequiredError}
|
|
2303
|
-
* @memberof RaindropApi
|
|
2304
|
-
*/
|
|
2305
|
-
uploadFile(t, e, s) {
|
|
2306
|
-
return b(this.configuration).uploadFile(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
2307
|
-
}
|
|
2308
|
-
/**
|
|
2309
|
-
*
|
|
2310
|
-
* @param {number} id
|
|
2311
|
-
* @param {File} [cover]
|
|
2312
|
-
* @param {*} [options] Override http request option.
|
|
2313
|
-
* @throws {RequiredError}
|
|
2314
|
-
* @memberof RaindropApi
|
|
2315
|
-
*/
|
|
2316
|
-
uploadRaindropCover(t, e, s) {
|
|
2317
|
-
return b(this.configuration).uploadRaindropCover(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
2318
|
-
}
|
|
2319
|
-
};
|
|
2320
|
-
const f = function(n) {
|
|
2321
|
-
return {
|
|
2322
|
-
/**
|
|
2323
|
-
*
|
|
2324
|
-
* @param {number} [collectionId]
|
|
2325
|
-
* @param {*} [options] Override http request option.
|
|
2326
|
-
* @throws {RequiredError}
|
|
2327
|
-
*/
|
|
2328
|
-
getTagsInCollection: async (t, e = {}) => {
|
|
2329
|
-
const s = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), a = new URL(s, m);
|
|
2330
|
-
let r;
|
|
2331
|
-
n && (r = n.baseOptions);
|
|
2332
|
-
const o = { method: "GET", ...r, ...e }, l = {}, c = {};
|
|
2333
|
-
await C(l, n), V(a, c);
|
|
2334
|
-
let i = r && r.headers ? r.headers : {};
|
|
2335
|
-
return o.headers = { ...l, ...i, ...e.headers }, {
|
|
2336
|
-
url: O(a),
|
|
2337
|
-
options: o
|
|
2338
|
-
};
|
|
2339
|
-
},
|
|
2340
|
-
/**
|
|
2341
|
-
*
|
|
2342
|
-
* @param {number} [collectionId]
|
|
2343
|
-
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
2344
|
-
* @param {*} [options] Override http request option.
|
|
2345
|
-
* @throws {RequiredError}
|
|
2346
|
-
*/
|
|
2347
|
-
removeTagsFromCollection: async (t, e, s = {}) => {
|
|
2348
|
-
const a = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
2349
|
-
let o;
|
|
2350
|
-
n && (o = n.baseOptions);
|
|
2351
|
-
const l = { method: "DELETE", ...o, ...s }, c = {}, i = {};
|
|
2352
|
-
await C(c, n), c["Content-Type"] = "application/json", V(r, i);
|
|
2353
|
-
let d = o && o.headers ? o.headers : {};
|
|
2354
|
-
return l.headers = { ...c, ...d, ...s.headers }, l.data = y(e, l, n), {
|
|
2355
|
-
url: O(r),
|
|
2356
|
-
options: l
|
|
2357
|
-
};
|
|
2358
|
-
},
|
|
2359
|
-
/**
|
|
2360
|
-
*
|
|
2361
|
-
* @param {number} [collectionId]
|
|
2362
|
-
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
2363
|
-
* @param {*} [options] Override http request option.
|
|
2364
|
-
* @throws {RequiredError}
|
|
2365
|
-
*/
|
|
2366
|
-
renameOrMergeTags: async (t, e, s = {}) => {
|
|
2367
|
-
const a = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), r = new URL(a, m);
|
|
2368
|
-
let o;
|
|
2369
|
-
n && (o = n.baseOptions);
|
|
2370
|
-
const l = { method: "PUT", ...o, ...s }, c = {}, i = {};
|
|
2371
|
-
await C(c, n), c["Content-Type"] = "application/json", V(r, i);
|
|
2372
|
-
let d = o && o.headers ? o.headers : {};
|
|
2373
|
-
return l.headers = { ...c, ...d, ...s.headers }, l.data = y(e, l, n), {
|
|
2374
|
-
url: O(r),
|
|
2375
|
-
options: l
|
|
2376
|
-
};
|
|
2377
|
-
}
|
|
2378
|
-
};
|
|
2379
|
-
}, T = function(n) {
|
|
2380
|
-
const t = f(n);
|
|
2381
|
-
return {
|
|
2382
|
-
/**
|
|
2383
|
-
*
|
|
2384
|
-
* @param {number} [collectionId]
|
|
2385
|
-
* @param {*} [options] Override http request option.
|
|
2386
|
-
* @throws {RequiredError}
|
|
2387
|
-
*/
|
|
2388
|
-
async getTagsInCollection(e, s) {
|
|
2389
|
-
const a = await t.getTagsInCollection(e, s), r = n?.serverIndex ?? 0, o = u["TagApi.getTagsInCollection"]?.[r]?.url;
|
|
2390
|
-
return (l, c) => v(a, h, p, n)(l, o || c);
|
|
2391
|
-
},
|
|
2392
|
-
/**
|
|
2393
|
-
*
|
|
2394
|
-
* @param {number} [collectionId]
|
|
2395
|
-
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
2396
|
-
* @param {*} [options] Override http request option.
|
|
2397
|
-
* @throws {RequiredError}
|
|
2398
|
-
*/
|
|
2399
|
-
async removeTagsFromCollection(e, s, a) {
|
|
2400
|
-
const r = await t.removeTagsFromCollection(e, s, a), o = n?.serverIndex ?? 0, l = u["TagApi.removeTagsFromCollection"]?.[o]?.url;
|
|
2401
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
2402
|
-
},
|
|
2403
|
-
/**
|
|
2404
|
-
*
|
|
2405
|
-
* @param {number} [collectionId]
|
|
2406
|
-
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
2407
|
-
* @param {*} [options] Override http request option.
|
|
2408
|
-
* @throws {RequiredError}
|
|
2409
|
-
*/
|
|
2410
|
-
async renameOrMergeTags(e, s, a) {
|
|
2411
|
-
const r = await t.renameOrMergeTags(e, s, a), o = n?.serverIndex ?? 0, l = u["TagApi.renameOrMergeTags"]?.[o]?.url;
|
|
2412
|
-
return (c, i) => v(r, h, p, n)(c, l || i);
|
|
2413
|
-
}
|
|
2414
|
-
};
|
|
2415
|
-
}, Re = function(n, t, e) {
|
|
2416
|
-
const s = T(n);
|
|
2417
|
-
return {
|
|
2418
|
-
/**
|
|
2419
|
-
*
|
|
2420
|
-
* @param {number} [collectionId]
|
|
2421
|
-
* @param {*} [options] Override http request option.
|
|
2422
|
-
* @throws {RequiredError}
|
|
2423
|
-
*/
|
|
2424
|
-
getTagsInCollection(a, r) {
|
|
2425
|
-
return s.getTagsInCollection(a, r).then((o) => o(e, t));
|
|
2426
|
-
},
|
|
2427
|
-
/**
|
|
2428
|
-
*
|
|
2429
|
-
* @param {number} [collectionId]
|
|
2430
|
-
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
2431
|
-
* @param {*} [options] Override http request option.
|
|
2432
|
-
* @throws {RequiredError}
|
|
2433
|
-
*/
|
|
2434
|
-
removeTagsFromCollection(a, r, o) {
|
|
2435
|
-
return s.removeTagsFromCollection(a, r, o).then((l) => l(e, t));
|
|
2436
|
-
},
|
|
2437
|
-
/**
|
|
2438
|
-
*
|
|
2439
|
-
* @param {number} [collectionId]
|
|
2440
|
-
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
2441
|
-
* @param {*} [options] Override http request option.
|
|
2442
|
-
* @throws {RequiredError}
|
|
2443
|
-
*/
|
|
2444
|
-
renameOrMergeTags(a, r, o) {
|
|
2445
|
-
return s.renameOrMergeTags(a, r, o).then((l) => l(e, t));
|
|
2446
|
-
}
|
|
2447
|
-
};
|
|
2448
|
-
};
|
|
2449
|
-
class ee extends S {
|
|
2450
|
-
/**
|
|
2451
|
-
*
|
|
2452
|
-
* @param {number} [collectionId]
|
|
2453
|
-
* @param {*} [options] Override http request option.
|
|
2454
|
-
* @throws {RequiredError}
|
|
2455
|
-
* @memberof TagApi
|
|
2456
|
-
*/
|
|
2457
|
-
getTagsInCollection(t, e) {
|
|
2458
|
-
return T(this.configuration).getTagsInCollection(t, e).then((s) => s(this.axios, this.basePath));
|
|
2459
|
-
}
|
|
2460
|
-
/**
|
|
2461
|
-
*
|
|
2462
|
-
* @param {number} [collectionId]
|
|
2463
|
-
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
2464
|
-
* @param {*} [options] Override http request option.
|
|
2465
|
-
* @throws {RequiredError}
|
|
2466
|
-
* @memberof TagApi
|
|
2467
|
-
*/
|
|
2468
|
-
removeTagsFromCollection(t, e, s) {
|
|
2469
|
-
return T(this.configuration).removeTagsFromCollection(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
2470
|
-
}
|
|
2471
|
-
/**
|
|
2472
|
-
*
|
|
2473
|
-
* @param {number} [collectionId]
|
|
2474
|
-
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
2475
|
-
* @param {*} [options] Override http request option.
|
|
2476
|
-
* @throws {RequiredError}
|
|
2477
|
-
* @memberof TagApi
|
|
2478
|
-
*/
|
|
2479
|
-
renameOrMergeTags(t, e, s) {
|
|
2480
|
-
return T(this.configuration).renameOrMergeTags(t, e, s).then((a) => a(this.axios, this.basePath));
|
|
2481
|
-
}
|
|
51
|
+
function h(e) {
|
|
52
|
+
return [...e].reduce((e, [t, n]) => (e[t] = n, e), {});
|
|
2482
53
|
}
|
|
2483
|
-
|
|
2484
|
-
|
|
2485
|
-
|
|
2486
|
-
|
|
2487
|
-
|
|
2488
|
-
|
|
2489
|
-
|
|
2490
|
-
|
|
2491
|
-
|
|
2492
|
-
|
|
2493
|
-
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
|
|
2559
|
-
|
|
2560
|
-
|
|
2561
|
-
|
|
2562
|
-
|
|
2563
|
-
|
|
2564
|
-
|
|
2565
|
-
|
|
2566
|
-
|
|
2567
|
-
|
|
2568
|
-
|
|
2569
|
-
|
|
2570
|
-
|
|
2571
|
-
|
|
2572
|
-
|
|
2573
|
-
|
|
2574
|
-
|
|
2575
|
-
|
|
2576
|
-
|
|
2577
|
-
|
|
2578
|
-
|
|
2579
|
-
|
|
2580
|
-
|
|
2581
|
-
|
|
2582
|
-
|
|
2583
|
-
|
|
2584
|
-
|
|
2585
|
-
|
|
2586
|
-
|
|
2587
|
-
|
|
2588
|
-
|
|
2589
|
-
|
|
2590
|
-
|
|
2591
|
-
|
|
2592
|
-
|
|
2593
|
-
|
|
2594
|
-
|
|
2595
|
-
|
|
2596
|
-
|
|
2597
|
-
|
|
2598
|
-
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2690
|
-
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
|
|
2698
|
-
|
|
2699
|
-
|
|
2700
|
-
|
|
2701
|
-
|
|
2702
|
-
|
|
2703
|
-
|
|
2704
|
-
|
|
2705
|
-
|
|
2706
|
-
|
|
2707
|
-
|
|
2708
|
-
|
|
2709
|
-
|
|
2710
|
-
|
|
2711
|
-
|
|
2712
|
-
|
|
54
|
+
var g = function(e) {
|
|
55
|
+
return e.pathname + e.search + e.hash;
|
|
56
|
+
}, _ = function(e, t, n, r) {
|
|
57
|
+
return (i = t, a = n) => {
|
|
58
|
+
let o = {
|
|
59
|
+
...e.options,
|
|
60
|
+
url: (i.defaults.baseURL ? "" : r?.basePath ?? a) + e.url
|
|
61
|
+
};
|
|
62
|
+
return i.request(o);
|
|
63
|
+
};
|
|
64
|
+
}, v = { Collections: "collections" }, y = { AuthorizationCode: "authorization_code" }, b = { RefreshToken: "refresh_token" }, x = {
|
|
65
|
+
Member: "member",
|
|
66
|
+
Viewer: "viewer"
|
|
67
|
+
}, ee = { Bearer: "Bearer" }, S = function(e) {
|
|
68
|
+
return {
|
|
69
|
+
authorize: async (t, n, r = {}) => {
|
|
70
|
+
c("authorize", "redirectUri", t), c("authorize", "clientId", n);
|
|
71
|
+
let i = new URL("/v1/oauth/authorize", s), a;
|
|
72
|
+
e && (a = e.baseOptions);
|
|
73
|
+
let o = {
|
|
74
|
+
method: "GET",
|
|
75
|
+
...a,
|
|
76
|
+
...r
|
|
77
|
+
}, l = {}, u = {};
|
|
78
|
+
t !== void 0 && (u.redirect_uri = t), n !== void 0 && (u.client_id = n), d(i, u);
|
|
79
|
+
let f = a && a.headers ? a.headers : {};
|
|
80
|
+
return o.headers = {
|
|
81
|
+
...l,
|
|
82
|
+
...f,
|
|
83
|
+
...r.headers
|
|
84
|
+
}, {
|
|
85
|
+
url: g(i),
|
|
86
|
+
options: o
|
|
87
|
+
};
|
|
88
|
+
},
|
|
89
|
+
getOrRefreshToken: async (t, n = {}) => {
|
|
90
|
+
let r = new URL("/v1/oauth/access_token", s), i;
|
|
91
|
+
e && (i = e.baseOptions);
|
|
92
|
+
let a = {
|
|
93
|
+
method: "POST",
|
|
94
|
+
...i,
|
|
95
|
+
...n
|
|
96
|
+
}, o = {};
|
|
97
|
+
o["Content-Type"] = "application/json", d(r, {});
|
|
98
|
+
let c = i && i.headers ? i.headers : {};
|
|
99
|
+
return a.headers = {
|
|
100
|
+
...o,
|
|
101
|
+
...c,
|
|
102
|
+
...n.headers
|
|
103
|
+
}, a.data = f(t, a, e), {
|
|
104
|
+
url: g(r),
|
|
105
|
+
options: a
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
}, C = function(t) {
|
|
110
|
+
let n = S(t);
|
|
111
|
+
return {
|
|
112
|
+
async authorize(i, a, s) {
|
|
113
|
+
let c = await n.authorize(i, a, s), l = t?.serverIndex ?? 0, u = o["AuthenticationApi.authorize"]?.[l]?.url;
|
|
114
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
115
|
+
},
|
|
116
|
+
async getOrRefreshToken(i, a) {
|
|
117
|
+
let s = await n.getOrRefreshToken(i, a), c = t?.serverIndex ?? 0, l = o["AuthenticationApi.getOrRefreshToken"]?.[c]?.url;
|
|
118
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
119
|
+
}
|
|
120
|
+
};
|
|
121
|
+
}, te = function(e, t, n) {
|
|
122
|
+
let r = C(e);
|
|
123
|
+
return {
|
|
124
|
+
authorize(e, i, a) {
|
|
125
|
+
return r.authorize(e, i, a).then((e) => e(n, t));
|
|
126
|
+
},
|
|
127
|
+
getOrRefreshToken(e, i) {
|
|
128
|
+
return r.getOrRefreshToken(e, i).then((e) => e(n, t));
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
}, w = class extends i {
|
|
132
|
+
authorize(e, t, n) {
|
|
133
|
+
return C(this.configuration).authorize(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
134
|
+
}
|
|
135
|
+
getOrRefreshToken(e, t) {
|
|
136
|
+
return C(this.configuration).getOrRefreshToken(e, t).then((e) => e(this.axios, this.basePath));
|
|
137
|
+
}
|
|
138
|
+
}, T = function(e) {
|
|
139
|
+
return {
|
|
140
|
+
acceptInvitation: async (t, n = {}) => {
|
|
141
|
+
c("acceptInvitation", "id", t);
|
|
142
|
+
let r = "/rest/v1/collection/{id}/join".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
143
|
+
e && (a = e.baseOptions);
|
|
144
|
+
let o = {
|
|
145
|
+
method: "POST",
|
|
146
|
+
...a,
|
|
147
|
+
...n
|
|
148
|
+
}, u = {};
|
|
149
|
+
await l(u, e), d(i, {});
|
|
150
|
+
let f = a && a.headers ? a.headers : {};
|
|
151
|
+
return o.headers = {
|
|
152
|
+
...u,
|
|
153
|
+
...f,
|
|
154
|
+
...n.headers
|
|
155
|
+
}, {
|
|
156
|
+
url: g(i),
|
|
157
|
+
options: o
|
|
158
|
+
};
|
|
159
|
+
},
|
|
160
|
+
changeCollaboratorAccessLevel: async (t, n, r, i = {}) => {
|
|
161
|
+
c("changeCollaboratorAccessLevel", "userId", t), c("changeCollaboratorAccessLevel", "id", n);
|
|
162
|
+
let a = "/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}", encodeURIComponent(String(t))).replace("{id}", encodeURIComponent(String(n))), o = new URL(a, s), u;
|
|
163
|
+
e && (u = e.baseOptions);
|
|
164
|
+
let p = {
|
|
165
|
+
method: "PUT",
|
|
166
|
+
...u,
|
|
167
|
+
...i
|
|
168
|
+
}, m = {};
|
|
169
|
+
await l(m, e), m["Content-Type"] = "application/json", d(o, {});
|
|
170
|
+
let h = u && u.headers ? u.headers : {};
|
|
171
|
+
return p.headers = {
|
|
172
|
+
...m,
|
|
173
|
+
...h,
|
|
174
|
+
...i.headers
|
|
175
|
+
}, p.data = f(r, p, e), {
|
|
176
|
+
url: g(o),
|
|
177
|
+
options: p
|
|
178
|
+
};
|
|
179
|
+
},
|
|
180
|
+
createCollection: async (t, n = {}) => {
|
|
181
|
+
let r = new URL("/rest/v1/collection", s), i;
|
|
182
|
+
e && (i = e.baseOptions);
|
|
183
|
+
let a = {
|
|
184
|
+
method: "POST",
|
|
185
|
+
...i,
|
|
186
|
+
...n
|
|
187
|
+
}, o = {};
|
|
188
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
189
|
+
let c = i && i.headers ? i.headers : {};
|
|
190
|
+
return a.headers = {
|
|
191
|
+
...o,
|
|
192
|
+
...c,
|
|
193
|
+
...n.headers
|
|
194
|
+
}, a.data = f(t, a, e), {
|
|
195
|
+
url: g(r),
|
|
196
|
+
options: a
|
|
197
|
+
};
|
|
198
|
+
},
|
|
199
|
+
deleteCollaborator: async (t, n, r = {}) => {
|
|
200
|
+
c("deleteCollaborator", "userId", t), c("deleteCollaborator", "id", n);
|
|
201
|
+
let i = "/rest/v1/collection/{id}/sharing/{userId}".replace("{userId}", encodeURIComponent(String(t))).replace("{id}", encodeURIComponent(String(n))), a = new URL(i, s), o;
|
|
202
|
+
e && (o = e.baseOptions);
|
|
203
|
+
let u = {
|
|
204
|
+
method: "DELETE",
|
|
205
|
+
...o,
|
|
206
|
+
...r
|
|
207
|
+
}, f = {};
|
|
208
|
+
await l(f, e), d(a, {});
|
|
209
|
+
let p = o && o.headers ? o.headers : {};
|
|
210
|
+
return u.headers = {
|
|
211
|
+
...f,
|
|
212
|
+
...p,
|
|
213
|
+
...r.headers
|
|
214
|
+
}, {
|
|
215
|
+
url: g(a),
|
|
216
|
+
options: u
|
|
217
|
+
};
|
|
218
|
+
},
|
|
219
|
+
emptyTrash: async (t = {}) => {
|
|
220
|
+
let n = new URL("/rest/v1/collection/-99", s), r;
|
|
221
|
+
e && (r = e.baseOptions);
|
|
222
|
+
let i = {
|
|
223
|
+
method: "DELETE",
|
|
224
|
+
...r,
|
|
225
|
+
...t
|
|
226
|
+
}, a = {};
|
|
227
|
+
await l(a, e), d(n, {});
|
|
228
|
+
let o = r && r.headers ? r.headers : {};
|
|
229
|
+
return i.headers = {
|
|
230
|
+
...a,
|
|
231
|
+
...o,
|
|
232
|
+
...t.headers
|
|
233
|
+
}, {
|
|
234
|
+
url: g(n),
|
|
235
|
+
options: i
|
|
236
|
+
};
|
|
237
|
+
},
|
|
238
|
+
getChildCollections: async (t = {}) => {
|
|
239
|
+
let n = new URL("/rest/v1/collections/childrens", s), r;
|
|
240
|
+
e && (r = e.baseOptions);
|
|
241
|
+
let i = {
|
|
242
|
+
method: "GET",
|
|
243
|
+
...r,
|
|
244
|
+
...t
|
|
245
|
+
}, a = {};
|
|
246
|
+
await l(a, e), d(n, {});
|
|
247
|
+
let o = r && r.headers ? r.headers : {};
|
|
248
|
+
return i.headers = {
|
|
249
|
+
...a,
|
|
250
|
+
...o,
|
|
251
|
+
...t.headers
|
|
252
|
+
}, {
|
|
253
|
+
url: g(n),
|
|
254
|
+
options: i
|
|
255
|
+
};
|
|
256
|
+
},
|
|
257
|
+
getCollaborators: async (t, n = {}) => {
|
|
258
|
+
c("getCollaborators", "id", t);
|
|
259
|
+
let r = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
260
|
+
e && (a = e.baseOptions);
|
|
261
|
+
let o = {
|
|
262
|
+
method: "GET",
|
|
263
|
+
...a,
|
|
264
|
+
...n
|
|
265
|
+
}, u = {};
|
|
266
|
+
await l(u, e), d(i, {});
|
|
267
|
+
let f = a && a.headers ? a.headers : {};
|
|
268
|
+
return o.headers = {
|
|
269
|
+
...u,
|
|
270
|
+
...f,
|
|
271
|
+
...n.headers
|
|
272
|
+
}, {
|
|
273
|
+
url: g(i),
|
|
274
|
+
options: o
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
getCollection: async (t, n = {}) => {
|
|
278
|
+
c("getCollection", "id", t);
|
|
279
|
+
let r = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
280
|
+
e && (a = e.baseOptions);
|
|
281
|
+
let o = {
|
|
282
|
+
method: "GET",
|
|
283
|
+
...a,
|
|
284
|
+
...n
|
|
285
|
+
}, u = {};
|
|
286
|
+
await l(u, e), d(i, {});
|
|
287
|
+
let f = a && a.headers ? a.headers : {};
|
|
288
|
+
return o.headers = {
|
|
289
|
+
...u,
|
|
290
|
+
...f,
|
|
291
|
+
...n.headers
|
|
292
|
+
}, {
|
|
293
|
+
url: g(i),
|
|
294
|
+
options: o
|
|
295
|
+
};
|
|
296
|
+
},
|
|
297
|
+
getFeaturedCovers: async (t = {}) => {
|
|
298
|
+
let n = new URL("/rest/v1/collections/covers", s), r;
|
|
299
|
+
e && (r = e.baseOptions);
|
|
300
|
+
let i = {
|
|
301
|
+
method: "GET",
|
|
302
|
+
...r,
|
|
303
|
+
...t
|
|
304
|
+
}, a = {};
|
|
305
|
+
await l(a, e), d(n, {});
|
|
306
|
+
let o = r && r.headers ? r.headers : {};
|
|
307
|
+
return i.headers = {
|
|
308
|
+
...a,
|
|
309
|
+
...o,
|
|
310
|
+
...t.headers
|
|
311
|
+
}, {
|
|
312
|
+
url: g(n),
|
|
313
|
+
options: i
|
|
314
|
+
};
|
|
315
|
+
},
|
|
316
|
+
getRootCollections: async (t = {}) => {
|
|
317
|
+
let n = new URL("/rest/v1/collections", s), r;
|
|
318
|
+
e && (r = e.baseOptions);
|
|
319
|
+
let i = {
|
|
320
|
+
method: "GET",
|
|
321
|
+
...r,
|
|
322
|
+
...t
|
|
323
|
+
}, a = {};
|
|
324
|
+
await l(a, e), d(n, {});
|
|
325
|
+
let o = r && r.headers ? r.headers : {};
|
|
326
|
+
return i.headers = {
|
|
327
|
+
...a,
|
|
328
|
+
...o,
|
|
329
|
+
...t.headers
|
|
330
|
+
}, {
|
|
331
|
+
url: g(n),
|
|
332
|
+
options: i
|
|
333
|
+
};
|
|
334
|
+
},
|
|
335
|
+
getSystemCollectionStats: async (t = {}) => {
|
|
336
|
+
let n = new URL("/rest/v1/user/stats", s), r;
|
|
337
|
+
e && (r = e.baseOptions);
|
|
338
|
+
let i = {
|
|
339
|
+
method: "GET",
|
|
340
|
+
...r,
|
|
341
|
+
...t
|
|
342
|
+
}, a = {};
|
|
343
|
+
await l(a, e), d(n, {});
|
|
344
|
+
let o = r && r.headers ? r.headers : {};
|
|
345
|
+
return i.headers = {
|
|
346
|
+
...a,
|
|
347
|
+
...o,
|
|
348
|
+
...t.headers
|
|
349
|
+
}, {
|
|
350
|
+
url: g(n),
|
|
351
|
+
options: i
|
|
352
|
+
};
|
|
353
|
+
},
|
|
354
|
+
mergeCollections: async (t, n = {}) => {
|
|
355
|
+
let r = new URL("/rest/v1/collections/merge", s), i;
|
|
356
|
+
e && (i = e.baseOptions);
|
|
357
|
+
let a = {
|
|
358
|
+
method: "PUT",
|
|
359
|
+
...i,
|
|
360
|
+
...n
|
|
361
|
+
}, o = {};
|
|
362
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
363
|
+
let c = i && i.headers ? i.headers : {};
|
|
364
|
+
return a.headers = {
|
|
365
|
+
...o,
|
|
366
|
+
...c,
|
|
367
|
+
...n.headers
|
|
368
|
+
}, a.data = f(t, a, e), {
|
|
369
|
+
url: g(r),
|
|
370
|
+
options: a
|
|
371
|
+
};
|
|
372
|
+
},
|
|
373
|
+
removeAllEmptyCollections: async (t = {}) => {
|
|
374
|
+
let n = new URL("/rest/v1/collections/clean", s), r;
|
|
375
|
+
e && (r = e.baseOptions);
|
|
376
|
+
let i = {
|
|
377
|
+
method: "PUT",
|
|
378
|
+
...r,
|
|
379
|
+
...t
|
|
380
|
+
}, a = {};
|
|
381
|
+
await l(a, e), d(n, {});
|
|
382
|
+
let o = r && r.headers ? r.headers : {};
|
|
383
|
+
return i.headers = {
|
|
384
|
+
...a,
|
|
385
|
+
...o,
|
|
386
|
+
...t.headers
|
|
387
|
+
}, {
|
|
388
|
+
url: g(n),
|
|
389
|
+
options: i
|
|
390
|
+
};
|
|
391
|
+
},
|
|
392
|
+
removeCollection: async (t, n = {}) => {
|
|
393
|
+
c("removeCollection", "id", t);
|
|
394
|
+
let r = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
395
|
+
e && (a = e.baseOptions);
|
|
396
|
+
let o = {
|
|
397
|
+
method: "DELETE",
|
|
398
|
+
...a,
|
|
399
|
+
...n
|
|
400
|
+
}, u = {};
|
|
401
|
+
await l(u, e), d(i, {});
|
|
402
|
+
let f = a && a.headers ? a.headers : {};
|
|
403
|
+
return o.headers = {
|
|
404
|
+
...u,
|
|
405
|
+
...f,
|
|
406
|
+
...n.headers
|
|
407
|
+
}, {
|
|
408
|
+
url: g(i),
|
|
409
|
+
options: o
|
|
410
|
+
};
|
|
411
|
+
},
|
|
412
|
+
removeCollections: async (t, n = {}) => {
|
|
413
|
+
let r = new URL("/rest/v1/collections", s), i;
|
|
414
|
+
e && (i = e.baseOptions);
|
|
415
|
+
let a = {
|
|
416
|
+
method: "DELETE",
|
|
417
|
+
...i,
|
|
418
|
+
...n
|
|
419
|
+
}, o = {};
|
|
420
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
421
|
+
let c = i && i.headers ? i.headers : {};
|
|
422
|
+
return a.headers = {
|
|
423
|
+
...o,
|
|
424
|
+
...c,
|
|
425
|
+
...n.headers
|
|
426
|
+
}, a.data = f(t, a, e), {
|
|
427
|
+
url: g(r),
|
|
428
|
+
options: a
|
|
429
|
+
};
|
|
430
|
+
},
|
|
431
|
+
reorderAllCollections: async (t, n = {}) => {
|
|
432
|
+
let r = new URL("/rest/v1/collections", s), i;
|
|
433
|
+
e && (i = e.baseOptions);
|
|
434
|
+
let a = {
|
|
435
|
+
method: "PUT",
|
|
436
|
+
...i,
|
|
437
|
+
...n
|
|
438
|
+
}, o = {};
|
|
439
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
440
|
+
let c = i && i.headers ? i.headers : {};
|
|
441
|
+
return a.headers = {
|
|
442
|
+
...o,
|
|
443
|
+
...c,
|
|
444
|
+
...n.headers
|
|
445
|
+
}, a.data = f(t, a, e), {
|
|
446
|
+
url: g(r),
|
|
447
|
+
options: a
|
|
448
|
+
};
|
|
449
|
+
},
|
|
450
|
+
searchCovers: async (t, n = {}) => {
|
|
451
|
+
c("searchCovers", "text", t);
|
|
452
|
+
let r = "/rest/v1/collections/covers/{text}".replace("{text}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
453
|
+
e && (a = e.baseOptions);
|
|
454
|
+
let o = {
|
|
455
|
+
method: "GET",
|
|
456
|
+
...a,
|
|
457
|
+
...n
|
|
458
|
+
}, u = {};
|
|
459
|
+
await l(u, e), d(i, {});
|
|
460
|
+
let f = a && a.headers ? a.headers : {};
|
|
461
|
+
return o.headers = {
|
|
462
|
+
...u,
|
|
463
|
+
...f,
|
|
464
|
+
...n.headers
|
|
465
|
+
}, {
|
|
466
|
+
url: g(i),
|
|
467
|
+
options: o
|
|
468
|
+
};
|
|
469
|
+
},
|
|
470
|
+
shareCollection: async (t, n, r = {}) => {
|
|
471
|
+
c("shareCollection", "id", t);
|
|
472
|
+
let i = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
473
|
+
e && (o = e.baseOptions);
|
|
474
|
+
let u = {
|
|
475
|
+
method: "POST",
|
|
476
|
+
...o,
|
|
477
|
+
...r
|
|
478
|
+
}, p = {};
|
|
479
|
+
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
|
|
480
|
+
let m = o && o.headers ? o.headers : {};
|
|
481
|
+
return u.headers = {
|
|
482
|
+
...p,
|
|
483
|
+
...m,
|
|
484
|
+
...r.headers
|
|
485
|
+
}, u.data = f(n, u, e), {
|
|
486
|
+
url: g(a),
|
|
487
|
+
options: u
|
|
488
|
+
};
|
|
489
|
+
},
|
|
490
|
+
unshareOrLeaveCollection: async (t, n = {}) => {
|
|
491
|
+
c("unshareOrLeaveCollection", "id", t);
|
|
492
|
+
let r = "/rest/v1/collection/{id}/sharing".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
493
|
+
e && (a = e.baseOptions);
|
|
494
|
+
let o = {
|
|
495
|
+
method: "DELETE",
|
|
496
|
+
...a,
|
|
497
|
+
...n
|
|
498
|
+
}, u = {};
|
|
499
|
+
await l(u, e), d(i, {});
|
|
500
|
+
let f = a && a.headers ? a.headers : {};
|
|
501
|
+
return o.headers = {
|
|
502
|
+
...u,
|
|
503
|
+
...f,
|
|
504
|
+
...n.headers
|
|
505
|
+
}, {
|
|
506
|
+
url: g(i),
|
|
507
|
+
options: o
|
|
508
|
+
};
|
|
509
|
+
},
|
|
510
|
+
updateCollection: async (t, n, r = {}) => {
|
|
511
|
+
c("updateCollection", "id", t);
|
|
512
|
+
let i = "/rest/v1/collection/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
513
|
+
e && (o = e.baseOptions);
|
|
514
|
+
let u = {
|
|
515
|
+
method: "PUT",
|
|
516
|
+
...o,
|
|
517
|
+
...r
|
|
518
|
+
}, p = {};
|
|
519
|
+
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
|
|
520
|
+
let m = o && o.headers ? o.headers : {};
|
|
521
|
+
return u.headers = {
|
|
522
|
+
...p,
|
|
523
|
+
...m,
|
|
524
|
+
...r.headers
|
|
525
|
+
}, u.data = f(n, u, e), {
|
|
526
|
+
url: g(a),
|
|
527
|
+
options: u
|
|
528
|
+
};
|
|
529
|
+
},
|
|
530
|
+
uploadCollectionCover: async (t, n, r = {}) => {
|
|
531
|
+
c("uploadCollectionCover", "id", t);
|
|
532
|
+
let i = "/rest/v1/collection/{id}/cover".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
533
|
+
e && (o = e.baseOptions);
|
|
534
|
+
let u = {
|
|
535
|
+
method: "PUT",
|
|
536
|
+
...o,
|
|
537
|
+
...r
|
|
538
|
+
}, f = {}, p = {}, m = new (e && e.formDataCtor || FormData)();
|
|
539
|
+
await l(f, e), n !== void 0 && m.append("cover", n), f["Content-Type"] = "multipart/form-data", d(a, p);
|
|
540
|
+
let h = o && o.headers ? o.headers : {};
|
|
541
|
+
return u.headers = {
|
|
542
|
+
...f,
|
|
543
|
+
...h,
|
|
544
|
+
...r.headers
|
|
545
|
+
}, u.data = m, {
|
|
546
|
+
url: g(a),
|
|
547
|
+
options: u
|
|
548
|
+
};
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
}, E = function(t) {
|
|
552
|
+
let n = T(t);
|
|
553
|
+
return {
|
|
554
|
+
async acceptInvitation(i, a) {
|
|
555
|
+
let s = await n.acceptInvitation(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.acceptInvitation"]?.[c]?.url;
|
|
556
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
557
|
+
},
|
|
558
|
+
async changeCollaboratorAccessLevel(i, a, s, c) {
|
|
559
|
+
let l = await n.changeCollaboratorAccessLevel(i, a, s, c), u = t?.serverIndex ?? 0, d = o["CollectionApi.changeCollaboratorAccessLevel"]?.[u]?.url;
|
|
560
|
+
return (n, i) => _(l, e, r, t)(n, d || i);
|
|
561
|
+
},
|
|
562
|
+
async createCollection(i, a) {
|
|
563
|
+
let s = await n.createCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.createCollection"]?.[c]?.url;
|
|
564
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
565
|
+
},
|
|
566
|
+
async deleteCollaborator(i, a, s) {
|
|
567
|
+
let c = await n.deleteCollaborator(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.deleteCollaborator"]?.[l]?.url;
|
|
568
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
569
|
+
},
|
|
570
|
+
async emptyTrash(i) {
|
|
571
|
+
let a = await n.emptyTrash(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.emptyTrash"]?.[s]?.url;
|
|
572
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
573
|
+
},
|
|
574
|
+
async getChildCollections(i) {
|
|
575
|
+
let a = await n.getChildCollections(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getChildCollections"]?.[s]?.url;
|
|
576
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
577
|
+
},
|
|
578
|
+
async getCollaborators(i, a) {
|
|
579
|
+
let s = await n.getCollaborators(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.getCollaborators"]?.[c]?.url;
|
|
580
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
581
|
+
},
|
|
582
|
+
async getCollection(i, a) {
|
|
583
|
+
let s = await n.getCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.getCollection"]?.[c]?.url;
|
|
584
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
585
|
+
},
|
|
586
|
+
async getFeaturedCovers(i) {
|
|
587
|
+
let a = await n.getFeaturedCovers(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getFeaturedCovers"]?.[s]?.url;
|
|
588
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
589
|
+
},
|
|
590
|
+
async getRootCollections(i) {
|
|
591
|
+
let a = await n.getRootCollections(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getRootCollections"]?.[s]?.url;
|
|
592
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
593
|
+
},
|
|
594
|
+
async getSystemCollectionStats(i) {
|
|
595
|
+
let a = await n.getSystemCollectionStats(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.getSystemCollectionStats"]?.[s]?.url;
|
|
596
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
597
|
+
},
|
|
598
|
+
async mergeCollections(i, a) {
|
|
599
|
+
let s = await n.mergeCollections(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.mergeCollections"]?.[c]?.url;
|
|
600
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
601
|
+
},
|
|
602
|
+
async removeAllEmptyCollections(i) {
|
|
603
|
+
let a = await n.removeAllEmptyCollections(i), s = t?.serverIndex ?? 0, c = o["CollectionApi.removeAllEmptyCollections"]?.[s]?.url;
|
|
604
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
605
|
+
},
|
|
606
|
+
async removeCollection(i, a) {
|
|
607
|
+
let s = await n.removeCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.removeCollection"]?.[c]?.url;
|
|
608
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
609
|
+
},
|
|
610
|
+
async removeCollections(i, a) {
|
|
611
|
+
let s = await n.removeCollections(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.removeCollections"]?.[c]?.url;
|
|
612
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
613
|
+
},
|
|
614
|
+
async reorderAllCollections(i, a) {
|
|
615
|
+
let s = await n.reorderAllCollections(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.reorderAllCollections"]?.[c]?.url;
|
|
616
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
617
|
+
},
|
|
618
|
+
async searchCovers(i, a) {
|
|
619
|
+
let s = await n.searchCovers(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.searchCovers"]?.[c]?.url;
|
|
620
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
621
|
+
},
|
|
622
|
+
async shareCollection(i, a, s) {
|
|
623
|
+
let c = await n.shareCollection(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.shareCollection"]?.[l]?.url;
|
|
624
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
625
|
+
},
|
|
626
|
+
async unshareOrLeaveCollection(i, a) {
|
|
627
|
+
let s = await n.unshareOrLeaveCollection(i, a), c = t?.serverIndex ?? 0, l = o["CollectionApi.unshareOrLeaveCollection"]?.[c]?.url;
|
|
628
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
629
|
+
},
|
|
630
|
+
async updateCollection(i, a, s) {
|
|
631
|
+
let c = await n.updateCollection(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.updateCollection"]?.[l]?.url;
|
|
632
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
633
|
+
},
|
|
634
|
+
async uploadCollectionCover(i, a, s) {
|
|
635
|
+
let c = await n.uploadCollectionCover(i, a, s), l = t?.serverIndex ?? 0, u = o["CollectionApi.uploadCollectionCover"]?.[l]?.url;
|
|
636
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
637
|
+
}
|
|
638
|
+
};
|
|
639
|
+
}, D = function(e, t, n) {
|
|
640
|
+
let r = E(e);
|
|
641
|
+
return {
|
|
642
|
+
acceptInvitation(e, i) {
|
|
643
|
+
return r.acceptInvitation(e, i).then((e) => e(n, t));
|
|
644
|
+
},
|
|
645
|
+
changeCollaboratorAccessLevel(e, i, a, o) {
|
|
646
|
+
return r.changeCollaboratorAccessLevel(e, i, a, o).then((e) => e(n, t));
|
|
647
|
+
},
|
|
648
|
+
createCollection(e, i) {
|
|
649
|
+
return r.createCollection(e, i).then((e) => e(n, t));
|
|
650
|
+
},
|
|
651
|
+
deleteCollaborator(e, i, a) {
|
|
652
|
+
return r.deleteCollaborator(e, i, a).then((e) => e(n, t));
|
|
653
|
+
},
|
|
654
|
+
emptyTrash(e) {
|
|
655
|
+
return r.emptyTrash(e).then((e) => e(n, t));
|
|
656
|
+
},
|
|
657
|
+
getChildCollections(e) {
|
|
658
|
+
return r.getChildCollections(e).then((e) => e(n, t));
|
|
659
|
+
},
|
|
660
|
+
getCollaborators(e, i) {
|
|
661
|
+
return r.getCollaborators(e, i).then((e) => e(n, t));
|
|
662
|
+
},
|
|
663
|
+
getCollection(e, i) {
|
|
664
|
+
return r.getCollection(e, i).then((e) => e(n, t));
|
|
665
|
+
},
|
|
666
|
+
getFeaturedCovers(e) {
|
|
667
|
+
return r.getFeaturedCovers(e).then((e) => e(n, t));
|
|
668
|
+
},
|
|
669
|
+
getRootCollections(e) {
|
|
670
|
+
return r.getRootCollections(e).then((e) => e(n, t));
|
|
671
|
+
},
|
|
672
|
+
getSystemCollectionStats(e) {
|
|
673
|
+
return r.getSystemCollectionStats(e).then((e) => e(n, t));
|
|
674
|
+
},
|
|
675
|
+
mergeCollections(e, i) {
|
|
676
|
+
return r.mergeCollections(e, i).then((e) => e(n, t));
|
|
677
|
+
},
|
|
678
|
+
removeAllEmptyCollections(e) {
|
|
679
|
+
return r.removeAllEmptyCollections(e).then((e) => e(n, t));
|
|
680
|
+
},
|
|
681
|
+
removeCollection(e, i) {
|
|
682
|
+
return r.removeCollection(e, i).then((e) => e(n, t));
|
|
683
|
+
},
|
|
684
|
+
removeCollections(e, i) {
|
|
685
|
+
return r.removeCollections(e, i).then((e) => e(n, t));
|
|
686
|
+
},
|
|
687
|
+
reorderAllCollections(e, i) {
|
|
688
|
+
return r.reorderAllCollections(e, i).then((e) => e(n, t));
|
|
689
|
+
},
|
|
690
|
+
searchCovers(e, i) {
|
|
691
|
+
return r.searchCovers(e, i).then((e) => e(n, t));
|
|
692
|
+
},
|
|
693
|
+
shareCollection(e, i, a) {
|
|
694
|
+
return r.shareCollection(e, i, a).then((e) => e(n, t));
|
|
695
|
+
},
|
|
696
|
+
unshareOrLeaveCollection(e, i) {
|
|
697
|
+
return r.unshareOrLeaveCollection(e, i).then((e) => e(n, t));
|
|
698
|
+
},
|
|
699
|
+
updateCollection(e, i, a) {
|
|
700
|
+
return r.updateCollection(e, i, a).then((e) => e(n, t));
|
|
701
|
+
},
|
|
702
|
+
uploadCollectionCover(e, i, a) {
|
|
703
|
+
return r.uploadCollectionCover(e, i, a).then((e) => e(n, t));
|
|
704
|
+
}
|
|
705
|
+
};
|
|
706
|
+
}, O = class extends i {
|
|
707
|
+
acceptInvitation(e, t) {
|
|
708
|
+
return E(this.configuration).acceptInvitation(e, t).then((e) => e(this.axios, this.basePath));
|
|
709
|
+
}
|
|
710
|
+
changeCollaboratorAccessLevel(e, t, n, r) {
|
|
711
|
+
return E(this.configuration).changeCollaboratorAccessLevel(e, t, n, r).then((e) => e(this.axios, this.basePath));
|
|
712
|
+
}
|
|
713
|
+
createCollection(e, t) {
|
|
714
|
+
return E(this.configuration).createCollection(e, t).then((e) => e(this.axios, this.basePath));
|
|
715
|
+
}
|
|
716
|
+
deleteCollaborator(e, t, n) {
|
|
717
|
+
return E(this.configuration).deleteCollaborator(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
718
|
+
}
|
|
719
|
+
emptyTrash(e) {
|
|
720
|
+
return E(this.configuration).emptyTrash(e).then((e) => e(this.axios, this.basePath));
|
|
721
|
+
}
|
|
722
|
+
getChildCollections(e) {
|
|
723
|
+
return E(this.configuration).getChildCollections(e).then((e) => e(this.axios, this.basePath));
|
|
724
|
+
}
|
|
725
|
+
getCollaborators(e, t) {
|
|
726
|
+
return E(this.configuration).getCollaborators(e, t).then((e) => e(this.axios, this.basePath));
|
|
727
|
+
}
|
|
728
|
+
getCollection(e, t) {
|
|
729
|
+
return E(this.configuration).getCollection(e, t).then((e) => e(this.axios, this.basePath));
|
|
730
|
+
}
|
|
731
|
+
getFeaturedCovers(e) {
|
|
732
|
+
return E(this.configuration).getFeaturedCovers(e).then((e) => e(this.axios, this.basePath));
|
|
733
|
+
}
|
|
734
|
+
getRootCollections(e) {
|
|
735
|
+
return E(this.configuration).getRootCollections(e).then((e) => e(this.axios, this.basePath));
|
|
736
|
+
}
|
|
737
|
+
getSystemCollectionStats(e) {
|
|
738
|
+
return E(this.configuration).getSystemCollectionStats(e).then((e) => e(this.axios, this.basePath));
|
|
739
|
+
}
|
|
740
|
+
mergeCollections(e, t) {
|
|
741
|
+
return E(this.configuration).mergeCollections(e, t).then((e) => e(this.axios, this.basePath));
|
|
742
|
+
}
|
|
743
|
+
removeAllEmptyCollections(e) {
|
|
744
|
+
return E(this.configuration).removeAllEmptyCollections(e).then((e) => e(this.axios, this.basePath));
|
|
745
|
+
}
|
|
746
|
+
removeCollection(e, t) {
|
|
747
|
+
return E(this.configuration).removeCollection(e, t).then((e) => e(this.axios, this.basePath));
|
|
748
|
+
}
|
|
749
|
+
removeCollections(e, t) {
|
|
750
|
+
return E(this.configuration).removeCollections(e, t).then((e) => e(this.axios, this.basePath));
|
|
751
|
+
}
|
|
752
|
+
reorderAllCollections(e, t) {
|
|
753
|
+
return E(this.configuration).reorderAllCollections(e, t).then((e) => e(this.axios, this.basePath));
|
|
754
|
+
}
|
|
755
|
+
searchCovers(e, t) {
|
|
756
|
+
return E(this.configuration).searchCovers(e, t).then((e) => e(this.axios, this.basePath));
|
|
757
|
+
}
|
|
758
|
+
shareCollection(e, t, n) {
|
|
759
|
+
return E(this.configuration).shareCollection(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
760
|
+
}
|
|
761
|
+
unshareOrLeaveCollection(e, t) {
|
|
762
|
+
return E(this.configuration).unshareOrLeaveCollection(e, t).then((e) => e(this.axios, this.basePath));
|
|
763
|
+
}
|
|
764
|
+
updateCollection(e, t, n) {
|
|
765
|
+
return E(this.configuration).updateCollection(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
766
|
+
}
|
|
767
|
+
uploadCollectionCover(e, t, n) {
|
|
768
|
+
return E(this.configuration).uploadCollectionCover(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
769
|
+
}
|
|
770
|
+
}, k = function(e) {
|
|
771
|
+
return { getFilters: async (t, n, r, i = {}) => {
|
|
772
|
+
c("getFilters", "collectionId", t);
|
|
773
|
+
let a = "/rest/v1/filters/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(a, s), u;
|
|
774
|
+
e && (u = e.baseOptions);
|
|
775
|
+
let f = {
|
|
776
|
+
method: "GET",
|
|
777
|
+
...u,
|
|
778
|
+
...i
|
|
779
|
+
}, p = {}, m = {};
|
|
780
|
+
await l(p, e), n !== void 0 && (m.tagsSort = n), r !== void 0 && (m.search = r), d(o, m);
|
|
781
|
+
let h = u && u.headers ? u.headers : {};
|
|
782
|
+
return f.headers = {
|
|
783
|
+
...p,
|
|
784
|
+
...h,
|
|
785
|
+
...i.headers
|
|
786
|
+
}, {
|
|
787
|
+
url: g(o),
|
|
788
|
+
options: f
|
|
789
|
+
};
|
|
790
|
+
} };
|
|
791
|
+
}, A = function(t) {
|
|
792
|
+
let n = k(t);
|
|
793
|
+
return { async getFilters(i, a, s, c) {
|
|
794
|
+
let l = await n.getFilters(i, a, s, c), u = t?.serverIndex ?? 0, d = o["FilterApi.getFilters"]?.[u]?.url;
|
|
795
|
+
return (n, i) => _(l, e, r, t)(n, d || i);
|
|
796
|
+
} };
|
|
797
|
+
}, ne = function(e, t, n) {
|
|
798
|
+
let r = A(e);
|
|
799
|
+
return { getFilters(e, i, a, o) {
|
|
800
|
+
return r.getFilters(e, i, a, o).then((e) => e(n, t));
|
|
801
|
+
} };
|
|
802
|
+
}, j = class extends i {
|
|
803
|
+
getFilters(e, t, n, r) {
|
|
804
|
+
return A(this.configuration).getFilters(e, t, n, r).then((e) => e(this.axios, this.basePath));
|
|
805
|
+
}
|
|
806
|
+
}, re = {
|
|
807
|
+
MinusCount: "-count",
|
|
808
|
+
Id: "_id"
|
|
809
|
+
}, M = function(e) {
|
|
810
|
+
return {
|
|
811
|
+
getAllHighlights: async (t, n, r = {}) => {
|
|
812
|
+
let i = new URL("/rest/v1/highlights", s), a;
|
|
813
|
+
e && (a = e.baseOptions);
|
|
814
|
+
let o = {
|
|
815
|
+
method: "GET",
|
|
816
|
+
...a,
|
|
817
|
+
...r
|
|
818
|
+
}, c = {}, u = {};
|
|
819
|
+
await l(c, e), t !== void 0 && (u.page = t), n !== void 0 && (u.perpage = n), d(i, u);
|
|
820
|
+
let f = a && a.headers ? a.headers : {};
|
|
821
|
+
return o.headers = {
|
|
822
|
+
...c,
|
|
823
|
+
...f,
|
|
824
|
+
...r.headers
|
|
825
|
+
}, {
|
|
826
|
+
url: g(i),
|
|
827
|
+
options: o
|
|
828
|
+
};
|
|
829
|
+
},
|
|
830
|
+
getHighlightsInCollection: async (t, n, r, i = {}) => {
|
|
831
|
+
c("getHighlightsInCollection", "collectionId", t);
|
|
832
|
+
let a = "/rest/v1/highlights/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(a, s), u;
|
|
833
|
+
e && (u = e.baseOptions);
|
|
834
|
+
let f = {
|
|
835
|
+
method: "GET",
|
|
836
|
+
...u,
|
|
837
|
+
...i
|
|
838
|
+
}, p = {}, m = {};
|
|
839
|
+
await l(p, e), n !== void 0 && (m.page = n), r !== void 0 && (m.perpage = r), d(o, m);
|
|
840
|
+
let h = u && u.headers ? u.headers : {};
|
|
841
|
+
return f.headers = {
|
|
842
|
+
...p,
|
|
843
|
+
...h,
|
|
844
|
+
...i.headers
|
|
845
|
+
}, {
|
|
846
|
+
url: g(o),
|
|
847
|
+
options: f
|
|
848
|
+
};
|
|
849
|
+
},
|
|
850
|
+
getRaindrop: async (t, n = {}) => {
|
|
851
|
+
c("getRaindrop", "id", t);
|
|
852
|
+
let r = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
853
|
+
e && (a = e.baseOptions);
|
|
854
|
+
let o = {
|
|
855
|
+
method: "GET",
|
|
856
|
+
...a,
|
|
857
|
+
...n
|
|
858
|
+
}, u = {};
|
|
859
|
+
await l(u, e), d(i, {});
|
|
860
|
+
let f = a && a.headers ? a.headers : {};
|
|
861
|
+
return o.headers = {
|
|
862
|
+
...u,
|
|
863
|
+
...f,
|
|
864
|
+
...n.headers
|
|
865
|
+
}, {
|
|
866
|
+
url: g(i),
|
|
867
|
+
options: o
|
|
868
|
+
};
|
|
869
|
+
},
|
|
870
|
+
updateRaindrop: async (t, n, r = {}) => {
|
|
871
|
+
c("updateRaindrop", "id", t);
|
|
872
|
+
let i = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
873
|
+
e && (o = e.baseOptions);
|
|
874
|
+
let u = {
|
|
875
|
+
method: "PUT",
|
|
876
|
+
...o,
|
|
877
|
+
...r
|
|
878
|
+
}, p = {};
|
|
879
|
+
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
|
|
880
|
+
let m = o && o.headers ? o.headers : {};
|
|
881
|
+
return u.headers = {
|
|
882
|
+
...p,
|
|
883
|
+
...m,
|
|
884
|
+
...r.headers
|
|
885
|
+
}, u.data = f(n, u, e), {
|
|
886
|
+
url: g(a),
|
|
887
|
+
options: u
|
|
888
|
+
};
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
}, N = function(t) {
|
|
892
|
+
let n = M(t);
|
|
893
|
+
return {
|
|
894
|
+
async getAllHighlights(i, a, s) {
|
|
895
|
+
let c = await n.getAllHighlights(i, a, s), l = t?.serverIndex ?? 0, u = o["HighlightApi.getAllHighlights"]?.[l]?.url;
|
|
896
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
897
|
+
},
|
|
898
|
+
async getHighlightsInCollection(i, a, s, c) {
|
|
899
|
+
let l = await n.getHighlightsInCollection(i, a, s, c), u = t?.serverIndex ?? 0, d = o["HighlightApi.getHighlightsInCollection"]?.[u]?.url;
|
|
900
|
+
return (n, i) => _(l, e, r, t)(n, d || i);
|
|
901
|
+
},
|
|
902
|
+
async getRaindrop(i, a) {
|
|
903
|
+
let s = await n.getRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["HighlightApi.getRaindrop"]?.[c]?.url;
|
|
904
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
905
|
+
},
|
|
906
|
+
async updateRaindrop(i, a, s) {
|
|
907
|
+
let c = await n.updateRaindrop(i, a, s), l = t?.serverIndex ?? 0, u = o["HighlightApi.updateRaindrop"]?.[l]?.url;
|
|
908
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
909
|
+
}
|
|
910
|
+
};
|
|
911
|
+
}, P = function(e, t, n) {
|
|
912
|
+
let r = N(e);
|
|
913
|
+
return {
|
|
914
|
+
getAllHighlights(e, i, a) {
|
|
915
|
+
return r.getAllHighlights(e, i, a).then((e) => e(n, t));
|
|
916
|
+
},
|
|
917
|
+
getHighlightsInCollection(e, i, a, o) {
|
|
918
|
+
return r.getHighlightsInCollection(e, i, a, o).then((e) => e(n, t));
|
|
919
|
+
},
|
|
920
|
+
getRaindrop(e, i) {
|
|
921
|
+
return r.getRaindrop(e, i).then((e) => e(n, t));
|
|
922
|
+
},
|
|
923
|
+
updateRaindrop(e, i, a) {
|
|
924
|
+
return r.updateRaindrop(e, i, a).then((e) => e(n, t));
|
|
925
|
+
}
|
|
926
|
+
};
|
|
927
|
+
}, F = class extends i {
|
|
928
|
+
getAllHighlights(e, t, n) {
|
|
929
|
+
return N(this.configuration).getAllHighlights(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
930
|
+
}
|
|
931
|
+
getHighlightsInCollection(e, t, n, r) {
|
|
932
|
+
return N(this.configuration).getHighlightsInCollection(e, t, n, r).then((e) => e(this.axios, this.basePath));
|
|
933
|
+
}
|
|
934
|
+
getRaindrop(e, t) {
|
|
935
|
+
return N(this.configuration).getRaindrop(e, t).then((e) => e(this.axios, this.basePath));
|
|
936
|
+
}
|
|
937
|
+
updateRaindrop(e, t, n) {
|
|
938
|
+
return N(this.configuration).updateRaindrop(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
939
|
+
}
|
|
940
|
+
}, I = function(e) {
|
|
941
|
+
return {
|
|
942
|
+
checkURLsExist: async (t, n = {}) => {
|
|
943
|
+
let r = new URL("/rest/v1/import/url/exists", s), i;
|
|
944
|
+
e && (i = e.baseOptions);
|
|
945
|
+
let a = {
|
|
946
|
+
method: "POST",
|
|
947
|
+
...i,
|
|
948
|
+
...n
|
|
949
|
+
}, o = {};
|
|
950
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
951
|
+
let c = i && i.headers ? i.headers : {};
|
|
952
|
+
return a.headers = {
|
|
953
|
+
...o,
|
|
954
|
+
...c,
|
|
955
|
+
...n.headers
|
|
956
|
+
}, a.data = f(t, a, e), {
|
|
957
|
+
url: g(r),
|
|
958
|
+
options: a
|
|
959
|
+
};
|
|
960
|
+
},
|
|
961
|
+
importHTMLBookmarkFile: async (t, n = {}) => {
|
|
962
|
+
let r = new URL("/rest/v1/import/file", s), i;
|
|
963
|
+
e && (i = e.baseOptions);
|
|
964
|
+
let a = {
|
|
965
|
+
method: "POST",
|
|
966
|
+
...i,
|
|
967
|
+
...n
|
|
968
|
+
}, o = {}, c = {}, u = new (e && e.formDataCtor || FormData)();
|
|
969
|
+
await l(o, e), t !== void 0 && u.append("import", t), o["Content-Type"] = "multipart/form-data", d(r, c);
|
|
970
|
+
let f = i && i.headers ? i.headers : {};
|
|
971
|
+
return a.headers = {
|
|
972
|
+
...o,
|
|
973
|
+
...f,
|
|
974
|
+
...n.headers
|
|
975
|
+
}, a.data = u, {
|
|
976
|
+
url: g(r),
|
|
977
|
+
options: a
|
|
978
|
+
};
|
|
979
|
+
},
|
|
980
|
+
parseURL: async (t, n = {}) => {
|
|
981
|
+
let r = new URL("/rest/v1/import/url/parse", s), i;
|
|
982
|
+
e && (i = e.baseOptions);
|
|
983
|
+
let a = {
|
|
984
|
+
method: "GET",
|
|
985
|
+
...i,
|
|
986
|
+
...n
|
|
987
|
+
}, o = {}, c = {};
|
|
988
|
+
await l(o, e), t !== void 0 && (c.url = t), d(r, c);
|
|
989
|
+
let u = i && i.headers ? i.headers : {};
|
|
990
|
+
return a.headers = {
|
|
991
|
+
...o,
|
|
992
|
+
...u,
|
|
993
|
+
...n.headers
|
|
994
|
+
}, {
|
|
995
|
+
url: g(r),
|
|
996
|
+
options: a
|
|
997
|
+
};
|
|
998
|
+
}
|
|
999
|
+
};
|
|
1000
|
+
}, L = function(t) {
|
|
1001
|
+
let n = I(t);
|
|
1002
|
+
return {
|
|
1003
|
+
async checkURLsExist(i, a) {
|
|
1004
|
+
let s = await n.checkURLsExist(i, a), c = t?.serverIndex ?? 0, l = o["ImportApi.checkURLsExist"]?.[c]?.url;
|
|
1005
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1006
|
+
},
|
|
1007
|
+
async importHTMLBookmarkFile(i, a) {
|
|
1008
|
+
let s = await n.importHTMLBookmarkFile(i, a), c = t?.serverIndex ?? 0, l = o["ImportApi.importHTMLBookmarkFile"]?.[c]?.url;
|
|
1009
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1010
|
+
},
|
|
1011
|
+
async parseURL(i, a) {
|
|
1012
|
+
let s = await n.parseURL(i, a), c = t?.serverIndex ?? 0, l = o["ImportApi.parseURL"]?.[c]?.url;
|
|
1013
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1014
|
+
}
|
|
1015
|
+
};
|
|
1016
|
+
}, ie = function(e, t, n) {
|
|
1017
|
+
let r = L(e);
|
|
1018
|
+
return {
|
|
1019
|
+
checkURLsExist(e, i) {
|
|
1020
|
+
return r.checkURLsExist(e, i).then((e) => e(n, t));
|
|
1021
|
+
},
|
|
1022
|
+
importHTMLBookmarkFile(e, i) {
|
|
1023
|
+
return r.importHTMLBookmarkFile(e, i).then((e) => e(n, t));
|
|
1024
|
+
},
|
|
1025
|
+
parseURL(e, i) {
|
|
1026
|
+
return r.parseURL(e, i).then((e) => e(n, t));
|
|
1027
|
+
}
|
|
1028
|
+
};
|
|
1029
|
+
}, R = class extends i {
|
|
1030
|
+
checkURLsExist(e, t) {
|
|
1031
|
+
return L(this.configuration).checkURLsExist(e, t).then((e) => e(this.axios, this.basePath));
|
|
1032
|
+
}
|
|
1033
|
+
importHTMLBookmarkFile(e, t) {
|
|
1034
|
+
return L(this.configuration).importHTMLBookmarkFile(e, t).then((e) => e(this.axios, this.basePath));
|
|
1035
|
+
}
|
|
1036
|
+
parseURL(e, t) {
|
|
1037
|
+
return L(this.configuration).parseURL(e, t).then((e) => e(this.axios, this.basePath));
|
|
1038
|
+
}
|
|
1039
|
+
}, z = function(e) {
|
|
1040
|
+
return {
|
|
1041
|
+
createRaindrop: async (t, n = {}) => {
|
|
1042
|
+
let r = new URL("/rest/v1/raindrop", s), i;
|
|
1043
|
+
e && (i = e.baseOptions);
|
|
1044
|
+
let a = {
|
|
1045
|
+
method: "POST",
|
|
1046
|
+
...i,
|
|
1047
|
+
...n
|
|
1048
|
+
}, o = {};
|
|
1049
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
1050
|
+
let c = i && i.headers ? i.headers : {};
|
|
1051
|
+
return a.headers = {
|
|
1052
|
+
...o,
|
|
1053
|
+
...c,
|
|
1054
|
+
...n.headers
|
|
1055
|
+
}, a.data = f(t, a, e), {
|
|
1056
|
+
url: g(r),
|
|
1057
|
+
options: a
|
|
1058
|
+
};
|
|
1059
|
+
},
|
|
1060
|
+
createRaindrops: async (t, n = {}) => {
|
|
1061
|
+
let r = new URL("/rest/v1/raindrops", s), i;
|
|
1062
|
+
e && (i = e.baseOptions);
|
|
1063
|
+
let a = {
|
|
1064
|
+
method: "POST",
|
|
1065
|
+
...i,
|
|
1066
|
+
...n
|
|
1067
|
+
}, o = {};
|
|
1068
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
1069
|
+
let c = i && i.headers ? i.headers : {};
|
|
1070
|
+
return a.headers = {
|
|
1071
|
+
...o,
|
|
1072
|
+
...c,
|
|
1073
|
+
...n.headers
|
|
1074
|
+
}, a.data = f(t, a, e), {
|
|
1075
|
+
url: g(r),
|
|
1076
|
+
options: a
|
|
1077
|
+
};
|
|
1078
|
+
},
|
|
1079
|
+
getPermanentCopy: async (t, n = {}) => {
|
|
1080
|
+
c("getPermanentCopy", "id", t);
|
|
1081
|
+
let r = "/rest/v1/raindrop/{id}/cache".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1082
|
+
e && (a = e.baseOptions);
|
|
1083
|
+
let o = {
|
|
1084
|
+
method: "GET",
|
|
1085
|
+
...a,
|
|
1086
|
+
...n
|
|
1087
|
+
}, u = {};
|
|
1088
|
+
await l(u, e), d(i, {});
|
|
1089
|
+
let f = a && a.headers ? a.headers : {};
|
|
1090
|
+
return o.headers = {
|
|
1091
|
+
...u,
|
|
1092
|
+
...f,
|
|
1093
|
+
...n.headers
|
|
1094
|
+
}, {
|
|
1095
|
+
url: g(i),
|
|
1096
|
+
options: o
|
|
1097
|
+
};
|
|
1098
|
+
},
|
|
1099
|
+
getRaindrop: async (t, n = {}) => {
|
|
1100
|
+
c("getRaindrop", "id", t);
|
|
1101
|
+
let r = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1102
|
+
e && (a = e.baseOptions);
|
|
1103
|
+
let o = {
|
|
1104
|
+
method: "GET",
|
|
1105
|
+
...a,
|
|
1106
|
+
...n
|
|
1107
|
+
}, u = {};
|
|
1108
|
+
await l(u, e), d(i, {});
|
|
1109
|
+
let f = a && a.headers ? a.headers : {};
|
|
1110
|
+
return o.headers = {
|
|
1111
|
+
...u,
|
|
1112
|
+
...f,
|
|
1113
|
+
...n.headers
|
|
1114
|
+
}, {
|
|
1115
|
+
url: g(i),
|
|
1116
|
+
options: o
|
|
1117
|
+
};
|
|
1118
|
+
},
|
|
1119
|
+
getRaindrops: async (t, n, r, i, a, o = {}) => {
|
|
1120
|
+
c("getRaindrops", "collectionId", t);
|
|
1121
|
+
let u = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), f = new URL(u, s), p;
|
|
1122
|
+
e && (p = e.baseOptions);
|
|
1123
|
+
let m = {
|
|
1124
|
+
method: "GET",
|
|
1125
|
+
...p,
|
|
1126
|
+
...o
|
|
1127
|
+
}, h = {}, _ = {};
|
|
1128
|
+
await l(h, e), n !== void 0 && (_.sort = n), r !== void 0 && (_.perpage = r), i !== void 0 && (_.page = i), a !== void 0 && (_.search = a), d(f, _);
|
|
1129
|
+
let v = p && p.headers ? p.headers : {};
|
|
1130
|
+
return m.headers = {
|
|
1131
|
+
...h,
|
|
1132
|
+
...v,
|
|
1133
|
+
...o.headers
|
|
1134
|
+
}, {
|
|
1135
|
+
url: g(f),
|
|
1136
|
+
options: m
|
|
1137
|
+
};
|
|
1138
|
+
},
|
|
1139
|
+
removeRaindrop: async (t, n = {}) => {
|
|
1140
|
+
c("removeRaindrop", "id", t);
|
|
1141
|
+
let r = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1142
|
+
e && (a = e.baseOptions);
|
|
1143
|
+
let o = {
|
|
1144
|
+
method: "DELETE",
|
|
1145
|
+
...a,
|
|
1146
|
+
...n
|
|
1147
|
+
}, u = {};
|
|
1148
|
+
await l(u, e), d(i, {});
|
|
1149
|
+
let f = a && a.headers ? a.headers : {};
|
|
1150
|
+
return o.headers = {
|
|
1151
|
+
...u,
|
|
1152
|
+
...f,
|
|
1153
|
+
...n.headers
|
|
1154
|
+
}, {
|
|
1155
|
+
url: g(i),
|
|
1156
|
+
options: o
|
|
1157
|
+
};
|
|
1158
|
+
},
|
|
1159
|
+
removeRaindrops: async (t, n, r, i = {}) => {
|
|
1160
|
+
c("removeRaindrops", "collectionId", t);
|
|
1161
|
+
let a = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), o = new URL(a, s), u;
|
|
1162
|
+
e && (u = e.baseOptions);
|
|
1163
|
+
let p = {
|
|
1164
|
+
method: "DELETE",
|
|
1165
|
+
...u,
|
|
1166
|
+
...i
|
|
1167
|
+
}, m = {}, h = {};
|
|
1168
|
+
await l(m, e), n !== void 0 && (h.search = n), m["Content-Type"] = "application/json", d(o, h);
|
|
1169
|
+
let _ = u && u.headers ? u.headers : {};
|
|
1170
|
+
return p.headers = {
|
|
1171
|
+
...m,
|
|
1172
|
+
..._,
|
|
1173
|
+
...i.headers
|
|
1174
|
+
}, p.data = f(r, p, e), {
|
|
1175
|
+
url: g(o),
|
|
1176
|
+
options: p
|
|
1177
|
+
};
|
|
1178
|
+
},
|
|
1179
|
+
suggestForExistingBookmark: async (t, n = {}) => {
|
|
1180
|
+
c("suggestForExistingBookmark", "id", t);
|
|
1181
|
+
let r = "/rest/v1/raindrop/{id}/suggest".replace("{id}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1182
|
+
e && (a = e.baseOptions);
|
|
1183
|
+
let o = {
|
|
1184
|
+
method: "GET",
|
|
1185
|
+
...a,
|
|
1186
|
+
...n
|
|
1187
|
+
}, u = {};
|
|
1188
|
+
await l(u, e), d(i, {});
|
|
1189
|
+
let f = a && a.headers ? a.headers : {};
|
|
1190
|
+
return o.headers = {
|
|
1191
|
+
...u,
|
|
1192
|
+
...f,
|
|
1193
|
+
...n.headers
|
|
1194
|
+
}, {
|
|
1195
|
+
url: g(i),
|
|
1196
|
+
options: o
|
|
1197
|
+
};
|
|
1198
|
+
},
|
|
1199
|
+
suggestForNewBookmark: async (t, n = {}) => {
|
|
1200
|
+
let r = new URL("/rest/v1/raindrop/suggest", s), i;
|
|
1201
|
+
e && (i = e.baseOptions);
|
|
1202
|
+
let a = {
|
|
1203
|
+
method: "POST",
|
|
1204
|
+
...i,
|
|
1205
|
+
...n
|
|
1206
|
+
}, o = {};
|
|
1207
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
1208
|
+
let c = i && i.headers ? i.headers : {};
|
|
1209
|
+
return a.headers = {
|
|
1210
|
+
...o,
|
|
1211
|
+
...c,
|
|
1212
|
+
...n.headers
|
|
1213
|
+
}, a.data = f(t, a, e), {
|
|
1214
|
+
url: g(r),
|
|
1215
|
+
options: a
|
|
1216
|
+
};
|
|
1217
|
+
},
|
|
1218
|
+
updateRaindrop: async (t, n, r = {}) => {
|
|
1219
|
+
c("updateRaindrop", "id", t);
|
|
1220
|
+
let i = "/rest/v1/raindrop/{id}".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
1221
|
+
e && (o = e.baseOptions);
|
|
1222
|
+
let u = {
|
|
1223
|
+
method: "PUT",
|
|
1224
|
+
...o,
|
|
1225
|
+
...r
|
|
1226
|
+
}, p = {};
|
|
1227
|
+
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
|
|
1228
|
+
let m = o && o.headers ? o.headers : {};
|
|
1229
|
+
return u.headers = {
|
|
1230
|
+
...p,
|
|
1231
|
+
...m,
|
|
1232
|
+
...r.headers
|
|
1233
|
+
}, u.data = f(n, u, e), {
|
|
1234
|
+
url: g(a),
|
|
1235
|
+
options: u
|
|
1236
|
+
};
|
|
1237
|
+
},
|
|
1238
|
+
updateRaindrops: async (t, n, r = {}) => {
|
|
1239
|
+
c("updateRaindrops", "collectionId", t);
|
|
1240
|
+
let i = "/rest/v1/raindrops/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
1241
|
+
e && (o = e.baseOptions);
|
|
1242
|
+
let u = {
|
|
1243
|
+
method: "PUT",
|
|
1244
|
+
...o,
|
|
1245
|
+
...r
|
|
1246
|
+
}, p = {};
|
|
1247
|
+
await l(p, e), p["Content-Type"] = "application/json", d(a, {});
|
|
1248
|
+
let m = o && o.headers ? o.headers : {};
|
|
1249
|
+
return u.headers = {
|
|
1250
|
+
...p,
|
|
1251
|
+
...m,
|
|
1252
|
+
...r.headers
|
|
1253
|
+
}, u.data = f(n, u, e), {
|
|
1254
|
+
url: g(a),
|
|
1255
|
+
options: u
|
|
1256
|
+
};
|
|
1257
|
+
},
|
|
1258
|
+
uploadFile: async (t, n, r = {}) => {
|
|
1259
|
+
let i = new URL("/rest/v1/raindrop/file", s), a;
|
|
1260
|
+
e && (a = e.baseOptions);
|
|
1261
|
+
let o = {
|
|
1262
|
+
method: "PUT",
|
|
1263
|
+
...a,
|
|
1264
|
+
...r
|
|
1265
|
+
}, c = {}, u = {}, f = new (e && e.formDataCtor || FormData)();
|
|
1266
|
+
await l(c, e), t !== void 0 && f.append("file", t), n !== void 0 && f.append("collectionId", n), c["Content-Type"] = "multipart/form-data", d(i, u);
|
|
1267
|
+
let p = a && a.headers ? a.headers : {};
|
|
1268
|
+
return o.headers = {
|
|
1269
|
+
...c,
|
|
1270
|
+
...p,
|
|
1271
|
+
...r.headers
|
|
1272
|
+
}, o.data = f, {
|
|
1273
|
+
url: g(i),
|
|
1274
|
+
options: o
|
|
1275
|
+
};
|
|
1276
|
+
},
|
|
1277
|
+
uploadRaindropCover: async (t, n, r = {}) => {
|
|
1278
|
+
c("uploadRaindropCover", "id", t);
|
|
1279
|
+
let i = "/rest/v1/raindrop/{id}/cover".replace("{id}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
1280
|
+
e && (o = e.baseOptions);
|
|
1281
|
+
let u = {
|
|
1282
|
+
method: "PUT",
|
|
1283
|
+
...o,
|
|
1284
|
+
...r
|
|
1285
|
+
}, f = {}, p = {}, m = new (e && e.formDataCtor || FormData)();
|
|
1286
|
+
await l(f, e), n !== void 0 && m.append("cover", n), f["Content-Type"] = "multipart/form-data", d(a, p);
|
|
1287
|
+
let h = o && o.headers ? o.headers : {};
|
|
1288
|
+
return u.headers = {
|
|
1289
|
+
...f,
|
|
1290
|
+
...h,
|
|
1291
|
+
...r.headers
|
|
1292
|
+
}, u.data = m, {
|
|
1293
|
+
url: g(a),
|
|
1294
|
+
options: u
|
|
1295
|
+
};
|
|
1296
|
+
}
|
|
1297
|
+
};
|
|
1298
|
+
}, B = function(t) {
|
|
1299
|
+
let n = z(t);
|
|
1300
|
+
return {
|
|
1301
|
+
async createRaindrop(i, a) {
|
|
1302
|
+
let s = await n.createRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.createRaindrop"]?.[c]?.url;
|
|
1303
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1304
|
+
},
|
|
1305
|
+
async createRaindrops(i, a) {
|
|
1306
|
+
let s = await n.createRaindrops(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.createRaindrops"]?.[c]?.url;
|
|
1307
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1308
|
+
},
|
|
1309
|
+
async getPermanentCopy(i, a) {
|
|
1310
|
+
let s = await n.getPermanentCopy(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.getPermanentCopy"]?.[c]?.url;
|
|
1311
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1312
|
+
},
|
|
1313
|
+
async getRaindrop(i, a) {
|
|
1314
|
+
let s = await n.getRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.getRaindrop"]?.[c]?.url;
|
|
1315
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1316
|
+
},
|
|
1317
|
+
async getRaindrops(i, a, s, c, l, u) {
|
|
1318
|
+
let d = await n.getRaindrops(i, a, s, c, l, u), f = t?.serverIndex ?? 0, p = o["RaindropApi.getRaindrops"]?.[f]?.url;
|
|
1319
|
+
return (n, i) => _(d, e, r, t)(n, p || i);
|
|
1320
|
+
},
|
|
1321
|
+
async removeRaindrop(i, a) {
|
|
1322
|
+
let s = await n.removeRaindrop(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.removeRaindrop"]?.[c]?.url;
|
|
1323
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1324
|
+
},
|
|
1325
|
+
async removeRaindrops(i, a, s, c) {
|
|
1326
|
+
let l = await n.removeRaindrops(i, a, s, c), u = t?.serverIndex ?? 0, d = o["RaindropApi.removeRaindrops"]?.[u]?.url;
|
|
1327
|
+
return (n, i) => _(l, e, r, t)(n, d || i);
|
|
1328
|
+
},
|
|
1329
|
+
async suggestForExistingBookmark(i, a) {
|
|
1330
|
+
let s = await n.suggestForExistingBookmark(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.suggestForExistingBookmark"]?.[c]?.url;
|
|
1331
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1332
|
+
},
|
|
1333
|
+
async suggestForNewBookmark(i, a) {
|
|
1334
|
+
let s = await n.suggestForNewBookmark(i, a), c = t?.serverIndex ?? 0, l = o["RaindropApi.suggestForNewBookmark"]?.[c]?.url;
|
|
1335
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1336
|
+
},
|
|
1337
|
+
async updateRaindrop(i, a, s) {
|
|
1338
|
+
let c = await n.updateRaindrop(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.updateRaindrop"]?.[l]?.url;
|
|
1339
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
1340
|
+
},
|
|
1341
|
+
async updateRaindrops(i, a, s) {
|
|
1342
|
+
let c = await n.updateRaindrops(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.updateRaindrops"]?.[l]?.url;
|
|
1343
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
1344
|
+
},
|
|
1345
|
+
async uploadFile(i, a, s) {
|
|
1346
|
+
let c = await n.uploadFile(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.uploadFile"]?.[l]?.url;
|
|
1347
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
1348
|
+
},
|
|
1349
|
+
async uploadRaindropCover(i, a, s) {
|
|
1350
|
+
let c = await n.uploadRaindropCover(i, a, s), l = t?.serverIndex ?? 0, u = o["RaindropApi.uploadRaindropCover"]?.[l]?.url;
|
|
1351
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
1352
|
+
}
|
|
1353
|
+
};
|
|
1354
|
+
}, ae = function(e, t, n) {
|
|
1355
|
+
let r = B(e);
|
|
1356
|
+
return {
|
|
1357
|
+
createRaindrop(e, i) {
|
|
1358
|
+
return r.createRaindrop(e, i).then((e) => e(n, t));
|
|
1359
|
+
},
|
|
1360
|
+
createRaindrops(e, i) {
|
|
1361
|
+
return r.createRaindrops(e, i).then((e) => e(n, t));
|
|
1362
|
+
},
|
|
1363
|
+
getPermanentCopy(e, i) {
|
|
1364
|
+
return r.getPermanentCopy(e, i).then((e) => e(n, t));
|
|
1365
|
+
},
|
|
1366
|
+
getRaindrop(e, i) {
|
|
1367
|
+
return r.getRaindrop(e, i).then((e) => e(n, t));
|
|
1368
|
+
},
|
|
1369
|
+
getRaindrops(e, i, a, o, s, c) {
|
|
1370
|
+
return r.getRaindrops(e, i, a, o, s, c).then((e) => e(n, t));
|
|
1371
|
+
},
|
|
1372
|
+
removeRaindrop(e, i) {
|
|
1373
|
+
return r.removeRaindrop(e, i).then((e) => e(n, t));
|
|
1374
|
+
},
|
|
1375
|
+
removeRaindrops(e, i, a, o) {
|
|
1376
|
+
return r.removeRaindrops(e, i, a, o).then((e) => e(n, t));
|
|
1377
|
+
},
|
|
1378
|
+
suggestForExistingBookmark(e, i) {
|
|
1379
|
+
return r.suggestForExistingBookmark(e, i).then((e) => e(n, t));
|
|
1380
|
+
},
|
|
1381
|
+
suggestForNewBookmark(e, i) {
|
|
1382
|
+
return r.suggestForNewBookmark(e, i).then((e) => e(n, t));
|
|
1383
|
+
},
|
|
1384
|
+
updateRaindrop(e, i, a) {
|
|
1385
|
+
return r.updateRaindrop(e, i, a).then((e) => e(n, t));
|
|
1386
|
+
},
|
|
1387
|
+
updateRaindrops(e, i, a) {
|
|
1388
|
+
return r.updateRaindrops(e, i, a).then((e) => e(n, t));
|
|
1389
|
+
},
|
|
1390
|
+
uploadFile(e, i, a) {
|
|
1391
|
+
return r.uploadFile(e, i, a).then((e) => e(n, t));
|
|
1392
|
+
},
|
|
1393
|
+
uploadRaindropCover(e, i, a) {
|
|
1394
|
+
return r.uploadRaindropCover(e, i, a).then((e) => e(n, t));
|
|
1395
|
+
}
|
|
1396
|
+
};
|
|
1397
|
+
}, V = class extends i {
|
|
1398
|
+
createRaindrop(e, t) {
|
|
1399
|
+
return B(this.configuration).createRaindrop(e, t).then((e) => e(this.axios, this.basePath));
|
|
1400
|
+
}
|
|
1401
|
+
createRaindrops(e, t) {
|
|
1402
|
+
return B(this.configuration).createRaindrops(e, t).then((e) => e(this.axios, this.basePath));
|
|
1403
|
+
}
|
|
1404
|
+
getPermanentCopy(e, t) {
|
|
1405
|
+
return B(this.configuration).getPermanentCopy(e, t).then((e) => e(this.axios, this.basePath));
|
|
1406
|
+
}
|
|
1407
|
+
getRaindrop(e, t) {
|
|
1408
|
+
return B(this.configuration).getRaindrop(e, t).then((e) => e(this.axios, this.basePath));
|
|
1409
|
+
}
|
|
1410
|
+
getRaindrops(e, t, n, r, i, a) {
|
|
1411
|
+
return B(this.configuration).getRaindrops(e, t, n, r, i, a).then((e) => e(this.axios, this.basePath));
|
|
1412
|
+
}
|
|
1413
|
+
removeRaindrop(e, t) {
|
|
1414
|
+
return B(this.configuration).removeRaindrop(e, t).then((e) => e(this.axios, this.basePath));
|
|
1415
|
+
}
|
|
1416
|
+
removeRaindrops(e, t, n, r) {
|
|
1417
|
+
return B(this.configuration).removeRaindrops(e, t, n, r).then((e) => e(this.axios, this.basePath));
|
|
1418
|
+
}
|
|
1419
|
+
suggestForExistingBookmark(e, t) {
|
|
1420
|
+
return B(this.configuration).suggestForExistingBookmark(e, t).then((e) => e(this.axios, this.basePath));
|
|
1421
|
+
}
|
|
1422
|
+
suggestForNewBookmark(e, t) {
|
|
1423
|
+
return B(this.configuration).suggestForNewBookmark(e, t).then((e) => e(this.axios, this.basePath));
|
|
1424
|
+
}
|
|
1425
|
+
updateRaindrop(e, t, n) {
|
|
1426
|
+
return B(this.configuration).updateRaindrop(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
1427
|
+
}
|
|
1428
|
+
updateRaindrops(e, t, n) {
|
|
1429
|
+
return B(this.configuration).updateRaindrops(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
1430
|
+
}
|
|
1431
|
+
uploadFile(e, t, n) {
|
|
1432
|
+
return B(this.configuration).uploadFile(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
1433
|
+
}
|
|
1434
|
+
uploadRaindropCover(e, t, n) {
|
|
1435
|
+
return B(this.configuration).uploadRaindropCover(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
1436
|
+
}
|
|
1437
|
+
}, H = function(e) {
|
|
1438
|
+
return {
|
|
1439
|
+
getTagsInCollection: async (t, n = {}) => {
|
|
1440
|
+
let r = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1441
|
+
e && (a = e.baseOptions);
|
|
1442
|
+
let o = {
|
|
1443
|
+
method: "GET",
|
|
1444
|
+
...a,
|
|
1445
|
+
...n
|
|
1446
|
+
}, c = {};
|
|
1447
|
+
await l(c, e), d(i, {});
|
|
1448
|
+
let u = a && a.headers ? a.headers : {};
|
|
1449
|
+
return o.headers = {
|
|
1450
|
+
...c,
|
|
1451
|
+
...u,
|
|
1452
|
+
...n.headers
|
|
1453
|
+
}, {
|
|
1454
|
+
url: g(i),
|
|
1455
|
+
options: o
|
|
1456
|
+
};
|
|
1457
|
+
},
|
|
1458
|
+
removeTagsFromCollection: async (t, n, r = {}) => {
|
|
1459
|
+
let i = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
1460
|
+
e && (o = e.baseOptions);
|
|
1461
|
+
let c = {
|
|
1462
|
+
method: "DELETE",
|
|
1463
|
+
...o,
|
|
1464
|
+
...r
|
|
1465
|
+
}, u = {};
|
|
1466
|
+
await l(u, e), u["Content-Type"] = "application/json", d(a, {});
|
|
1467
|
+
let p = o && o.headers ? o.headers : {};
|
|
1468
|
+
return c.headers = {
|
|
1469
|
+
...u,
|
|
1470
|
+
...p,
|
|
1471
|
+
...r.headers
|
|
1472
|
+
}, c.data = f(n, c, e), {
|
|
1473
|
+
url: g(a),
|
|
1474
|
+
options: c
|
|
1475
|
+
};
|
|
1476
|
+
},
|
|
1477
|
+
renameOrMergeTags: async (t, n, r = {}) => {
|
|
1478
|
+
let i = "/rest/v1/tags/{collectionId}".replace("{collectionId}", encodeURIComponent(String(t))), a = new URL(i, s), o;
|
|
1479
|
+
e && (o = e.baseOptions);
|
|
1480
|
+
let c = {
|
|
1481
|
+
method: "PUT",
|
|
1482
|
+
...o,
|
|
1483
|
+
...r
|
|
1484
|
+
}, u = {};
|
|
1485
|
+
await l(u, e), u["Content-Type"] = "application/json", d(a, {});
|
|
1486
|
+
let p = o && o.headers ? o.headers : {};
|
|
1487
|
+
return c.headers = {
|
|
1488
|
+
...u,
|
|
1489
|
+
...p,
|
|
1490
|
+
...r.headers
|
|
1491
|
+
}, c.data = f(n, c, e), {
|
|
1492
|
+
url: g(a),
|
|
1493
|
+
options: c
|
|
1494
|
+
};
|
|
1495
|
+
}
|
|
1496
|
+
};
|
|
1497
|
+
}, U = function(t) {
|
|
1498
|
+
let n = H(t);
|
|
1499
|
+
return {
|
|
1500
|
+
async getTagsInCollection(i, a) {
|
|
1501
|
+
let s = await n.getTagsInCollection(i, a), c = t?.serverIndex ?? 0, l = o["TagApi.getTagsInCollection"]?.[c]?.url;
|
|
1502
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1503
|
+
},
|
|
1504
|
+
async removeTagsFromCollection(i, a, s) {
|
|
1505
|
+
let c = await n.removeTagsFromCollection(i, a, s), l = t?.serverIndex ?? 0, u = o["TagApi.removeTagsFromCollection"]?.[l]?.url;
|
|
1506
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
1507
|
+
},
|
|
1508
|
+
async renameOrMergeTags(i, a, s) {
|
|
1509
|
+
let c = await n.renameOrMergeTags(i, a, s), l = t?.serverIndex ?? 0, u = o["TagApi.renameOrMergeTags"]?.[l]?.url;
|
|
1510
|
+
return (n, i) => _(c, e, r, t)(n, u || i);
|
|
1511
|
+
}
|
|
1512
|
+
};
|
|
1513
|
+
}, oe = function(e, t, n) {
|
|
1514
|
+
let r = U(e);
|
|
1515
|
+
return {
|
|
1516
|
+
getTagsInCollection(e, i) {
|
|
1517
|
+
return r.getTagsInCollection(e, i).then((e) => e(n, t));
|
|
1518
|
+
},
|
|
1519
|
+
removeTagsFromCollection(e, i, a) {
|
|
1520
|
+
return r.removeTagsFromCollection(e, i, a).then((e) => e(n, t));
|
|
1521
|
+
},
|
|
1522
|
+
renameOrMergeTags(e, i, a) {
|
|
1523
|
+
return r.renameOrMergeTags(e, i, a).then((e) => e(n, t));
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
}, W = class extends i {
|
|
1527
|
+
getTagsInCollection(e, t) {
|
|
1528
|
+
return U(this.configuration).getTagsInCollection(e, t).then((e) => e(this.axios, this.basePath));
|
|
1529
|
+
}
|
|
1530
|
+
removeTagsFromCollection(e, t, n) {
|
|
1531
|
+
return U(this.configuration).removeTagsFromCollection(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
1532
|
+
}
|
|
1533
|
+
renameOrMergeTags(e, t, n) {
|
|
1534
|
+
return U(this.configuration).renameOrMergeTags(e, t, n).then((e) => e(this.axios, this.basePath));
|
|
1535
|
+
}
|
|
1536
|
+
}, G = function(e) {
|
|
1537
|
+
return {
|
|
1538
|
+
connectSocialNetworkProvider: async (t, n = {}) => {
|
|
1539
|
+
c("connectSocialNetworkProvider", "provider", t);
|
|
1540
|
+
let r = "/rest/v1/user/connect/{provider}".replace("{provider}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1541
|
+
e && (a = e.baseOptions);
|
|
1542
|
+
let o = {
|
|
1543
|
+
method: "GET",
|
|
1544
|
+
...a,
|
|
1545
|
+
...n
|
|
1546
|
+
}, u = {};
|
|
1547
|
+
await l(u, e), d(i, {});
|
|
1548
|
+
let f = a && a.headers ? a.headers : {};
|
|
1549
|
+
return o.headers = {
|
|
1550
|
+
...u,
|
|
1551
|
+
...f,
|
|
1552
|
+
...n.headers
|
|
1553
|
+
}, {
|
|
1554
|
+
url: g(i),
|
|
1555
|
+
options: o
|
|
1556
|
+
};
|
|
1557
|
+
},
|
|
1558
|
+
disconnectSocialNetworkProvider: async (t, n = {}) => {
|
|
1559
|
+
c("disconnectSocialNetworkProvider", "provider", t);
|
|
1560
|
+
let r = "/rest/v1/user/connect/{provider}/revoke".replace("{provider}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1561
|
+
e && (a = e.baseOptions);
|
|
1562
|
+
let o = {
|
|
1563
|
+
method: "GET",
|
|
1564
|
+
...a,
|
|
1565
|
+
...n
|
|
1566
|
+
}, u = {};
|
|
1567
|
+
await l(u, e), d(i, {});
|
|
1568
|
+
let f = a && a.headers ? a.headers : {};
|
|
1569
|
+
return o.headers = {
|
|
1570
|
+
...u,
|
|
1571
|
+
...f,
|
|
1572
|
+
...n.headers
|
|
1573
|
+
}, {
|
|
1574
|
+
url: g(i),
|
|
1575
|
+
options: o
|
|
1576
|
+
};
|
|
1577
|
+
},
|
|
1578
|
+
getCurrentUser: async (t = {}) => {
|
|
1579
|
+
let n = new URL("/rest/v1/user", s), r;
|
|
1580
|
+
e && (r = e.baseOptions);
|
|
1581
|
+
let i = {
|
|
1582
|
+
method: "GET",
|
|
1583
|
+
...r,
|
|
1584
|
+
...t
|
|
1585
|
+
}, a = {};
|
|
1586
|
+
await l(a, e), d(n, {});
|
|
1587
|
+
let o = r && r.headers ? r.headers : {};
|
|
1588
|
+
return i.headers = {
|
|
1589
|
+
...a,
|
|
1590
|
+
...o,
|
|
1591
|
+
...t.headers
|
|
1592
|
+
}, {
|
|
1593
|
+
url: g(n),
|
|
1594
|
+
options: i
|
|
1595
|
+
};
|
|
1596
|
+
},
|
|
1597
|
+
getPublicUserByName: async (t, n = {}) => {
|
|
1598
|
+
c("getPublicUserByName", "name", t);
|
|
1599
|
+
let r = "/rest/v1/user/{name}".replace("{name}", encodeURIComponent(String(t))), i = new URL(r, s), a;
|
|
1600
|
+
e && (a = e.baseOptions);
|
|
1601
|
+
let o = {
|
|
1602
|
+
method: "GET",
|
|
1603
|
+
...a,
|
|
1604
|
+
...n
|
|
1605
|
+
}, u = {};
|
|
1606
|
+
await l(u, e), d(i, {});
|
|
1607
|
+
let f = a && a.headers ? a.headers : {};
|
|
1608
|
+
return o.headers = {
|
|
1609
|
+
...u,
|
|
1610
|
+
...f,
|
|
1611
|
+
...n.headers
|
|
1612
|
+
}, {
|
|
1613
|
+
url: g(i),
|
|
1614
|
+
options: o
|
|
1615
|
+
};
|
|
1616
|
+
},
|
|
1617
|
+
getSystemCollectionStats: async (t = {}) => {
|
|
1618
|
+
let n = new URL("/rest/v1/user/stats", s), r;
|
|
1619
|
+
e && (r = e.baseOptions);
|
|
1620
|
+
let i = {
|
|
1621
|
+
method: "GET",
|
|
1622
|
+
...r,
|
|
1623
|
+
...t
|
|
1624
|
+
}, a = {};
|
|
1625
|
+
await l(a, e), d(n, {});
|
|
1626
|
+
let o = r && r.headers ? r.headers : {};
|
|
1627
|
+
return i.headers = {
|
|
1628
|
+
...a,
|
|
1629
|
+
...o,
|
|
1630
|
+
...t.headers
|
|
1631
|
+
}, {
|
|
1632
|
+
url: g(n),
|
|
1633
|
+
options: i
|
|
1634
|
+
};
|
|
1635
|
+
},
|
|
1636
|
+
updateCurrentUser: async (t, n = {}) => {
|
|
1637
|
+
let r = new URL("/rest/v1/user", s), i;
|
|
1638
|
+
e && (i = e.baseOptions);
|
|
1639
|
+
let a = {
|
|
1640
|
+
method: "PUT",
|
|
1641
|
+
...i,
|
|
1642
|
+
...n
|
|
1643
|
+
}, o = {};
|
|
1644
|
+
await l(o, e), o["Content-Type"] = "application/json", d(r, {});
|
|
1645
|
+
let c = i && i.headers ? i.headers : {};
|
|
1646
|
+
return a.headers = {
|
|
1647
|
+
...o,
|
|
1648
|
+
...c,
|
|
1649
|
+
...n.headers
|
|
1650
|
+
}, a.data = f(t, a, e), {
|
|
1651
|
+
url: g(r),
|
|
1652
|
+
options: a
|
|
1653
|
+
};
|
|
1654
|
+
}
|
|
1655
|
+
};
|
|
1656
|
+
}, K = function(t) {
|
|
1657
|
+
let n = G(t);
|
|
1658
|
+
return {
|
|
1659
|
+
async connectSocialNetworkProvider(i, a) {
|
|
1660
|
+
let s = await n.connectSocialNetworkProvider(i, a), c = t?.serverIndex ?? 0, l = o["UserApi.connectSocialNetworkProvider"]?.[c]?.url;
|
|
1661
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1662
|
+
},
|
|
1663
|
+
async disconnectSocialNetworkProvider(i, a) {
|
|
1664
|
+
let s = await n.disconnectSocialNetworkProvider(i, a), c = t?.serverIndex ?? 0, l = o["UserApi.disconnectSocialNetworkProvider"]?.[c]?.url;
|
|
1665
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1666
|
+
},
|
|
1667
|
+
async getCurrentUser(i) {
|
|
1668
|
+
let a = await n.getCurrentUser(i), s = t?.serverIndex ?? 0, c = o["UserApi.getCurrentUser"]?.[s]?.url;
|
|
1669
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
1670
|
+
},
|
|
1671
|
+
async getPublicUserByName(i, a) {
|
|
1672
|
+
let s = await n.getPublicUserByName(i, a), c = t?.serverIndex ?? 0, l = o["UserApi.getPublicUserByName"]?.[c]?.url;
|
|
1673
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1674
|
+
},
|
|
1675
|
+
async getSystemCollectionStats(i) {
|
|
1676
|
+
let a = await n.getSystemCollectionStats(i), s = t?.serverIndex ?? 0, c = o["UserApi.getSystemCollectionStats"]?.[s]?.url;
|
|
1677
|
+
return (n, i) => _(a, e, r, t)(n, c || i);
|
|
1678
|
+
},
|
|
1679
|
+
async updateCurrentUser(i, a) {
|
|
1680
|
+
let s = await n.updateCurrentUser(i, a), c = t?.serverIndex ?? 0, l = o["UserApi.updateCurrentUser"]?.[c]?.url;
|
|
1681
|
+
return (n, i) => _(s, e, r, t)(n, l || i);
|
|
1682
|
+
}
|
|
1683
|
+
};
|
|
1684
|
+
}, se = function(e, t, n) {
|
|
1685
|
+
let r = K(e);
|
|
1686
|
+
return {
|
|
1687
|
+
connectSocialNetworkProvider(e, i) {
|
|
1688
|
+
return r.connectSocialNetworkProvider(e, i).then((e) => e(n, t));
|
|
1689
|
+
},
|
|
1690
|
+
disconnectSocialNetworkProvider(e, i) {
|
|
1691
|
+
return r.disconnectSocialNetworkProvider(e, i).then((e) => e(n, t));
|
|
1692
|
+
},
|
|
1693
|
+
getCurrentUser(e) {
|
|
1694
|
+
return r.getCurrentUser(e).then((e) => e(n, t));
|
|
1695
|
+
},
|
|
1696
|
+
getPublicUserByName(e, i) {
|
|
1697
|
+
return r.getPublicUserByName(e, i).then((e) => e(n, t));
|
|
1698
|
+
},
|
|
1699
|
+
getSystemCollectionStats(e) {
|
|
1700
|
+
return r.getSystemCollectionStats(e).then((e) => e(n, t));
|
|
1701
|
+
},
|
|
1702
|
+
updateCurrentUser(e, i) {
|
|
1703
|
+
return r.updateCurrentUser(e, i).then((e) => e(n, t));
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
}, q = class extends i {
|
|
1707
|
+
connectSocialNetworkProvider(e, t) {
|
|
1708
|
+
return K(this.configuration).connectSocialNetworkProvider(e, t).then((e) => e(this.axios, this.basePath));
|
|
1709
|
+
}
|
|
1710
|
+
disconnectSocialNetworkProvider(e, t) {
|
|
1711
|
+
return K(this.configuration).disconnectSocialNetworkProvider(e, t).then((e) => e(this.axios, this.basePath));
|
|
1712
|
+
}
|
|
1713
|
+
getCurrentUser(e) {
|
|
1714
|
+
return K(this.configuration).getCurrentUser(e).then((e) => e(this.axios, this.basePath));
|
|
1715
|
+
}
|
|
1716
|
+
getPublicUserByName(e, t) {
|
|
1717
|
+
return K(this.configuration).getPublicUserByName(e, t).then((e) => e(this.axios, this.basePath));
|
|
1718
|
+
}
|
|
1719
|
+
getSystemCollectionStats(e) {
|
|
1720
|
+
return K(this.configuration).getSystemCollectionStats(e).then((e) => e(this.axios, this.basePath));
|
|
1721
|
+
}
|
|
1722
|
+
updateCurrentUser(e, t) {
|
|
1723
|
+
return K(this.configuration).updateCurrentUser(e, t).then((e) => e(this.axios, this.basePath));
|
|
1724
|
+
}
|
|
1725
|
+
}, ce = {
|
|
1726
|
+
Facebook: "facebook",
|
|
1727
|
+
Google: "google",
|
|
1728
|
+
Twitter: "twitter",
|
|
1729
|
+
Vkontate: "vkontate",
|
|
1730
|
+
Dropbox: "dropbox",
|
|
1731
|
+
Gdrive: "gdrive"
|
|
1732
|
+
}, le = {
|
|
1733
|
+
Facebook: "facebook",
|
|
1734
|
+
Google: "google",
|
|
1735
|
+
Twitter: "twitter",
|
|
1736
|
+
Vkontate: "vkontate",
|
|
1737
|
+
Dropbox: "dropbox",
|
|
1738
|
+
Gdrive: "gdrive"
|
|
1739
|
+
}, J = class {
|
|
1740
|
+
apiKey;
|
|
1741
|
+
username;
|
|
1742
|
+
password;
|
|
1743
|
+
accessToken;
|
|
1744
|
+
basePath;
|
|
1745
|
+
serverIndex;
|
|
1746
|
+
baseOptions;
|
|
1747
|
+
formDataCtor;
|
|
1748
|
+
constructor(e = {}) {
|
|
1749
|
+
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;
|
|
1750
|
+
}
|
|
1751
|
+
isJsonMime(e) {
|
|
1752
|
+
return e !== null && ((/* @__PURE__ */ RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i")).test(e) || e.toLowerCase() === "application/json-patch+json");
|
|
1753
|
+
}
|
|
1754
|
+
}, ue = /* @__PURE__ */ n({
|
|
1755
|
+
AuthenticationApi: () => w,
|
|
1756
|
+
AuthenticationApiAxiosParamCreator: () => S,
|
|
1757
|
+
AuthenticationApiFactory: () => te,
|
|
1758
|
+
AuthenticationApiFp: () => C,
|
|
1759
|
+
CollectionApi: () => O,
|
|
1760
|
+
CollectionApiAxiosParamCreator: () => T,
|
|
1761
|
+
CollectionApiFactory: () => D,
|
|
1762
|
+
CollectionApiFp: () => E,
|
|
1763
|
+
CollectionRefRefEnum: () => v,
|
|
1764
|
+
Configuration: () => J,
|
|
1765
|
+
ConnectSocialNetworkProviderProviderEnum: () => ce,
|
|
1766
|
+
DisconnectSocialNetworkProviderProviderEnum: () => le,
|
|
1767
|
+
FilterApi: () => j,
|
|
1768
|
+
FilterApiAxiosParamCreator: () => k,
|
|
1769
|
+
FilterApiFactory: () => ne,
|
|
1770
|
+
FilterApiFp: () => A,
|
|
1771
|
+
GetFiltersTagsSortEnum: () => re,
|
|
1772
|
+
HighlightApi: () => F,
|
|
1773
|
+
HighlightApiAxiosParamCreator: () => M,
|
|
1774
|
+
HighlightApiFactory: () => P,
|
|
1775
|
+
HighlightApiFp: () => N,
|
|
1776
|
+
ImportApi: () => R,
|
|
1777
|
+
ImportApiAxiosParamCreator: () => I,
|
|
1778
|
+
ImportApiFactory: () => ie,
|
|
1779
|
+
ImportApiFp: () => L,
|
|
1780
|
+
ObtainTokenGrantTypeEnum: () => y,
|
|
1781
|
+
RaindropApi: () => V,
|
|
1782
|
+
RaindropApiAxiosParamCreator: () => z,
|
|
1783
|
+
RaindropApiFactory: () => ae,
|
|
1784
|
+
RaindropApiFp: () => B,
|
|
1785
|
+
RefreshTokenGrantTypeEnum: () => b,
|
|
1786
|
+
Role: () => x,
|
|
1787
|
+
TagApi: () => W,
|
|
1788
|
+
TagApiAxiosParamCreator: () => H,
|
|
1789
|
+
TagApiFactory: () => oe,
|
|
1790
|
+
TagApiFp: () => U,
|
|
1791
|
+
TokenResponseTokenTypeEnum: () => ee,
|
|
1792
|
+
UserApi: () => q,
|
|
1793
|
+
UserApiAxiosParamCreator: () => G,
|
|
1794
|
+
UserApiFactory: () => se,
|
|
1795
|
+
UserApiFp: () => K
|
|
1796
|
+
}), de = class extends w {
|
|
1797
|
+
async exchangeToken(e, t) {
|
|
1798
|
+
return this.getOrRefreshToken({
|
|
1799
|
+
...e,
|
|
1800
|
+
grant_type: y.AuthorizationCode
|
|
1801
|
+
}, t).then((e) => {
|
|
1802
|
+
if (Y(e.data)) throw Error(`Request failed with error: ${e.data.errorMessage}`);
|
|
1803
|
+
return e;
|
|
1804
|
+
});
|
|
1805
|
+
}
|
|
1806
|
+
async refreshToken(e, t) {
|
|
1807
|
+
return this.getOrRefreshToken({
|
|
1808
|
+
...e,
|
|
1809
|
+
grant_type: b.RefreshToken
|
|
1810
|
+
}, t).then((e) => {
|
|
1811
|
+
if (Y(e.data)) throw Error(`Request failed with error: ${e.data.errorMessage}`);
|
|
1812
|
+
return e;
|
|
1813
|
+
});
|
|
1814
|
+
}
|
|
2713
1815
|
};
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
*
|
|
2717
|
-
* @param {ConnectSocialNetworkProviderProviderEnum} provider
|
|
2718
|
-
* @param {*} [options] Override http request option.
|
|
2719
|
-
* @throws {RequiredError}
|
|
2720
|
-
* @memberof UserApi
|
|
2721
|
-
*/
|
|
2722
|
-
connectSocialNetworkProvider(t, e) {
|
|
2723
|
-
return w(this.configuration).connectSocialNetworkProvider(t, e).then((s) => s(this.axios, this.basePath));
|
|
2724
|
-
}
|
|
2725
|
-
/**
|
|
2726
|
-
*
|
|
2727
|
-
* @param {DisconnectSocialNetworkProviderProviderEnum} provider
|
|
2728
|
-
* @param {*} [options] Override http request option.
|
|
2729
|
-
* @throws {RequiredError}
|
|
2730
|
-
* @memberof UserApi
|
|
2731
|
-
*/
|
|
2732
|
-
disconnectSocialNetworkProvider(t, e) {
|
|
2733
|
-
return w(this.configuration).disconnectSocialNetworkProvider(t, e).then((s) => s(this.axios, this.basePath));
|
|
2734
|
-
}
|
|
2735
|
-
/**
|
|
2736
|
-
*
|
|
2737
|
-
* @param {*} [options] Override http request option.
|
|
2738
|
-
* @throws {RequiredError}
|
|
2739
|
-
* @memberof UserApi
|
|
2740
|
-
*/
|
|
2741
|
-
getCurrentUser(t) {
|
|
2742
|
-
return w(this.configuration).getCurrentUser(t).then((e) => e(this.axios, this.basePath));
|
|
2743
|
-
}
|
|
2744
|
-
/**
|
|
2745
|
-
*
|
|
2746
|
-
* @param {number} name
|
|
2747
|
-
* @param {*} [options] Override http request option.
|
|
2748
|
-
* @throws {RequiredError}
|
|
2749
|
-
* @memberof UserApi
|
|
2750
|
-
*/
|
|
2751
|
-
getPublicUserByName(t, e) {
|
|
2752
|
-
return w(this.configuration).getPublicUserByName(t, e).then((s) => s(this.axios, this.basePath));
|
|
2753
|
-
}
|
|
2754
|
-
/**
|
|
2755
|
-
*
|
|
2756
|
-
* @param {*} [options] Override http request option.
|
|
2757
|
-
* @throws {RequiredError}
|
|
2758
|
-
* @memberof UserApi
|
|
2759
|
-
*/
|
|
2760
|
-
getSystemCollectionStats(t) {
|
|
2761
|
-
return w(this.configuration).getSystemCollectionStats(t).then((e) => e(this.axios, this.basePath));
|
|
2762
|
-
}
|
|
2763
|
-
/**
|
|
2764
|
-
*
|
|
2765
|
-
* @param {UpdateCurrentUserRequest} [updateCurrentUserRequest]
|
|
2766
|
-
* @param {*} [options] Override http request option.
|
|
2767
|
-
* @throws {RequiredError}
|
|
2768
|
-
* @memberof UserApi
|
|
2769
|
-
*/
|
|
2770
|
-
updateCurrentUser(t, e) {
|
|
2771
|
-
return w(this.configuration).updateCurrentUser(t, e).then((s) => s(this.axios, this.basePath));
|
|
2772
|
-
}
|
|
1816
|
+
function Y(e) {
|
|
1817
|
+
return "result" in e && e.result === !1;
|
|
2773
1818
|
}
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
1819
|
+
//#endregion
|
|
1820
|
+
//#region src/utils/tree.ts
|
|
1821
|
+
var fe = /* @__PURE__ */ n({
|
|
1822
|
+
TreeNode: () => X,
|
|
1823
|
+
makeTree: () => Q
|
|
1824
|
+
}), X = class {
|
|
1825
|
+
_data;
|
|
1826
|
+
_parent = null;
|
|
1827
|
+
_children = [];
|
|
1828
|
+
constructor(e, t) {
|
|
1829
|
+
this._data = e, t && this.addChildren(...t);
|
|
1830
|
+
}
|
|
1831
|
+
get data() {
|
|
1832
|
+
return this._data;
|
|
1833
|
+
}
|
|
1834
|
+
get parent() {
|
|
1835
|
+
return this._parent;
|
|
1836
|
+
}
|
|
1837
|
+
set parent(e) {
|
|
1838
|
+
this._parent = e, e._children.push(this);
|
|
1839
|
+
}
|
|
1840
|
+
isRoot() {
|
|
1841
|
+
return this._parent === null;
|
|
1842
|
+
}
|
|
1843
|
+
get children() {
|
|
1844
|
+
return this._children;
|
|
1845
|
+
}
|
|
1846
|
+
addChildren(...e) {
|
|
1847
|
+
this._children.push(...e);
|
|
1848
|
+
for (let t of e) t._parent = this;
|
|
1849
|
+
}
|
|
1850
|
+
traverse(e) {
|
|
1851
|
+
e(this);
|
|
1852
|
+
for (let t of this.children) t.traverse(e);
|
|
1853
|
+
}
|
|
2788
1854
|
};
|
|
2789
|
-
|
|
2790
|
-
|
|
2791
|
-
|
|
2792
|
-
|
|
2793
|
-
|
|
2794
|
-
|
|
2795
|
-
apiKey;
|
|
2796
|
-
/**
|
|
2797
|
-
* parameter for basic security
|
|
2798
|
-
*
|
|
2799
|
-
* @type {string}
|
|
2800
|
-
* @memberof Configuration
|
|
2801
|
-
*/
|
|
2802
|
-
username;
|
|
2803
|
-
/**
|
|
2804
|
-
* parameter for basic security
|
|
2805
|
-
*
|
|
2806
|
-
* @type {string}
|
|
2807
|
-
* @memberof Configuration
|
|
2808
|
-
*/
|
|
2809
|
-
password;
|
|
2810
|
-
/**
|
|
2811
|
-
* parameter for oauth2 security
|
|
2812
|
-
* @param name security name
|
|
2813
|
-
* @param scopes oauth2 scope
|
|
2814
|
-
* @memberof Configuration
|
|
2815
|
-
*/
|
|
2816
|
-
accessToken;
|
|
2817
|
-
/**
|
|
2818
|
-
* override base path
|
|
2819
|
-
*
|
|
2820
|
-
* @type {string}
|
|
2821
|
-
* @memberof Configuration
|
|
2822
|
-
*/
|
|
2823
|
-
basePath;
|
|
2824
|
-
/**
|
|
2825
|
-
* override server index
|
|
2826
|
-
*
|
|
2827
|
-
* @type {number}
|
|
2828
|
-
* @memberof Configuration
|
|
2829
|
-
*/
|
|
2830
|
-
serverIndex;
|
|
2831
|
-
/**
|
|
2832
|
-
* base options for axios calls
|
|
2833
|
-
*
|
|
2834
|
-
* @type {any}
|
|
2835
|
-
* @memberof Configuration
|
|
2836
|
-
*/
|
|
2837
|
-
baseOptions;
|
|
2838
|
-
/**
|
|
2839
|
-
* The FormData constructor that will be used to create multipart form data
|
|
2840
|
-
* requests. You can inject this here so that execution environments that
|
|
2841
|
-
* do not support the FormData class can still run the generated client.
|
|
2842
|
-
*
|
|
2843
|
-
* @type {new () => FormData}
|
|
2844
|
-
*/
|
|
2845
|
-
formDataCtor;
|
|
2846
|
-
constructor(t = {}) {
|
|
2847
|
-
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;
|
|
2848
|
-
}
|
|
2849
|
-
/**
|
|
2850
|
-
* Check if the given MIME is a JSON MIME.
|
|
2851
|
-
* JSON MIME examples:
|
|
2852
|
-
* application/json
|
|
2853
|
-
* application/json; charset=UTF8
|
|
2854
|
-
* APPLICATION/JSON
|
|
2855
|
-
* application/vnd.company+json
|
|
2856
|
-
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
2857
|
-
* @return True if the given MIME is JSON, false otherwise.
|
|
2858
|
-
*/
|
|
2859
|
-
isJsonMime(t) {
|
|
2860
|
-
const e = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
|
|
2861
|
-
return t !== null && (e.test(t) || t.toLowerCase() === "application/json-patch+json");
|
|
2862
|
-
}
|
|
2863
|
-
}
|
|
2864
|
-
const Be = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
2865
|
-
__proto__: null,
|
|
2866
|
-
AuthenticationApi: _,
|
|
2867
|
-
AuthenticationApiAxiosParamCreator: $,
|
|
2868
|
-
AuthenticationApiFactory: ue,
|
|
2869
|
-
AuthenticationApiFp: B,
|
|
2870
|
-
CollectionApi: G,
|
|
2871
|
-
CollectionApiAxiosParamCreator: M,
|
|
2872
|
-
CollectionApiFactory: me,
|
|
2873
|
-
CollectionApiFp: A,
|
|
2874
|
-
CollectionRefRefEnum: de,
|
|
2875
|
-
Configuration: ae,
|
|
2876
|
-
ConnectSocialNetworkProviderProviderEnum: ye,
|
|
2877
|
-
DisconnectSocialNetworkProviderProviderEnum: be,
|
|
2878
|
-
FilterApi: z,
|
|
2879
|
-
FilterApiAxiosParamCreator: D,
|
|
2880
|
-
FilterApiFactory: Ve,
|
|
2881
|
-
FilterApiFp: j,
|
|
2882
|
-
GetFiltersTagsSortEnum: Oe,
|
|
2883
|
-
HighlightApi: K,
|
|
2884
|
-
HighlightApiAxiosParamCreator: J,
|
|
2885
|
-
HighlightApiFactory: ve,
|
|
2886
|
-
HighlightApiFp: g,
|
|
2887
|
-
ImportApi: W,
|
|
2888
|
-
ImportApiAxiosParamCreator: Y,
|
|
2889
|
-
ImportApiFactory: Ce,
|
|
2890
|
-
ImportApiFp: I,
|
|
2891
|
-
ObtainTokenGrantTypeEnum: Q,
|
|
2892
|
-
RaindropApi: Z,
|
|
2893
|
-
RaindropApiAxiosParamCreator: X,
|
|
2894
|
-
RaindropApiFactory: Pe,
|
|
2895
|
-
RaindropApiFp: b,
|
|
2896
|
-
RefreshTokenGrantTypeEnum: N,
|
|
2897
|
-
Role: he,
|
|
2898
|
-
TagApi: ee,
|
|
2899
|
-
TagApiAxiosParamCreator: f,
|
|
2900
|
-
TagApiFactory: Re,
|
|
2901
|
-
TagApiFp: T,
|
|
2902
|
-
TokenResponseTokenTypeEnum: pe,
|
|
2903
|
-
UserApi: te,
|
|
2904
|
-
UserApiAxiosParamCreator: re,
|
|
2905
|
-
UserApiFactory: Ae,
|
|
2906
|
-
UserApiFp: w
|
|
2907
|
-
}, Symbol.toStringTag, { value: "Module" }));
|
|
2908
|
-
class xe extends _ {
|
|
2909
|
-
/**
|
|
2910
|
-
* Wrapper function of {@link _AuthenticationApi.getOrRefreshToken} for token exchange.
|
|
2911
|
-
* @param request {@link ObtainToken} but without `grant_type` field.
|
|
2912
|
-
* @param options Axios request configuration.
|
|
2913
|
-
* @returns API response.
|
|
2914
|
-
*/
|
|
2915
|
-
async exchangeToken(t, e) {
|
|
2916
|
-
return this.getOrRefreshToken(
|
|
2917
|
-
{ ...t, grant_type: Q.AuthorizationCode },
|
|
2918
|
-
e
|
|
2919
|
-
).then((s) => {
|
|
2920
|
-
if (q(s.data))
|
|
2921
|
-
throw new Error(
|
|
2922
|
-
`Request failed with error: ${s.data.errorMessage}`
|
|
2923
|
-
);
|
|
2924
|
-
return s;
|
|
2925
|
-
});
|
|
2926
|
-
}
|
|
2927
|
-
/**
|
|
2928
|
-
* Wrapper function of {@link _AuthenticationApi.getOrRefreshToken} for token refresh.
|
|
2929
|
-
* @param request {@link RefreshToken} but without `grant_type` field.
|
|
2930
|
-
* @param options Axios request configuration.
|
|
2931
|
-
* @returns API response.
|
|
2932
|
-
*/
|
|
2933
|
-
async refreshToken(t, e) {
|
|
2934
|
-
return this.getOrRefreshToken(
|
|
2935
|
-
{ ...t, grant_type: N.RefreshToken },
|
|
2936
|
-
e
|
|
2937
|
-
).then((s) => {
|
|
2938
|
-
if (q(s.data))
|
|
2939
|
-
throw new Error(
|
|
2940
|
-
`Request failed with error: ${s.data.errorMessage}`
|
|
2941
|
-
);
|
|
2942
|
-
return s;
|
|
2943
|
-
});
|
|
2944
|
-
}
|
|
2945
|
-
}
|
|
2946
|
-
function q(n) {
|
|
2947
|
-
return "result" in n && n.result === !1;
|
|
1855
|
+
function Z(e, t, n) {
|
|
1856
|
+
let r = n.filter((e) => e.parent === t);
|
|
1857
|
+
for (let t of r) {
|
|
1858
|
+
let r = t.toNode();
|
|
1859
|
+
Z(r, t.id, n), e.addChildren(r);
|
|
1860
|
+
}
|
|
2948
1861
|
}
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
2952
|
-
_children = [];
|
|
2953
|
-
/**
|
|
2954
|
-
* Create tree node.
|
|
2955
|
-
* @param data Node data.
|
|
2956
|
-
* @param children Initial tree children.
|
|
2957
|
-
*/
|
|
2958
|
-
constructor(t, e) {
|
|
2959
|
-
this._data = t, e && this.addChildren(...e);
|
|
2960
|
-
}
|
|
2961
|
-
get data() {
|
|
2962
|
-
return this._data;
|
|
2963
|
-
}
|
|
2964
|
-
get parent() {
|
|
2965
|
-
return this._parent;
|
|
2966
|
-
}
|
|
2967
|
-
set parent(t) {
|
|
2968
|
-
this._parent = t, t._children.push(this);
|
|
2969
|
-
}
|
|
2970
|
-
isRoot() {
|
|
2971
|
-
return this._parent === null;
|
|
2972
|
-
}
|
|
2973
|
-
get children() {
|
|
2974
|
-
return this._children;
|
|
2975
|
-
}
|
|
2976
|
-
/**
|
|
2977
|
-
* Add children to current node.
|
|
2978
|
-
* @param children Children nodes to append.
|
|
2979
|
-
*/
|
|
2980
|
-
addChildren(...t) {
|
|
2981
|
-
this._children.push(...t);
|
|
2982
|
-
for (const e of t)
|
|
2983
|
-
e._parent = this;
|
|
2984
|
-
}
|
|
2985
|
-
/**
|
|
2986
|
-
* Pre-order traverse this tree.
|
|
2987
|
-
* @param callbackFn Function to be called with traversing nodes.
|
|
2988
|
-
*/
|
|
2989
|
-
traverse(t) {
|
|
2990
|
-
t(this);
|
|
2991
|
-
for (const e of this.children)
|
|
2992
|
-
e.traverse(t);
|
|
2993
|
-
}
|
|
1862
|
+
function Q(e, t) {
|
|
1863
|
+
let n = new X(e);
|
|
1864
|
+
return Z(n, null, t), n;
|
|
2994
1865
|
}
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2998
|
-
|
|
2999
|
-
|
|
3000
|
-
|
|
3001
|
-
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
}
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
3018
|
-
|
|
3019
|
-
|
|
3020
|
-
|
|
3021
|
-
|
|
3022
|
-
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
|
|
3026
|
-
|
|
3027
|
-
|
|
3028
|
-
|
|
3029
|
-
|
|
3030
|
-
|
|
3031
|
-
|
|
3032
|
-
|
|
3033
|
-
|
|
3034
|
-
|
|
3035
|
-
|
|
3036
|
-
|
|
3037
|
-
|
|
3038
|
-
|
|
3039
|
-
|
|
3040
|
-
|
|
3041
|
-
|
|
3042
|
-
}
|
|
3043
|
-
}
|
|
3044
|
-
class ge extends Z {
|
|
3045
|
-
/**
|
|
3046
|
-
* Fetch all raindrops of a collection.
|
|
3047
|
-
* @param collectionId ID of collection.
|
|
3048
|
-
* @param params Request parameters.
|
|
3049
|
-
* @param options Axios request config.
|
|
3050
|
-
* @returns Array of raindrops.
|
|
3051
|
-
*/
|
|
3052
|
-
async getAllRaindrops(t, e, s) {
|
|
3053
|
-
const a = t ?? 0, r = e?.sort ?? "", o = e?.pageSize ?? 50, l = e?.search ?? "", { data: c } = await this.getRaindrops(
|
|
3054
|
-
a,
|
|
3055
|
-
r,
|
|
3056
|
-
o,
|
|
3057
|
-
0,
|
|
3058
|
-
l,
|
|
3059
|
-
s
|
|
3060
|
-
), i = c.count, d = Math.ceil(i / o), R = Array.from(Array(d).keys());
|
|
3061
|
-
R.shift();
|
|
3062
|
-
const x = await Promise.all(
|
|
3063
|
-
R.map(
|
|
3064
|
-
(L) => this.getRaindrops(
|
|
3065
|
-
a,
|
|
3066
|
-
r,
|
|
3067
|
-
o,
|
|
3068
|
-
L,
|
|
3069
|
-
l,
|
|
3070
|
-
s
|
|
3071
|
-
).then(({ data: le }) => le)
|
|
3072
|
-
)
|
|
3073
|
-
), F = [...c.items];
|
|
3074
|
-
for (const L of x)
|
|
3075
|
-
F.push(...L.items);
|
|
3076
|
-
return F;
|
|
3077
|
-
}
|
|
3078
|
-
}
|
|
3079
|
-
class ne {
|
|
3080
|
-
/** Axios client instance. If not set, will use default Axios instance. */
|
|
3081
|
-
client;
|
|
3082
|
-
/** API global configurations. */
|
|
3083
|
-
configuration;
|
|
3084
|
-
// API namespaces
|
|
3085
|
-
auth;
|
|
3086
|
-
user;
|
|
3087
|
-
collection;
|
|
3088
|
-
filter;
|
|
3089
|
-
highlight;
|
|
3090
|
-
import;
|
|
3091
|
-
raindrop;
|
|
3092
|
-
tag;
|
|
3093
|
-
constructor(t, e) {
|
|
3094
|
-
this.client = e ?? h, this.configuration = t ?? new ae(), this.auth = new xe(t, void 0, this.client), this.collection = new Se(t, void 0, this.client), this.filter = new z(t, void 0, this.client), this.highlight = new K(t, void 0, this.client), this.import = new W(t, void 0, this.client), this.raindrop = new ge(t, void 0, this.client), this.tag = new ee(t, void 0, this.client), this.user = new te(t, void 0, this.client);
|
|
3095
|
-
}
|
|
3096
|
-
}
|
|
3097
|
-
const ke = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3098
|
-
__proto__: null,
|
|
3099
|
-
Raindrop: ne
|
|
3100
|
-
}, Symbol.toStringTag, { value: "Module" })), Le = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
3101
|
-
__proto__: null,
|
|
3102
|
-
tree: we
|
|
3103
|
-
}, Symbol.toStringTag, { value: "Module" })), Ee = ne;
|
|
3104
|
-
export {
|
|
3105
|
-
ke as client,
|
|
3106
|
-
Ee as default,
|
|
3107
|
-
Be as generated,
|
|
3108
|
-
Le as utils
|
|
3109
|
-
};
|
|
1866
|
+
//#endregion
|
|
1867
|
+
//#region src/client/collection.ts
|
|
1868
|
+
var pe = class extends O {
|
|
1869
|
+
async getCollectionTree() {
|
|
1870
|
+
let [{ data: e }, { data: t }] = await Promise.all([this.getRootCollections(), this.getChildCollections()]), n = e.items.map((e) => ({
|
|
1871
|
+
data: e,
|
|
1872
|
+
id: e._id.toString(),
|
|
1873
|
+
parent: null,
|
|
1874
|
+
toNode() {
|
|
1875
|
+
return new X(this.data);
|
|
1876
|
+
}
|
|
1877
|
+
})), r = t.items.map((e) => ({
|
|
1878
|
+
data: e,
|
|
1879
|
+
id: e._id.toString(),
|
|
1880
|
+
parent: e.parent?.$id.toString() || null,
|
|
1881
|
+
toNode() {
|
|
1882
|
+
return new X(this.data);
|
|
1883
|
+
}
|
|
1884
|
+
})), i = n.concat(r);
|
|
1885
|
+
return i.sort((e, t) => e.data.title.localeCompare(t.data.title) || e.data._id - t.data._id), Q(null, i.filter((e, t, n) => n.findIndex((t) => t.id === e.id) === t));
|
|
1886
|
+
}
|
|
1887
|
+
}, me = class extends V {
|
|
1888
|
+
async getAllRaindrops(e, t, n) {
|
|
1889
|
+
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());
|
|
1890
|
+
u.shift();
|
|
1891
|
+
let d = await Promise.all(u.map((e) => this.getRaindrops(r, i, a, e, o, n).then(({ data: e }) => e))), f = [...s.items];
|
|
1892
|
+
for (let e of d) f.push(...e.items);
|
|
1893
|
+
return f;
|
|
1894
|
+
}
|
|
1895
|
+
}, $ = class {
|
|
1896
|
+
client;
|
|
1897
|
+
configuration;
|
|
1898
|
+
auth;
|
|
1899
|
+
user;
|
|
1900
|
+
collection;
|
|
1901
|
+
filter;
|
|
1902
|
+
highlight;
|
|
1903
|
+
import;
|
|
1904
|
+
raindrop;
|
|
1905
|
+
tag;
|
|
1906
|
+
constructor(t, n) {
|
|
1907
|
+
this.client = n ?? e, this.configuration = t ?? new J(), this.auth = new de(t, void 0, this.client), this.collection = new pe(t, void 0, this.client), this.filter = new j(t, void 0, this.client), this.highlight = new F(t, void 0, this.client), this.import = new R(t, void 0, this.client), this.raindrop = new me(t, void 0, this.client), this.tag = new W(t, void 0, this.client), this.user = new q(t, void 0, this.client);
|
|
1908
|
+
}
|
|
1909
|
+
}, he = /* @__PURE__ */ n({ Raindrop: () => $ }), ge = /* @__PURE__ */ n({ tree: () => fe }), _e = $;
|
|
1910
|
+
/* v8 ignore end */
|
|
1911
|
+
//#endregion
|
|
1912
|
+
export { he as client, _e as default, ue as generated, ge as utils };
|