@openfilz-sdk/typescript-ee 1.12.16 → 1.12.18

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 (88) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  3. package/README.md +21 -2
  4. package/api/ownership-api.ts +1076 -0
  5. package/api/sharing-api.ts +210 -0
  6. package/api.ts +2 -0
  7. package/dist/api/ownership-api.d.ts +505 -0
  8. package/dist/api/ownership-api.js +1015 -0
  9. package/dist/api/sharing-api.d.ts +104 -0
  10. package/dist/api/sharing-api.js +209 -0
  11. package/dist/api.d.ts +2 -0
  12. package/dist/api.js +2 -0
  13. package/dist/esm/api/ownership-api.d.ts +505 -0
  14. package/dist/esm/api/ownership-api.js +1008 -0
  15. package/dist/esm/api/sharing-api.d.ts +104 -0
  16. package/dist/esm/api/sharing-api.js +202 -0
  17. package/dist/esm/api.d.ts +2 -0
  18. package/dist/esm/api.js +2 -0
  19. package/dist/esm/models/enriched-audit-log.d.ts +9 -0
  20. package/dist/esm/models/enriched-audit-log.js +9 -0
  21. package/dist/esm/models/index.d.ts +7 -0
  22. package/dist/esm/models/index.js +7 -0
  23. package/dist/esm/models/notification-dto.d.ts +2 -0
  24. package/dist/esm/models/notification-dto.js +2 -0
  25. package/dist/esm/models/owned-document.d.ts +25 -0
  26. package/dist/esm/models/owned-document.js +17 -0
  27. package/dist/esm/models/owned-documents-filter.d.ts +45 -0
  28. package/dist/esm/models/owned-documents-filter.js +17 -0
  29. package/dist/esm/models/ownership-transfer-report.d.ts +29 -0
  30. package/dist/esm/models/ownership-transfer-report.js +14 -0
  31. package/dist/esm/models/ownership-transfer-request.d.ts +53 -0
  32. package/dist/esm/models/ownership-transfer-request.js +18 -0
  33. package/dist/esm/models/quota-check.d.ts +17 -0
  34. package/dist/esm/models/quota-check.js +14 -0
  35. package/dist/esm/models/search-by-audit-log-request.d.ts +9 -0
  36. package/dist/esm/models/search-by-audit-log-request.js +9 -0
  37. package/dist/esm/models/share-inheritance-request.d.ts +14 -0
  38. package/dist/esm/models/share-inheritance-request.js +14 -0
  39. package/dist/esm/models/share-inheritance.d.ts +16 -0
  40. package/dist/esm/models/share-inheritance.js +14 -0
  41. package/dist/esm/models/user-registration-request.d.ts +1 -0
  42. package/dist/models/enriched-audit-log.d.ts +9 -0
  43. package/dist/models/enriched-audit-log.js +9 -0
  44. package/dist/models/index.d.ts +7 -0
  45. package/dist/models/index.js +7 -0
  46. package/dist/models/notification-dto.d.ts +2 -0
  47. package/dist/models/notification-dto.js +2 -0
  48. package/dist/models/owned-document.d.ts +25 -0
  49. package/dist/models/owned-document.js +20 -0
  50. package/dist/models/owned-documents-filter.d.ts +45 -0
  51. package/dist/models/owned-documents-filter.js +20 -0
  52. package/dist/models/ownership-transfer-report.d.ts +29 -0
  53. package/dist/models/ownership-transfer-report.js +15 -0
  54. package/dist/models/ownership-transfer-request.d.ts +53 -0
  55. package/dist/models/ownership-transfer-request.js +21 -0
  56. package/dist/models/quota-check.d.ts +17 -0
  57. package/dist/models/quota-check.js +15 -0
  58. package/dist/models/search-by-audit-log-request.d.ts +9 -0
  59. package/dist/models/search-by-audit-log-request.js +9 -0
  60. package/dist/models/share-inheritance-request.d.ts +14 -0
  61. package/dist/models/share-inheritance-request.js +15 -0
  62. package/dist/models/share-inheritance.d.ts +16 -0
  63. package/dist/models/share-inheritance.js +15 -0
  64. package/dist/models/user-registration-request.d.ts +1 -0
  65. package/docs/OwnedDocument.md +32 -0
  66. package/docs/OwnedDocumentsFilter.md +31 -0
  67. package/docs/OwnershipApi.md +621 -0
  68. package/docs/OwnershipTransferReport.md +48 -0
  69. package/docs/OwnershipTransferRequest.md +37 -0
  70. package/docs/QuotaCheck.md +26 -0
  71. package/docs/ShareInheritance.md +24 -0
  72. package/docs/ShareInheritanceRequest.md +20 -0
  73. package/docs/SharingApi.md +114 -0
  74. package/docs/UserRegistrationRequest.md +2 -0
  75. package/models/enriched-audit-log-details.ts +26 -0
  76. package/models/enriched-audit-log.ts +9 -0
  77. package/models/index.ts +7 -0
  78. package/models/notification-dto.ts +2 -0
  79. package/models/owned-document.ts +34 -0
  80. package/models/owned-documents-filter.ts +54 -0
  81. package/models/ownership-transfer-report.ts +37 -0
  82. package/models/ownership-transfer-request.ts +64 -0
  83. package/models/quota-check.ts +23 -0
  84. package/models/search-by-audit-log-request.ts +9 -0
  85. package/models/share-inheritance-request.ts +20 -0
  86. package/models/share-inheritance.ts +22 -0
  87. package/models/user-registration-request.ts +1 -0
  88. package/package.json +1 -1
