@knowledge-stack/ksapi 1.7.0 → 1.9.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 +14 -0
- package/README.md +2 -2
- package/dist/apis/ChunksApi.d.ts +175 -0
- package/dist/apis/ChunksApi.js +203 -0
- package/dist/apis/DocumentVersionsApi.d.ts +36 -1
- package/dist/apis/DocumentVersionsApi.js +41 -0
- package/dist/apis/FoldersApi.d.ts +38 -1
- package/dist/apis/FoldersApi.js +44 -0
- package/dist/apis/PathPartsApi.d.ts +4 -6
- package/dist/apis/PathPartsApi.js +2 -5
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/ChunksApi.d.ts +175 -0
- package/dist/esm/apis/ChunksApi.js +199 -0
- package/dist/esm/apis/DocumentVersionsApi.d.ts +36 -1
- package/dist/esm/apis/DocumentVersionsApi.js +42 -1
- package/dist/esm/apis/FoldersApi.d.ts +38 -1
- package/dist/esm/apis/FoldersApi.js +45 -1
- package/dist/esm/apis/PathPartsApi.d.ts +4 -6
- package/dist/esm/apis/PathPartsApi.js +2 -5
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ChunkMetadataInput.d.ts +48 -0
- package/dist/esm/models/ChunkMetadataInput.js +43 -0
- package/dist/esm/models/ChunkMetadataOutput.d.ts +48 -0
- package/dist/esm/models/ChunkMetadataOutput.js +43 -0
- package/dist/esm/models/ChunkResponse.d.ts +115 -0
- package/dist/esm/models/ChunkResponse.js +86 -0
- package/dist/esm/models/ChunkType.d.ts +27 -0
- package/dist/esm/models/ChunkType.js +45 -0
- package/dist/esm/models/CreateChunkRequest.d.ts +73 -0
- package/dist/esm/models/CreateChunkRequest.js +64 -0
- package/dist/esm/models/DocumentContentPathPart.d.ts +119 -0
- package/dist/esm/models/DocumentContentPathPart.js +83 -0
- package/dist/esm/models/FolderDocumentResponse.d.ts +138 -0
- package/dist/esm/models/FolderDocumentResponse.js +88 -0
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseDocumentContentPathPart.js +70 -0
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseFolderDocumentResponse.js +70 -0
- package/dist/esm/models/PasswordResetWithTokenRequest.d.ts +2 -8
- package/dist/esm/models/PasswordResetWithTokenRequest.js +3 -7
- package/dist/esm/models/Polygon.d.ts +65 -0
- package/dist/esm/models/Polygon.js +56 -0
- package/dist/esm/models/PolygonReference.d.ts +54 -0
- package/dist/esm/models/PolygonReference.js +49 -0
- package/dist/esm/models/UpdateChunkContentRequest.d.ts +54 -0
- package/dist/esm/models/UpdateChunkContentRequest.js +51 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.d.ts +48 -0
- package/dist/esm/models/UpdateChunkMetadataRequest.js +45 -0
- package/dist/esm/models/index.d.ts +13 -0
- package/dist/esm/models/index.js +13 -0
- package/dist/models/ChunkMetadataInput.d.ts +48 -0
- package/dist/models/ChunkMetadataInput.js +51 -0
- package/dist/models/ChunkMetadataOutput.d.ts +48 -0
- package/dist/models/ChunkMetadataOutput.js +51 -0
- package/dist/models/ChunkResponse.d.ts +115 -0
- package/dist/models/ChunkResponse.js +94 -0
- package/dist/models/ChunkType.d.ts +27 -0
- package/dist/models/ChunkType.js +53 -0
- package/dist/models/CreateChunkRequest.d.ts +73 -0
- package/dist/models/CreateChunkRequest.js +72 -0
- package/dist/models/DocumentContentPathPart.d.ts +119 -0
- package/dist/models/DocumentContentPathPart.js +91 -0
- package/dist/models/FolderDocumentResponse.d.ts +138 -0
- package/dist/models/FolderDocumentResponse.js +96 -0
- package/dist/models/PaginatedResponseDocumentContentPathPart.d.ts +66 -0
- package/dist/models/PaginatedResponseDocumentContentPathPart.js +78 -0
- package/dist/models/PaginatedResponseFolderDocumentResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseFolderDocumentResponse.js +78 -0
- package/dist/models/PasswordResetWithTokenRequest.d.ts +2 -8
- package/dist/models/PasswordResetWithTokenRequest.js +3 -7
- package/dist/models/Polygon.d.ts +65 -0
- package/dist/models/Polygon.js +64 -0
- package/dist/models/PolygonReference.d.ts +54 -0
- package/dist/models/PolygonReference.js +57 -0
- package/dist/models/UpdateChunkContentRequest.d.ts +54 -0
- package/dist/models/UpdateChunkContentRequest.js +59 -0
- package/dist/models/UpdateChunkMetadataRequest.d.ts +48 -0
- package/dist/models/UpdateChunkMetadataRequest.js +53 -0
- package/dist/models/index.d.ts +13 -0
- package/dist/models/index.js +13 -0
- package/package.json +1 -1
- package/src/apis/ChunksApi.ts +381 -0
- package/src/apis/DocumentVersionsApi.ts +82 -0
- package/src/apis/FoldersApi.ts +88 -0
- package/src/apis/PathPartsApi.ts +4 -10
- package/src/apis/index.ts +1 -0
- package/src/models/ChunkMetadataInput.ts +90 -0
- package/src/models/ChunkMetadataOutput.ts +90 -0
- package/src/models/ChunkResponse.ts +197 -0
- package/src/models/ChunkType.ts +55 -0
- package/src/models/CreateChunkRequest.ts +138 -0
- package/src/models/DocumentContentPathPart.ts +205 -0
- package/src/models/FolderDocumentResponse.ts +234 -0
- package/src/models/PaginatedResponseDocumentContentPathPart.ts +130 -0
- package/src/models/PaginatedResponseFolderDocumentResponse.ts +130 -0
- package/src/models/PasswordResetWithTokenRequest.ts +5 -14
- package/src/models/Polygon.ts +110 -0
- package/src/models/PolygonReference.ts +100 -0
- package/src/models/UpdateChunkContentRequest.ts +104 -0
- package/src/models/UpdateChunkMetadataRequest.ts +91 -0
- package/src/models/index.ts +13 -0
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ChunkMetadataInput } from './ChunkMetadataInput';
|
|
13
|
+
/**
|
|
14
|
+
* Request to update chunk metadata (merge).
|
|
15
|
+
* @export
|
|
16
|
+
* @interface UpdateChunkMetadataRequest
|
|
17
|
+
*/
|
|
18
|
+
export interface UpdateChunkMetadataRequest {
|
|
19
|
+
/**
|
|
20
|
+
* Metadata to merge into existing chunk_metadata
|
|
21
|
+
* @type {ChunkMetadataInput}
|
|
22
|
+
* @memberof UpdateChunkMetadataRequest
|
|
23
|
+
*/
|
|
24
|
+
chunkMetadata: ChunkMetadataInput;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the UpdateChunkMetadataRequest interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfUpdateChunkMetadataRequest(value: object): value is UpdateChunkMetadataRequest;
|
|
30
|
+
export declare function UpdateChunkMetadataRequestFromJSON(json: any): UpdateChunkMetadataRequest;
|
|
31
|
+
export declare function UpdateChunkMetadataRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): UpdateChunkMetadataRequest;
|
|
32
|
+
export declare function UpdateChunkMetadataRequestToJSON(json: any): UpdateChunkMetadataRequest;
|
|
33
|
+
export declare function UpdateChunkMetadataRequestToJSONTyped(value?: UpdateChunkMetadataRequest | null, ignoreDiscriminator?: boolean): any;
|
|
34
|
+
export declare const UpdateChunkMetadataRequestPropertyValidationAttributesMap: {
|
|
35
|
+
[property: string]: {
|
|
36
|
+
maxLength?: number;
|
|
37
|
+
minLength?: number;
|
|
38
|
+
pattern?: string;
|
|
39
|
+
maximum?: number;
|
|
40
|
+
exclusiveMaximum?: boolean;
|
|
41
|
+
minimum?: number;
|
|
42
|
+
exclusiveMinimum?: boolean;
|
|
43
|
+
multipleOf?: number;
|
|
44
|
+
maxItems?: number;
|
|
45
|
+
minItems?: number;
|
|
46
|
+
uniqueItems?: boolean;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.UpdateChunkMetadataRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfUpdateChunkMetadataRequest = instanceOfUpdateChunkMetadataRequest;
|
|
18
|
+
exports.UpdateChunkMetadataRequestFromJSON = UpdateChunkMetadataRequestFromJSON;
|
|
19
|
+
exports.UpdateChunkMetadataRequestFromJSONTyped = UpdateChunkMetadataRequestFromJSONTyped;
|
|
20
|
+
exports.UpdateChunkMetadataRequestToJSON = UpdateChunkMetadataRequestToJSON;
|
|
21
|
+
exports.UpdateChunkMetadataRequestToJSONTyped = UpdateChunkMetadataRequestToJSONTyped;
|
|
22
|
+
const ChunkMetadataInput_1 = require("./ChunkMetadataInput");
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the UpdateChunkMetadataRequest interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfUpdateChunkMetadataRequest(value) {
|
|
27
|
+
if (!('chunkMetadata' in value) || value['chunkMetadata'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function UpdateChunkMetadataRequestFromJSON(json) {
|
|
32
|
+
return UpdateChunkMetadataRequestFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function UpdateChunkMetadataRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'chunkMetadata': (0, ChunkMetadataInput_1.ChunkMetadataInputFromJSON)(json['chunk_metadata']),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function UpdateChunkMetadataRequestToJSON(json) {
|
|
43
|
+
return UpdateChunkMetadataRequestToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function UpdateChunkMetadataRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'chunk_metadata': (0, ChunkMetadataInput_1.ChunkMetadataInputToJSON)(value['chunkMetadata']),
|
|
51
|
+
};
|
|
52
|
+
}
|
|
53
|
+
exports.UpdateChunkMetadataRequestPropertyValidationAttributesMap = {};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -1,14 +1,21 @@
|
|
|
1
|
+
export * from './ChunkMetadataInput';
|
|
2
|
+
export * from './ChunkMetadataOutput';
|
|
3
|
+
export * from './ChunkResponse';
|
|
4
|
+
export * from './ChunkType';
|
|
5
|
+
export * from './CreateChunkRequest';
|
|
1
6
|
export * from './CreateDocumentRequest';
|
|
2
7
|
export * from './CreateFolderRequest';
|
|
3
8
|
export * from './CreatePasswordUserRequest';
|
|
4
9
|
export * from './CreateSectionRequest';
|
|
5
10
|
export * from './CreateTenantRequest';
|
|
11
|
+
export * from './DocumentContentPathPart';
|
|
6
12
|
export * from './DocumentOrigin';
|
|
7
13
|
export * from './DocumentResponse';
|
|
8
14
|
export * from './DocumentType';
|
|
9
15
|
export * from './DocumentVersionResponse';
|
|
10
16
|
export * from './EmailSentResponse';
|
|
11
17
|
export * from './EmailVerificationRequest';
|
|
18
|
+
export * from './FolderDocumentResponse';
|
|
12
19
|
export * from './FolderResponse';
|
|
13
20
|
export * from './HTTPValidationError';
|
|
14
21
|
export * from './HealthCheckResponse';
|
|
@@ -17,8 +24,10 @@ export * from './InviteResponse';
|
|
|
17
24
|
export * from './InviteStatus';
|
|
18
25
|
export * from './InviteUserRequest';
|
|
19
26
|
export * from './OAuth2Config';
|
|
27
|
+
export * from './PaginatedResponseDocumentContentPathPart';
|
|
20
28
|
export * from './PaginatedResponseDocumentResponse';
|
|
21
29
|
export * from './PaginatedResponseDocumentVersionResponse';
|
|
30
|
+
export * from './PaginatedResponseFolderDocumentResponse';
|
|
22
31
|
export * from './PaginatedResponseFolderResponse';
|
|
23
32
|
export * from './PaginatedResponseInviteResponse';
|
|
24
33
|
export * from './PaginatedResponsePathPartResponse';
|
|
@@ -29,12 +38,16 @@ export * from './PasswordResetRequest';
|
|
|
29
38
|
export * from './PasswordResetWithTokenRequest';
|
|
30
39
|
export * from './PathOrder';
|
|
31
40
|
export * from './PathPartResponse';
|
|
41
|
+
export * from './Polygon';
|
|
42
|
+
export * from './PolygonReference';
|
|
32
43
|
export * from './RootResponse';
|
|
33
44
|
export * from './SectionResponse';
|
|
34
45
|
export * from './SignInRequest';
|
|
35
46
|
export * from './TenantResponse';
|
|
36
47
|
export * from './TenantUserInTenantResponse';
|
|
37
48
|
export * from './TenantUserRole';
|
|
49
|
+
export * from './UpdateChunkContentRequest';
|
|
50
|
+
export * from './UpdateChunkMetadataRequest';
|
|
38
51
|
export * from './UpdateDocumentRequest';
|
|
39
52
|
export * from './UpdateFolderRequest';
|
|
40
53
|
export * from './UpdateSectionRequest';
|
package/dist/models/index.js
CHANGED
|
@@ -16,17 +16,24 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
/* tslint:disable */
|
|
18
18
|
/* eslint-disable */
|
|
19
|
+
__exportStar(require("./ChunkMetadataInput"), exports);
|
|
20
|
+
__exportStar(require("./ChunkMetadataOutput"), exports);
|
|
21
|
+
__exportStar(require("./ChunkResponse"), exports);
|
|
22
|
+
__exportStar(require("./ChunkType"), exports);
|
|
23
|
+
__exportStar(require("./CreateChunkRequest"), exports);
|
|
19
24
|
__exportStar(require("./CreateDocumentRequest"), exports);
|
|
20
25
|
__exportStar(require("./CreateFolderRequest"), exports);
|
|
21
26
|
__exportStar(require("./CreatePasswordUserRequest"), exports);
|
|
22
27
|
__exportStar(require("./CreateSectionRequest"), exports);
|
|
23
28
|
__exportStar(require("./CreateTenantRequest"), exports);
|
|
29
|
+
__exportStar(require("./DocumentContentPathPart"), exports);
|
|
24
30
|
__exportStar(require("./DocumentOrigin"), exports);
|
|
25
31
|
__exportStar(require("./DocumentResponse"), exports);
|
|
26
32
|
__exportStar(require("./DocumentType"), exports);
|
|
27
33
|
__exportStar(require("./DocumentVersionResponse"), exports);
|
|
28
34
|
__exportStar(require("./EmailSentResponse"), exports);
|
|
29
35
|
__exportStar(require("./EmailVerificationRequest"), exports);
|
|
36
|
+
__exportStar(require("./FolderDocumentResponse"), exports);
|
|
30
37
|
__exportStar(require("./FolderResponse"), exports);
|
|
31
38
|
__exportStar(require("./HTTPValidationError"), exports);
|
|
32
39
|
__exportStar(require("./HealthCheckResponse"), exports);
|
|
@@ -35,8 +42,10 @@ __exportStar(require("./InviteResponse"), exports);
|
|
|
35
42
|
__exportStar(require("./InviteStatus"), exports);
|
|
36
43
|
__exportStar(require("./InviteUserRequest"), exports);
|
|
37
44
|
__exportStar(require("./OAuth2Config"), exports);
|
|
45
|
+
__exportStar(require("./PaginatedResponseDocumentContentPathPart"), exports);
|
|
38
46
|
__exportStar(require("./PaginatedResponseDocumentResponse"), exports);
|
|
39
47
|
__exportStar(require("./PaginatedResponseDocumentVersionResponse"), exports);
|
|
48
|
+
__exportStar(require("./PaginatedResponseFolderDocumentResponse"), exports);
|
|
40
49
|
__exportStar(require("./PaginatedResponseFolderResponse"), exports);
|
|
41
50
|
__exportStar(require("./PaginatedResponseInviteResponse"), exports);
|
|
42
51
|
__exportStar(require("./PaginatedResponsePathPartResponse"), exports);
|
|
@@ -47,12 +56,16 @@ __exportStar(require("./PasswordResetRequest"), exports);
|
|
|
47
56
|
__exportStar(require("./PasswordResetWithTokenRequest"), exports);
|
|
48
57
|
__exportStar(require("./PathOrder"), exports);
|
|
49
58
|
__exportStar(require("./PathPartResponse"), exports);
|
|
59
|
+
__exportStar(require("./Polygon"), exports);
|
|
60
|
+
__exportStar(require("./PolygonReference"), exports);
|
|
50
61
|
__exportStar(require("./RootResponse"), exports);
|
|
51
62
|
__exportStar(require("./SectionResponse"), exports);
|
|
52
63
|
__exportStar(require("./SignInRequest"), exports);
|
|
53
64
|
__exportStar(require("./TenantResponse"), exports);
|
|
54
65
|
__exportStar(require("./TenantUserInTenantResponse"), exports);
|
|
55
66
|
__exportStar(require("./TenantUserRole"), exports);
|
|
67
|
+
__exportStar(require("./UpdateChunkContentRequest"), exports);
|
|
68
|
+
__exportStar(require("./UpdateChunkMetadataRequest"), exports);
|
|
56
69
|
__exportStar(require("./UpdateDocumentRequest"), exports);
|
|
57
70
|
__exportStar(require("./UpdateFolderRequest"), exports);
|
|
58
71
|
__exportStar(require("./UpdateSectionRequest"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,381 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
import * as runtime from '../runtime';
|
|
17
|
+
import type {
|
|
18
|
+
ChunkResponse,
|
|
19
|
+
CreateChunkRequest,
|
|
20
|
+
HTTPValidationError,
|
|
21
|
+
UpdateChunkContentRequest,
|
|
22
|
+
UpdateChunkMetadataRequest,
|
|
23
|
+
} from '../models/index';
|
|
24
|
+
import {
|
|
25
|
+
ChunkResponseFromJSON,
|
|
26
|
+
ChunkResponseToJSON,
|
|
27
|
+
CreateChunkRequestFromJSON,
|
|
28
|
+
CreateChunkRequestToJSON,
|
|
29
|
+
HTTPValidationErrorFromJSON,
|
|
30
|
+
HTTPValidationErrorToJSON,
|
|
31
|
+
UpdateChunkContentRequestFromJSON,
|
|
32
|
+
UpdateChunkContentRequestToJSON,
|
|
33
|
+
UpdateChunkMetadataRequestFromJSON,
|
|
34
|
+
UpdateChunkMetadataRequestToJSON,
|
|
35
|
+
} from '../models/index';
|
|
36
|
+
|
|
37
|
+
export interface CreateChunkOperationRequest {
|
|
38
|
+
createChunkRequest: CreateChunkRequest;
|
|
39
|
+
ksUat?: string;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export interface DeleteChunkRequest {
|
|
43
|
+
chunkId: string;
|
|
44
|
+
ksUat?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export interface GetChunkRequest {
|
|
48
|
+
chunkId: string;
|
|
49
|
+
ksUat?: string;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
export interface UpdateChunkContentOperationRequest {
|
|
53
|
+
chunkId: string;
|
|
54
|
+
updateChunkContentRequest: UpdateChunkContentRequest;
|
|
55
|
+
ksUat?: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface UpdateChunkMetadataOperationRequest {
|
|
59
|
+
chunkId: string;
|
|
60
|
+
updateChunkMetadataRequest: UpdateChunkMetadataRequest;
|
|
61
|
+
ksUat?: string;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* ChunksApi - interface
|
|
66
|
+
*
|
|
67
|
+
* @export
|
|
68
|
+
* @interface ChunksApiInterface
|
|
69
|
+
*/
|
|
70
|
+
export interface ChunksApiInterface {
|
|
71
|
+
/**
|
|
72
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
73
|
+
* @summary Create Chunk Handler
|
|
74
|
+
* @param {CreateChunkRequest} createChunkRequest
|
|
75
|
+
* @param {string} [ksUat]
|
|
76
|
+
* @param {*} [options] Override http request option.
|
|
77
|
+
* @throws {RequiredError}
|
|
78
|
+
* @memberof ChunksApiInterface
|
|
79
|
+
*/
|
|
80
|
+
createChunkRaw(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
84
|
+
* Create Chunk Handler
|
|
85
|
+
*/
|
|
86
|
+
createChunk(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
87
|
+
|
|
88
|
+
/**
|
|
89
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
90
|
+
* @summary Delete Chunk Handler
|
|
91
|
+
* @param {string} chunkId
|
|
92
|
+
* @param {string} [ksUat]
|
|
93
|
+
* @param {*} [options] Override http request option.
|
|
94
|
+
* @throws {RequiredError}
|
|
95
|
+
* @memberof ChunksApiInterface
|
|
96
|
+
*/
|
|
97
|
+
deleteChunkRaw(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
|
|
98
|
+
|
|
99
|
+
/**
|
|
100
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
101
|
+
* Delete Chunk Handler
|
|
102
|
+
*/
|
|
103
|
+
deleteChunk(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Get a chunk by its ID, including content.
|
|
107
|
+
* @summary Get Chunk Handler
|
|
108
|
+
* @param {string} chunkId
|
|
109
|
+
* @param {string} [ksUat]
|
|
110
|
+
* @param {*} [options] Override http request option.
|
|
111
|
+
* @throws {RequiredError}
|
|
112
|
+
* @memberof ChunksApiInterface
|
|
113
|
+
*/
|
|
114
|
+
getChunkRaw(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Get a chunk by its ID, including content.
|
|
118
|
+
* Get Chunk Handler
|
|
119
|
+
*/
|
|
120
|
+
getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
121
|
+
|
|
122
|
+
/**
|
|
123
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
124
|
+
* @summary Update Chunk Content Handler
|
|
125
|
+
* @param {string} chunkId
|
|
126
|
+
* @param {UpdateChunkContentRequest} updateChunkContentRequest
|
|
127
|
+
* @param {string} [ksUat]
|
|
128
|
+
* @param {*} [options] Override http request option.
|
|
129
|
+
* @throws {RequiredError}
|
|
130
|
+
* @memberof ChunksApiInterface
|
|
131
|
+
*/
|
|
132
|
+
updateChunkContentRaw(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
136
|
+
* Update Chunk Content Handler
|
|
137
|
+
*/
|
|
138
|
+
updateChunkContent(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
142
|
+
* @summary Update Chunk Metadata Handler
|
|
143
|
+
* @param {string} chunkId
|
|
144
|
+
* @param {UpdateChunkMetadataRequest} updateChunkMetadataRequest
|
|
145
|
+
* @param {string} [ksUat]
|
|
146
|
+
* @param {*} [options] Override http request option.
|
|
147
|
+
* @throws {RequiredError}
|
|
148
|
+
* @memberof ChunksApiInterface
|
|
149
|
+
*/
|
|
150
|
+
updateChunkMetadataRaw(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>>;
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
154
|
+
* Update Chunk Metadata Handler
|
|
155
|
+
*/
|
|
156
|
+
updateChunkMetadata(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse>;
|
|
157
|
+
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
*
|
|
162
|
+
*/
|
|
163
|
+
export class ChunksApi extends runtime.BaseAPI implements ChunksApiInterface {
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
167
|
+
* Create Chunk Handler
|
|
168
|
+
*/
|
|
169
|
+
async createChunkRaw(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
170
|
+
if (requestParameters['createChunkRequest'] == null) {
|
|
171
|
+
throw new runtime.RequiredError(
|
|
172
|
+
'createChunkRequest',
|
|
173
|
+
'Required parameter "createChunkRequest" was null or undefined when calling createChunk().'
|
|
174
|
+
);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
const queryParameters: any = {};
|
|
178
|
+
|
|
179
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
180
|
+
|
|
181
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
let urlPath = `/v1/chunks`;
|
|
185
|
+
|
|
186
|
+
const response = await this.request({
|
|
187
|
+
path: urlPath,
|
|
188
|
+
method: 'POST',
|
|
189
|
+
headers: headerParameters,
|
|
190
|
+
query: queryParameters,
|
|
191
|
+
body: CreateChunkRequestToJSON(requestParameters['createChunkRequest']),
|
|
192
|
+
}, initOverrides);
|
|
193
|
+
|
|
194
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
/**
|
|
198
|
+
* Create a new chunk with content. The chunk is created as a child of the specified parent (must be DOCUMENT_VERSION or SECTION). Content is deduplicated by SHA256 hash.
|
|
199
|
+
* Create Chunk Handler
|
|
200
|
+
*/
|
|
201
|
+
async createChunk(requestParameters: CreateChunkOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
202
|
+
const response = await this.createChunkRaw(requestParameters, initOverrides);
|
|
203
|
+
return await response.value();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
208
|
+
* Delete Chunk Handler
|
|
209
|
+
*/
|
|
210
|
+
async deleteChunkRaw(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
211
|
+
if (requestParameters['chunkId'] == null) {
|
|
212
|
+
throw new runtime.RequiredError(
|
|
213
|
+
'chunkId',
|
|
214
|
+
'Required parameter "chunkId" was null or undefined when calling deleteChunk().'
|
|
215
|
+
);
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const queryParameters: any = {};
|
|
219
|
+
|
|
220
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
let urlPath = `/v1/chunks/{chunk_id}`;
|
|
224
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
225
|
+
|
|
226
|
+
const response = await this.request({
|
|
227
|
+
path: urlPath,
|
|
228
|
+
method: 'DELETE',
|
|
229
|
+
headers: headerParameters,
|
|
230
|
+
query: queryParameters,
|
|
231
|
+
}, initOverrides);
|
|
232
|
+
|
|
233
|
+
return new runtime.VoidApiResponse(response);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
/**
|
|
237
|
+
* Delete a chunk. The chunk is deleted via its PathPart (cascading delete). The associated ChunkContent may remain if shared by other chunks.
|
|
238
|
+
* Delete Chunk Handler
|
|
239
|
+
*/
|
|
240
|
+
async deleteChunk(requestParameters: DeleteChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
241
|
+
await this.deleteChunkRaw(requestParameters, initOverrides);
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Get a chunk by its ID, including content.
|
|
246
|
+
* Get Chunk Handler
|
|
247
|
+
*/
|
|
248
|
+
async getChunkRaw(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
249
|
+
if (requestParameters['chunkId'] == null) {
|
|
250
|
+
throw new runtime.RequiredError(
|
|
251
|
+
'chunkId',
|
|
252
|
+
'Required parameter "chunkId" was null or undefined when calling getChunk().'
|
|
253
|
+
);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
const queryParameters: any = {};
|
|
257
|
+
|
|
258
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
let urlPath = `/v1/chunks/{chunk_id}`;
|
|
262
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
263
|
+
|
|
264
|
+
const response = await this.request({
|
|
265
|
+
path: urlPath,
|
|
266
|
+
method: 'GET',
|
|
267
|
+
headers: headerParameters,
|
|
268
|
+
query: queryParameters,
|
|
269
|
+
}, initOverrides);
|
|
270
|
+
|
|
271
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Get a chunk by its ID, including content.
|
|
276
|
+
* Get Chunk Handler
|
|
277
|
+
*/
|
|
278
|
+
async getChunk(requestParameters: GetChunkRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
279
|
+
const response = await this.getChunkRaw(requestParameters, initOverrides);
|
|
280
|
+
return await response.value();
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
/**
|
|
284
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
285
|
+
* Update Chunk Content Handler
|
|
286
|
+
*/
|
|
287
|
+
async updateChunkContentRaw(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
288
|
+
if (requestParameters['chunkId'] == null) {
|
|
289
|
+
throw new runtime.RequiredError(
|
|
290
|
+
'chunkId',
|
|
291
|
+
'Required parameter "chunkId" was null or undefined when calling updateChunkContent().'
|
|
292
|
+
);
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (requestParameters['updateChunkContentRequest'] == null) {
|
|
296
|
+
throw new runtime.RequiredError(
|
|
297
|
+
'updateChunkContentRequest',
|
|
298
|
+
'Required parameter "updateChunkContentRequest" was null or undefined when calling updateChunkContent().'
|
|
299
|
+
);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
const queryParameters: any = {};
|
|
303
|
+
|
|
304
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
305
|
+
|
|
306
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
307
|
+
|
|
308
|
+
|
|
309
|
+
let urlPath = `/v1/chunks/{chunk_id}/content`;
|
|
310
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
311
|
+
|
|
312
|
+
const response = await this.request({
|
|
313
|
+
path: urlPath,
|
|
314
|
+
method: 'PATCH',
|
|
315
|
+
headers: headerParameters,
|
|
316
|
+
query: queryParameters,
|
|
317
|
+
body: UpdateChunkContentRequestToJSON(requestParameters['updateChunkContentRequest']),
|
|
318
|
+
}, initOverrides);
|
|
319
|
+
|
|
320
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
/**
|
|
324
|
+
* Update chunk content by creating a new content row. The old content row is preserved (not deleted). If the new content matches an existing content hash, it will be deduplicated.
|
|
325
|
+
* Update Chunk Content Handler
|
|
326
|
+
*/
|
|
327
|
+
async updateChunkContent(requestParameters: UpdateChunkContentOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
328
|
+
const response = await this.updateChunkContentRaw(requestParameters, initOverrides);
|
|
329
|
+
return await response.value();
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
334
|
+
* Update Chunk Metadata Handler
|
|
335
|
+
*/
|
|
336
|
+
async updateChunkMetadataRaw(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ChunkResponse>> {
|
|
337
|
+
if (requestParameters['chunkId'] == null) {
|
|
338
|
+
throw new runtime.RequiredError(
|
|
339
|
+
'chunkId',
|
|
340
|
+
'Required parameter "chunkId" was null or undefined when calling updateChunkMetadata().'
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (requestParameters['updateChunkMetadataRequest'] == null) {
|
|
345
|
+
throw new runtime.RequiredError(
|
|
346
|
+
'updateChunkMetadataRequest',
|
|
347
|
+
'Required parameter "updateChunkMetadataRequest" was null or undefined when calling updateChunkMetadata().'
|
|
348
|
+
);
|
|
349
|
+
}
|
|
350
|
+
|
|
351
|
+
const queryParameters: any = {};
|
|
352
|
+
|
|
353
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
354
|
+
|
|
355
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
let urlPath = `/v1/chunks/{chunk_id}/metadata`;
|
|
359
|
+
urlPath = urlPath.replace(`{${"chunk_id"}}`, encodeURIComponent(String(requestParameters['chunkId'])));
|
|
360
|
+
|
|
361
|
+
const response = await this.request({
|
|
362
|
+
path: urlPath,
|
|
363
|
+
method: 'PATCH',
|
|
364
|
+
headers: headerParameters,
|
|
365
|
+
query: queryParameters,
|
|
366
|
+
body: UpdateChunkMetadataRequestToJSON(requestParameters['updateChunkMetadataRequest']),
|
|
367
|
+
}, initOverrides);
|
|
368
|
+
|
|
369
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ChunkResponseFromJSON(jsonValue));
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
/**
|
|
373
|
+
* Update chunk metadata by merging with existing metadata. The provided metadata is shallow-merged into the existing chunk_metadata.
|
|
374
|
+
* Update Chunk Metadata Handler
|
|
375
|
+
*/
|
|
376
|
+
async updateChunkMetadata(requestParameters: UpdateChunkMetadataOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ChunkResponse> {
|
|
377
|
+
const response = await this.updateChunkMetadataRaw(requestParameters, initOverrides);
|
|
378
|
+
return await response.value();
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
}
|