@openfilz-sdk/typescript-ee 1.10.4 → 1.10.6

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 (109) hide show
  1. package/.openapi-generator/FILES +20 -0
  2. package/.openapi-generator/openfilz-api-generate-typescript-sdk.sha256 +1 -1
  3. package/README.md +20 -2
  4. package/api/desktop-sync-administration-api.ts +186 -0
  5. package/api/desktop-sync-api.ts +617 -0
  6. package/api/document-controller-api.ts +8 -8
  7. package/api/file-controller-api.ts +82 -0
  8. package/api.ts +2 -0
  9. package/dist/api/desktop-sync-administration-api.d.ts +91 -0
  10. package/dist/api/desktop-sync-administration-api.js +187 -0
  11. package/dist/api/desktop-sync-api.d.ts +282 -0
  12. package/dist/api/desktop-sync-api.js +590 -0
  13. package/dist/api/document-controller-api.d.ts +8 -8
  14. package/dist/api/document-controller-api.js +8 -8
  15. package/dist/api/file-controller-api.d.ts +38 -0
  16. package/dist/api/file-controller-api.js +75 -0
  17. package/dist/api.d.ts +2 -0
  18. package/dist/api.js +2 -0
  19. package/dist/esm/api/desktop-sync-administration-api.d.ts +91 -0
  20. package/dist/esm/api/desktop-sync-administration-api.js +180 -0
  21. package/dist/esm/api/desktop-sync-api.d.ts +282 -0
  22. package/dist/esm/api/desktop-sync-api.js +583 -0
  23. package/dist/esm/api/document-controller-api.d.ts +8 -8
  24. package/dist/esm/api/document-controller-api.js +8 -8
  25. package/dist/esm/api/file-controller-api.d.ts +38 -0
  26. package/dist/esm/api/file-controller-api.js +75 -0
  27. package/dist/esm/api.d.ts +2 -0
  28. package/dist/esm/api.js +2 -0
  29. package/dist/esm/models/copy-request.d.ts +1 -1
  30. package/dist/esm/models/desktop-sync-client-info.d.ts +20 -0
  31. package/dist/esm/models/desktop-sync-client-info.js +14 -0
  32. package/dist/esm/models/enriched-audit-log.d.ts +1 -0
  33. package/dist/esm/models/enriched-audit-log.js +1 -0
  34. package/dist/esm/models/index.d.ts +8 -0
  35. package/dist/esm/models/index.js +8 -0
  36. package/dist/esm/models/move-request.d.ts +1 -1
  37. package/dist/esm/models/search-by-audit-log-request.d.ts +1 -0
  38. package/dist/esm/models/search-by-audit-log-request.js +1 -0
  39. package/dist/esm/models/settings.d.ts +3 -0
  40. package/dist/esm/models/sync-backfill-status.d.ts +21 -0
  41. package/dist/esm/models/sync-backfill-status.js +14 -0
  42. package/dist/esm/models/sync-changes-response.d.ts +17 -0
  43. package/dist/esm/models/sync-changes-response.js +14 -0
  44. package/dist/esm/models/sync-item.d.ts +29 -0
  45. package/dist/esm/models/sync-item.js +17 -0
  46. package/dist/esm/models/sync-snapshot-response.d.ts +17 -0
  47. package/dist/esm/models/sync-snapshot-response.js +14 -0
  48. package/dist/esm/models/unzip-request.d.ts +29 -0
  49. package/dist/esm/models/unzip-request.js +14 -0
  50. package/dist/esm/models/unzip-response.d.ts +34 -0
  51. package/dist/esm/models/unzip-response.js +14 -0
  52. package/dist/esm/models/unzip-skipped-entry.d.ts +34 -0
  53. package/dist/esm/models/unzip-skipped-entry.js +21 -0
  54. package/dist/models/copy-request.d.ts +1 -1
  55. package/dist/models/desktop-sync-client-info.d.ts +20 -0
  56. package/dist/models/desktop-sync-client-info.js +15 -0
  57. package/dist/models/enriched-audit-log.d.ts +1 -0
  58. package/dist/models/enriched-audit-log.js +1 -0
  59. package/dist/models/index.d.ts +8 -0
  60. package/dist/models/index.js +8 -0
  61. package/dist/models/move-request.d.ts +1 -1
  62. package/dist/models/search-by-audit-log-request.d.ts +1 -0
  63. package/dist/models/search-by-audit-log-request.js +1 -0
  64. package/dist/models/settings.d.ts +3 -0
  65. package/dist/models/sync-backfill-status.d.ts +21 -0
  66. package/dist/models/sync-backfill-status.js +15 -0
  67. package/dist/models/sync-changes-response.d.ts +17 -0
  68. package/dist/models/sync-changes-response.js +15 -0
  69. package/dist/models/sync-item.d.ts +29 -0
  70. package/dist/models/sync-item.js +20 -0
  71. package/dist/models/sync-snapshot-response.d.ts +17 -0
  72. package/dist/models/sync-snapshot-response.js +15 -0
  73. package/dist/models/unzip-request.d.ts +29 -0
  74. package/dist/models/unzip-request.js +15 -0
  75. package/dist/models/unzip-response.d.ts +34 -0
  76. package/dist/models/unzip-response.js +15 -0
  77. package/dist/models/unzip-skipped-entry.d.ts +34 -0
  78. package/dist/models/unzip-skipped-entry.js +24 -0
  79. package/docs/CopyRequest.md +1 -1
  80. package/docs/DesktopSyncAdministrationApi.md +96 -0
  81. package/docs/DesktopSyncApi.md +376 -0
  82. package/docs/DesktopSyncClientInfo.md +32 -0
  83. package/docs/DocumentControllerApi.md +4 -4
  84. package/docs/FileControllerApi.md +56 -0
  85. package/docs/MoveRequest.md +1 -1
  86. package/docs/Settings.md +2 -0
  87. package/docs/SyncBackfillStatus.md +34 -0
  88. package/docs/SyncChangesResponse.md +24 -0
  89. package/docs/SyncItem.md +40 -0
  90. package/docs/SyncSnapshotResponse.md +24 -0
  91. package/docs/UnzipRequest.md +26 -0
  92. package/docs/UnzipResponse.md +28 -0
  93. package/docs/UnzipSkippedEntry.md +24 -0
  94. package/graphql/document.graphqls +6 -0
  95. package/models/copy-request.ts +1 -1
  96. package/models/desktop-sync-client-info.ts +26 -0
  97. package/models/enriched-audit-log.ts +1 -0
  98. package/models/index.ts +8 -0
  99. package/models/move-request.ts +1 -1
  100. package/models/search-by-audit-log-request.ts +1 -0
  101. package/models/settings.ts +1 -0
  102. package/models/sync-backfill-status.ts +27 -0
  103. package/models/sync-changes-response.ts +25 -0
  104. package/models/sync-item.ts +38 -0
  105. package/models/sync-snapshot-response.ts +25 -0
  106. package/models/unzip-request.ts +35 -0
  107. package/models/unzip-response.ts +42 -0
  108. package/models/unzip-skipped-entry.ts +43 -0
  109. package/package.json +1 -1