@@ -0,0 +1,1015 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * openfilz-api
6
+ * API for Document Management System
7
+ *
8
+ * The version of the OpenAPI document: 1.0.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
16
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
17
+ return new (P || (P = Promise))(function (resolve, reject) {
18
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
19
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
20
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
21
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
22
+ });
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ exports.ListOwnedDocumentsTypeEnum = exports.CountOwnedDocumentsTypeEnum = exports.AdminListOwnedDocumentsTypeEnum = exports.AdminCountOwnedDocumentsTypeEnum = exports.OwnershipApi = exports.OwnershipApiFactory = exports.OwnershipApiFp = exports.OwnershipApiAxiosParamCreator = void 0;
26
+ const axios_1 = require("axios");
27
+ // Some imports not used depending on template conditions
28
+ // @ts-ignore
29
+ const common_1 = require("../common");
30
+ // @ts-ignore
31
+ const base_1 = require("../base");
32
+ /**
33
+ * OwnershipApi - axios parameter creator
34
+ */
35
+ const OwnershipApiAxiosParamCreator = function (configuration) {
36
+ return {
37
+ /**
38
+ *
39
+ * @summary Count the documents a user owns (same filter as the listing)
40
+ * @param {string} userId
41
+ * @param {string} [parentId]
42
+ * @param {boolean} [recursive]
43
+ * @param {AdminCountOwnedDocumentsTypeEnum} [type]
44
+ * @param {string} [name]
45
+ * @param {string} [updatedAfter]
46
+ * @param {string} [updatedBefore]
47
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
48
+ * @param {*} [options] Override http request option.
49
+ * @throws {RequiredError}
50
+ */
51
+ adminCountOwnedDocuments: (userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, xOpenFilzReason_1, ...args_1) => __awaiter(this, [userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, xOpenFilzReason_1, ...args_1], void 0, function* (userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options = {}) {
52
+ // verify required parameter 'userId' is not null or undefined
53
+ (0, common_1.assertParamExists)('adminCountOwnedDocuments', 'userId', userId);
54
+ const localVarPath = `/api/v1/admin/ownership/users/{userId}/documents/count`
55
+ .replace('{userId}', encodeURIComponent(String(userId)));
56
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
57
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
58
+ let baseOptions;
59
+ if (configuration) {
60
+ baseOptions = configuration.baseOptions;
61
+ }
62
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
63
+ const localVarHeaderParameter = {};
64
+ const localVarQueryParameter = {};
65
+ // authentication keycloak_auth required
66
+ // http bearer authentication required
67
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
68
+ if (parentId !== undefined) {
69
+ localVarQueryParameter['parentId'] = parentId;
70
+ }
71
+ if (recursive !== undefined) {
72
+ localVarQueryParameter['recursive'] = recursive;
73
+ }
74
+ if (type !== undefined) {
75
+ localVarQueryParameter['type'] = type;
76
+ }
77
+ if (name !== undefined) {
78
+ localVarQueryParameter['name'] = name;
79
+ }
80
+ if (updatedAfter !== undefined) {
81
+ localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ?
82
+ updatedAfter.toISOString() :
83
+ updatedAfter;
84
+ }
85
+ if (updatedBefore !== undefined) {
86
+ localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ?
87
+ updatedBefore.toISOString() :
88
+ updatedBefore;
89
+ }
90
+ localVarHeaderParameter['Accept'] = '*/*';
91
+ if (xOpenFilzReason != null) {
92
+ localVarHeaderParameter['X-OpenFilz-Reason'] = String(xOpenFilzReason);
93
+ }
94
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
95
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
96
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
97
+ return {
98
+ url: (0, common_1.toPathString)(localVarUrlObj),
99
+ options: localVarRequestOptions,
100
+ };
101
+ }),
102
+ /**
103
+ *
104
+ * @summary A transfer\'s progress and outcome
105
+ * @param {string} jobId
106
+ * @param {*} [options] Override http request option.
107
+ * @throws {RequiredError}
108
+ */
109
+ adminGetOwnershipTransfer: (jobId_1, ...args_1) => __awaiter(this, [jobId_1, ...args_1], void 0, function* (jobId, options = {}) {
110
+ // verify required parameter 'jobId' is not null or undefined
111
+ (0, common_1.assertParamExists)('adminGetOwnershipTransfer', 'jobId', jobId);
112
+ const localVarPath = `/api/v1/admin/ownership/transfers/{jobId}`
113
+ .replace('{jobId}', encodeURIComponent(String(jobId)));
114
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
115
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
116
+ let baseOptions;
117
+ if (configuration) {
118
+ baseOptions = configuration.baseOptions;
119
+ }
120
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
121
+ const localVarHeaderParameter = {};
122
+ const localVarQueryParameter = {};
123
+ // authentication keycloak_auth required
124
+ // http bearer authentication required
125
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
126
+ localVarHeaderParameter['Accept'] = '*/*';
127
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
128
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
129
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
130
+ return {
131
+ url: (0, common_1.toPathString)(localVarUrlObj),
132
+ options: localVarRequestOptions,
133
+ };
134
+ }),
135
+ /**
136
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
137
+ * @summary List the documents a user owns
138
+ * @param {string} userId
139
+ * @param {string} [parentId]
140
+ * @param {boolean} [recursive]
141
+ * @param {AdminListOwnedDocumentsTypeEnum} [type]
142
+ * @param {string} [name]
143
+ * @param {string} [updatedAfter]
144
+ * @param {string} [updatedBefore]
145
+ * @param {number} [page]
146
+ * @param {number} [size]
147
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
148
+ * @param {*} [options] Override http request option.
149
+ * @throws {RequiredError}
150
+ */
151
+ adminListOwnedDocuments: (userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, page_1, size_1, xOpenFilzReason_1, ...args_1) => __awaiter(this, [userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, page_1, size_1, xOpenFilzReason_1, ...args_1], void 0, function* (userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options = {}) {
152
+ // verify required parameter 'userId' is not null or undefined
153
+ (0, common_1.assertParamExists)('adminListOwnedDocuments', 'userId', userId);
154
+ const localVarPath = `/api/v1/admin/ownership/users/{userId}/documents`
155
+ .replace('{userId}', encodeURIComponent(String(userId)));
156
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
157
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
158
+ let baseOptions;
159
+ if (configuration) {
160
+ baseOptions = configuration.baseOptions;
161
+ }
162
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
163
+ const localVarHeaderParameter = {};
164
+ const localVarQueryParameter = {};
165
+ // authentication keycloak_auth required
166
+ // http bearer authentication required
167
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
168
+ if (parentId !== undefined) {
169
+ localVarQueryParameter['parentId'] = parentId;
170
+ }
171
+ if (recursive !== undefined) {
172
+ localVarQueryParameter['recursive'] = recursive;
173
+ }
174
+ if (type !== undefined) {
175
+ localVarQueryParameter['type'] = type;
176
+ }
177
+ if (name !== undefined) {
178
+ localVarQueryParameter['name'] = name;
179
+ }
180
+ if (updatedAfter !== undefined) {
181
+ localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ?
182
+ updatedAfter.toISOString() :
183
+ updatedAfter;
184
+ }
185
+ if (updatedBefore !== undefined) {
186
+ localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ?
187
+ updatedBefore.toISOString() :
188
+ updatedBefore;
189
+ }
190
+ if (page !== undefined) {
191
+ localVarQueryParameter['page'] = page;
192
+ }
193
+ if (size !== undefined) {
194
+ localVarQueryParameter['size'] = size;
195
+ }
196
+ localVarHeaderParameter['Accept'] = '*/*';
197
+ if (xOpenFilzReason != null) {
198
+ localVarHeaderParameter['X-OpenFilz-Reason'] = String(xOpenFilzReason);
199
+ }
200
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
201
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
202
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
203
+ return {
204
+ url: (0, common_1.toPathString)(localVarUrlObj),
205
+ options: localVarRequestOptions,
206
+ };
207
+ }),
208
+ /**
209
+ *
210
+ * @summary The last 50 transfers from or to a user
211
+ * @param {string} userId
212
+ * @param {*} [options] Override http request option.
213
+ * @throws {RequiredError}
214
+ */
215
+ adminListOwnershipTransfers: (userId_1, ...args_1) => __awaiter(this, [userId_1, ...args_1], void 0, function* (userId, options = {}) {
216
+ // verify required parameter 'userId' is not null or undefined
217
+ (0, common_1.assertParamExists)('adminListOwnershipTransfers', 'userId', userId);
218
+ const localVarPath = `/api/v1/admin/ownership/transfers`;
219
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
220
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
221
+ let baseOptions;
222
+ if (configuration) {
223
+ baseOptions = configuration.baseOptions;
224
+ }
225
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
226
+ const localVarHeaderParameter = {};
227
+ const localVarQueryParameter = {};
228
+ // authentication keycloak_auth required
229
+ // http bearer authentication required
230
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
231
+ if (userId !== undefined) {
232
+ localVarQueryParameter['userId'] = userId;
233
+ }
234
+ localVarHeaderParameter['Accept'] = '*/*';
235
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
236
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
237
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
238
+ return {
239
+ url: (0, common_1.toPathString)(localVarUrlObj),
240
+ options: localVarRequestOptions,
241
+ };
242
+ }),
243
+ /**
244
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
245
+ * @summary Transfer documents to another user
246
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
247
+ * @param {*} [options] Override http request option.
248
+ * @throws {RequiredError}
249
+ */
250
+ adminTransferOwnership: (ownershipTransferRequest_1, ...args_1) => __awaiter(this, [ownershipTransferRequest_1, ...args_1], void 0, function* (ownershipTransferRequest, options = {}) {
251
+ // verify required parameter 'ownershipTransferRequest' is not null or undefined
252
+ (0, common_1.assertParamExists)('adminTransferOwnership', 'ownershipTransferRequest', ownershipTransferRequest);
253
+ const localVarPath = `/api/v1/admin/ownership/transfers`;
254
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
255
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
256
+ let baseOptions;
257
+ if (configuration) {
258
+ baseOptions = configuration.baseOptions;
259
+ }
260
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
261
+ const localVarHeaderParameter = {};
262
+ const localVarQueryParameter = {};
263
+ // authentication keycloak_auth required
264
+ // http bearer authentication required
265
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
266
+ localVarHeaderParameter['Content-Type'] = 'application/json';
267
+ localVarHeaderParameter['Accept'] = '*/*';
268
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
269
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
270
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
271
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(ownershipTransferRequest, localVarRequestOptions, configuration);
272
+ return {
273
+ url: (0, common_1.toPathString)(localVarUrlObj),
274
+ options: localVarRequestOptions,
275
+ };
276
+ }),
277
+ /**
278
+ *
279
+ * @summary Count the documents a user owns (same filter as the listing)
280
+ * @param {string} userId
281
+ * @param {string} [parentId]
282
+ * @param {boolean} [recursive]
283
+ * @param {CountOwnedDocumentsTypeEnum} [type]
284
+ * @param {string} [name]
285
+ * @param {string} [updatedAfter]
286
+ * @param {string} [updatedBefore]
287
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
288
+ * @param {*} [options] Override http request option.
289
+ * @throws {RequiredError}
290
+ */
291
+ countOwnedDocuments: (userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, xOpenFilzReason_1, ...args_1) => __awaiter(this, [userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, xOpenFilzReason_1, ...args_1], void 0, function* (userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options = {}) {
292
+ // verify required parameter 'userId' is not null or undefined
293
+ (0, common_1.assertParamExists)('countOwnedDocuments', 'userId', userId);
294
+ const localVarPath = `/api/v1/users/ownership/users/{userId}/documents/count`
295
+ .replace('{userId}', encodeURIComponent(String(userId)));
296
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
297
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
298
+ let baseOptions;
299
+ if (configuration) {
300
+ baseOptions = configuration.baseOptions;
301
+ }
302
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
303
+ const localVarHeaderParameter = {};
304
+ const localVarQueryParameter = {};
305
+ // authentication keycloak_auth required
306
+ // http bearer authentication required
307
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
308
+ if (parentId !== undefined) {
309
+ localVarQueryParameter['parentId'] = parentId;
310
+ }
311
+ if (recursive !== undefined) {
312
+ localVarQueryParameter['recursive'] = recursive;
313
+ }
314
+ if (type !== undefined) {
315
+ localVarQueryParameter['type'] = type;
316
+ }
317
+ if (name !== undefined) {
318
+ localVarQueryParameter['name'] = name;
319
+ }
320
+ if (updatedAfter !== undefined) {
321
+ localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ?
322
+ updatedAfter.toISOString() :
323
+ updatedAfter;
324
+ }
325
+ if (updatedBefore !== undefined) {
326
+ localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ?
327
+ updatedBefore.toISOString() :
328
+ updatedBefore;
329
+ }
330
+ localVarHeaderParameter['Accept'] = '*/*';
331
+ if (xOpenFilzReason != null) {
332
+ localVarHeaderParameter['X-OpenFilz-Reason'] = String(xOpenFilzReason);
333
+ }
334
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
335
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
336
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
337
+ return {
338
+ url: (0, common_1.toPathString)(localVarUrlObj),
339
+ options: localVarRequestOptions,
340
+ };
341
+ }),
342
+ /**
343
+ *
344
+ * @summary A transfer\'s progress and outcome
345
+ * @param {string} jobId
346
+ * @param {*} [options] Override http request option.
347
+ * @throws {RequiredError}
348
+ */
349
+ getOwnershipTransfer: (jobId_1, ...args_1) => __awaiter(this, [jobId_1, ...args_1], void 0, function* (jobId, options = {}) {
350
+ // verify required parameter 'jobId' is not null or undefined
351
+ (0, common_1.assertParamExists)('getOwnershipTransfer', 'jobId', jobId);
352
+ const localVarPath = `/api/v1/users/ownership/transfers/{jobId}`
353
+ .replace('{jobId}', encodeURIComponent(String(jobId)));
354
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
355
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
356
+ let baseOptions;
357
+ if (configuration) {
358
+ baseOptions = configuration.baseOptions;
359
+ }
360
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
361
+ const localVarHeaderParameter = {};
362
+ const localVarQueryParameter = {};
363
+ // authentication keycloak_auth required
364
+ // http bearer authentication required
365
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
366
+ localVarHeaderParameter['Accept'] = '*/*';
367
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
368
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
369
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
370
+ return {
371
+ url: (0, common_1.toPathString)(localVarUrlObj),
372
+ options: localVarRequestOptions,
373
+ };
374
+ }),
375
+ /**
376
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
377
+ * @summary List the documents a user owns
378
+ * @param {string} userId
379
+ * @param {string} [parentId]
380
+ * @param {boolean} [recursive]
381
+ * @param {ListOwnedDocumentsTypeEnum} [type]
382
+ * @param {string} [name]
383
+ * @param {string} [updatedAfter]
384
+ * @param {string} [updatedBefore]
385
+ * @param {number} [page]
386
+ * @param {number} [size]
387
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
388
+ * @param {*} [options] Override http request option.
389
+ * @throws {RequiredError}
390
+ */
391
+ listOwnedDocuments: (userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, page_1, size_1, xOpenFilzReason_1, ...args_1) => __awaiter(this, [userId_1, parentId_1, recursive_1, type_1, name_1, updatedAfter_1, updatedBefore_1, page_1, size_1, xOpenFilzReason_1, ...args_1], void 0, function* (userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options = {}) {
392
+ // verify required parameter 'userId' is not null or undefined
393
+ (0, common_1.assertParamExists)('listOwnedDocuments', 'userId', userId);
394
+ const localVarPath = `/api/v1/users/ownership/users/{userId}/documents`
395
+ .replace('{userId}', encodeURIComponent(String(userId)));
396
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
397
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
398
+ let baseOptions;
399
+ if (configuration) {
400
+ baseOptions = configuration.baseOptions;
401
+ }
402
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
403
+ const localVarHeaderParameter = {};
404
+ const localVarQueryParameter = {};
405
+ // authentication keycloak_auth required
406
+ // http bearer authentication required
407
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
408
+ if (parentId !== undefined) {
409
+ localVarQueryParameter['parentId'] = parentId;
410
+ }
411
+ if (recursive !== undefined) {
412
+ localVarQueryParameter['recursive'] = recursive;
413
+ }
414
+ if (type !== undefined) {
415
+ localVarQueryParameter['type'] = type;
416
+ }
417
+ if (name !== undefined) {
418
+ localVarQueryParameter['name'] = name;
419
+ }
420
+ if (updatedAfter !== undefined) {
421
+ localVarQueryParameter['updatedAfter'] = (updatedAfter instanceof Date) ?
422
+ updatedAfter.toISOString() :
423
+ updatedAfter;
424
+ }
425
+ if (updatedBefore !== undefined) {
426
+ localVarQueryParameter['updatedBefore'] = (updatedBefore instanceof Date) ?
427
+ updatedBefore.toISOString() :
428
+ updatedBefore;
429
+ }
430
+ if (page !== undefined) {
431
+ localVarQueryParameter['page'] = page;
432
+ }
433
+ if (size !== undefined) {
434
+ localVarQueryParameter['size'] = size;
435
+ }
436
+ localVarHeaderParameter['Accept'] = '*/*';
437
+ if (xOpenFilzReason != null) {
438
+ localVarHeaderParameter['X-OpenFilz-Reason'] = String(xOpenFilzReason);
439
+ }
440
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
441
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
442
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
443
+ return {
444
+ url: (0, common_1.toPathString)(localVarUrlObj),
445
+ options: localVarRequestOptions,
446
+ };
447
+ }),
448
+ /**
449
+ *
450
+ * @summary The last 50 transfers from or to a user
451
+ * @param {string} userId
452
+ * @param {*} [options] Override http request option.
453
+ * @throws {RequiredError}
454
+ */
455
+ listOwnershipTransfers: (userId_1, ...args_1) => __awaiter(this, [userId_1, ...args_1], void 0, function* (userId, options = {}) {
456
+ // verify required parameter 'userId' is not null or undefined
457
+ (0, common_1.assertParamExists)('listOwnershipTransfers', 'userId', userId);
458
+ const localVarPath = `/api/v1/users/ownership/transfers`;
459
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
460
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
461
+ let baseOptions;
462
+ if (configuration) {
463
+ baseOptions = configuration.baseOptions;
464
+ }
465
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
466
+ const localVarHeaderParameter = {};
467
+ const localVarQueryParameter = {};
468
+ // authentication keycloak_auth required
469
+ // http bearer authentication required
470
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
471
+ if (userId !== undefined) {
472
+ localVarQueryParameter['userId'] = userId;
473
+ }
474
+ localVarHeaderParameter['Accept'] = '*/*';
475
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
476
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
477
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
478
+ return {
479
+ url: (0, common_1.toPathString)(localVarUrlObj),
480
+ options: localVarRequestOptions,
481
+ };
482
+ }),
483
+ /**
484
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
485
+ * @summary Transfer documents to another user
486
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
487
+ * @param {*} [options] Override http request option.
488
+ * @throws {RequiredError}
489
+ */
490
+ transferOwnership: (ownershipTransferRequest_1, ...args_1) => __awaiter(this, [ownershipTransferRequest_1, ...args_1], void 0, function* (ownershipTransferRequest, options = {}) {
491
+ // verify required parameter 'ownershipTransferRequest' is not null or undefined
492
+ (0, common_1.assertParamExists)('transferOwnership', 'ownershipTransferRequest', ownershipTransferRequest);
493
+ const localVarPath = `/api/v1/users/ownership/transfers`;
494
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
495
+ const localVarUrlObj = new URL(localVarPath, common_1.DUMMY_BASE_URL);
496
+ let baseOptions;
497
+ if (configuration) {
498
+ baseOptions = configuration.baseOptions;
499
+ }
500
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
501
+ const localVarHeaderParameter = {};
502
+ const localVarQueryParameter = {};
503
+ // authentication keycloak_auth required
504
+ // http bearer authentication required
505
+ yield (0, common_1.setBearerAuthToObject)(localVarHeaderParameter, configuration);
506
+ localVarHeaderParameter['Content-Type'] = 'application/json';
507
+ localVarHeaderParameter['Accept'] = '*/*';
508
+ (0, common_1.setSearchParams)(localVarUrlObj, localVarQueryParameter);
509
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
510
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
511
+ localVarRequestOptions.data = (0, common_1.serializeDataIfNeeded)(ownershipTransferRequest, localVarRequestOptions, configuration);
512
+ return {
513
+ url: (0, common_1.toPathString)(localVarUrlObj),
514
+ options: localVarRequestOptions,
515
+ };
516
+ }),
517
+ };
518
+ };
519
+ exports.OwnershipApiAxiosParamCreator = OwnershipApiAxiosParamCreator;
520
+ /**
521
+ * OwnershipApi - functional programming interface
522
+ */
523
+ const OwnershipApiFp = function (configuration) {
524
+ const localVarAxiosParamCreator = (0, exports.OwnershipApiAxiosParamCreator)(configuration);
525
+ return {
526
+ /**
527
+ *
528
+ * @summary Count the documents a user owns (same filter as the listing)
529
+ * @param {string} userId
530
+ * @param {string} [parentId]
531
+ * @param {boolean} [recursive]
532
+ * @param {AdminCountOwnedDocumentsTypeEnum} [type]
533
+ * @param {string} [name]
534
+ * @param {string} [updatedAfter]
535
+ * @param {string} [updatedBefore]
536
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
537
+ * @param {*} [options] Override http request option.
538
+ * @throws {RequiredError}
539
+ */
540
+ adminCountOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options) {
541
+ return __awaiter(this, void 0, void 0, function* () {
542
+ var _a, _b, _c;
543
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminCountOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options);
544
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
545
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.adminCountOwnedDocuments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
546
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
547
+ });
548
+ },
549
+ /**
550
+ *
551
+ * @summary A transfer\'s progress and outcome
552
+ * @param {string} jobId
553
+ * @param {*} [options] Override http request option.
554
+ * @throws {RequiredError}
555
+ */
556
+ adminGetOwnershipTransfer(jobId, options) {
557
+ return __awaiter(this, void 0, void 0, function* () {
558
+ var _a, _b, _c;
559
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminGetOwnershipTransfer(jobId, options);
560
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
561
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.adminGetOwnershipTransfer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
562
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
563
+ });
564
+ },
565
+ /**
566
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
567
+ * @summary List the documents a user owns
568
+ * @param {string} userId
569
+ * @param {string} [parentId]
570
+ * @param {boolean} [recursive]
571
+ * @param {AdminListOwnedDocumentsTypeEnum} [type]
572
+ * @param {string} [name]
573
+ * @param {string} [updatedAfter]
574
+ * @param {string} [updatedBefore]
575
+ * @param {number} [page]
576
+ * @param {number} [size]
577
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
578
+ * @param {*} [options] Override http request option.
579
+ * @throws {RequiredError}
580
+ */
581
+ adminListOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options) {
582
+ return __awaiter(this, void 0, void 0, function* () {
583
+ var _a, _b, _c;
584
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminListOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options);
585
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
586
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.adminListOwnedDocuments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
587
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
588
+ });
589
+ },
590
+ /**
591
+ *
592
+ * @summary The last 50 transfers from or to a user
593
+ * @param {string} userId
594
+ * @param {*} [options] Override http request option.
595
+ * @throws {RequiredError}
596
+ */
597
+ adminListOwnershipTransfers(userId, options) {
598
+ return __awaiter(this, void 0, void 0, function* () {
599
+ var _a, _b, _c;
600
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminListOwnershipTransfers(userId, options);
601
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
602
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.adminListOwnershipTransfers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
603
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
604
+ });
605
+ },
606
+ /**
607
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
608
+ * @summary Transfer documents to another user
609
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
610
+ * @param {*} [options] Override http request option.
611
+ * @throws {RequiredError}
612
+ */
613
+ adminTransferOwnership(ownershipTransferRequest, options) {
614
+ return __awaiter(this, void 0, void 0, function* () {
615
+ var _a, _b, _c;
616
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.adminTransferOwnership(ownershipTransferRequest, options);
617
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
618
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.adminTransferOwnership']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
619
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
620
+ });
621
+ },
622
+ /**
623
+ *
624
+ * @summary Count the documents a user owns (same filter as the listing)
625
+ * @param {string} userId
626
+ * @param {string} [parentId]
627
+ * @param {boolean} [recursive]
628
+ * @param {CountOwnedDocumentsTypeEnum} [type]
629
+ * @param {string} [name]
630
+ * @param {string} [updatedAfter]
631
+ * @param {string} [updatedBefore]
632
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
633
+ * @param {*} [options] Override http request option.
634
+ * @throws {RequiredError}
635
+ */
636
+ countOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options) {
637
+ return __awaiter(this, void 0, void 0, function* () {
638
+ var _a, _b, _c;
639
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.countOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options);
640
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
641
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.countOwnedDocuments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
642
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
643
+ });
644
+ },
645
+ /**
646
+ *
647
+ * @summary A transfer\'s progress and outcome
648
+ * @param {string} jobId
649
+ * @param {*} [options] Override http request option.
650
+ * @throws {RequiredError}
651
+ */
652
+ getOwnershipTransfer(jobId, options) {
653
+ return __awaiter(this, void 0, void 0, function* () {
654
+ var _a, _b, _c;
655
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getOwnershipTransfer(jobId, options);
656
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
657
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.getOwnershipTransfer']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
658
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
659
+ });
660
+ },
661
+ /**
662
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
663
+ * @summary List the documents a user owns
664
+ * @param {string} userId
665
+ * @param {string} [parentId]
666
+ * @param {boolean} [recursive]
667
+ * @param {ListOwnedDocumentsTypeEnum} [type]
668
+ * @param {string} [name]
669
+ * @param {string} [updatedAfter]
670
+ * @param {string} [updatedBefore]
671
+ * @param {number} [page]
672
+ * @param {number} [size]
673
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
674
+ * @param {*} [options] Override http request option.
675
+ * @throws {RequiredError}
676
+ */
677
+ listOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options) {
678
+ return __awaiter(this, void 0, void 0, function* () {
679
+ var _a, _b, _c;
680
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options);
681
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
682
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.listOwnedDocuments']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
683
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
684
+ });
685
+ },
686
+ /**
687
+ *
688
+ * @summary The last 50 transfers from or to a user
689
+ * @param {string} userId
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ */
693
+ listOwnershipTransfers(userId, options) {
694
+ return __awaiter(this, void 0, void 0, function* () {
695
+ var _a, _b, _c;
696
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.listOwnershipTransfers(userId, options);
697
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
698
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.listOwnershipTransfers']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
699
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
700
+ });
701
+ },
702
+ /**
703
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
704
+ * @summary Transfer documents to another user
705
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
706
+ * @param {*} [options] Override http request option.
707
+ * @throws {RequiredError}
708
+ */
709
+ transferOwnership(ownershipTransferRequest, options) {
710
+ return __awaiter(this, void 0, void 0, function* () {
711
+ var _a, _b, _c;
712
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.transferOwnership(ownershipTransferRequest, options);
713
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
714
+ const localVarOperationServerBasePath = (_c = (_b = base_1.operationServerMap['OwnershipApi.transferOwnership']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
715
+ return (axios, basePath) => (0, common_1.createRequestFunction)(localVarAxiosArgs, axios_1.default, base_1.BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
716
+ });
717
+ },
718
+ };
719
+ };
720
+ exports.OwnershipApiFp = OwnershipApiFp;
721
+ /**
722
+ * OwnershipApi - factory interface
723
+ */
724
+ const OwnershipApiFactory = function (configuration, basePath, axios) {
725
+ const localVarFp = (0, exports.OwnershipApiFp)(configuration);
726
+ return {
727
+ /**
728
+ *
729
+ * @summary Count the documents a user owns (same filter as the listing)
730
+ * @param {string} userId
731
+ * @param {string} [parentId]
732
+ * @param {boolean} [recursive]
733
+ * @param {AdminCountOwnedDocumentsTypeEnum} [type]
734
+ * @param {string} [name]
735
+ * @param {string} [updatedAfter]
736
+ * @param {string} [updatedBefore]
737
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
738
+ * @param {*} [options] Override http request option.
739
+ * @throws {RequiredError}
740
+ */
741
+ adminCountOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options) {
742
+ return localVarFp.adminCountOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options).then((request) => request(axios, basePath));
743
+ },
744
+ /**
745
+ *
746
+ * @summary A transfer\'s progress and outcome
747
+ * @param {string} jobId
748
+ * @param {*} [options] Override http request option.
749
+ * @throws {RequiredError}
750
+ */
751
+ adminGetOwnershipTransfer(jobId, options) {
752
+ return localVarFp.adminGetOwnershipTransfer(jobId, options).then((request) => request(axios, basePath));
753
+ },
754
+ /**
755
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
756
+ * @summary List the documents a user owns
757
+ * @param {string} userId
758
+ * @param {string} [parentId]
759
+ * @param {boolean} [recursive]
760
+ * @param {AdminListOwnedDocumentsTypeEnum} [type]
761
+ * @param {string} [name]
762
+ * @param {string} [updatedAfter]
763
+ * @param {string} [updatedBefore]
764
+ * @param {number} [page]
765
+ * @param {number} [size]
766
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
767
+ * @param {*} [options] Override http request option.
768
+ * @throws {RequiredError}
769
+ */
770
+ adminListOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options) {
771
+ return localVarFp.adminListOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options).then((request) => request(axios, basePath));
772
+ },
773
+ /**
774
+ *
775
+ * @summary The last 50 transfers from or to a user
776
+ * @param {string} userId
777
+ * @param {*} [options] Override http request option.
778
+ * @throws {RequiredError}
779
+ */
780
+ adminListOwnershipTransfers(userId, options) {
781
+ return localVarFp.adminListOwnershipTransfers(userId, options).then((request) => request(axios, basePath));
782
+ },
783
+ /**
784
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
785
+ * @summary Transfer documents to another user
786
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
787
+ * @param {*} [options] Override http request option.
788
+ * @throws {RequiredError}
789
+ */
790
+ adminTransferOwnership(ownershipTransferRequest, options) {
791
+ return localVarFp.adminTransferOwnership(ownershipTransferRequest, options).then((request) => request(axios, basePath));
792
+ },
793
+ /**
794
+ *
795
+ * @summary Count the documents a user owns (same filter as the listing)
796
+ * @param {string} userId
797
+ * @param {string} [parentId]
798
+ * @param {boolean} [recursive]
799
+ * @param {CountOwnedDocumentsTypeEnum} [type]
800
+ * @param {string} [name]
801
+ * @param {string} [updatedAfter]
802
+ * @param {string} [updatedBefore]
803
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
804
+ * @param {*} [options] Override http request option.
805
+ * @throws {RequiredError}
806
+ */
807
+ countOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options) {
808
+ return localVarFp.countOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options).then((request) => request(axios, basePath));
809
+ },
810
+ /**
811
+ *
812
+ * @summary A transfer\'s progress and outcome
813
+ * @param {string} jobId
814
+ * @param {*} [options] Override http request option.
815
+ * @throws {RequiredError}
816
+ */
817
+ getOwnershipTransfer(jobId, options) {
818
+ return localVarFp.getOwnershipTransfer(jobId, options).then((request) => request(axios, basePath));
819
+ },
820
+ /**
821
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
822
+ * @summary List the documents a user owns
823
+ * @param {string} userId
824
+ * @param {string} [parentId]
825
+ * @param {boolean} [recursive]
826
+ * @param {ListOwnedDocumentsTypeEnum} [type]
827
+ * @param {string} [name]
828
+ * @param {string} [updatedAfter]
829
+ * @param {string} [updatedBefore]
830
+ * @param {number} [page]
831
+ * @param {number} [size]
832
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
833
+ * @param {*} [options] Override http request option.
834
+ * @throws {RequiredError}
835
+ */
836
+ listOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options) {
837
+ return localVarFp.listOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options).then((request) => request(axios, basePath));
838
+ },
839
+ /**
840
+ *
841
+ * @summary The last 50 transfers from or to a user
842
+ * @param {string} userId
843
+ * @param {*} [options] Override http request option.
844
+ * @throws {RequiredError}
845
+ */
846
+ listOwnershipTransfers(userId, options) {
847
+ return localVarFp.listOwnershipTransfers(userId, options).then((request) => request(axios, basePath));
848
+ },
849
+ /**
850
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
851
+ * @summary Transfer documents to another user
852
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
853
+ * @param {*} [options] Override http request option.
854
+ * @throws {RequiredError}
855
+ */
856
+ transferOwnership(ownershipTransferRequest, options) {
857
+ return localVarFp.transferOwnership(ownershipTransferRequest, options).then((request) => request(axios, basePath));
858
+ },
859
+ };
860
+ };
861
+ exports.OwnershipApiFactory = OwnershipApiFactory;
862
+ /**
863
+ * OwnershipApi - object-oriented interface
864
+ */
865
+ class OwnershipApi extends base_1.BaseAPI {
866
+ /**
867
+ *
868
+ * @summary Count the documents a user owns (same filter as the listing)
869
+ * @param {string} userId
870
+ * @param {string} [parentId]
871
+ * @param {boolean} [recursive]
872
+ * @param {AdminCountOwnedDocumentsTypeEnum} [type]
873
+ * @param {string} [name]
874
+ * @param {string} [updatedAfter]
875
+ * @param {string} [updatedBefore]
876
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
877
+ * @param {*} [options] Override http request option.
878
+ * @throws {RequiredError}
879
+ */
880
+ adminCountOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options) {
881
+ return (0, exports.OwnershipApiFp)(this.configuration).adminCountOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options).then((request) => request(this.axios, this.basePath));
882
+ }
883
+ /**
884
+ *
885
+ * @summary A transfer\'s progress and outcome
886
+ * @param {string} jobId
887
+ * @param {*} [options] Override http request option.
888
+ * @throws {RequiredError}
889
+ */
890
+ adminGetOwnershipTransfer(jobId, options) {
891
+ return (0, exports.OwnershipApiFp)(this.configuration).adminGetOwnershipTransfer(jobId, options).then((request) => request(this.axios, this.basePath));
892
+ }
893
+ /**
894
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
895
+ * @summary List the documents a user owns
896
+ * @param {string} userId
897
+ * @param {string} [parentId]
898
+ * @param {boolean} [recursive]
899
+ * @param {AdminListOwnedDocumentsTypeEnum} [type]
900
+ * @param {string} [name]
901
+ * @param {string} [updatedAfter]
902
+ * @param {string} [updatedBefore]
903
+ * @param {number} [page]
904
+ * @param {number} [size]
905
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
906
+ * @param {*} [options] Override http request option.
907
+ * @throws {RequiredError}
908
+ */
909
+ adminListOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options) {
910
+ return (0, exports.OwnershipApiFp)(this.configuration).adminListOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options).then((request) => request(this.axios, this.basePath));
911
+ }
912
+ /**
913
+ *
914
+ * @summary The last 50 transfers from or to a user
915
+ * @param {string} userId
916
+ * @param {*} [options] Override http request option.
917
+ * @throws {RequiredError}
918
+ */
919
+ adminListOwnershipTransfers(userId, options) {
920
+ return (0, exports.OwnershipApiFp)(this.configuration).adminListOwnershipTransfers(userId, options).then((request) => request(this.axios, this.basePath));
921
+ }
922
+ /**
923
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
924
+ * @summary Transfer documents to another user
925
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
926
+ * @param {*} [options] Override http request option.
927
+ * @throws {RequiredError}
928
+ */
929
+ adminTransferOwnership(ownershipTransferRequest, options) {
930
+ return (0, exports.OwnershipApiFp)(this.configuration).adminTransferOwnership(ownershipTransferRequest, options).then((request) => request(this.axios, this.basePath));
931
+ }
932
+ /**
933
+ *
934
+ * @summary Count the documents a user owns (same filter as the listing)
935
+ * @param {string} userId
936
+ * @param {string} [parentId]
937
+ * @param {boolean} [recursive]
938
+ * @param {CountOwnedDocumentsTypeEnum} [type]
939
+ * @param {string} [name]
940
+ * @param {string} [updatedAfter]
941
+ * @param {string} [updatedBefore]
942
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
943
+ * @param {*} [options] Override http request option.
944
+ * @throws {RequiredError}
945
+ */
946
+ countOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options) {
947
+ return (0, exports.OwnershipApiFp)(this.configuration).countOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, xOpenFilzReason, options).then((request) => request(this.axios, this.basePath));
948
+ }
949
+ /**
950
+ *
951
+ * @summary A transfer\'s progress and outcome
952
+ * @param {string} jobId
953
+ * @param {*} [options] Override http request option.
954
+ * @throws {RequiredError}
955
+ */
956
+ getOwnershipTransfer(jobId, options) {
957
+ return (0, exports.OwnershipApiFp)(this.configuration).getOwnershipTransfer(jobId, options).then((request) => request(this.axios, this.basePath));
958
+ }
959
+ /**
960
+ * Without parentId and recursive: the user\'s top level (no parent, or a parent they do not own). Subject to the consent-bypass setting (except type=FOLDER, used to pick a transfer\'s destination): send the reason in the X-OpenFilz-Reason header, percent-encoded (UTF-8) if not ASCII.
961
+ * @summary List the documents a user owns
962
+ * @param {string} userId
963
+ * @param {string} [parentId]
964
+ * @param {boolean} [recursive]
965
+ * @param {ListOwnedDocumentsTypeEnum} [type]
966
+ * @param {string} [name]
967
+ * @param {string} [updatedAfter]
968
+ * @param {string} [updatedBefore]
969
+ * @param {number} [page]
970
+ * @param {number} [size]
971
+ * @param {string} [xOpenFilzReason] Why the administrator looks at this user\'s documents — required when the consent bypass applies; percent-encode (UTF-8) a non-ASCII reason
972
+ * @param {*} [options] Override http request option.
973
+ * @throws {RequiredError}
974
+ */
975
+ listOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options) {
976
+ return (0, exports.OwnershipApiFp)(this.configuration).listOwnedDocuments(userId, parentId, recursive, type, name, updatedAfter, updatedBefore, page, size, xOpenFilzReason, options).then((request) => request(this.axios, this.basePath));
977
+ }
978
+ /**
979
+ *
980
+ * @summary The last 50 transfers from or to a user
981
+ * @param {string} userId
982
+ * @param {*} [options] Override http request option.
983
+ * @throws {RequiredError}
984
+ */
985
+ listOwnershipTransfers(userId, options) {
986
+ return (0, exports.OwnershipApiFp)(this.configuration).listOwnershipTransfers(userId, options).then((request) => request(this.axios, this.basePath));
987
+ }
988
+ /**
989
+ * dryRun=true reports what would happen. Otherwise 200 with status DONE, or 202 with status RUNNING for a large scope (poll GET …/transfers/{jobId}). 409 QUOTA_EXCEEDED carries usedBytes, transferBytes, limitBytes.
990
+ * @summary Transfer documents to another user
991
+ * @param {OwnershipTransferRequest} ownershipTransferRequest
992
+ * @param {*} [options] Override http request option.
993
+ * @throws {RequiredError}
994
+ */
995
+ transferOwnership(ownershipTransferRequest, options) {
996
+ return (0, exports.OwnershipApiFp)(this.configuration).transferOwnership(ownershipTransferRequest, options).then((request) => request(this.axios, this.basePath));
997
+ }
998
+ }
999
+ exports.OwnershipApi = OwnershipApi;
1000
+ exports.AdminCountOwnedDocumentsTypeEnum = {
1001
+ File: 'FILE',
1002
+ Folder: 'FOLDER',
1003
+ };
1004
+ exports.AdminListOwnedDocumentsTypeEnum = {
1005
+ File: 'FILE',
1006
+ Folder: 'FOLDER',
1007
+ };
1008
+ exports.CountOwnedDocumentsTypeEnum = {
1009
+ File: 'FILE',
1010
+ Folder: 'FOLDER',
1011
+ };
1012
+ exports.ListOwnedDocumentsTypeEnum = {
1013
+ File: 'FILE',
1014
+ Folder: 'FOLDER',
1015
+ };