@openfilz-sdk/typescript 1.3.29 → 1.3.30

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.
Files changed (72) hide show
  1. package/.openapi-generator/FILES +16 -0
  2. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  3. package/README.md +14 -2
  4. package/api/quota-administration-api.ts +456 -0
  5. package/api/quotas-api.ts +121 -0
  6. package/api/tus-controller-api.ts +8 -4
  7. package/api.ts +2 -0
  8. package/dist/api/quota-administration-api.d.ts +214 -0
  9. package/dist/api/quota-administration-api.js +437 -0
  10. package/dist/api/quotas-api.d.ts +63 -0
  11. package/dist/api/quotas-api.js +125 -0
  12. package/dist/api/tus-controller-api.d.ts +6 -6
  13. package/dist/api/tus-controller-api.js +2 -0
  14. package/dist/api.d.ts +2 -0
  15. package/dist/api.js +2 -0
  16. package/dist/esm/api/quota-administration-api.d.ts +214 -0
  17. package/dist/esm/api/quota-administration-api.js +430 -0
  18. package/dist/esm/api/quotas-api.d.ts +63 -0
  19. package/dist/esm/api/quotas-api.js +118 -0
  20. package/dist/esm/api/tus-controller-api.d.ts +6 -6
  21. package/dist/esm/api/tus-controller-api.js +2 -0
  22. package/dist/esm/api.d.ts +2 -0
  23. package/dist/esm/api.js +2 -0
  24. package/dist/esm/models/error-response.d.ts +16 -0
  25. package/dist/esm/models/error-response.js +14 -0
  26. package/dist/esm/models/index.d.ts +6 -0
  27. package/dist/esm/models/index.js +6 -0
  28. package/dist/esm/models/my-storage-quota.d.ts +24 -0
  29. package/dist/esm/models/my-storage-quota.js +18 -0
  30. package/dist/esm/models/quota-overview.d.ts +19 -0
  31. package/dist/esm/models/quota-overview.js +14 -0
  32. package/dist/esm/models/quota-usage.d.ts +27 -0
  33. package/dist/esm/models/quota-usage.js +18 -0
  34. package/dist/esm/models/quota-user-page.d.ts +18 -0
  35. package/dist/esm/models/quota-user-page.js +14 -0
  36. package/dist/esm/models/storage-breakdown.d.ts +2 -0
  37. package/dist/esm/models/user-quota-request.d.ts +17 -0
  38. package/dist/esm/models/user-quota-request.js +14 -0
  39. package/dist/models/error-response.d.ts +16 -0
  40. package/dist/models/error-response.js +15 -0
  41. package/dist/models/index.d.ts +6 -0
  42. package/dist/models/index.js +6 -0
  43. package/dist/models/my-storage-quota.d.ts +24 -0
  44. package/dist/models/my-storage-quota.js +21 -0
  45. package/dist/models/quota-overview.d.ts +19 -0
  46. package/dist/models/quota-overview.js +15 -0
  47. package/dist/models/quota-usage.d.ts +27 -0
  48. package/dist/models/quota-usage.js +21 -0
  49. package/dist/models/quota-user-page.d.ts +18 -0
  50. package/dist/models/quota-user-page.js +15 -0
  51. package/dist/models/storage-breakdown.d.ts +2 -0
  52. package/dist/models/user-quota-request.d.ts +17 -0
  53. package/dist/models/user-quota-request.js +15 -0
  54. package/docs/ErrorResponse.md +24 -0
  55. package/docs/MyStorageQuota.md +28 -0
  56. package/docs/QuotaAdministrationApi.md +275 -0
  57. package/docs/QuotaOverview.md +30 -0
  58. package/docs/QuotaUsage.md +34 -0
  59. package/docs/QuotaUserPage.md +26 -0
  60. package/docs/QuotasApi.md +52 -0
  61. package/docs/StorageBreakdown.md +2 -0
  62. package/docs/TusControllerApi.md +8 -7
  63. package/docs/UserQuotaRequest.md +20 -0
  64. package/models/error-response.ts +22 -0
  65. package/models/index.ts +6 -0
  66. package/models/my-storage-quota.ts +33 -0
  67. package/models/quota-overview.ts +25 -0
  68. package/models/quota-usage.ts +36 -0
  69. package/models/quota-user-page.ts +26 -0
  70. package/models/storage-breakdown.ts +4 -0
  71. package/models/user-quota-request.ts +23 -0
  72. package/package.json +1 -1