@@ -0,0 +1,617 @@
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
+
15
+
16
+ import type { Configuration } from '../configuration';
17
+ import type { AxiosPromise, AxiosInstance, RawAxiosRequestConfig } from 'axios';
18
+ import globalAxios from 'axios';
19
+ // Some imports not used depending on template conditions
20
+ // @ts-ignore
21
+ import { DUMMY_BASE_URL, assertParamExists, setApiKeyToObject, setBasicAuthToObject, setBearerAuthToObject, setOAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction, replaceWithSerializableTypeIfNeeded } from '../common';
22
+ // @ts-ignore
23
+ import { BASE_PATH, COLLECTION_FORMATS, type RequestArgs, BaseAPI, RequiredError, operationServerMap } from '../base';
24
+ // @ts-ignore
25
+ import type { DesktopSyncClientInfo } from '../models';
26
+ // @ts-ignore
27
+ import type { SyncChangesResponse } from '../models';
28
+ // @ts-ignore
29
+ import type { SyncItem } from '../models';
30
+ // @ts-ignore
31
+ import type { SyncSnapshotResponse } from '../models';
32
+ /**
33
+ * DesktopSyncApi - axios parameter creator
34
+ */
35
+ export const DesktopSyncApiAxiosParamCreator = function (configuration?: Configuration) {
36
+ return {
37
+ /**
38
+ * Without a cursor: no items, only the cursor of the present moment. An item is either the document\'s current state or {gone: true}. Call again while hasMore is true.
39
+ * @summary Documents that changed since a cursor, as the caller sees them now
40
+ * @param {number} [cursor]
41
+ * @param {number} [limit]
42
+ * @param {*} [options] Override http request option.
43
+ * @throws {RequiredError}
44
+ */
45
+ changes: async (cursor?: number, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
46
+ const localVarPath = `/api/v1/sync/changes`;
47
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
48
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
49
+ let baseOptions;
50
+ if (configuration) {
51
+ baseOptions = configuration.baseOptions;
52
+ }
53
+
54
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
55
+ const localVarHeaderParameter = {} as any;
56
+ const localVarQueryParameter = {} as any;
57
+
58
+ // authentication keycloak_auth required
59
+ // http bearer authentication required
60
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
61
+
62
+ if (cursor !== undefined) {
63
+ localVarQueryParameter['cursor'] = cursor;
64
+ }
65
+
66
+ if (limit !== undefined) {
67
+ localVarQueryParameter['limit'] = limit;
68
+ }
69
+
70
+ localVarHeaderParameter['Accept'] = '*/*';
71
+
72
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
73
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
74
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
75
+
76
+ return {
77
+ url: toPathString(localVarUrlObj),
78
+ options: localVarRequestOptions,
79
+ };
80
+ },
81
+ /**
82
+ * If-None-Match with the hash the client already holds answers 304 without a body.
83
+ * @summary Download a file; its ETag is the SHA-256 of the content
84
+ * @param {string} documentId
85
+ * @param {string} [ifNoneMatch]
86
+ * @param {*} [options] Override http request option.
87
+ * @throws {RequiredError}
88
+ */
89
+ content: async (documentId: string, ifNoneMatch?: string, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
90
+ // verify required parameter 'documentId' is not null or undefined
91
+ assertParamExists('content', 'documentId', documentId)
92
+ const localVarPath = `/api/v1/sync/content/{documentId}`
93
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
94
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
95
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
96
+ let baseOptions;
97
+ if (configuration) {
98
+ baseOptions = configuration.baseOptions;
99
+ }
100
+
101
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
102
+ const localVarHeaderParameter = {} as any;
103
+ const localVarQueryParameter = {} as any;
104
+
105
+ // authentication keycloak_auth required
106
+ // http bearer authentication required
107
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
108
+
109
+ localVarHeaderParameter['Accept'] = '*/*';
110
+
111
+ if (ifNoneMatch != null) {
112
+ localVarHeaderParameter['If-None-Match'] = String(ifNoneMatch);
113
+ }
114
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
115
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
116
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
117
+
118
+ return {
119
+ url: toPathString(localVarUrlObj),
120
+ options: localVarRequestOptions,
121
+ };
122
+ },
123
+ /**
124
+ *
125
+ * @summary Connection details for the desktop application (public)
126
+ * @param {*} [options] Override http request option.
127
+ * @throws {RequiredError}
128
+ */
129
+ discover: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
130
+ const localVarPath = `/.well-known/openfilz-desktop`;
131
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
132
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
133
+ let baseOptions;
134
+ if (configuration) {
135
+ baseOptions = configuration.baseOptions;
136
+ }
137
+
138
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
139
+ const localVarHeaderParameter = {} as any;
140
+ const localVarQueryParameter = {} as any;
141
+
142
+ // authentication keycloak_auth required
143
+ // http bearer authentication required
144
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
145
+
146
+ localVarHeaderParameter['Accept'] = '*/*';
147
+
148
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
149
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
150
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
151
+
152
+ return {
153
+ url: toPathString(localVarUrlObj),
154
+ options: localVarRequestOptions,
155
+ };
156
+ },
157
+ /**
158
+ *
159
+ * @summary Where to get the desktop application, and the address to give it
160
+ * @param {*} [options] Override http request option.
161
+ * @throws {RequiredError}
162
+ */
163
+ forWebApplication: async (options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
164
+ const localVarPath = `/api/v1/settings/desktop-sync`;
165
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
166
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
167
+ let baseOptions;
168
+ if (configuration) {
169
+ baseOptions = configuration.baseOptions;
170
+ }
171
+
172
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
173
+ const localVarHeaderParameter = {} as any;
174
+ const localVarQueryParameter = {} as any;
175
+
176
+ // authentication keycloak_auth required
177
+ // http bearer authentication required
178
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
179
+
180
+ localVarHeaderParameter['Accept'] = '*/*';
181
+
182
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
183
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
184
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
185
+
186
+ return {
187
+ url: toPathString(localVarUrlObj),
188
+ options: localVarRequestOptions,
189
+ };
190
+ },
191
+ /**
192
+ * What /changes would answer for these ids: a client asks after its own upload, or to settle a conflict. Ids the caller cannot see come back as {gone: true}. At most 200 ids.
193
+ * @summary Current state of the given documents, as the caller sees them
194
+ * @param {Array<string>} ids
195
+ * @param {*} [options] Override http request option.
196
+ * @throws {RequiredError}
197
+ */
198
+ items: async (ids: Array<string>, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
199
+ // verify required parameter 'ids' is not null or undefined
200
+ assertParamExists('items', 'ids', ids)
201
+ const localVarPath = `/api/v1/sync/items`;
202
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
203
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
204
+ let baseOptions;
205
+ if (configuration) {
206
+ baseOptions = configuration.baseOptions;
207
+ }
208
+
209
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
210
+ const localVarHeaderParameter = {} as any;
211
+ const localVarQueryParameter = {} as any;
212
+
213
+ // authentication keycloak_auth required
214
+ // http bearer authentication required
215
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
216
+
217
+ if (ids) {
218
+ localVarQueryParameter['ids'] = ids;
219
+ }
220
+
221
+ localVarHeaderParameter['Accept'] = '*/*';
222
+
223
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
224
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
225
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
226
+
227
+ return {
228
+ url: toPathString(localVarUrlObj),
229
+ options: localVarRequestOptions,
230
+ };
231
+ },
232
+ /**
233
+ * If-Match carries the SHA-256 the client last saw. 412 = the content changed on the server in the meantime: keep both. 428 = no If-Match. Answers the document\'s new state.
234
+ * @summary Replace a file\'s content, only if it is still the content the edit was based on
235
+ * @param {string} documentId
236
+ * @param {File} file
237
+ * @param {string} [ifMatch]
238
+ * @param {number} [contentLength]
239
+ * @param {*} [options] Override http request option.
240
+ * @throws {RequiredError}
241
+ */
242
+ replaceContent: async (documentId: string, file: File, ifMatch?: string, contentLength?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
243
+ // verify required parameter 'documentId' is not null or undefined
244
+ assertParamExists('replaceContent', 'documentId', documentId)
245
+ // verify required parameter 'file' is not null or undefined
246
+ assertParamExists('replaceContent', 'file', file)
247
+ const localVarPath = `/api/v1/sync/content/{documentId}`
248
+ .replace('{documentId}', encodeURIComponent(String(documentId)));
249
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
250
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
251
+ let baseOptions;
252
+ if (configuration) {
253
+ baseOptions = configuration.baseOptions;
254
+ }
255
+
256
+ const localVarRequestOptions = { method: 'PUT', ...baseOptions, ...options};
257
+ const localVarHeaderParameter = {} as any;
258
+ const localVarQueryParameter = {} as any;
259
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
260
+
261
+ // authentication keycloak_auth required
262
+ // http bearer authentication required
263
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
264
+
265
+
266
+ if (file !== undefined) {
267
+ localVarFormParams.append('file', file as any);
268
+ }
269
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
270
+ localVarHeaderParameter['Accept'] = '*/*';
271
+
272
+ if (ifMatch != null) {
273
+ localVarHeaderParameter['If-Match'] = String(ifMatch);
274
+ }
275
+ if (contentLength != null) {
276
+ localVarHeaderParameter['Content-Length'] = typeof contentLength === 'string'
277
+ ? contentLength
278
+ : JSON.stringify(contentLength, replaceWithSerializableTypeIfNeeded);
279
+ }
280
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
281
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
282
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
283
+ localVarRequestOptions.data = localVarFormParams;
284
+
285
+ return {
286
+ url: toPathString(localVarUrlObj),
287
+ options: localVarRequestOptions,
288
+ };
289
+ },
290
+ /**
291
+ * The root holds the caller\'s own top-level items and the entry point of everything shared with them. Keep the cursor of the first page and start /changes from it.
292
+ * @summary One page of a folder\'s children; without folderId, the caller\'s root
293
+ * @param {string} [folderId]
294
+ * @param {string} [after]
295
+ * @param {number} [limit]
296
+ * @param {*} [options] Override http request option.
297
+ * @throws {RequiredError}
298
+ */
299
+ snapshot: async (folderId?: string, after?: string, limit?: number, options: RawAxiosRequestConfig = {}): Promise<RequestArgs> => {
300
+ const localVarPath = `/api/v1/sync/snapshot`;
301
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
302
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
303
+ let baseOptions;
304
+ if (configuration) {
305
+ baseOptions = configuration.baseOptions;
306
+ }
307
+
308
+ const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options};
309
+ const localVarHeaderParameter = {} as any;
310
+ const localVarQueryParameter = {} as any;
311
+
312
+ // authentication keycloak_auth required
313
+ // http bearer authentication required
314
+ await setBearerAuthToObject(localVarHeaderParameter, configuration)
315
+
316
+ if (folderId !== undefined) {
317
+ localVarQueryParameter['folderId'] = folderId;
318
+ }
319
+
320
+ if (after !== undefined) {
321
+ localVarQueryParameter['after'] = after;
322
+ }
323
+
324
+ if (limit !== undefined) {
325
+ localVarQueryParameter['limit'] = limit;
326
+ }
327
+
328
+ localVarHeaderParameter['Accept'] = '*/*';
329
+
330
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
331
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
332
+ localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers};
333
+
334
+ return {
335
+ url: toPathString(localVarUrlObj),
336
+ options: localVarRequestOptions,
337
+ };
338
+ },
339
+ }
340
+ };
341
+
342
+ /**
343
+ * DesktopSyncApi - functional programming interface
344
+ */
345
+ export const DesktopSyncApiFp = function(configuration?: Configuration) {
346
+ const localVarAxiosParamCreator = DesktopSyncApiAxiosParamCreator(configuration)
347
+ return {
348
+ /**
349
+ * Without a cursor: no items, only the cursor of the present moment. An item is either the document\'s current state or {gone: true}. Call again while hasMore is true.
350
+ * @summary Documents that changed since a cursor, as the caller sees them now
351
+ * @param {number} [cursor]
352
+ * @param {number} [limit]
353
+ * @param {*} [options] Override http request option.
354
+ * @throws {RequiredError}
355
+ */
356
+ async changes(cursor?: number, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SyncChangesResponse>> {
357
+ const localVarAxiosArgs = await localVarAxiosParamCreator.changes(cursor, limit, options);
358
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
359
+ const localVarOperationServerBasePath = operationServerMap['DesktopSyncApi.changes']?.[localVarOperationServerIndex]?.url;
360
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
361
+ },
362
+ /**
363
+ * If-None-Match with the hash the client already holds answers 304 without a body.
364
+ * @summary Download a file; its ETag is the SHA-256 of the content
365
+ * @param {string} documentId
366
+ * @param {string} [ifNoneMatch]
367
+ * @param {*} [options] Override http request option.
368
+ * @throws {RequiredError}
369
+ */
370
+ async content(documentId: string, ifNoneMatch?: string, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<File>> {
371
+ const localVarAxiosArgs = await localVarAxiosParamCreator.content(documentId, ifNoneMatch, options);
372
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
373
+ const localVarOperationServerBasePath = operationServerMap['DesktopSyncApi.content']?.[localVarOperationServerIndex]?.url;
374
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
375
+ },
376
+ /**
377
+ *
378
+ * @summary Connection details for the desktop application (public)
379
+ * @param {*} [options] Override http request option.
380
+ * @throws {RequiredError}
381
+ */
382
+ async discover(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DesktopSyncClientInfo>> {
383
+ const localVarAxiosArgs = await localVarAxiosParamCreator.discover(options);
384
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
385
+ const localVarOperationServerBasePath = operationServerMap['DesktopSyncApi.discover']?.[localVarOperationServerIndex]?.url;
386
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
387
+ },
388
+ /**
389
+ *
390
+ * @summary Where to get the desktop application, and the address to give it
391
+ * @param {*} [options] Override http request option.
392
+ * @throws {RequiredError}
393
+ */
394
+ async forWebApplication(options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<DesktopSyncClientInfo>> {
395
+ const localVarAxiosArgs = await localVarAxiosParamCreator.forWebApplication(options);
396
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
397
+ const localVarOperationServerBasePath = operationServerMap['DesktopSyncApi.forWebApplication']?.[localVarOperationServerIndex]?.url;
398
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
399
+ },
400
+ /**
401
+ * What /changes would answer for these ids: a client asks after its own upload, or to settle a conflict. Ids the caller cannot see come back as {gone: true}. At most 200 ids.
402
+ * @summary Current state of the given documents, as the caller sees them
403
+ * @param {Array<string>} ids
404
+ * @param {*} [options] Override http request option.
405
+ * @throws {RequiredError}
406
+ */
407
+ async items(ids: Array<string>, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<Array<SyncItem>>> {
408
+ const localVarAxiosArgs = await localVarAxiosParamCreator.items(ids, options);
409
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
410
+ const localVarOperationServerBasePath = operationServerMap['DesktopSyncApi.items']?.[localVarOperationServerIndex]?.url;
411
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
412
+ },
413
+ /**
414
+ * If-Match carries the SHA-256 the client last saw. 412 = the content changed on the server in the meantime: keep both. 428 = no If-Match. Answers the document\'s new state.
415
+ * @summary Replace a file\'s content, only if it is still the content the edit was based on
416
+ * @param {string} documentId
417
+ * @param {File} file
418
+ * @param {string} [ifMatch]
419
+ * @param {number} [contentLength]
420
+ * @param {*} [options] Override http request option.
421
+ * @throws {RequiredError}
422
+ */
423
+ async replaceContent(documentId: string, file: File, ifMatch?: string, contentLength?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SyncItem>> {
424
+ const localVarAxiosArgs = await localVarAxiosParamCreator.replaceContent(documentId, file, ifMatch, contentLength, options);
425
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
426
+ const localVarOperationServerBasePath = operationServerMap['DesktopSyncApi.replaceContent']?.[localVarOperationServerIndex]?.url;
427
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
428
+ },
429
+ /**
430
+ * The root holds the caller\'s own top-level items and the entry point of everything shared with them. Keep the cursor of the first page and start /changes from it.
431
+ * @summary One page of a folder\'s children; without folderId, the caller\'s root
432
+ * @param {string} [folderId]
433
+ * @param {string} [after]
434
+ * @param {number} [limit]
435
+ * @param {*} [options] Override http request option.
436
+ * @throws {RequiredError}
437
+ */
438
+ async snapshot(folderId?: string, after?: string, limit?: number, options?: RawAxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise<SyncSnapshotResponse>> {
439
+ const localVarAxiosArgs = await localVarAxiosParamCreator.snapshot(folderId, after, limit, options);
440
+ const localVarOperationServerIndex = configuration?.serverIndex ?? 0;
441
+ const localVarOperationServerBasePath = operationServerMap['DesktopSyncApi.snapshot']?.[localVarOperationServerIndex]?.url;
442
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
443
+ },
444
+ }
445
+ };
446
+
447
+ /**
448
+ * DesktopSyncApi - factory interface
449
+ */
450
+ export const DesktopSyncApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) {
451
+ const localVarFp = DesktopSyncApiFp(configuration)
452
+ return {
453
+ /**
454
+ * Without a cursor: no items, only the cursor of the present moment. An item is either the document\'s current state or {gone: true}. Call again while hasMore is true.
455
+ * @summary Documents that changed since a cursor, as the caller sees them now
456
+ * @param {number} [cursor]
457
+ * @param {number} [limit]
458
+ * @param {*} [options] Override http request option.
459
+ * @throws {RequiredError}
460
+ */
461
+ changes(cursor?: number, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<SyncChangesResponse> {
462
+ return localVarFp.changes(cursor, limit, options).then((request) => request(axios, basePath));
463
+ },
464
+ /**
465
+ * If-None-Match with the hash the client already holds answers 304 without a body.
466
+ * @summary Download a file; its ETag is the SHA-256 of the content
467
+ * @param {string} documentId
468
+ * @param {string} [ifNoneMatch]
469
+ * @param {*} [options] Override http request option.
470
+ * @throws {RequiredError}
471
+ */
472
+ content(documentId: string, ifNoneMatch?: string, options?: RawAxiosRequestConfig): AxiosPromise<File> {
473
+ return localVarFp.content(documentId, ifNoneMatch, options).then((request) => request(axios, basePath));
474
+ },
475
+ /**
476
+ *
477
+ * @summary Connection details for the desktop application (public)
478
+ * @param {*} [options] Override http request option.
479
+ * @throws {RequiredError}
480
+ */
481
+ discover(options?: RawAxiosRequestConfig): AxiosPromise<DesktopSyncClientInfo> {
482
+ return localVarFp.discover(options).then((request) => request(axios, basePath));
483
+ },
484
+ /**
485
+ *
486
+ * @summary Where to get the desktop application, and the address to give it
487
+ * @param {*} [options] Override http request option.
488
+ * @throws {RequiredError}
489
+ */
490
+ forWebApplication(options?: RawAxiosRequestConfig): AxiosPromise<DesktopSyncClientInfo> {
491
+ return localVarFp.forWebApplication(options).then((request) => request(axios, basePath));
492
+ },
493
+ /**
494
+ * What /changes would answer for these ids: a client asks after its own upload, or to settle a conflict. Ids the caller cannot see come back as {gone: true}. At most 200 ids.
495
+ * @summary Current state of the given documents, as the caller sees them
496
+ * @param {Array<string>} ids
497
+ * @param {*} [options] Override http request option.
498
+ * @throws {RequiredError}
499
+ */
500
+ items(ids: Array<string>, options?: RawAxiosRequestConfig): AxiosPromise<Array<SyncItem>> {
501
+ return localVarFp.items(ids, options).then((request) => request(axios, basePath));
502
+ },
503
+ /**
504
+ * If-Match carries the SHA-256 the client last saw. 412 = the content changed on the server in the meantime: keep both. 428 = no If-Match. Answers the document\'s new state.
505
+ * @summary Replace a file\'s content, only if it is still the content the edit was based on
506
+ * @param {string} documentId
507
+ * @param {File} file
508
+ * @param {string} [ifMatch]
509
+ * @param {number} [contentLength]
510
+ * @param {*} [options] Override http request option.
511
+ * @throws {RequiredError}
512
+ */
513
+ replaceContent(documentId: string, file: File, ifMatch?: string, contentLength?: number, options?: RawAxiosRequestConfig): AxiosPromise<SyncItem> {
514
+ return localVarFp.replaceContent(documentId, file, ifMatch, contentLength, options).then((request) => request(axios, basePath));
515
+ },
516
+ /**
517
+ * The root holds the caller\'s own top-level items and the entry point of everything shared with them. Keep the cursor of the first page and start /changes from it.
518
+ * @summary One page of a folder\'s children; without folderId, the caller\'s root
519
+ * @param {string} [folderId]
520
+ * @param {string} [after]
521
+ * @param {number} [limit]
522
+ * @param {*} [options] Override http request option.
523
+ * @throws {RequiredError}
524
+ */
525
+ snapshot(folderId?: string, after?: string, limit?: number, options?: RawAxiosRequestConfig): AxiosPromise<SyncSnapshotResponse> {
526
+ return localVarFp.snapshot(folderId, after, limit, options).then((request) => request(axios, basePath));
527
+ },
528
+ };
529
+ };
530
+
531
+ /**
532
+ * DesktopSyncApi - object-oriented interface
533
+ */
534
+ export class DesktopSyncApi extends BaseAPI {
535
+ /**
536
+ * Without a cursor: no items, only the cursor of the present moment. An item is either the document\'s current state or {gone: true}. Call again while hasMore is true.
537
+ * @summary Documents that changed since a cursor, as the caller sees them now
538
+ * @param {number} [cursor]
539
+ * @param {number} [limit]
540
+ * @param {*} [options] Override http request option.
541
+ * @throws {RequiredError}
542
+ */
543
+ public changes(cursor?: number, limit?: number, options?: RawAxiosRequestConfig) {
544
+ return DesktopSyncApiFp(this.configuration).changes(cursor, limit, options).then((request) => request(this.axios, this.basePath));
545
+ }
546
+
547
+ /**
548
+ * If-None-Match with the hash the client already holds answers 304 without a body.
549
+ * @summary Download a file; its ETag is the SHA-256 of the content
550
+ * @param {string} documentId
551
+ * @param {string} [ifNoneMatch]
552
+ * @param {*} [options] Override http request option.
553
+ * @throws {RequiredError}
554
+ */
555
+ public content(documentId: string, ifNoneMatch?: string, options?: RawAxiosRequestConfig) {
556
+ return DesktopSyncApiFp(this.configuration).content(documentId, ifNoneMatch, options).then((request) => request(this.axios, this.basePath));
557
+ }
558
+
559
+ /**
560
+ *
561
+ * @summary Connection details for the desktop application (public)
562
+ * @param {*} [options] Override http request option.
563
+ * @throws {RequiredError}
564
+ */
565
+ public discover(options?: RawAxiosRequestConfig) {
566
+ return DesktopSyncApiFp(this.configuration).discover(options).then((request) => request(this.axios, this.basePath));
567
+ }
568
+
569
+ /**
570
+ *
571
+ * @summary Where to get the desktop application, and the address to give it
572
+ * @param {*} [options] Override http request option.
573
+ * @throws {RequiredError}
574
+ */
575
+ public forWebApplication(options?: RawAxiosRequestConfig) {
576
+ return DesktopSyncApiFp(this.configuration).forWebApplication(options).then((request) => request(this.axios, this.basePath));
577
+ }
578
+
579
+ /**
580
+ * What /changes would answer for these ids: a client asks after its own upload, or to settle a conflict. Ids the caller cannot see come back as {gone: true}. At most 200 ids.
581
+ * @summary Current state of the given documents, as the caller sees them
582
+ * @param {Array<string>} ids
583
+ * @param {*} [options] Override http request option.
584
+ * @throws {RequiredError}
585
+ */
586
+ public items(ids: Array<string>, options?: RawAxiosRequestConfig) {
587
+ return DesktopSyncApiFp(this.configuration).items(ids, options).then((request) => request(this.axios, this.basePath));
588
+ }
589
+
590
+ /**
591
+ * If-Match carries the SHA-256 the client last saw. 412 = the content changed on the server in the meantime: keep both. 428 = no If-Match. Answers the document\'s new state.
592
+ * @summary Replace a file\'s content, only if it is still the content the edit was based on
593
+ * @param {string} documentId
594
+ * @param {File} file
595
+ * @param {string} [ifMatch]
596
+ * @param {number} [contentLength]
597
+ * @param {*} [options] Override http request option.
598
+ * @throws {RequiredError}
599
+ */
600
+ public replaceContent(documentId: string, file: File, ifMatch?: string, contentLength?: number, options?: RawAxiosRequestConfig) {
601
+ return DesktopSyncApiFp(this.configuration).replaceContent(documentId, file, ifMatch, contentLength, options).then((request) => request(this.axios, this.basePath));
602
+ }
603
+
604
+ /**
605
+ * The root holds the caller\'s own top-level items and the entry point of everything shared with them. Keep the cursor of the first page and start /changes from it.
606
+ * @summary One page of a folder\'s children; without folderId, the caller\'s root
607
+ * @param {string} [folderId]
608
+ * @param {string} [after]
609
+ * @param {number} [limit]
610
+ * @param {*} [options] Override http request option.
611
+ * @throws {RequiredError}
612
+ */
613
+ public snapshot(folderId?: string, after?: string, limit?: number, options?: RawAxiosRequestConfig) {
614
+ return DesktopSyncApiFp(this.configuration).snapshot(folderId, after, limit, options).then((request) => request(this.axios, this.basePath));
615
+ }
616
+ }
617
+