@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.
- package/.openapi-generator/FILES +122 -4
- package/.openapi-generator/VERSION +1 -1
- package/README.md +274 -28
- package/dist/apis/AuthApi.d.ts +117 -0
- package/dist/apis/AuthApi.js +137 -47
- package/dist/apis/ChunkLineagesApi.d.ts +38 -0
- package/dist/apis/ChunkLineagesApi.js +42 -15
- package/dist/apis/ChunksApi.d.ts +78 -4
- package/dist/apis/ChunksApi.js +85 -31
- package/dist/apis/DefaultApi.d.ts +20 -0
- package/dist/apis/DefaultApi.js +28 -10
- package/dist/apis/DocumentVersionsApi.d.ts +99 -9
- package/dist/apis/DocumentVersionsApi.js +100 -37
- package/dist/apis/DocumentsApi.d.ts +80 -0
- package/dist/apis/DocumentsApi.js +84 -30
- package/dist/apis/FoldersApi.d.ts +92 -9
- package/dist/apis/FoldersApi.js +86 -32
- package/dist/apis/InvitesApi.d.ts +51 -0
- package/dist/apis/InvitesApi.js +56 -20
- package/dist/apis/PathPartsApi.d.ts +54 -0
- package/dist/apis/PathPartsApi.js +56 -20
- package/dist/apis/SectionsApi.d.ts +49 -0
- package/dist/apis/SectionsApi.js +56 -20
- package/dist/apis/TagsApi.d.ts +62 -0
- package/dist/apis/TagsApi.js +70 -25
- package/dist/apis/TenantsApi.d.ts +103 -0
- package/dist/apis/TenantsApi.js +112 -40
- package/dist/apis/ThreadMessagesApi.d.ts +41 -0
- package/dist/apis/ThreadMessagesApi.js +42 -15
- package/dist/apis/ThreadsApi.d.ts +77 -0
- package/dist/apis/ThreadsApi.js +84 -30
- package/dist/apis/UserPermissionsApi.d.ts +54 -0
- package/dist/apis/UserPermissionsApi.js +56 -20
- package/dist/apis/UsersApi.d.ts +23 -0
- package/dist/apis/UsersApi.js +28 -10
- package/dist/apis/WorkflowsApi.d.ts +38 -0
- package/dist/apis/WorkflowsApi.js +42 -15
- package/dist/esm/apis/AuthApi.d.ts +117 -0
- package/dist/esm/apis/AuthApi.js +137 -47
- package/dist/esm/apis/ChunkLineagesApi.d.ts +38 -0
- package/dist/esm/apis/ChunkLineagesApi.js +42 -15
- package/dist/esm/apis/ChunksApi.d.ts +78 -4
- package/dist/esm/apis/ChunksApi.js +85 -31
- package/dist/esm/apis/DefaultApi.d.ts +20 -0
- package/dist/esm/apis/DefaultApi.js +28 -10
- package/dist/esm/apis/DocumentVersionsApi.d.ts +99 -9
- package/dist/esm/apis/DocumentVersionsApi.js +101 -38
- package/dist/esm/apis/DocumentsApi.d.ts +80 -0
- package/dist/esm/apis/DocumentsApi.js +84 -30
- package/dist/esm/apis/FoldersApi.d.ts +92 -9
- package/dist/esm/apis/FoldersApi.js +87 -33
- package/dist/esm/apis/InvitesApi.d.ts +51 -0
- package/dist/esm/apis/InvitesApi.js +56 -20
- package/dist/esm/apis/PathPartsApi.d.ts +54 -0
- package/dist/esm/apis/PathPartsApi.js +56 -20
- package/dist/esm/apis/SectionsApi.d.ts +49 -0
- package/dist/esm/apis/SectionsApi.js +56 -20
- package/dist/esm/apis/TagsApi.d.ts +62 -0
- package/dist/esm/apis/TagsApi.js +70 -25
- package/dist/esm/apis/TenantsApi.d.ts +103 -0
- package/dist/esm/apis/TenantsApi.js +112 -40
- package/dist/esm/apis/ThreadMessagesApi.d.ts +41 -0
- package/dist/esm/apis/ThreadMessagesApi.js +42 -15
- package/dist/esm/apis/ThreadsApi.d.ts +77 -0
- package/dist/esm/apis/ThreadsApi.js +84 -30
- package/dist/esm/apis/UserPermissionsApi.d.ts +54 -0
- package/dist/esm/apis/UserPermissionsApi.js +56 -20
- package/dist/esm/apis/UsersApi.d.ts +23 -0
- package/dist/esm/apis/UsersApi.js +28 -10
- package/dist/esm/apis/WorkflowsApi.d.ts +38 -0
- package/dist/esm/apis/WorkflowsApi.js +42 -15
- package/dist/esm/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/esm/models/{DocumentContentPathPart.js → ChunkContentItem.js} +17 -16
- package/dist/esm/models/DocumentResponse.d.ts +13 -0
- package/dist/esm/models/DocumentResponse.js +8 -0
- package/dist/esm/models/FolderResponse.d.ts +13 -0
- package/dist/esm/models/FolderResponse.js +8 -0
- package/dist/esm/models/FolderResponseOrDocumentResponse.d.ts +27 -0
- package/dist/esm/models/FolderResponseOrDocumentResponse.js +47 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +70 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +70 -0
- package/dist/esm/models/SectionContentItem.d.ts +114 -0
- package/dist/esm/models/SectionContentItem.js +86 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/esm/models/SectionContentItemOrChunkContentItem.js +47 -0
- package/dist/esm/models/index.d.ts +6 -4
- package/dist/esm/models/index.js +6 -4
- package/dist/models/{DocumentContentPathPart.d.ts → ChunkContentItem.d.ts} +37 -40
- package/dist/models/{DocumentContentPathPart.js → ChunkContentItem.js} +23 -22
- package/dist/models/DocumentResponse.d.ts +13 -0
- package/dist/models/DocumentResponse.js +9 -1
- package/dist/models/FolderResponse.d.ts +13 -0
- package/dist/models/FolderResponse.js +9 -1
- package/dist/models/FolderResponseOrDocumentResponse.d.ts +27 -0
- package/dist/models/FolderResponseOrDocumentResponse.js +53 -0
- package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.d.ts +66 -0
- package/dist/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.js +78 -0
- package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.d.ts +66 -0
- package/dist/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.js +78 -0
- package/dist/models/SectionContentItem.d.ts +114 -0
- package/dist/models/SectionContentItem.js +94 -0
- package/dist/models/SectionContentItemOrChunkContentItem.d.ts +27 -0
- package/dist/models/SectionContentItemOrChunkContentItem.js +53 -0
- package/dist/models/index.d.ts +6 -4
- package/dist/models/index.js +6 -4
- package/docs/AuthApi.md +707 -0
- package/docs/BulkTagRequest.md +35 -0
- package/docs/ChunkContentItem.md +59 -0
- package/docs/ChunkLineageResponse.md +41 -0
- package/docs/ChunkLineagesApi.md +230 -0
- package/docs/ChunkMetadataInput.md +37 -0
- package/docs/ChunkMetadataOutput.md +37 -0
- package/docs/ChunkResponse.md +63 -0
- package/docs/ChunkSearchRequest.md +47 -0
- package/docs/ChunkType.md +33 -0
- package/docs/ChunksApi.md +446 -0
- package/docs/ClearVersionContentsResponse.md +35 -0
- package/docs/CreateChunkLineageRequest.md +37 -0
- package/docs/CreateChunkRequest.md +43 -0
- package/docs/CreateDocumentRequest.md +41 -0
- package/docs/CreateFolderRequest.md +37 -0
- package/docs/CreatePasswordUserRequest.md +36 -0
- package/docs/CreatePermissionRequest.md +40 -0
- package/docs/CreateSectionRequest.md +41 -0
- package/docs/CreateTagRequest.md +39 -0
- package/docs/CreateTenantRequest.md +37 -0
- package/docs/CreateThreadMessageRequest.md +37 -0
- package/docs/CreateThreadRequest.md +37 -0
- package/docs/DefaultApi.md +128 -0
- package/docs/DocumentOrigin.md +33 -0
- package/docs/DocumentResponse.md +63 -0
- package/docs/DocumentType.md +33 -0
- package/docs/DocumentVersionMetadata.md +47 -0
- package/docs/DocumentVersionMetadataUpdate.md +47 -0
- package/docs/DocumentVersionResponse.md +57 -0
- package/docs/DocumentVersionsApi.md +530 -0
- package/docs/DocumentsApi.md +464 -0
- package/docs/EmailSentResponse.md +34 -0
- package/docs/EmailVerificationRequest.md +34 -0
- package/docs/EmbeddingModel.md +33 -0
- package/docs/FolderResponse.md +55 -0
- package/docs/FolderResponseOrDocumentResponse.md +62 -0
- package/docs/FoldersApi.md +473 -0
- package/docs/HTTPValidationError.md +34 -0
- package/docs/HealthCheckResponse.md +36 -0
- package/docs/IdpType.md +33 -0
- package/docs/IngestDocumentResponse.md +39 -0
- package/docs/InviteResponse.md +53 -0
- package/docs/InviteStatus.md +32 -0
- package/docs/InviteUserRequest.md +38 -0
- package/docs/InvitesApi.md +305 -0
- package/docs/LineageEdgeResponse.md +37 -0
- package/docs/LineageGraphResponse.md +37 -0
- package/docs/LineageNodeResponse.md +47 -0
- package/docs/LocationInner.md +32 -0
- package/docs/MessageRole.md +33 -0
- package/docs/OAuth2Config.md +41 -0
- package/docs/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.md +40 -0
- package/docs/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.md +40 -0
- package/docs/PaginatedResponseDocumentResponse.md +40 -0
- package/docs/PaginatedResponseDocumentVersionResponse.md +40 -0
- package/docs/PaginatedResponseFolderResponse.md +40 -0
- package/docs/PaginatedResponseInviteResponse.md +40 -0
- package/docs/PaginatedResponsePathPartResponse.md +40 -0
- package/docs/PaginatedResponsePermissionResponse.md +40 -0
- package/docs/PaginatedResponseTagResponse.md +40 -0
- package/docs/PaginatedResponseTenantResponse.md +40 -0
- package/docs/PaginatedResponseTenantUserResponse.md +40 -0
- package/docs/PaginatedResponseThreadMessageResponse.md +40 -0
- package/docs/PaginatedResponseThreadResponse.md +40 -0
- package/docs/PaginatedResponseWorkflowSummaryResponse.md +40 -0
- package/docs/PartType.md +33 -0
- package/docs/PasswordResetRequest.md +36 -0
- package/docs/PasswordResetWithTokenRequest.md +36 -0
- package/docs/PathOrder.md +33 -0
- package/docs/PathPartResponse.md +53 -0
- package/docs/PathPartTagsResponse.md +35 -0
- package/docs/PathPartsApi.md +314 -0
- package/docs/PermissionCapability.md +33 -0
- package/docs/PermissionResponse.md +48 -0
- package/docs/PipelineState.md +45 -0
- package/docs/PipelineStatus.md +33 -0
- package/docs/Polygon.md +41 -0
- package/docs/PolygonReference.md +37 -0
- package/docs/RootResponse.md +36 -0
- package/docs/ScoredChunkResponse.md +65 -0
- package/docs/SectionContentItem.md +55 -0
- package/docs/SectionContentItemOrChunkContentItem.md +60 -0
- package/docs/SectionResponse.md +57 -0
- package/docs/SectionsApi.md +299 -0
- package/docs/SignInRequest.md +38 -0
- package/docs/TagResponse.md +47 -0
- package/docs/TagsApi.md +374 -0
- package/docs/TenantResponse.md +39 -0
- package/docs/TenantUserEditRequest.md +35 -0
- package/docs/TenantUserResponse.md +43 -0
- package/docs/TenantUserRole.md +33 -0
- package/docs/TenantsApi.md +605 -0
- package/docs/ThreadMessageResponse.md +53 -0
- package/docs/ThreadMessagesApi.md +239 -0
- package/docs/ThreadResponse.md +49 -0
- package/docs/ThreadsApi.md +455 -0
- package/docs/UpdateChunkContentRequest.md +37 -0
- package/docs/UpdateChunkMetadataRequest.md +35 -0
- package/docs/UpdateDocumentRequest.md +39 -0
- package/docs/UpdateFolderRequest.md +37 -0
- package/docs/UpdatePermissionRequest.md +36 -0
- package/docs/UpdateSectionRequest.md +41 -0
- package/docs/UpdateTagRequest.md +39 -0
- package/docs/UpdateTenantRequest.md +37 -0
- package/docs/UpdateThreadRequest.md +37 -0
- package/docs/UpdateUserRequest.md +34 -0
- package/docs/UserPermissionsApi.md +314 -0
- package/docs/UserResponse.md +44 -0
- package/docs/UsersApi.md +149 -0
- package/docs/ValidationError.md +42 -0
- package/docs/WorkflowAction.md +33 -0
- package/docs/WorkflowActionResponse.md +39 -0
- package/docs/WorkflowDetailResponse.md +63 -0
- package/docs/WorkflowSummaryResponse.md +49 -0
- package/docs/WorkflowsApi.md +230 -0
- package/package.json +1 -1
- package/src/apis/AuthApi.ts +214 -47
- package/src/apis/ChunkLineagesApi.ts +68 -15
- package/src/apis/ChunksApi.ts +137 -33
- package/src/apis/DefaultApi.ts +40 -10
- package/src/apis/DocumentVersionsApi.ts +170 -45
- package/src/apis/DocumentsApi.ts +140 -30
- package/src/apis/FoldersApi.ts +153 -40
- package/src/apis/InvitesApi.ts +91 -20
- package/src/apis/PathPartsApi.ts +94 -20
- package/src/apis/SectionsApi.ts +89 -20
- package/src/apis/TagsApi.ts +112 -25
- package/src/apis/TenantsApi.ts +183 -40
- package/src/apis/ThreadMessagesApi.ts +71 -15
- package/src/apis/ThreadsApi.ts +137 -30
- package/src/apis/UserPermissionsApi.ts +94 -20
- package/src/apis/UsersApi.ts +43 -10
- package/src/apis/WorkflowsApi.ts +68 -15
- package/src/models/{DocumentContentPathPart.ts → ChunkContentItem.ts} +42 -53
- package/src/models/DocumentResponse.ts +16 -0
- package/src/models/FolderResponse.ts +18 -0
- package/src/models/FolderResponseOrDocumentResponse.ts +72 -0
- package/src/models/PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator.ts +130 -0
- package/src/models/PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator.ts +130 -0
- package/src/models/SectionContentItem.ts +181 -0
- package/src/models/SectionContentItemOrChunkContentItem.ts +72 -0
- package/src/models/index.ts +6 -4
- package/dist/esm/models/FolderDocumentResponse.d.ts +0 -157
- package/dist/esm/models/FolderDocumentResponse.js +0 -99
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +0 -70
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +0 -70
- package/dist/models/FolderDocumentResponse.d.ts +0 -157
- package/dist/models/FolderDocumentResponse.js +0 -107
- package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +0 -66
- package/dist/models/PaginatedResponseDocumentContentPathPart.js +0 -78
- package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +0 -66
- package/dist/models/PaginatedResponseFolderDocumentResponse.js +0 -78
- package/src/models/FolderDocumentResponse.ts +0 -267
- package/src/models/PaginatedResponseDocumentContentPathPart.ts +0 -130
- package/src/models/PaginatedResponseFolderDocumentResponse.ts +0 -130
|
@@ -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,
|
|
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
|
-
*
|
|
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<
|
|
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
|
|
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<
|
|
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
|
-
*
|
|
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<
|
|
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
|
|
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<
|
|
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
|
|
@@ -21,16 +21,15 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { ClearVersionContentsResponseFromJSON, DocumentVersionMetadataUpdateToJSON, DocumentVersionResponseFromJSON,
|
|
24
|
+
import { ClearVersionContentsResponseFromJSON, DocumentVersionMetadataUpdateToJSON, DocumentVersionResponseFromJSON, PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminatorFromJSON, PaginatedResponseDocumentVersionResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
28
28
|
export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
29
29
|
/**
|
|
30
|
-
*
|
|
31
|
-
* Clear Document Version Contents Handler
|
|
30
|
+
* Creates request options for clearDocumentVersionContents without sending the request
|
|
32
31
|
*/
|
|
33
|
-
|
|
32
|
+
clearDocumentVersionContentsRequestOpts(requestParameters) {
|
|
34
33
|
return __awaiter(this, void 0, void 0, function* () {
|
|
35
34
|
if (requestParameters['versionId'] == null) {
|
|
36
35
|
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling clearDocumentVersionContents().');
|
|
@@ -39,12 +38,22 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
39
38
|
const headerParameters = {};
|
|
40
39
|
let urlPath = `/v1/document_versions/{version_id}/contents`;
|
|
41
40
|
urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
|
|
42
|
-
|
|
41
|
+
return {
|
|
43
42
|
path: urlPath,
|
|
44
43
|
method: 'DELETE',
|
|
45
44
|
headers: headerParameters,
|
|
46
45
|
query: queryParameters,
|
|
47
|
-
}
|
|
46
|
+
};
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* 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.
|
|
51
|
+
* Clear Document Version Contents Handler
|
|
52
|
+
*/
|
|
53
|
+
clearDocumentVersionContentsRaw(requestParameters, initOverrides) {
|
|
54
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
55
|
+
const requestOptions = yield this.clearDocumentVersionContentsRequestOpts(requestParameters);
|
|
56
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
48
57
|
return new runtime.JSONApiResponse(response, (jsonValue) => ClearVersionContentsResponseFromJSON(jsonValue));
|
|
49
58
|
});
|
|
50
59
|
}
|
|
@@ -59,10 +68,9 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
59
68
|
});
|
|
60
69
|
}
|
|
61
70
|
/**
|
|
62
|
-
*
|
|
63
|
-
* Create Document Version Handler
|
|
71
|
+
* Creates request options for createDocumentVersion without sending the request
|
|
64
72
|
*/
|
|
65
|
-
|
|
73
|
+
createDocumentVersionRequestOpts(requestParameters) {
|
|
66
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
67
75
|
if (requestParameters['documentId'] == null) {
|
|
68
76
|
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling createDocumentVersion().');
|
|
@@ -71,12 +79,22 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
71
79
|
const headerParameters = {};
|
|
72
80
|
let urlPath = `/v1/documents/{document_id}/versions`;
|
|
73
81
|
urlPath = urlPath.replace(`{${"document_id"}}`, encodeURIComponent(String(requestParameters['documentId'])));
|
|
74
|
-
|
|
82
|
+
return {
|
|
75
83
|
path: urlPath,
|
|
76
84
|
method: 'POST',
|
|
77
85
|
headers: headerParameters,
|
|
78
86
|
query: queryParameters,
|
|
79
|
-
}
|
|
87
|
+
};
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Create a new version for a document. The version number is automatically incremented from the highest existing version.
|
|
92
|
+
* Create Document Version Handler
|
|
93
|
+
*/
|
|
94
|
+
createDocumentVersionRaw(requestParameters, initOverrides) {
|
|
95
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
96
|
+
const requestOptions = yield this.createDocumentVersionRequestOpts(requestParameters);
|
|
97
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
80
98
|
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentVersionResponseFromJSON(jsonValue));
|
|
81
99
|
});
|
|
82
100
|
}
|
|
@@ -91,10 +109,9 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
91
109
|
});
|
|
92
110
|
}
|
|
93
111
|
/**
|
|
94
|
-
*
|
|
95
|
-
* Delete Document Version Handler
|
|
112
|
+
* Creates request options for deleteDocumentVersion without sending the request
|
|
96
113
|
*/
|
|
97
|
-
|
|
114
|
+
deleteDocumentVersionRequestOpts(requestParameters) {
|
|
98
115
|
return __awaiter(this, void 0, void 0, function* () {
|
|
99
116
|
if (requestParameters['versionId'] == null) {
|
|
100
117
|
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling deleteDocumentVersion().');
|
|
@@ -103,12 +120,22 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
103
120
|
const headerParameters = {};
|
|
104
121
|
let urlPath = `/v1/document_versions/{version_id}`;
|
|
105
122
|
urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
|
|
106
|
-
|
|
123
|
+
return {
|
|
107
124
|
path: urlPath,
|
|
108
125
|
method: 'DELETE',
|
|
109
126
|
headers: headerParameters,
|
|
110
127
|
query: queryParameters,
|
|
111
|
-
}
|
|
128
|
+
};
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Delete a document version by its ID. Cannot delete the active version of a document.
|
|
133
|
+
* Delete Document Version Handler
|
|
134
|
+
*/
|
|
135
|
+
deleteDocumentVersionRaw(requestParameters, initOverrides) {
|
|
136
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
+
const requestOptions = yield this.deleteDocumentVersionRequestOpts(requestParameters);
|
|
138
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
112
139
|
return new runtime.VoidApiResponse(response);
|
|
113
140
|
});
|
|
114
141
|
}
|
|
@@ -122,10 +149,9 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
122
149
|
});
|
|
123
150
|
}
|
|
124
151
|
/**
|
|
125
|
-
*
|
|
126
|
-
* Get Document Version Handler
|
|
152
|
+
* Creates request options for getDocumentVersion without sending the request
|
|
127
153
|
*/
|
|
128
|
-
|
|
154
|
+
getDocumentVersionRequestOpts(requestParameters) {
|
|
129
155
|
return __awaiter(this, void 0, void 0, function* () {
|
|
130
156
|
if (requestParameters['versionId'] == null) {
|
|
131
157
|
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getDocumentVersion().');
|
|
@@ -134,12 +160,22 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
134
160
|
const headerParameters = {};
|
|
135
161
|
let urlPath = `/v1/document_versions/{version_id}`;
|
|
136
162
|
urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
|
|
137
|
-
|
|
163
|
+
return {
|
|
138
164
|
path: urlPath,
|
|
139
165
|
method: 'GET',
|
|
140
166
|
headers: headerParameters,
|
|
141
167
|
query: queryParameters,
|
|
142
|
-
}
|
|
168
|
+
};
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
/**
|
|
172
|
+
* Get a document version by its ID.
|
|
173
|
+
* Get Document Version Handler
|
|
174
|
+
*/
|
|
175
|
+
getDocumentVersionRaw(requestParameters, initOverrides) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
const requestOptions = yield this.getDocumentVersionRequestOpts(requestParameters);
|
|
178
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
143
179
|
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentVersionResponseFromJSON(jsonValue));
|
|
144
180
|
});
|
|
145
181
|
}
|
|
@@ -154,10 +190,9 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
154
190
|
});
|
|
155
191
|
}
|
|
156
192
|
/**
|
|
157
|
-
*
|
|
158
|
-
* Get Document Version Contents Handler
|
|
193
|
+
* Creates request options for getDocumentVersionContents without sending the request
|
|
159
194
|
*/
|
|
160
|
-
|
|
195
|
+
getDocumentVersionContentsRequestOpts(requestParameters) {
|
|
161
196
|
return __awaiter(this, void 0, void 0, function* () {
|
|
162
197
|
if (requestParameters['versionId'] == null) {
|
|
163
198
|
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling getDocumentVersionContents().');
|
|
@@ -175,17 +210,27 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
175
210
|
const headerParameters = {};
|
|
176
211
|
let urlPath = `/v1/document_versions/{version_id}/contents`;
|
|
177
212
|
urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
|
|
178
|
-
|
|
213
|
+
return {
|
|
179
214
|
path: urlPath,
|
|
180
215
|
method: 'GET',
|
|
181
216
|
headers: headerParameters,
|
|
182
217
|
query: queryParameters,
|
|
183
|
-
}
|
|
184
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseDocumentContentPathPartFromJSON(jsonValue));
|
|
218
|
+
};
|
|
185
219
|
});
|
|
186
220
|
}
|
|
187
221
|
/**
|
|
188
|
-
* List all sections and chunks for a document version in depth-first logical order. Returns a
|
|
222
|
+
* 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\").
|
|
223
|
+
* Get Document Version Contents Handler
|
|
224
|
+
*/
|
|
225
|
+
getDocumentVersionContentsRaw(requestParameters, initOverrides) {
|
|
226
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
227
|
+
const requestOptions = yield this.getDocumentVersionContentsRequestOpts(requestParameters);
|
|
228
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
229
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminatorFromJSON(jsonValue));
|
|
230
|
+
});
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* 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\").
|
|
189
234
|
* Get Document Version Contents Handler
|
|
190
235
|
*/
|
|
191
236
|
getDocumentVersionContents(requestParameters, initOverrides) {
|
|
@@ -195,10 +240,9 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
195
240
|
});
|
|
196
241
|
}
|
|
197
242
|
/**
|
|
198
|
-
*
|
|
199
|
-
* List Document Versions Handler
|
|
243
|
+
* Creates request options for listDocumentVersions without sending the request
|
|
200
244
|
*/
|
|
201
|
-
|
|
245
|
+
listDocumentVersionsRequestOpts(requestParameters) {
|
|
202
246
|
return __awaiter(this, void 0, void 0, function* () {
|
|
203
247
|
if (requestParameters['documentId'] == null) {
|
|
204
248
|
throw new runtime.RequiredError('documentId', 'Required parameter "documentId" was null or undefined when calling listDocumentVersions().');
|
|
@@ -215,12 +259,22 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
215
259
|
}
|
|
216
260
|
const headerParameters = {};
|
|
217
261
|
let urlPath = `/v1/document_versions`;
|
|
218
|
-
|
|
262
|
+
return {
|
|
219
263
|
path: urlPath,
|
|
220
264
|
method: 'GET',
|
|
221
265
|
headers: headerParameters,
|
|
222
266
|
query: queryParameters,
|
|
223
|
-
}
|
|
267
|
+
};
|
|
268
|
+
});
|
|
269
|
+
}
|
|
270
|
+
/**
|
|
271
|
+
* List all versions for a document. Returns versions ordered by version number ascending (v0, v1, v2...).
|
|
272
|
+
* List Document Versions Handler
|
|
273
|
+
*/
|
|
274
|
+
listDocumentVersionsRaw(requestParameters, initOverrides) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
const requestOptions = yield this.listDocumentVersionsRequestOpts(requestParameters);
|
|
277
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
224
278
|
return new runtime.JSONApiResponse(response, (jsonValue) => PaginatedResponseDocumentVersionResponseFromJSON(jsonValue));
|
|
225
279
|
});
|
|
226
280
|
}
|
|
@@ -235,10 +289,9 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
235
289
|
});
|
|
236
290
|
}
|
|
237
291
|
/**
|
|
238
|
-
*
|
|
239
|
-
* Update Document Version Metadata Handler
|
|
292
|
+
* Creates request options for updateDocumentVersionMetadata without sending the request
|
|
240
293
|
*/
|
|
241
|
-
|
|
294
|
+
updateDocumentVersionMetadataRequestOpts(requestParameters) {
|
|
242
295
|
return __awaiter(this, void 0, void 0, function* () {
|
|
243
296
|
if (requestParameters['versionId'] == null) {
|
|
244
297
|
throw new runtime.RequiredError('versionId', 'Required parameter "versionId" was null or undefined when calling updateDocumentVersionMetadata().');
|
|
@@ -251,13 +304,23 @@ export class DocumentVersionsApi extends runtime.BaseAPI {
|
|
|
251
304
|
headerParameters['Content-Type'] = 'application/json';
|
|
252
305
|
let urlPath = `/v1/document_versions/{version_id}/metadata`;
|
|
253
306
|
urlPath = urlPath.replace(`{${"version_id"}}`, encodeURIComponent(String(requestParameters['versionId'])));
|
|
254
|
-
|
|
307
|
+
return {
|
|
255
308
|
path: urlPath,
|
|
256
309
|
method: 'PATCH',
|
|
257
310
|
headers: headerParameters,
|
|
258
311
|
query: queryParameters,
|
|
259
312
|
body: DocumentVersionMetadataUpdateToJSON(requestParameters['documentVersionMetadataUpdate']),
|
|
260
|
-
}
|
|
313
|
+
};
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
/**
|
|
317
|
+
* 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.
|
|
318
|
+
* Update Document Version Metadata Handler
|
|
319
|
+
*/
|
|
320
|
+
updateDocumentVersionMetadataRaw(requestParameters, initOverrides) {
|
|
321
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
322
|
+
const requestOptions = yield this.updateDocumentVersionMetadataRequestOpts(requestParameters);
|
|
323
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
261
324
|
return new runtime.JSONApiResponse(response, (jsonValue) => DocumentVersionResponseFromJSON(jsonValue));
|
|
262
325
|
});
|
|
263
326
|
}
|
|
@@ -50,6 +50,14 @@ export interface UpdateDocumentOperationRequest {
|
|
|
50
50
|
* @interface DocumentsApiInterface
|
|
51
51
|
*/
|
|
52
52
|
export interface DocumentsApiInterface {
|
|
53
|
+
/**
|
|
54
|
+
* Creates request options for createDocument without sending the request
|
|
55
|
+
* @param {CreateDocumentRequest} createDocumentRequest
|
|
56
|
+
* @param {string} [ksUat]
|
|
57
|
+
* @throws {RequiredError}
|
|
58
|
+
* @memberof DocumentsApiInterface
|
|
59
|
+
*/
|
|
60
|
+
createDocumentRequestOpts(requestParameters: CreateDocumentOperationRequest): Promise<runtime.RequestOpts>;
|
|
53
61
|
/**
|
|
54
62
|
* Create a new document with initial v0 version. The document is created as a child of the specified parent folder. An initial version (v0) is automatically created.
|
|
55
63
|
* @summary Create Document Handler
|
|
@@ -65,6 +73,14 @@ export interface DocumentsApiInterface {
|
|
|
65
73
|
* Create Document Handler
|
|
66
74
|
*/
|
|
67
75
|
createDocument(requestParameters: CreateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
76
|
+
/**
|
|
77
|
+
* Creates request options for deleteDocument without sending the request
|
|
78
|
+
* @param {string} documentId
|
|
79
|
+
* @param {string} [ksUat]
|
|
80
|
+
* @throws {RequiredError}
|
|
81
|
+
* @memberof DocumentsApiInterface
|
|
82
|
+
*/
|
|
83
|
+
deleteDocumentRequestOpts(requestParameters: DeleteDocumentRequest): Promise<runtime.RequestOpts>;
|
|
68
84
|
/**
|
|
69
85
|
* Delete a document and all its contents. WARNING: This cascades to all children (versions, sections, chunks, etc.) due to parent_id ON DELETE CASCADE.
|
|
70
86
|
* @summary Delete Document Handler
|
|
@@ -80,6 +96,15 @@ export interface DocumentsApiInterface {
|
|
|
80
96
|
* Delete Document Handler
|
|
81
97
|
*/
|
|
82
98
|
deleteDocument(requestParameters: DeleteDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
99
|
+
/**
|
|
100
|
+
* Creates request options for getDocument without sending the request
|
|
101
|
+
* @param {string} documentId
|
|
102
|
+
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
103
|
+
* @param {string} [ksUat]
|
|
104
|
+
* @throws {RequiredError}
|
|
105
|
+
* @memberof DocumentsApiInterface
|
|
106
|
+
*/
|
|
107
|
+
getDocumentRequestOpts(requestParameters: GetDocumentRequest): Promise<runtime.RequestOpts>;
|
|
83
108
|
/**
|
|
84
109
|
* Get a document by its document ID.
|
|
85
110
|
* @summary Get Document Handler
|
|
@@ -96,6 +121,16 @@ export interface DocumentsApiInterface {
|
|
|
96
121
|
* Get Document Handler
|
|
97
122
|
*/
|
|
98
123
|
getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
124
|
+
/**
|
|
125
|
+
* Creates request options for ingestDocument without sending the request
|
|
126
|
+
* @param {Blob} file
|
|
127
|
+
* @param {string} pathPartId Parent path part ID (must be a FOLDER type)
|
|
128
|
+
* @param {string} [ksUat]
|
|
129
|
+
* @param {string} [name] Document name (defaults to filename)
|
|
130
|
+
* @throws {RequiredError}
|
|
131
|
+
* @memberof DocumentsApiInterface
|
|
132
|
+
*/
|
|
133
|
+
ingestDocumentRequestOpts(requestParameters: IngestDocumentRequest): Promise<runtime.RequestOpts>;
|
|
99
134
|
/**
|
|
100
135
|
* Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
|
|
101
136
|
* @summary Ingest Document Handler
|
|
@@ -113,6 +148,18 @@ export interface DocumentsApiInterface {
|
|
|
113
148
|
* Ingest Document Handler
|
|
114
149
|
*/
|
|
115
150
|
ingestDocument(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
|
|
151
|
+
/**
|
|
152
|
+
* Creates request options for listDocuments without sending the request
|
|
153
|
+
* @param {string} [parentPathPartId] Parent PathPart ID (defaults to root)
|
|
154
|
+
* @param {PathOrder} [sortOrder] Sort order for results (default: LOGICAL)
|
|
155
|
+
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
156
|
+
* @param {number} [limit] Number of items per page
|
|
157
|
+
* @param {number} [offset] Number of items to skip
|
|
158
|
+
* @param {string} [ksUat]
|
|
159
|
+
* @throws {RequiredError}
|
|
160
|
+
* @memberof DocumentsApiInterface
|
|
161
|
+
*/
|
|
162
|
+
listDocumentsRequestOpts(requestParameters: ListDocumentsRequest): Promise<runtime.RequestOpts>;
|
|
116
163
|
/**
|
|
117
164
|
* List documents in a folder. Returns only direct child documents (depth=1) of the specified parent folder. If parent_path_part_id is not provided, lists top-level documents.
|
|
118
165
|
* @summary List Documents Handler
|
|
@@ -132,6 +179,15 @@ export interface DocumentsApiInterface {
|
|
|
132
179
|
* List Documents Handler
|
|
133
180
|
*/
|
|
134
181
|
listDocuments(requestParameters: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentResponse>;
|
|
182
|
+
/**
|
|
183
|
+
* Creates request options for updateDocument without sending the request
|
|
184
|
+
* @param {string} documentId
|
|
185
|
+
* @param {UpdateDocumentRequest} updateDocumentRequest
|
|
186
|
+
* @param {string} [ksUat]
|
|
187
|
+
* @throws {RequiredError}
|
|
188
|
+
* @memberof DocumentsApiInterface
|
|
189
|
+
*/
|
|
190
|
+
updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts>;
|
|
135
191
|
/**
|
|
136
192
|
* Update a document (rename, move, and/or change active version). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. All can be done in a single request.
|
|
137
193
|
* @summary Update Document Handler
|
|
@@ -153,6 +209,10 @@ export interface DocumentsApiInterface {
|
|
|
153
209
|
*
|
|
154
210
|
*/
|
|
155
211
|
export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsApiInterface {
|
|
212
|
+
/**
|
|
213
|
+
* Creates request options for createDocument without sending the request
|
|
214
|
+
*/
|
|
215
|
+
createDocumentRequestOpts(requestParameters: CreateDocumentOperationRequest): Promise<runtime.RequestOpts>;
|
|
156
216
|
/**
|
|
157
217
|
* Create a new document with initial v0 version. The document is created as a child of the specified parent folder. An initial version (v0) is automatically created.
|
|
158
218
|
* Create Document Handler
|
|
@@ -163,6 +223,10 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
|
|
|
163
223
|
* Create Document Handler
|
|
164
224
|
*/
|
|
165
225
|
createDocument(requestParameters: CreateDocumentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
226
|
+
/**
|
|
227
|
+
* Creates request options for deleteDocument without sending the request
|
|
228
|
+
*/
|
|
229
|
+
deleteDocumentRequestOpts(requestParameters: DeleteDocumentRequest): Promise<runtime.RequestOpts>;
|
|
166
230
|
/**
|
|
167
231
|
* Delete a document and all its contents. WARNING: This cascades to all children (versions, sections, chunks, etc.) due to parent_id ON DELETE CASCADE.
|
|
168
232
|
* Delete Document Handler
|
|
@@ -173,6 +237,10 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
|
|
|
173
237
|
* Delete Document Handler
|
|
174
238
|
*/
|
|
175
239
|
deleteDocument(requestParameters: DeleteDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
240
|
+
/**
|
|
241
|
+
* Creates request options for getDocument without sending the request
|
|
242
|
+
*/
|
|
243
|
+
getDocumentRequestOpts(requestParameters: GetDocumentRequest): Promise<runtime.RequestOpts>;
|
|
176
244
|
/**
|
|
177
245
|
* Get a document by its document ID.
|
|
178
246
|
* Get Document Handler
|
|
@@ -183,6 +251,10 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
|
|
|
183
251
|
* Get Document Handler
|
|
184
252
|
*/
|
|
185
253
|
getDocument(requestParameters: GetDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<DocumentResponse>;
|
|
254
|
+
/**
|
|
255
|
+
* Creates request options for ingestDocument without sending the request
|
|
256
|
+
*/
|
|
257
|
+
ingestDocumentRequestOpts(requestParameters: IngestDocumentRequest): Promise<runtime.RequestOpts>;
|
|
186
258
|
/**
|
|
187
259
|
* Upload a file, create document + version, and trigger ingestion workflow. Returns 201 with the Temporal workflow ID. Design decision — S3 upload happens *before* the DB write: We pre-generate document and version UUIDs, upload the source file to S3, and only then persist the DB records. If the DB write fails, an orphaned S3 object is left behind (acceptable storage cost cleaned up by the S3 deletion cronjob). The reverse — a committed DB record pointing to a missing S3 object — would crash downstream pipeline activities that expect the file to exist.
|
|
188
260
|
* Ingest Document Handler
|
|
@@ -193,6 +265,10 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
|
|
|
193
265
|
* Ingest Document Handler
|
|
194
266
|
*/
|
|
195
267
|
ingestDocument(requestParameters: IngestDocumentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<IngestDocumentResponse>;
|
|
268
|
+
/**
|
|
269
|
+
* Creates request options for listDocuments without sending the request
|
|
270
|
+
*/
|
|
271
|
+
listDocumentsRequestOpts(requestParameters: ListDocumentsRequest): Promise<runtime.RequestOpts>;
|
|
196
272
|
/**
|
|
197
273
|
* List documents in a folder. Returns only direct child documents (depth=1) of the specified parent folder. If parent_path_part_id is not provided, lists top-level documents.
|
|
198
274
|
* List Documents Handler
|
|
@@ -203,6 +279,10 @@ export declare class DocumentsApi extends runtime.BaseAPI implements DocumentsAp
|
|
|
203
279
|
* List Documents Handler
|
|
204
280
|
*/
|
|
205
281
|
listDocuments(requestParameters?: ListDocumentsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseDocumentResponse>;
|
|
282
|
+
/**
|
|
283
|
+
* Creates request options for updateDocument without sending the request
|
|
284
|
+
*/
|
|
285
|
+
updateDocumentRequestOpts(requestParameters: UpdateDocumentOperationRequest): Promise<runtime.RequestOpts>;
|
|
206
286
|
/**
|
|
207
287
|
* Update a document (rename, move, and/or change active version). To rename: provide `name` field. To move: provide `parent_path_part_id` field. To change active version: provide `active_version_id` field. All can be done in a single request.
|
|
208
288
|
* Update Document Handler
|