@lasuillard/raindrop-client 0.8.0 → 0.8.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +79 -21
- package/dist/{src/generated/api.d.ts → index.d.mts} +638 -206
- package/dist/index.d.ts +5992 -0
- package/dist/index.js +3872 -0
- package/dist/index.mjs +3839 -0
- package/package.json +95 -79
- package/dist/index.cjs.js +0 -1
- package/dist/index.es.js +0 -1912
- package/dist/src/client/auth.d.ts +0 -18
- package/dist/src/client/client.d.ts +0 -25
- package/dist/src/client/collection.d.ts +0 -14
- package/dist/src/client/index.d.ts +0 -1
- package/dist/src/client/raindrop.d.ts +0 -23
- package/dist/src/generated/base.d.ts +0 -55
- package/dist/src/generated/common.d.ts +0 -54
- package/dist/src/generated/configuration.d.ts +0 -91
- package/dist/src/generated/index.d.ts +0 -13
- package/dist/src/index.d.ts +0 -6
- package/dist/src/utils/index.d.ts +0 -2
- package/dist/src/utils/tree.d.ts +0 -49
- package/dist/tests/__typechecks__/checkURLsExist.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/createCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/createRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/createRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/emptyTrash.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getAllHighlights.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getChildCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getCurrentUser.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getFeaturedCovers.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getFilters.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getHighlightsInCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getPublicUserByName.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getRootCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getSystemCollectionStats.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/getTagsInCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/importHTMLBookmarkFile.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/mergeCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/parseURL.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeAllEmptyCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/removeTagsFromCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/renameOrMergeTags.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/reorderAllCollections.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/searchCovers.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/shareCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateCollection.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateCurrentUser.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateRaindrop.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/updateRaindrops.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/uploadCollectionCover.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/uploadFile.test-d.d.ts +0 -1
- package/dist/tests/__typechecks__/uploadRaindropCover.test-d.d.ts +0 -1
- package/dist/tests/_helpers/axios.d.ts +0 -11
- package/dist/tests/_helpers/common.d.ts +0 -2
- package/dist/tests/_helpers/polly.d.ts +0 -5
- package/dist/tests/_helpers/raindrop.d.ts +0 -17
- package/dist/tests/_helpers/typechecks.d.ts +0 -14
- package/dist/tests/_helpers/utils.d.ts +0 -1
- package/dist/tests/_helpers/vitest.d.ts +0 -29
- package/dist/tests/client/auth.test.d.ts +0 -1
- package/dist/tests/client/client.test.d.ts +0 -1
- package/dist/tests/client/collection.test.d.ts +0 -1
- package/dist/tests/client/raindrop.test.d.ts +0 -1
- package/dist/tests/generated/auth.test.d.ts +0 -1
- package/dist/tests/generated/collection.test.d.ts +0 -1
- package/dist/tests/generated/filter.test.d.ts +0 -1
- package/dist/tests/generated/highlight.test.d.ts +0 -1
- package/dist/tests/generated/import.test.d.ts +0 -1
- package/dist/tests/generated/raindrop.test.d.ts +0 -1
- package/dist/tests/generated/tag.test.d.ts +0 -1
- package/dist/tests/generated/user.test.d.ts +0 -1
- package/dist/tests/setup.d.ts +0 -1
- package/dist/tests/utils/tree.test.d.ts +0 -1
package/dist/index.mjs
ADDED
|
@@ -0,0 +1,3839 @@
|
|
|
1
|
+
var __defProp = Object.defineProperty;
|
|
2
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
3
|
+
var __export = (target, all) => {
|
|
4
|
+
for (var name in all)
|
|
5
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
6
|
+
};
|
|
7
|
+
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
8
|
+
|
|
9
|
+
// src/client/index.ts
|
|
10
|
+
var client_exports = {};
|
|
11
|
+
__export(client_exports, {
|
|
12
|
+
Raindrop: () => Raindrop
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
// src/client/client.ts
|
|
16
|
+
import axios from "axios";
|
|
17
|
+
|
|
18
|
+
// src/generated/index.ts
|
|
19
|
+
var generated_exports = {};
|
|
20
|
+
__export(generated_exports, {
|
|
21
|
+
AuthenticationApi: () => AuthenticationApi,
|
|
22
|
+
AuthenticationApiAxiosParamCreator: () => AuthenticationApiAxiosParamCreator,
|
|
23
|
+
AuthenticationApiFactory: () => AuthenticationApiFactory,
|
|
24
|
+
AuthenticationApiFp: () => AuthenticationApiFp,
|
|
25
|
+
CollectionApi: () => CollectionApi,
|
|
26
|
+
CollectionApiAxiosParamCreator: () => CollectionApiAxiosParamCreator,
|
|
27
|
+
CollectionApiFactory: () => CollectionApiFactory,
|
|
28
|
+
CollectionApiFp: () => CollectionApiFp,
|
|
29
|
+
CollectionRefRefEnum: () => CollectionRefRefEnum,
|
|
30
|
+
Configuration: () => Configuration,
|
|
31
|
+
ConnectSocialNetworkProviderProviderEnum: () => ConnectSocialNetworkProviderProviderEnum,
|
|
32
|
+
DisconnectSocialNetworkProviderProviderEnum: () => DisconnectSocialNetworkProviderProviderEnum,
|
|
33
|
+
FilterApi: () => FilterApi,
|
|
34
|
+
FilterApiAxiosParamCreator: () => FilterApiAxiosParamCreator,
|
|
35
|
+
FilterApiFactory: () => FilterApiFactory,
|
|
36
|
+
FilterApiFp: () => FilterApiFp,
|
|
37
|
+
GetFiltersTagsSortEnum: () => GetFiltersTagsSortEnum,
|
|
38
|
+
HighlightApi: () => HighlightApi,
|
|
39
|
+
HighlightApiAxiosParamCreator: () => HighlightApiAxiosParamCreator,
|
|
40
|
+
HighlightApiFactory: () => HighlightApiFactory,
|
|
41
|
+
HighlightApiFp: () => HighlightApiFp,
|
|
42
|
+
ImportApi: () => ImportApi,
|
|
43
|
+
ImportApiAxiosParamCreator: () => ImportApiAxiosParamCreator,
|
|
44
|
+
ImportApiFactory: () => ImportApiFactory,
|
|
45
|
+
ImportApiFp: () => ImportApiFp,
|
|
46
|
+
ObtainTokenGrantTypeEnum: () => ObtainTokenGrantTypeEnum,
|
|
47
|
+
RaindropApi: () => RaindropApi,
|
|
48
|
+
RaindropApiAxiosParamCreator: () => RaindropApiAxiosParamCreator,
|
|
49
|
+
RaindropApiFactory: () => RaindropApiFactory,
|
|
50
|
+
RaindropApiFp: () => RaindropApiFp,
|
|
51
|
+
RefreshTokenGrantTypeEnum: () => RefreshTokenGrantTypeEnum,
|
|
52
|
+
Role: () => Role,
|
|
53
|
+
TagApi: () => TagApi,
|
|
54
|
+
TagApiAxiosParamCreator: () => TagApiAxiosParamCreator,
|
|
55
|
+
TagApiFactory: () => TagApiFactory,
|
|
56
|
+
TagApiFp: () => TagApiFp,
|
|
57
|
+
TokenResponseTokenTypeEnum: () => TokenResponseTokenTypeEnum,
|
|
58
|
+
UserApi: () => UserApi,
|
|
59
|
+
UserApiAxiosParamCreator: () => UserApiAxiosParamCreator,
|
|
60
|
+
UserApiFactory: () => UserApiFactory,
|
|
61
|
+
UserApiFp: () => UserApiFp
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
// src/generated/api.ts
|
|
65
|
+
import globalAxios2 from "axios";
|
|
66
|
+
|
|
67
|
+
// src/generated/base.ts
|
|
68
|
+
import globalAxios from "axios";
|
|
69
|
+
var BASE_PATH = "https://api.raindrop.io".replace(/\/+$/, "");
|
|
70
|
+
var BaseAPI = class {
|
|
71
|
+
constructor(configuration, basePath = BASE_PATH, axios2 = globalAxios) {
|
|
72
|
+
__publicField(this, "basePath", basePath);
|
|
73
|
+
__publicField(this, "axios", axios2);
|
|
74
|
+
__publicField(this, "configuration");
|
|
75
|
+
if (configuration) {
|
|
76
|
+
this.configuration = configuration;
|
|
77
|
+
this.basePath = configuration.basePath ?? basePath;
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var RequiredError = class extends Error {
|
|
82
|
+
constructor(field, msg) {
|
|
83
|
+
super(msg);
|
|
84
|
+
__publicField(this, "field", field);
|
|
85
|
+
this.name = "RequiredError";
|
|
86
|
+
}
|
|
87
|
+
};
|
|
88
|
+
var operationServerMap = {};
|
|
89
|
+
|
|
90
|
+
// src/generated/common.ts
|
|
91
|
+
var DUMMY_BASE_URL = "https://example.com";
|
|
92
|
+
var assertParamExists = function(functionName, paramName, paramValue) {
|
|
93
|
+
if (paramValue === null || paramValue === void 0) {
|
|
94
|
+
throw new RequiredError(paramName, `Required parameter ${paramName} was null or undefined when calling ${functionName}.`);
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
var setBearerAuthToObject = async function(object, configuration) {
|
|
98
|
+
if (configuration && configuration.accessToken) {
|
|
99
|
+
const accessToken = typeof configuration.accessToken === "function" ? await configuration.accessToken() : await configuration.accessToken;
|
|
100
|
+
object["Authorization"] = "Bearer " + accessToken;
|
|
101
|
+
}
|
|
102
|
+
};
|
|
103
|
+
function setFlattenedQueryParams(urlSearchParams, parameter, key = "") {
|
|
104
|
+
if (parameter == null) return;
|
|
105
|
+
if (typeof parameter === "object") {
|
|
106
|
+
if (Array.isArray(parameter)) {
|
|
107
|
+
parameter.forEach((item) => setFlattenedQueryParams(urlSearchParams, item, key));
|
|
108
|
+
} else {
|
|
109
|
+
Object.keys(parameter).forEach(
|
|
110
|
+
(currentKey) => setFlattenedQueryParams(urlSearchParams, parameter[currentKey], `${key}${key !== "" ? "." : ""}${currentKey}`)
|
|
111
|
+
);
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
if (urlSearchParams.has(key)) {
|
|
115
|
+
urlSearchParams.append(key, parameter);
|
|
116
|
+
} else {
|
|
117
|
+
urlSearchParams.set(key, parameter);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
var setSearchParams = function(url, ...objects) {
|
|
122
|
+
const searchParams = new URLSearchParams(url.search);
|
|
123
|
+
setFlattenedQueryParams(searchParams, objects);
|
|
124
|
+
url.search = searchParams.toString();
|
|
125
|
+
};
|
|
126
|
+
var serializeDataIfNeeded = function(value, requestOptions, configuration) {
|
|
127
|
+
const nonString = typeof value !== "string";
|
|
128
|
+
const needsSerialization = nonString && configuration && configuration.isJsonMime ? configuration.isJsonMime(requestOptions.headers["Content-Type"]) : nonString;
|
|
129
|
+
return needsSerialization ? JSON.stringify(value !== void 0 ? convertMapsAndSetsToPlain(value) : {}) : value || "";
|
|
130
|
+
};
|
|
131
|
+
function convertMapsAndSetsToPlain(value) {
|
|
132
|
+
if (typeof Set === "undefined") return value;
|
|
133
|
+
if (typeof Map === "undefined") return value;
|
|
134
|
+
if (typeof value !== "object" || !value) {
|
|
135
|
+
return value;
|
|
136
|
+
}
|
|
137
|
+
if (value instanceof Set) {
|
|
138
|
+
return Array.from(value).map((item) => convertMapsAndSetsToPlain(item));
|
|
139
|
+
}
|
|
140
|
+
if (value instanceof Map) {
|
|
141
|
+
const entries = [];
|
|
142
|
+
value.forEach((value2, key) => {
|
|
143
|
+
entries.push([key, convertMapsAndSetsToPlain(value2)]);
|
|
144
|
+
});
|
|
145
|
+
return objectFromEntries(entries);
|
|
146
|
+
}
|
|
147
|
+
if (Array.isArray(value)) {
|
|
148
|
+
return value.map((it) => convertMapsAndSetsToPlain(it));
|
|
149
|
+
}
|
|
150
|
+
return objectFromEntries(objectEntries(value).map(([k, v]) => [k, convertMapsAndSetsToPlain(v)]));
|
|
151
|
+
}
|
|
152
|
+
function objectEntries(object) {
|
|
153
|
+
return Object.keys(object).map((key) => [key, object[key]]);
|
|
154
|
+
}
|
|
155
|
+
function objectFromEntries(entries) {
|
|
156
|
+
return [...entries].reduce((object, [key, val]) => {
|
|
157
|
+
object[key] = val;
|
|
158
|
+
return object;
|
|
159
|
+
}, {});
|
|
160
|
+
}
|
|
161
|
+
var toPathString = function(url) {
|
|
162
|
+
return url.pathname + url.search + url.hash;
|
|
163
|
+
};
|
|
164
|
+
var createRequestFunction = function(axiosArgs, globalAxios3, BASE_PATH2, configuration) {
|
|
165
|
+
return (axios2 = globalAxios3, basePath = BASE_PATH2) => {
|
|
166
|
+
const axiosRequestArgs = { ...axiosArgs.options, url: (axios2.defaults.baseURL ? "" : configuration?.basePath ?? basePath) + axiosArgs.url };
|
|
167
|
+
return axios2.request(axiosRequestArgs);
|
|
168
|
+
};
|
|
169
|
+
};
|
|
170
|
+
|
|
171
|
+
// src/generated/api.ts
|
|
172
|
+
var CollectionRefRefEnum = {
|
|
173
|
+
Collections: "collections"
|
|
174
|
+
};
|
|
175
|
+
var ObtainTokenGrantTypeEnum = {
|
|
176
|
+
AuthorizationCode: "authorization_code"
|
|
177
|
+
};
|
|
178
|
+
var RefreshTokenGrantTypeEnum = {
|
|
179
|
+
RefreshToken: "refresh_token"
|
|
180
|
+
};
|
|
181
|
+
var Role = {
|
|
182
|
+
Member: "member",
|
|
183
|
+
Viewer: "viewer"
|
|
184
|
+
};
|
|
185
|
+
var TokenResponseTokenTypeEnum = {
|
|
186
|
+
Bearer: "Bearer"
|
|
187
|
+
};
|
|
188
|
+
var AuthenticationApiAxiosParamCreator = function(configuration) {
|
|
189
|
+
return {
|
|
190
|
+
/**
|
|
191
|
+
*
|
|
192
|
+
* @param {string} redirectUri
|
|
193
|
+
* @param {string} clientId
|
|
194
|
+
* @param {*} [options] Override http request option.
|
|
195
|
+
* @throws {RequiredError}
|
|
196
|
+
*/
|
|
197
|
+
authorize: async (redirectUri, clientId, options = {}) => {
|
|
198
|
+
assertParamExists("authorize", "redirectUri", redirectUri);
|
|
199
|
+
assertParamExists("authorize", "clientId", clientId);
|
|
200
|
+
const localVarPath = `/v1/oauth/authorize`;
|
|
201
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
202
|
+
let baseOptions;
|
|
203
|
+
if (configuration) {
|
|
204
|
+
baseOptions = configuration.baseOptions;
|
|
205
|
+
}
|
|
206
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
207
|
+
const localVarHeaderParameter = {};
|
|
208
|
+
const localVarQueryParameter = {};
|
|
209
|
+
if (redirectUri !== void 0) {
|
|
210
|
+
localVarQueryParameter["redirect_uri"] = redirectUri;
|
|
211
|
+
}
|
|
212
|
+
if (clientId !== void 0) {
|
|
213
|
+
localVarQueryParameter["client_id"] = clientId;
|
|
214
|
+
}
|
|
215
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
216
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
217
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
218
|
+
return {
|
|
219
|
+
url: toPathString(localVarUrlObj),
|
|
220
|
+
options: localVarRequestOptions
|
|
221
|
+
};
|
|
222
|
+
},
|
|
223
|
+
/**
|
|
224
|
+
*
|
|
225
|
+
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
226
|
+
* @param {*} [options] Override http request option.
|
|
227
|
+
* @throws {RequiredError}
|
|
228
|
+
*/
|
|
229
|
+
getOrRefreshToken: async (getOrRefreshTokenRequest, options = {}) => {
|
|
230
|
+
const localVarPath = `/v1/oauth/access_token`;
|
|
231
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
232
|
+
let baseOptions;
|
|
233
|
+
if (configuration) {
|
|
234
|
+
baseOptions = configuration.baseOptions;
|
|
235
|
+
}
|
|
236
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
237
|
+
const localVarHeaderParameter = {};
|
|
238
|
+
const localVarQueryParameter = {};
|
|
239
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
240
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
241
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
242
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
243
|
+
localVarRequestOptions.data = serializeDataIfNeeded(getOrRefreshTokenRequest, localVarRequestOptions, configuration);
|
|
244
|
+
return {
|
|
245
|
+
url: toPathString(localVarUrlObj),
|
|
246
|
+
options: localVarRequestOptions
|
|
247
|
+
};
|
|
248
|
+
}
|
|
249
|
+
};
|
|
250
|
+
};
|
|
251
|
+
var AuthenticationApiFp = function(configuration) {
|
|
252
|
+
const localVarAxiosParamCreator = AuthenticationApiAxiosParamCreator(configuration);
|
|
253
|
+
return {
|
|
254
|
+
/**
|
|
255
|
+
*
|
|
256
|
+
* @param {string} redirectUri
|
|
257
|
+
* @param {string} clientId
|
|
258
|
+
* @param {*} [options] Override http request option.
|
|
259
|
+
* @throws {RequiredError}
|
|
260
|
+
*/
|
|
261
|
+
async authorize(redirectUri, clientId, options) {
|
|
262
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.authorize(redirectUri, clientId, options);
|
|
263
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
264
|
+
const localVarOperationServerBasePath = operationServerMap["AuthenticationApi.authorize"]?.[localVarOperationServerIndex]?.url;
|
|
265
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
266
|
+
},
|
|
267
|
+
/**
|
|
268
|
+
*
|
|
269
|
+
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
270
|
+
* @param {*} [options] Override http request option.
|
|
271
|
+
* @throws {RequiredError}
|
|
272
|
+
*/
|
|
273
|
+
async getOrRefreshToken(getOrRefreshTokenRequest, options) {
|
|
274
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getOrRefreshToken(getOrRefreshTokenRequest, options);
|
|
275
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
276
|
+
const localVarOperationServerBasePath = operationServerMap["AuthenticationApi.getOrRefreshToken"]?.[localVarOperationServerIndex]?.url;
|
|
277
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
278
|
+
}
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
var AuthenticationApiFactory = function(configuration, basePath, axios2) {
|
|
282
|
+
const localVarFp = AuthenticationApiFp(configuration);
|
|
283
|
+
return {
|
|
284
|
+
/**
|
|
285
|
+
*
|
|
286
|
+
* @param {string} redirectUri
|
|
287
|
+
* @param {string} clientId
|
|
288
|
+
* @param {*} [options] Override http request option.
|
|
289
|
+
* @throws {RequiredError}
|
|
290
|
+
*/
|
|
291
|
+
authorize(redirectUri, clientId, options) {
|
|
292
|
+
return localVarFp.authorize(redirectUri, clientId, options).then((request) => request(axios2, basePath));
|
|
293
|
+
},
|
|
294
|
+
/**
|
|
295
|
+
*
|
|
296
|
+
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
297
|
+
* @param {*} [options] Override http request option.
|
|
298
|
+
* @throws {RequiredError}
|
|
299
|
+
*/
|
|
300
|
+
getOrRefreshToken(getOrRefreshTokenRequest, options) {
|
|
301
|
+
return localVarFp.getOrRefreshToken(getOrRefreshTokenRequest, options).then((request) => request(axios2, basePath));
|
|
302
|
+
}
|
|
303
|
+
};
|
|
304
|
+
};
|
|
305
|
+
var AuthenticationApi = class extends BaseAPI {
|
|
306
|
+
/**
|
|
307
|
+
*
|
|
308
|
+
* @param {string} redirectUri
|
|
309
|
+
* @param {string} clientId
|
|
310
|
+
* @param {*} [options] Override http request option.
|
|
311
|
+
* @throws {RequiredError}
|
|
312
|
+
* @memberof AuthenticationApi
|
|
313
|
+
*/
|
|
314
|
+
authorize(redirectUri, clientId, options) {
|
|
315
|
+
return AuthenticationApiFp(this.configuration).authorize(redirectUri, clientId, options).then((request) => request(this.axios, this.basePath));
|
|
316
|
+
}
|
|
317
|
+
/**
|
|
318
|
+
*
|
|
319
|
+
* @param {GetOrRefreshTokenRequest} [getOrRefreshTokenRequest]
|
|
320
|
+
* @param {*} [options] Override http request option.
|
|
321
|
+
* @throws {RequiredError}
|
|
322
|
+
* @memberof AuthenticationApi
|
|
323
|
+
*/
|
|
324
|
+
getOrRefreshToken(getOrRefreshTokenRequest, options) {
|
|
325
|
+
return AuthenticationApiFp(this.configuration).getOrRefreshToken(getOrRefreshTokenRequest, options).then((request) => request(this.axios, this.basePath));
|
|
326
|
+
}
|
|
327
|
+
};
|
|
328
|
+
var CollectionApiAxiosParamCreator = function(configuration) {
|
|
329
|
+
return {
|
|
330
|
+
/**
|
|
331
|
+
*
|
|
332
|
+
* @param {number} id
|
|
333
|
+
* @param {*} [options] Override http request option.
|
|
334
|
+
* @throws {RequiredError}
|
|
335
|
+
*/
|
|
336
|
+
acceptInvitation: async (id, options = {}) => {
|
|
337
|
+
assertParamExists("acceptInvitation", "id", id);
|
|
338
|
+
const localVarPath = `/rest/v1/collection/{id}/join`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
339
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
340
|
+
let baseOptions;
|
|
341
|
+
if (configuration) {
|
|
342
|
+
baseOptions = configuration.baseOptions;
|
|
343
|
+
}
|
|
344
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
345
|
+
const localVarHeaderParameter = {};
|
|
346
|
+
const localVarQueryParameter = {};
|
|
347
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
348
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
349
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
350
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
351
|
+
return {
|
|
352
|
+
url: toPathString(localVarUrlObj),
|
|
353
|
+
options: localVarRequestOptions
|
|
354
|
+
};
|
|
355
|
+
},
|
|
356
|
+
/**
|
|
357
|
+
*
|
|
358
|
+
* @param {number} userId
|
|
359
|
+
* @param {number} id
|
|
360
|
+
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
361
|
+
* @param {*} [options] Override http request option.
|
|
362
|
+
* @throws {RequiredError}
|
|
363
|
+
*/
|
|
364
|
+
changeCollaboratorAccessLevel: async (userId, id, changeCollaboratorAccessLevelRequest, options = {}) => {
|
|
365
|
+
assertParamExists("changeCollaboratorAccessLevel", "userId", userId);
|
|
366
|
+
assertParamExists("changeCollaboratorAccessLevel", "id", id);
|
|
367
|
+
const localVarPath = `/rest/v1/collection/{id}/sharing/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(userId))).replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
368
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
369
|
+
let baseOptions;
|
|
370
|
+
if (configuration) {
|
|
371
|
+
baseOptions = configuration.baseOptions;
|
|
372
|
+
}
|
|
373
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
374
|
+
const localVarHeaderParameter = {};
|
|
375
|
+
const localVarQueryParameter = {};
|
|
376
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
377
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
378
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
379
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
380
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
381
|
+
localVarRequestOptions.data = serializeDataIfNeeded(changeCollaboratorAccessLevelRequest, localVarRequestOptions, configuration);
|
|
382
|
+
return {
|
|
383
|
+
url: toPathString(localVarUrlObj),
|
|
384
|
+
options: localVarRequestOptions
|
|
385
|
+
};
|
|
386
|
+
},
|
|
387
|
+
/**
|
|
388
|
+
*
|
|
389
|
+
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
390
|
+
* @param {*} [options] Override http request option.
|
|
391
|
+
* @throws {RequiredError}
|
|
392
|
+
*/
|
|
393
|
+
createCollection: async (createCollectionRequest, options = {}) => {
|
|
394
|
+
const localVarPath = `/rest/v1/collection`;
|
|
395
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
396
|
+
let baseOptions;
|
|
397
|
+
if (configuration) {
|
|
398
|
+
baseOptions = configuration.baseOptions;
|
|
399
|
+
}
|
|
400
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
401
|
+
const localVarHeaderParameter = {};
|
|
402
|
+
const localVarQueryParameter = {};
|
|
403
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
404
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
405
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
406
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
407
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
408
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createCollectionRequest, localVarRequestOptions, configuration);
|
|
409
|
+
return {
|
|
410
|
+
url: toPathString(localVarUrlObj),
|
|
411
|
+
options: localVarRequestOptions
|
|
412
|
+
};
|
|
413
|
+
},
|
|
414
|
+
/**
|
|
415
|
+
*
|
|
416
|
+
* @param {number} userId
|
|
417
|
+
* @param {number} id
|
|
418
|
+
* @param {*} [options] Override http request option.
|
|
419
|
+
* @throws {RequiredError}
|
|
420
|
+
*/
|
|
421
|
+
deleteCollaborator: async (userId, id, options = {}) => {
|
|
422
|
+
assertParamExists("deleteCollaborator", "userId", userId);
|
|
423
|
+
assertParamExists("deleteCollaborator", "id", id);
|
|
424
|
+
const localVarPath = `/rest/v1/collection/{id}/sharing/{userId}`.replace(`{${"userId"}}`, encodeURIComponent(String(userId))).replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
425
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
426
|
+
let baseOptions;
|
|
427
|
+
if (configuration) {
|
|
428
|
+
baseOptions = configuration.baseOptions;
|
|
429
|
+
}
|
|
430
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
431
|
+
const localVarHeaderParameter = {};
|
|
432
|
+
const localVarQueryParameter = {};
|
|
433
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
434
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
435
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
436
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
437
|
+
return {
|
|
438
|
+
url: toPathString(localVarUrlObj),
|
|
439
|
+
options: localVarRequestOptions
|
|
440
|
+
};
|
|
441
|
+
},
|
|
442
|
+
/**
|
|
443
|
+
*
|
|
444
|
+
* @param {*} [options] Override http request option.
|
|
445
|
+
* @throws {RequiredError}
|
|
446
|
+
*/
|
|
447
|
+
emptyTrash: async (options = {}) => {
|
|
448
|
+
const localVarPath = `/rest/v1/collection/-99`;
|
|
449
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
450
|
+
let baseOptions;
|
|
451
|
+
if (configuration) {
|
|
452
|
+
baseOptions = configuration.baseOptions;
|
|
453
|
+
}
|
|
454
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
455
|
+
const localVarHeaderParameter = {};
|
|
456
|
+
const localVarQueryParameter = {};
|
|
457
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
458
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
459
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
460
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
461
|
+
return {
|
|
462
|
+
url: toPathString(localVarUrlObj),
|
|
463
|
+
options: localVarRequestOptions
|
|
464
|
+
};
|
|
465
|
+
},
|
|
466
|
+
/**
|
|
467
|
+
*
|
|
468
|
+
* @param {*} [options] Override http request option.
|
|
469
|
+
* @throws {RequiredError}
|
|
470
|
+
*/
|
|
471
|
+
getChildCollections: async (options = {}) => {
|
|
472
|
+
const localVarPath = `/rest/v1/collections/childrens`;
|
|
473
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
474
|
+
let baseOptions;
|
|
475
|
+
if (configuration) {
|
|
476
|
+
baseOptions = configuration.baseOptions;
|
|
477
|
+
}
|
|
478
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
479
|
+
const localVarHeaderParameter = {};
|
|
480
|
+
const localVarQueryParameter = {};
|
|
481
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
482
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
483
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
484
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
485
|
+
return {
|
|
486
|
+
url: toPathString(localVarUrlObj),
|
|
487
|
+
options: localVarRequestOptions
|
|
488
|
+
};
|
|
489
|
+
},
|
|
490
|
+
/**
|
|
491
|
+
*
|
|
492
|
+
* @param {number} id
|
|
493
|
+
* @param {*} [options] Override http request option.
|
|
494
|
+
* @throws {RequiredError}
|
|
495
|
+
*/
|
|
496
|
+
getCollaborators: async (id, options = {}) => {
|
|
497
|
+
assertParamExists("getCollaborators", "id", id);
|
|
498
|
+
const localVarPath = `/rest/v1/collection/{id}/sharing`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
499
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
500
|
+
let baseOptions;
|
|
501
|
+
if (configuration) {
|
|
502
|
+
baseOptions = configuration.baseOptions;
|
|
503
|
+
}
|
|
504
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
505
|
+
const localVarHeaderParameter = {};
|
|
506
|
+
const localVarQueryParameter = {};
|
|
507
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
508
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
509
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
510
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
511
|
+
return {
|
|
512
|
+
url: toPathString(localVarUrlObj),
|
|
513
|
+
options: localVarRequestOptions
|
|
514
|
+
};
|
|
515
|
+
},
|
|
516
|
+
/**
|
|
517
|
+
*
|
|
518
|
+
* @param {number} id
|
|
519
|
+
* @param {*} [options] Override http request option.
|
|
520
|
+
* @throws {RequiredError}
|
|
521
|
+
*/
|
|
522
|
+
getCollection: async (id, options = {}) => {
|
|
523
|
+
assertParamExists("getCollection", "id", id);
|
|
524
|
+
const localVarPath = `/rest/v1/collection/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
525
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
526
|
+
let baseOptions;
|
|
527
|
+
if (configuration) {
|
|
528
|
+
baseOptions = configuration.baseOptions;
|
|
529
|
+
}
|
|
530
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
531
|
+
const localVarHeaderParameter = {};
|
|
532
|
+
const localVarQueryParameter = {};
|
|
533
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
534
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
535
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
536
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
537
|
+
return {
|
|
538
|
+
url: toPathString(localVarUrlObj),
|
|
539
|
+
options: localVarRequestOptions
|
|
540
|
+
};
|
|
541
|
+
},
|
|
542
|
+
/**
|
|
543
|
+
*
|
|
544
|
+
* @param {*} [options] Override http request option.
|
|
545
|
+
* @throws {RequiredError}
|
|
546
|
+
*/
|
|
547
|
+
getFeaturedCovers: async (options = {}) => {
|
|
548
|
+
const localVarPath = `/rest/v1/collections/covers`;
|
|
549
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
550
|
+
let baseOptions;
|
|
551
|
+
if (configuration) {
|
|
552
|
+
baseOptions = configuration.baseOptions;
|
|
553
|
+
}
|
|
554
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
555
|
+
const localVarHeaderParameter = {};
|
|
556
|
+
const localVarQueryParameter = {};
|
|
557
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
558
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
559
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
560
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
561
|
+
return {
|
|
562
|
+
url: toPathString(localVarUrlObj),
|
|
563
|
+
options: localVarRequestOptions
|
|
564
|
+
};
|
|
565
|
+
},
|
|
566
|
+
/**
|
|
567
|
+
*
|
|
568
|
+
* @param {*} [options] Override http request option.
|
|
569
|
+
* @throws {RequiredError}
|
|
570
|
+
*/
|
|
571
|
+
getRootCollections: async (options = {}) => {
|
|
572
|
+
const localVarPath = `/rest/v1/collections`;
|
|
573
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
574
|
+
let baseOptions;
|
|
575
|
+
if (configuration) {
|
|
576
|
+
baseOptions = configuration.baseOptions;
|
|
577
|
+
}
|
|
578
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
579
|
+
const localVarHeaderParameter = {};
|
|
580
|
+
const localVarQueryParameter = {};
|
|
581
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
582
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
583
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
584
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
585
|
+
return {
|
|
586
|
+
url: toPathString(localVarUrlObj),
|
|
587
|
+
options: localVarRequestOptions
|
|
588
|
+
};
|
|
589
|
+
},
|
|
590
|
+
/**
|
|
591
|
+
*
|
|
592
|
+
* @param {*} [options] Override http request option.
|
|
593
|
+
* @throws {RequiredError}
|
|
594
|
+
*/
|
|
595
|
+
getSystemCollectionStats: async (options = {}) => {
|
|
596
|
+
const localVarPath = `/rest/v1/user/stats`;
|
|
597
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
598
|
+
let baseOptions;
|
|
599
|
+
if (configuration) {
|
|
600
|
+
baseOptions = configuration.baseOptions;
|
|
601
|
+
}
|
|
602
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
603
|
+
const localVarHeaderParameter = {};
|
|
604
|
+
const localVarQueryParameter = {};
|
|
605
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
606
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
607
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
608
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
609
|
+
return {
|
|
610
|
+
url: toPathString(localVarUrlObj),
|
|
611
|
+
options: localVarRequestOptions
|
|
612
|
+
};
|
|
613
|
+
},
|
|
614
|
+
/**
|
|
615
|
+
*
|
|
616
|
+
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
617
|
+
* @param {*} [options] Override http request option.
|
|
618
|
+
* @throws {RequiredError}
|
|
619
|
+
*/
|
|
620
|
+
mergeCollections: async (mergeCollectionsRequest, options = {}) => {
|
|
621
|
+
const localVarPath = `/rest/v1/collections/merge`;
|
|
622
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
623
|
+
let baseOptions;
|
|
624
|
+
if (configuration) {
|
|
625
|
+
baseOptions = configuration.baseOptions;
|
|
626
|
+
}
|
|
627
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
628
|
+
const localVarHeaderParameter = {};
|
|
629
|
+
const localVarQueryParameter = {};
|
|
630
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
631
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
632
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
633
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
634
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
635
|
+
localVarRequestOptions.data = serializeDataIfNeeded(mergeCollectionsRequest, localVarRequestOptions, configuration);
|
|
636
|
+
return {
|
|
637
|
+
url: toPathString(localVarUrlObj),
|
|
638
|
+
options: localVarRequestOptions
|
|
639
|
+
};
|
|
640
|
+
},
|
|
641
|
+
/**
|
|
642
|
+
*
|
|
643
|
+
* @param {*} [options] Override http request option.
|
|
644
|
+
* @throws {RequiredError}
|
|
645
|
+
*/
|
|
646
|
+
removeAllEmptyCollections: async (options = {}) => {
|
|
647
|
+
const localVarPath = `/rest/v1/collections/clean`;
|
|
648
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
649
|
+
let baseOptions;
|
|
650
|
+
if (configuration) {
|
|
651
|
+
baseOptions = configuration.baseOptions;
|
|
652
|
+
}
|
|
653
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
654
|
+
const localVarHeaderParameter = {};
|
|
655
|
+
const localVarQueryParameter = {};
|
|
656
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
657
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
658
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
659
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
660
|
+
return {
|
|
661
|
+
url: toPathString(localVarUrlObj),
|
|
662
|
+
options: localVarRequestOptions
|
|
663
|
+
};
|
|
664
|
+
},
|
|
665
|
+
/**
|
|
666
|
+
*
|
|
667
|
+
* @param {number} id
|
|
668
|
+
* @param {*} [options] Override http request option.
|
|
669
|
+
* @throws {RequiredError}
|
|
670
|
+
*/
|
|
671
|
+
removeCollection: async (id, options = {}) => {
|
|
672
|
+
assertParamExists("removeCollection", "id", id);
|
|
673
|
+
const localVarPath = `/rest/v1/collection/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
674
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
675
|
+
let baseOptions;
|
|
676
|
+
if (configuration) {
|
|
677
|
+
baseOptions = configuration.baseOptions;
|
|
678
|
+
}
|
|
679
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
680
|
+
const localVarHeaderParameter = {};
|
|
681
|
+
const localVarQueryParameter = {};
|
|
682
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
683
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
684
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
685
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
686
|
+
return {
|
|
687
|
+
url: toPathString(localVarUrlObj),
|
|
688
|
+
options: localVarRequestOptions
|
|
689
|
+
};
|
|
690
|
+
},
|
|
691
|
+
/**
|
|
692
|
+
*
|
|
693
|
+
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
694
|
+
* @param {*} [options] Override http request option.
|
|
695
|
+
* @throws {RequiredError}
|
|
696
|
+
*/
|
|
697
|
+
removeCollections: async (removeCollectionsRequest, options = {}) => {
|
|
698
|
+
const localVarPath = `/rest/v1/collections`;
|
|
699
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
700
|
+
let baseOptions;
|
|
701
|
+
if (configuration) {
|
|
702
|
+
baseOptions = configuration.baseOptions;
|
|
703
|
+
}
|
|
704
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
705
|
+
const localVarHeaderParameter = {};
|
|
706
|
+
const localVarQueryParameter = {};
|
|
707
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
708
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
709
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
710
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
711
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
712
|
+
localVarRequestOptions.data = serializeDataIfNeeded(removeCollectionsRequest, localVarRequestOptions, configuration);
|
|
713
|
+
return {
|
|
714
|
+
url: toPathString(localVarUrlObj),
|
|
715
|
+
options: localVarRequestOptions
|
|
716
|
+
};
|
|
717
|
+
},
|
|
718
|
+
/**
|
|
719
|
+
*
|
|
720
|
+
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
721
|
+
* @param {*} [options] Override http request option.
|
|
722
|
+
* @throws {RequiredError}
|
|
723
|
+
*/
|
|
724
|
+
reorderAllCollections: async (reorderAllCollectionsRequest, options = {}) => {
|
|
725
|
+
const localVarPath = `/rest/v1/collections`;
|
|
726
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
727
|
+
let baseOptions;
|
|
728
|
+
if (configuration) {
|
|
729
|
+
baseOptions = configuration.baseOptions;
|
|
730
|
+
}
|
|
731
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
732
|
+
const localVarHeaderParameter = {};
|
|
733
|
+
const localVarQueryParameter = {};
|
|
734
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
735
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
736
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
737
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
738
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
739
|
+
localVarRequestOptions.data = serializeDataIfNeeded(reorderAllCollectionsRequest, localVarRequestOptions, configuration);
|
|
740
|
+
return {
|
|
741
|
+
url: toPathString(localVarUrlObj),
|
|
742
|
+
options: localVarRequestOptions
|
|
743
|
+
};
|
|
744
|
+
},
|
|
745
|
+
/**
|
|
746
|
+
*
|
|
747
|
+
* @param {string} text
|
|
748
|
+
* @param {*} [options] Override http request option.
|
|
749
|
+
* @throws {RequiredError}
|
|
750
|
+
*/
|
|
751
|
+
searchCovers: async (text, options = {}) => {
|
|
752
|
+
assertParamExists("searchCovers", "text", text);
|
|
753
|
+
const localVarPath = `/rest/v1/collections/covers/{text}`.replace(`{${"text"}}`, encodeURIComponent(String(text)));
|
|
754
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
755
|
+
let baseOptions;
|
|
756
|
+
if (configuration) {
|
|
757
|
+
baseOptions = configuration.baseOptions;
|
|
758
|
+
}
|
|
759
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
760
|
+
const localVarHeaderParameter = {};
|
|
761
|
+
const localVarQueryParameter = {};
|
|
762
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
763
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
764
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
765
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
766
|
+
return {
|
|
767
|
+
url: toPathString(localVarUrlObj),
|
|
768
|
+
options: localVarRequestOptions
|
|
769
|
+
};
|
|
770
|
+
},
|
|
771
|
+
/**
|
|
772
|
+
*
|
|
773
|
+
* @param {number} id
|
|
774
|
+
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
775
|
+
* @param {*} [options] Override http request option.
|
|
776
|
+
* @throws {RequiredError}
|
|
777
|
+
*/
|
|
778
|
+
shareCollection: async (id, shareCollectionRequest, options = {}) => {
|
|
779
|
+
assertParamExists("shareCollection", "id", id);
|
|
780
|
+
const localVarPath = `/rest/v1/collection/{id}/sharing`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
781
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
782
|
+
let baseOptions;
|
|
783
|
+
if (configuration) {
|
|
784
|
+
baseOptions = configuration.baseOptions;
|
|
785
|
+
}
|
|
786
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
787
|
+
const localVarHeaderParameter = {};
|
|
788
|
+
const localVarQueryParameter = {};
|
|
789
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
790
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
791
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
792
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
793
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
794
|
+
localVarRequestOptions.data = serializeDataIfNeeded(shareCollectionRequest, localVarRequestOptions, configuration);
|
|
795
|
+
return {
|
|
796
|
+
url: toPathString(localVarUrlObj),
|
|
797
|
+
options: localVarRequestOptions
|
|
798
|
+
};
|
|
799
|
+
},
|
|
800
|
+
/**
|
|
801
|
+
*
|
|
802
|
+
* @param {number} id
|
|
803
|
+
* @param {*} [options] Override http request option.
|
|
804
|
+
* @throws {RequiredError}
|
|
805
|
+
*/
|
|
806
|
+
unshareOrLeaveCollection: async (id, options = {}) => {
|
|
807
|
+
assertParamExists("unshareOrLeaveCollection", "id", id);
|
|
808
|
+
const localVarPath = `/rest/v1/collection/{id}/sharing`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
809
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
810
|
+
let baseOptions;
|
|
811
|
+
if (configuration) {
|
|
812
|
+
baseOptions = configuration.baseOptions;
|
|
813
|
+
}
|
|
814
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
815
|
+
const localVarHeaderParameter = {};
|
|
816
|
+
const localVarQueryParameter = {};
|
|
817
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
818
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
819
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
820
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
821
|
+
return {
|
|
822
|
+
url: toPathString(localVarUrlObj),
|
|
823
|
+
options: localVarRequestOptions
|
|
824
|
+
};
|
|
825
|
+
},
|
|
826
|
+
/**
|
|
827
|
+
*
|
|
828
|
+
* @param {number} id
|
|
829
|
+
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
830
|
+
* @param {*} [options] Override http request option.
|
|
831
|
+
* @throws {RequiredError}
|
|
832
|
+
*/
|
|
833
|
+
updateCollection: async (id, updateCollectionRequest, options = {}) => {
|
|
834
|
+
assertParamExists("updateCollection", "id", id);
|
|
835
|
+
const localVarPath = `/rest/v1/collection/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
836
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
837
|
+
let baseOptions;
|
|
838
|
+
if (configuration) {
|
|
839
|
+
baseOptions = configuration.baseOptions;
|
|
840
|
+
}
|
|
841
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
842
|
+
const localVarHeaderParameter = {};
|
|
843
|
+
const localVarQueryParameter = {};
|
|
844
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
845
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
846
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
847
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
848
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
849
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateCollectionRequest, localVarRequestOptions, configuration);
|
|
850
|
+
return {
|
|
851
|
+
url: toPathString(localVarUrlObj),
|
|
852
|
+
options: localVarRequestOptions
|
|
853
|
+
};
|
|
854
|
+
},
|
|
855
|
+
/**
|
|
856
|
+
*
|
|
857
|
+
* @param {number} id
|
|
858
|
+
* @param {File} [cover]
|
|
859
|
+
* @param {*} [options] Override http request option.
|
|
860
|
+
* @throws {RequiredError}
|
|
861
|
+
*/
|
|
862
|
+
uploadCollectionCover: async (id, cover, options = {}) => {
|
|
863
|
+
assertParamExists("uploadCollectionCover", "id", id);
|
|
864
|
+
const localVarPath = `/rest/v1/collection/{id}/cover`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
865
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
866
|
+
let baseOptions;
|
|
867
|
+
if (configuration) {
|
|
868
|
+
baseOptions = configuration.baseOptions;
|
|
869
|
+
}
|
|
870
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
871
|
+
const localVarHeaderParameter = {};
|
|
872
|
+
const localVarQueryParameter = {};
|
|
873
|
+
const localVarFormParams = new (configuration && configuration.formDataCtor || FormData)();
|
|
874
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
875
|
+
if (cover !== void 0) {
|
|
876
|
+
localVarFormParams.append("cover", cover);
|
|
877
|
+
}
|
|
878
|
+
localVarHeaderParameter["Content-Type"] = "multipart/form-data";
|
|
879
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
880
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
881
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
882
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
883
|
+
return {
|
|
884
|
+
url: toPathString(localVarUrlObj),
|
|
885
|
+
options: localVarRequestOptions
|
|
886
|
+
};
|
|
887
|
+
}
|
|
888
|
+
};
|
|
889
|
+
};
|
|
890
|
+
var CollectionApiFp = function(configuration) {
|
|
891
|
+
const localVarAxiosParamCreator = CollectionApiAxiosParamCreator(configuration);
|
|
892
|
+
return {
|
|
893
|
+
/**
|
|
894
|
+
*
|
|
895
|
+
* @param {number} id
|
|
896
|
+
* @param {*} [options] Override http request option.
|
|
897
|
+
* @throws {RequiredError}
|
|
898
|
+
*/
|
|
899
|
+
async acceptInvitation(id, options) {
|
|
900
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.acceptInvitation(id, options);
|
|
901
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
902
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.acceptInvitation"]?.[localVarOperationServerIndex]?.url;
|
|
903
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
904
|
+
},
|
|
905
|
+
/**
|
|
906
|
+
*
|
|
907
|
+
* @param {number} userId
|
|
908
|
+
* @param {number} id
|
|
909
|
+
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
910
|
+
* @param {*} [options] Override http request option.
|
|
911
|
+
* @throws {RequiredError}
|
|
912
|
+
*/
|
|
913
|
+
async changeCollaboratorAccessLevel(userId, id, changeCollaboratorAccessLevelRequest, options) {
|
|
914
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.changeCollaboratorAccessLevel(userId, id, changeCollaboratorAccessLevelRequest, options);
|
|
915
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
916
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.changeCollaboratorAccessLevel"]?.[localVarOperationServerIndex]?.url;
|
|
917
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
918
|
+
},
|
|
919
|
+
/**
|
|
920
|
+
*
|
|
921
|
+
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
922
|
+
* @param {*} [options] Override http request option.
|
|
923
|
+
* @throws {RequiredError}
|
|
924
|
+
*/
|
|
925
|
+
async createCollection(createCollectionRequest, options) {
|
|
926
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createCollection(createCollectionRequest, options);
|
|
927
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
928
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.createCollection"]?.[localVarOperationServerIndex]?.url;
|
|
929
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
930
|
+
},
|
|
931
|
+
/**
|
|
932
|
+
*
|
|
933
|
+
* @param {number} userId
|
|
934
|
+
* @param {number} id
|
|
935
|
+
* @param {*} [options] Override http request option.
|
|
936
|
+
* @throws {RequiredError}
|
|
937
|
+
*/
|
|
938
|
+
async deleteCollaborator(userId, id, options) {
|
|
939
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.deleteCollaborator(userId, id, options);
|
|
940
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
941
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.deleteCollaborator"]?.[localVarOperationServerIndex]?.url;
|
|
942
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
943
|
+
},
|
|
944
|
+
/**
|
|
945
|
+
*
|
|
946
|
+
* @param {*} [options] Override http request option.
|
|
947
|
+
* @throws {RequiredError}
|
|
948
|
+
*/
|
|
949
|
+
async emptyTrash(options) {
|
|
950
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.emptyTrash(options);
|
|
951
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
952
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.emptyTrash"]?.[localVarOperationServerIndex]?.url;
|
|
953
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
954
|
+
},
|
|
955
|
+
/**
|
|
956
|
+
*
|
|
957
|
+
* @param {*} [options] Override http request option.
|
|
958
|
+
* @throws {RequiredError}
|
|
959
|
+
*/
|
|
960
|
+
async getChildCollections(options) {
|
|
961
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getChildCollections(options);
|
|
962
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
963
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.getChildCollections"]?.[localVarOperationServerIndex]?.url;
|
|
964
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
965
|
+
},
|
|
966
|
+
/**
|
|
967
|
+
*
|
|
968
|
+
* @param {number} id
|
|
969
|
+
* @param {*} [options] Override http request option.
|
|
970
|
+
* @throws {RequiredError}
|
|
971
|
+
*/
|
|
972
|
+
async getCollaborators(id, options) {
|
|
973
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCollaborators(id, options);
|
|
974
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
975
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.getCollaborators"]?.[localVarOperationServerIndex]?.url;
|
|
976
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
977
|
+
},
|
|
978
|
+
/**
|
|
979
|
+
*
|
|
980
|
+
* @param {number} id
|
|
981
|
+
* @param {*} [options] Override http request option.
|
|
982
|
+
* @throws {RequiredError}
|
|
983
|
+
*/
|
|
984
|
+
async getCollection(id, options) {
|
|
985
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCollection(id, options);
|
|
986
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
987
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.getCollection"]?.[localVarOperationServerIndex]?.url;
|
|
988
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
989
|
+
},
|
|
990
|
+
/**
|
|
991
|
+
*
|
|
992
|
+
* @param {*} [options] Override http request option.
|
|
993
|
+
* @throws {RequiredError}
|
|
994
|
+
*/
|
|
995
|
+
async getFeaturedCovers(options) {
|
|
996
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getFeaturedCovers(options);
|
|
997
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
998
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.getFeaturedCovers"]?.[localVarOperationServerIndex]?.url;
|
|
999
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1000
|
+
},
|
|
1001
|
+
/**
|
|
1002
|
+
*
|
|
1003
|
+
* @param {*} [options] Override http request option.
|
|
1004
|
+
* @throws {RequiredError}
|
|
1005
|
+
*/
|
|
1006
|
+
async getRootCollections(options) {
|
|
1007
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRootCollections(options);
|
|
1008
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1009
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.getRootCollections"]?.[localVarOperationServerIndex]?.url;
|
|
1010
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1011
|
+
},
|
|
1012
|
+
/**
|
|
1013
|
+
*
|
|
1014
|
+
* @param {*} [options] Override http request option.
|
|
1015
|
+
* @throws {RequiredError}
|
|
1016
|
+
*/
|
|
1017
|
+
async getSystemCollectionStats(options) {
|
|
1018
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSystemCollectionStats(options);
|
|
1019
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1020
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.getSystemCollectionStats"]?.[localVarOperationServerIndex]?.url;
|
|
1021
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1022
|
+
},
|
|
1023
|
+
/**
|
|
1024
|
+
*
|
|
1025
|
+
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
1026
|
+
* @param {*} [options] Override http request option.
|
|
1027
|
+
* @throws {RequiredError}
|
|
1028
|
+
*/
|
|
1029
|
+
async mergeCollections(mergeCollectionsRequest, options) {
|
|
1030
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.mergeCollections(mergeCollectionsRequest, options);
|
|
1031
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1032
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.mergeCollections"]?.[localVarOperationServerIndex]?.url;
|
|
1033
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1034
|
+
},
|
|
1035
|
+
/**
|
|
1036
|
+
*
|
|
1037
|
+
* @param {*} [options] Override http request option.
|
|
1038
|
+
* @throws {RequiredError}
|
|
1039
|
+
*/
|
|
1040
|
+
async removeAllEmptyCollections(options) {
|
|
1041
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeAllEmptyCollections(options);
|
|
1042
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1043
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.removeAllEmptyCollections"]?.[localVarOperationServerIndex]?.url;
|
|
1044
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1045
|
+
},
|
|
1046
|
+
/**
|
|
1047
|
+
*
|
|
1048
|
+
* @param {number} id
|
|
1049
|
+
* @param {*} [options] Override http request option.
|
|
1050
|
+
* @throws {RequiredError}
|
|
1051
|
+
*/
|
|
1052
|
+
async removeCollection(id, options) {
|
|
1053
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeCollection(id, options);
|
|
1054
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1055
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.removeCollection"]?.[localVarOperationServerIndex]?.url;
|
|
1056
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1057
|
+
},
|
|
1058
|
+
/**
|
|
1059
|
+
*
|
|
1060
|
+
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
1061
|
+
* @param {*} [options] Override http request option.
|
|
1062
|
+
* @throws {RequiredError}
|
|
1063
|
+
*/
|
|
1064
|
+
async removeCollections(removeCollectionsRequest, options) {
|
|
1065
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeCollections(removeCollectionsRequest, options);
|
|
1066
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1067
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.removeCollections"]?.[localVarOperationServerIndex]?.url;
|
|
1068
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1069
|
+
},
|
|
1070
|
+
/**
|
|
1071
|
+
*
|
|
1072
|
+
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
1073
|
+
* @param {*} [options] Override http request option.
|
|
1074
|
+
* @throws {RequiredError}
|
|
1075
|
+
*/
|
|
1076
|
+
async reorderAllCollections(reorderAllCollectionsRequest, options) {
|
|
1077
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.reorderAllCollections(reorderAllCollectionsRequest, options);
|
|
1078
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1079
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.reorderAllCollections"]?.[localVarOperationServerIndex]?.url;
|
|
1080
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1081
|
+
},
|
|
1082
|
+
/**
|
|
1083
|
+
*
|
|
1084
|
+
* @param {string} text
|
|
1085
|
+
* @param {*} [options] Override http request option.
|
|
1086
|
+
* @throws {RequiredError}
|
|
1087
|
+
*/
|
|
1088
|
+
async searchCovers(text, options) {
|
|
1089
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.searchCovers(text, options);
|
|
1090
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1091
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.searchCovers"]?.[localVarOperationServerIndex]?.url;
|
|
1092
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1093
|
+
},
|
|
1094
|
+
/**
|
|
1095
|
+
*
|
|
1096
|
+
* @param {number} id
|
|
1097
|
+
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
1098
|
+
* @param {*} [options] Override http request option.
|
|
1099
|
+
* @throws {RequiredError}
|
|
1100
|
+
*/
|
|
1101
|
+
async shareCollection(id, shareCollectionRequest, options) {
|
|
1102
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.shareCollection(id, shareCollectionRequest, options);
|
|
1103
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1104
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.shareCollection"]?.[localVarOperationServerIndex]?.url;
|
|
1105
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1106
|
+
},
|
|
1107
|
+
/**
|
|
1108
|
+
*
|
|
1109
|
+
* @param {number} id
|
|
1110
|
+
* @param {*} [options] Override http request option.
|
|
1111
|
+
* @throws {RequiredError}
|
|
1112
|
+
*/
|
|
1113
|
+
async unshareOrLeaveCollection(id, options) {
|
|
1114
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.unshareOrLeaveCollection(id, options);
|
|
1115
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1116
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.unshareOrLeaveCollection"]?.[localVarOperationServerIndex]?.url;
|
|
1117
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1118
|
+
},
|
|
1119
|
+
/**
|
|
1120
|
+
*
|
|
1121
|
+
* @param {number} id
|
|
1122
|
+
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
1123
|
+
* @param {*} [options] Override http request option.
|
|
1124
|
+
* @throws {RequiredError}
|
|
1125
|
+
*/
|
|
1126
|
+
async updateCollection(id, updateCollectionRequest, options) {
|
|
1127
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCollection(id, updateCollectionRequest, options);
|
|
1128
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1129
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.updateCollection"]?.[localVarOperationServerIndex]?.url;
|
|
1130
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1131
|
+
},
|
|
1132
|
+
/**
|
|
1133
|
+
*
|
|
1134
|
+
* @param {number} id
|
|
1135
|
+
* @param {File} [cover]
|
|
1136
|
+
* @param {*} [options] Override http request option.
|
|
1137
|
+
* @throws {RequiredError}
|
|
1138
|
+
*/
|
|
1139
|
+
async uploadCollectionCover(id, cover, options) {
|
|
1140
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadCollectionCover(id, cover, options);
|
|
1141
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1142
|
+
const localVarOperationServerBasePath = operationServerMap["CollectionApi.uploadCollectionCover"]?.[localVarOperationServerIndex]?.url;
|
|
1143
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1144
|
+
}
|
|
1145
|
+
};
|
|
1146
|
+
};
|
|
1147
|
+
var CollectionApiFactory = function(configuration, basePath, axios2) {
|
|
1148
|
+
const localVarFp = CollectionApiFp(configuration);
|
|
1149
|
+
return {
|
|
1150
|
+
/**
|
|
1151
|
+
*
|
|
1152
|
+
* @param {number} id
|
|
1153
|
+
* @param {*} [options] Override http request option.
|
|
1154
|
+
* @throws {RequiredError}
|
|
1155
|
+
*/
|
|
1156
|
+
acceptInvitation(id, options) {
|
|
1157
|
+
return localVarFp.acceptInvitation(id, options).then((request) => request(axios2, basePath));
|
|
1158
|
+
},
|
|
1159
|
+
/**
|
|
1160
|
+
*
|
|
1161
|
+
* @param {number} userId
|
|
1162
|
+
* @param {number} id
|
|
1163
|
+
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
1164
|
+
* @param {*} [options] Override http request option.
|
|
1165
|
+
* @throws {RequiredError}
|
|
1166
|
+
*/
|
|
1167
|
+
changeCollaboratorAccessLevel(userId, id, changeCollaboratorAccessLevelRequest, options) {
|
|
1168
|
+
return localVarFp.changeCollaboratorAccessLevel(userId, id, changeCollaboratorAccessLevelRequest, options).then((request) => request(axios2, basePath));
|
|
1169
|
+
},
|
|
1170
|
+
/**
|
|
1171
|
+
*
|
|
1172
|
+
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
1173
|
+
* @param {*} [options] Override http request option.
|
|
1174
|
+
* @throws {RequiredError}
|
|
1175
|
+
*/
|
|
1176
|
+
createCollection(createCollectionRequest, options) {
|
|
1177
|
+
return localVarFp.createCollection(createCollectionRequest, options).then((request) => request(axios2, basePath));
|
|
1178
|
+
},
|
|
1179
|
+
/**
|
|
1180
|
+
*
|
|
1181
|
+
* @param {number} userId
|
|
1182
|
+
* @param {number} id
|
|
1183
|
+
* @param {*} [options] Override http request option.
|
|
1184
|
+
* @throws {RequiredError}
|
|
1185
|
+
*/
|
|
1186
|
+
deleteCollaborator(userId, id, options) {
|
|
1187
|
+
return localVarFp.deleteCollaborator(userId, id, options).then((request) => request(axios2, basePath));
|
|
1188
|
+
},
|
|
1189
|
+
/**
|
|
1190
|
+
*
|
|
1191
|
+
* @param {*} [options] Override http request option.
|
|
1192
|
+
* @throws {RequiredError}
|
|
1193
|
+
*/
|
|
1194
|
+
emptyTrash(options) {
|
|
1195
|
+
return localVarFp.emptyTrash(options).then((request) => request(axios2, basePath));
|
|
1196
|
+
},
|
|
1197
|
+
/**
|
|
1198
|
+
*
|
|
1199
|
+
* @param {*} [options] Override http request option.
|
|
1200
|
+
* @throws {RequiredError}
|
|
1201
|
+
*/
|
|
1202
|
+
getChildCollections(options) {
|
|
1203
|
+
return localVarFp.getChildCollections(options).then((request) => request(axios2, basePath));
|
|
1204
|
+
},
|
|
1205
|
+
/**
|
|
1206
|
+
*
|
|
1207
|
+
* @param {number} id
|
|
1208
|
+
* @param {*} [options] Override http request option.
|
|
1209
|
+
* @throws {RequiredError}
|
|
1210
|
+
*/
|
|
1211
|
+
getCollaborators(id, options) {
|
|
1212
|
+
return localVarFp.getCollaborators(id, options).then((request) => request(axios2, basePath));
|
|
1213
|
+
},
|
|
1214
|
+
/**
|
|
1215
|
+
*
|
|
1216
|
+
* @param {number} id
|
|
1217
|
+
* @param {*} [options] Override http request option.
|
|
1218
|
+
* @throws {RequiredError}
|
|
1219
|
+
*/
|
|
1220
|
+
getCollection(id, options) {
|
|
1221
|
+
return localVarFp.getCollection(id, options).then((request) => request(axios2, basePath));
|
|
1222
|
+
},
|
|
1223
|
+
/**
|
|
1224
|
+
*
|
|
1225
|
+
* @param {*} [options] Override http request option.
|
|
1226
|
+
* @throws {RequiredError}
|
|
1227
|
+
*/
|
|
1228
|
+
getFeaturedCovers(options) {
|
|
1229
|
+
return localVarFp.getFeaturedCovers(options).then((request) => request(axios2, basePath));
|
|
1230
|
+
},
|
|
1231
|
+
/**
|
|
1232
|
+
*
|
|
1233
|
+
* @param {*} [options] Override http request option.
|
|
1234
|
+
* @throws {RequiredError}
|
|
1235
|
+
*/
|
|
1236
|
+
getRootCollections(options) {
|
|
1237
|
+
return localVarFp.getRootCollections(options).then((request) => request(axios2, basePath));
|
|
1238
|
+
},
|
|
1239
|
+
/**
|
|
1240
|
+
*
|
|
1241
|
+
* @param {*} [options] Override http request option.
|
|
1242
|
+
* @throws {RequiredError}
|
|
1243
|
+
*/
|
|
1244
|
+
getSystemCollectionStats(options) {
|
|
1245
|
+
return localVarFp.getSystemCollectionStats(options).then((request) => request(axios2, basePath));
|
|
1246
|
+
},
|
|
1247
|
+
/**
|
|
1248
|
+
*
|
|
1249
|
+
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
1250
|
+
* @param {*} [options] Override http request option.
|
|
1251
|
+
* @throws {RequiredError}
|
|
1252
|
+
*/
|
|
1253
|
+
mergeCollections(mergeCollectionsRequest, options) {
|
|
1254
|
+
return localVarFp.mergeCollections(mergeCollectionsRequest, options).then((request) => request(axios2, basePath));
|
|
1255
|
+
},
|
|
1256
|
+
/**
|
|
1257
|
+
*
|
|
1258
|
+
* @param {*} [options] Override http request option.
|
|
1259
|
+
* @throws {RequiredError}
|
|
1260
|
+
*/
|
|
1261
|
+
removeAllEmptyCollections(options) {
|
|
1262
|
+
return localVarFp.removeAllEmptyCollections(options).then((request) => request(axios2, basePath));
|
|
1263
|
+
},
|
|
1264
|
+
/**
|
|
1265
|
+
*
|
|
1266
|
+
* @param {number} id
|
|
1267
|
+
* @param {*} [options] Override http request option.
|
|
1268
|
+
* @throws {RequiredError}
|
|
1269
|
+
*/
|
|
1270
|
+
removeCollection(id, options) {
|
|
1271
|
+
return localVarFp.removeCollection(id, options).then((request) => request(axios2, basePath));
|
|
1272
|
+
},
|
|
1273
|
+
/**
|
|
1274
|
+
*
|
|
1275
|
+
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
1276
|
+
* @param {*} [options] Override http request option.
|
|
1277
|
+
* @throws {RequiredError}
|
|
1278
|
+
*/
|
|
1279
|
+
removeCollections(removeCollectionsRequest, options) {
|
|
1280
|
+
return localVarFp.removeCollections(removeCollectionsRequest, options).then((request) => request(axios2, basePath));
|
|
1281
|
+
},
|
|
1282
|
+
/**
|
|
1283
|
+
*
|
|
1284
|
+
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
1285
|
+
* @param {*} [options] Override http request option.
|
|
1286
|
+
* @throws {RequiredError}
|
|
1287
|
+
*/
|
|
1288
|
+
reorderAllCollections(reorderAllCollectionsRequest, options) {
|
|
1289
|
+
return localVarFp.reorderAllCollections(reorderAllCollectionsRequest, options).then((request) => request(axios2, basePath));
|
|
1290
|
+
},
|
|
1291
|
+
/**
|
|
1292
|
+
*
|
|
1293
|
+
* @param {string} text
|
|
1294
|
+
* @param {*} [options] Override http request option.
|
|
1295
|
+
* @throws {RequiredError}
|
|
1296
|
+
*/
|
|
1297
|
+
searchCovers(text, options) {
|
|
1298
|
+
return localVarFp.searchCovers(text, options).then((request) => request(axios2, basePath));
|
|
1299
|
+
},
|
|
1300
|
+
/**
|
|
1301
|
+
*
|
|
1302
|
+
* @param {number} id
|
|
1303
|
+
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
1304
|
+
* @param {*} [options] Override http request option.
|
|
1305
|
+
* @throws {RequiredError}
|
|
1306
|
+
*/
|
|
1307
|
+
shareCollection(id, shareCollectionRequest, options) {
|
|
1308
|
+
return localVarFp.shareCollection(id, shareCollectionRequest, options).then((request) => request(axios2, basePath));
|
|
1309
|
+
},
|
|
1310
|
+
/**
|
|
1311
|
+
*
|
|
1312
|
+
* @param {number} id
|
|
1313
|
+
* @param {*} [options] Override http request option.
|
|
1314
|
+
* @throws {RequiredError}
|
|
1315
|
+
*/
|
|
1316
|
+
unshareOrLeaveCollection(id, options) {
|
|
1317
|
+
return localVarFp.unshareOrLeaveCollection(id, options).then((request) => request(axios2, basePath));
|
|
1318
|
+
},
|
|
1319
|
+
/**
|
|
1320
|
+
*
|
|
1321
|
+
* @param {number} id
|
|
1322
|
+
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
1323
|
+
* @param {*} [options] Override http request option.
|
|
1324
|
+
* @throws {RequiredError}
|
|
1325
|
+
*/
|
|
1326
|
+
updateCollection(id, updateCollectionRequest, options) {
|
|
1327
|
+
return localVarFp.updateCollection(id, updateCollectionRequest, options).then((request) => request(axios2, basePath));
|
|
1328
|
+
},
|
|
1329
|
+
/**
|
|
1330
|
+
*
|
|
1331
|
+
* @param {number} id
|
|
1332
|
+
* @param {File} [cover]
|
|
1333
|
+
* @param {*} [options] Override http request option.
|
|
1334
|
+
* @throws {RequiredError}
|
|
1335
|
+
*/
|
|
1336
|
+
uploadCollectionCover(id, cover, options) {
|
|
1337
|
+
return localVarFp.uploadCollectionCover(id, cover, options).then((request) => request(axios2, basePath));
|
|
1338
|
+
}
|
|
1339
|
+
};
|
|
1340
|
+
};
|
|
1341
|
+
var CollectionApi = class extends BaseAPI {
|
|
1342
|
+
/**
|
|
1343
|
+
*
|
|
1344
|
+
* @param {number} id
|
|
1345
|
+
* @param {*} [options] Override http request option.
|
|
1346
|
+
* @throws {RequiredError}
|
|
1347
|
+
* @memberof CollectionApi
|
|
1348
|
+
*/
|
|
1349
|
+
acceptInvitation(id, options) {
|
|
1350
|
+
return CollectionApiFp(this.configuration).acceptInvitation(id, options).then((request) => request(this.axios, this.basePath));
|
|
1351
|
+
}
|
|
1352
|
+
/**
|
|
1353
|
+
*
|
|
1354
|
+
* @param {number} userId
|
|
1355
|
+
* @param {number} id
|
|
1356
|
+
* @param {ChangeCollaboratorAccessLevelRequest} [changeCollaboratorAccessLevelRequest]
|
|
1357
|
+
* @param {*} [options] Override http request option.
|
|
1358
|
+
* @throws {RequiredError}
|
|
1359
|
+
* @memberof CollectionApi
|
|
1360
|
+
*/
|
|
1361
|
+
changeCollaboratorAccessLevel(userId, id, changeCollaboratorAccessLevelRequest, options) {
|
|
1362
|
+
return CollectionApiFp(this.configuration).changeCollaboratorAccessLevel(userId, id, changeCollaboratorAccessLevelRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1363
|
+
}
|
|
1364
|
+
/**
|
|
1365
|
+
*
|
|
1366
|
+
* @param {CreateCollectionRequest} [createCollectionRequest]
|
|
1367
|
+
* @param {*} [options] Override http request option.
|
|
1368
|
+
* @throws {RequiredError}
|
|
1369
|
+
* @memberof CollectionApi
|
|
1370
|
+
*/
|
|
1371
|
+
createCollection(createCollectionRequest, options) {
|
|
1372
|
+
return CollectionApiFp(this.configuration).createCollection(createCollectionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1373
|
+
}
|
|
1374
|
+
/**
|
|
1375
|
+
*
|
|
1376
|
+
* @param {number} userId
|
|
1377
|
+
* @param {number} id
|
|
1378
|
+
* @param {*} [options] Override http request option.
|
|
1379
|
+
* @throws {RequiredError}
|
|
1380
|
+
* @memberof CollectionApi
|
|
1381
|
+
*/
|
|
1382
|
+
deleteCollaborator(userId, id, options) {
|
|
1383
|
+
return CollectionApiFp(this.configuration).deleteCollaborator(userId, id, options).then((request) => request(this.axios, this.basePath));
|
|
1384
|
+
}
|
|
1385
|
+
/**
|
|
1386
|
+
*
|
|
1387
|
+
* @param {*} [options] Override http request option.
|
|
1388
|
+
* @throws {RequiredError}
|
|
1389
|
+
* @memberof CollectionApi
|
|
1390
|
+
*/
|
|
1391
|
+
emptyTrash(options) {
|
|
1392
|
+
return CollectionApiFp(this.configuration).emptyTrash(options).then((request) => request(this.axios, this.basePath));
|
|
1393
|
+
}
|
|
1394
|
+
/**
|
|
1395
|
+
*
|
|
1396
|
+
* @param {*} [options] Override http request option.
|
|
1397
|
+
* @throws {RequiredError}
|
|
1398
|
+
* @memberof CollectionApi
|
|
1399
|
+
*/
|
|
1400
|
+
getChildCollections(options) {
|
|
1401
|
+
return CollectionApiFp(this.configuration).getChildCollections(options).then((request) => request(this.axios, this.basePath));
|
|
1402
|
+
}
|
|
1403
|
+
/**
|
|
1404
|
+
*
|
|
1405
|
+
* @param {number} id
|
|
1406
|
+
* @param {*} [options] Override http request option.
|
|
1407
|
+
* @throws {RequiredError}
|
|
1408
|
+
* @memberof CollectionApi
|
|
1409
|
+
*/
|
|
1410
|
+
getCollaborators(id, options) {
|
|
1411
|
+
return CollectionApiFp(this.configuration).getCollaborators(id, options).then((request) => request(this.axios, this.basePath));
|
|
1412
|
+
}
|
|
1413
|
+
/**
|
|
1414
|
+
*
|
|
1415
|
+
* @param {number} id
|
|
1416
|
+
* @param {*} [options] Override http request option.
|
|
1417
|
+
* @throws {RequiredError}
|
|
1418
|
+
* @memberof CollectionApi
|
|
1419
|
+
*/
|
|
1420
|
+
getCollection(id, options) {
|
|
1421
|
+
return CollectionApiFp(this.configuration).getCollection(id, options).then((request) => request(this.axios, this.basePath));
|
|
1422
|
+
}
|
|
1423
|
+
/**
|
|
1424
|
+
*
|
|
1425
|
+
* @param {*} [options] Override http request option.
|
|
1426
|
+
* @throws {RequiredError}
|
|
1427
|
+
* @memberof CollectionApi
|
|
1428
|
+
*/
|
|
1429
|
+
getFeaturedCovers(options) {
|
|
1430
|
+
return CollectionApiFp(this.configuration).getFeaturedCovers(options).then((request) => request(this.axios, this.basePath));
|
|
1431
|
+
}
|
|
1432
|
+
/**
|
|
1433
|
+
*
|
|
1434
|
+
* @param {*} [options] Override http request option.
|
|
1435
|
+
* @throws {RequiredError}
|
|
1436
|
+
* @memberof CollectionApi
|
|
1437
|
+
*/
|
|
1438
|
+
getRootCollections(options) {
|
|
1439
|
+
return CollectionApiFp(this.configuration).getRootCollections(options).then((request) => request(this.axios, this.basePath));
|
|
1440
|
+
}
|
|
1441
|
+
/**
|
|
1442
|
+
*
|
|
1443
|
+
* @param {*} [options] Override http request option.
|
|
1444
|
+
* @throws {RequiredError}
|
|
1445
|
+
* @memberof CollectionApi
|
|
1446
|
+
*/
|
|
1447
|
+
getSystemCollectionStats(options) {
|
|
1448
|
+
return CollectionApiFp(this.configuration).getSystemCollectionStats(options).then((request) => request(this.axios, this.basePath));
|
|
1449
|
+
}
|
|
1450
|
+
/**
|
|
1451
|
+
*
|
|
1452
|
+
* @param {MergeCollectionsRequest} [mergeCollectionsRequest]
|
|
1453
|
+
* @param {*} [options] Override http request option.
|
|
1454
|
+
* @throws {RequiredError}
|
|
1455
|
+
* @memberof CollectionApi
|
|
1456
|
+
*/
|
|
1457
|
+
mergeCollections(mergeCollectionsRequest, options) {
|
|
1458
|
+
return CollectionApiFp(this.configuration).mergeCollections(mergeCollectionsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1459
|
+
}
|
|
1460
|
+
/**
|
|
1461
|
+
*
|
|
1462
|
+
* @param {*} [options] Override http request option.
|
|
1463
|
+
* @throws {RequiredError}
|
|
1464
|
+
* @memberof CollectionApi
|
|
1465
|
+
*/
|
|
1466
|
+
removeAllEmptyCollections(options) {
|
|
1467
|
+
return CollectionApiFp(this.configuration).removeAllEmptyCollections(options).then((request) => request(this.axios, this.basePath));
|
|
1468
|
+
}
|
|
1469
|
+
/**
|
|
1470
|
+
*
|
|
1471
|
+
* @param {number} id
|
|
1472
|
+
* @param {*} [options] Override http request option.
|
|
1473
|
+
* @throws {RequiredError}
|
|
1474
|
+
* @memberof CollectionApi
|
|
1475
|
+
*/
|
|
1476
|
+
removeCollection(id, options) {
|
|
1477
|
+
return CollectionApiFp(this.configuration).removeCollection(id, options).then((request) => request(this.axios, this.basePath));
|
|
1478
|
+
}
|
|
1479
|
+
/**
|
|
1480
|
+
*
|
|
1481
|
+
* @param {RemoveCollectionsRequest} [removeCollectionsRequest]
|
|
1482
|
+
* @param {*} [options] Override http request option.
|
|
1483
|
+
* @throws {RequiredError}
|
|
1484
|
+
* @memberof CollectionApi
|
|
1485
|
+
*/
|
|
1486
|
+
removeCollections(removeCollectionsRequest, options) {
|
|
1487
|
+
return CollectionApiFp(this.configuration).removeCollections(removeCollectionsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1488
|
+
}
|
|
1489
|
+
/**
|
|
1490
|
+
*
|
|
1491
|
+
* @param {ReorderAllCollectionsRequest} [reorderAllCollectionsRequest]
|
|
1492
|
+
* @param {*} [options] Override http request option.
|
|
1493
|
+
* @throws {RequiredError}
|
|
1494
|
+
* @memberof CollectionApi
|
|
1495
|
+
*/
|
|
1496
|
+
reorderAllCollections(reorderAllCollectionsRequest, options) {
|
|
1497
|
+
return CollectionApiFp(this.configuration).reorderAllCollections(reorderAllCollectionsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1498
|
+
}
|
|
1499
|
+
/**
|
|
1500
|
+
*
|
|
1501
|
+
* @param {string} text
|
|
1502
|
+
* @param {*} [options] Override http request option.
|
|
1503
|
+
* @throws {RequiredError}
|
|
1504
|
+
* @memberof CollectionApi
|
|
1505
|
+
*/
|
|
1506
|
+
searchCovers(text, options) {
|
|
1507
|
+
return CollectionApiFp(this.configuration).searchCovers(text, options).then((request) => request(this.axios, this.basePath));
|
|
1508
|
+
}
|
|
1509
|
+
/**
|
|
1510
|
+
*
|
|
1511
|
+
* @param {number} id
|
|
1512
|
+
* @param {ShareCollectionRequest} [shareCollectionRequest]
|
|
1513
|
+
* @param {*} [options] Override http request option.
|
|
1514
|
+
* @throws {RequiredError}
|
|
1515
|
+
* @memberof CollectionApi
|
|
1516
|
+
*/
|
|
1517
|
+
shareCollection(id, shareCollectionRequest, options) {
|
|
1518
|
+
return CollectionApiFp(this.configuration).shareCollection(id, shareCollectionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1519
|
+
}
|
|
1520
|
+
/**
|
|
1521
|
+
*
|
|
1522
|
+
* @param {number} id
|
|
1523
|
+
* @param {*} [options] Override http request option.
|
|
1524
|
+
* @throws {RequiredError}
|
|
1525
|
+
* @memberof CollectionApi
|
|
1526
|
+
*/
|
|
1527
|
+
unshareOrLeaveCollection(id, options) {
|
|
1528
|
+
return CollectionApiFp(this.configuration).unshareOrLeaveCollection(id, options).then((request) => request(this.axios, this.basePath));
|
|
1529
|
+
}
|
|
1530
|
+
/**
|
|
1531
|
+
*
|
|
1532
|
+
* @param {number} id
|
|
1533
|
+
* @param {UpdateCollectionRequest} [updateCollectionRequest]
|
|
1534
|
+
* @param {*} [options] Override http request option.
|
|
1535
|
+
* @throws {RequiredError}
|
|
1536
|
+
* @memberof CollectionApi
|
|
1537
|
+
*/
|
|
1538
|
+
updateCollection(id, updateCollectionRequest, options) {
|
|
1539
|
+
return CollectionApiFp(this.configuration).updateCollection(id, updateCollectionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
1540
|
+
}
|
|
1541
|
+
/**
|
|
1542
|
+
*
|
|
1543
|
+
* @param {number} id
|
|
1544
|
+
* @param {File} [cover]
|
|
1545
|
+
* @param {*} [options] Override http request option.
|
|
1546
|
+
* @throws {RequiredError}
|
|
1547
|
+
* @memberof CollectionApi
|
|
1548
|
+
*/
|
|
1549
|
+
uploadCollectionCover(id, cover, options) {
|
|
1550
|
+
return CollectionApiFp(this.configuration).uploadCollectionCover(id, cover, options).then((request) => request(this.axios, this.basePath));
|
|
1551
|
+
}
|
|
1552
|
+
};
|
|
1553
|
+
var FilterApiAxiosParamCreator = function(configuration) {
|
|
1554
|
+
return {
|
|
1555
|
+
/**
|
|
1556
|
+
*
|
|
1557
|
+
* @param {number} collectionId
|
|
1558
|
+
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1559
|
+
* @param {string} [search]
|
|
1560
|
+
* @param {*} [options] Override http request option.
|
|
1561
|
+
* @throws {RequiredError}
|
|
1562
|
+
*/
|
|
1563
|
+
getFilters: async (collectionId, tagsSort, search, options = {}) => {
|
|
1564
|
+
assertParamExists("getFilters", "collectionId", collectionId);
|
|
1565
|
+
const localVarPath = `/rest/v1/filters/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
1566
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1567
|
+
let baseOptions;
|
|
1568
|
+
if (configuration) {
|
|
1569
|
+
baseOptions = configuration.baseOptions;
|
|
1570
|
+
}
|
|
1571
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1572
|
+
const localVarHeaderParameter = {};
|
|
1573
|
+
const localVarQueryParameter = {};
|
|
1574
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1575
|
+
if (tagsSort !== void 0) {
|
|
1576
|
+
localVarQueryParameter["tagsSort"] = tagsSort;
|
|
1577
|
+
}
|
|
1578
|
+
if (search !== void 0) {
|
|
1579
|
+
localVarQueryParameter["search"] = search;
|
|
1580
|
+
}
|
|
1581
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1582
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1583
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1584
|
+
return {
|
|
1585
|
+
url: toPathString(localVarUrlObj),
|
|
1586
|
+
options: localVarRequestOptions
|
|
1587
|
+
};
|
|
1588
|
+
}
|
|
1589
|
+
};
|
|
1590
|
+
};
|
|
1591
|
+
var FilterApiFp = function(configuration) {
|
|
1592
|
+
const localVarAxiosParamCreator = FilterApiAxiosParamCreator(configuration);
|
|
1593
|
+
return {
|
|
1594
|
+
/**
|
|
1595
|
+
*
|
|
1596
|
+
* @param {number} collectionId
|
|
1597
|
+
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1598
|
+
* @param {string} [search]
|
|
1599
|
+
* @param {*} [options] Override http request option.
|
|
1600
|
+
* @throws {RequiredError}
|
|
1601
|
+
*/
|
|
1602
|
+
async getFilters(collectionId, tagsSort, search, options) {
|
|
1603
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getFilters(collectionId, tagsSort, search, options);
|
|
1604
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1605
|
+
const localVarOperationServerBasePath = operationServerMap["FilterApi.getFilters"]?.[localVarOperationServerIndex]?.url;
|
|
1606
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1607
|
+
}
|
|
1608
|
+
};
|
|
1609
|
+
};
|
|
1610
|
+
var FilterApiFactory = function(configuration, basePath, axios2) {
|
|
1611
|
+
const localVarFp = FilterApiFp(configuration);
|
|
1612
|
+
return {
|
|
1613
|
+
/**
|
|
1614
|
+
*
|
|
1615
|
+
* @param {number} collectionId
|
|
1616
|
+
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1617
|
+
* @param {string} [search]
|
|
1618
|
+
* @param {*} [options] Override http request option.
|
|
1619
|
+
* @throws {RequiredError}
|
|
1620
|
+
*/
|
|
1621
|
+
getFilters(collectionId, tagsSort, search, options) {
|
|
1622
|
+
return localVarFp.getFilters(collectionId, tagsSort, search, options).then((request) => request(axios2, basePath));
|
|
1623
|
+
}
|
|
1624
|
+
};
|
|
1625
|
+
};
|
|
1626
|
+
var FilterApi = class extends BaseAPI {
|
|
1627
|
+
/**
|
|
1628
|
+
*
|
|
1629
|
+
* @param {number} collectionId
|
|
1630
|
+
* @param {GetFiltersTagsSortEnum} [tagsSort]
|
|
1631
|
+
* @param {string} [search]
|
|
1632
|
+
* @param {*} [options] Override http request option.
|
|
1633
|
+
* @throws {RequiredError}
|
|
1634
|
+
* @memberof FilterApi
|
|
1635
|
+
*/
|
|
1636
|
+
getFilters(collectionId, tagsSort, search, options) {
|
|
1637
|
+
return FilterApiFp(this.configuration).getFilters(collectionId, tagsSort, search, options).then((request) => request(this.axios, this.basePath));
|
|
1638
|
+
}
|
|
1639
|
+
};
|
|
1640
|
+
var GetFiltersTagsSortEnum = {
|
|
1641
|
+
MinusCount: "-count",
|
|
1642
|
+
Id: "_id"
|
|
1643
|
+
};
|
|
1644
|
+
var HighlightApiAxiosParamCreator = function(configuration) {
|
|
1645
|
+
return {
|
|
1646
|
+
/**
|
|
1647
|
+
*
|
|
1648
|
+
* @param {number} [page]
|
|
1649
|
+
* @param {number} [perpage]
|
|
1650
|
+
* @param {*} [options] Override http request option.
|
|
1651
|
+
* @throws {RequiredError}
|
|
1652
|
+
*/
|
|
1653
|
+
getAllHighlights: async (page, perpage, options = {}) => {
|
|
1654
|
+
const localVarPath = `/rest/v1/highlights`;
|
|
1655
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1656
|
+
let baseOptions;
|
|
1657
|
+
if (configuration) {
|
|
1658
|
+
baseOptions = configuration.baseOptions;
|
|
1659
|
+
}
|
|
1660
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1661
|
+
const localVarHeaderParameter = {};
|
|
1662
|
+
const localVarQueryParameter = {};
|
|
1663
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1664
|
+
if (page !== void 0) {
|
|
1665
|
+
localVarQueryParameter["page"] = page;
|
|
1666
|
+
}
|
|
1667
|
+
if (perpage !== void 0) {
|
|
1668
|
+
localVarQueryParameter["perpage"] = perpage;
|
|
1669
|
+
}
|
|
1670
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1671
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1672
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1673
|
+
return {
|
|
1674
|
+
url: toPathString(localVarUrlObj),
|
|
1675
|
+
options: localVarRequestOptions
|
|
1676
|
+
};
|
|
1677
|
+
},
|
|
1678
|
+
/**
|
|
1679
|
+
*
|
|
1680
|
+
* @param {number} collectionId
|
|
1681
|
+
* @param {number} [page]
|
|
1682
|
+
* @param {number} [perpage]
|
|
1683
|
+
* @param {*} [options] Override http request option.
|
|
1684
|
+
* @throws {RequiredError}
|
|
1685
|
+
*/
|
|
1686
|
+
getHighlightsInCollection: async (collectionId, page, perpage, options = {}) => {
|
|
1687
|
+
assertParamExists("getHighlightsInCollection", "collectionId", collectionId);
|
|
1688
|
+
const localVarPath = `/rest/v1/highlights/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
1689
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1690
|
+
let baseOptions;
|
|
1691
|
+
if (configuration) {
|
|
1692
|
+
baseOptions = configuration.baseOptions;
|
|
1693
|
+
}
|
|
1694
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1695
|
+
const localVarHeaderParameter = {};
|
|
1696
|
+
const localVarQueryParameter = {};
|
|
1697
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1698
|
+
if (page !== void 0) {
|
|
1699
|
+
localVarQueryParameter["page"] = page;
|
|
1700
|
+
}
|
|
1701
|
+
if (perpage !== void 0) {
|
|
1702
|
+
localVarQueryParameter["perpage"] = perpage;
|
|
1703
|
+
}
|
|
1704
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1705
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1706
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1707
|
+
return {
|
|
1708
|
+
url: toPathString(localVarUrlObj),
|
|
1709
|
+
options: localVarRequestOptions
|
|
1710
|
+
};
|
|
1711
|
+
},
|
|
1712
|
+
/**
|
|
1713
|
+
*
|
|
1714
|
+
* @param {number} id
|
|
1715
|
+
* @param {*} [options] Override http request option.
|
|
1716
|
+
* @throws {RequiredError}
|
|
1717
|
+
*/
|
|
1718
|
+
getRaindrop: async (id, options = {}) => {
|
|
1719
|
+
assertParamExists("getRaindrop", "id", id);
|
|
1720
|
+
const localVarPath = `/rest/v1/raindrop/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1721
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1722
|
+
let baseOptions;
|
|
1723
|
+
if (configuration) {
|
|
1724
|
+
baseOptions = configuration.baseOptions;
|
|
1725
|
+
}
|
|
1726
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1727
|
+
const localVarHeaderParameter = {};
|
|
1728
|
+
const localVarQueryParameter = {};
|
|
1729
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1730
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1731
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1732
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1733
|
+
return {
|
|
1734
|
+
url: toPathString(localVarUrlObj),
|
|
1735
|
+
options: localVarRequestOptions
|
|
1736
|
+
};
|
|
1737
|
+
},
|
|
1738
|
+
/**
|
|
1739
|
+
*
|
|
1740
|
+
* @param {number} id
|
|
1741
|
+
* @param {object} [body]
|
|
1742
|
+
* @param {*} [options] Override http request option.
|
|
1743
|
+
* @throws {RequiredError}
|
|
1744
|
+
*/
|
|
1745
|
+
updateRaindrop: async (id, body, options = {}) => {
|
|
1746
|
+
assertParamExists("updateRaindrop", "id", id);
|
|
1747
|
+
const localVarPath = `/rest/v1/raindrop/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
1748
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1749
|
+
let baseOptions;
|
|
1750
|
+
if (configuration) {
|
|
1751
|
+
baseOptions = configuration.baseOptions;
|
|
1752
|
+
}
|
|
1753
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
1754
|
+
const localVarHeaderParameter = {};
|
|
1755
|
+
const localVarQueryParameter = {};
|
|
1756
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1757
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1758
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1759
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1760
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1761
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
1762
|
+
return {
|
|
1763
|
+
url: toPathString(localVarUrlObj),
|
|
1764
|
+
options: localVarRequestOptions
|
|
1765
|
+
};
|
|
1766
|
+
}
|
|
1767
|
+
};
|
|
1768
|
+
};
|
|
1769
|
+
var HighlightApiFp = function(configuration) {
|
|
1770
|
+
const localVarAxiosParamCreator = HighlightApiAxiosParamCreator(configuration);
|
|
1771
|
+
return {
|
|
1772
|
+
/**
|
|
1773
|
+
*
|
|
1774
|
+
* @param {number} [page]
|
|
1775
|
+
* @param {number} [perpage]
|
|
1776
|
+
* @param {*} [options] Override http request option.
|
|
1777
|
+
* @throws {RequiredError}
|
|
1778
|
+
*/
|
|
1779
|
+
async getAllHighlights(page, perpage, options) {
|
|
1780
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getAllHighlights(page, perpage, options);
|
|
1781
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1782
|
+
const localVarOperationServerBasePath = operationServerMap["HighlightApi.getAllHighlights"]?.[localVarOperationServerIndex]?.url;
|
|
1783
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1784
|
+
},
|
|
1785
|
+
/**
|
|
1786
|
+
*
|
|
1787
|
+
* @param {number} collectionId
|
|
1788
|
+
* @param {number} [page]
|
|
1789
|
+
* @param {number} [perpage]
|
|
1790
|
+
* @param {*} [options] Override http request option.
|
|
1791
|
+
* @throws {RequiredError}
|
|
1792
|
+
*/
|
|
1793
|
+
async getHighlightsInCollection(collectionId, page, perpage, options) {
|
|
1794
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getHighlightsInCollection(collectionId, page, perpage, options);
|
|
1795
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1796
|
+
const localVarOperationServerBasePath = operationServerMap["HighlightApi.getHighlightsInCollection"]?.[localVarOperationServerIndex]?.url;
|
|
1797
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1798
|
+
},
|
|
1799
|
+
/**
|
|
1800
|
+
*
|
|
1801
|
+
* @param {number} id
|
|
1802
|
+
* @param {*} [options] Override http request option.
|
|
1803
|
+
* @throws {RequiredError}
|
|
1804
|
+
*/
|
|
1805
|
+
async getRaindrop(id, options) {
|
|
1806
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRaindrop(id, options);
|
|
1807
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1808
|
+
const localVarOperationServerBasePath = operationServerMap["HighlightApi.getRaindrop"]?.[localVarOperationServerIndex]?.url;
|
|
1809
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1810
|
+
},
|
|
1811
|
+
/**
|
|
1812
|
+
*
|
|
1813
|
+
* @param {number} id
|
|
1814
|
+
* @param {object} [body]
|
|
1815
|
+
* @param {*} [options] Override http request option.
|
|
1816
|
+
* @throws {RequiredError}
|
|
1817
|
+
*/
|
|
1818
|
+
async updateRaindrop(id, body, options) {
|
|
1819
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateRaindrop(id, body, options);
|
|
1820
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
1821
|
+
const localVarOperationServerBasePath = operationServerMap["HighlightApi.updateRaindrop"]?.[localVarOperationServerIndex]?.url;
|
|
1822
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
1823
|
+
}
|
|
1824
|
+
};
|
|
1825
|
+
};
|
|
1826
|
+
var HighlightApiFactory = function(configuration, basePath, axios2) {
|
|
1827
|
+
const localVarFp = HighlightApiFp(configuration);
|
|
1828
|
+
return {
|
|
1829
|
+
/**
|
|
1830
|
+
*
|
|
1831
|
+
* @param {number} [page]
|
|
1832
|
+
* @param {number} [perpage]
|
|
1833
|
+
* @param {*} [options] Override http request option.
|
|
1834
|
+
* @throws {RequiredError}
|
|
1835
|
+
*/
|
|
1836
|
+
getAllHighlights(page, perpage, options) {
|
|
1837
|
+
return localVarFp.getAllHighlights(page, perpage, options).then((request) => request(axios2, basePath));
|
|
1838
|
+
},
|
|
1839
|
+
/**
|
|
1840
|
+
*
|
|
1841
|
+
* @param {number} collectionId
|
|
1842
|
+
* @param {number} [page]
|
|
1843
|
+
* @param {number} [perpage]
|
|
1844
|
+
* @param {*} [options] Override http request option.
|
|
1845
|
+
* @throws {RequiredError}
|
|
1846
|
+
*/
|
|
1847
|
+
getHighlightsInCollection(collectionId, page, perpage, options) {
|
|
1848
|
+
return localVarFp.getHighlightsInCollection(collectionId, page, perpage, options).then((request) => request(axios2, basePath));
|
|
1849
|
+
},
|
|
1850
|
+
/**
|
|
1851
|
+
*
|
|
1852
|
+
* @param {number} id
|
|
1853
|
+
* @param {*} [options] Override http request option.
|
|
1854
|
+
* @throws {RequiredError}
|
|
1855
|
+
*/
|
|
1856
|
+
getRaindrop(id, options) {
|
|
1857
|
+
return localVarFp.getRaindrop(id, options).then((request) => request(axios2, basePath));
|
|
1858
|
+
},
|
|
1859
|
+
/**
|
|
1860
|
+
*
|
|
1861
|
+
* @param {number} id
|
|
1862
|
+
* @param {object} [body]
|
|
1863
|
+
* @param {*} [options] Override http request option.
|
|
1864
|
+
* @throws {RequiredError}
|
|
1865
|
+
*/
|
|
1866
|
+
updateRaindrop(id, body, options) {
|
|
1867
|
+
return localVarFp.updateRaindrop(id, body, options).then((request) => request(axios2, basePath));
|
|
1868
|
+
}
|
|
1869
|
+
};
|
|
1870
|
+
};
|
|
1871
|
+
var HighlightApi = class extends BaseAPI {
|
|
1872
|
+
/**
|
|
1873
|
+
*
|
|
1874
|
+
* @param {number} [page]
|
|
1875
|
+
* @param {number} [perpage]
|
|
1876
|
+
* @param {*} [options] Override http request option.
|
|
1877
|
+
* @throws {RequiredError}
|
|
1878
|
+
* @memberof HighlightApi
|
|
1879
|
+
*/
|
|
1880
|
+
getAllHighlights(page, perpage, options) {
|
|
1881
|
+
return HighlightApiFp(this.configuration).getAllHighlights(page, perpage, options).then((request) => request(this.axios, this.basePath));
|
|
1882
|
+
}
|
|
1883
|
+
/**
|
|
1884
|
+
*
|
|
1885
|
+
* @param {number} collectionId
|
|
1886
|
+
* @param {number} [page]
|
|
1887
|
+
* @param {number} [perpage]
|
|
1888
|
+
* @param {*} [options] Override http request option.
|
|
1889
|
+
* @throws {RequiredError}
|
|
1890
|
+
* @memberof HighlightApi
|
|
1891
|
+
*/
|
|
1892
|
+
getHighlightsInCollection(collectionId, page, perpage, options) {
|
|
1893
|
+
return HighlightApiFp(this.configuration).getHighlightsInCollection(collectionId, page, perpage, options).then((request) => request(this.axios, this.basePath));
|
|
1894
|
+
}
|
|
1895
|
+
/**
|
|
1896
|
+
*
|
|
1897
|
+
* @param {number} id
|
|
1898
|
+
* @param {*} [options] Override http request option.
|
|
1899
|
+
* @throws {RequiredError}
|
|
1900
|
+
* @memberof HighlightApi
|
|
1901
|
+
*/
|
|
1902
|
+
getRaindrop(id, options) {
|
|
1903
|
+
return HighlightApiFp(this.configuration).getRaindrop(id, options).then((request) => request(this.axios, this.basePath));
|
|
1904
|
+
}
|
|
1905
|
+
/**
|
|
1906
|
+
*
|
|
1907
|
+
* @param {number} id
|
|
1908
|
+
* @param {object} [body]
|
|
1909
|
+
* @param {*} [options] Override http request option.
|
|
1910
|
+
* @throws {RequiredError}
|
|
1911
|
+
* @memberof HighlightApi
|
|
1912
|
+
*/
|
|
1913
|
+
updateRaindrop(id, body, options) {
|
|
1914
|
+
return HighlightApiFp(this.configuration).updateRaindrop(id, body, options).then((request) => request(this.axios, this.basePath));
|
|
1915
|
+
}
|
|
1916
|
+
};
|
|
1917
|
+
var ImportApiAxiosParamCreator = function(configuration) {
|
|
1918
|
+
return {
|
|
1919
|
+
/**
|
|
1920
|
+
*
|
|
1921
|
+
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
1922
|
+
* @param {*} [options] Override http request option.
|
|
1923
|
+
* @throws {RequiredError}
|
|
1924
|
+
*/
|
|
1925
|
+
checkURLsExist: async (checkURLsExistRequest, options = {}) => {
|
|
1926
|
+
const localVarPath = `/rest/v1/import/url/exists`;
|
|
1927
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1928
|
+
let baseOptions;
|
|
1929
|
+
if (configuration) {
|
|
1930
|
+
baseOptions = configuration.baseOptions;
|
|
1931
|
+
}
|
|
1932
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
1933
|
+
const localVarHeaderParameter = {};
|
|
1934
|
+
const localVarQueryParameter = {};
|
|
1935
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1936
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
1937
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1938
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1939
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1940
|
+
localVarRequestOptions.data = serializeDataIfNeeded(checkURLsExistRequest, localVarRequestOptions, configuration);
|
|
1941
|
+
return {
|
|
1942
|
+
url: toPathString(localVarUrlObj),
|
|
1943
|
+
options: localVarRequestOptions
|
|
1944
|
+
};
|
|
1945
|
+
},
|
|
1946
|
+
/**
|
|
1947
|
+
*
|
|
1948
|
+
* @param {File} [_import]
|
|
1949
|
+
* @param {*} [options] Override http request option.
|
|
1950
|
+
* @throws {RequiredError}
|
|
1951
|
+
*/
|
|
1952
|
+
importHTMLBookmarkFile: async (_import, options = {}) => {
|
|
1953
|
+
const localVarPath = `/rest/v1/import/file`;
|
|
1954
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1955
|
+
let baseOptions;
|
|
1956
|
+
if (configuration) {
|
|
1957
|
+
baseOptions = configuration.baseOptions;
|
|
1958
|
+
}
|
|
1959
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
1960
|
+
const localVarHeaderParameter = {};
|
|
1961
|
+
const localVarQueryParameter = {};
|
|
1962
|
+
const localVarFormParams = new (configuration && configuration.formDataCtor || FormData)();
|
|
1963
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1964
|
+
if (_import !== void 0) {
|
|
1965
|
+
localVarFormParams.append("import", _import);
|
|
1966
|
+
}
|
|
1967
|
+
localVarHeaderParameter["Content-Type"] = "multipart/form-data";
|
|
1968
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1969
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1970
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
1971
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
1972
|
+
return {
|
|
1973
|
+
url: toPathString(localVarUrlObj),
|
|
1974
|
+
options: localVarRequestOptions
|
|
1975
|
+
};
|
|
1976
|
+
},
|
|
1977
|
+
/**
|
|
1978
|
+
*
|
|
1979
|
+
* @param {string} [url]
|
|
1980
|
+
* @param {*} [options] Override http request option.
|
|
1981
|
+
* @throws {RequiredError}
|
|
1982
|
+
*/
|
|
1983
|
+
parseURL: async (url, options = {}) => {
|
|
1984
|
+
const localVarPath = `/rest/v1/import/url/parse`;
|
|
1985
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
1986
|
+
let baseOptions;
|
|
1987
|
+
if (configuration) {
|
|
1988
|
+
baseOptions = configuration.baseOptions;
|
|
1989
|
+
}
|
|
1990
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
1991
|
+
const localVarHeaderParameter = {};
|
|
1992
|
+
const localVarQueryParameter = {};
|
|
1993
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
1994
|
+
if (url !== void 0) {
|
|
1995
|
+
localVarQueryParameter["url"] = url;
|
|
1996
|
+
}
|
|
1997
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
1998
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
1999
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2000
|
+
return {
|
|
2001
|
+
url: toPathString(localVarUrlObj),
|
|
2002
|
+
options: localVarRequestOptions
|
|
2003
|
+
};
|
|
2004
|
+
}
|
|
2005
|
+
};
|
|
2006
|
+
};
|
|
2007
|
+
var ImportApiFp = function(configuration) {
|
|
2008
|
+
const localVarAxiosParamCreator = ImportApiAxiosParamCreator(configuration);
|
|
2009
|
+
return {
|
|
2010
|
+
/**
|
|
2011
|
+
*
|
|
2012
|
+
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
2013
|
+
* @param {*} [options] Override http request option.
|
|
2014
|
+
* @throws {RequiredError}
|
|
2015
|
+
*/
|
|
2016
|
+
async checkURLsExist(checkURLsExistRequest, options) {
|
|
2017
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.checkURLsExist(checkURLsExistRequest, options);
|
|
2018
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2019
|
+
const localVarOperationServerBasePath = operationServerMap["ImportApi.checkURLsExist"]?.[localVarOperationServerIndex]?.url;
|
|
2020
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2021
|
+
},
|
|
2022
|
+
/**
|
|
2023
|
+
*
|
|
2024
|
+
* @param {File} [_import]
|
|
2025
|
+
* @param {*} [options] Override http request option.
|
|
2026
|
+
* @throws {RequiredError}
|
|
2027
|
+
*/
|
|
2028
|
+
async importHTMLBookmarkFile(_import, options) {
|
|
2029
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.importHTMLBookmarkFile(_import, options);
|
|
2030
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2031
|
+
const localVarOperationServerBasePath = operationServerMap["ImportApi.importHTMLBookmarkFile"]?.[localVarOperationServerIndex]?.url;
|
|
2032
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2033
|
+
},
|
|
2034
|
+
/**
|
|
2035
|
+
*
|
|
2036
|
+
* @param {string} [url]
|
|
2037
|
+
* @param {*} [options] Override http request option.
|
|
2038
|
+
* @throws {RequiredError}
|
|
2039
|
+
*/
|
|
2040
|
+
async parseURL(url, options) {
|
|
2041
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.parseURL(url, options);
|
|
2042
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2043
|
+
const localVarOperationServerBasePath = operationServerMap["ImportApi.parseURL"]?.[localVarOperationServerIndex]?.url;
|
|
2044
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
};
|
|
2048
|
+
var ImportApiFactory = function(configuration, basePath, axios2) {
|
|
2049
|
+
const localVarFp = ImportApiFp(configuration);
|
|
2050
|
+
return {
|
|
2051
|
+
/**
|
|
2052
|
+
*
|
|
2053
|
+
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
2054
|
+
* @param {*} [options] Override http request option.
|
|
2055
|
+
* @throws {RequiredError}
|
|
2056
|
+
*/
|
|
2057
|
+
checkURLsExist(checkURLsExistRequest, options) {
|
|
2058
|
+
return localVarFp.checkURLsExist(checkURLsExistRequest, options).then((request) => request(axios2, basePath));
|
|
2059
|
+
},
|
|
2060
|
+
/**
|
|
2061
|
+
*
|
|
2062
|
+
* @param {File} [_import]
|
|
2063
|
+
* @param {*} [options] Override http request option.
|
|
2064
|
+
* @throws {RequiredError}
|
|
2065
|
+
*/
|
|
2066
|
+
importHTMLBookmarkFile(_import, options) {
|
|
2067
|
+
return localVarFp.importHTMLBookmarkFile(_import, options).then((request) => request(axios2, basePath));
|
|
2068
|
+
},
|
|
2069
|
+
/**
|
|
2070
|
+
*
|
|
2071
|
+
* @param {string} [url]
|
|
2072
|
+
* @param {*} [options] Override http request option.
|
|
2073
|
+
* @throws {RequiredError}
|
|
2074
|
+
*/
|
|
2075
|
+
parseURL(url, options) {
|
|
2076
|
+
return localVarFp.parseURL(url, options).then((request) => request(axios2, basePath));
|
|
2077
|
+
}
|
|
2078
|
+
};
|
|
2079
|
+
};
|
|
2080
|
+
var ImportApi = class extends BaseAPI {
|
|
2081
|
+
/**
|
|
2082
|
+
*
|
|
2083
|
+
* @param {CheckURLsExistRequest} [checkURLsExistRequest]
|
|
2084
|
+
* @param {*} [options] Override http request option.
|
|
2085
|
+
* @throws {RequiredError}
|
|
2086
|
+
* @memberof ImportApi
|
|
2087
|
+
*/
|
|
2088
|
+
checkURLsExist(checkURLsExistRequest, options) {
|
|
2089
|
+
return ImportApiFp(this.configuration).checkURLsExist(checkURLsExistRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2090
|
+
}
|
|
2091
|
+
/**
|
|
2092
|
+
*
|
|
2093
|
+
* @param {File} [_import]
|
|
2094
|
+
* @param {*} [options] Override http request option.
|
|
2095
|
+
* @throws {RequiredError}
|
|
2096
|
+
* @memberof ImportApi
|
|
2097
|
+
*/
|
|
2098
|
+
importHTMLBookmarkFile(_import, options) {
|
|
2099
|
+
return ImportApiFp(this.configuration).importHTMLBookmarkFile(_import, options).then((request) => request(this.axios, this.basePath));
|
|
2100
|
+
}
|
|
2101
|
+
/**
|
|
2102
|
+
*
|
|
2103
|
+
* @param {string} [url]
|
|
2104
|
+
* @param {*} [options] Override http request option.
|
|
2105
|
+
* @throws {RequiredError}
|
|
2106
|
+
* @memberof ImportApi
|
|
2107
|
+
*/
|
|
2108
|
+
parseURL(url, options) {
|
|
2109
|
+
return ImportApiFp(this.configuration).parseURL(url, options).then((request) => request(this.axios, this.basePath));
|
|
2110
|
+
}
|
|
2111
|
+
};
|
|
2112
|
+
var RaindropApiAxiosParamCreator = function(configuration) {
|
|
2113
|
+
return {
|
|
2114
|
+
/**
|
|
2115
|
+
*
|
|
2116
|
+
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
2117
|
+
* @param {*} [options] Override http request option.
|
|
2118
|
+
* @throws {RequiredError}
|
|
2119
|
+
*/
|
|
2120
|
+
createRaindrop: async (createRaindropRequest, options = {}) => {
|
|
2121
|
+
const localVarPath = `/rest/v1/raindrop`;
|
|
2122
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2123
|
+
let baseOptions;
|
|
2124
|
+
if (configuration) {
|
|
2125
|
+
baseOptions = configuration.baseOptions;
|
|
2126
|
+
}
|
|
2127
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
2128
|
+
const localVarHeaderParameter = {};
|
|
2129
|
+
const localVarQueryParameter = {};
|
|
2130
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2131
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
2132
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2133
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2134
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2135
|
+
localVarRequestOptions.data = serializeDataIfNeeded(createRaindropRequest, localVarRequestOptions, configuration);
|
|
2136
|
+
return {
|
|
2137
|
+
url: toPathString(localVarUrlObj),
|
|
2138
|
+
options: localVarRequestOptions
|
|
2139
|
+
};
|
|
2140
|
+
},
|
|
2141
|
+
/**
|
|
2142
|
+
*
|
|
2143
|
+
* @param {object} [body]
|
|
2144
|
+
* @param {*} [options] Override http request option.
|
|
2145
|
+
* @throws {RequiredError}
|
|
2146
|
+
*/
|
|
2147
|
+
createRaindrops: async (body, options = {}) => {
|
|
2148
|
+
const localVarPath = `/rest/v1/raindrops`;
|
|
2149
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2150
|
+
let baseOptions;
|
|
2151
|
+
if (configuration) {
|
|
2152
|
+
baseOptions = configuration.baseOptions;
|
|
2153
|
+
}
|
|
2154
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
2155
|
+
const localVarHeaderParameter = {};
|
|
2156
|
+
const localVarQueryParameter = {};
|
|
2157
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2158
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
2159
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2160
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2161
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2162
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
2163
|
+
return {
|
|
2164
|
+
url: toPathString(localVarUrlObj),
|
|
2165
|
+
options: localVarRequestOptions
|
|
2166
|
+
};
|
|
2167
|
+
},
|
|
2168
|
+
/**
|
|
2169
|
+
*
|
|
2170
|
+
* @param {number} id
|
|
2171
|
+
* @param {*} [options] Override http request option.
|
|
2172
|
+
* @throws {RequiredError}
|
|
2173
|
+
*/
|
|
2174
|
+
getPermanentCopy: async (id, options = {}) => {
|
|
2175
|
+
assertParamExists("getPermanentCopy", "id", id);
|
|
2176
|
+
const localVarPath = `/rest/v1/raindrop/{id}/cache`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2177
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2178
|
+
let baseOptions;
|
|
2179
|
+
if (configuration) {
|
|
2180
|
+
baseOptions = configuration.baseOptions;
|
|
2181
|
+
}
|
|
2182
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
2183
|
+
const localVarHeaderParameter = {};
|
|
2184
|
+
const localVarQueryParameter = {};
|
|
2185
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2186
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2187
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2188
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2189
|
+
return {
|
|
2190
|
+
url: toPathString(localVarUrlObj),
|
|
2191
|
+
options: localVarRequestOptions
|
|
2192
|
+
};
|
|
2193
|
+
},
|
|
2194
|
+
/**
|
|
2195
|
+
*
|
|
2196
|
+
* @param {number} id
|
|
2197
|
+
* @param {*} [options] Override http request option.
|
|
2198
|
+
* @throws {RequiredError}
|
|
2199
|
+
*/
|
|
2200
|
+
getRaindrop: async (id, options = {}) => {
|
|
2201
|
+
assertParamExists("getRaindrop", "id", id);
|
|
2202
|
+
const localVarPath = `/rest/v1/raindrop/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2203
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2204
|
+
let baseOptions;
|
|
2205
|
+
if (configuration) {
|
|
2206
|
+
baseOptions = configuration.baseOptions;
|
|
2207
|
+
}
|
|
2208
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
2209
|
+
const localVarHeaderParameter = {};
|
|
2210
|
+
const localVarQueryParameter = {};
|
|
2211
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2212
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2213
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2214
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2215
|
+
return {
|
|
2216
|
+
url: toPathString(localVarUrlObj),
|
|
2217
|
+
options: localVarRequestOptions
|
|
2218
|
+
};
|
|
2219
|
+
},
|
|
2220
|
+
/**
|
|
2221
|
+
*
|
|
2222
|
+
* @param {number} collectionId
|
|
2223
|
+
* @param {string} [sort]
|
|
2224
|
+
* @param {number} [perpage]
|
|
2225
|
+
* @param {number} [page]
|
|
2226
|
+
* @param {string} [search]
|
|
2227
|
+
* @param {*} [options] Override http request option.
|
|
2228
|
+
* @throws {RequiredError}
|
|
2229
|
+
*/
|
|
2230
|
+
getRaindrops: async (collectionId, sort, perpage, page, search, options = {}) => {
|
|
2231
|
+
assertParamExists("getRaindrops", "collectionId", collectionId);
|
|
2232
|
+
const localVarPath = `/rest/v1/raindrops/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
2233
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2234
|
+
let baseOptions;
|
|
2235
|
+
if (configuration) {
|
|
2236
|
+
baseOptions = configuration.baseOptions;
|
|
2237
|
+
}
|
|
2238
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
2239
|
+
const localVarHeaderParameter = {};
|
|
2240
|
+
const localVarQueryParameter = {};
|
|
2241
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2242
|
+
if (sort !== void 0) {
|
|
2243
|
+
localVarQueryParameter["sort"] = sort;
|
|
2244
|
+
}
|
|
2245
|
+
if (perpage !== void 0) {
|
|
2246
|
+
localVarQueryParameter["perpage"] = perpage;
|
|
2247
|
+
}
|
|
2248
|
+
if (page !== void 0) {
|
|
2249
|
+
localVarQueryParameter["page"] = page;
|
|
2250
|
+
}
|
|
2251
|
+
if (search !== void 0) {
|
|
2252
|
+
localVarQueryParameter["search"] = search;
|
|
2253
|
+
}
|
|
2254
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2255
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2256
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2257
|
+
return {
|
|
2258
|
+
url: toPathString(localVarUrlObj),
|
|
2259
|
+
options: localVarRequestOptions
|
|
2260
|
+
};
|
|
2261
|
+
},
|
|
2262
|
+
/**
|
|
2263
|
+
*
|
|
2264
|
+
* @param {number} id
|
|
2265
|
+
* @param {*} [options] Override http request option.
|
|
2266
|
+
* @throws {RequiredError}
|
|
2267
|
+
*/
|
|
2268
|
+
removeRaindrop: async (id, options = {}) => {
|
|
2269
|
+
assertParamExists("removeRaindrop", "id", id);
|
|
2270
|
+
const localVarPath = `/rest/v1/raindrop/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2271
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2272
|
+
let baseOptions;
|
|
2273
|
+
if (configuration) {
|
|
2274
|
+
baseOptions = configuration.baseOptions;
|
|
2275
|
+
}
|
|
2276
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
2277
|
+
const localVarHeaderParameter = {};
|
|
2278
|
+
const localVarQueryParameter = {};
|
|
2279
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2280
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2281
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2282
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2283
|
+
return {
|
|
2284
|
+
url: toPathString(localVarUrlObj),
|
|
2285
|
+
options: localVarRequestOptions
|
|
2286
|
+
};
|
|
2287
|
+
},
|
|
2288
|
+
/**
|
|
2289
|
+
*
|
|
2290
|
+
* @param {number} collectionId
|
|
2291
|
+
* @param {string} [search]
|
|
2292
|
+
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
2293
|
+
* @param {*} [options] Override http request option.
|
|
2294
|
+
* @throws {RequiredError}
|
|
2295
|
+
*/
|
|
2296
|
+
removeRaindrops: async (collectionId, search, removeRaindropsRequest, options = {}) => {
|
|
2297
|
+
assertParamExists("removeRaindrops", "collectionId", collectionId);
|
|
2298
|
+
const localVarPath = `/rest/v1/raindrops/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
2299
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2300
|
+
let baseOptions;
|
|
2301
|
+
if (configuration) {
|
|
2302
|
+
baseOptions = configuration.baseOptions;
|
|
2303
|
+
}
|
|
2304
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
2305
|
+
const localVarHeaderParameter = {};
|
|
2306
|
+
const localVarQueryParameter = {};
|
|
2307
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2308
|
+
if (search !== void 0) {
|
|
2309
|
+
localVarQueryParameter["search"] = search;
|
|
2310
|
+
}
|
|
2311
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
2312
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2313
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2314
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2315
|
+
localVarRequestOptions.data = serializeDataIfNeeded(removeRaindropsRequest, localVarRequestOptions, configuration);
|
|
2316
|
+
return {
|
|
2317
|
+
url: toPathString(localVarUrlObj),
|
|
2318
|
+
options: localVarRequestOptions
|
|
2319
|
+
};
|
|
2320
|
+
},
|
|
2321
|
+
/**
|
|
2322
|
+
*
|
|
2323
|
+
* @param {number} id
|
|
2324
|
+
* @param {*} [options] Override http request option.
|
|
2325
|
+
* @throws {RequiredError}
|
|
2326
|
+
*/
|
|
2327
|
+
suggestForExistingBookmark: async (id, options = {}) => {
|
|
2328
|
+
assertParamExists("suggestForExistingBookmark", "id", id);
|
|
2329
|
+
const localVarPath = `/rest/v1/raindrop/{id}/suggest`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2330
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2331
|
+
let baseOptions;
|
|
2332
|
+
if (configuration) {
|
|
2333
|
+
baseOptions = configuration.baseOptions;
|
|
2334
|
+
}
|
|
2335
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
2336
|
+
const localVarHeaderParameter = {};
|
|
2337
|
+
const localVarQueryParameter = {};
|
|
2338
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2339
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2340
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2341
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2342
|
+
return {
|
|
2343
|
+
url: toPathString(localVarUrlObj),
|
|
2344
|
+
options: localVarRequestOptions
|
|
2345
|
+
};
|
|
2346
|
+
},
|
|
2347
|
+
/**
|
|
2348
|
+
*
|
|
2349
|
+
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
2350
|
+
* @param {*} [options] Override http request option.
|
|
2351
|
+
* @throws {RequiredError}
|
|
2352
|
+
*/
|
|
2353
|
+
suggestForNewBookmark: async (suggestForNewBookmarkRequest, options = {}) => {
|
|
2354
|
+
const localVarPath = `/rest/v1/raindrop/suggest`;
|
|
2355
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2356
|
+
let baseOptions;
|
|
2357
|
+
if (configuration) {
|
|
2358
|
+
baseOptions = configuration.baseOptions;
|
|
2359
|
+
}
|
|
2360
|
+
const localVarRequestOptions = { method: "POST", ...baseOptions, ...options };
|
|
2361
|
+
const localVarHeaderParameter = {};
|
|
2362
|
+
const localVarQueryParameter = {};
|
|
2363
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2364
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
2365
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2366
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2367
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2368
|
+
localVarRequestOptions.data = serializeDataIfNeeded(suggestForNewBookmarkRequest, localVarRequestOptions, configuration);
|
|
2369
|
+
return {
|
|
2370
|
+
url: toPathString(localVarUrlObj),
|
|
2371
|
+
options: localVarRequestOptions
|
|
2372
|
+
};
|
|
2373
|
+
},
|
|
2374
|
+
/**
|
|
2375
|
+
*
|
|
2376
|
+
* @param {number} id
|
|
2377
|
+
* @param {object} [body]
|
|
2378
|
+
* @param {*} [options] Override http request option.
|
|
2379
|
+
* @throws {RequiredError}
|
|
2380
|
+
*/
|
|
2381
|
+
updateRaindrop: async (id, body, options = {}) => {
|
|
2382
|
+
assertParamExists("updateRaindrop", "id", id);
|
|
2383
|
+
const localVarPath = `/rest/v1/raindrop/{id}`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2384
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2385
|
+
let baseOptions;
|
|
2386
|
+
if (configuration) {
|
|
2387
|
+
baseOptions = configuration.baseOptions;
|
|
2388
|
+
}
|
|
2389
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
2390
|
+
const localVarHeaderParameter = {};
|
|
2391
|
+
const localVarQueryParameter = {};
|
|
2392
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2393
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
2394
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2395
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2396
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2397
|
+
localVarRequestOptions.data = serializeDataIfNeeded(body, localVarRequestOptions, configuration);
|
|
2398
|
+
return {
|
|
2399
|
+
url: toPathString(localVarUrlObj),
|
|
2400
|
+
options: localVarRequestOptions
|
|
2401
|
+
};
|
|
2402
|
+
},
|
|
2403
|
+
/**
|
|
2404
|
+
*
|
|
2405
|
+
* @param {number} collectionId
|
|
2406
|
+
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
2407
|
+
* @param {*} [options] Override http request option.
|
|
2408
|
+
* @throws {RequiredError}
|
|
2409
|
+
*/
|
|
2410
|
+
updateRaindrops: async (collectionId, updateRaindropsRequest, options = {}) => {
|
|
2411
|
+
assertParamExists("updateRaindrops", "collectionId", collectionId);
|
|
2412
|
+
const localVarPath = `/rest/v1/raindrops/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
2413
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2414
|
+
let baseOptions;
|
|
2415
|
+
if (configuration) {
|
|
2416
|
+
baseOptions = configuration.baseOptions;
|
|
2417
|
+
}
|
|
2418
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
2419
|
+
const localVarHeaderParameter = {};
|
|
2420
|
+
const localVarQueryParameter = {};
|
|
2421
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2422
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
2423
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2424
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2425
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2426
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateRaindropsRequest, localVarRequestOptions, configuration);
|
|
2427
|
+
return {
|
|
2428
|
+
url: toPathString(localVarUrlObj),
|
|
2429
|
+
options: localVarRequestOptions
|
|
2430
|
+
};
|
|
2431
|
+
},
|
|
2432
|
+
/**
|
|
2433
|
+
*
|
|
2434
|
+
* @param {File} [file]
|
|
2435
|
+
* @param {number} [collectionId]
|
|
2436
|
+
* @param {*} [options] Override http request option.
|
|
2437
|
+
* @throws {RequiredError}
|
|
2438
|
+
*/
|
|
2439
|
+
uploadFile: async (file, collectionId, options = {}) => {
|
|
2440
|
+
const localVarPath = `/rest/v1/raindrop/file`;
|
|
2441
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2442
|
+
let baseOptions;
|
|
2443
|
+
if (configuration) {
|
|
2444
|
+
baseOptions = configuration.baseOptions;
|
|
2445
|
+
}
|
|
2446
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
2447
|
+
const localVarHeaderParameter = {};
|
|
2448
|
+
const localVarQueryParameter = {};
|
|
2449
|
+
const localVarFormParams = new (configuration && configuration.formDataCtor || FormData)();
|
|
2450
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2451
|
+
if (file !== void 0) {
|
|
2452
|
+
localVarFormParams.append("file", file);
|
|
2453
|
+
}
|
|
2454
|
+
if (collectionId !== void 0) {
|
|
2455
|
+
localVarFormParams.append("collectionId", collectionId);
|
|
2456
|
+
}
|
|
2457
|
+
localVarHeaderParameter["Content-Type"] = "multipart/form-data";
|
|
2458
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2459
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2460
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2461
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
2462
|
+
return {
|
|
2463
|
+
url: toPathString(localVarUrlObj),
|
|
2464
|
+
options: localVarRequestOptions
|
|
2465
|
+
};
|
|
2466
|
+
},
|
|
2467
|
+
/**
|
|
2468
|
+
*
|
|
2469
|
+
* @param {number} id
|
|
2470
|
+
* @param {File} [cover]
|
|
2471
|
+
* @param {*} [options] Override http request option.
|
|
2472
|
+
* @throws {RequiredError}
|
|
2473
|
+
*/
|
|
2474
|
+
uploadRaindropCover: async (id, cover, options = {}) => {
|
|
2475
|
+
assertParamExists("uploadRaindropCover", "id", id);
|
|
2476
|
+
const localVarPath = `/rest/v1/raindrop/{id}/cover`.replace(`{${"id"}}`, encodeURIComponent(String(id)));
|
|
2477
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2478
|
+
let baseOptions;
|
|
2479
|
+
if (configuration) {
|
|
2480
|
+
baseOptions = configuration.baseOptions;
|
|
2481
|
+
}
|
|
2482
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
2483
|
+
const localVarHeaderParameter = {};
|
|
2484
|
+
const localVarQueryParameter = {};
|
|
2485
|
+
const localVarFormParams = new (configuration && configuration.formDataCtor || FormData)();
|
|
2486
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2487
|
+
if (cover !== void 0) {
|
|
2488
|
+
localVarFormParams.append("cover", cover);
|
|
2489
|
+
}
|
|
2490
|
+
localVarHeaderParameter["Content-Type"] = "multipart/form-data";
|
|
2491
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2492
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2493
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2494
|
+
localVarRequestOptions.data = localVarFormParams;
|
|
2495
|
+
return {
|
|
2496
|
+
url: toPathString(localVarUrlObj),
|
|
2497
|
+
options: localVarRequestOptions
|
|
2498
|
+
};
|
|
2499
|
+
}
|
|
2500
|
+
};
|
|
2501
|
+
};
|
|
2502
|
+
var RaindropApiFp = function(configuration) {
|
|
2503
|
+
const localVarAxiosParamCreator = RaindropApiAxiosParamCreator(configuration);
|
|
2504
|
+
return {
|
|
2505
|
+
/**
|
|
2506
|
+
*
|
|
2507
|
+
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
2508
|
+
* @param {*} [options] Override http request option.
|
|
2509
|
+
* @throws {RequiredError}
|
|
2510
|
+
*/
|
|
2511
|
+
async createRaindrop(createRaindropRequest, options) {
|
|
2512
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRaindrop(createRaindropRequest, options);
|
|
2513
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2514
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.createRaindrop"]?.[localVarOperationServerIndex]?.url;
|
|
2515
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2516
|
+
},
|
|
2517
|
+
/**
|
|
2518
|
+
*
|
|
2519
|
+
* @param {object} [body]
|
|
2520
|
+
* @param {*} [options] Override http request option.
|
|
2521
|
+
* @throws {RequiredError}
|
|
2522
|
+
*/
|
|
2523
|
+
async createRaindrops(body, options) {
|
|
2524
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.createRaindrops(body, options);
|
|
2525
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2526
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.createRaindrops"]?.[localVarOperationServerIndex]?.url;
|
|
2527
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2528
|
+
},
|
|
2529
|
+
/**
|
|
2530
|
+
*
|
|
2531
|
+
* @param {number} id
|
|
2532
|
+
* @param {*} [options] Override http request option.
|
|
2533
|
+
* @throws {RequiredError}
|
|
2534
|
+
*/
|
|
2535
|
+
async getPermanentCopy(id, options) {
|
|
2536
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPermanentCopy(id, options);
|
|
2537
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2538
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.getPermanentCopy"]?.[localVarOperationServerIndex]?.url;
|
|
2539
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2540
|
+
},
|
|
2541
|
+
/**
|
|
2542
|
+
*
|
|
2543
|
+
* @param {number} id
|
|
2544
|
+
* @param {*} [options] Override http request option.
|
|
2545
|
+
* @throws {RequiredError}
|
|
2546
|
+
*/
|
|
2547
|
+
async getRaindrop(id, options) {
|
|
2548
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRaindrop(id, options);
|
|
2549
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2550
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.getRaindrop"]?.[localVarOperationServerIndex]?.url;
|
|
2551
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2552
|
+
},
|
|
2553
|
+
/**
|
|
2554
|
+
*
|
|
2555
|
+
* @param {number} collectionId
|
|
2556
|
+
* @param {string} [sort]
|
|
2557
|
+
* @param {number} [perpage]
|
|
2558
|
+
* @param {number} [page]
|
|
2559
|
+
* @param {string} [search]
|
|
2560
|
+
* @param {*} [options] Override http request option.
|
|
2561
|
+
* @throws {RequiredError}
|
|
2562
|
+
*/
|
|
2563
|
+
async getRaindrops(collectionId, sort, perpage, page, search, options) {
|
|
2564
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getRaindrops(collectionId, sort, perpage, page, search, options);
|
|
2565
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2566
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.getRaindrops"]?.[localVarOperationServerIndex]?.url;
|
|
2567
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2568
|
+
},
|
|
2569
|
+
/**
|
|
2570
|
+
*
|
|
2571
|
+
* @param {number} id
|
|
2572
|
+
* @param {*} [options] Override http request option.
|
|
2573
|
+
* @throws {RequiredError}
|
|
2574
|
+
*/
|
|
2575
|
+
async removeRaindrop(id, options) {
|
|
2576
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeRaindrop(id, options);
|
|
2577
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2578
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.removeRaindrop"]?.[localVarOperationServerIndex]?.url;
|
|
2579
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2580
|
+
},
|
|
2581
|
+
/**
|
|
2582
|
+
*
|
|
2583
|
+
* @param {number} collectionId
|
|
2584
|
+
* @param {string} [search]
|
|
2585
|
+
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
2586
|
+
* @param {*} [options] Override http request option.
|
|
2587
|
+
* @throws {RequiredError}
|
|
2588
|
+
*/
|
|
2589
|
+
async removeRaindrops(collectionId, search, removeRaindropsRequest, options) {
|
|
2590
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeRaindrops(collectionId, search, removeRaindropsRequest, options);
|
|
2591
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2592
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.removeRaindrops"]?.[localVarOperationServerIndex]?.url;
|
|
2593
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2594
|
+
},
|
|
2595
|
+
/**
|
|
2596
|
+
*
|
|
2597
|
+
* @param {number} id
|
|
2598
|
+
* @param {*} [options] Override http request option.
|
|
2599
|
+
* @throws {RequiredError}
|
|
2600
|
+
*/
|
|
2601
|
+
async suggestForExistingBookmark(id, options) {
|
|
2602
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.suggestForExistingBookmark(id, options);
|
|
2603
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2604
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.suggestForExistingBookmark"]?.[localVarOperationServerIndex]?.url;
|
|
2605
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2606
|
+
},
|
|
2607
|
+
/**
|
|
2608
|
+
*
|
|
2609
|
+
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
2610
|
+
* @param {*} [options] Override http request option.
|
|
2611
|
+
* @throws {RequiredError}
|
|
2612
|
+
*/
|
|
2613
|
+
async suggestForNewBookmark(suggestForNewBookmarkRequest, options) {
|
|
2614
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.suggestForNewBookmark(suggestForNewBookmarkRequest, options);
|
|
2615
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2616
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.suggestForNewBookmark"]?.[localVarOperationServerIndex]?.url;
|
|
2617
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2618
|
+
},
|
|
2619
|
+
/**
|
|
2620
|
+
*
|
|
2621
|
+
* @param {number} id
|
|
2622
|
+
* @param {object} [body]
|
|
2623
|
+
* @param {*} [options] Override http request option.
|
|
2624
|
+
* @throws {RequiredError}
|
|
2625
|
+
*/
|
|
2626
|
+
async updateRaindrop(id, body, options) {
|
|
2627
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateRaindrop(id, body, options);
|
|
2628
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2629
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.updateRaindrop"]?.[localVarOperationServerIndex]?.url;
|
|
2630
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2631
|
+
},
|
|
2632
|
+
/**
|
|
2633
|
+
*
|
|
2634
|
+
* @param {number} collectionId
|
|
2635
|
+
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
2636
|
+
* @param {*} [options] Override http request option.
|
|
2637
|
+
* @throws {RequiredError}
|
|
2638
|
+
*/
|
|
2639
|
+
async updateRaindrops(collectionId, updateRaindropsRequest, options) {
|
|
2640
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateRaindrops(collectionId, updateRaindropsRequest, options);
|
|
2641
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2642
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.updateRaindrops"]?.[localVarOperationServerIndex]?.url;
|
|
2643
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2644
|
+
},
|
|
2645
|
+
/**
|
|
2646
|
+
*
|
|
2647
|
+
* @param {File} [file]
|
|
2648
|
+
* @param {number} [collectionId]
|
|
2649
|
+
* @param {*} [options] Override http request option.
|
|
2650
|
+
* @throws {RequiredError}
|
|
2651
|
+
*/
|
|
2652
|
+
async uploadFile(file, collectionId, options) {
|
|
2653
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadFile(file, collectionId, options);
|
|
2654
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2655
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.uploadFile"]?.[localVarOperationServerIndex]?.url;
|
|
2656
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2657
|
+
},
|
|
2658
|
+
/**
|
|
2659
|
+
*
|
|
2660
|
+
* @param {number} id
|
|
2661
|
+
* @param {File} [cover]
|
|
2662
|
+
* @param {*} [options] Override http request option.
|
|
2663
|
+
* @throws {RequiredError}
|
|
2664
|
+
*/
|
|
2665
|
+
async uploadRaindropCover(id, cover, options) {
|
|
2666
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.uploadRaindropCover(id, cover, options);
|
|
2667
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
2668
|
+
const localVarOperationServerBasePath = operationServerMap["RaindropApi.uploadRaindropCover"]?.[localVarOperationServerIndex]?.url;
|
|
2669
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
2670
|
+
}
|
|
2671
|
+
};
|
|
2672
|
+
};
|
|
2673
|
+
var RaindropApiFactory = function(configuration, basePath, axios2) {
|
|
2674
|
+
const localVarFp = RaindropApiFp(configuration);
|
|
2675
|
+
return {
|
|
2676
|
+
/**
|
|
2677
|
+
*
|
|
2678
|
+
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
2679
|
+
* @param {*} [options] Override http request option.
|
|
2680
|
+
* @throws {RequiredError}
|
|
2681
|
+
*/
|
|
2682
|
+
createRaindrop(createRaindropRequest, options) {
|
|
2683
|
+
return localVarFp.createRaindrop(createRaindropRequest, options).then((request) => request(axios2, basePath));
|
|
2684
|
+
},
|
|
2685
|
+
/**
|
|
2686
|
+
*
|
|
2687
|
+
* @param {object} [body]
|
|
2688
|
+
* @param {*} [options] Override http request option.
|
|
2689
|
+
* @throws {RequiredError}
|
|
2690
|
+
*/
|
|
2691
|
+
createRaindrops(body, options) {
|
|
2692
|
+
return localVarFp.createRaindrops(body, options).then((request) => request(axios2, basePath));
|
|
2693
|
+
},
|
|
2694
|
+
/**
|
|
2695
|
+
*
|
|
2696
|
+
* @param {number} id
|
|
2697
|
+
* @param {*} [options] Override http request option.
|
|
2698
|
+
* @throws {RequiredError}
|
|
2699
|
+
*/
|
|
2700
|
+
getPermanentCopy(id, options) {
|
|
2701
|
+
return localVarFp.getPermanentCopy(id, options).then((request) => request(axios2, basePath));
|
|
2702
|
+
},
|
|
2703
|
+
/**
|
|
2704
|
+
*
|
|
2705
|
+
* @param {number} id
|
|
2706
|
+
* @param {*} [options] Override http request option.
|
|
2707
|
+
* @throws {RequiredError}
|
|
2708
|
+
*/
|
|
2709
|
+
getRaindrop(id, options) {
|
|
2710
|
+
return localVarFp.getRaindrop(id, options).then((request) => request(axios2, basePath));
|
|
2711
|
+
},
|
|
2712
|
+
/**
|
|
2713
|
+
*
|
|
2714
|
+
* @param {number} collectionId
|
|
2715
|
+
* @param {string} [sort]
|
|
2716
|
+
* @param {number} [perpage]
|
|
2717
|
+
* @param {number} [page]
|
|
2718
|
+
* @param {string} [search]
|
|
2719
|
+
* @param {*} [options] Override http request option.
|
|
2720
|
+
* @throws {RequiredError}
|
|
2721
|
+
*/
|
|
2722
|
+
getRaindrops(collectionId, sort, perpage, page, search, options) {
|
|
2723
|
+
return localVarFp.getRaindrops(collectionId, sort, perpage, page, search, options).then((request) => request(axios2, basePath));
|
|
2724
|
+
},
|
|
2725
|
+
/**
|
|
2726
|
+
*
|
|
2727
|
+
* @param {number} id
|
|
2728
|
+
* @param {*} [options] Override http request option.
|
|
2729
|
+
* @throws {RequiredError}
|
|
2730
|
+
*/
|
|
2731
|
+
removeRaindrop(id, options) {
|
|
2732
|
+
return localVarFp.removeRaindrop(id, options).then((request) => request(axios2, basePath));
|
|
2733
|
+
},
|
|
2734
|
+
/**
|
|
2735
|
+
*
|
|
2736
|
+
* @param {number} collectionId
|
|
2737
|
+
* @param {string} [search]
|
|
2738
|
+
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
2739
|
+
* @param {*} [options] Override http request option.
|
|
2740
|
+
* @throws {RequiredError}
|
|
2741
|
+
*/
|
|
2742
|
+
removeRaindrops(collectionId, search, removeRaindropsRequest, options) {
|
|
2743
|
+
return localVarFp.removeRaindrops(collectionId, search, removeRaindropsRequest, options).then((request) => request(axios2, basePath));
|
|
2744
|
+
},
|
|
2745
|
+
/**
|
|
2746
|
+
*
|
|
2747
|
+
* @param {number} id
|
|
2748
|
+
* @param {*} [options] Override http request option.
|
|
2749
|
+
* @throws {RequiredError}
|
|
2750
|
+
*/
|
|
2751
|
+
suggestForExistingBookmark(id, options) {
|
|
2752
|
+
return localVarFp.suggestForExistingBookmark(id, options).then((request) => request(axios2, basePath));
|
|
2753
|
+
},
|
|
2754
|
+
/**
|
|
2755
|
+
*
|
|
2756
|
+
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
2757
|
+
* @param {*} [options] Override http request option.
|
|
2758
|
+
* @throws {RequiredError}
|
|
2759
|
+
*/
|
|
2760
|
+
suggestForNewBookmark(suggestForNewBookmarkRequest, options) {
|
|
2761
|
+
return localVarFp.suggestForNewBookmark(suggestForNewBookmarkRequest, options).then((request) => request(axios2, basePath));
|
|
2762
|
+
},
|
|
2763
|
+
/**
|
|
2764
|
+
*
|
|
2765
|
+
* @param {number} id
|
|
2766
|
+
* @param {object} [body]
|
|
2767
|
+
* @param {*} [options] Override http request option.
|
|
2768
|
+
* @throws {RequiredError}
|
|
2769
|
+
*/
|
|
2770
|
+
updateRaindrop(id, body, options) {
|
|
2771
|
+
return localVarFp.updateRaindrop(id, body, options).then((request) => request(axios2, basePath));
|
|
2772
|
+
},
|
|
2773
|
+
/**
|
|
2774
|
+
*
|
|
2775
|
+
* @param {number} collectionId
|
|
2776
|
+
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
2777
|
+
* @param {*} [options] Override http request option.
|
|
2778
|
+
* @throws {RequiredError}
|
|
2779
|
+
*/
|
|
2780
|
+
updateRaindrops(collectionId, updateRaindropsRequest, options) {
|
|
2781
|
+
return localVarFp.updateRaindrops(collectionId, updateRaindropsRequest, options).then((request) => request(axios2, basePath));
|
|
2782
|
+
},
|
|
2783
|
+
/**
|
|
2784
|
+
*
|
|
2785
|
+
* @param {File} [file]
|
|
2786
|
+
* @param {number} [collectionId]
|
|
2787
|
+
* @param {*} [options] Override http request option.
|
|
2788
|
+
* @throws {RequiredError}
|
|
2789
|
+
*/
|
|
2790
|
+
uploadFile(file, collectionId, options) {
|
|
2791
|
+
return localVarFp.uploadFile(file, collectionId, options).then((request) => request(axios2, basePath));
|
|
2792
|
+
},
|
|
2793
|
+
/**
|
|
2794
|
+
*
|
|
2795
|
+
* @param {number} id
|
|
2796
|
+
* @param {File} [cover]
|
|
2797
|
+
* @param {*} [options] Override http request option.
|
|
2798
|
+
* @throws {RequiredError}
|
|
2799
|
+
*/
|
|
2800
|
+
uploadRaindropCover(id, cover, options) {
|
|
2801
|
+
return localVarFp.uploadRaindropCover(id, cover, options).then((request) => request(axios2, basePath));
|
|
2802
|
+
}
|
|
2803
|
+
};
|
|
2804
|
+
};
|
|
2805
|
+
var RaindropApi = class extends BaseAPI {
|
|
2806
|
+
/**
|
|
2807
|
+
*
|
|
2808
|
+
* @param {CreateRaindropRequest} [createRaindropRequest]
|
|
2809
|
+
* @param {*} [options] Override http request option.
|
|
2810
|
+
* @throws {RequiredError}
|
|
2811
|
+
* @memberof RaindropApi
|
|
2812
|
+
*/
|
|
2813
|
+
createRaindrop(createRaindropRequest, options) {
|
|
2814
|
+
return RaindropApiFp(this.configuration).createRaindrop(createRaindropRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2815
|
+
}
|
|
2816
|
+
/**
|
|
2817
|
+
*
|
|
2818
|
+
* @param {object} [body]
|
|
2819
|
+
* @param {*} [options] Override http request option.
|
|
2820
|
+
* @throws {RequiredError}
|
|
2821
|
+
* @memberof RaindropApi
|
|
2822
|
+
*/
|
|
2823
|
+
createRaindrops(body, options) {
|
|
2824
|
+
return RaindropApiFp(this.configuration).createRaindrops(body, options).then((request) => request(this.axios, this.basePath));
|
|
2825
|
+
}
|
|
2826
|
+
/**
|
|
2827
|
+
*
|
|
2828
|
+
* @param {number} id
|
|
2829
|
+
* @param {*} [options] Override http request option.
|
|
2830
|
+
* @throws {RequiredError}
|
|
2831
|
+
* @memberof RaindropApi
|
|
2832
|
+
*/
|
|
2833
|
+
getPermanentCopy(id, options) {
|
|
2834
|
+
return RaindropApiFp(this.configuration).getPermanentCopy(id, options).then((request) => request(this.axios, this.basePath));
|
|
2835
|
+
}
|
|
2836
|
+
/**
|
|
2837
|
+
*
|
|
2838
|
+
* @param {number} id
|
|
2839
|
+
* @param {*} [options] Override http request option.
|
|
2840
|
+
* @throws {RequiredError}
|
|
2841
|
+
* @memberof RaindropApi
|
|
2842
|
+
*/
|
|
2843
|
+
getRaindrop(id, options) {
|
|
2844
|
+
return RaindropApiFp(this.configuration).getRaindrop(id, options).then((request) => request(this.axios, this.basePath));
|
|
2845
|
+
}
|
|
2846
|
+
/**
|
|
2847
|
+
*
|
|
2848
|
+
* @param {number} collectionId
|
|
2849
|
+
* @param {string} [sort]
|
|
2850
|
+
* @param {number} [perpage]
|
|
2851
|
+
* @param {number} [page]
|
|
2852
|
+
* @param {string} [search]
|
|
2853
|
+
* @param {*} [options] Override http request option.
|
|
2854
|
+
* @throws {RequiredError}
|
|
2855
|
+
* @memberof RaindropApi
|
|
2856
|
+
*/
|
|
2857
|
+
getRaindrops(collectionId, sort, perpage, page, search, options) {
|
|
2858
|
+
return RaindropApiFp(this.configuration).getRaindrops(collectionId, sort, perpage, page, search, options).then((request) => request(this.axios, this.basePath));
|
|
2859
|
+
}
|
|
2860
|
+
/**
|
|
2861
|
+
*
|
|
2862
|
+
* @param {number} id
|
|
2863
|
+
* @param {*} [options] Override http request option.
|
|
2864
|
+
* @throws {RequiredError}
|
|
2865
|
+
* @memberof RaindropApi
|
|
2866
|
+
*/
|
|
2867
|
+
removeRaindrop(id, options) {
|
|
2868
|
+
return RaindropApiFp(this.configuration).removeRaindrop(id, options).then((request) => request(this.axios, this.basePath));
|
|
2869
|
+
}
|
|
2870
|
+
/**
|
|
2871
|
+
*
|
|
2872
|
+
* @param {number} collectionId
|
|
2873
|
+
* @param {string} [search]
|
|
2874
|
+
* @param {RemoveRaindropsRequest} [removeRaindropsRequest]
|
|
2875
|
+
* @param {*} [options] Override http request option.
|
|
2876
|
+
* @throws {RequiredError}
|
|
2877
|
+
* @memberof RaindropApi
|
|
2878
|
+
*/
|
|
2879
|
+
removeRaindrops(collectionId, search, removeRaindropsRequest, options) {
|
|
2880
|
+
return RaindropApiFp(this.configuration).removeRaindrops(collectionId, search, removeRaindropsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2881
|
+
}
|
|
2882
|
+
/**
|
|
2883
|
+
*
|
|
2884
|
+
* @param {number} id
|
|
2885
|
+
* @param {*} [options] Override http request option.
|
|
2886
|
+
* @throws {RequiredError}
|
|
2887
|
+
* @memberof RaindropApi
|
|
2888
|
+
*/
|
|
2889
|
+
suggestForExistingBookmark(id, options) {
|
|
2890
|
+
return RaindropApiFp(this.configuration).suggestForExistingBookmark(id, options).then((request) => request(this.axios, this.basePath));
|
|
2891
|
+
}
|
|
2892
|
+
/**
|
|
2893
|
+
*
|
|
2894
|
+
* @param {SuggestForNewBookmarkRequest} [suggestForNewBookmarkRequest]
|
|
2895
|
+
* @param {*} [options] Override http request option.
|
|
2896
|
+
* @throws {RequiredError}
|
|
2897
|
+
* @memberof RaindropApi
|
|
2898
|
+
*/
|
|
2899
|
+
suggestForNewBookmark(suggestForNewBookmarkRequest, options) {
|
|
2900
|
+
return RaindropApiFp(this.configuration).suggestForNewBookmark(suggestForNewBookmarkRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2901
|
+
}
|
|
2902
|
+
/**
|
|
2903
|
+
*
|
|
2904
|
+
* @param {number} id
|
|
2905
|
+
* @param {object} [body]
|
|
2906
|
+
* @param {*} [options] Override http request option.
|
|
2907
|
+
* @throws {RequiredError}
|
|
2908
|
+
* @memberof RaindropApi
|
|
2909
|
+
*/
|
|
2910
|
+
updateRaindrop(id, body, options) {
|
|
2911
|
+
return RaindropApiFp(this.configuration).updateRaindrop(id, body, options).then((request) => request(this.axios, this.basePath));
|
|
2912
|
+
}
|
|
2913
|
+
/**
|
|
2914
|
+
*
|
|
2915
|
+
* @param {number} collectionId
|
|
2916
|
+
* @param {UpdateRaindropsRequest} [updateRaindropsRequest]
|
|
2917
|
+
* @param {*} [options] Override http request option.
|
|
2918
|
+
* @throws {RequiredError}
|
|
2919
|
+
* @memberof RaindropApi
|
|
2920
|
+
*/
|
|
2921
|
+
updateRaindrops(collectionId, updateRaindropsRequest, options) {
|
|
2922
|
+
return RaindropApiFp(this.configuration).updateRaindrops(collectionId, updateRaindropsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
2923
|
+
}
|
|
2924
|
+
/**
|
|
2925
|
+
*
|
|
2926
|
+
* @param {File} [file]
|
|
2927
|
+
* @param {number} [collectionId]
|
|
2928
|
+
* @param {*} [options] Override http request option.
|
|
2929
|
+
* @throws {RequiredError}
|
|
2930
|
+
* @memberof RaindropApi
|
|
2931
|
+
*/
|
|
2932
|
+
uploadFile(file, collectionId, options) {
|
|
2933
|
+
return RaindropApiFp(this.configuration).uploadFile(file, collectionId, options).then((request) => request(this.axios, this.basePath));
|
|
2934
|
+
}
|
|
2935
|
+
/**
|
|
2936
|
+
*
|
|
2937
|
+
* @param {number} id
|
|
2938
|
+
* @param {File} [cover]
|
|
2939
|
+
* @param {*} [options] Override http request option.
|
|
2940
|
+
* @throws {RequiredError}
|
|
2941
|
+
* @memberof RaindropApi
|
|
2942
|
+
*/
|
|
2943
|
+
uploadRaindropCover(id, cover, options) {
|
|
2944
|
+
return RaindropApiFp(this.configuration).uploadRaindropCover(id, cover, options).then((request) => request(this.axios, this.basePath));
|
|
2945
|
+
}
|
|
2946
|
+
};
|
|
2947
|
+
var TagApiAxiosParamCreator = function(configuration) {
|
|
2948
|
+
return {
|
|
2949
|
+
/**
|
|
2950
|
+
*
|
|
2951
|
+
* @param {number} [collectionId]
|
|
2952
|
+
* @param {*} [options] Override http request option.
|
|
2953
|
+
* @throws {RequiredError}
|
|
2954
|
+
*/
|
|
2955
|
+
getTagsInCollection: async (collectionId, options = {}) => {
|
|
2956
|
+
const localVarPath = `/rest/v1/tags/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
2957
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2958
|
+
let baseOptions;
|
|
2959
|
+
if (configuration) {
|
|
2960
|
+
baseOptions = configuration.baseOptions;
|
|
2961
|
+
}
|
|
2962
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
2963
|
+
const localVarHeaderParameter = {};
|
|
2964
|
+
const localVarQueryParameter = {};
|
|
2965
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2966
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2967
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2968
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2969
|
+
return {
|
|
2970
|
+
url: toPathString(localVarUrlObj),
|
|
2971
|
+
options: localVarRequestOptions
|
|
2972
|
+
};
|
|
2973
|
+
},
|
|
2974
|
+
/**
|
|
2975
|
+
*
|
|
2976
|
+
* @param {number} [collectionId]
|
|
2977
|
+
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
2978
|
+
* @param {*} [options] Override http request option.
|
|
2979
|
+
* @throws {RequiredError}
|
|
2980
|
+
*/
|
|
2981
|
+
removeTagsFromCollection: async (collectionId, removeTagsFromCollectionRequest, options = {}) => {
|
|
2982
|
+
const localVarPath = `/rest/v1/tags/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
2983
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
2984
|
+
let baseOptions;
|
|
2985
|
+
if (configuration) {
|
|
2986
|
+
baseOptions = configuration.baseOptions;
|
|
2987
|
+
}
|
|
2988
|
+
const localVarRequestOptions = { method: "DELETE", ...baseOptions, ...options };
|
|
2989
|
+
const localVarHeaderParameter = {};
|
|
2990
|
+
const localVarQueryParameter = {};
|
|
2991
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
2992
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
2993
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
2994
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
2995
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
2996
|
+
localVarRequestOptions.data = serializeDataIfNeeded(removeTagsFromCollectionRequest, localVarRequestOptions, configuration);
|
|
2997
|
+
return {
|
|
2998
|
+
url: toPathString(localVarUrlObj),
|
|
2999
|
+
options: localVarRequestOptions
|
|
3000
|
+
};
|
|
3001
|
+
},
|
|
3002
|
+
/**
|
|
3003
|
+
*
|
|
3004
|
+
* @param {number} [collectionId]
|
|
3005
|
+
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
3006
|
+
* @param {*} [options] Override http request option.
|
|
3007
|
+
* @throws {RequiredError}
|
|
3008
|
+
*/
|
|
3009
|
+
renameOrMergeTags: async (collectionId, renameOrMergeTagsRequest, options = {}) => {
|
|
3010
|
+
const localVarPath = `/rest/v1/tags/{collectionId}`.replace(`{${"collectionId"}}`, encodeURIComponent(String(collectionId)));
|
|
3011
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3012
|
+
let baseOptions;
|
|
3013
|
+
if (configuration) {
|
|
3014
|
+
baseOptions = configuration.baseOptions;
|
|
3015
|
+
}
|
|
3016
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3017
|
+
const localVarHeaderParameter = {};
|
|
3018
|
+
const localVarQueryParameter = {};
|
|
3019
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3020
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3021
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3022
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3023
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3024
|
+
localVarRequestOptions.data = serializeDataIfNeeded(renameOrMergeTagsRequest, localVarRequestOptions, configuration);
|
|
3025
|
+
return {
|
|
3026
|
+
url: toPathString(localVarUrlObj),
|
|
3027
|
+
options: localVarRequestOptions
|
|
3028
|
+
};
|
|
3029
|
+
}
|
|
3030
|
+
};
|
|
3031
|
+
};
|
|
3032
|
+
var TagApiFp = function(configuration) {
|
|
3033
|
+
const localVarAxiosParamCreator = TagApiAxiosParamCreator(configuration);
|
|
3034
|
+
return {
|
|
3035
|
+
/**
|
|
3036
|
+
*
|
|
3037
|
+
* @param {number} [collectionId]
|
|
3038
|
+
* @param {*} [options] Override http request option.
|
|
3039
|
+
* @throws {RequiredError}
|
|
3040
|
+
*/
|
|
3041
|
+
async getTagsInCollection(collectionId, options) {
|
|
3042
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getTagsInCollection(collectionId, options);
|
|
3043
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3044
|
+
const localVarOperationServerBasePath = operationServerMap["TagApi.getTagsInCollection"]?.[localVarOperationServerIndex]?.url;
|
|
3045
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3046
|
+
},
|
|
3047
|
+
/**
|
|
3048
|
+
*
|
|
3049
|
+
* @param {number} [collectionId]
|
|
3050
|
+
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
3051
|
+
* @param {*} [options] Override http request option.
|
|
3052
|
+
* @throws {RequiredError}
|
|
3053
|
+
*/
|
|
3054
|
+
async removeTagsFromCollection(collectionId, removeTagsFromCollectionRequest, options) {
|
|
3055
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.removeTagsFromCollection(collectionId, removeTagsFromCollectionRequest, options);
|
|
3056
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3057
|
+
const localVarOperationServerBasePath = operationServerMap["TagApi.removeTagsFromCollection"]?.[localVarOperationServerIndex]?.url;
|
|
3058
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3059
|
+
},
|
|
3060
|
+
/**
|
|
3061
|
+
*
|
|
3062
|
+
* @param {number} [collectionId]
|
|
3063
|
+
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
3064
|
+
* @param {*} [options] Override http request option.
|
|
3065
|
+
* @throws {RequiredError}
|
|
3066
|
+
*/
|
|
3067
|
+
async renameOrMergeTags(collectionId, renameOrMergeTagsRequest, options) {
|
|
3068
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.renameOrMergeTags(collectionId, renameOrMergeTagsRequest, options);
|
|
3069
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3070
|
+
const localVarOperationServerBasePath = operationServerMap["TagApi.renameOrMergeTags"]?.[localVarOperationServerIndex]?.url;
|
|
3071
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3072
|
+
}
|
|
3073
|
+
};
|
|
3074
|
+
};
|
|
3075
|
+
var TagApiFactory = function(configuration, basePath, axios2) {
|
|
3076
|
+
const localVarFp = TagApiFp(configuration);
|
|
3077
|
+
return {
|
|
3078
|
+
/**
|
|
3079
|
+
*
|
|
3080
|
+
* @param {number} [collectionId]
|
|
3081
|
+
* @param {*} [options] Override http request option.
|
|
3082
|
+
* @throws {RequiredError}
|
|
3083
|
+
*/
|
|
3084
|
+
getTagsInCollection(collectionId, options) {
|
|
3085
|
+
return localVarFp.getTagsInCollection(collectionId, options).then((request) => request(axios2, basePath));
|
|
3086
|
+
},
|
|
3087
|
+
/**
|
|
3088
|
+
*
|
|
3089
|
+
* @param {number} [collectionId]
|
|
3090
|
+
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
3091
|
+
* @param {*} [options] Override http request option.
|
|
3092
|
+
* @throws {RequiredError}
|
|
3093
|
+
*/
|
|
3094
|
+
removeTagsFromCollection(collectionId, removeTagsFromCollectionRequest, options) {
|
|
3095
|
+
return localVarFp.removeTagsFromCollection(collectionId, removeTagsFromCollectionRequest, options).then((request) => request(axios2, basePath));
|
|
3096
|
+
},
|
|
3097
|
+
/**
|
|
3098
|
+
*
|
|
3099
|
+
* @param {number} [collectionId]
|
|
3100
|
+
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
3101
|
+
* @param {*} [options] Override http request option.
|
|
3102
|
+
* @throws {RequiredError}
|
|
3103
|
+
*/
|
|
3104
|
+
renameOrMergeTags(collectionId, renameOrMergeTagsRequest, options) {
|
|
3105
|
+
return localVarFp.renameOrMergeTags(collectionId, renameOrMergeTagsRequest, options).then((request) => request(axios2, basePath));
|
|
3106
|
+
}
|
|
3107
|
+
};
|
|
3108
|
+
};
|
|
3109
|
+
var TagApi = class extends BaseAPI {
|
|
3110
|
+
/**
|
|
3111
|
+
*
|
|
3112
|
+
* @param {number} [collectionId]
|
|
3113
|
+
* @param {*} [options] Override http request option.
|
|
3114
|
+
* @throws {RequiredError}
|
|
3115
|
+
* @memberof TagApi
|
|
3116
|
+
*/
|
|
3117
|
+
getTagsInCollection(collectionId, options) {
|
|
3118
|
+
return TagApiFp(this.configuration).getTagsInCollection(collectionId, options).then((request) => request(this.axios, this.basePath));
|
|
3119
|
+
}
|
|
3120
|
+
/**
|
|
3121
|
+
*
|
|
3122
|
+
* @param {number} [collectionId]
|
|
3123
|
+
* @param {RemoveTagsFromCollectionRequest} [removeTagsFromCollectionRequest]
|
|
3124
|
+
* @param {*} [options] Override http request option.
|
|
3125
|
+
* @throws {RequiredError}
|
|
3126
|
+
* @memberof TagApi
|
|
3127
|
+
*/
|
|
3128
|
+
removeTagsFromCollection(collectionId, removeTagsFromCollectionRequest, options) {
|
|
3129
|
+
return TagApiFp(this.configuration).removeTagsFromCollection(collectionId, removeTagsFromCollectionRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3130
|
+
}
|
|
3131
|
+
/**
|
|
3132
|
+
*
|
|
3133
|
+
* @param {number} [collectionId]
|
|
3134
|
+
* @param {RenameOrMergeTagsRequest} [renameOrMergeTagsRequest]
|
|
3135
|
+
* @param {*} [options] Override http request option.
|
|
3136
|
+
* @throws {RequiredError}
|
|
3137
|
+
* @memberof TagApi
|
|
3138
|
+
*/
|
|
3139
|
+
renameOrMergeTags(collectionId, renameOrMergeTagsRequest, options) {
|
|
3140
|
+
return TagApiFp(this.configuration).renameOrMergeTags(collectionId, renameOrMergeTagsRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3141
|
+
}
|
|
3142
|
+
};
|
|
3143
|
+
var UserApiAxiosParamCreator = function(configuration) {
|
|
3144
|
+
return {
|
|
3145
|
+
/**
|
|
3146
|
+
*
|
|
3147
|
+
* @param {ConnectSocialNetworkProviderProviderEnum} provider
|
|
3148
|
+
* @param {*} [options] Override http request option.
|
|
3149
|
+
* @throws {RequiredError}
|
|
3150
|
+
*/
|
|
3151
|
+
connectSocialNetworkProvider: async (provider, options = {}) => {
|
|
3152
|
+
assertParamExists("connectSocialNetworkProvider", "provider", provider);
|
|
3153
|
+
const localVarPath = `/rest/v1/user/connect/{provider}`.replace(`{${"provider"}}`, encodeURIComponent(String(provider)));
|
|
3154
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3155
|
+
let baseOptions;
|
|
3156
|
+
if (configuration) {
|
|
3157
|
+
baseOptions = configuration.baseOptions;
|
|
3158
|
+
}
|
|
3159
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3160
|
+
const localVarHeaderParameter = {};
|
|
3161
|
+
const localVarQueryParameter = {};
|
|
3162
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3163
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3164
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3165
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3166
|
+
return {
|
|
3167
|
+
url: toPathString(localVarUrlObj),
|
|
3168
|
+
options: localVarRequestOptions
|
|
3169
|
+
};
|
|
3170
|
+
},
|
|
3171
|
+
/**
|
|
3172
|
+
*
|
|
3173
|
+
* @param {DisconnectSocialNetworkProviderProviderEnum} provider
|
|
3174
|
+
* @param {*} [options] Override http request option.
|
|
3175
|
+
* @throws {RequiredError}
|
|
3176
|
+
*/
|
|
3177
|
+
disconnectSocialNetworkProvider: async (provider, options = {}) => {
|
|
3178
|
+
assertParamExists("disconnectSocialNetworkProvider", "provider", provider);
|
|
3179
|
+
const localVarPath = `/rest/v1/user/connect/{provider}/revoke`.replace(`{${"provider"}}`, encodeURIComponent(String(provider)));
|
|
3180
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3181
|
+
let baseOptions;
|
|
3182
|
+
if (configuration) {
|
|
3183
|
+
baseOptions = configuration.baseOptions;
|
|
3184
|
+
}
|
|
3185
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3186
|
+
const localVarHeaderParameter = {};
|
|
3187
|
+
const localVarQueryParameter = {};
|
|
3188
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3189
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3190
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3191
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3192
|
+
return {
|
|
3193
|
+
url: toPathString(localVarUrlObj),
|
|
3194
|
+
options: localVarRequestOptions
|
|
3195
|
+
};
|
|
3196
|
+
},
|
|
3197
|
+
/**
|
|
3198
|
+
*
|
|
3199
|
+
* @param {*} [options] Override http request option.
|
|
3200
|
+
* @throws {RequiredError}
|
|
3201
|
+
*/
|
|
3202
|
+
getCurrentUser: async (options = {}) => {
|
|
3203
|
+
const localVarPath = `/rest/v1/user`;
|
|
3204
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3205
|
+
let baseOptions;
|
|
3206
|
+
if (configuration) {
|
|
3207
|
+
baseOptions = configuration.baseOptions;
|
|
3208
|
+
}
|
|
3209
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3210
|
+
const localVarHeaderParameter = {};
|
|
3211
|
+
const localVarQueryParameter = {};
|
|
3212
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3213
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3214
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3215
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3216
|
+
return {
|
|
3217
|
+
url: toPathString(localVarUrlObj),
|
|
3218
|
+
options: localVarRequestOptions
|
|
3219
|
+
};
|
|
3220
|
+
},
|
|
3221
|
+
/**
|
|
3222
|
+
*
|
|
3223
|
+
* @param {number} name
|
|
3224
|
+
* @param {*} [options] Override http request option.
|
|
3225
|
+
* @throws {RequiredError}
|
|
3226
|
+
*/
|
|
3227
|
+
getPublicUserByName: async (name, options = {}) => {
|
|
3228
|
+
assertParamExists("getPublicUserByName", "name", name);
|
|
3229
|
+
const localVarPath = `/rest/v1/user/{name}`.replace(`{${"name"}}`, encodeURIComponent(String(name)));
|
|
3230
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3231
|
+
let baseOptions;
|
|
3232
|
+
if (configuration) {
|
|
3233
|
+
baseOptions = configuration.baseOptions;
|
|
3234
|
+
}
|
|
3235
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3236
|
+
const localVarHeaderParameter = {};
|
|
3237
|
+
const localVarQueryParameter = {};
|
|
3238
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3239
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3240
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3241
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3242
|
+
return {
|
|
3243
|
+
url: toPathString(localVarUrlObj),
|
|
3244
|
+
options: localVarRequestOptions
|
|
3245
|
+
};
|
|
3246
|
+
},
|
|
3247
|
+
/**
|
|
3248
|
+
*
|
|
3249
|
+
* @param {*} [options] Override http request option.
|
|
3250
|
+
* @throws {RequiredError}
|
|
3251
|
+
*/
|
|
3252
|
+
getSystemCollectionStats: async (options = {}) => {
|
|
3253
|
+
const localVarPath = `/rest/v1/user/stats`;
|
|
3254
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3255
|
+
let baseOptions;
|
|
3256
|
+
if (configuration) {
|
|
3257
|
+
baseOptions = configuration.baseOptions;
|
|
3258
|
+
}
|
|
3259
|
+
const localVarRequestOptions = { method: "GET", ...baseOptions, ...options };
|
|
3260
|
+
const localVarHeaderParameter = {};
|
|
3261
|
+
const localVarQueryParameter = {};
|
|
3262
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3263
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3264
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3265
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3266
|
+
return {
|
|
3267
|
+
url: toPathString(localVarUrlObj),
|
|
3268
|
+
options: localVarRequestOptions
|
|
3269
|
+
};
|
|
3270
|
+
},
|
|
3271
|
+
/**
|
|
3272
|
+
*
|
|
3273
|
+
* @param {UpdateCurrentUserRequest} [updateCurrentUserRequest]
|
|
3274
|
+
* @param {*} [options] Override http request option.
|
|
3275
|
+
* @throws {RequiredError}
|
|
3276
|
+
*/
|
|
3277
|
+
updateCurrentUser: async (updateCurrentUserRequest, options = {}) => {
|
|
3278
|
+
const localVarPath = `/rest/v1/user`;
|
|
3279
|
+
const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
|
|
3280
|
+
let baseOptions;
|
|
3281
|
+
if (configuration) {
|
|
3282
|
+
baseOptions = configuration.baseOptions;
|
|
3283
|
+
}
|
|
3284
|
+
const localVarRequestOptions = { method: "PUT", ...baseOptions, ...options };
|
|
3285
|
+
const localVarHeaderParameter = {};
|
|
3286
|
+
const localVarQueryParameter = {};
|
|
3287
|
+
await setBearerAuthToObject(localVarHeaderParameter, configuration);
|
|
3288
|
+
localVarHeaderParameter["Content-Type"] = "application/json";
|
|
3289
|
+
setSearchParams(localVarUrlObj, localVarQueryParameter);
|
|
3290
|
+
let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
|
|
3291
|
+
localVarRequestOptions.headers = { ...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers };
|
|
3292
|
+
localVarRequestOptions.data = serializeDataIfNeeded(updateCurrentUserRequest, localVarRequestOptions, configuration);
|
|
3293
|
+
return {
|
|
3294
|
+
url: toPathString(localVarUrlObj),
|
|
3295
|
+
options: localVarRequestOptions
|
|
3296
|
+
};
|
|
3297
|
+
}
|
|
3298
|
+
};
|
|
3299
|
+
};
|
|
3300
|
+
var UserApiFp = function(configuration) {
|
|
3301
|
+
const localVarAxiosParamCreator = UserApiAxiosParamCreator(configuration);
|
|
3302
|
+
return {
|
|
3303
|
+
/**
|
|
3304
|
+
*
|
|
3305
|
+
* @param {ConnectSocialNetworkProviderProviderEnum} provider
|
|
3306
|
+
* @param {*} [options] Override http request option.
|
|
3307
|
+
* @throws {RequiredError}
|
|
3308
|
+
*/
|
|
3309
|
+
async connectSocialNetworkProvider(provider, options) {
|
|
3310
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.connectSocialNetworkProvider(provider, options);
|
|
3311
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3312
|
+
const localVarOperationServerBasePath = operationServerMap["UserApi.connectSocialNetworkProvider"]?.[localVarOperationServerIndex]?.url;
|
|
3313
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3314
|
+
},
|
|
3315
|
+
/**
|
|
3316
|
+
*
|
|
3317
|
+
* @param {DisconnectSocialNetworkProviderProviderEnum} provider
|
|
3318
|
+
* @param {*} [options] Override http request option.
|
|
3319
|
+
* @throws {RequiredError}
|
|
3320
|
+
*/
|
|
3321
|
+
async disconnectSocialNetworkProvider(provider, options) {
|
|
3322
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.disconnectSocialNetworkProvider(provider, options);
|
|
3323
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3324
|
+
const localVarOperationServerBasePath = operationServerMap["UserApi.disconnectSocialNetworkProvider"]?.[localVarOperationServerIndex]?.url;
|
|
3325
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3326
|
+
},
|
|
3327
|
+
/**
|
|
3328
|
+
*
|
|
3329
|
+
* @param {*} [options] Override http request option.
|
|
3330
|
+
* @throws {RequiredError}
|
|
3331
|
+
*/
|
|
3332
|
+
async getCurrentUser(options) {
|
|
3333
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getCurrentUser(options);
|
|
3334
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3335
|
+
const localVarOperationServerBasePath = operationServerMap["UserApi.getCurrentUser"]?.[localVarOperationServerIndex]?.url;
|
|
3336
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3337
|
+
},
|
|
3338
|
+
/**
|
|
3339
|
+
*
|
|
3340
|
+
* @param {number} name
|
|
3341
|
+
* @param {*} [options] Override http request option.
|
|
3342
|
+
* @throws {RequiredError}
|
|
3343
|
+
*/
|
|
3344
|
+
async getPublicUserByName(name, options) {
|
|
3345
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getPublicUserByName(name, options);
|
|
3346
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3347
|
+
const localVarOperationServerBasePath = operationServerMap["UserApi.getPublicUserByName"]?.[localVarOperationServerIndex]?.url;
|
|
3348
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3349
|
+
},
|
|
3350
|
+
/**
|
|
3351
|
+
*
|
|
3352
|
+
* @param {*} [options] Override http request option.
|
|
3353
|
+
* @throws {RequiredError}
|
|
3354
|
+
*/
|
|
3355
|
+
async getSystemCollectionStats(options) {
|
|
3356
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.getSystemCollectionStats(options);
|
|
3357
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3358
|
+
const localVarOperationServerBasePath = operationServerMap["UserApi.getSystemCollectionStats"]?.[localVarOperationServerIndex]?.url;
|
|
3359
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3360
|
+
},
|
|
3361
|
+
/**
|
|
3362
|
+
*
|
|
3363
|
+
* @param {UpdateCurrentUserRequest} [updateCurrentUserRequest]
|
|
3364
|
+
* @param {*} [options] Override http request option.
|
|
3365
|
+
* @throws {RequiredError}
|
|
3366
|
+
*/
|
|
3367
|
+
async updateCurrentUser(updateCurrentUserRequest, options) {
|
|
3368
|
+
const localVarAxiosArgs = await localVarAxiosParamCreator.updateCurrentUser(updateCurrentUserRequest, options);
|
|
3369
|
+
const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
|
|
3370
|
+
const localVarOperationServerBasePath = operationServerMap["UserApi.updateCurrentUser"]?.[localVarOperationServerIndex]?.url;
|
|
3371
|
+
return (axios2, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios2, BASE_PATH, configuration)(axios2, localVarOperationServerBasePath || basePath);
|
|
3372
|
+
}
|
|
3373
|
+
};
|
|
3374
|
+
};
|
|
3375
|
+
var UserApiFactory = function(configuration, basePath, axios2) {
|
|
3376
|
+
const localVarFp = UserApiFp(configuration);
|
|
3377
|
+
return {
|
|
3378
|
+
/**
|
|
3379
|
+
*
|
|
3380
|
+
* @param {ConnectSocialNetworkProviderProviderEnum} provider
|
|
3381
|
+
* @param {*} [options] Override http request option.
|
|
3382
|
+
* @throws {RequiredError}
|
|
3383
|
+
*/
|
|
3384
|
+
connectSocialNetworkProvider(provider, options) {
|
|
3385
|
+
return localVarFp.connectSocialNetworkProvider(provider, options).then((request) => request(axios2, basePath));
|
|
3386
|
+
},
|
|
3387
|
+
/**
|
|
3388
|
+
*
|
|
3389
|
+
* @param {DisconnectSocialNetworkProviderProviderEnum} provider
|
|
3390
|
+
* @param {*} [options] Override http request option.
|
|
3391
|
+
* @throws {RequiredError}
|
|
3392
|
+
*/
|
|
3393
|
+
disconnectSocialNetworkProvider(provider, options) {
|
|
3394
|
+
return localVarFp.disconnectSocialNetworkProvider(provider, options).then((request) => request(axios2, basePath));
|
|
3395
|
+
},
|
|
3396
|
+
/**
|
|
3397
|
+
*
|
|
3398
|
+
* @param {*} [options] Override http request option.
|
|
3399
|
+
* @throws {RequiredError}
|
|
3400
|
+
*/
|
|
3401
|
+
getCurrentUser(options) {
|
|
3402
|
+
return localVarFp.getCurrentUser(options).then((request) => request(axios2, basePath));
|
|
3403
|
+
},
|
|
3404
|
+
/**
|
|
3405
|
+
*
|
|
3406
|
+
* @param {number} name
|
|
3407
|
+
* @param {*} [options] Override http request option.
|
|
3408
|
+
* @throws {RequiredError}
|
|
3409
|
+
*/
|
|
3410
|
+
getPublicUserByName(name, options) {
|
|
3411
|
+
return localVarFp.getPublicUserByName(name, options).then((request) => request(axios2, basePath));
|
|
3412
|
+
},
|
|
3413
|
+
/**
|
|
3414
|
+
*
|
|
3415
|
+
* @param {*} [options] Override http request option.
|
|
3416
|
+
* @throws {RequiredError}
|
|
3417
|
+
*/
|
|
3418
|
+
getSystemCollectionStats(options) {
|
|
3419
|
+
return localVarFp.getSystemCollectionStats(options).then((request) => request(axios2, basePath));
|
|
3420
|
+
},
|
|
3421
|
+
/**
|
|
3422
|
+
*
|
|
3423
|
+
* @param {UpdateCurrentUserRequest} [updateCurrentUserRequest]
|
|
3424
|
+
* @param {*} [options] Override http request option.
|
|
3425
|
+
* @throws {RequiredError}
|
|
3426
|
+
*/
|
|
3427
|
+
updateCurrentUser(updateCurrentUserRequest, options) {
|
|
3428
|
+
return localVarFp.updateCurrentUser(updateCurrentUserRequest, options).then((request) => request(axios2, basePath));
|
|
3429
|
+
}
|
|
3430
|
+
};
|
|
3431
|
+
};
|
|
3432
|
+
var UserApi = class extends BaseAPI {
|
|
3433
|
+
/**
|
|
3434
|
+
*
|
|
3435
|
+
* @param {ConnectSocialNetworkProviderProviderEnum} provider
|
|
3436
|
+
* @param {*} [options] Override http request option.
|
|
3437
|
+
* @throws {RequiredError}
|
|
3438
|
+
* @memberof UserApi
|
|
3439
|
+
*/
|
|
3440
|
+
connectSocialNetworkProvider(provider, options) {
|
|
3441
|
+
return UserApiFp(this.configuration).connectSocialNetworkProvider(provider, options).then((request) => request(this.axios, this.basePath));
|
|
3442
|
+
}
|
|
3443
|
+
/**
|
|
3444
|
+
*
|
|
3445
|
+
* @param {DisconnectSocialNetworkProviderProviderEnum} provider
|
|
3446
|
+
* @param {*} [options] Override http request option.
|
|
3447
|
+
* @throws {RequiredError}
|
|
3448
|
+
* @memberof UserApi
|
|
3449
|
+
*/
|
|
3450
|
+
disconnectSocialNetworkProvider(provider, options) {
|
|
3451
|
+
return UserApiFp(this.configuration).disconnectSocialNetworkProvider(provider, options).then((request) => request(this.axios, this.basePath));
|
|
3452
|
+
}
|
|
3453
|
+
/**
|
|
3454
|
+
*
|
|
3455
|
+
* @param {*} [options] Override http request option.
|
|
3456
|
+
* @throws {RequiredError}
|
|
3457
|
+
* @memberof UserApi
|
|
3458
|
+
*/
|
|
3459
|
+
getCurrentUser(options) {
|
|
3460
|
+
return UserApiFp(this.configuration).getCurrentUser(options).then((request) => request(this.axios, this.basePath));
|
|
3461
|
+
}
|
|
3462
|
+
/**
|
|
3463
|
+
*
|
|
3464
|
+
* @param {number} name
|
|
3465
|
+
* @param {*} [options] Override http request option.
|
|
3466
|
+
* @throws {RequiredError}
|
|
3467
|
+
* @memberof UserApi
|
|
3468
|
+
*/
|
|
3469
|
+
getPublicUserByName(name, options) {
|
|
3470
|
+
return UserApiFp(this.configuration).getPublicUserByName(name, options).then((request) => request(this.axios, this.basePath));
|
|
3471
|
+
}
|
|
3472
|
+
/**
|
|
3473
|
+
*
|
|
3474
|
+
* @param {*} [options] Override http request option.
|
|
3475
|
+
* @throws {RequiredError}
|
|
3476
|
+
* @memberof UserApi
|
|
3477
|
+
*/
|
|
3478
|
+
getSystemCollectionStats(options) {
|
|
3479
|
+
return UserApiFp(this.configuration).getSystemCollectionStats(options).then((request) => request(this.axios, this.basePath));
|
|
3480
|
+
}
|
|
3481
|
+
/**
|
|
3482
|
+
*
|
|
3483
|
+
* @param {UpdateCurrentUserRequest} [updateCurrentUserRequest]
|
|
3484
|
+
* @param {*} [options] Override http request option.
|
|
3485
|
+
* @throws {RequiredError}
|
|
3486
|
+
* @memberof UserApi
|
|
3487
|
+
*/
|
|
3488
|
+
updateCurrentUser(updateCurrentUserRequest, options) {
|
|
3489
|
+
return UserApiFp(this.configuration).updateCurrentUser(updateCurrentUserRequest, options).then((request) => request(this.axios, this.basePath));
|
|
3490
|
+
}
|
|
3491
|
+
};
|
|
3492
|
+
var ConnectSocialNetworkProviderProviderEnum = {
|
|
3493
|
+
Facebook: "facebook",
|
|
3494
|
+
Google: "google",
|
|
3495
|
+
Twitter: "twitter",
|
|
3496
|
+
Vkontate: "vkontate",
|
|
3497
|
+
Dropbox: "dropbox",
|
|
3498
|
+
Gdrive: "gdrive"
|
|
3499
|
+
};
|
|
3500
|
+
var DisconnectSocialNetworkProviderProviderEnum = {
|
|
3501
|
+
Facebook: "facebook",
|
|
3502
|
+
Google: "google",
|
|
3503
|
+
Twitter: "twitter",
|
|
3504
|
+
Vkontate: "vkontate",
|
|
3505
|
+
Dropbox: "dropbox",
|
|
3506
|
+
Gdrive: "gdrive"
|
|
3507
|
+
};
|
|
3508
|
+
|
|
3509
|
+
// src/generated/configuration.ts
|
|
3510
|
+
var Configuration = class {
|
|
3511
|
+
constructor(param = {}) {
|
|
3512
|
+
/**
|
|
3513
|
+
* parameter for apiKey security
|
|
3514
|
+
* @param name security name
|
|
3515
|
+
* @memberof Configuration
|
|
3516
|
+
*/
|
|
3517
|
+
__publicField(this, "apiKey");
|
|
3518
|
+
/**
|
|
3519
|
+
* parameter for basic security
|
|
3520
|
+
*
|
|
3521
|
+
* @type {string}
|
|
3522
|
+
* @memberof Configuration
|
|
3523
|
+
*/
|
|
3524
|
+
__publicField(this, "username");
|
|
3525
|
+
/**
|
|
3526
|
+
* parameter for basic security
|
|
3527
|
+
*
|
|
3528
|
+
* @type {string}
|
|
3529
|
+
* @memberof Configuration
|
|
3530
|
+
*/
|
|
3531
|
+
__publicField(this, "password");
|
|
3532
|
+
/**
|
|
3533
|
+
* parameter for oauth2 security
|
|
3534
|
+
* @param name security name
|
|
3535
|
+
* @param scopes oauth2 scope
|
|
3536
|
+
* @memberof Configuration
|
|
3537
|
+
*/
|
|
3538
|
+
__publicField(this, "accessToken");
|
|
3539
|
+
/**
|
|
3540
|
+
* override base path
|
|
3541
|
+
*
|
|
3542
|
+
* @type {string}
|
|
3543
|
+
* @memberof Configuration
|
|
3544
|
+
*/
|
|
3545
|
+
__publicField(this, "basePath");
|
|
3546
|
+
/**
|
|
3547
|
+
* override server index
|
|
3548
|
+
*
|
|
3549
|
+
* @type {number}
|
|
3550
|
+
* @memberof Configuration
|
|
3551
|
+
*/
|
|
3552
|
+
__publicField(this, "serverIndex");
|
|
3553
|
+
/**
|
|
3554
|
+
* base options for axios calls
|
|
3555
|
+
*
|
|
3556
|
+
* @type {any}
|
|
3557
|
+
* @memberof Configuration
|
|
3558
|
+
*/
|
|
3559
|
+
__publicField(this, "baseOptions");
|
|
3560
|
+
/**
|
|
3561
|
+
* The FormData constructor that will be used to create multipart form data
|
|
3562
|
+
* requests. You can inject this here so that execution environments that
|
|
3563
|
+
* do not support the FormData class can still run the generated client.
|
|
3564
|
+
*
|
|
3565
|
+
* @type {new () => FormData}
|
|
3566
|
+
*/
|
|
3567
|
+
__publicField(this, "formDataCtor");
|
|
3568
|
+
this.apiKey = param.apiKey;
|
|
3569
|
+
this.username = param.username;
|
|
3570
|
+
this.password = param.password;
|
|
3571
|
+
this.accessToken = param.accessToken;
|
|
3572
|
+
this.basePath = param.basePath;
|
|
3573
|
+
this.serverIndex = param.serverIndex;
|
|
3574
|
+
this.baseOptions = param.baseOptions;
|
|
3575
|
+
this.formDataCtor = param.formDataCtor;
|
|
3576
|
+
}
|
|
3577
|
+
/**
|
|
3578
|
+
* Check if the given MIME is a JSON MIME.
|
|
3579
|
+
* JSON MIME examples:
|
|
3580
|
+
* application/json
|
|
3581
|
+
* application/json; charset=UTF8
|
|
3582
|
+
* APPLICATION/JSON
|
|
3583
|
+
* application/vnd.company+json
|
|
3584
|
+
* @param mime - MIME (Multipurpose Internet Mail Extensions)
|
|
3585
|
+
* @return True if the given MIME is JSON, false otherwise.
|
|
3586
|
+
*/
|
|
3587
|
+
isJsonMime(mime) {
|
|
3588
|
+
const jsonMime = new RegExp("^(application/json|[^;/ ]+/[^;/ ]+[+]json)[ ]*(;.*)?$", "i");
|
|
3589
|
+
return mime !== null && (jsonMime.test(mime) || mime.toLowerCase() === "application/json-patch+json");
|
|
3590
|
+
}
|
|
3591
|
+
};
|
|
3592
|
+
|
|
3593
|
+
// src/client/auth.ts
|
|
3594
|
+
var AuthenticationApi2 = class extends AuthenticationApi {
|
|
3595
|
+
/**
|
|
3596
|
+
* Wrapper function of {@link _AuthenticationApi.getOrRefreshToken} for token exchange.
|
|
3597
|
+
* @param request {@link ObtainToken} but without `grant_type` field.
|
|
3598
|
+
* @param options Axios request configuration.
|
|
3599
|
+
* @returns API response.
|
|
3600
|
+
*/
|
|
3601
|
+
async exchangeToken(request, options) {
|
|
3602
|
+
return this.getOrRefreshToken(
|
|
3603
|
+
{ ...request, grant_type: ObtainTokenGrantTypeEnum.AuthorizationCode },
|
|
3604
|
+
options
|
|
3605
|
+
).then((response) => {
|
|
3606
|
+
if (isErrorResponse(response.data)) {
|
|
3607
|
+
throw new Error(
|
|
3608
|
+
`Request failed with error: ${response.data.errorMessage}`
|
|
3609
|
+
);
|
|
3610
|
+
}
|
|
3611
|
+
return response;
|
|
3612
|
+
});
|
|
3613
|
+
}
|
|
3614
|
+
/**
|
|
3615
|
+
* Wrapper function of {@link _AuthenticationApi.getOrRefreshToken} for token refresh.
|
|
3616
|
+
* @param request {@link RefreshToken} but without `grant_type` field.
|
|
3617
|
+
* @param options Axios request configuration.
|
|
3618
|
+
* @returns API response.
|
|
3619
|
+
*/
|
|
3620
|
+
async refreshToken(request, options) {
|
|
3621
|
+
return this.getOrRefreshToken(
|
|
3622
|
+
{ ...request, grant_type: RefreshTokenGrantTypeEnum.RefreshToken },
|
|
3623
|
+
options
|
|
3624
|
+
).then((response) => {
|
|
3625
|
+
if (isErrorResponse(response.data)) {
|
|
3626
|
+
throw new Error(
|
|
3627
|
+
`Request failed with error: ${response.data.errorMessage}`
|
|
3628
|
+
);
|
|
3629
|
+
}
|
|
3630
|
+
return response;
|
|
3631
|
+
});
|
|
3632
|
+
}
|
|
3633
|
+
};
|
|
3634
|
+
function isErrorResponse(data) {
|
|
3635
|
+
return "result" in data && data.result === false;
|
|
3636
|
+
}
|
|
3637
|
+
|
|
3638
|
+
// src/utils/tree.ts
|
|
3639
|
+
var tree_exports = {};
|
|
3640
|
+
__export(tree_exports, {
|
|
3641
|
+
TreeNode: () => TreeNode,
|
|
3642
|
+
makeTree: () => makeTree
|
|
3643
|
+
});
|
|
3644
|
+
var TreeNode = class {
|
|
3645
|
+
/**
|
|
3646
|
+
* Create tree node.
|
|
3647
|
+
* @param data Node data.
|
|
3648
|
+
* @param children Initial tree children.
|
|
3649
|
+
*/
|
|
3650
|
+
constructor(data, children) {
|
|
3651
|
+
__publicField(this, "_data");
|
|
3652
|
+
__publicField(this, "_parent", null);
|
|
3653
|
+
__publicField(this, "_children", []);
|
|
3654
|
+
this._data = data;
|
|
3655
|
+
if (children) {
|
|
3656
|
+
this.addChildren(...children);
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
get data() {
|
|
3660
|
+
return this._data;
|
|
3661
|
+
}
|
|
3662
|
+
get parent() {
|
|
3663
|
+
return this._parent;
|
|
3664
|
+
}
|
|
3665
|
+
set parent(parent) {
|
|
3666
|
+
this._parent = parent;
|
|
3667
|
+
parent._children.push(this);
|
|
3668
|
+
}
|
|
3669
|
+
isRoot() {
|
|
3670
|
+
return this._parent === null;
|
|
3671
|
+
}
|
|
3672
|
+
get children() {
|
|
3673
|
+
return this._children;
|
|
3674
|
+
}
|
|
3675
|
+
/**
|
|
3676
|
+
* Add children to current node.
|
|
3677
|
+
* @param children Children nodes to append.
|
|
3678
|
+
*/
|
|
3679
|
+
addChildren(...children) {
|
|
3680
|
+
this._children.push(...children);
|
|
3681
|
+
for (const child of children) {
|
|
3682
|
+
child._parent = this;
|
|
3683
|
+
}
|
|
3684
|
+
}
|
|
3685
|
+
/**
|
|
3686
|
+
* Pre-order traverse this tree.
|
|
3687
|
+
* @param callbackFn Function to be called with traversing nodes.
|
|
3688
|
+
*/
|
|
3689
|
+
traverse(callbackFn) {
|
|
3690
|
+
callbackFn(this);
|
|
3691
|
+
for (const child of this.children) {
|
|
3692
|
+
child.traverse(callbackFn);
|
|
3693
|
+
}
|
|
3694
|
+
}
|
|
3695
|
+
};
|
|
3696
|
+
function buildTree(parent, parentID, source) {
|
|
3697
|
+
const children = source.filter((src) => src.parent === parentID);
|
|
3698
|
+
for (const src of children) {
|
|
3699
|
+
const srcNode = src.toNode();
|
|
3700
|
+
buildTree(srcNode, src.id, source);
|
|
3701
|
+
parent.addChildren(srcNode);
|
|
3702
|
+
}
|
|
3703
|
+
}
|
|
3704
|
+
function makeTree(data, source) {
|
|
3705
|
+
const root = new TreeNode(data);
|
|
3706
|
+
buildTree(root, null, source);
|
|
3707
|
+
return root;
|
|
3708
|
+
}
|
|
3709
|
+
|
|
3710
|
+
// src/client/collection.ts
|
|
3711
|
+
var CollectionApi2 = class extends CollectionApi {
|
|
3712
|
+
/**
|
|
3713
|
+
* Create structured tree of collections.
|
|
3714
|
+
* @returns Root of tree.
|
|
3715
|
+
* @deprecated This function is deprecated and will be removed in a future release.
|
|
3716
|
+
*/
|
|
3717
|
+
async getCollectionTree() {
|
|
3718
|
+
const [{ data: groups }, { data: collections }] = await Promise.all([
|
|
3719
|
+
this.getRootCollections(),
|
|
3720
|
+
this.getChildCollections()
|
|
3721
|
+
]);
|
|
3722
|
+
const groupNodes = groups.items.map((item) => ({
|
|
3723
|
+
data: item,
|
|
3724
|
+
id: item._id.toString(),
|
|
3725
|
+
parent: null,
|
|
3726
|
+
toNode() {
|
|
3727
|
+
return new TreeNode(this.data);
|
|
3728
|
+
}
|
|
3729
|
+
}));
|
|
3730
|
+
const collectionNodes = collections.items.map((item) => ({
|
|
3731
|
+
data: item,
|
|
3732
|
+
id: item._id.toString(),
|
|
3733
|
+
parent: item.parent?.$id.toString() || null,
|
|
3734
|
+
toNode() {
|
|
3735
|
+
return new TreeNode(this.data);
|
|
3736
|
+
}
|
|
3737
|
+
}));
|
|
3738
|
+
const source = groupNodes.concat(collectionNodes);
|
|
3739
|
+
source.sort(
|
|
3740
|
+
(a, b) => a.data.title.localeCompare(b.data.title) || a.data._id - b.data._id
|
|
3741
|
+
);
|
|
3742
|
+
const sourceDedupe = source.filter(
|
|
3743
|
+
(obj1, idx, arr) => arr.findIndex((obj2) => obj2.id === obj1.id) === idx
|
|
3744
|
+
);
|
|
3745
|
+
const rootNode = makeTree(null, sourceDedupe);
|
|
3746
|
+
return rootNode;
|
|
3747
|
+
}
|
|
3748
|
+
};
|
|
3749
|
+
|
|
3750
|
+
// src/client/raindrop.ts
|
|
3751
|
+
var RaindropApi2 = class extends RaindropApi {
|
|
3752
|
+
/**
|
|
3753
|
+
* Fetch all raindrops of a collection.
|
|
3754
|
+
* @param collectionId ID of collection.
|
|
3755
|
+
* @param params Request parameters.
|
|
3756
|
+
* @param options Axios request config.
|
|
3757
|
+
* @returns Array of raindrops.
|
|
3758
|
+
* @deprecated This function is deprecated and will be removed in a future release.
|
|
3759
|
+
*/
|
|
3760
|
+
async getAllRaindrops(collectionId, params, options) {
|
|
3761
|
+
const collection = collectionId ?? 0;
|
|
3762
|
+
const sort = params?.sort ?? "";
|
|
3763
|
+
const pageSize = params?.pageSize ?? 50;
|
|
3764
|
+
const search = params?.search ?? "";
|
|
3765
|
+
const { data: head } = await this.getRaindrops(
|
|
3766
|
+
collection,
|
|
3767
|
+
sort,
|
|
3768
|
+
pageSize,
|
|
3769
|
+
0,
|
|
3770
|
+
search,
|
|
3771
|
+
options
|
|
3772
|
+
);
|
|
3773
|
+
const count = head.count;
|
|
3774
|
+
const maxPage = Math.ceil(count / pageSize);
|
|
3775
|
+
const pageNums = Array.from(Array(maxPage).keys());
|
|
3776
|
+
pageNums.shift();
|
|
3777
|
+
const results = await Promise.all(
|
|
3778
|
+
pageNums.map(
|
|
3779
|
+
(page) => this.getRaindrops(
|
|
3780
|
+
collection,
|
|
3781
|
+
sort,
|
|
3782
|
+
pageSize,
|
|
3783
|
+
page,
|
|
3784
|
+
search,
|
|
3785
|
+
options
|
|
3786
|
+
).then(({ data }) => data)
|
|
3787
|
+
)
|
|
3788
|
+
);
|
|
3789
|
+
const items = [...head.items];
|
|
3790
|
+
for (const data of results) {
|
|
3791
|
+
items.push(...data.items);
|
|
3792
|
+
}
|
|
3793
|
+
return items;
|
|
3794
|
+
}
|
|
3795
|
+
};
|
|
3796
|
+
|
|
3797
|
+
// src/client/client.ts
|
|
3798
|
+
var Raindrop = class {
|
|
3799
|
+
constructor(configuration, client) {
|
|
3800
|
+
/** Axios client instance. If not set, will use default Axios instance. */
|
|
3801
|
+
__publicField(this, "client");
|
|
3802
|
+
/** API global configurations. */
|
|
3803
|
+
__publicField(this, "configuration");
|
|
3804
|
+
// API namespaces
|
|
3805
|
+
__publicField(this, "auth");
|
|
3806
|
+
__publicField(this, "user");
|
|
3807
|
+
__publicField(this, "collection");
|
|
3808
|
+
__publicField(this, "filter");
|
|
3809
|
+
__publicField(this, "highlight");
|
|
3810
|
+
__publicField(this, "import");
|
|
3811
|
+
__publicField(this, "raindrop");
|
|
3812
|
+
__publicField(this, "tag");
|
|
3813
|
+
this.client = client ?? axios;
|
|
3814
|
+
this.configuration = configuration ?? new Configuration();
|
|
3815
|
+
this.auth = new AuthenticationApi2(configuration, void 0, this.client);
|
|
3816
|
+
this.collection = new CollectionApi2(configuration, void 0, this.client);
|
|
3817
|
+
this.filter = new FilterApi(configuration, void 0, this.client);
|
|
3818
|
+
this.highlight = new HighlightApi(configuration, void 0, this.client);
|
|
3819
|
+
this.import = new ImportApi(configuration, void 0, this.client);
|
|
3820
|
+
this.raindrop = new RaindropApi2(configuration, void 0, this.client);
|
|
3821
|
+
this.tag = new TagApi(configuration, void 0, this.client);
|
|
3822
|
+
this.user = new UserApi(configuration, void 0, this.client);
|
|
3823
|
+
}
|
|
3824
|
+
};
|
|
3825
|
+
|
|
3826
|
+
// src/utils/index.ts
|
|
3827
|
+
var utils_exports = {};
|
|
3828
|
+
__export(utils_exports, {
|
|
3829
|
+
tree: () => tree_exports
|
|
3830
|
+
});
|
|
3831
|
+
|
|
3832
|
+
// src/index.ts
|
|
3833
|
+
var index_default = Raindrop;
|
|
3834
|
+
export {
|
|
3835
|
+
client_exports as client,
|
|
3836
|
+
index_default as default,
|
|
3837
|
+
generated_exports as generated,
|
|
3838
|
+
utils_exports as utils
|
|
3839
|
+
};
|