@knowledge-stack/ksapi 1.23.5 → 1.24.0

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 (265) hide show
  1. package/.openapi-generator/FILES +122 -4
  2. package/.openapi-generator/VERSION +1 -1
  3. package/README.md +274 -28
  4. package/dist/apis/AuthApi.d.ts +117 -0
  5. package/dist/apis/AuthApi.js +137 -47
  6. package/dist/apis/ChunkLineagesApi.d.ts +38 -0
  7. package/dist/apis/ChunkLineagesApi.js +42 -15
  8. package/dist/apis/ChunksApi.d.ts +78 -4
  9. package/dist/apis/ChunksApi.js +85 -31
  10. package/dist/apis/DefaultApi.d.ts +20 -0
  11. package/dist/apis/DefaultApi.js +28 -10
  12. package/dist/apis/DocumentVersionsApi.d.ts +99 -9
  13. package/dist/apis/DocumentVersionsApi.js +100 -37
  14. package/dist/apis/DocumentsApi.d.ts +80 -0
  15. package/dist/apis/DocumentsApi.js +84 -30
  16. package/dist/apis/FoldersApi.d.ts +92 -9
  17. package/dist/apis/FoldersApi.js +86 -32
  18. package/dist/apis/InvitesApi.d.ts +51 -0
  19. package/dist/apis/InvitesApi.js +56 -20
  20. package/dist/apis/PathPartsApi.d.ts +54 -0
  21. package/dist/apis/PathPartsApi.js +56 -20
  22. package/dist/apis/SectionsApi.d.ts +49 -0
  23. package/dist/apis/SectionsApi.js +56 -20
  24. package/dist/apis/TagsApi.d.ts +62 -0
  25. package/dist/apis/TagsApi.js +70 -25
  26. package/dist/apis/TenantsApi.d.ts +103 -0
  27. package/dist/apis/TenantsApi.js +112 -40
  28. package/dist/apis/ThreadMessagesApi.d.ts +41 -0
  29. package/dist/apis/ThreadMessagesApi.js +42 -15
  30. package/dist/apis/ThreadsApi.d.ts +77 -0
  31. package/dist/apis/ThreadsApi.js +84 -30
  32. package/dist/apis/UserPermissionsApi.d.ts +54 -0
  33. package/dist/apis/UserPermissionsApi.js +56 -20
  34. package/dist/apis/UsersApi.d.ts +23 -0
  35. package/dist/apis/UsersApi.js +28 -10
  36. package/dist/apis/WorkflowsApi.d.ts +38 -0
  37. package/dist/apis/WorkflowsApi.js +42 -15
  38. package/dist/esm/apis/AuthApi.d.ts +117 -0
  39. package/dist/esm/apis/AuthApi.js +137 -47
  40. package/dist/esm/apis/ChunkLineagesApi.d.ts +38 -0
  41. package/dist/esm/apis/ChunkLineagesApi.js +42 -15
  42. package/dist/esm/apis/ChunksApi.d.ts +78 -4
  43. package/dist/esm/apis/ChunksApi.js +85 -31
  44. package/dist/esm/apis/DefaultApi.d.ts +20 -0
  45. package/dist/esm/apis/DefaultApi.js +28 -10
  46. package/dist/esm/apis/DocumentVersionsApi.d.ts +99 -9
  47. package/dist/esm/apis/DocumentVersionsApi.js +101 -38
  48. package/dist/esm/apis/DocumentsApi.d.ts +80 -0
  49. package/dist/esm/apis/DocumentsApi.js +84 -30
  50. package/dist/esm/apis/FoldersApi.d.ts +92 -9
  51. package/dist/esm/apis/FoldersApi.js +87 -33
  52. package/dist/esm/apis/InvitesApi.d.ts +51 -0
  53. package/dist/esm/apis/InvitesApi.js +56 -20
  54. package/dist/esm/apis/PathPartsApi.d.ts +54 -0
  55. package/dist/esm/apis/PathPartsApi.js +56 -20
  56. package/dist/esm/apis/SectionsApi.d.ts +49 -0
  57. package/dist/esm/apis/SectionsApi.js +56 -20
  58. package/dist/esm/apis/TagsApi.d.ts +62 -0
  59. package/dist/esm/apis/TagsApi.js +70 -25
  60. package/dist/esm/apis/TenantsApi.d.ts +103 -0
  61. package/dist/esm/apis/TenantsApi.js +112 -40
  62. package/dist/esm/apis/ThreadMessagesApi.d.ts +41 -0
  63. package/dist/esm/apis/ThreadMessagesApi.js +42 -15
  64. package/dist/esm/apis/ThreadsApi.d.ts +77 -0
  65. package/dist/esm/apis/ThreadsApi.js +84 -30
  66. package/dist/esm/apis/UserPermissionsApi.d.ts +54 -0
  67. package/dist/esm/apis/UserPermissionsApi.js +56 -20
  68. package/dist/esm/apis/UsersApi.d.ts +23 -0
  69. package/dist/esm/apis/UsersApi.js +28 -10
  70. package/dist/esm/apis/WorkflowsApi.d.ts +38 -0
  71. package/dist/esm/apis/WorkflowsApi.js +42 -15
  72. package/dist/esm/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
  73. package/dist/esm/models/{DocumentContentPathPart.js → ChunkContentItem.js} +17 -16
  74. package/dist/esm/models/DocumentResponse.d.ts +13 -0
  75. package/dist/esm/models/DocumentResponse.js +8 -0
  76. package/dist/esm/models/FolderResponse.d.ts +13 -0
  77. package/dist/esm/models/FolderResponse.js +8 -0
  78. package/dist/esm/models/FolderResponseOrDocumentResponse.d.ts +27 -0
  79. package/dist/esm/models/FolderResponseOrDocumentResponse.js +47 -0
  80. package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
  81. package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +70 -0
  82. package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
  83. package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +70 -0
  84. package/dist/esm/models/SectionContentItem.d.ts +114 -0
  85. package/dist/esm/models/SectionContentItem.js +86 -0
  86. package/dist/esm/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
  87. package/dist/esm/models/SectionContentItemOrChunkContentItem.js +47 -0
  88. package/dist/esm/models/index.d.ts +6 -4
  89. package/dist/esm/models/index.js +6 -4
  90. package/dist/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
  91. package/dist/models/{DocumentContentPathPart.js → ChunkContentItem.js} +23 -22
  92. package/dist/models/DocumentResponse.d.ts +13 -0
  93. package/dist/models/DocumentResponse.js +9 -1
  94. package/dist/models/FolderResponse.d.ts +13 -0
  95. package/dist/models/FolderResponse.js +9 -1
  96. package/dist/models/FolderResponseOrDocumentResponse.d.ts +27 -0
  97. package/dist/models/FolderResponseOrDocumentResponse.js +53 -0
  98. package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
  99. package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +78 -0
  100. package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
  101. package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +78 -0
  102. package/dist/models/SectionContentItem.d.ts +114 -0
  103. package/dist/models/SectionContentItem.js +94 -0
  104. package/dist/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
  105. package/dist/models/SectionContentItemOrChunkContentItem.js +53 -0
  106. package/dist/models/index.d.ts +6 -4
  107. package/dist/models/index.js +6 -4
  108. package/docs/AuthApi.md +707 -0
  109. package/docs/BulkTagRequest.md +35 -0
  110. package/docs/ChunkContentItem.md +59 -0
  111. package/docs/ChunkLineageResponse.md +41 -0
  112. package/docs/ChunkLineagesApi.md +230 -0
  113. package/docs/ChunkMetadataInput.md +37 -0
  114. package/docs/ChunkMetadataOutput.md +37 -0
  115. package/docs/ChunkResponse.md +63 -0
  116. package/docs/ChunkSearchRequest.md +47 -0
  117. package/docs/ChunkType.md +33 -0
  118. package/docs/ChunksApi.md +446 -0
  119. package/docs/ClearVersionContentsResponse.md +35 -0
  120. package/docs/CreateChunkLineageRequest.md +37 -0
  121. package/docs/CreateChunkRequest.md +43 -0
  122. package/docs/CreateDocumentRequest.md +41 -0
  123. package/docs/CreateFolderRequest.md +37 -0
  124. package/docs/CreatePasswordUserRequest.md +36 -0
  125. package/docs/CreatePermissionRequest.md +40 -0
  126. package/docs/CreateSectionRequest.md +41 -0
  127. package/docs/CreateTagRequest.md +39 -0
  128. package/docs/CreateTenantRequest.md +37 -0
  129. package/docs/CreateThreadMessageRequest.md +37 -0
  130. package/docs/CreateThreadRequest.md +37 -0
  131. package/docs/DefaultApi.md +128 -0
  132. package/docs/DocumentOrigin.md +33 -0
  133. package/docs/DocumentResponse.md +63 -0
  134. package/docs/DocumentType.md +33 -0
  135. package/docs/DocumentVersionMetadata.md +47 -0
  136. package/docs/DocumentVersionMetadataUpdate.md +47 -0
  137. package/docs/DocumentVersionResponse.md +57 -0
  138. package/docs/DocumentVersionsApi.md +530 -0
  139. package/docs/DocumentsApi.md +464 -0
  140. package/docs/EmailSentResponse.md +34 -0
  141. package/docs/EmailVerificationRequest.md +34 -0
  142. package/docs/EmbeddingModel.md +33 -0
  143. package/docs/FolderResponse.md +55 -0
  144. package/docs/FolderResponseOrDocumentResponse.md +62 -0
  145. package/docs/FoldersApi.md +473 -0
  146. package/docs/HTTPValidationError.md +34 -0
  147. package/docs/HealthCheckResponse.md +36 -0
  148. package/docs/IdpType.md +33 -0
  149. package/docs/IngestDocumentResponse.md +39 -0
  150. package/docs/InviteResponse.md +53 -0
  151. package/docs/InviteStatus.md +32 -0
  152. package/docs/InviteUserRequest.md +38 -0
  153. package/docs/InvitesApi.md +305 -0
  154. package/docs/LineageEdgeResponse.md +37 -0
  155. package/docs/LineageGraphResponse.md +37 -0
  156. package/docs/LineageNodeResponse.md +47 -0
  157. package/docs/LocationInner.md +32 -0
  158. package/docs/MessageRole.md +33 -0
  159. package/docs/OAuth2Config.md +41 -0
  160. package/docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md +40 -0
  161. package/docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md +40 -0
  162. package/docs/PaginatedResponseDocumentResponse.md +40 -0
  163. package/docs/PaginatedResponseDocumentVersionResponse.md +40 -0
  164. package/docs/PaginatedResponseFolderResponse.md +40 -0
  165. package/docs/PaginatedResponseInviteResponse.md +40 -0
  166. package/docs/PaginatedResponsePathPartResponse.md +40 -0
  167. package/docs/PaginatedResponsePermissionResponse.md +40 -0
  168. package/docs/PaginatedResponseTagResponse.md +40 -0
  169. package/docs/PaginatedResponseTenantResponse.md +40 -0
  170. package/docs/PaginatedResponseTenantUserResponse.md +40 -0
  171. package/docs/PaginatedResponseThreadMessageResponse.md +40 -0
  172. package/docs/PaginatedResponseThreadResponse.md +40 -0
  173. package/docs/PaginatedResponseWorkflowSummaryResponse.md +40 -0
  174. package/docs/PartType.md +33 -0
  175. package/docs/PasswordResetRequest.md +36 -0
  176. package/docs/PasswordResetWithTokenRequest.md +36 -0
  177. package/docs/PathOrder.md +33 -0
  178. package/docs/PathPartResponse.md +53 -0
  179. package/docs/PathPartTagsResponse.md +35 -0
  180. package/docs/PathPartsApi.md +314 -0
  181. package/docs/PermissionCapability.md +33 -0
  182. package/docs/PermissionResponse.md +48 -0
  183. package/docs/PipelineState.md +45 -0
  184. package/docs/PipelineStatus.md +33 -0
  185. package/docs/Polygon.md +41 -0
  186. package/docs/PolygonReference.md +37 -0
  187. package/docs/RootResponse.md +36 -0
  188. package/docs/ScoredChunkResponse.md +65 -0
  189. package/docs/SectionContentItem.md +55 -0
  190. package/docs/SectionContentItemOrChunkContentItem.md +60 -0
  191. package/docs/SectionResponse.md +57 -0
  192. package/docs/SectionsApi.md +299 -0
  193. package/docs/SignInRequest.md +38 -0
  194. package/docs/TagResponse.md +47 -0
  195. package/docs/TagsApi.md +374 -0
  196. package/docs/TenantResponse.md +39 -0
  197. package/docs/TenantUserEditRequest.md +35 -0
  198. package/docs/TenantUserResponse.md +43 -0
  199. package/docs/TenantUserRole.md +33 -0
  200. package/docs/TenantsApi.md +605 -0
  201. package/docs/ThreadMessageResponse.md +53 -0
  202. package/docs/ThreadMessagesApi.md +239 -0
  203. package/docs/ThreadResponse.md +49 -0
  204. package/docs/ThreadsApi.md +455 -0
  205. package/docs/UpdateChunkContentRequest.md +37 -0
  206. package/docs/UpdateChunkMetadataRequest.md +35 -0
  207. package/docs/UpdateDocumentRequest.md +39 -0
  208. package/docs/UpdateFolderRequest.md +37 -0
  209. package/docs/UpdatePermissionRequest.md +36 -0
  210. package/docs/UpdateSectionRequest.md +41 -0
  211. package/docs/UpdateTagRequest.md +39 -0
  212. package/docs/UpdateTenantRequest.md +37 -0
  213. package/docs/UpdateThreadRequest.md +37 -0
  214. package/docs/UpdateUserRequest.md +34 -0
  215. package/docs/UserPermissionsApi.md +314 -0
  216. package/docs/UserResponse.md +44 -0
  217. package/docs/UsersApi.md +149 -0
  218. package/docs/ValidationError.md +42 -0
  219. package/docs/WorkflowAction.md +33 -0
  220. package/docs/WorkflowActionResponse.md +39 -0
  221. package/docs/WorkflowDetailResponse.md +63 -0
  222. package/docs/WorkflowSummaryResponse.md +49 -0
  223. package/docs/WorkflowsApi.md +230 -0
  224. package/package.json +1 -1
  225. package/src/apis/AuthApi.ts +214 -47
  226. package/src/apis/ChunkLineagesApi.ts +68 -15
  227. package/src/apis/ChunksApi.ts +137 -33
  228. package/src/apis/DefaultApi.ts +40 -10
  229. package/src/apis/DocumentVersionsApi.ts +170 -45
  230. package/src/apis/DocumentsApi.ts +140 -30
  231. package/src/apis/FoldersApi.ts +153 -40
  232. package/src/apis/InvitesApi.ts +91 -20
  233. package/src/apis/PathPartsApi.ts +94 -20
  234. package/src/apis/SectionsApi.ts +89 -20
  235. package/src/apis/TagsApi.ts +112 -25
  236. package/src/apis/TenantsApi.ts +183 -40
  237. package/src/apis/ThreadMessagesApi.ts +71 -15
  238. package/src/apis/ThreadsApi.ts +137 -30
  239. package/src/apis/UserPermissionsApi.ts +94 -20
  240. package/src/apis/UsersApi.ts +43 -10
  241. package/src/apis/WorkflowsApi.ts +68 -15
  242. package/src/models/{DocumentContentPathPart.ts → ChunkContentItem.ts} +42 -53
  243. package/src/models/DocumentResponse.ts +16 -0
  244. package/src/models/FolderResponse.ts +18 -0
  245. package/src/models/FolderResponseOrDocumentResponse.ts +72 -0
  246. package/src/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.ts +130 -0
  247. package/src/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.ts +130 -0
  248. package/src/models/SectionContentItem.ts +181 -0
  249. package/src/models/SectionContentItemOrChunkContentItem.ts +72 -0
  250. package/src/models/index.ts +6 -4
  251. package/dist/esm/models/FolderDocumentResponse.d.ts +0 -157
  252. package/dist/esm/models/FolderDocumentResponse.js +0 -99
  253. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
  254. package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +0 -70
  255. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
  256. package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +0 -70
  257. package/dist/models/FolderDocumentResponse.d.ts +0 -157
  258. package/dist/models/FolderDocumentResponse.js +0 -107
  259. package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
  260. package/dist/models/PaginatedResponseDocumentContentPathPart.js +0 -78
  261. package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
  262. package/dist/models/PaginatedResponseFolderDocumentResponse.js +0 -78
  263. package/src/models/FolderDocumentResponse.ts +0 -267
  264. package/src/models/PaginatedResponseDocumentContentPathPart.ts +0 -130
  265. package/src/models/PaginatedResponseFolderDocumentResponse.ts +0 -130