@@ -0,0 +1,430 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * openfilz-api
5
+ * API for Document Management System
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * QuotaAdministrationApi - axios parameter creator
31
+ */
32
+ export const QuotaAdministrationApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * The group or default limit applies again.
36
+ * @summary Remove one user\'s own limit
37
+ * @param {string} username
38
+ * @param {*} [options] Override http request option.
39
+ * @throws {RequiredError}
40
+ */
41
+ clearUserQuota: (username_1, ...args_1) => __awaiter(this, [username_1, ...args_1], void 0, function* (username, options = {}) {
42
+ // verify required parameter 'username' is not null or undefined
43
+ assertParamExists('clearUserQuota', 'username', username);
44
+ const localVarPath = `/api/v1/admin/quotas/users/{username}`
45
+ .replace('{username}', encodeURIComponent(String(username)));
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ }
52
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ // authentication keycloak_auth required
56
+ // http bearer authentication required
57
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
58
+ localVarHeaderParameter['Accept'] = '*/*';
59
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
60
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
62
+ return {
63
+ url: toPathString(localVarUrlObj),
64
+ options: localVarRequestOptions,
65
+ };
66
+ }),
67
+ /**
68
+ *
69
+ * @summary Get one user\'s storage
70
+ * @param {string} username
71
+ * @param {*} [options] Override http request option.
72
+ * @throws {RequiredError}
73
+ */
74
+ getUser: (username_1, ...args_1) => __awaiter(this, [username_1, ...args_1], void 0, function* (username, options = {}) {
75
+ // verify required parameter 'username' is not null or undefined
76
+ assertParamExists('getUser', 'username', username);
77
+ const localVarPath = `/api/v1/admin/quotas/users/{username}`
78
+ .replace('{username}', encodeURIComponent(String(username)));
79
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
80
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
81
+ let baseOptions;
82
+ if (configuration) {
83
+ baseOptions = configuration.baseOptions;
84
+ }
85
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
86
+ const localVarHeaderParameter = {};
87
+ const localVarQueryParameter = {};
88
+ // authentication keycloak_auth required
89
+ // http bearer authentication required
90
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
91
+ localVarHeaderParameter['Accept'] = '*/*';
92
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
93
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
94
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
95
+ return {
96
+ url: toPathString(localVarUrlObj),
97
+ options: localVarRequestOptions,
98
+ };
99
+ }),
100
+ /**
101
+ * Every user storage is charged to, with usage, effective limit and its source. Sort by usage (default), percent, limit or name.
102
+ * @summary List users\' storage
103
+ * @param {string} [search] Case-insensitive filter on the user name
104
+ * @param {string} [sort] usage | percent | limit | name
105
+ * @param {string} [order] asc | desc
106
+ * @param {number} [page]
107
+ * @param {number} [size]
108
+ * @param {*} [options] Override http request option.
109
+ * @throws {RequiredError}
110
+ */
111
+ listUsers: (search_1, sort_1, order_1, page_1, size_1, ...args_1) => __awaiter(this, [search_1, sort_1, order_1, page_1, size_1, ...args_1], void 0, function* (search, sort, order, page, size, options = {}) {
112
+ const localVarPath = `/api/v1/admin/quotas/users`;
113
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
114
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
115
+ let baseOptions;
116
+ if (configuration) {
117
+ baseOptions = configuration.baseOptions;
118
+ }
119
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
120
+ const localVarHeaderParameter = {};
121
+ const localVarQueryParameter = {};
122
+ // authentication keycloak_auth required
123
+ // http bearer authentication required
124
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
125
+ if (search !== undefined) {
126
+ localVarQueryParameter['search'] = search;
127
+ }
128
+ if (sort !== undefined) {
129
+ localVarQueryParameter['sort'] = sort;
130
+ }
131
+ if (order !== undefined) {
132
+ localVarQueryParameter['order'] = order;
133
+ }
134
+ if (page !== undefined) {
135
+ localVarQueryParameter['page'] = page;
136
+ }
137
+ if (size !== undefined) {
138
+ localVarQueryParameter['size'] = size;
139
+ }
140
+ localVarHeaderParameter['Accept'] = '*/*';
141
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
142
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
143
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
144
+ return {
145
+ url: toPathString(localVarUrlObj),
146
+ options: localVarRequestOptions,
147
+ };
148
+ }),
149
+ /**
150
+ * Deployment-wide limits (MB, 0 = no limit), instance usage and the number of user overrides.
151
+ * @summary Quota overview
152
+ * @param {*} [options] Override http request option.
153
+ * @throws {RequiredError}
154
+ */
155
+ overview: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
156
+ const localVarPath = `/api/v1/admin/quotas`;
157
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
158
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
159
+ let baseOptions;
160
+ if (configuration) {
161
+ baseOptions = configuration.baseOptions;
162
+ }
163
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
164
+ const localVarHeaderParameter = {};
165
+ const localVarQueryParameter = {};
166
+ // authentication keycloak_auth required
167
+ // http bearer authentication required
168
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
169
+ localVarHeaderParameter['Accept'] = '*/*';
170
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
171
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
172
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
173
+ return {
174
+ url: toPathString(localVarUrlObj),
175
+ options: localVarRequestOptions,
176
+ };
177
+ }),
178
+ /**
179
+ * quotaMb > 0 = this user\'s limit, 0 = no limit for this user. Takes precedence over group and default limits.
180
+ * @summary Set one user\'s own limit
181
+ * @param {string} username
182
+ * @param {UserQuotaRequest} userQuotaRequest
183
+ * @param {*} [options] Override http request option.
184
+ * @throws {RequiredError}
185
+ */
186
+ setUserQuota: (username_1, userQuotaRequest_1, ...args_1) => __awaiter(this, [username_1, userQuotaRequest_1, ...args_1], void 0, function* (username, userQuotaRequest, options = {}) {
187
+ // verify required parameter 'username' is not null or undefined
188
+ assertParamExists('setUserQuota', 'username', username);
189
+ // verify required parameter 'userQuotaRequest' is not null or undefined
190
+ assertParamExists('setUserQuota', 'userQuotaRequest', userQuotaRequest);
191
+ const localVarPath = `/api/v1/admin/quotas/users/{username}`
192
+ .replace('{username}', encodeURIComponent(String(username)));
193
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
194
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
195
+ let baseOptions;
196
+ if (configuration) {
197
+ baseOptions = configuration.baseOptions;
198
+ }
199
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
200
+ const localVarHeaderParameter = {};
201
+ const localVarQueryParameter = {};
202
+ // authentication keycloak_auth required
203
+ // http bearer authentication required
204
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
205
+ localVarHeaderParameter['Content-Type'] = 'application/json';
206
+ localVarHeaderParameter['Accept'] = '*/*';
207
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
208
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
209
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
210
+ localVarRequestOptions.data = serializeDataIfNeeded(userQuotaRequest, localVarRequestOptions, configuration);
211
+ return {
212
+ url: toPathString(localVarUrlObj),
213
+ options: localVarRequestOptions,
214
+ };
215
+ }),
216
+ };
217
+ };
218
+ /**
219
+ * QuotaAdministrationApi - functional programming interface
220
+ */
221
+ export const QuotaAdministrationApiFp = function (configuration) {
222
+ const localVarAxiosParamCreator = QuotaAdministrationApiAxiosParamCreator(configuration);
223
+ return {
224
+ /**
225
+ * The group or default limit applies again.
226
+ * @summary Remove one user\'s own limit
227
+ * @param {string} username
228
+ * @param {*} [options] Override http request option.
229
+ * @throws {RequiredError}
230
+ */
231
+ clearUserQuota(username, options) {
232
+ return __awaiter(this, void 0, void 0, function* () {
233
+ var _a, _b, _c;
234
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.clearUserQuota(username, options);
235
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
236
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['QuotaAdministrationApi.clearUserQuota']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
237
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
238
+ });
239
+ },
240
+ /**
241
+ *
242
+ * @summary Get one user\'s storage
243
+ * @param {string} username
244
+ * @param {*} [options] Override http request option.
245
+ * @throws {RequiredError}
246
+ */
247
+ getUser(username, options) {
248
+ return __awaiter(this, void 0, void 0, function* () {
249
+ var _a, _b, _c;
250
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getUser(username, options);
251
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
252
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['QuotaAdministrationApi.getUser']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
253
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
254
+ });
255
+ },
256
+ /**
257
+ * Every user storage is charged to, with usage, effective limit and its source. Sort by usage (default), percent, limit or name.
258
+ * @summary List users\' storage
259
+ * @param {string} [search] Case-insensitive filter on the user name
260
+ * @param {string} [sort] usage | percent | limit | name
261
+ * @param {string} [order] asc | desc
262
+ * @param {number} [page]
263
+ * @param {number} [size]
264
+ * @param {*} [options] Override http request option.
265
+ * @throws {RequiredError}
266
+ */
267
+ listUsers(search, sort, order, page, size, options) {
268
+ return __awaiter(this, void 0, void 0, function* () {
269
+ var _a, _b, _c;
270
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listUsers(search, sort, order, page, size, options);
271
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
272
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['QuotaAdministrationApi.listUsers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
273
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
274
+ });
275
+ },
276
+ /**
277
+ * Deployment-wide limits (MB, 0 = no limit), instance usage and the number of user overrides.
278
+ * @summary Quota overview
279
+ * @param {*} [options] Override http request option.
280
+ * @throws {RequiredError}
281
+ */
282
+ overview(options) {
283
+ return __awaiter(this, void 0, void 0, function* () {
284
+ var _a, _b, _c;
285
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.overview(options);
286
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
287
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['QuotaAdministrationApi.overview']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
288
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
289
+ });
290
+ },
291
+ /**
292
+ * quotaMb > 0 = this user\'s limit, 0 = no limit for this user. Takes precedence over group and default limits.
293
+ * @summary Set one user\'s own limit
294
+ * @param {string} username
295
+ * @param {UserQuotaRequest} userQuotaRequest
296
+ * @param {*} [options] Override http request option.
297
+ * @throws {RequiredError}
298
+ */
299
+ setUserQuota(username, userQuotaRequest, options) {
300
+ return __awaiter(this, void 0, void 0, function* () {
301
+ var _a, _b, _c;
302
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.setUserQuota(username, userQuotaRequest, options);
303
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
304
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['QuotaAdministrationApi.setUserQuota']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
305
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
306
+ });
307
+ },
308
+ };
309
+ };
310
+ /**
311
+ * QuotaAdministrationApi - factory interface
312
+ */
313
+ export const QuotaAdministrationApiFactory = function (configuration, basePath, axios) {
314
+ const localVarFp = QuotaAdministrationApiFp(configuration);
315
+ return {
316
+ /**
317
+ * The group or default limit applies again.
318
+ * @summary Remove one user\'s own limit
319
+ * @param {string} username
320
+ * @param {*} [options] Override http request option.
321
+ * @throws {RequiredError}
322
+ */
323
+ clearUserQuota(username, options) {
324
+ return localVarFp.clearUserQuota(username, options).then((request) => request(axios, basePath));
325
+ },
326
+ /**
327
+ *
328
+ * @summary Get one user\'s storage
329
+ * @param {string} username
330
+ * @param {*} [options] Override http request option.
331
+ * @throws {RequiredError}
332
+ */
333
+ getUser(username, options) {
334
+ return localVarFp.getUser(username, options).then((request) => request(axios, basePath));
335
+ },
336
+ /**
337
+ * Every user storage is charged to, with usage, effective limit and its source. Sort by usage (default), percent, limit or name.
338
+ * @summary List users\' storage
339
+ * @param {string} [search] Case-insensitive filter on the user name
340
+ * @param {string} [sort] usage | percent | limit | name
341
+ * @param {string} [order] asc | desc
342
+ * @param {number} [page]
343
+ * @param {number} [size]
344
+ * @param {*} [options] Override http request option.
345
+ * @throws {RequiredError}
346
+ */
347
+ listUsers(search, sort, order, page, size, options) {
348
+ return localVarFp.listUsers(search, sort, order, page, size, options).then((request) => request(axios, basePath));
349
+ },
350
+ /**
351
+ * Deployment-wide limits (MB, 0 = no limit), instance usage and the number of user overrides.
352
+ * @summary Quota overview
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ overview(options) {
357
+ return localVarFp.overview(options).then((request) => request(axios, basePath));
358
+ },
359
+ /**
360
+ * quotaMb > 0 = this user\'s limit, 0 = no limit for this user. Takes precedence over group and default limits.
361
+ * @summary Set one user\'s own limit
362
+ * @param {string} username
363
+ * @param {UserQuotaRequest} userQuotaRequest
364
+ * @param {*} [options] Override http request option.
365
+ * @throws {RequiredError}
366
+ */
367
+ setUserQuota(username, userQuotaRequest, options) {
368
+ return localVarFp.setUserQuota(username, userQuotaRequest, options).then((request) => request(axios, basePath));
369
+ },
370
+ };
371
+ };
372
+ /**
373
+ * QuotaAdministrationApi - object-oriented interface
374
+ */
375
+ export class QuotaAdministrationApi extends BaseAPI {
376
+ /**
377
+ * The group or default limit applies again.
378
+ * @summary Remove one user\'s own limit
379
+ * @param {string} username
380
+ * @param {*} [options] Override http request option.
381
+ * @throws {RequiredError}
382
+ */
383
+ clearUserQuota(username, options) {
384
+ return QuotaAdministrationApiFp(this.configuration).clearUserQuota(username, options).then((request) => request(this.axios, this.basePath));
385
+ }
386
+ /**
387
+ *
388
+ * @summary Get one user\'s storage
389
+ * @param {string} username
390
+ * @param {*} [options] Override http request option.
391
+ * @throws {RequiredError}
392
+ */
393
+ getUser(username, options) {
394
+ return QuotaAdministrationApiFp(this.configuration).getUser(username, options).then((request) => request(this.axios, this.basePath));
395
+ }
396
+ /**
397
+ * Every user storage is charged to, with usage, effective limit and its source. Sort by usage (default), percent, limit or name.
398
+ * @summary List users\' storage
399
+ * @param {string} [search] Case-insensitive filter on the user name
400
+ * @param {string} [sort] usage | percent | limit | name
401
+ * @param {string} [order] asc | desc
402
+ * @param {number} [page]
403
+ * @param {number} [size]
404
+ * @param {*} [options] Override http request option.
405
+ * @throws {RequiredError}
406
+ */
407
+ listUsers(search, sort, order, page, size, options) {
408
+ return QuotaAdministrationApiFp(this.configuration).listUsers(search, sort, order, page, size, options).then((request) => request(this.axios, this.basePath));
409
+ }
410
+ /**
411
+ * Deployment-wide limits (MB, 0 = no limit), instance usage and the number of user overrides.
412
+ * @summary Quota overview
413
+ * @param {*} [options] Override http request option.
414
+ * @throws {RequiredError}
415
+ */
416
+ overview(options) {
417
+ return QuotaAdministrationApiFp(this.configuration).overview(options).then((request) => request(this.axios, this.basePath));
418
+ }
419
+ /**
420
+ * quotaMb > 0 = this user\'s limit, 0 = no limit for this user. Takes precedence over group and default limits.
421
+ * @summary Set one user\'s own limit
422
+ * @param {string} username
423
+ * @param {UserQuotaRequest} userQuotaRequest
424
+ * @param {*} [options] Override http request option.
425
+ * @throws {RequiredError}
426
+ */
427
+ setUserQuota(username, userQuotaRequest, options) {
428
+ return QuotaAdministrationApiFp(this.configuration).setUserQuota(username, userQuotaRequest, options).then((request) => request(this.axios, this.basePath));
429
+ }
430
+ }
@@ -0,0 +1,63 @@
1
+ /**
2
+ * openfilz-api
3
+ * API for Document Management System
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ import type { Configuration } from '../configuration';
13
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
14
+ import { type RequestArgs, BaseAPI } from '../base';
15
+ import type { MyStorageQuota } from '../models';
16
+ /**
17
+ * QuotasApi - axios parameter creator
18
+ */
19
+ export declare const QuotasApiAxiosParamCreator: (configuration?: Configuration) => {
20
+ /**
21
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
22
+ * @summary Get my storage quota
23
+ * @param {*} [options] Override http request option.
24
+ * @throws {RequiredError}
25
+ */
26
+ myQuota: (options?: RawAxiosRequestConfig) => Promise<RequestArgs>;
27
+ };
28
+ /**
29
+ * QuotasApi - functional programming interface
30
+ */
31
+ export declare const QuotasApiFp: (configuration?: Configuration) => {
32
+ /**
33
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
34
+ * @summary Get my storage quota
35
+ * @param {*} [options] Override http request option.
36
+ * @throws {RequiredError}
37
+ */
38
+ myQuota(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<MyStorageQuota>>;
39
+ };
40
+ /**
41
+ * QuotasApi - factory interface
42
+ */
43
+ export declare const QuotasApiFactory: (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) => {
44
+ /**
45
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
46
+ * @summary Get my storage quota
47
+ * @param {*} [options] Override http request option.
48
+ * @throws {RequiredError}
49
+ */
50
+ myQuota(options?: RawAxiosRequestConfig): AxiosPromise<MyStorageQuota>;
51
+ };
52
+ /**
53
+ * QuotasApi - object-oriented interface
54
+ */
55
+ export declare class QuotasApi extends BaseAPI {
56
+ /**
57
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
58
+ * @summary Get my storage quota
59
+ * @param {*} [options] Override http request option.
60
+ * @throws {RequiredError}
61
+ */
62
+ myQuota(options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<MyStorageQuota, any, {}>>;
63
+ }
@@ -0,0 +1,118 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * openfilz-api
5
+ * API for Document Management System
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, setBearerAuthToObject, setSearchParams, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * QuotasApi - axios parameter creator
31
+ */
32
+ export const QuotasApiAxiosParamCreator = function (configuration) {
33
+ return {
34
+ /**
35
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
36
+ * @summary Get my storage quota
37
+ * @param {*} [options] Override http request option.
38
+ * @throws {RequiredError}
39
+ */
40
+ myQuota: (...args_1) => __awaiter(this, [...args_1], void 0, function* (options = {}) {
41
+ const localVarPath = `/api/v1/quotas/me`;
42
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
43
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
44
+ let baseOptions;
45
+ if (configuration) {
46
+ baseOptions = configuration.baseOptions;
47
+ }
48
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
49
+ const localVarHeaderParameter = {};
50
+ const localVarQueryParameter = {};
51
+ // authentication keycloak_auth required
52
+ // http bearer authentication required
53
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
54
+ localVarHeaderParameter['Accept'] = '*/*';
55
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
56
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
57
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
58
+ return {
59
+ url: toPathString(localVarUrlObj),
60
+ options: localVarRequestOptions,
61
+ };
62
+ }),
63
+ };
64
+ };
65
+ /**
66
+ * QuotasApi - functional programming interface
67
+ */
68
+ export const QuotasApiFp = function (configuration) {
69
+ const localVarAxiosParamCreator = QuotasApiAxiosParamCreator(configuration);
70
+ return {
71
+ /**
72
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
73
+ * @summary Get my storage quota
74
+ * @param {*} [options] Override http request option.
75
+ * @throws {RequiredError}
76
+ */
77
+ myQuota(options) {
78
+ return __awaiter(this, void 0, void 0, function* () {
79
+ var _a, _b, _c;
80
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.myQuota(options);
81
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
82
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['QuotasApi.myQuota']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
83
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
84
+ });
85
+ },
86
+ };
87
+ };
88
+ /**
89
+ * QuotasApi - factory interface
90
+ */
91
+ export const QuotasApiFactory = function (configuration, basePath, axios) {
92
+ const localVarFp = QuotasApiFp(configuration);
93
+ return {
94
+ /**
95
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
96
+ * @summary Get my storage quota
97
+ * @param {*} [options] Override http request option.
98
+ * @throws {RequiredError}
99
+ */
100
+ myQuota(options) {
101
+ return localVarFp.myQuota(options).then((request) => request(axios, basePath));
102
+ },
103
+ };
104
+ };
105
+ /**
106
+ * QuotasApi - object-oriented interface
107
+ */
108
+ export class QuotasApi extends BaseAPI {
109
+ /**
110
+ * The caller\'s used bytes, effective limit (null = unlimited) and where it comes from (USER override, GROUP, DEFAULT), plus the per-file upload limit.
111
+ * @summary Get my storage quota
112
+ * @param {*} [options] Override http request option.
113
+ * @throws {RequiredError}
114
+ */
115
+ myQuota(options) {
116
+ return QuotasApiFp(this.configuration).myQuota(options).then((request) => request(this.axios, this.basePath));
117
+ }
118
+ }
@@ -123,7 +123,7 @@ export declare const TusControllerApiFp: (configuration?: Configuration) => {
123
123
  * @param {*} [options] Override http request option.
124
124
  * @throws {RequiredError}
125
125
  */
126
- createUpload(uploadLength: number, uploadMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
126
+ createUpload(uploadLength: number, uploadMetadata?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
127
127
  /**
128
128
  * Completes the upload by moving the file to permanent storage and creating the Document record. Call this after all chunks have been successfully uploaded.
129
129
  * @summary Finalize upload
@@ -174,7 +174,7 @@ export declare const TusControllerApiFp: (configuration?: Configuration) => {
174
174
  * @param {*} [options] Override http request option.
175
175
  * @throws {RequiredError}
176
176
  */
177
- uploadChunk(uploadId: string, uploadOffset: number, requestBody: Array<any>, contentLength?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<void>>;
177
+ uploadChunk(uploadId: string, uploadOffset: number, requestBody: Array<any>, contentLength?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<object>>;
178
178
  };
179
179
  /**
180
180
  * TusControllerApi - factory interface
@@ -203,7 +203,7 @@ export declare const TusControllerApiFactory: (configuration?: Configuration, ba
203
203
  * @param {*} [options] Override http request option.
204
204
  * @throws {RequiredError}
205
205
  */
206
- createUpload(uploadLength: number, uploadMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise<void>;
206
+ createUpload(uploadLength: number, uploadMetadata?: string, options?: RawAxiosRequestConfig): AxiosPromise<object>;
207
207
  /**
208
208
  * Completes the upload by moving the file to permanent storage and creating the Document record. Call this after all chunks have been successfully uploaded.
209
209
  * @summary Finalize upload
@@ -254,7 +254,7 @@ export declare const TusControllerApiFactory: (configuration?: Configuration, ba
254
254
  * @param {*} [options] Override http request option.
255
255
  * @throws {RequiredError}
256
256
  */
257
- uploadChunk(uploadId: string, uploadOffset: number, requestBody: Array<any>, contentLength?: number, options?: RawAxiosRequestConfig): AxiosPromise<void>;
257
+ uploadChunk(uploadId: string, uploadOffset: number, requestBody: Array<any>, contentLength?: number, options?: RawAxiosRequestConfig): AxiosPromise<object>;
258
258
  };
259
259
  /**
260
260
  * TusControllerApi - object-oriented interface
@@ -283,7 +283,7 @@ export declare class TusControllerApi extends BaseAPI {
283
283
  * @param {*} [options] Override http request option.
284
284
  * @throws {RequiredError}
285
285
  */
286
- createUpload(uploadLength: number, uploadMetadata?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
286
+ createUpload(uploadLength: number, uploadMetadata?: string, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
287
287
  /**
288
288
  * Completes the upload by moving the file to permanent storage and creating the Document record. Call this after all chunks have been successfully uploaded.
289
289
  * @summary Finalize upload
@@ -334,5 +334,5 @@ export declare class TusControllerApi extends BaseAPI {
334
334
  * @param {*} [options] Override http request option.
335
335
  * @throws {RequiredError}
336
336
  */
337
- uploadChunk(uploadId: string, uploadOffset: number, requestBody: Array<any>, contentLength?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<void, any, {}>>;
337
+ uploadChunk(uploadId: string, uploadOffset: number, requestBody: Array<any>, contentLength?: number, options?: RawAxiosRequestConfig): Promise<import("axios").AxiosResponse<object, any, {}>>;
338
338
  }