@openfilz-sdk/typescript 1.1.5-SNAPSHOT

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 (356) hide show
  1. package/.openapi-generator/FILES +76 -0
  2. package/.openapi-generator/VERSION +1 -0
  3. package/.openapi-generator/openfilz-api.json-generate-typescript-sdk.sha256 +1 -0
  4. package/.openapi-generator-ignore +23 -0
  5. package/README.md +46 -0
  6. package/api/audit-controller-api.ts +296 -0
  7. package/api/dashboard-api.ts +128 -0
  8. package/api/document-controller-api.ts +1319 -0
  9. package/api/document-suggestion-controller-api.ts +156 -0
  10. package/api/favorites-api.ts +352 -0
  11. package/api/file-controller-api.ts +379 -0
  12. package/api/folder-controller-api.ts +626 -0
  13. package/api/settings-api.ts +128 -0
  14. package/api/tus-controller-api.ts +760 -0
  15. package/api.ts +26 -0
  16. package/base.ts +86 -0
  17. package/common.ts +150 -0
  18. package/configuration.ts +115 -0
  19. package/dist/api/audit-controller-api.d.ts +150 -0
  20. package/dist/api/audit-controller-api.js +284 -0
  21. package/dist/api/dashboard-api.d.ts +70 -0
  22. package/dist/api/dashboard-api.js +131 -0
  23. package/dist/api/document-controller-api.d.ts +615 -0
  24. package/dist/api/document-controller-api.js +1226 -0
  25. package/dist/api/document-suggestion-controller-api.d.ts +80 -0
  26. package/dist/api/document-suggestion-controller-api.js +152 -0
  27. package/dist/api/favorites-api.d.ts +172 -0
  28. package/dist/api/favorites-api.js +345 -0
  29. package/dist/api/file-controller-api.d.ts +182 -0
  30. package/dist/api/file-controller-api.js +356 -0
  31. package/dist/api/folder-controller-api.d.ts +295 -0
  32. package/dist/api/folder-controller-api.js +582 -0
  33. package/dist/api/settings-api.d.ts +70 -0
  34. package/dist/api/settings-api.js +131 -0
  35. package/dist/api/tus-controller-api.d.ts +353 -0
  36. package/dist/api/tus-controller-api.js +723 -0
  37. package/dist/api.d.ts +20 -0
  38. package/dist/api.js +38 -0
  39. package/dist/base.d.ts +66 -0
  40. package/dist/base.js +65 -0
  41. package/dist/common.d.ts +65 -0
  42. package/dist/common.js +161 -0
  43. package/dist/configuration.d.ts +91 -0
  44. package/dist/configuration.js +44 -0
  45. package/dist/esm/api/audit-controller-api.d.ts +150 -0
  46. package/dist/esm/api/audit-controller-api.js +277 -0
  47. package/dist/esm/api/dashboard-api.d.ts +70 -0
  48. package/dist/esm/api/dashboard-api.js +124 -0
  49. package/dist/esm/api/document-controller-api.d.ts +615 -0
  50. package/dist/esm/api/document-controller-api.js +1219 -0
  51. package/dist/esm/api/document-suggestion-controller-api.d.ts +80 -0
  52. package/dist/esm/api/document-suggestion-controller-api.js +145 -0
  53. package/dist/esm/api/favorites-api.d.ts +172 -0
  54. package/dist/esm/api/favorites-api.js +338 -0
  55. package/dist/esm/api/file-controller-api.d.ts +182 -0
  56. package/dist/esm/api/file-controller-api.js +349 -0
  57. package/dist/esm/api/folder-controller-api.d.ts +295 -0
  58. package/dist/esm/api/folder-controller-api.js +575 -0
  59. package/dist/esm/api/settings-api.d.ts +70 -0
  60. package/dist/esm/api/settings-api.js +124 -0
  61. package/dist/esm/api/tus-controller-api.d.ts +353 -0
  62. package/dist/esm/api/tus-controller-api.js +716 -0
  63. package/dist/esm/api.d.ts +20 -0
  64. package/dist/esm/api.js +22 -0
  65. package/dist/esm/base.d.ts +66 -0
  66. package/dist/esm/base.js +60 -0
  67. package/dist/esm/common.d.ts +65 -0
  68. package/dist/esm/common.js +149 -0
  69. package/dist/esm/configuration.d.ts +91 -0
  70. package/dist/esm/configuration.js +40 -0
  71. package/dist/esm/index.d.ts +14 -0
  72. package/dist/esm/index.js +16 -0
  73. package/dist/esm/models/ancestor-info.d.ts +36 -0
  74. package/dist/esm/models/ancestor-info.js +14 -0
  75. package/dist/esm/models/audit-log-details-one-of.d.ts +42 -0
  76. package/dist/esm/models/audit-log-details-one-of.js +14 -0
  77. package/dist/esm/models/audit-log-details-one-of1.d.ts +37 -0
  78. package/dist/esm/models/audit-log-details-one-of1.js +14 -0
  79. package/dist/esm/models/audit-log-details-one-of2.d.ts +30 -0
  80. package/dist/esm/models/audit-log-details-one-of2.js +14 -0
  81. package/dist/esm/models/audit-log-details-one-of3.d.ts +30 -0
  82. package/dist/esm/models/audit-log-details-one-of3.js +14 -0
  83. package/dist/esm/models/audit-log-details-one-of4.d.ts +30 -0
  84. package/dist/esm/models/audit-log-details-one-of4.js +14 -0
  85. package/dist/esm/models/audit-log-details-one-of5.d.ts +30 -0
  86. package/dist/esm/models/audit-log-details-one-of5.js +14 -0
  87. package/dist/esm/models/audit-log-details-one-of6.d.ts +38 -0
  88. package/dist/esm/models/audit-log-details-one-of6.js +14 -0
  89. package/dist/esm/models/audit-log-details-one-of7.d.ts +32 -0
  90. package/dist/esm/models/audit-log-details-one-of7.js +14 -0
  91. package/dist/esm/models/audit-log-details-one-of8.d.ts +44 -0
  92. package/dist/esm/models/audit-log-details-one-of8.js +14 -0
  93. package/dist/esm/models/audit-log-details.d.ts +25 -0
  94. package/dist/esm/models/audit-log-details.js +14 -0
  95. package/dist/esm/models/audit-log.d.ts +105 -0
  96. package/dist/esm/models/audit-log.js +49 -0
  97. package/dist/esm/models/audit-verification-result-broken-link.d.ts +36 -0
  98. package/dist/esm/models/audit-verification-result-broken-link.js +14 -0
  99. package/dist/esm/models/audit-verification-result.d.ts +55 -0
  100. package/dist/esm/models/audit-verification-result.js +18 -0
  101. package/dist/esm/models/broken-link.d.ts +36 -0
  102. package/dist/esm/models/broken-link.js +14 -0
  103. package/dist/esm/models/copy-audit.d.ts +42 -0
  104. package/dist/esm/models/copy-audit.js +14 -0
  105. package/dist/esm/models/copy-request.d.ts +36 -0
  106. package/dist/esm/models/copy-request.js +14 -0
  107. package/dist/esm/models/copy-response.d.ts +30 -0
  108. package/dist/esm/models/copy-response.js +14 -0
  109. package/dist/esm/models/create-blank-document-request.d.ts +43 -0
  110. package/dist/esm/models/create-blank-document-request.js +19 -0
  111. package/dist/esm/models/create-folder-audit.d.ts +37 -0
  112. package/dist/esm/models/create-folder-audit.js +14 -0
  113. package/dist/esm/models/create-folder-request.d.ts +30 -0
  114. package/dist/esm/models/create-folder-request.js +14 -0
  115. package/dist/esm/models/dashboard-statistics-response-storage-file-type-breakdown-inner.d.ts +36 -0
  116. package/dist/esm/models/dashboard-statistics-response-storage-file-type-breakdown-inner.js +14 -0
  117. package/dist/esm/models/dashboard-statistics-response-storage.d.ts +37 -0
  118. package/dist/esm/models/dashboard-statistics-response-storage.js +14 -0
  119. package/dist/esm/models/dashboard-statistics-response.d.ts +44 -0
  120. package/dist/esm/models/dashboard-statistics-response.js +14 -0
  121. package/dist/esm/models/delete-audit.d.ts +30 -0
  122. package/dist/esm/models/delete-audit.js +14 -0
  123. package/dist/esm/models/delete-metadata-audit.d.ts +30 -0
  124. package/dist/esm/models/delete-metadata-audit.js +14 -0
  125. package/dist/esm/models/delete-metadata-request.d.ts +24 -0
  126. package/dist/esm/models/delete-metadata-request.js +14 -0
  127. package/dist/esm/models/delete-request.d.ts +24 -0
  128. package/dist/esm/models/delete-request.js +14 -0
  129. package/dist/esm/models/document-info.d.ts +61 -0
  130. package/dist/esm/models/document-info.js +17 -0
  131. package/dist/esm/models/document-position.d.ts +42 -0
  132. package/dist/esm/models/document-position.js +14 -0
  133. package/dist/esm/models/element-info.d.ts +36 -0
  134. package/dist/esm/models/element-info.js +14 -0
  135. package/dist/esm/models/file-type-stats.d.ts +36 -0
  136. package/dist/esm/models/file-type-stats.js +14 -0
  137. package/dist/esm/models/filter-input.d.ts +30 -0
  138. package/dist/esm/models/filter-input.js +14 -0
  139. package/dist/esm/models/folder-element-info.d.ts +41 -0
  140. package/dist/esm/models/folder-element-info.js +17 -0
  141. package/dist/esm/models/folder-response.d.ts +36 -0
  142. package/dist/esm/models/folder-response.js +14 -0
  143. package/dist/esm/models/index.d.ts +54 -0
  144. package/dist/esm/models/index.js +54 -0
  145. package/dist/esm/models/move-audit.d.ts +30 -0
  146. package/dist/esm/models/move-audit.js +14 -0
  147. package/dist/esm/models/move-request.d.ts +36 -0
  148. package/dist/esm/models/move-request.js +14 -0
  149. package/dist/esm/models/rename-audit.d.ts +30 -0
  150. package/dist/esm/models/rename-audit.js +14 -0
  151. package/dist/esm/models/rename-request.d.ts +24 -0
  152. package/dist/esm/models/rename-request.js +14 -0
  153. package/dist/esm/models/replace-audit.d.ts +38 -0
  154. package/dist/esm/models/replace-audit.js +14 -0
  155. package/dist/esm/models/search-by-audit-log-request.d.ts +88 -0
  156. package/dist/esm/models/search-by-audit-log-request.js +49 -0
  157. package/dist/esm/models/search-by-metadata-request.d.ts +55 -0
  158. package/dist/esm/models/search-by-metadata-request.js +17 -0
  159. package/dist/esm/models/search-metadata-request.d.ts +24 -0
  160. package/dist/esm/models/search-metadata-request.js +14 -0
  161. package/dist/esm/models/settings.d.ts +48 -0
  162. package/dist/esm/models/settings.js +14 -0
  163. package/dist/esm/models/sort-input.d.ts +35 -0
  164. package/dist/esm/models/sort-input.js +17 -0
  165. package/dist/esm/models/storage-breakdown.d.ts +37 -0
  166. package/dist/esm/models/storage-breakdown.js +14 -0
  167. package/dist/esm/models/suggest.d.ts +36 -0
  168. package/dist/esm/models/suggest.js +14 -0
  169. package/dist/esm/models/tus-config-response.d.ts +48 -0
  170. package/dist/esm/models/tus-config-response.js +14 -0
  171. package/dist/esm/models/tus-finalize-request.d.ts +44 -0
  172. package/dist/esm/models/tus-finalize-request.js +14 -0
  173. package/dist/esm/models/tus-upload-info.d.ts +48 -0
  174. package/dist/esm/models/tus-upload-info.js +14 -0
  175. package/dist/esm/models/update-metadata-audit.d.ts +32 -0
  176. package/dist/esm/models/update-metadata-audit.js +14 -0
  177. package/dist/esm/models/update-metadata-request.d.ts +26 -0
  178. package/dist/esm/models/update-metadata-request.js +14 -0
  179. package/dist/esm/models/upload-audit.d.ts +44 -0
  180. package/dist/esm/models/upload-audit.js +14 -0
  181. package/dist/esm/models/upload-response.d.ts +54 -0
  182. package/dist/esm/models/upload-response.js +14 -0
  183. package/dist/index.d.ts +14 -0
  184. package/dist/index.js +32 -0
  185. package/dist/models/ancestor-info.d.ts +36 -0
  186. package/dist/models/ancestor-info.js +15 -0
  187. package/dist/models/audit-log-details-one-of.d.ts +42 -0
  188. package/dist/models/audit-log-details-one-of.js +15 -0
  189. package/dist/models/audit-log-details-one-of1.d.ts +37 -0
  190. package/dist/models/audit-log-details-one-of1.js +15 -0
  191. package/dist/models/audit-log-details-one-of2.d.ts +30 -0
  192. package/dist/models/audit-log-details-one-of2.js +15 -0
  193. package/dist/models/audit-log-details-one-of3.d.ts +30 -0
  194. package/dist/models/audit-log-details-one-of3.js +15 -0
  195. package/dist/models/audit-log-details-one-of4.d.ts +30 -0
  196. package/dist/models/audit-log-details-one-of4.js +15 -0
  197. package/dist/models/audit-log-details-one-of5.d.ts +30 -0
  198. package/dist/models/audit-log-details-one-of5.js +15 -0
  199. package/dist/models/audit-log-details-one-of6.d.ts +38 -0
  200. package/dist/models/audit-log-details-one-of6.js +15 -0
  201. package/dist/models/audit-log-details-one-of7.d.ts +32 -0
  202. package/dist/models/audit-log-details-one-of7.js +15 -0
  203. package/dist/models/audit-log-details-one-of8.d.ts +44 -0
  204. package/dist/models/audit-log-details-one-of8.js +15 -0
  205. package/dist/models/audit-log-details.d.ts +25 -0
  206. package/dist/models/audit-log-details.js +15 -0
  207. package/dist/models/audit-log.d.ts +105 -0
  208. package/dist/models/audit-log.js +52 -0
  209. package/dist/models/audit-verification-result-broken-link.d.ts +36 -0
  210. package/dist/models/audit-verification-result-broken-link.js +15 -0
  211. package/dist/models/audit-verification-result.d.ts +55 -0
  212. package/dist/models/audit-verification-result.js +21 -0
  213. package/dist/models/broken-link.d.ts +36 -0
  214. package/dist/models/broken-link.js +15 -0
  215. package/dist/models/copy-audit.d.ts +42 -0
  216. package/dist/models/copy-audit.js +15 -0
  217. package/dist/models/copy-request.d.ts +36 -0
  218. package/dist/models/copy-request.js +15 -0
  219. package/dist/models/copy-response.d.ts +30 -0
  220. package/dist/models/copy-response.js +15 -0
  221. package/dist/models/create-blank-document-request.d.ts +43 -0
  222. package/dist/models/create-blank-document-request.js +22 -0
  223. package/dist/models/create-folder-audit.d.ts +37 -0
  224. package/dist/models/create-folder-audit.js +15 -0
  225. package/dist/models/create-folder-request.d.ts +30 -0
  226. package/dist/models/create-folder-request.js +15 -0
  227. package/dist/models/dashboard-statistics-response-storage-file-type-breakdown-inner.d.ts +36 -0
  228. package/dist/models/dashboard-statistics-response-storage-file-type-breakdown-inner.js +15 -0
  229. package/dist/models/dashboard-statistics-response-storage.d.ts +37 -0
  230. package/dist/models/dashboard-statistics-response-storage.js +15 -0
  231. package/dist/models/dashboard-statistics-response.d.ts +44 -0
  232. package/dist/models/dashboard-statistics-response.js +15 -0
  233. package/dist/models/delete-audit.d.ts +30 -0
  234. package/dist/models/delete-audit.js +15 -0
  235. package/dist/models/delete-metadata-audit.d.ts +30 -0
  236. package/dist/models/delete-metadata-audit.js +15 -0
  237. package/dist/models/delete-metadata-request.d.ts +24 -0
  238. package/dist/models/delete-metadata-request.js +15 -0
  239. package/dist/models/delete-request.d.ts +24 -0
  240. package/dist/models/delete-request.js +15 -0
  241. package/dist/models/document-info.d.ts +61 -0
  242. package/dist/models/document-info.js +20 -0
  243. package/dist/models/document-position.d.ts +42 -0
  244. package/dist/models/document-position.js +15 -0
  245. package/dist/models/element-info.d.ts +36 -0
  246. package/dist/models/element-info.js +15 -0
  247. package/dist/models/file-type-stats.d.ts +36 -0
  248. package/dist/models/file-type-stats.js +15 -0
  249. package/dist/models/filter-input.d.ts +30 -0
  250. package/dist/models/filter-input.js +15 -0
  251. package/dist/models/folder-element-info.d.ts +41 -0
  252. package/dist/models/folder-element-info.js +20 -0
  253. package/dist/models/folder-response.d.ts +36 -0
  254. package/dist/models/folder-response.js +15 -0
  255. package/dist/models/index.d.ts +54 -0
  256. package/dist/models/index.js +70 -0
  257. package/dist/models/move-audit.d.ts +30 -0
  258. package/dist/models/move-audit.js +15 -0
  259. package/dist/models/move-request.d.ts +36 -0
  260. package/dist/models/move-request.js +15 -0
  261. package/dist/models/rename-audit.d.ts +30 -0
  262. package/dist/models/rename-audit.js +15 -0
  263. package/dist/models/rename-request.d.ts +24 -0
  264. package/dist/models/rename-request.js +15 -0
  265. package/dist/models/replace-audit.d.ts +38 -0
  266. package/dist/models/replace-audit.js +15 -0
  267. package/dist/models/search-by-audit-log-request.d.ts +88 -0
  268. package/dist/models/search-by-audit-log-request.js +52 -0
  269. package/dist/models/search-by-metadata-request.d.ts +55 -0
  270. package/dist/models/search-by-metadata-request.js +20 -0
  271. package/dist/models/search-metadata-request.d.ts +24 -0
  272. package/dist/models/search-metadata-request.js +15 -0
  273. package/dist/models/settings.d.ts +48 -0
  274. package/dist/models/settings.js +15 -0
  275. package/dist/models/sort-input.d.ts +35 -0
  276. package/dist/models/sort-input.js +20 -0
  277. package/dist/models/storage-breakdown.d.ts +37 -0
  278. package/dist/models/storage-breakdown.js +15 -0
  279. package/dist/models/suggest.d.ts +36 -0
  280. package/dist/models/suggest.js +15 -0
  281. package/dist/models/tus-config-response.d.ts +48 -0
  282. package/dist/models/tus-config-response.js +15 -0
  283. package/dist/models/tus-finalize-request.d.ts +44 -0
  284. package/dist/models/tus-finalize-request.js +15 -0
  285. package/dist/models/tus-upload-info.d.ts +48 -0
  286. package/dist/models/tus-upload-info.js +15 -0
  287. package/dist/models/update-metadata-audit.d.ts +32 -0
  288. package/dist/models/update-metadata-audit.js +15 -0
  289. package/dist/models/update-metadata-request.d.ts +26 -0
  290. package/dist/models/update-metadata-request.js +15 -0
  291. package/dist/models/upload-audit.d.ts +44 -0
  292. package/dist/models/upload-audit.js +15 -0
  293. package/dist/models/upload-response.d.ts +54 -0
  294. package/dist/models/upload-response.js +15 -0
  295. package/git_push.sh +57 -0
  296. package/graphql/document-search.graphqls +44 -0
  297. package/graphql/document.graphqls +114 -0
  298. package/index.ts +18 -0
  299. package/models/ancestor-info.ts +42 -0
  300. package/models/audit-log-details-one-of.ts +48 -0
  301. package/models/audit-log-details-one-of1.ts +45 -0
  302. package/models/audit-log-details-one-of2.ts +36 -0
  303. package/models/audit-log-details-one-of3.ts +36 -0
  304. package/models/audit-log-details-one-of4.ts +36 -0
  305. package/models/audit-log-details-one-of5.ts +36 -0
  306. package/models/audit-log-details-one-of6.ts +42 -0
  307. package/models/audit-log-details-one-of7.ts +36 -0
  308. package/models/audit-log-details-one-of8.ts +48 -0
  309. package/models/audit-log-details.ts +53 -0
  310. package/models/audit-log.ts +117 -0
  311. package/models/audit-verification-result-broken-link.ts +42 -0
  312. package/models/audit-verification-result.ts +66 -0
  313. package/models/broken-link.ts +42 -0
  314. package/models/copy-audit.ts +48 -0
  315. package/models/copy-request.ts +42 -0
  316. package/models/copy-response.ts +36 -0
  317. package/models/create-blank-document-request.ts +52 -0
  318. package/models/create-folder-audit.ts +45 -0
  319. package/models/create-folder-request.ts +36 -0
  320. package/models/dashboard-statistics-response-storage-file-type-breakdown-inner.ts +42 -0
  321. package/models/dashboard-statistics-response-storage.ts +45 -0
  322. package/models/dashboard-statistics-response.ts +54 -0
  323. package/models/delete-audit.ts +36 -0
  324. package/models/delete-metadata-audit.ts +36 -0
  325. package/models/delete-metadata-request.ts +30 -0
  326. package/models/delete-request.ts +30 -0
  327. package/models/document-info.ts +68 -0
  328. package/models/document-position.ts +48 -0
  329. package/models/element-info.ts +42 -0
  330. package/models/file-type-stats.ts +42 -0
  331. package/models/filter-input.ts +36 -0
  332. package/models/folder-element-info.ts +50 -0
  333. package/models/folder-response.ts +42 -0
  334. package/models/index.ts +54 -0
  335. package/models/move-audit.ts +36 -0
  336. package/models/move-request.ts +42 -0
  337. package/models/rename-audit.ts +36 -0
  338. package/models/rename-request.ts +30 -0
  339. package/models/replace-audit.ts +42 -0
  340. package/models/search-by-audit-log-request.ts +96 -0
  341. package/models/search-by-metadata-request.ts +62 -0
  342. package/models/search-metadata-request.ts +30 -0
  343. package/models/settings.ts +54 -0
  344. package/models/sort-input.ts +44 -0
  345. package/models/storage-breakdown.ts +45 -0
  346. package/models/suggest.ts +42 -0
  347. package/models/tus-config-response.ts +54 -0
  348. package/models/tus-finalize-request.ts +48 -0
  349. package/models/tus-upload-info.ts +54 -0
  350. package/models/update-metadata-audit.ts +36 -0
  351. package/models/update-metadata-request.ts +30 -0
  352. package/models/upload-audit.ts +48 -0
  353. package/models/upload-response.ts +60 -0
  354. package/package.json +33 -0
  355. package/tsconfig.esm.json +7 -0
  356. package/tsconfig.json +18 -0