@@ -30,20 +30,29 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class DefaultApi extends runtime.BaseAPI {
32
32
  /**
33
- * Health check endpoint.
34
- * Health Check Handler
33
+ * Creates request options for healthCheck without sending the request
35
34
  */
36
- healthCheckRaw(initOverrides) {
35
+ healthCheckRequestOpts() {
37
36
  return __awaiter(this, void 0, void 0, function* () {
38
37
  const queryParameters = {};
39
38
  const headerParameters = {};
40
39
  let urlPath = `/healthz`;
41
- const response = yield this.request({
40
+ return {
42
41
  path: urlPath,
43
42
  method: 'GET',
44
43
  headers: headerParameters,
45
44
  query: queryParameters,
46
- }, initOverrides);
45
+ };
46
+ });
47
+ }
48
+ /**
49
+ * Health check endpoint.
50
+ * Health Check Handler
51
+ */
52
+ healthCheckRaw(initOverrides) {
53
+ return __awaiter(this, void 0, void 0, function* () {
54
+ const requestOptions = yield this.healthCheckRequestOpts();
55
+ const response = yield this.request(requestOptions, initOverrides);
47
56
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.HealthCheckResponseFromJSON)(jsonValue));
48
57
  });
49
58
  }
@@ -58,20 +67,29 @@ class DefaultApi extends runtime.BaseAPI {
58
67
  });
