@knowledge-stack/ksapi 1.152.0 → 1.153.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 +10 -0
- package/README.md +12 -2
- package/dist/apis/DocumentsApi.d.ts +197 -1
- package/dist/apis/DocumentsApi.js +256 -0
- package/dist/esm/apis/DocumentsApi.d.ts +197 -1
- package/dist/esm/apis/DocumentsApi.js +257 -1
- package/dist/esm/models/ChunkMetadata.d.ts +12 -0
- package/dist/esm/models/ChunkMetadata.js +4 -0
- package/dist/esm/models/Citation.d.ts +12 -0
- package/dist/esm/models/Citation.js +4 -0
- package/dist/esm/models/CompleteUploadRequest.d.ts +47 -0
- package/dist/esm/models/CompleteUploadRequest.js +44 -0
- package/dist/esm/models/CreateUploadRequest.d.ts +65 -0
- package/dist/esm/models/CreateUploadRequest.js +56 -0
- package/dist/esm/models/CreateUploadResponse.d.ts +65 -0
- package/dist/esm/models/CreateUploadResponse.js +56 -0
- package/dist/esm/models/DocumentType.d.ts +2 -0
- package/dist/esm/models/DocumentType.js +2 -0
- package/dist/esm/models/EnrichedCitation.d.ts +12 -0
- package/dist/esm/models/EnrichedCitation.js +4 -0
- package/dist/esm/models/IngestionMode.d.ts +1 -0
- package/dist/esm/models/IngestionMode.js +2 -1
- package/dist/esm/models/SubscriptionPlanResponse.d.ts +6 -0
- package/dist/esm/models/SubscriptionPlanResponse.js +4 -0
- package/dist/esm/models/UploadPartResponse.d.ts +59 -0
- package/dist/esm/models/UploadPartResponse.js +52 -0
- package/dist/esm/models/UploadStatusResponse.d.ts +54 -0
- package/dist/esm/models/UploadStatusResponse.js +49 -0
- package/dist/esm/models/UsageMetric.d.ts +1 -0
- package/dist/esm/models/UsageMetric.js +2 -1
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/ChunkMetadata.d.ts +12 -0
- package/dist/models/ChunkMetadata.js +4 -0
- package/dist/models/Citation.d.ts +12 -0
- package/dist/models/Citation.js +4 -0
- package/dist/models/CompleteUploadRequest.d.ts +47 -0
- package/dist/models/CompleteUploadRequest.js +52 -0
- package/dist/models/CreateUploadRequest.d.ts +65 -0
- package/dist/models/CreateUploadRequest.js +64 -0
- package/dist/models/CreateUploadResponse.d.ts +65 -0
- package/dist/models/CreateUploadResponse.js +64 -0
- package/dist/models/DocumentType.d.ts +2 -0
- package/dist/models/DocumentType.js +2 -0
- package/dist/models/EnrichedCitation.d.ts +12 -0
- package/dist/models/EnrichedCitation.js +4 -0
- package/dist/models/IngestionMode.d.ts +1 -0
- package/dist/models/IngestionMode.js +2 -1
- package/dist/models/SubscriptionPlanResponse.d.ts +6 -0
- package/dist/models/SubscriptionPlanResponse.js +4 -0
- package/dist/models/UploadPartResponse.d.ts +59 -0
- package/dist/models/UploadPartResponse.js +60 -0
- package/dist/models/UploadStatusResponse.d.ts +54 -0
- package/dist/models/UploadStatusResponse.js +57 -0
- package/dist/models/UsageMetric.d.ts +1 -0
- package/dist/models/UsageMetric.js +2 -1
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/ChunkMetadata.md +4 -0
- package/docs/Citation.md +4 -0
- package/docs/CompleteUploadRequest.md +35 -0
- package/docs/CreateUploadRequest.md +41 -0
- package/docs/CreateUploadResponse.md +41 -0
- package/docs/DocumentsApi.md +390 -4
- package/docs/EnrichedCitation.md +4 -0
- package/docs/SubscriptionPlanResponse.md +2 -0
- package/docs/UploadPartResponse.md +39 -0
- package/docs/UploadStatusResponse.md +37 -0
- package/package.json +1 -1
- package/src/apis/DocumentsApi.ts +466 -0
- package/src/models/ChunkMetadata.ts +16 -0
- package/src/models/Citation.ts +16 -0
- package/src/models/CompleteUploadRequest.ts +83 -0
- package/src/models/CreateUploadRequest.ts +110 -0
- package/src/models/CreateUploadResponse.ts +110 -0
- package/src/models/DocumentType.ts +2 -0
- package/src/models/EnrichedCitation.ts +16 -0
- package/src/models/IngestionMode.ts +2 -1
- package/src/models/SubscriptionPlanResponse.ts +9 -0
- package/src/models/UploadPartResponse.ts +101 -0
- package/src/models/UploadStatusResponse.ts +100 -0
- package/src/models/UsageMetric.ts +2 -1
- package/src/models/index.ts +5 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
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
|
+
import { UploadPartResponseFromJSON, UploadPartResponseToJSON, } from './UploadPartResponse';
|
|
15
|
+
export const UploadStatusResponsePropertyValidationAttributesMap = {};
|
|
16
|
+
/**
|
|
17
|
+
* Check if a given object implements the UploadStatusResponse interface.
|
|
18
|
+
*/
|
|
19
|
+
export function instanceOfUploadStatusResponse(value) {
|
|
20
|
+
if (!('parts' in value) || value['parts'] === undefined)
|
|
21
|
+
return false;
|
|
22
|
+
if (!('uploadedBytes' in value) || value['uploadedBytes'] === undefined)
|
|
23
|
+
return false;
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
export function UploadStatusResponseFromJSON(json) {
|
|
27
|
+
return UploadStatusResponseFromJSONTyped(json, false);
|
|
28
|
+
}
|
|
29
|
+
export function UploadStatusResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
30
|
+
if (json == null) {
|
|
31
|
+
return json;
|
|
32
|
+
}
|
|
33
|
+
return {
|
|
34
|
+
'parts': (json['parts'].map(UploadPartResponseFromJSON)),
|
|
35
|
+
'uploadedBytes': json['uploaded_bytes'],
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
export function UploadStatusResponseToJSON(json) {
|
|
39
|
+
return UploadStatusResponseToJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
export function UploadStatusResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
42
|
+
if (value == null) {
|
|
43
|
+
return value;
|
|
44
|
+
}
|
|
45
|
+
return {
|
|
46
|
+
'parts': (value['parts'].map(UploadPartResponseToJSON)),
|
|
47
|
+
'uploaded_bytes': value['uploadedBytes'],
|
|
48
|
+
};
|
|
49
|
+
}
|
|
@@ -17,6 +17,7 @@ export declare const UsageMetric: {
|
|
|
17
17
|
readonly Page: 'PAGE';
|
|
18
18
|
readonly Search: 'SEARCH';
|
|
19
19
|
readonly Message: 'MESSAGE';
|
|
20
|
+
readonly MediaMinute: 'MEDIA_MINUTE';
|
|
20
21
|
};
|
|
21
22
|
export type UsageMetric = typeof UsageMetric[keyof typeof UsageMetric];
|
|
22
23
|
export declare function instanceOfUsageMetric(value: any): boolean;
|
|
@@ -47,6 +47,7 @@ export * from './CloneWorkflowRunRequest';
|
|
|
47
47
|
export * from './ColumnConfig';
|
|
48
48
|
export * from './ColumnReference';
|
|
49
49
|
export * from './CommonFileExclusionReason';
|
|
50
|
+
export * from './CompleteUploadRequest';
|
|
50
51
|
export * from './ConnectionConfig';
|
|
51
52
|
export * from './ContentsSortOrder';
|
|
52
53
|
export * from './CreateApiConnectionRequest';
|
|
@@ -67,6 +68,8 @@ export * from './CreateSkillRequest';
|
|
|
67
68
|
export * from './CreateTagRequest';
|
|
68
69
|
export * from './CreateThreadMessageRequest';
|
|
69
70
|
export * from './CreateThreadRequest';
|
|
71
|
+
export * from './CreateUploadRequest';
|
|
72
|
+
export * from './CreateUploadResponse';
|
|
70
73
|
export * from './CreateWorkflowDefinitionRequest';
|
|
71
74
|
export * from './DataSourceCatalogResponse';
|
|
72
75
|
export * from './DataSourceDescribeResponse';
|
|
@@ -328,6 +331,8 @@ export * from './UpdateWorkflowDefinitionRequest';
|
|
|
328
331
|
export * from './UpdateWorkflowRunRequest';
|
|
329
332
|
export * from './UploadConstraints';
|
|
330
333
|
export * from './UploadFormat';
|
|
334
|
+
export * from './UploadPartResponse';
|
|
335
|
+
export * from './UploadStatusResponse';
|
|
331
336
|
export * from './UsageMetric';
|
|
332
337
|
export * from './UserInfo';
|
|
333
338
|
export * from './UserMessageRequest';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -49,6 +49,7 @@ export * from './CloneWorkflowRunRequest';
|
|
|
49
49
|
export * from './ColumnConfig';
|
|
50
50
|
export * from './ColumnReference';
|
|
51
51
|
export * from './CommonFileExclusionReason';
|
|
52
|
+
export * from './CompleteUploadRequest';
|
|
52
53
|
export * from './ConnectionConfig';
|
|
53
54
|
export * from './ContentsSortOrder';
|
|
54
55
|
export * from './CreateApiConnectionRequest';
|
|
@@ -69,6 +70,8 @@ export * from './CreateSkillRequest';
|
|
|
69
70
|
export * from './CreateTagRequest';
|
|
70
71
|
export * from './CreateThreadMessageRequest';
|
|
71
72
|
export * from './CreateThreadRequest';
|
|
73
|
+
export * from './CreateUploadRequest';
|
|
74
|
+
export * from './CreateUploadResponse';
|
|
72
75
|
export * from './CreateWorkflowDefinitionRequest';
|
|
73
76
|
export * from './DataSourceCatalogResponse';
|
|
74
77
|
export * from './DataSourceDescribeResponse';
|
|
@@ -330,6 +333,8 @@ export * from './UpdateWorkflowDefinitionRequest';
|
|
|
330
333
|
export * from './UpdateWorkflowRunRequest';
|
|
331
334
|
export * from './UploadConstraints';
|
|
332
335
|
export * from './UploadFormat';
|
|
336
|
+
export * from './UploadPartResponse';
|
|
337
|
+
export * from './UploadStatusResponse';
|
|
333
338
|
export * from './UsageMetric';
|
|
334
339
|
export * from './UserInfo';
|
|
335
340
|
export * from './UserMessageRequest';
|
|
@@ -53,6 +53,18 @@ export interface ChunkMetadata {
|
|
|
53
53
|
* @memberof ChunkMetadata
|
|
54
54
|
*/
|
|
55
55
|
secondaryTaxonomy?: ImageTaxonomy;
|
|
56
|
+
/**
|
|
57
|
+
* Start time of this chunk in the source media (ms from start).
|
|
58
|
+
* @type {number}
|
|
59
|
+
* @memberof ChunkMetadata
|
|
60
|
+
*/
|
|
61
|
+
startMs?: number | null;
|
|
62
|
+
/**
|
|
63
|
+
* End time of this chunk in the source media (ms from start).
|
|
64
|
+
* @type {number}
|
|
65
|
+
* @memberof ChunkMetadata
|
|
66
|
+
*/
|
|
67
|
+
endMs?: number | null;
|
|
56
68
|
/**
|
|
57
69
|
* Worksheet name this chunk was extracted from (XLSX only)
|
|
58
70
|
* @type {string}
|
|
@@ -42,6 +42,8 @@ function ChunkMetadataFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
42
42
|
'summarizeForEmbedding': json['summarize_for_embedding'] == null ? undefined : json['summarize_for_embedding'],
|
|
43
43
|
'extractedTextS3Uri': json['extracted_text_s3_uri'] == null ? undefined : json['extracted_text_s3_uri'],
|
|
44
44
|
'secondaryTaxonomy': json['secondary_taxonomy'] == null ? undefined : (0, ImageTaxonomy_1.ImageTaxonomyFromJSON)(json['secondary_taxonomy']),
|
|
45
|
+
'startMs': json['start_ms'] == null ? undefined : json['start_ms'],
|
|
46
|
+
'endMs': json['end_ms'] == null ? undefined : json['end_ms'],
|
|
45
47
|
'sheetName': json['sheet_name'] == null ? undefined : json['sheet_name'],
|
|
46
48
|
'blockType': json['block_type'] == null ? undefined : json['block_type'],
|
|
47
49
|
'sourceUri': json['source_uri'] == null ? undefined : json['source_uri'],
|
|
@@ -67,6 +69,8 @@ function ChunkMetadataToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
67
69
|
'summarize_for_embedding': value['summarizeForEmbedding'],
|
|
68
70
|
'extracted_text_s3_uri': value['extractedTextS3Uri'],
|
|
69
71
|
'secondary_taxonomy': (0, ImageTaxonomy_1.ImageTaxonomyToJSON)(value['secondaryTaxonomy']),
|
|
72
|
+
'start_ms': value['startMs'],
|
|
73
|
+
'end_ms': value['endMs'],
|
|
70
74
|
'sheet_name': value['sheetName'],
|
|
71
75
|
'block_type': value['blockType'],
|
|
72
76
|
'source_uri': value['sourceUri'],
|
|
@@ -39,6 +39,18 @@ export interface Citation {
|
|
|
39
39
|
* @memberof Citation
|
|
40
40
|
*/
|
|
41
41
|
length: number;
|
|
42
|
+
/**
|
|
43
|
+
* Start time (ms) of the cited chunk in the source media, for AUDIO/VIDEO — lets the client deep-link playback to the moment. None for non-media chunks.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof Citation
|
|
46
|
+
*/
|
|
47
|
+
startMs?: number | null;
|
|
48
|
+
/**
|
|
49
|
+
* End time (ms) of the cited chunk in the source media (AUDIO/VIDEO); None for non-media chunks.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof Citation
|
|
52
|
+
*/
|
|
53
|
+
endMs?: number | null;
|
|
42
54
|
}
|
|
43
55
|
export declare const CitationPropertyValidationAttributesMap: {
|
|
44
56
|
[property: string]: {
|
package/dist/models/Citation.js
CHANGED
|
@@ -51,6 +51,8 @@ function CitationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'quote': json['quote'],
|
|
52
52
|
'startChar': json['start_char'],
|
|
53
53
|
'length': json['length'],
|
|
54
|
+
'startMs': json['start_ms'] == null ? undefined : json['start_ms'],
|
|
55
|
+
'endMs': json['end_ms'] == null ? undefined : json['end_ms'],
|
|
54
56
|
};
|
|
55
57
|
}
|
|
56
58
|
function CitationToJSON(json) {
|
|
@@ -65,5 +67,7 @@ function CitationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
65
67
|
'quote': value['quote'],
|
|
66
68
|
'start_char': value['startChar'],
|
|
67
69
|
'length': value['length'],
|
|
70
|
+
'start_ms': value['startMs'],
|
|
71
|
+
'end_ms': value['endMs'],
|
|
68
72
|
};
|
|
69
73
|
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
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
|
+
/**
|
|
13
|
+
* Finalize a resumable upload and start ingestion.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CompleteUploadRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CompleteUploadRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Token from create-upload
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CompleteUploadRequest
|
|
22
|
+
*/
|
|
23
|
+
uploadToken: string;
|
|
24
|
+
}
|
|
25
|
+
export declare const CompleteUploadRequestPropertyValidationAttributesMap: {
|
|
26
|
+
[property: string]: {
|
|
27
|
+
maxLength?: number;
|
|
28
|
+
minLength?: number;
|
|
29
|
+
pattern?: string;
|
|
30
|
+
maximum?: number;
|
|
31
|
+
exclusiveMaximum?: boolean;
|
|
32
|
+
minimum?: number;
|
|
33
|
+
exclusiveMinimum?: boolean;
|
|
34
|
+
multipleOf?: number;
|
|
35
|
+
maxItems?: number;
|
|
36
|
+
minItems?: number;
|
|
37
|
+
uniqueItems?: boolean;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* Check if a given object implements the CompleteUploadRequest interface.
|
|
42
|
+
*/
|
|
43
|
+
export declare function instanceOfCompleteUploadRequest(value: object): value is CompleteUploadRequest;
|
|
44
|
+
export declare function CompleteUploadRequestFromJSON(json: any): CompleteUploadRequest;
|
|
45
|
+
export declare function CompleteUploadRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CompleteUploadRequest;
|
|
46
|
+
export declare function CompleteUploadRequestToJSON(json: any): CompleteUploadRequest;
|
|
47
|
+
export declare function CompleteUploadRequestToJSONTyped(value?: CompleteUploadRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
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.CompleteUploadRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfCompleteUploadRequest = instanceOfCompleteUploadRequest;
|
|
18
|
+
exports.CompleteUploadRequestFromJSON = CompleteUploadRequestFromJSON;
|
|
19
|
+
exports.CompleteUploadRequestFromJSONTyped = CompleteUploadRequestFromJSONTyped;
|
|
20
|
+
exports.CompleteUploadRequestToJSON = CompleteUploadRequestToJSON;
|
|
21
|
+
exports.CompleteUploadRequestToJSONTyped = CompleteUploadRequestToJSONTyped;
|
|
22
|
+
exports.CompleteUploadRequestPropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the CompleteUploadRequest interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfCompleteUploadRequest(value) {
|
|
27
|
+
if (!('uploadToken' in value) || value['uploadToken'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function CompleteUploadRequestFromJSON(json) {
|
|
32
|
+
return CompleteUploadRequestFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function CompleteUploadRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'uploadToken': json['upload_token'],
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function CompleteUploadRequestToJSON(json) {
|
|
43
|
+
return CompleteUploadRequestToJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function CompleteUploadRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
46
|
+
if (value == null) {
|
|
47
|
+
return value;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'upload_token': value['uploadToken'],
|
|
51
|
+
};
|
|
52
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
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
|
+
/**
|
|
13
|
+
* Begin a resumable upload.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateUploadRequest
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateUploadRequest {
|
|
18
|
+
/**
|
|
19
|
+
* Parent folder path part ID (FOLDER)
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateUploadRequest
|
|
22
|
+
*/
|
|
23
|
+
parentPathId: string;
|
|
24
|
+
/**
|
|
25
|
+
* Document name
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateUploadRequest
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
* Original filename; its extension selects the type + size cap
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateUploadRequest
|
|
34
|
+
*/
|
|
35
|
+
filename: string;
|
|
36
|
+
/**
|
|
37
|
+
* Declared total size; fast-rejected against the type cap
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof CreateUploadRequest
|
|
40
|
+
*/
|
|
41
|
+
sizeBytes: number;
|
|
42
|
+
}
|
|
43
|
+
export declare const CreateUploadRequestPropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
exclusiveMaximum?: boolean;
|
|
50
|
+
minimum?: number;
|
|
51
|
+
exclusiveMinimum?: boolean;
|
|
52
|
+
multipleOf?: number;
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
uniqueItems?: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the CreateUploadRequest interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfCreateUploadRequest(value: object): value is CreateUploadRequest;
|
|
62
|
+
export declare function CreateUploadRequestFromJSON(json: any): CreateUploadRequest;
|
|
63
|
+
export declare function CreateUploadRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUploadRequest;
|
|
64
|
+
export declare function CreateUploadRequestToJSON(json: any): CreateUploadRequest;
|
|
65
|
+
export declare function CreateUploadRequestToJSONTyped(value?: CreateUploadRequest | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
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.CreateUploadRequestPropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfCreateUploadRequest = instanceOfCreateUploadRequest;
|
|
18
|
+
exports.CreateUploadRequestFromJSON = CreateUploadRequestFromJSON;
|
|
19
|
+
exports.CreateUploadRequestFromJSONTyped = CreateUploadRequestFromJSONTyped;
|
|
20
|
+
exports.CreateUploadRequestToJSON = CreateUploadRequestToJSON;
|
|
21
|
+
exports.CreateUploadRequestToJSONTyped = CreateUploadRequestToJSONTyped;
|
|
22
|
+
exports.CreateUploadRequestPropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the CreateUploadRequest interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfCreateUploadRequest(value) {
|
|
27
|
+
if (!('parentPathId' in value) || value['parentPathId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('filename' in value) || value['filename'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('sizeBytes' in value) || value['sizeBytes'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function CreateUploadRequestFromJSON(json) {
|
|
38
|
+
return CreateUploadRequestFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function CreateUploadRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'parentPathId': json['parent_path_id'],
|
|
46
|
+
'name': json['name'],
|
|
47
|
+
'filename': json['filename'],
|
|
48
|
+
'sizeBytes': json['size_bytes'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function CreateUploadRequestToJSON(json) {
|
|
52
|
+
return CreateUploadRequestToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function CreateUploadRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'parent_path_id': value['parentPathId'],
|
|
60
|
+
'name': value['name'],
|
|
61
|
+
'filename': value['filename'],
|
|
62
|
+
'size_bytes': value['sizeBytes'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
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
|
+
/**
|
|
13
|
+
* Handles for a started resumable upload.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CreateUploadResponse
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateUploadResponse {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CreateUploadResponse
|
|
22
|
+
*/
|
|
23
|
+
documentId: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CreateUploadResponse
|
|
28
|
+
*/
|
|
29
|
+
documentVersionId: string;
|
|
30
|
+
/**
|
|
31
|
+
* Opaque token; return it on every part/status/complete/abort
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CreateUploadResponse
|
|
34
|
+
*/
|
|
35
|
+
uploadToken: string;
|
|
36
|
+
/**
|
|
37
|
+
* Recommended part size in bytes; every part except the last must be at least 5 MiB
|
|
38
|
+
* @type {number}
|
|
39
|
+
* @memberof CreateUploadResponse
|
|
40
|
+
*/
|
|
41
|
+
partSize: number;
|
|
42
|
+
}
|
|
43
|
+
export declare const CreateUploadResponsePropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number;
|
|
46
|
+
minLength?: number;
|
|
47
|
+
pattern?: string;
|
|
48
|
+
maximum?: number;
|
|
49
|
+
exclusiveMaximum?: boolean;
|
|
50
|
+
minimum?: number;
|
|
51
|
+
exclusiveMinimum?: boolean;
|
|
52
|
+
multipleOf?: number;
|
|
53
|
+
maxItems?: number;
|
|
54
|
+
minItems?: number;
|
|
55
|
+
uniqueItems?: boolean;
|
|
56
|
+
};
|
|
57
|
+
};
|
|
58
|
+
/**
|
|
59
|
+
* Check if a given object implements the CreateUploadResponse interface.
|
|
60
|
+
*/
|
|
61
|
+
export declare function instanceOfCreateUploadResponse(value: object): value is CreateUploadResponse;
|
|
62
|
+
export declare function CreateUploadResponseFromJSON(json: any): CreateUploadResponse;
|
|
63
|
+
export declare function CreateUploadResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): CreateUploadResponse;
|
|
64
|
+
export declare function CreateUploadResponseToJSON(json: any): CreateUploadResponse;
|
|
65
|
+
export declare function CreateUploadResponseToJSONTyped(value?: CreateUploadResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
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.CreateUploadResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfCreateUploadResponse = instanceOfCreateUploadResponse;
|
|
18
|
+
exports.CreateUploadResponseFromJSON = CreateUploadResponseFromJSON;
|
|
19
|
+
exports.CreateUploadResponseFromJSONTyped = CreateUploadResponseFromJSONTyped;
|
|
20
|
+
exports.CreateUploadResponseToJSON = CreateUploadResponseToJSON;
|
|
21
|
+
exports.CreateUploadResponseToJSONTyped = CreateUploadResponseToJSONTyped;
|
|
22
|
+
exports.CreateUploadResponsePropertyValidationAttributesMap = {};
|
|
23
|
+
/**
|
|
24
|
+
* Check if a given object implements the CreateUploadResponse interface.
|
|
25
|
+
*/
|
|
26
|
+
function instanceOfCreateUploadResponse(value) {
|
|
27
|
+
if (!('documentId' in value) || value['documentId'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
if (!('documentVersionId' in value) || value['documentVersionId'] === undefined)
|
|
30
|
+
return false;
|
|
31
|
+
if (!('uploadToken' in value) || value['uploadToken'] === undefined)
|
|
32
|
+
return false;
|
|
33
|
+
if (!('partSize' in value) || value['partSize'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
return true;
|
|
36
|
+
}
|
|
37
|
+
function CreateUploadResponseFromJSON(json) {
|
|
38
|
+
return CreateUploadResponseFromJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
function CreateUploadResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
41
|
+
if (json == null) {
|
|
42
|
+
return json;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'documentId': json['document_id'],
|
|
46
|
+
'documentVersionId': json['document_version_id'],
|
|
47
|
+
'uploadToken': json['upload_token'],
|
|
48
|
+
'partSize': json['part_size'],
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
function CreateUploadResponseToJSON(json) {
|
|
52
|
+
return CreateUploadResponseToJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function CreateUploadResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
55
|
+
if (value == null) {
|
|
56
|
+
return value;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'document_id': value['documentId'],
|
|
60
|
+
'document_version_id': value['documentVersionId'],
|
|
61
|
+
'upload_token': value['uploadToken'],
|
|
62
|
+
'part_size': value['partSize'],
|
|
63
|
+
};
|
|
64
|
+
}
|
|
@@ -24,6 +24,8 @@ export declare const DocumentType: {
|
|
|
24
24
|
readonly Json: 'JSON';
|
|
25
25
|
readonly Yaml: 'YAML';
|
|
26
26
|
readonly Code: 'CODE';
|
|
27
|
+
readonly Audio: 'AUDIO';
|
|
28
|
+
readonly Video: 'VIDEO';
|
|
27
29
|
readonly Unknown: 'UNKNOWN';
|
|
28
30
|
};
|
|
29
31
|
export type DocumentType = typeof DocumentType[keyof typeof DocumentType];
|
|
@@ -39,6 +39,18 @@ export interface EnrichedCitation {
|
|
|
39
39
|
* @memberof EnrichedCitation
|
|
40
40
|
*/
|
|
41
41
|
length: number;
|
|
42
|
+
/**
|
|
43
|
+
* Start time (ms) of the cited chunk in the source media, for AUDIO/VIDEO — lets the client deep-link playback to the moment. None for non-media chunks.
|
|
44
|
+
* @type {number}
|
|
45
|
+
* @memberof EnrichedCitation
|
|
46
|
+
*/
|
|
47
|
+
startMs?: number | null;
|
|
48
|
+
/**
|
|
49
|
+
* End time (ms) of the cited chunk in the source media (AUDIO/VIDEO); None for non-media chunks.
|
|
50
|
+
* @type {number}
|
|
51
|
+
* @memberof EnrichedCitation
|
|
52
|
+
*/
|
|
53
|
+
endMs?: number | null;
|
|
42
54
|
/**
|
|
43
55
|
*
|
|
44
56
|
* @type {string}
|
|
@@ -51,6 +51,8 @@ function EnrichedCitationFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'quote': json['quote'],
|
|
52
52
|
'startChar': json['start_char'],
|
|
53
53
|
'length': json['length'],
|
|
54
|
+
'startMs': json['start_ms'] == null ? undefined : json['start_ms'],
|
|
55
|
+
'endMs': json['end_ms'] == null ? undefined : json['end_ms'],
|
|
54
56
|
'documentId': json['document_id'] == null ? undefined : json['document_id'],
|
|
55
57
|
'documentVersionId': json['document_version_id'] == null ? undefined : json['document_version_id'],
|
|
56
58
|
'documentName': json['document_name'] == null ? undefined : json['document_name'],
|
|
@@ -71,6 +73,8 @@ function EnrichedCitationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
71
73
|
'quote': value['quote'],
|
|
72
74
|
'start_char': value['startChar'],
|
|
73
75
|
'length': value['length'],
|
|
76
|
+
'start_ms': value['startMs'],
|
|
77
|
+
'end_ms': value['endMs'],
|
|
74
78
|
'document_id': value['documentId'],
|
|
75
79
|
'document_version_id': value['documentVersionId'],
|
|
76
80
|
'document_name': value['documentName'],
|
|
@@ -17,6 +17,7 @@ export declare const IngestionMode: {
|
|
|
17
17
|
readonly HighAccuracy: 'high_accuracy';
|
|
18
18
|
readonly Standard: 'standard';
|
|
19
19
|
readonly SingleChunk: 'single_chunk';
|
|
20
|
+
readonly Media: 'media';
|
|
20
21
|
};
|
|
21
22
|
export type IngestionMode = typeof IngestionMode[keyof typeof IngestionMode];
|
|
22
23
|
export declare function instanceOfIngestionMode(value: any): boolean;
|