@@ -0,0 +1,1219 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * openfilz-api
5
+ * API for Document Management System
6
+ *
7
+ * The version of the OpenAPI document: 1.0.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
15
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
16
+ return new (P || (P = Promise))(function (resolve, reject) {
17
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
18
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
19
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
20
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
21
+ });
22
+ };
23
+ import globalAxios from 'axios';
24
+ // Some imports not used depending on template conditions
25
+ // @ts-ignore
26
+ import { DUMMY_BASE_URL, assertParamExists, setBearerAuthToObject, setSearchParams, serializeDataIfNeeded, toPathString, createRequestFunction } from '../common';
27
+ // @ts-ignore
28
+ import { BASE_PATH, BaseAPI, operationServerMap } from '../base';
29
+ /**
30
+ * DocumentControllerApi - axios parameter creator
31
+ * @export
32
+ */
33
+ export const DocumentControllerApiAxiosParamCreator = function (configuration) {
34
+ return {
35
+ /**
36
+ * Creates a new blank document (Word, Excel, PowerPoint, or Text) from a template in the specified folder.
37
+ * @summary Create a blank document from template
38
+ * @param {CreateBlankDocumentRequest} createBlankDocumentRequest
39
+ * @param {*} [options] Override http request option.
40
+ * @throws {RequiredError}
41
+ */
42
+ createBlankDocument: (createBlankDocumentRequest_1, ...args_1) => __awaiter(this, [createBlankDocumentRequest_1, ...args_1], void 0, function* (createBlankDocumentRequest, options = {}) {
43
+ // verify required parameter 'createBlankDocumentRequest' is not null or undefined
44
+ assertParamExists('createBlankDocument', 'createBlankDocumentRequest', createBlankDocumentRequest);
45
+ const localVarPath = `/api/v1/documents/create-blank`;
46
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
47
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
48
+ let baseOptions;
49
+ if (configuration) {
50
+ baseOptions = configuration.baseOptions;
51
+ }
52
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
53
+ const localVarHeaderParameter = {};
54
+ const localVarQueryParameter = {};
55
+ // authentication keycloak_auth required
56
+ // http bearer authentication required
57
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
58
+ localVarHeaderParameter['Content-Type'] = 'application/json';
59
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
60
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
61
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
62
+ localVarRequestOptions.data = serializeDataIfNeeded(createBlankDocumentRequest, localVarRequestOptions, configuration);
63
+ return {
64
+ url: toPathString(localVarUrlObj),
65
+ options: localVarRequestOptions,
66
+ };
67
+ }),
68
+ /**
69
+ * Deletes specified metadata keys from a document.
70
+ * @summary Delete specific metadata keys
71
+ * @param {string} documentId
72
+ * @param {DeleteMetadataRequest} deleteMetadataRequest
73
+ * @param {*} [options] Override http request option.
74
+ * @throws {RequiredError}
75
+ */
76
+ deleteDocumentMetadata: (documentId_1, deleteMetadataRequest_1, ...args_1) => __awaiter(this, [documentId_1, deleteMetadataRequest_1, ...args_1], void 0, function* (documentId, deleteMetadataRequest, options = {}) {
77
+ // verify required parameter 'documentId' is not null or undefined
78
+ assertParamExists('deleteDocumentMetadata', 'documentId', documentId);
79
+ // verify required parameter 'deleteMetadataRequest' is not null or undefined
80
+ assertParamExists('deleteDocumentMetadata', 'deleteMetadataRequest', deleteMetadataRequest);
81
+ const localVarPath = `/api/v1/documents/{documentId}/metadata`
82
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
83
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
84
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
85
+ let baseOptions;
86
+ if (configuration) {
87
+ baseOptions = configuration.baseOptions;
88
+ }
89
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'DELETE' }, baseOptions), options);
90
+ const localVarHeaderParameter = {};
91
+ const localVarQueryParameter = {};
92
+ // authentication keycloak_auth required
93
+ // http bearer authentication required
94
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
95
+ localVarHeaderParameter['Content-Type'] = 'application/json';
96
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
97
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
98
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
99
+ localVarRequestOptions.data = serializeDataIfNeeded(deleteMetadataRequest, localVarRequestOptions, configuration);
100
+ return {
101
+ url: toPathString(localVarUrlObj),
102
+ options: localVarRequestOptions,
103
+ };
104
+ }),
105
+ /**
106
+ * Downloads a single file document.
107
+ * @summary Download a document
108
+ * @param {string} documentId
109
+ * @param {*} [options] Override http request option.
110
+ * @throws {RequiredError}
111
+ */
112
+ downloadDocument: (documentId_1, ...args_1) => __awaiter(this, [documentId_1, ...args_1], void 0, function* (documentId, options = {}) {
113
+ // verify required parameter 'documentId' is not null or undefined
114
+ assertParamExists('downloadDocument', 'documentId', documentId);
115
+ const localVarPath = `/api/v1/documents/{documentId}/download`
116
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
117
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
118
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
119
+ let baseOptions;
120
+ if (configuration) {
121
+ baseOptions = configuration.baseOptions;
122
+ }
123
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
124
+ const localVarHeaderParameter = {};
125
+ const localVarQueryParameter = {};
126
+ // authentication keycloak_auth required
127
+ // http bearer authentication required
128
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
129
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
130
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
131
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
132
+ return {
133
+ url: toPathString(localVarUrlObj),
134
+ options: localVarRequestOptions,
135
+ };
136
+ }),
137
+ /**
138
+ * Internal endpoint for OnlyOffice DocumentServer to fetch document content. Uses token-based authentication.
139
+ * @summary Download document for OnlyOffice
140
+ * @param {string} documentId
141
+ * @param {string} token
142
+ * @param {*} [options] Override http request option.
143
+ * @throws {RequiredError}
144
+ */
145
+ downloadForOnlyOffice: (documentId_1, token_1, ...args_1) => __awaiter(this, [documentId_1, token_1, ...args_1], void 0, function* (documentId, token, options = {}) {
146
+ // verify required parameter 'documentId' is not null or undefined
147
+ assertParamExists('downloadForOnlyOffice', 'documentId', documentId);
148
+ // verify required parameter 'token' is not null or undefined
149
+ assertParamExists('downloadForOnlyOffice', 'token', token);
150
+ const localVarPath = `/api/v1/documents/{documentId}/onlyoffice-download`
151
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
152
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
153
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
154
+ let baseOptions;
155
+ if (configuration) {
156
+ baseOptions = configuration.baseOptions;
157
+ }
158
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
159
+ const localVarHeaderParameter = {};
160
+ const localVarQueryParameter = {};
161
+ // authentication keycloak_auth required
162
+ // http bearer authentication required
163
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
164
+ if (token !== undefined) {
165
+ localVarQueryParameter['token'] = token;
166
+ }
167
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
168
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
169
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
170
+ return {
171
+ url: toPathString(localVarUrlObj),
172
+ options: localVarRequestOptions,
173
+ };
174
+ }),
175
+ /**
176
+ * Downloads multiple documents as a single ZIP file.
177
+ * @summary Download multiple documents as ZIP
178
+ * @param {Array<string>} requestBody
179
+ * @param {*} [options] Override http request option.
180
+ * @throws {RequiredError}
181
+ */
182
+ downloadMultipleDocumentsAsZip: (requestBody_1, ...args_1) => __awaiter(this, [requestBody_1, ...args_1], void 0, function* (requestBody, options = {}) {
183
+ // verify required parameter 'requestBody' is not null or undefined
184
+ assertParamExists('downloadMultipleDocumentsAsZip', 'requestBody', requestBody);
185
+ const localVarPath = `/api/v1/documents/download-multiple`;
186
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
187
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
188
+ let baseOptions;
189
+ if (configuration) {
190
+ baseOptions = configuration.baseOptions;
191
+ }
192
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
193
+ const localVarHeaderParameter = {};
194
+ const localVarQueryParameter = {};
195
+ // authentication keycloak_auth required
196
+ // http bearer authentication required
197
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
198
+ localVarHeaderParameter['Content-Type'] = 'application/json';
199
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
200
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
201
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
202
+ localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration);
203
+ return {
204
+ url: toPathString(localVarUrlObj),
205
+ options: localVarRequestOptions,
206
+ };
207
+ }),
208
+ /**
209
+ * Retrieves all ancestor folders (parent path) of a document, ordered from root to immediate parent.
210
+ * @summary Get document ancestors
211
+ * @param {string} documentId
212
+ * @param {*} [options] Override http request option.
213
+ * @throws {RequiredError}
214
+ */
215
+ getDocumentAncestors: (documentId_1, ...args_1) => __awaiter(this, [documentId_1, ...args_1], void 0, function* (documentId, options = {}) {
216
+ // verify required parameter 'documentId' is not null or undefined
217
+ assertParamExists('getDocumentAncestors', 'documentId', documentId);
218
+ const localVarPath = `/api/v1/documents/{documentId}/ancestors`
219
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
220
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
221
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
222
+ let baseOptions;
223
+ if (configuration) {
224
+ baseOptions = configuration.baseOptions;
225
+ }
226
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
227
+ const localVarHeaderParameter = {};
228
+ const localVarQueryParameter = {};
229
+ // authentication keycloak_auth required
230
+ // http bearer authentication required
231
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
232
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
233
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
234
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
235
+ return {
236
+ url: toPathString(localVarUrlObj),
237
+ options: localVarRequestOptions,
238
+ };
239
+ }),
240
+ /**
241
+ * Retrieves information for a document.
242
+ * @summary Get information of a document
243
+ * @param {string} documentId
244
+ * @param {boolean} [withMetadata] if false : only name, type and parentId are sent (when not null) - if true : metadata and size are added in the response
245
+ * @param {*} [options] Override http request option.
246
+ * @throws {RequiredError}
247
+ */
248
+ getDocumentInfo: (documentId_1, withMetadata_1, ...args_1) => __awaiter(this, [documentId_1, withMetadata_1, ...args_1], void 0, function* (documentId, withMetadata, options = {}) {
249
+ // verify required parameter 'documentId' is not null or undefined
250
+ assertParamExists('getDocumentInfo', 'documentId', documentId);
251
+ const localVarPath = `/api/v1/documents/{documentId}/info`
252
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
253
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
254
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
255
+ let baseOptions;
256
+ if (configuration) {
257
+ baseOptions = configuration.baseOptions;
258
+ }
259
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
260
+ const localVarHeaderParameter = {};
261
+ const localVarQueryParameter = {};
262
+ // authentication keycloak_auth required
263
+ // http bearer authentication required
264
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
265
+ if (withMetadata !== undefined) {
266
+ localVarQueryParameter['withMetadata'] = withMetadata;
267
+ }
268
+ 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
+ return {
272
+ url: toPathString(localVarUrlObj),
273
+ options: localVarRequestOptions,
274
+ };
275
+ }),
276
+ /**
277
+ * Retrieves metadata for a document. Can filter by keys.
278
+ * @summary Search metadata of a document
279
+ * @param {string} documentId
280
+ * @param {SearchMetadataRequest} [searchMetadataRequest]
281
+ * @param {*} [options] Override http request option.
282
+ * @throws {RequiredError}
283
+ */
284
+ getDocumentMetadata: (documentId_1, searchMetadataRequest_1, ...args_1) => __awaiter(this, [documentId_1, searchMetadataRequest_1, ...args_1], void 0, function* (documentId, searchMetadataRequest, options = {}) {
285
+ // verify required parameter 'documentId' is not null or undefined
286
+ assertParamExists('getDocumentMetadata', 'documentId', documentId);
287
+ const localVarPath = `/api/v1/documents/{documentId}/search/metadata`
288
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
289
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
290
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
291
+ let baseOptions;
292
+ if (configuration) {
293
+ baseOptions = configuration.baseOptions;
294
+ }
295
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
296
+ const localVarHeaderParameter = {};
297
+ const localVarQueryParameter = {};
298
+ // authentication keycloak_auth required
299
+ // http bearer authentication required
300
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
301
+ localVarHeaderParameter['Content-Type'] = 'application/json';
302
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
303
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
304
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
305
+ localVarRequestOptions.data = serializeDataIfNeeded(searchMetadataRequest, localVarRequestOptions, configuration);
306
+ return {
307
+ url: toPathString(localVarUrlObj),
308
+ options: localVarRequestOptions,
309
+ };
310
+ }),
311
+ /**
312
+ * Retrieves the position of a document within its parent folder, useful for pagination.
313
+ * @summary Get document position in folder
314
+ * @param {string} documentId
315
+ * @param {string} [sortBy] Field to sort by (name, updated_at, created_at, size, type). Defaults to \&#39;name\&#39;.
316
+ * @param {string} [sortOrder] Sort order (ASC or DESC). Defaults to \&#39;ASC\&#39;.
317
+ * @param {*} [options] Override http request option.
318
+ * @throws {RequiredError}
319
+ */
320
+ getDocumentPosition: (documentId_1, sortBy_1, sortOrder_1, ...args_1) => __awaiter(this, [documentId_1, sortBy_1, sortOrder_1, ...args_1], void 0, function* (documentId, sortBy, sortOrder, options = {}) {
321
+ // verify required parameter 'documentId' is not null or undefined
322
+ assertParamExists('getDocumentPosition', 'documentId', documentId);
323
+ const localVarPath = `/api/v1/documents/{documentId}/position`
324
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
325
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
326
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
327
+ let baseOptions;
328
+ if (configuration) {
329
+ baseOptions = configuration.baseOptions;
330
+ }
331
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'GET' }, baseOptions), options);
332
+ const localVarHeaderParameter = {};
333
+ const localVarQueryParameter = {};
334
+ // authentication keycloak_auth required
335
+ // http bearer authentication required
336
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
337
+ if (sortBy !== undefined) {
338
+ localVarQueryParameter['sortBy'] = sortBy;
339
+ }
340
+ if (sortOrder !== undefined) {
341
+ localVarQueryParameter['sortOrder'] = sortOrder;
342
+ }
343
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
344
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
345
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
346
+ return {
347
+ url: toPathString(localVarUrlObj),
348
+ options: localVarRequestOptions,
349
+ };
350
+ }),
351
+ /**
352
+ * Replaces the content of an existing file document.
353
+ * @summary Replace document content
354
+ * @param {string} documentId
355
+ * @param {File} file
356
+ * @param {*} [options] Override http request option.
357
+ * @throws {RequiredError}
358
+ */
359
+ replaceDocumentContent: (documentId_1, file_1, ...args_1) => __awaiter(this, [documentId_1, file_1, ...args_1], void 0, function* (documentId, file, options = {}) {
360
+ // verify required parameter 'documentId' is not null or undefined
361
+ assertParamExists('replaceDocumentContent', 'documentId', documentId);
362
+ // verify required parameter 'file' is not null or undefined
363
+ assertParamExists('replaceDocumentContent', 'file', file);
364
+ const localVarPath = `/api/v1/documents/{documentId}/replace-content`
365
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
366
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
367
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
368
+ let baseOptions;
369
+ if (configuration) {
370
+ baseOptions = configuration.baseOptions;
371
+ }
372
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
373
+ const localVarHeaderParameter = {};
374
+ const localVarQueryParameter = {};
375
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
376
+ // authentication keycloak_auth required
377
+ // http bearer authentication required
378
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
379
+ if (file !== undefined) {
380
+ localVarFormParams.append('file', file);
381
+ }
382
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
383
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
384
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
385
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
386
+ localVarRequestOptions.data = localVarFormParams;
387
+ return {
388
+ url: toPathString(localVarUrlObj),
389
+ options: localVarRequestOptions,
390
+ };
391
+ }),
392
+ /**
393
+ * Replaces all metadata of a document (file or folder).
394
+ * @summary Replace document metadata
395
+ * @param {string} documentId
396
+ * @param {{ [key: string]: any; }} requestBody New metadata map. Replaces all existing metadata.
397
+ * @param {*} [options] Override http request option.
398
+ * @throws {RequiredError}
399
+ */
400
+ replaceDocumentMetadata: (documentId_1, requestBody_1, ...args_1) => __awaiter(this, [documentId_1, requestBody_1, ...args_1], void 0, function* (documentId, requestBody, options = {}) {
401
+ // verify required parameter 'documentId' is not null or undefined
402
+ assertParamExists('replaceDocumentMetadata', 'documentId', documentId);
403
+ // verify required parameter 'requestBody' is not null or undefined
404
+ assertParamExists('replaceDocumentMetadata', 'requestBody', requestBody);
405
+ const localVarPath = `/api/v1/documents/{documentId}/replace-metadata`
406
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
407
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
408
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
409
+ let baseOptions;
410
+ if (configuration) {
411
+ baseOptions = configuration.baseOptions;
412
+ }
413
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PUT' }, baseOptions), options);
414
+ const localVarHeaderParameter = {};
415
+ const localVarQueryParameter = {};
416
+ // authentication keycloak_auth required
417
+ // http bearer authentication required
418
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
419
+ localVarHeaderParameter['Content-Type'] = 'application/json';
420
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
421
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
422
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
423
+ localVarRequestOptions.data = serializeDataIfNeeded(requestBody, localVarRequestOptions, configuration);
424
+ return {
425
+ url: toPathString(localVarUrlObj),
426
+ options: localVarRequestOptions,
427
+ };
428
+ }),
429
+ /**
430
+ * Finds document IDs matching all provided metadata criteria.
431
+ * @summary Search document IDs by metadata
432
+ * @param {SearchByMetadataRequest} searchByMetadataRequest
433
+ * @param {*} [options] Override http request option.
434
+ * @throws {RequiredError}
435
+ */
436
+ searchDocumentIdsByMetadata: (searchByMetadataRequest_1, ...args_1) => __awaiter(this, [searchByMetadataRequest_1, ...args_1], void 0, function* (searchByMetadataRequest, options = {}) {
437
+ // verify required parameter 'searchByMetadataRequest' is not null or undefined
438
+ assertParamExists('searchDocumentIdsByMetadata', 'searchByMetadataRequest', searchByMetadataRequest);
439
+ const localVarPath = `/api/v1/documents/search/ids-by-metadata`;
440
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
441
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
442
+ let baseOptions;
443
+ if (configuration) {
444
+ baseOptions = configuration.baseOptions;
445
+ }
446
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
447
+ const localVarHeaderParameter = {};
448
+ const localVarQueryParameter = {};
449
+ // authentication keycloak_auth required
450
+ // http bearer authentication required
451
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
452
+ localVarHeaderParameter['Content-Type'] = 'application/json';
453
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
454
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
455
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
456
+ localVarRequestOptions.data = serializeDataIfNeeded(searchByMetadataRequest, localVarRequestOptions, configuration);
457
+ return {
458
+ url: toPathString(localVarUrlObj),
459
+ options: localVarRequestOptions,
460
+ };
461
+ }),
462
+ /**
463
+ * Updates or adds specific metadata fields for a document.
464
+ * @summary Update document metadata
465
+ * @param {string} documentId
466
+ * @param {UpdateMetadataRequest} updateMetadataRequest
467
+ * @param {*} [options] Override http request option.
468
+ * @throws {RequiredError}
469
+ */
470
+ updateDocumentMetadata: (documentId_1, updateMetadataRequest_1, ...args_1) => __awaiter(this, [documentId_1, updateMetadataRequest_1, ...args_1], void 0, function* (documentId, updateMetadataRequest, options = {}) {
471
+ // verify required parameter 'documentId' is not null or undefined
472
+ assertParamExists('updateDocumentMetadata', 'documentId', documentId);
473
+ // verify required parameter 'updateMetadataRequest' is not null or undefined
474
+ assertParamExists('updateDocumentMetadata', 'updateMetadataRequest', updateMetadataRequest);
475
+ const localVarPath = `/api/v1/documents/{documentId}/metadata`
476
+ .replace(`{${"documentId"}}`, encodeURIComponent(String(documentId)));
477
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
478
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
479
+ let baseOptions;
480
+ if (configuration) {
481
+ baseOptions = configuration.baseOptions;
482
+ }
483
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'PATCH' }, baseOptions), options);
484
+ const localVarHeaderParameter = {};
485
+ const localVarQueryParameter = {};
486
+ // authentication keycloak_auth required
487
+ // http bearer authentication required
488
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
489
+ localVarHeaderParameter['Content-Type'] = 'application/json';
490
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
491
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
492
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
493
+ localVarRequestOptions.data = serializeDataIfNeeded(updateMetadataRequest, localVarRequestOptions, configuration);
494
+ return {
495
+ url: toPathString(localVarUrlObj),
496
+ options: localVarRequestOptions,
497
+ };
498
+ }),
499
+ /**
500
+ * Uploads multiple files, optionally with metadata and a parent folder ID. Returns HTTP 200 if all uploads succeed, HTTP 207 (Multi-Status) if some succeed and some fail, or an appropriate error status (404, 409, 403, 500) if all uploads fail.
501
+ * @summary Upload multiple documents
502
+ * @param {Array<File>} file
503
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
504
+ * @param {string} [parametersByFilename] Paste the JSON array here&lt;br&gt;This array provides optional metadata and attributes for the uploaded files&lt;br&gt;&lt;section&gt; &lt;h3&gt;Each object in the array must contain:&lt;/h3&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;String&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Must match the filename of one of the uploaded files. Filenames must be unique in the upload request.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;fileAttributes&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;JSON Object&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Container for metadata and other file-specific attributes.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Inside &lt;code&gt;fileAttributes&lt;/code&gt;:&lt;/h4&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;parentFolderId&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;UUID&lt;/code&gt;&lt;/td&gt; &lt;td&gt;UUID of the target folder to upload the file (if not provided : the file will be uploaded at the root level)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;Map&amp;lt;String, JSON Object&amp;gt;&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Arbitrary metadata to associate with the file (key/value pairs).&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Example of &lt;code&gt;parametersByFilename&lt;/code&gt; JSON array :&lt;/h4&gt; &lt;pre&gt;&lt;code&gt;[ { \\\&quot;filename\\\&quot;: \\\&quot;file1.txt\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;parentFolderId\\\&quot;: \\\&quot;f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454\\\&quot;, \\\&quot;metadata\\\&quot;: { \\\&quot;country\\\&quot;: \\\&quot;UK\\\&quot;, \\\&quot;owner\\\&quot;: { \\\&quot;name\\\&quot;: \\\&quot;Joe\\\&quot;, \\\&quot;owner_id\\\&quot;: 1234568 } } } }, { \\\&quot;filename\\\&quot;: \\\&quot;file2.md\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;metadata\\\&quot;: { \\\&quot;key1\\\&quot;: \\\&quot;value1\\\&quot;, \\\&quot;key2\\\&quot;: \\\&quot;value2\\\&quot;, \\\&quot;key3\\\&quot;: \\\&quot;value3\\\&quot; } } } ]&lt;/code&gt;&lt;/pre&gt; &lt;/section&gt;
505
+ * @param {*} [options] Override http request option.
506
+ * @throws {RequiredError}
507
+ */
508
+ uploadDocument: (file_1, allowDuplicateFileNames_1, parametersByFilename_1, ...args_1) => __awaiter(this, [file_1, allowDuplicateFileNames_1, parametersByFilename_1, ...args_1], void 0, function* (file, allowDuplicateFileNames, parametersByFilename, options = {}) {
509
+ // verify required parameter 'file' is not null or undefined
510
+ assertParamExists('uploadDocument', 'file', file);
511
+ const localVarPath = `/api/v1/documents/upload-multiple`;
512
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
513
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
514
+ let baseOptions;
515
+ if (configuration) {
516
+ baseOptions = configuration.baseOptions;
517
+ }
518
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
519
+ const localVarHeaderParameter = {};
520
+ const localVarQueryParameter = {};
521
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
522
+ // authentication keycloak_auth required
523
+ // http bearer authentication required
524
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
525
+ if (allowDuplicateFileNames !== undefined) {
526
+ localVarQueryParameter['allowDuplicateFileNames'] = allowDuplicateFileNames;
527
+ }
528
+ if (file) {
529
+ file.forEach((element) => {
530
+ localVarFormParams.append('file', element);
531
+ });
532
+ }
533
+ if (parametersByFilename !== undefined) {
534
+ localVarFormParams.append('parametersByFilename', parametersByFilename);
535
+ }
536
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
537
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
538
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
539
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
540
+ localVarRequestOptions.data = localVarFormParams;
541
+ return {
542
+ url: toPathString(localVarUrlObj),
543
+ options: localVarRequestOptions,
544
+ };
545
+ }),
546
+ /**
547
+ * Uploads a single file, optionally with metadata and a parent folder ID.
548
+ * @summary Upload a single document
549
+ * @param {File} file
550
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
551
+ * @param {string} [parentFolderId] Target parent folder ID to store the file; if not sent or null, the file is stored at the root level
552
+ * @param {string} [metadata]
553
+ * @param {*} [options] Override http request option.
554
+ * @throws {RequiredError}
555
+ */
556
+ uploadDocument1: (file_1, allowDuplicateFileNames_1, parentFolderId_1, metadata_1, ...args_1) => __awaiter(this, [file_1, allowDuplicateFileNames_1, parentFolderId_1, metadata_1, ...args_1], void 0, function* (file, allowDuplicateFileNames, parentFolderId, metadata, options = {}) {
557
+ // verify required parameter 'file' is not null or undefined
558
+ assertParamExists('uploadDocument1', 'file', file);
559
+ const localVarPath = `/api/v1/documents/upload`;
560
+ // use dummy base URL string because the URL constructor only accepts absolute URLs.
561
+ const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL);
562
+ let baseOptions;
563
+ if (configuration) {
564
+ baseOptions = configuration.baseOptions;
565
+ }
566
+ const localVarRequestOptions = Object.assign(Object.assign({ method: 'POST' }, baseOptions), options);
567
+ const localVarHeaderParameter = {};
568
+ const localVarQueryParameter = {};
569
+ const localVarFormParams = new ((configuration && configuration.formDataCtor) || FormData)();
570
+ // authentication keycloak_auth required
571
+ // http bearer authentication required
572
+ yield setBearerAuthToObject(localVarHeaderParameter, configuration);
573
+ if (allowDuplicateFileNames !== undefined) {
574
+ localVarQueryParameter['allowDuplicateFileNames'] = allowDuplicateFileNames;
575
+ }
576
+ if (file !== undefined) {
577
+ localVarFormParams.append('file', file);
578
+ }
579
+ if (parentFolderId !== undefined) {
580
+ localVarFormParams.append('parentFolderId', parentFolderId);
581
+ }
582
+ if (metadata !== undefined) {
583
+ localVarFormParams.append('metadata', metadata);
584
+ }
585
+ localVarHeaderParameter['Content-Type'] = 'multipart/form-data';
586
+ setSearchParams(localVarUrlObj, localVarQueryParameter);
587
+ let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {};
588
+ localVarRequestOptions.headers = Object.assign(Object.assign(Object.assign({}, localVarHeaderParameter), headersFromBaseOptions), options.headers);
589
+ localVarRequestOptions.data = localVarFormParams;
590
+ return {
591
+ url: toPathString(localVarUrlObj),
592
+ options: localVarRequestOptions,
593
+ };
594
+ }),
595
+ };
596
+ };
597
+ /**
598
+ * DocumentControllerApi - functional programming interface
599
+ * @export
600
+ */
601
+ export const DocumentControllerApiFp = function (configuration) {
602
+ const localVarAxiosParamCreator = DocumentControllerApiAxiosParamCreator(configuration);
603
+ return {
604
+ /**
605
+ * Creates a new blank document (Word, Excel, PowerPoint, or Text) from a template in the specified folder.
606
+ * @summary Create a blank document from template
607
+ * @param {CreateBlankDocumentRequest} createBlankDocumentRequest
608
+ * @param {*} [options] Override http request option.
609
+ * @throws {RequiredError}
610
+ */
611
+ createBlankDocument(createBlankDocumentRequest, options) {
612
+ return __awaiter(this, void 0, void 0, function* () {
613
+ var _a, _b, _c;
614
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.createBlankDocument(createBlankDocumentRequest, options);
615
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
616
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.createBlankDocument']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
617
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
618
+ });
619
+ },
620
+ /**
621
+ * Deletes specified metadata keys from a document.
622
+ * @summary Delete specific metadata keys
623
+ * @param {string} documentId
624
+ * @param {DeleteMetadataRequest} deleteMetadataRequest
625
+ * @param {*} [options] Override http request option.
626
+ * @throws {RequiredError}
627
+ */
628
+ deleteDocumentMetadata(documentId, deleteMetadataRequest, options) {
629
+ return __awaiter(this, void 0, void 0, function* () {
630
+ var _a, _b, _c;
631
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.deleteDocumentMetadata(documentId, deleteMetadataRequest, options);
632
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
633
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.deleteDocumentMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
634
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
635
+ });
636
+ },
637
+ /**
638
+ * Downloads a single file document.
639
+ * @summary Download a document
640
+ * @param {string} documentId
641
+ * @param {*} [options] Override http request option.
642
+ * @throws {RequiredError}
643
+ */
644
+ downloadDocument(documentId, options) {
645
+ return __awaiter(this, void 0, void 0, function* () {
646
+ var _a, _b, _c;
647
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadDocument(documentId, options);
648
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
649
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.downloadDocument']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
650
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
651
+ });
652
+ },
653
+ /**
654
+ * Internal endpoint for OnlyOffice DocumentServer to fetch document content. Uses token-based authentication.
655
+ * @summary Download document for OnlyOffice
656
+ * @param {string} documentId
657
+ * @param {string} token
658
+ * @param {*} [options] Override http request option.
659
+ * @throws {RequiredError}
660
+ */
661
+ downloadForOnlyOffice(documentId, token, options) {
662
+ return __awaiter(this, void 0, void 0, function* () {
663
+ var _a, _b, _c;
664
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadForOnlyOffice(documentId, token, options);
665
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
666
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.downloadForOnlyOffice']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
667
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
668
+ });
669
+ },
670
+ /**
671
+ * Downloads multiple documents as a single ZIP file.
672
+ * @summary Download multiple documents as ZIP
673
+ * @param {Array<string>} requestBody
674
+ * @param {*} [options] Override http request option.
675
+ * @throws {RequiredError}
676
+ */
677
+ downloadMultipleDocumentsAsZip(requestBody, options) {
678
+ return __awaiter(this, void 0, void 0, function* () {
679
+ var _a, _b, _c;
680
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.downloadMultipleDocumentsAsZip(requestBody, 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 = operationServerMap['DocumentControllerApi.downloadMultipleDocumentsAsZip']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
683
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
684
+ });
685
+ },
686
+ /**
687
+ * Retrieves all ancestor folders (parent path) of a document, ordered from root to immediate parent.
688
+ * @summary Get document ancestors
689
+ * @param {string} documentId
690
+ * @param {*} [options] Override http request option.
691
+ * @throws {RequiredError}
692
+ */
693
+ getDocumentAncestors(documentId, options) {
694
+ return __awaiter(this, void 0, void 0, function* () {
695
+ var _a, _b, _c;
696
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDocumentAncestors(documentId, 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 = operationServerMap['DocumentControllerApi.getDocumentAncestors']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
699
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
700
+ });
701
+ },
702
+ /**
703
+ * Retrieves information for a document.
704
+ * @summary Get information of a document
705
+ * @param {string} documentId
706
+ * @param {boolean} [withMetadata] if false : only name, type and parentId are sent (when not null) - if true : metadata and size are added in the response
707
+ * @param {*} [options] Override http request option.
708
+ * @throws {RequiredError}
709
+ */
710
+ getDocumentInfo(documentId, withMetadata, options) {
711
+ return __awaiter(this, void 0, void 0, function* () {
712
+ var _a, _b, _c;
713
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDocumentInfo(documentId, withMetadata, options);
714
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
715
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.getDocumentInfo']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
716
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
717
+ });
718
+ },
719
+ /**
720
+ * Retrieves metadata for a document. Can filter by keys.
721
+ * @summary Search metadata of a document
722
+ * @param {string} documentId
723
+ * @param {SearchMetadataRequest} [searchMetadataRequest]
724
+ * @param {*} [options] Override http request option.
725
+ * @throws {RequiredError}
726
+ */
727
+ getDocumentMetadata(documentId, searchMetadataRequest, options) {
728
+ return __awaiter(this, void 0, void 0, function* () {
729
+ var _a, _b, _c;
730
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDocumentMetadata(documentId, searchMetadataRequest, options);
731
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
732
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.getDocumentMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
733
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
734
+ });
735
+ },
736
+ /**
737
+ * Retrieves the position of a document within its parent folder, useful for pagination.
738
+ * @summary Get document position in folder
739
+ * @param {string} documentId
740
+ * @param {string} [sortBy] Field to sort by (name, updated_at, created_at, size, type). Defaults to \&#39;name\&#39;.
741
+ * @param {string} [sortOrder] Sort order (ASC or DESC). Defaults to \&#39;ASC\&#39;.
742
+ * @param {*} [options] Override http request option.
743
+ * @throws {RequiredError}
744
+ */
745
+ getDocumentPosition(documentId, sortBy, sortOrder, options) {
746
+ return __awaiter(this, void 0, void 0, function* () {
747
+ var _a, _b, _c;
748
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.getDocumentPosition(documentId, sortBy, sortOrder, options);
749
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
750
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.getDocumentPosition']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
751
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
752
+ });
753
+ },
754
+ /**
755
+ * Replaces the content of an existing file document.
756
+ * @summary Replace document content
757
+ * @param {string} documentId
758
+ * @param {File} file
759
+ * @param {*} [options] Override http request option.
760
+ * @throws {RequiredError}
761
+ */
762
+ replaceDocumentContent(documentId, file, options) {
763
+ return __awaiter(this, void 0, void 0, function* () {
764
+ var _a, _b, _c;
765
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceDocumentContent(documentId, file, options);
766
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
767
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.replaceDocumentContent']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
768
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
769
+ });
770
+ },
771
+ /**
772
+ * Replaces all metadata of a document (file or folder).
773
+ * @summary Replace document metadata
774
+ * @param {string} documentId
775
+ * @param {{ [key: string]: any; }} requestBody New metadata map. Replaces all existing metadata.
776
+ * @param {*} [options] Override http request option.
777
+ * @throws {RequiredError}
778
+ */
779
+ replaceDocumentMetadata(documentId, requestBody, options) {
780
+ return __awaiter(this, void 0, void 0, function* () {
781
+ var _a, _b, _c;
782
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.replaceDocumentMetadata(documentId, requestBody, options);
783
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
784
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.replaceDocumentMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
785
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
786
+ });
787
+ },
788
+ /**
789
+ * Finds document IDs matching all provided metadata criteria.
790
+ * @summary Search document IDs by metadata
791
+ * @param {SearchByMetadataRequest} searchByMetadataRequest
792
+ * @param {*} [options] Override http request option.
793
+ * @throws {RequiredError}
794
+ */
795
+ searchDocumentIdsByMetadata(searchByMetadataRequest, options) {
796
+ return __awaiter(this, void 0, void 0, function* () {
797
+ var _a, _b, _c;
798
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.searchDocumentIdsByMetadata(searchByMetadataRequest, options);
799
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
800
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.searchDocumentIdsByMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
801
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
802
+ });
803
+ },
804
+ /**
805
+ * Updates or adds specific metadata fields for a document.
806
+ * @summary Update document metadata
807
+ * @param {string} documentId
808
+ * @param {UpdateMetadataRequest} updateMetadataRequest
809
+ * @param {*} [options] Override http request option.
810
+ * @throws {RequiredError}
811
+ */
812
+ updateDocumentMetadata(documentId, updateMetadataRequest, options) {
813
+ return __awaiter(this, void 0, void 0, function* () {
814
+ var _a, _b, _c;
815
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.updateDocumentMetadata(documentId, updateMetadataRequest, options);
816
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
817
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.updateDocumentMetadata']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
818
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
819
+ });
820
+ },
821
+ /**
822
+ * Uploads multiple files, optionally with metadata and a parent folder ID. Returns HTTP 200 if all uploads succeed, HTTP 207 (Multi-Status) if some succeed and some fail, or an appropriate error status (404, 409, 403, 500) if all uploads fail.
823
+ * @summary Upload multiple documents
824
+ * @param {Array<File>} file
825
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
826
+ * @param {string} [parametersByFilename] Paste the JSON array here&lt;br&gt;This array provides optional metadata and attributes for the uploaded files&lt;br&gt;&lt;section&gt; &lt;h3&gt;Each object in the array must contain:&lt;/h3&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;String&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Must match the filename of one of the uploaded files. Filenames must be unique in the upload request.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;fileAttributes&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;JSON Object&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Container for metadata and other file-specific attributes.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Inside &lt;code&gt;fileAttributes&lt;/code&gt;:&lt;/h4&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;parentFolderId&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;UUID&lt;/code&gt;&lt;/td&gt; &lt;td&gt;UUID of the target folder to upload the file (if not provided : the file will be uploaded at the root level)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;Map&amp;lt;String, JSON Object&amp;gt;&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Arbitrary metadata to associate with the file (key/value pairs).&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Example of &lt;code&gt;parametersByFilename&lt;/code&gt; JSON array :&lt;/h4&gt; &lt;pre&gt;&lt;code&gt;[ { \\\&quot;filename\\\&quot;: \\\&quot;file1.txt\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;parentFolderId\\\&quot;: \\\&quot;f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454\\\&quot;, \\\&quot;metadata\\\&quot;: { \\\&quot;country\\\&quot;: \\\&quot;UK\\\&quot;, \\\&quot;owner\\\&quot;: { \\\&quot;name\\\&quot;: \\\&quot;Joe\\\&quot;, \\\&quot;owner_id\\\&quot;: 1234568 } } } }, { \\\&quot;filename\\\&quot;: \\\&quot;file2.md\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;metadata\\\&quot;: { \\\&quot;key1\\\&quot;: \\\&quot;value1\\\&quot;, \\\&quot;key2\\\&quot;: \\\&quot;value2\\\&quot;, \\\&quot;key3\\\&quot;: \\\&quot;value3\\\&quot; } } } ]&lt;/code&gt;&lt;/pre&gt; &lt;/section&gt;
827
+ * @param {*} [options] Override http request option.
828
+ * @throws {RequiredError}
829
+ */
830
+ uploadDocument(file, allowDuplicateFileNames, parametersByFilename, options) {
831
+ return __awaiter(this, void 0, void 0, function* () {
832
+ var _a, _b, _c;
833
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadDocument(file, allowDuplicateFileNames, parametersByFilename, options);
834
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
835
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.uploadDocument']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
836
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
837
+ });
838
+ },
839
+ /**
840
+ * Uploads a single file, optionally with metadata and a parent folder ID.
841
+ * @summary Upload a single document
842
+ * @param {File} file
843
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
844
+ * @param {string} [parentFolderId] Target parent folder ID to store the file; if not sent or null, the file is stored at the root level
845
+ * @param {string} [metadata]
846
+ * @param {*} [options] Override http request option.
847
+ * @throws {RequiredError}
848
+ */
849
+ uploadDocument1(file, allowDuplicateFileNames, parentFolderId, metadata, options) {
850
+ return __awaiter(this, void 0, void 0, function* () {
851
+ var _a, _b, _c;
852
+ const localVarAxiosArgs = yield localVarAxiosParamCreator.uploadDocument1(file, allowDuplicateFileNames, parentFolderId, metadata, options);
853
+ const localVarOperationServerIndex = (_a = configuration === null || configuration === void 0 ? void 0 : configuration.serverIndex) !== null && _a !== void 0 ? _a : 0;
854
+ const localVarOperationServerBasePath = (_c = (_b = operationServerMap['DocumentControllerApi.uploadDocument1']) === null || _b === void 0 ? void 0 : _b[localVarOperationServerIndex]) === null || _c === void 0 ? void 0 : _c.url;
855
+ return (axios, basePath) => createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration)(axios, localVarOperationServerBasePath || basePath);
856
+ });
857
+ },
858
+ };
859
+ };
860
+ /**
861
+ * DocumentControllerApi - factory interface
862
+ * @export
863
+ */
864
+ export const DocumentControllerApiFactory = function (configuration, basePath, axios) {
865
+ const localVarFp = DocumentControllerApiFp(configuration);
866
+ return {
867
+ /**
868
+ * Creates a new blank document (Word, Excel, PowerPoint, or Text) from a template in the specified folder.
869
+ * @summary Create a blank document from template
870
+ * @param {CreateBlankDocumentRequest} createBlankDocumentRequest
871
+ * @param {*} [options] Override http request option.
872
+ * @throws {RequiredError}
873
+ */
874
+ createBlankDocument(createBlankDocumentRequest, options) {
875
+ return localVarFp.createBlankDocument(createBlankDocumentRequest, options).then((request) => request(axios, basePath));
876
+ },
877
+ /**
878
+ * Deletes specified metadata keys from a document.
879
+ * @summary Delete specific metadata keys
880
+ * @param {string} documentId
881
+ * @param {DeleteMetadataRequest} deleteMetadataRequest
882
+ * @param {*} [options] Override http request option.
883
+ * @throws {RequiredError}
884
+ */
885
+ deleteDocumentMetadata(documentId, deleteMetadataRequest, options) {
886
+ return localVarFp.deleteDocumentMetadata(documentId, deleteMetadataRequest, options).then((request) => request(axios, basePath));
887
+ },
888
+ /**
889
+ * Downloads a single file document.
890
+ * @summary Download a document
891
+ * @param {string} documentId
892
+ * @param {*} [options] Override http request option.
893
+ * @throws {RequiredError}
894
+ */
895
+ downloadDocument(documentId, options) {
896
+ return localVarFp.downloadDocument(documentId, options).then((request) => request(axios, basePath));
897
+ },
898
+ /**
899
+ * Internal endpoint for OnlyOffice DocumentServer to fetch document content. Uses token-based authentication.
900
+ * @summary Download document for OnlyOffice
901
+ * @param {string} documentId
902
+ * @param {string} token
903
+ * @param {*} [options] Override http request option.
904
+ * @throws {RequiredError}
905
+ */
906
+ downloadForOnlyOffice(documentId, token, options) {
907
+ return localVarFp.downloadForOnlyOffice(documentId, token, options).then((request) => request(axios, basePath));
908
+ },
909
+ /**
910
+ * Downloads multiple documents as a single ZIP file.
911
+ * @summary Download multiple documents as ZIP
912
+ * @param {Array<string>} requestBody
913
+ * @param {*} [options] Override http request option.
914
+ * @throws {RequiredError}
915
+ */
916
+ downloadMultipleDocumentsAsZip(requestBody, options) {
917
+ return localVarFp.downloadMultipleDocumentsAsZip(requestBody, options).then((request) => request(axios, basePath));
918
+ },
919
+ /**
920
+ * Retrieves all ancestor folders (parent path) of a document, ordered from root to immediate parent.
921
+ * @summary Get document ancestors
922
+ * @param {string} documentId
923
+ * @param {*} [options] Override http request option.
924
+ * @throws {RequiredError}
925
+ */
926
+ getDocumentAncestors(documentId, options) {
927
+ return localVarFp.getDocumentAncestors(documentId, options).then((request) => request(axios, basePath));
928
+ },
929
+ /**
930
+ * Retrieves information for a document.
931
+ * @summary Get information of a document
932
+ * @param {string} documentId
933
+ * @param {boolean} [withMetadata] if false : only name, type and parentId are sent (when not null) - if true : metadata and size are added in the response
934
+ * @param {*} [options] Override http request option.
935
+ * @throws {RequiredError}
936
+ */
937
+ getDocumentInfo(documentId, withMetadata, options) {
938
+ return localVarFp.getDocumentInfo(documentId, withMetadata, options).then((request) => request(axios, basePath));
939
+ },
940
+ /**
941
+ * Retrieves metadata for a document. Can filter by keys.
942
+ * @summary Search metadata of a document
943
+ * @param {string} documentId
944
+ * @param {SearchMetadataRequest} [searchMetadataRequest]
945
+ * @param {*} [options] Override http request option.
946
+ * @throws {RequiredError}
947
+ */
948
+ getDocumentMetadata(documentId, searchMetadataRequest, options) {
949
+ return localVarFp.getDocumentMetadata(documentId, searchMetadataRequest, options).then((request) => request(axios, basePath));
950
+ },
951
+ /**
952
+ * Retrieves the position of a document within its parent folder, useful for pagination.
953
+ * @summary Get document position in folder
954
+ * @param {string} documentId
955
+ * @param {string} [sortBy] Field to sort by (name, updated_at, created_at, size, type). Defaults to \&#39;name\&#39;.
956
+ * @param {string} [sortOrder] Sort order (ASC or DESC). Defaults to \&#39;ASC\&#39;.
957
+ * @param {*} [options] Override http request option.
958
+ * @throws {RequiredError}
959
+ */
960
+ getDocumentPosition(documentId, sortBy, sortOrder, options) {
961
+ return localVarFp.getDocumentPosition(documentId, sortBy, sortOrder, options).then((request) => request(axios, basePath));
962
+ },
963
+ /**
964
+ * Replaces the content of an existing file document.
965
+ * @summary Replace document content
966
+ * @param {string} documentId
967
+ * @param {File} file
968
+ * @param {*} [options] Override http request option.
969
+ * @throws {RequiredError}
970
+ */
971
+ replaceDocumentContent(documentId, file, options) {
972
+ return localVarFp.replaceDocumentContent(documentId, file, options).then((request) => request(axios, basePath));
973
+ },
974
+ /**
975
+ * Replaces all metadata of a document (file or folder).
976
+ * @summary Replace document metadata
977
+ * @param {string} documentId
978
+ * @param {{ [key: string]: any; }} requestBody New metadata map. Replaces all existing metadata.
979
+ * @param {*} [options] Override http request option.
980
+ * @throws {RequiredError}
981
+ */
982
+ replaceDocumentMetadata(documentId, requestBody, options) {
983
+ return localVarFp.replaceDocumentMetadata(documentId, requestBody, options).then((request) => request(axios, basePath));
984
+ },
985
+ /**
986
+ * Finds document IDs matching all provided metadata criteria.
987
+ * @summary Search document IDs by metadata
988
+ * @param {SearchByMetadataRequest} searchByMetadataRequest
989
+ * @param {*} [options] Override http request option.
990
+ * @throws {RequiredError}
991
+ */
992
+ searchDocumentIdsByMetadata(searchByMetadataRequest, options) {
993
+ return localVarFp.searchDocumentIdsByMetadata(searchByMetadataRequest, options).then((request) => request(axios, basePath));
994
+ },
995
+ /**
996
+ * Updates or adds specific metadata fields for a document.
997
+ * @summary Update document metadata
998
+ * @param {string} documentId
999
+ * @param {UpdateMetadataRequest} updateMetadataRequest
1000
+ * @param {*} [options] Override http request option.
1001
+ * @throws {RequiredError}
1002
+ */
1003
+ updateDocumentMetadata(documentId, updateMetadataRequest, options) {
1004
+ return localVarFp.updateDocumentMetadata(documentId, updateMetadataRequest, options).then((request) => request(axios, basePath));
1005
+ },
1006
+ /**
1007
+ * Uploads multiple files, optionally with metadata and a parent folder ID. Returns HTTP 200 if all uploads succeed, HTTP 207 (Multi-Status) if some succeed and some fail, or an appropriate error status (404, 409, 403, 500) if all uploads fail.
1008
+ * @summary Upload multiple documents
1009
+ * @param {Array<File>} file
1010
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
1011
+ * @param {string} [parametersByFilename] Paste the JSON array here&lt;br&gt;This array provides optional metadata and attributes for the uploaded files&lt;br&gt;&lt;section&gt; &lt;h3&gt;Each object in the array must contain:&lt;/h3&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;String&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Must match the filename of one of the uploaded files. Filenames must be unique in the upload request.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;fileAttributes&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;JSON Object&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Container for metadata and other file-specific attributes.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Inside &lt;code&gt;fileAttributes&lt;/code&gt;:&lt;/h4&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;parentFolderId&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;UUID&lt;/code&gt;&lt;/td&gt; &lt;td&gt;UUID of the target folder to upload the file (if not provided : the file will be uploaded at the root level)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;Map&amp;lt;String, JSON Object&amp;gt;&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Arbitrary metadata to associate with the file (key/value pairs).&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Example of &lt;code&gt;parametersByFilename&lt;/code&gt; JSON array :&lt;/h4&gt; &lt;pre&gt;&lt;code&gt;[ { \\\&quot;filename\\\&quot;: \\\&quot;file1.txt\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;parentFolderId\\\&quot;: \\\&quot;f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454\\\&quot;, \\\&quot;metadata\\\&quot;: { \\\&quot;country\\\&quot;: \\\&quot;UK\\\&quot;, \\\&quot;owner\\\&quot;: { \\\&quot;name\\\&quot;: \\\&quot;Joe\\\&quot;, \\\&quot;owner_id\\\&quot;: 1234568 } } } }, { \\\&quot;filename\\\&quot;: \\\&quot;file2.md\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;metadata\\\&quot;: { \\\&quot;key1\\\&quot;: \\\&quot;value1\\\&quot;, \\\&quot;key2\\\&quot;: \\\&quot;value2\\\&quot;, \\\&quot;key3\\\&quot;: \\\&quot;value3\\\&quot; } } } ]&lt;/code&gt;&lt;/pre&gt; &lt;/section&gt;
1012
+ * @param {*} [options] Override http request option.
1013
+ * @throws {RequiredError}
1014
+ */
1015
+ uploadDocument(file, allowDuplicateFileNames, parametersByFilename, options) {
1016
+ return localVarFp.uploadDocument(file, allowDuplicateFileNames, parametersByFilename, options).then((request) => request(axios, basePath));
1017
+ },
1018
+ /**
1019
+ * Uploads a single file, optionally with metadata and a parent folder ID.
1020
+ * @summary Upload a single document
1021
+ * @param {File} file
1022
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
1023
+ * @param {string} [parentFolderId] Target parent folder ID to store the file; if not sent or null, the file is stored at the root level
1024
+ * @param {string} [metadata]
1025
+ * @param {*} [options] Override http request option.
1026
+ * @throws {RequiredError}
1027
+ */
1028
+ uploadDocument1(file, allowDuplicateFileNames, parentFolderId, metadata, options) {
1029
+ return localVarFp.uploadDocument1(file, allowDuplicateFileNames, parentFolderId, metadata, options).then((request) => request(axios, basePath));
1030
+ },
1031
+ };
1032
+ };
1033
+ /**
1034
+ * DocumentControllerApi - object-oriented interface
1035
+ * @export
1036
+ * @class DocumentControllerApi
1037
+ * @extends {BaseAPI}
1038
+ */
1039
+ export class DocumentControllerApi extends BaseAPI {
1040
+ /**
1041
+ * Creates a new blank document (Word, Excel, PowerPoint, or Text) from a template in the specified folder.
1042
+ * @summary Create a blank document from template
1043
+ * @param {CreateBlankDocumentRequest} createBlankDocumentRequest
1044
+ * @param {*} [options] Override http request option.
1045
+ * @throws {RequiredError}
1046
+ * @memberof DocumentControllerApi
1047
+ */
1048
+ createBlankDocument(createBlankDocumentRequest, options) {
1049
+ return DocumentControllerApiFp(this.configuration).createBlankDocument(createBlankDocumentRequest, options).then((request) => request(this.axios, this.basePath));
1050
+ }
1051
+ /**
1052
+ * Deletes specified metadata keys from a document.
1053
+ * @summary Delete specific metadata keys
1054
+ * @param {string} documentId
1055
+ * @param {DeleteMetadataRequest} deleteMetadataRequest
1056
+ * @param {*} [options] Override http request option.
1057
+ * @throws {RequiredError}
1058
+ * @memberof DocumentControllerApi
1059
+ */
1060
+ deleteDocumentMetadata(documentId, deleteMetadataRequest, options) {
1061
+ return DocumentControllerApiFp(this.configuration).deleteDocumentMetadata(documentId, deleteMetadataRequest, options).then((request) => request(this.axios, this.basePath));
1062
+ }
1063
+ /**
1064
+ * Downloads a single file document.
1065
+ * @summary Download a document
1066
+ * @param {string} documentId
1067
+ * @param {*} [options] Override http request option.
1068
+ * @throws {RequiredError}
1069
+ * @memberof DocumentControllerApi
1070
+ */
1071
+ downloadDocument(documentId, options) {
1072
+ return DocumentControllerApiFp(this.configuration).downloadDocument(documentId, options).then((request) => request(this.axios, this.basePath));
1073
+ }
1074
+ /**
1075
+ * Internal endpoint for OnlyOffice DocumentServer to fetch document content. Uses token-based authentication.
1076
+ * @summary Download document for OnlyOffice
1077
+ * @param {string} documentId
1078
+ * @param {string} token
1079
+ * @param {*} [options] Override http request option.
1080
+ * @throws {RequiredError}
1081
+ * @memberof DocumentControllerApi
1082
+ */
1083
+ downloadForOnlyOffice(documentId, token, options) {
1084
+ return DocumentControllerApiFp(this.configuration).downloadForOnlyOffice(documentId, token, options).then((request) => request(this.axios, this.basePath));
1085
+ }
1086
+ /**
1087
+ * Downloads multiple documents as a single ZIP file.
1088
+ * @summary Download multiple documents as ZIP
1089
+ * @param {Array<string>} requestBody
1090
+ * @param {*} [options] Override http request option.
1091
+ * @throws {RequiredError}
1092
+ * @memberof DocumentControllerApi
1093
+ */
1094
+ downloadMultipleDocumentsAsZip(requestBody, options) {
1095
+ return DocumentControllerApiFp(this.configuration).downloadMultipleDocumentsAsZip(requestBody, options).then((request) => request(this.axios, this.basePath));
1096
+ }
1097
+ /**
1098
+ * Retrieves all ancestor folders (parent path) of a document, ordered from root to immediate parent.
1099
+ * @summary Get document ancestors
1100
+ * @param {string} documentId
1101
+ * @param {*} [options] Override http request option.
1102
+ * @throws {RequiredError}
1103
+ * @memberof DocumentControllerApi
1104
+ */
1105
+ getDocumentAncestors(documentId, options) {
1106
+ return DocumentControllerApiFp(this.configuration).getDocumentAncestors(documentId, options).then((request) => request(this.axios, this.basePath));
1107
+ }
1108
+ /**
1109
+ * Retrieves information for a document.
1110
+ * @summary Get information of a document
1111
+ * @param {string} documentId
1112
+ * @param {boolean} [withMetadata] if false : only name, type and parentId are sent (when not null) - if true : metadata and size are added in the response
1113
+ * @param {*} [options] Override http request option.
1114
+ * @throws {RequiredError}
1115
+ * @memberof DocumentControllerApi
1116
+ */
1117
+ getDocumentInfo(documentId, withMetadata, options) {
1118
+ return DocumentControllerApiFp(this.configuration).getDocumentInfo(documentId, withMetadata, options).then((request) => request(this.axios, this.basePath));
1119
+ }
1120
+ /**
1121
+ * Retrieves metadata for a document. Can filter by keys.
1122
+ * @summary Search metadata of a document
1123
+ * @param {string} documentId
1124
+ * @param {SearchMetadataRequest} [searchMetadataRequest]
1125
+ * @param {*} [options] Override http request option.
1126
+ * @throws {RequiredError}
1127
+ * @memberof DocumentControllerApi
1128
+ */
1129
+ getDocumentMetadata(documentId, searchMetadataRequest, options) {
1130
+ return DocumentControllerApiFp(this.configuration).getDocumentMetadata(documentId, searchMetadataRequest, options).then((request) => request(this.axios, this.basePath));
1131
+ }
1132
+ /**
1133
+ * Retrieves the position of a document within its parent folder, useful for pagination.
1134
+ * @summary Get document position in folder
1135
+ * @param {string} documentId
1136
+ * @param {string} [sortBy] Field to sort by (name, updated_at, created_at, size, type). Defaults to \&#39;name\&#39;.
1137
+ * @param {string} [sortOrder] Sort order (ASC or DESC). Defaults to \&#39;ASC\&#39;.
1138
+ * @param {*} [options] Override http request option.
1139
+ * @throws {RequiredError}
1140
+ * @memberof DocumentControllerApi
1141
+ */
1142
+ getDocumentPosition(documentId, sortBy, sortOrder, options) {
1143
+ return DocumentControllerApiFp(this.configuration).getDocumentPosition(documentId, sortBy, sortOrder, options).then((request) => request(this.axios, this.basePath));
1144
+ }
1145
+ /**
1146
+ * Replaces the content of an existing file document.
1147
+ * @summary Replace document content
1148
+ * @param {string} documentId
1149
+ * @param {File} file
1150
+ * @param {*} [options] Override http request option.
1151
+ * @throws {RequiredError}
1152
+ * @memberof DocumentControllerApi
1153
+ */
1154
+ replaceDocumentContent(documentId, file, options) {
1155
+ return DocumentControllerApiFp(this.configuration).replaceDocumentContent(documentId, file, options).then((request) => request(this.axios, this.basePath));
1156
+ }
1157
+ /**
1158
+ * Replaces all metadata of a document (file or folder).
1159
+ * @summary Replace document metadata
1160
+ * @param {string} documentId
1161
+ * @param {{ [key: string]: any; }} requestBody New metadata map. Replaces all existing metadata.
1162
+ * @param {*} [options] Override http request option.
1163
+ * @throws {RequiredError}
1164
+ * @memberof DocumentControllerApi
1165
+ */
1166
+ replaceDocumentMetadata(documentId, requestBody, options) {
1167
+ return DocumentControllerApiFp(this.configuration).replaceDocumentMetadata(documentId, requestBody, options).then((request) => request(this.axios, this.basePath));
1168
+ }
1169
+ /**
1170
+ * Finds document IDs matching all provided metadata criteria.
1171
+ * @summary Search document IDs by metadata
1172
+ * @param {SearchByMetadataRequest} searchByMetadataRequest
1173
+ * @param {*} [options] Override http request option.
1174
+ * @throws {RequiredError}
1175
+ * @memberof DocumentControllerApi
1176
+ */
1177
+ searchDocumentIdsByMetadata(searchByMetadataRequest, options) {
1178
+ return DocumentControllerApiFp(this.configuration).searchDocumentIdsByMetadata(searchByMetadataRequest, options).then((request) => request(this.axios, this.basePath));
1179
+ }
1180
+ /**
1181
+ * Updates or adds specific metadata fields for a document.
1182
+ * @summary Update document metadata
1183
+ * @param {string} documentId
1184
+ * @param {UpdateMetadataRequest} updateMetadataRequest
1185
+ * @param {*} [options] Override http request option.
1186
+ * @throws {RequiredError}
1187
+ * @memberof DocumentControllerApi
1188
+ */
1189
+ updateDocumentMetadata(documentId, updateMetadataRequest, options) {
1190
+ return DocumentControllerApiFp(this.configuration).updateDocumentMetadata(documentId, updateMetadataRequest, options).then((request) => request(this.axios, this.basePath));
1191
+ }
1192
+ /**
1193
+ * Uploads multiple files, optionally with metadata and a parent folder ID. Returns HTTP 200 if all uploads succeed, HTTP 207 (Multi-Status) if some succeed and some fail, or an appropriate error status (404, 409, 403, 500) if all uploads fail.
1194
+ * @summary Upload multiple documents
1195
+ * @param {Array<File>} file
1196
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
1197
+ * @param {string} [parametersByFilename] Paste the JSON array here&lt;br&gt;This array provides optional metadata and attributes for the uploaded files&lt;br&gt;&lt;section&gt; &lt;h3&gt;Each object in the array must contain:&lt;/h3&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;filename&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;String&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Must match the filename of one of the uploaded files. Filenames must be unique in the upload request.&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;fileAttributes&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;JSON Object&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Container for metadata and other file-specific attributes.&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Inside &lt;code&gt;fileAttributes&lt;/code&gt;:&lt;/h4&gt; &lt;table&gt; &lt;thead&gt; &lt;tr&gt; &lt;th&gt;Field&lt;/th&gt; &lt;th&gt;Type&lt;/th&gt; &lt;th&gt;Description&lt;/th&gt; &lt;/tr&gt; &lt;/thead&gt; &lt;tbody&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;parentFolderId&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;UUID&lt;/code&gt;&lt;/td&gt; &lt;td&gt;UUID of the target folder to upload the file (if not provided : the file will be uploaded at the root level)&lt;/td&gt; &lt;/tr&gt; &lt;tr&gt; &lt;td&gt;&lt;code&gt;metadata&lt;/code&gt;&lt;/td&gt; &lt;td&gt;&lt;code&gt;Map&amp;lt;String, JSON Object&amp;gt;&lt;/code&gt;&lt;/td&gt; &lt;td&gt;Arbitrary metadata to associate with the file (key/value pairs).&lt;/td&gt; &lt;/tr&gt; &lt;/tbody&gt; &lt;/table&gt; &lt;h4&gt;Example of &lt;code&gt;parametersByFilename&lt;/code&gt; JSON array :&lt;/h4&gt; &lt;pre&gt;&lt;code&gt;[ { \\\&quot;filename\\\&quot;: \\\&quot;file1.txt\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;parentFolderId\\\&quot;: \\\&quot;f8c3de3d-1fea-4d7c-a8b0-29f63c4c3454\\\&quot;, \\\&quot;metadata\\\&quot;: { \\\&quot;country\\\&quot;: \\\&quot;UK\\\&quot;, \\\&quot;owner\\\&quot;: { \\\&quot;name\\\&quot;: \\\&quot;Joe\\\&quot;, \\\&quot;owner_id\\\&quot;: 1234568 } } } }, { \\\&quot;filename\\\&quot;: \\\&quot;file2.md\\\&quot;, \\\&quot;fileAttributes\\\&quot;: { \\\&quot;metadata\\\&quot;: { \\\&quot;key1\\\&quot;: \\\&quot;value1\\\&quot;, \\\&quot;key2\\\&quot;: \\\&quot;value2\\\&quot;, \\\&quot;key3\\\&quot;: \\\&quot;value3\\\&quot; } } } ]&lt;/code&gt;&lt;/pre&gt; &lt;/section&gt;
1198
+ * @param {*} [options] Override http request option.
1199
+ * @throws {RequiredError}
1200
+ * @memberof DocumentControllerApi
1201
+ */
1202
+ uploadDocument(file, allowDuplicateFileNames, parametersByFilename, options) {
1203
+ return DocumentControllerApiFp(this.configuration).uploadDocument(file, allowDuplicateFileNames, parametersByFilename, options).then((request) => request(this.axios, this.basePath));
1204
+ }
1205
+ /**
1206
+ * Uploads a single file, optionally with metadata and a parent folder ID.
1207
+ * @summary Upload a single document
1208
+ * @param {File} file
1209
+ * @param {boolean} [allowDuplicateFileNames] when true : if a file with the same name already exists in the target parent folder, a 409 error is raised. When false : the file will be stored (but no existing file with same name will be overwritten)
1210
+ * @param {string} [parentFolderId] Target parent folder ID to store the file; if not sent or null, the file is stored at the root level
1211
+ * @param {string} [metadata]
1212
+ * @param {*} [options] Override http request option.
1213
+ * @throws {RequiredError}
1214
+ * @memberof DocumentControllerApi
1215
+ */
1216
+ uploadDocument1(file, allowDuplicateFileNames, parentFolderId, metadata, options) {
1217
+ return DocumentControllerApiFp(this.configuration).uploadDocument1(file, allowDuplicateFileNames, parentFolderId, metadata, options).then((request) => request(this.axios, this.basePath));
1218
+ }
1219
+ }