59
68
  }
60
69
  /**
61
- * Root endpoint.
62
- * Root Handler
70
+ * Creates request options for hello without sending the request
63
71
  */
64
- helloRaw(initOverrides) {
72
+ helloRequestOpts() {
65
73
  return __awaiter(this, void 0, void 0, function* () {
66
74
  const queryParameters = {};
67
75
  const headerParameters = {};
68
76
  let urlPath = `/`;
69
- const response = yield this.request({
77
+ return {
70
78
  path: urlPath,
71
79
  method: 'GET',
72
80
  headers: headerParameters,
73
81
  query: queryParameters,
74
- }, initOverrides);
82
+ };
83
+ });
84
+ }
85
+ /**
86
+ * Root endpoint.
87
+ * Root Handler
88
+ */
89
+ helloRaw(initOverrides) {
90
+ return __awaiter(this, void 0, void 0, function* () {
91
+ const requestOptions = yield this.helloRequestOpts();
92
+ const response = yield this.request(requestOptions, initOverrides);
75
93
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.RootResponseFromJSON)(jsonValue));
76
94
  });
77
95
  }
@@ -10,7 +10,7 @@
10
10
  * Do not edit the class manually.
11
11
  */
12
12
  import * as runtime from '../runtime';
13
- import type { ClearVersionContentsResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseDocumentContentPathPart, PaginatedResponseDocumentVersionResponse } from '../models/index';
13
+ import type { ClearVersionContentsResponse, DocumentVersionMetadataUpdate, DocumentVersionResponse, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator, PaginatedResponseDocumentVersionResponse } from '../models/index';
14
14
  export interface ClearDocumentVersionContentsRequest {
15
15
  versionId: string;
16
16
  ksUat?: string | null;
@@ -52,6 +52,14 @@ export interface UpdateDocumentVersionMetadataRequest {
52
52
  * @interface DocumentVersionsApiInterface
53
53
  */
54
54
  export interface DocumentVersionsApiInterface {
55
+ /**
56
+ * Creates request options for clearDocumentVersionContents without sending the request
57
+ * @param {string} versionId DocumentVersion ID
58
+ * @param {string} [ksUat]
59
+ * @throws {RequiredError}
60
+ * @memberof DocumentVersionsApiInterface
61
+ */
62
+ clearDocumentVersionContentsRequestOpts(requestParameters: ClearDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
55
63
  /**
56
64
  * Delete all sections and chunks under a document version. Removes all content (sections and chunks) from the version while keeping the version itself intact. Used by the ingestion pipeline for idempotent re-processing.
57
65
  * @summary Clear Document Version Contents Handler
@@ -67,6 +75,14 @@ export interface DocumentVersionsApiInterface {
67
75
  * Clear Document Version Contents Handler
68
76
  */
69
77
  clearDocumentVersionContents(requestParameters: ClearDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClearVersionContentsResponse>;
78
+ /**
79
+ * Creates request options for createDocumentVersion without sending the request
80
+ * @param {string} documentId Document ID
81
+ * @param {string} [ksUat]
82
+ * @throws {RequiredError}
83
+ * @memberof DocumentVersionsApiInterface
84
+ */
85
+ createDocumentVersionRequestOpts(requestParameters: CreateDocumentVersionRequest): Promise<runtime.RequestOpts>;
70
86
  /**
71
87
  * Create a new version for a document. The version number is automatically incremented from the highest existing version.
72
88
  * @summary Create Document Version Handler
@@ -82,6 +98,14 @@ export interface DocumentVersionsApiInterface {
82
98
  * Create Document Version Handler
83
99
  */
84
100
  createDocumentVersion(requestParameters: CreateDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
101
+ /**
102
+ * Creates request options for deleteDocumentVersion without sending the request
103
+ * @param {string} versionId DocumentVersion ID
104
+ * @param {string} [ksUat]
105
+ * @throws {RequiredError}
106
+ * @memberof DocumentVersionsApiInterface
107
+ */
108
+ deleteDocumentVersionRequestOpts(requestParameters: DeleteDocumentVersionRequest): Promise<runtime.RequestOpts>;
85
109
  /**
86
110
  * Delete a document version by its ID. Cannot delete the active version of a document.
87
111
  * @summary Delete Document Version Handler
@@ -97,6 +121,14 @@ export interface DocumentVersionsApiInterface {
97
121
  * Delete Document Version Handler
98
122
  */
99
123
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
124
+ /**
125
+ * Creates request options for getDocumentVersion without sending the request
126
+ * @param {string} versionId DocumentVersion ID
127
+ * @param {string} [ksUat]
128
+ * @throws {RequiredError}
129
+ * @memberof DocumentVersionsApiInterface
130
+ */
131
+ getDocumentVersionRequestOpts(requestParameters: GetDocumentVersionRequest): Promise<runtime.RequestOpts>;
100
132
  /**
101
133
  * Get a document version by its ID.
102
134
  * @summary Get Document Version Handler
@@ -113,7 +145,18 @@ export interface DocumentVersionsApiInterface {
113
145
  */
114
146
  getDocumentVersion(requestParameters: GetDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
115
147
  /**
116
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
148
+ * Creates request options for getDocumentVersionContents without sending the request
149
+ * @param {string} versionId DocumentVersion ID
150
+ * @param {string} [sectionId] Optional section ID to scope traversal to a subtree
151
+ * @param {number} [limit] Number of items per page
152
+ * @param {number} [offset] Number of items to skip
153
+ * @param {string} [ksUat]
154
+ * @throws {RequiredError}
155
+ * @memberof DocumentVersionsApiInterface
156
+ */
157
+ getDocumentVersionContentsRequestOpts(requestParameters: GetDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
158
+ /**
159
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
117
160
  * @summary Get Document Version Contents Handler
118
161
  * @param {string} versionId DocumentVersion ID
119
162
  * @param {string} [sectionId] Optional section ID to scope traversal to a subtree
@@ -124,12 +167,22 @@ export interface DocumentVersionsApiInterface {
124
167
  * @throws {RequiredError}
125
168
  * @memberof DocumentVersionsApiInterface
126
169
  */
127
- getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseDocumentContentPathPart>>;
170
+ getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>>;
128
171
  /**
129
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
172
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
130
173
  * Get Document Version Contents Handler
131
174
  */
132
- getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentContentPathPart>;
175
+ getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>;
176
+ /**
177
+ * Creates request options for listDocumentVersions without sending the request
178
+ * @param {string} documentId Document ID to list versions for
179
+ * @param {number} [limit] Number of items per page
180
+ * @param {number} [offset] Number of items to skip
181
+ * @param {string} [ksUat]
182
+ * @throws {RequiredError}
183
+ * @memberof DocumentVersionsApiInterface
184
+ */
185
+ listDocumentVersionsRequestOpts(requestParameters: ListDocumentVersionsRequest): Promise<runtime.RequestOpts>;
133
186
  /**
134
187
  * List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
135
188
  * @summary List Document Versions Handler
@@ -147,6 +200,15 @@ export interface DocumentVersionsApiInterface {
147
200
  * List Document Versions Handler
148
201
  */
149
202
  listDocumentVersions(requestParameters: ListDocumentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentVersionResponse>;
203
+ /**
204
+ * Creates request options for updateDocumentVersionMetadata without sending the request
205
+ * @param {string} versionId DocumentVersion ID
206
+ * @param {DocumentVersionMetadataUpdate} documentVersionMetadataUpdate
207
+ * @param {string} [ksUat]
208
+ * @throws {RequiredError}
209
+ * @memberof DocumentVersionsApiInterface
210
+ */
211
+ updateDocumentVersionMetadataRequestOpts(requestParameters: UpdateDocumentVersionMetadataRequest): Promise<runtime.RequestOpts>;
150
212
  /**
151
213
  * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
152
214
  * @summary Update Document Version Metadata Handler
@@ -168,6 +230,10 @@ export interface DocumentVersionsApiInterface {
168
230
  *
169
231
  */
170
232
  export declare class DocumentVersionsApi extends runtime.BaseAPI implements DocumentVersionsApiInterface {
233
+ /**
234
+ * Creates request options for clearDocumentVersionContents without sending the request
235
+ */
236
+ clearDocumentVersionContentsRequestOpts(requestParameters: ClearDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
171
237
  /**
172
238
  * Delete all sections and chunks under a document version. Removes all content (sections and chunks) from the version while keeping the version itself intact. Used by the ingestion pipeline for idempotent re-processing.
173
239
  * Clear Document Version Contents Handler
@@ -178,6 +244,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
178
244
  * Clear Document Version Contents Handler
179
245
  */
180
246
  clearDocumentVersionContents(requestParameters: ClearDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ClearVersionContentsResponse>;
247
+ /**
248
+ * Creates request options for createDocumentVersion without sending the request
249
+ */
250
+ createDocumentVersionRequestOpts(requestParameters: CreateDocumentVersionRequest): Promise<runtime.RequestOpts>;
181
251
  /**
182
252
  * Create a new version for a document. The version number is automatically incremented from the highest existing version.
183
253
  * Create Document Version Handler
@@ -188,6 +258,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
188
258
  * Create Document Version Handler
189
259
  */
190
260
  createDocumentVersion(requestParameters: CreateDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
261
+ /**
262
+ * Creates request options for deleteDocumentVersion without sending the request
263
+ */
264
+ deleteDocumentVersionRequestOpts(requestParameters: DeleteDocumentVersionRequest): Promise<runtime.RequestOpts>;
191
265
  /**
192
266
  * Delete a document version by its ID. Cannot delete the active version of a document.
193
267
  * Delete Document Version Handler
@@ -198,6 +272,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
198
272
  * Delete Document Version Handler
199
273
  */
200
274
  deleteDocumentVersion(requestParameters: DeleteDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
275
+ /**
276
+ * Creates request options for getDocumentVersion without sending the request
277
+ */
278
+ getDocumentVersionRequestOpts(requestParameters: GetDocumentVersionRequest): Promise<runtime.RequestOpts>;
201
279
  /**
202
280
  * Get a document version by its ID.
203
281
  * Get Document Version Handler
@@ -209,15 +287,23 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
209
287
  */
210
288
  getDocumentVersion(requestParameters: GetDocumentVersionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentVersionResponse>;
211
289
  /**
212
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
290
+ * Creates request options for getDocumentVersionContents without sending the request
291
+ */
292
+ getDocumentVersionContentsRequestOpts(requestParameters: GetDocumentVersionContentsRequest): Promise<runtime.RequestOpts>;
293
+ /**
294
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
213
295
  * Get Document Version Contents Handler
214
296
  */
215
- getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseDocumentContentPathPart>>;
297
+ getDocumentVersionContentsRaw(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>>;
216
298
  /**
217
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
299
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
218
300
  * Get Document Version Contents Handler
219
301
  */
220
- getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentContentPathPart>;
302
+ getDocumentVersionContents(requestParameters: GetDocumentVersionContentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator>;
303
+ /**
304
+ * Creates request options for listDocumentVersions without sending the request
305
+ */
306
+ listDocumentVersionsRequestOpts(requestParameters: ListDocumentVersionsRequest): Promise<runtime.RequestOpts>;
221
307
  /**
222
308
  * List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
223
309
  * List Document Versions Handler
@@ -228,6 +314,10 @@ export declare class DocumentVersionsApi extends runtime.BaseAPI implements Docu
228
314
  * List Document Versions Handler
229
315
  */
230
316
  listDocumentVersions(requestParameters: ListDocumentVersionsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentVersionResponse>;
317
+ /**
318
+ * Creates request options for updateDocumentVersionMetadata without sending the request
319
+ */
320
+ updateDocumentVersionMetadataRequestOpts(requestParameters: UpdateDocumentVersionMetadataRequest): Promise<runtime.RequestOpts>;
231
321
  /**
232
322
  * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
233
323
  * Update Document Version Metadata Handler
@@ -30,10 +30,9 @@ const index_1 = require("../models/index");
30
30
  */
31
31
  class DocumentVersionsApi extends runtime.BaseAPI {
32
32
  /**
33
- * Delete all sections and chunks under a document version. Removes all content (sections and chunks) from the version while keeping the version itself intact. Used by the ingestion pipeline for idempotent re-processing.
34
- * Clear Document Version Contents Handler
33
+ * Creates request options for clearDocumentVersionContents without sending the request
35
34
  */
36
- clearDocumentVersionContentsRaw(requestParameters, initOverrides) {
35
+ clearDocumentVersionContentsRequestOpts(requestParameters) {
37
36
  return __awaiter(this, void 0, void 0, function* () {
38
37
  if (requestParameters['versionId'] == null) {
39
38
  throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling clearDocumentVersionContents().');
@@ -42,12 +41,22 @@ class DocumentVersionsApi extends runtime.BaseAPI {
42
41
  const headerParameters = {};
43
42
  let urlPath = `/v1/document_versions/{version_id}/contents`;
44
43
  urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
45
- const response = yield this.request({
44
+ return {
46
45
  path: urlPath,
47
46
  method: 'DELETE',
48
47
  headers: headerParameters,
49
48
  query: queryParameters,
50
- }, initOverrides);
49
+ };
50
+ });
51
+ }
52
+ /**
53
+ * Delete all sections and chunks under a document version. Removes all content (sections and chunks) from the version while keeping the version itself intact. Used by the ingestion pipeline for idempotent re-processing.
54
+ * Clear Document Version Contents Handler
55
+ */
56
+ clearDocumentVersionContentsRaw(requestParameters, initOverrides) {
57
+ return __awaiter(this, void 0, void 0, function* () {
58
+ const requestOptions = yield this.clearDocumentVersionContentsRequestOpts(requestParameters);
59
+ const response = yield this.request(requestOptions, initOverrides);
51
60
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.ClearVersionContentsResponseFromJSON)(jsonValue));
52
61
  });
53
62
  }
@@ -62,10 +71,9 @@ class DocumentVersionsApi extends runtime.BaseAPI {
62
71
  });
63
72
  }
64
73
  /**
65
- * Create a new version for a document. The version number is automatically incremented from the highest existing version.
66
- * Create Document Version Handler
74
+ * Creates request options for createDocumentVersion without sending the request
67
75
  */
68
- createDocumentVersionRaw(requestParameters, initOverrides) {
76
+ createDocumentVersionRequestOpts(requestParameters) {
69
77
  return __awaiter(this, void 0, void 0, function* () {
70
78
  if (requestParameters['documentId'] == null) {
71
79
  throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling createDocumentVersion().');
@@ -74,12 +82,22 @@ class DocumentVersionsApi extends runtime.BaseAPI {
74
82
  const headerParameters = {};
75
83
  let urlPath = `/v1/documents/{document_id}/versions`;
76
84
  urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
77
- const response = yield this.request({
85
+ return {
78
86
  path: urlPath,
79
87
  method: 'POST',
80
88
  headers: headerParameters,
81
89
  query: queryParameters,
82
- }, initOverrides);
90
+ };
91
+ });
92
+ }
93
+ /**
94
+ * Create a new version for a document. The version number is automatically incremented from the highest existing version.
95
+ * Create Document Version Handler
96
+ */
97
+ createDocumentVersionRaw(requestParameters, initOverrides) {
98
+ return __awaiter(this, void 0, void 0, function* () {
99
+ const requestOptions = yield this.createDocumentVersionRequestOpts(requestParameters);
100
+ const response = yield this.request(requestOptions, initOverrides);
83
101
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentVersionResponseFromJSON)(jsonValue));
84
102
  });
85
103
  }
@@ -94,10 +112,9 @@ class DocumentVersionsApi extends runtime.BaseAPI {
94
112
  });
95
113
  }
96
114
  /**
97
- * Delete a document version by its ID. Cannot delete the active version of a document.
98
- * Delete Document Version Handler
115
+ * Creates request options for deleteDocumentVersion without sending the request
99
116
  */
100
- deleteDocumentVersionRaw(requestParameters, initOverrides) {
117
+ deleteDocumentVersionRequestOpts(requestParameters) {
101
118
  return __awaiter(this, void 0, void 0, function* () {
102
119
  if (requestParameters['versionId'] == null) {
103
120
  throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling deleteDocumentVersion().');
@@ -106,12 +123,22 @@ class DocumentVersionsApi extends runtime.BaseAPI {
106
123
  const headerParameters = {};
107
124
  let urlPath = `/v1/document_versions/{version_id}`;
108
125
  urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
109
- const response = yield this.request({
126
+ return {
110
127
  path: urlPath,
111
128
  method: 'DELETE',
112
129
  headers: headerParameters,
113
130
  query: queryParameters,
114
- }, initOverrides);
131
+ };
132
+ });
133
+ }
134
+ /**
135
+ * Delete a document version by its ID. Cannot delete the active version of a document.
136
+ * Delete Document Version Handler
137
+ */
138
+ deleteDocumentVersionRaw(requestParameters, initOverrides) {
139
+ return __awaiter(this, void 0, void 0, function* () {
140
+ const requestOptions = yield this.deleteDocumentVersionRequestOpts(requestParameters);
141
+ const response = yield this.request(requestOptions, initOverrides);
115
142
  return new runtime.VoidApiResponse(response);
116
143
  });
117
144
  }
@@ -125,10 +152,9 @@ class DocumentVersionsApi extends runtime.BaseAPI {
125
152
  });
126
153
  }
127
154
  /**
128
- * Get a document version by its ID.
129
- * Get Document Version Handler
155
+ * Creates request options for getDocumentVersion without sending the request
130
156
  */
131
- getDocumentVersionRaw(requestParameters, initOverrides) {
157
+ getDocumentVersionRequestOpts(requestParameters) {
132
158
  return __awaiter(this, void 0, void 0, function* () {
133
159
  if (requestParameters['versionId'] == null) {
134
160
  throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getDocumentVersion().');
@@ -137,12 +163,22 @@ class DocumentVersionsApi extends runtime.BaseAPI {
137
163
  const headerParameters = {};
138
164
  let urlPath = `/v1/document_versions/{version_id}`;
139
165
  urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
140
- const response = yield this.request({
166
+ return {
141
167
  path: urlPath,
142
168
  method: 'GET',
143
169
  headers: headerParameters,
144
170
  query: queryParameters,
145
- }, initOverrides);
171
+ };
172
+ });
173
+ }
174
+ /**
175
+ * Get a document version by its ID.
176
+ * Get Document Version Handler
177
+ */
178
+ getDocumentVersionRaw(requestParameters, initOverrides) {
179
+ return __awaiter(this, void 0, void 0, function* () {
180
+ const requestOptions = yield this.getDocumentVersionRequestOpts(requestParameters);
181
+ const response = yield this.request(requestOptions, initOverrides);
146
182
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentVersionResponseFromJSON)(jsonValue));
147
183
  });
148
184
  }
@@ -157,10 +193,9 @@ class DocumentVersionsApi extends runtime.BaseAPI {
157
193
  });
158
194
  }
159
195
  /**
160
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
161
- * Get Document Version Contents Handler
196
+ * Creates request options for getDocumentVersionContents without sending the request
162
197
  */
163
- getDocumentVersionContentsRaw(requestParameters, initOverrides) {
198
+ getDocumentVersionContentsRequestOpts(requestParameters) {
164
199
  return __awaiter(this, void 0, void 0, function* () {
165
200
  if (requestParameters['versionId'] == null) {
166
201
  throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getDocumentVersionContents().');
@@ -178,17 +213,27 @@ class DocumentVersionsApi extends runtime.BaseAPI {
178
213
  const headerParameters = {};
179
214
  let urlPath = `/v1/document_versions/{version_id}/contents`;
180
215
  urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
181
- const response = yield this.request({
216
+ return {
182
217
  path: urlPath,
183
218
  method: 'GET',
184
219
  headers: headerParameters,
185
220
  query: queryParameters,
186
- }, initOverrides);
187
- return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedResponseDocumentContentPathPartFromJSON)(jsonValue));
221
+ };
188
222
  });
189
223
  }
190
224
  /**
191
- * List all sections and chunks for a document version in depth-first logical order. Returns a flat paginated list that can be used to reconstruct the section/chunk hierarchy with content. Sections include page_number; chunks include content, chunk_type, and chunk_metadata.
225
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
226
+ * Get Document Version Contents Handler
227
+ */
228
+ getDocumentVersionContentsRaw(requestParameters, initOverrides) {
229
+ return __awaiter(this, void 0, void 0, function* () {
230
+ const requestOptions = yield this.getDocumentVersionContentsRequestOpts(requestParameters);
231
+ const response = yield this.request(requestOptions, initOverrides);
232
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminatorFromJSON)(jsonValue));
233
+ });
234
+ }
235
+ /**
236
+ * List all sections and chunks for a document version in depth-first logical order. Returns a discriminated union of SectionContentItem and ChunkContentItem, distinguished by the `part_type` field (\"SECTION\" or \"CHUNK\").
192
237
  * Get Document Version Contents Handler
193
238
  */
194
239
  getDocumentVersionContents(requestParameters, initOverrides) {
@@ -198,10 +243,9 @@ class DocumentVersionsApi extends runtime.BaseAPI {
198
243
  });
199
244
  }
200
245
  /**
201
- * List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
202
- * List Document Versions Handler
246
+ * Creates request options for listDocumentVersions without sending the request
203
247
  */
204
- listDocumentVersionsRaw(requestParameters, initOverrides) {
248
+ listDocumentVersionsRequestOpts(requestParameters) {
205
249
  return __awaiter(this, void 0, void 0, function* () {
206
250
  if (requestParameters['documentId'] == null) {
207
251
  throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling listDocumentVersions().');
@@ -218,12 +262,22 @@ class DocumentVersionsApi extends runtime.BaseAPI {
218
262
  }
219
263
  const headerParameters = {};
220
264
  let urlPath = `/v1/document_versions`;
221
- const response = yield this.request({
265
+ return {
222
266
  path: urlPath,
223
267
  method: 'GET',
224
268
  headers: headerParameters,
225
269
  query: queryParameters,
226
- }, initOverrides);
270
+ };
271
+ });
272
+ }
273
+ /**
274
+ * List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
275
+ * List Document Versions Handler
276
+ */
277
+ listDocumentVersionsRaw(requestParameters, initOverrides) {
278
+ return __awaiter(this, void 0, void 0, function* () {
279
+ const requestOptions = yield this.listDocumentVersionsRequestOpts(requestParameters);
280
+ const response = yield this.request(requestOptions, initOverrides);
227
281
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.PaginatedResponseDocumentVersionResponseFromJSON)(jsonValue));
228
282
  });
229
283
  }
@@ -238,10 +292,9 @@ class DocumentVersionsApi extends runtime.BaseAPI {
238
292
  });
239
293
  }
240
294
  /**
241
- * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
242
- * Update Document Version Metadata Handler
295
+ * Creates request options for updateDocumentVersionMetadata without sending the request
243
296
  */
244
- updateDocumentVersionMetadataRaw(requestParameters, initOverrides) {
297
+ updateDocumentVersionMetadataRequestOpts(requestParameters) {
245
298
  return __awaiter(this, void 0, void 0, function* () {
246
299
  if (requestParameters['versionId'] == null) {
247
300
  throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling updateDocumentVersionMetadata().');
@@ -254,13 +307,23 @@ class DocumentVersionsApi extends runtime.BaseAPI {
254
307
  headerParameters['Content-Type'] = 'application/json';
255
308
  let urlPath = `/v1/document_versions/{version_id}/metadata`;
256
309
  urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
257
- const response = yield this.request({
310
+ return {
258
311
  path: urlPath,
259
312
  method: 'PATCH',
260
313
  headers: headerParameters,
261
314
  query: queryParameters,
262
315
  body: (0, index_1.DocumentVersionMetadataUpdateToJSON)(requestParameters['documentVersionMetadataUpdate']),
263
- }, initOverrides);
316
+ };
317
+ });
318
+ }
319
+ /**
320
+ * Merge metadata fields into an existing document version\'s metadata. Only non-null fields in the request body are merged; existing metadata fields not present in the request are preserved.
321
+ * Update Document Version Metadata Handler
322
+ */
323
+ updateDocumentVersionMetadataRaw(requestParameters, initOverrides) {
324
+ return __awaiter(this, void 0, void 0, function* () {
325
+ const requestOptions = yield this.updateDocumentVersionMetadataRequestOpts(requestParameters);
326
+ const response = yield this.request(requestOptions, initOverrides);
264
327
  return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.DocumentVersionResponseFromJSON)(jsonValue));
265
328
  });
266
329
  }