@knowledge-stack/ksapi 3.3.1 → 3.5.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 +2 -0
- package/README.md +3 -2
- package/dist/apis/WorkflowDefinitionsApi.d.ts +3 -0
- package/dist/apis/WorkflowDefinitionsApi.js +3 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.d.ts +3 -0
- package/dist/esm/apis/WorkflowDefinitionsApi.js +3 -0
- package/dist/esm/models/UpdateDataSourceRequest.d.ts +4 -4
- package/dist/esm/models/UpdateDataSourceRequest.js +3 -3
- package/dist/esm/models/YidingConfigChange.d.ts +53 -0
- package/dist/esm/models/YidingConfigChange.js +48 -0
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/UpdateDataSourceRequest.d.ts +4 -4
- package/dist/models/UpdateDataSourceRequest.js +3 -3
- package/dist/models/YidingConfigChange.d.ts +53 -0
- package/dist/models/YidingConfigChange.js +56 -0
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/UpdateDataSourceRequest.md +1 -1
- package/docs/WorkflowDefinitionsApi.md +4 -1
- package/docs/YidingConfigChange.md +36 -0
- package/package.json +1 -1
- package/src/apis/WorkflowDefinitionsApi.ts +7 -0
- package/src/models/UpdateDataSourceRequest.ts +11 -11
- package/src/models/YidingConfigChange.ts +93 -0
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -441,6 +441,7 @@ docs/XlsxCellAnchorInputOrDocxParagraphAnchorInput.md
|
|
|
441
441
|
docs/XlsxCellAnchorOutput.md
|
|
442
442
|
docs/XlsxCellAnchorOutputOrDocxParagraphAnchorOutput.md
|
|
443
443
|
docs/YidingConfig.md
|
|
444
|
+
docs/YidingConfigChange.md
|
|
444
445
|
docs/YidingCursor.md
|
|
445
446
|
docs/ZipFileResult.md
|
|
446
447
|
docs/ZipIngestionStatusResponse.md
|
|
@@ -887,6 +888,7 @@ src/models/XlsxCellAnchorInputOrDocxParagraphAnchorInput.ts
|
|
|
887
888
|
src/models/XlsxCellAnchorOutput.ts
|
|
888
889
|
src/models/XlsxCellAnchorOutputOrDocxParagraphAnchorOutput.ts
|
|
889
890
|
src/models/YidingConfig.ts
|
|
891
|
+
src/models/YidingConfigChange.ts
|
|
890
892
|
src/models/YidingCursor.ts
|
|
891
893
|
src/models/ZipFileResult.ts
|
|
892
894
|
src/models/ZipIngestionStatusResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@3.
|
|
1
|
+
# @knowledge-stack/ksapi@3.5.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -703,6 +703,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
703
703
|
- [XlsxCellAnchorOutput](docs/XlsxCellAnchorOutput.md)
|
|
704
704
|
- [XlsxCellAnchorOutputOrDocxParagraphAnchorOutput](docs/XlsxCellAnchorOutputOrDocxParagraphAnchorOutput.md)
|
|
705
705
|
- [YidingConfig](docs/YidingConfig.md)
|
|
706
|
+
- [YidingConfigChange](docs/YidingConfigChange.md)
|
|
706
707
|
- [YidingCursor](docs/YidingCursor.md)
|
|
707
708
|
- [ZipFileResult](docs/ZipFileResult.md)
|
|
708
709
|
- [ZipIngestionStatusResponse](docs/ZipIngestionStatusResponse.md)
|
|
@@ -732,7 +733,7 @@ and is automatically generated by the
|
|
|
732
733
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
733
734
|
|
|
734
735
|
- API version: `0.1.0`
|
|
735
|
-
- Package version: `3.
|
|
736
|
+
- Package version: `3.5.0`
|
|
736
737
|
- Generator version: `7.21.0`
|
|
737
738
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
738
739
|
|
|
@@ -40,6 +40,7 @@ export interface ListWorkflowDefinitionsRequest {
|
|
|
40
40
|
sortBy?: WorkflowDefinitionOrder;
|
|
41
41
|
sortDir?: SortDirection;
|
|
42
42
|
isTemplate?: boolean;
|
|
43
|
+
needsApproval?: boolean;
|
|
43
44
|
limit?: number;
|
|
44
45
|
offset?: number;
|
|
45
46
|
createdAfter?: Date | null;
|
|
@@ -195,6 +196,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
195
196
|
* @param {WorkflowDefinitionOrder} [sortBy] Field to sort definitions by (default: CREATED_AT)
|
|
196
197
|
* @param {SortDirection} [sortDir] Sort direction; overrides the field\'s natural default
|
|
197
198
|
* @param {boolean} [isTemplate]
|
|
199
|
+
* @param {boolean} [needsApproval] Only definitions with a run awaiting approval.
|
|
198
200
|
* @param {number} [limit] Number of items per page
|
|
199
201
|
* @param {number} [offset] Number of items to skip
|
|
200
202
|
* @param {Date} [createdAfter] Only items created at or after this timestamp (inclusive)
|
|
@@ -215,6 +217,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
215
217
|
* @param {WorkflowDefinitionOrder} [sortBy] Field to sort definitions by (default: CREATED_AT)
|
|
216
218
|
* @param {SortDirection} [sortDir] Sort direction; overrides the field\'s natural default
|
|
217
219
|
* @param {boolean} [isTemplate]
|
|
220
|
+
* @param {boolean} [needsApproval] Only definitions with a run awaiting approval.
|
|
218
221
|
* @param {number} [limit] Number of items per page
|
|
219
222
|
* @param {number} [offset] Number of items to skip
|
|
220
223
|
* @param {Date} [createdAfter] Only items created at or after this timestamp (inclusive)
|
|
@@ -359,6 +359,9 @@ class WorkflowDefinitionsApi extends runtime.BaseAPI {
|
|
|
359
359
|
if (requestParameters['isTemplate'] != null) {
|
|
360
360
|
queryParameters['is_template'] = requestParameters['isTemplate'];
|
|
361
361
|
}
|
|
362
|
+
if (requestParameters['needsApproval'] != null) {
|
|
363
|
+
queryParameters['needs_approval'] = requestParameters['needsApproval'];
|
|
364
|
+
}
|
|
362
365
|
if (requestParameters['limit'] != null) {
|
|
363
366
|
queryParameters['limit'] = requestParameters['limit'];
|
|
364
367
|
}
|
|
@@ -40,6 +40,7 @@ export interface ListWorkflowDefinitionsRequest {
|
|
|
40
40
|
sortBy?: WorkflowDefinitionOrder;
|
|
41
41
|
sortDir?: SortDirection;
|
|
42
42
|
isTemplate?: boolean;
|
|
43
|
+
needsApproval?: boolean;
|
|
43
44
|
limit?: number;
|
|
44
45
|
offset?: number;
|
|
45
46
|
createdAfter?: Date | null;
|
|
@@ -195,6 +196,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
195
196
|
* @param {WorkflowDefinitionOrder} [sortBy] Field to sort definitions by (default: CREATED_AT)
|
|
196
197
|
* @param {SortDirection} [sortDir] Sort direction; overrides the field\'s natural default
|
|
197
198
|
* @param {boolean} [isTemplate]
|
|
199
|
+
* @param {boolean} [needsApproval] Only definitions with a run awaiting approval.
|
|
198
200
|
* @param {number} [limit] Number of items per page
|
|
199
201
|
* @param {number} [offset] Number of items to skip
|
|
200
202
|
* @param {Date} [createdAfter] Only items created at or after this timestamp (inclusive)
|
|
@@ -215,6 +217,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
215
217
|
* @param {WorkflowDefinitionOrder} [sortBy] Field to sort definitions by (default: CREATED_AT)
|
|
216
218
|
* @param {SortDirection} [sortDir] Sort direction; overrides the field\'s natural default
|
|
217
219
|
* @param {boolean} [isTemplate]
|
|
220
|
+
* @param {boolean} [needsApproval] Only definitions with a run awaiting approval.
|
|
218
221
|
* @param {number} [limit] Number of items per page
|
|
219
222
|
* @param {number} [offset] Number of items to skip
|
|
220
223
|
* @param {Date} [createdAfter] Only items created at or after this timestamp (inclusive)
|
|
@@ -323,6 +323,9 @@ export class WorkflowDefinitionsApi extends runtime.BaseAPI {
|
|
|
323
323
|
if (requestParameters['isTemplate'] != null) {
|
|
324
324
|
queryParameters['is_template'] = requestParameters['isTemplate'];
|
|
325
325
|
}
|
|
326
|
+
if (requestParameters['needsApproval'] != null) {
|
|
327
|
+
queryParameters['needs_approval'] = requestParameters['needsApproval'];
|
|
328
|
+
}
|
|
326
329
|
if (requestParameters['limit'] != null) {
|
|
327
330
|
queryParameters['limit'] = requestParameters['limit'];
|
|
328
331
|
}
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { YidingConfigChange } from './YidingConfigChange';
|
|
13
13
|
import type { YidingCursor } from './YidingCursor';
|
|
14
14
|
import type { ConnectionConfig } from './ConnectionConfig';
|
|
15
15
|
/**
|
|
@@ -45,11 +45,11 @@ export interface UpdateDataSourceRequest {
|
|
|
45
45
|
*/
|
|
46
46
|
connectionConfig?: ConnectionConfig | null;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {
|
|
48
|
+
* What a YIDINGSYNC connector's crawler config may still change: the panel password and the crawl recurrence, each optional and each merged into the stored config rather than replacing it. Which shop and from when are fixed at creation. Rejected on a DIRECT connector. Changing ``cron`` re-arms the schedule. connection_config stays server-managed for YIDINGSYNC.
|
|
49
|
+
* @type {YidingConfigChange}
|
|
50
50
|
* @memberof UpdateDataSourceRequest
|
|
51
51
|
*/
|
|
52
|
-
sourceConfig?:
|
|
52
|
+
sourceConfig?: YidingConfigChange | null;
|
|
53
53
|
/**
|
|
54
54
|
* The crawl cursor, replaced whole. Written by the sync itself (the worker acts as the connector's owner) after each batch, so it records what has already been read. Moving it forward by hand makes the next run skip those days for good — the increment only re-scans what the cursor points at.
|
|
55
55
|
* @type {YidingCursor}
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
import {
|
|
14
|
+
import { YidingConfigChangeFromJSON, YidingConfigChangeToJSON, } from './YidingConfigChange';
|
|
15
15
|
import { YidingCursorFromJSON, YidingCursorToJSON, } from './YidingCursor';
|
|
16
16
|
import { ConnectionConfigFromJSON, ConnectionConfigToJSON, } from './ConnectionConfig';
|
|
17
17
|
export const UpdateDataSourceRequestPropertyValidationAttributesMap = {
|
|
@@ -37,7 +37,7 @@ export function UpdateDataSourceRequestFromJSONTyped(json, ignoreDiscriminator)
|
|
|
37
37
|
'name': json['name'] == null ? undefined : json['name'],
|
|
38
38
|
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
39
39
|
'connectionConfig': json['connection_config'] == null ? undefined : ConnectionConfigFromJSON(json['connection_config']),
|
|
40
|
-
'sourceConfig': json['source_config'] == null ? undefined :
|
|
40
|
+
'sourceConfig': json['source_config'] == null ? undefined : YidingConfigChangeFromJSON(json['source_config']),
|
|
41
41
|
'syncState': json['sync_state'] == null ? undefined : YidingCursorFromJSON(json['sync_state']),
|
|
42
42
|
};
|
|
43
43
|
}
|
|
@@ -52,7 +52,7 @@ export function UpdateDataSourceRequestToJSONTyped(value, ignoreDiscriminator =
|
|
|
52
52
|
'name': value['name'],
|
|
53
53
|
'parent_path_part_id': value['parentPathPartId'],
|
|
54
54
|
'connection_config': ConnectionConfigToJSON(value['connectionConfig']),
|
|
55
|
-
'source_config':
|
|
55
|
+
'source_config': YidingConfigChangeToJSON(value['sourceConfig']),
|
|
56
56
|
'sync_state': YidingCursorToJSON(value['syncState']),
|
|
57
57
|
};
|
|
58
58
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface YidingConfigChange
|
|
16
|
+
*/
|
|
17
|
+
export interface YidingConfigChange {
|
|
18
|
+
/**
|
|
19
|
+
* Crawl recurrence, in the tenant's timezone
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof YidingConfigChange
|
|
22
|
+
*/
|
|
23
|
+
cron?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Write-only: omit it to keep the stored one
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof YidingConfigChange
|
|
28
|
+
*/
|
|
29
|
+
password?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare const YidingConfigChangePropertyValidationAttributesMap: {
|
|
32
|
+
[property: string]: {
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
minLength?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
maximum?: number;
|
|
37
|
+
exclusiveMaximum?: boolean;
|
|
38
|
+
minimum?: number;
|
|
39
|
+
exclusiveMinimum?: boolean;
|
|
40
|
+
multipleOf?: number;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the YidingConfigChange interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfYidingConfigChange(value: object): value is YidingConfigChange;
|
|
50
|
+
export declare function YidingConfigChangeFromJSON(json: any): YidingConfigChange;
|
|
51
|
+
export declare function YidingConfigChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): YidingConfigChange;
|
|
52
|
+
export declare function YidingConfigChangeToJSON(json: any): YidingConfigChange;
|
|
53
|
+
export declare function YidingConfigChangeToJSONTyped(value?: YidingConfigChange | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
export const YidingConfigChangePropertyValidationAttributesMap = {
|
|
15
|
+
password: {
|
|
16
|
+
minLength: 1,
|
|
17
|
+
},
|
|
18
|
+
};
|
|
19
|
+
/**
|
|
20
|
+
* Check if a given object implements the YidingConfigChange interface.
|
|
21
|
+
*/
|
|
22
|
+
export function instanceOfYidingConfigChange(value) {
|
|
23
|
+
return true;
|
|
24
|
+
}
|
|
25
|
+
export function YidingConfigChangeFromJSON(json) {
|
|
26
|
+
return YidingConfigChangeFromJSONTyped(json, false);
|
|
27
|
+
}
|
|
28
|
+
export function YidingConfigChangeFromJSONTyped(json, ignoreDiscriminator) {
|
|
29
|
+
if (json == null) {
|
|
30
|
+
return json;
|
|
31
|
+
}
|
|
32
|
+
return {
|
|
33
|
+
'cron': json['cron'] == null ? undefined : json['cron'],
|
|
34
|
+
'password': json['password'] == null ? undefined : json['password'],
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export function YidingConfigChangeToJSON(json) {
|
|
38
|
+
return YidingConfigChangeToJSONTyped(json, false);
|
|
39
|
+
}
|
|
40
|
+
export function YidingConfigChangeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
41
|
+
if (value == null) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
44
|
+
return {
|
|
45
|
+
'cron': value['cron'],
|
|
46
|
+
'password': value['password'],
|
|
47
|
+
};
|
|
48
|
+
}
|
|
@@ -395,6 +395,7 @@ export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
|
395
395
|
export * from './XlsxCellAnchorOutput';
|
|
396
396
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
397
397
|
export * from './YidingConfig';
|
|
398
|
+
export * from './YidingConfigChange';
|
|
398
399
|
export * from './YidingCursor';
|
|
399
400
|
export * from './ZipFileResult';
|
|
400
401
|
export * from './ZipIngestionStatusResponse';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -397,6 +397,7 @@ export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
|
397
397
|
export * from './XlsxCellAnchorOutput';
|
|
398
398
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
399
399
|
export * from './YidingConfig';
|
|
400
|
+
export * from './YidingConfigChange';
|
|
400
401
|
export * from './YidingCursor';
|
|
401
402
|
export * from './ZipFileResult';
|
|
402
403
|
export * from './ZipIngestionStatusResponse';
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
-
import type {
|
|
12
|
+
import type { YidingConfigChange } from './YidingConfigChange';
|
|
13
13
|
import type { YidingCursor } from './YidingCursor';
|
|
14
14
|
import type { ConnectionConfig } from './ConnectionConfig';
|
|
15
15
|
/**
|
|
@@ -45,11 +45,11 @@ export interface UpdateDataSourceRequest {
|
|
|
45
45
|
*/
|
|
46
46
|
connectionConfig?: ConnectionConfig | null;
|
|
47
47
|
/**
|
|
48
|
-
*
|
|
49
|
-
* @type {
|
|
48
|
+
* What a YIDINGSYNC connector's crawler config may still change: the panel password and the crawl recurrence, each optional and each merged into the stored config rather than replacing it. Which shop and from when are fixed at creation. Rejected on a DIRECT connector. Changing ``cron`` re-arms the schedule. connection_config stays server-managed for YIDINGSYNC.
|
|
49
|
+
* @type {YidingConfigChange}
|
|
50
50
|
* @memberof UpdateDataSourceRequest
|
|
51
51
|
*/
|
|
52
|
-
sourceConfig?:
|
|
52
|
+
sourceConfig?: YidingConfigChange | null;
|
|
53
53
|
/**
|
|
54
54
|
* The crawl cursor, replaced whole. Written by the sync itself (the worker acts as the connector's owner) after each batch, so it records what has already been read. Moving it forward by hand makes the next run skip those days for good — the increment only re-scans what the cursor points at.
|
|
55
55
|
* @type {YidingCursor}
|
|
@@ -19,7 +19,7 @@ exports.UpdateDataSourceRequestFromJSON = UpdateDataSourceRequestFromJSON;
|
|
|
19
19
|
exports.UpdateDataSourceRequestFromJSONTyped = UpdateDataSourceRequestFromJSONTyped;
|
|
20
20
|
exports.UpdateDataSourceRequestToJSON = UpdateDataSourceRequestToJSON;
|
|
21
21
|
exports.UpdateDataSourceRequestToJSONTyped = UpdateDataSourceRequestToJSONTyped;
|
|
22
|
-
const
|
|
22
|
+
const YidingConfigChange_1 = require("./YidingConfigChange");
|
|
23
23
|
const YidingCursor_1 = require("./YidingCursor");
|
|
24
24
|
const ConnectionConfig_1 = require("./ConnectionConfig");
|
|
25
25
|
exports.UpdateDataSourceRequestPropertyValidationAttributesMap = {
|
|
@@ -45,7 +45,7 @@ function UpdateDataSourceRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
45
45
|
'name': json['name'] == null ? undefined : json['name'],
|
|
46
46
|
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
47
47
|
'connectionConfig': json['connection_config'] == null ? undefined : (0, ConnectionConfig_1.ConnectionConfigFromJSON)(json['connection_config']),
|
|
48
|
-
'sourceConfig': json['source_config'] == null ? undefined : (0,
|
|
48
|
+
'sourceConfig': json['source_config'] == null ? undefined : (0, YidingConfigChange_1.YidingConfigChangeFromJSON)(json['source_config']),
|
|
49
49
|
'syncState': json['sync_state'] == null ? undefined : (0, YidingCursor_1.YidingCursorFromJSON)(json['sync_state']),
|
|
50
50
|
};
|
|
51
51
|
}
|
|
@@ -60,7 +60,7 @@ function UpdateDataSourceRequestToJSONTyped(value, ignoreDiscriminator = false)
|
|
|
60
60
|
'name': value['name'],
|
|
61
61
|
'parent_path_part_id': value['parentPathPartId'],
|
|
62
62
|
'connection_config': (0, ConnectionConfig_1.ConnectionConfigToJSON)(value['connectionConfig']),
|
|
63
|
-
'source_config': (0,
|
|
63
|
+
'source_config': (0, YidingConfigChange_1.YidingConfigChangeToJSON)(value['sourceConfig']),
|
|
64
64
|
'sync_state': (0, YidingCursor_1.YidingCursorToJSON)(value['syncState']),
|
|
65
65
|
};
|
|
66
66
|
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface YidingConfigChange
|
|
16
|
+
*/
|
|
17
|
+
export interface YidingConfigChange {
|
|
18
|
+
/**
|
|
19
|
+
* Crawl recurrence, in the tenant's timezone
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof YidingConfigChange
|
|
22
|
+
*/
|
|
23
|
+
cron?: string | null;
|
|
24
|
+
/**
|
|
25
|
+
* Write-only: omit it to keep the stored one
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof YidingConfigChange
|
|
28
|
+
*/
|
|
29
|
+
password?: string | null;
|
|
30
|
+
}
|
|
31
|
+
export declare const YidingConfigChangePropertyValidationAttributesMap: {
|
|
32
|
+
[property: string]: {
|
|
33
|
+
maxLength?: number;
|
|
34
|
+
minLength?: number;
|
|
35
|
+
pattern?: string;
|
|
36
|
+
maximum?: number;
|
|
37
|
+
exclusiveMaximum?: boolean;
|
|
38
|
+
minimum?: number;
|
|
39
|
+
exclusiveMinimum?: boolean;
|
|
40
|
+
multipleOf?: number;
|
|
41
|
+
maxItems?: number;
|
|
42
|
+
minItems?: number;
|
|
43
|
+
uniqueItems?: boolean;
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
/**
|
|
47
|
+
* Check if a given object implements the YidingConfigChange interface.
|
|
48
|
+
*/
|
|
49
|
+
export declare function instanceOfYidingConfigChange(value: object): value is YidingConfigChange;
|
|
50
|
+
export declare function YidingConfigChangeFromJSON(json: any): YidingConfigChange;
|
|
51
|
+
export declare function YidingConfigChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): YidingConfigChange;
|
|
52
|
+
export declare function YidingConfigChangeToJSON(json: any): YidingConfigChange;
|
|
53
|
+
export declare function YidingConfigChangeToJSONTyped(value?: YidingConfigChange | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
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.YidingConfigChangePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfYidingConfigChange = instanceOfYidingConfigChange;
|
|
18
|
+
exports.YidingConfigChangeFromJSON = YidingConfigChangeFromJSON;
|
|
19
|
+
exports.YidingConfigChangeFromJSONTyped = YidingConfigChangeFromJSONTyped;
|
|
20
|
+
exports.YidingConfigChangeToJSON = YidingConfigChangeToJSON;
|
|
21
|
+
exports.YidingConfigChangeToJSONTyped = YidingConfigChangeToJSONTyped;
|
|
22
|
+
exports.YidingConfigChangePropertyValidationAttributesMap = {
|
|
23
|
+
password: {
|
|
24
|
+
minLength: 1,
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
/**
|
|
28
|
+
* Check if a given object implements the YidingConfigChange interface.
|
|
29
|
+
*/
|
|
30
|
+
function instanceOfYidingConfigChange(value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
function YidingConfigChangeFromJSON(json) {
|
|
34
|
+
return YidingConfigChangeFromJSONTyped(json, false);
|
|
35
|
+
}
|
|
36
|
+
function YidingConfigChangeFromJSONTyped(json, ignoreDiscriminator) {
|
|
37
|
+
if (json == null) {
|
|
38
|
+
return json;
|
|
39
|
+
}
|
|
40
|
+
return {
|
|
41
|
+
'cron': json['cron'] == null ? undefined : json['cron'],
|
|
42
|
+
'password': json['password'] == null ? undefined : json['password'],
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
function YidingConfigChangeToJSON(json) {
|
|
46
|
+
return YidingConfigChangeToJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
function YidingConfigChangeToJSONTyped(value, ignoreDiscriminator = false) {
|
|
49
|
+
if (value == null) {
|
|
50
|
+
return value;
|
|
51
|
+
}
|
|
52
|
+
return {
|
|
53
|
+
'cron': value['cron'],
|
|
54
|
+
'password': value['password'],
|
|
55
|
+
};
|
|
56
|
+
}
|
package/dist/models/index.d.ts
CHANGED
|
@@ -395,6 +395,7 @@ export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
|
395
395
|
export * from './XlsxCellAnchorOutput';
|
|
396
396
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
397
397
|
export * from './YidingConfig';
|
|
398
|
+
export * from './YidingConfigChange';
|
|
398
399
|
export * from './YidingCursor';
|
|
399
400
|
export * from './ZipFileResult';
|
|
400
401
|
export * from './ZipIngestionStatusResponse';
|
package/dist/models/index.js
CHANGED
|
@@ -413,6 +413,7 @@ __exportStar(require("./XlsxCellAnchorInputOrDocxParagraphAnchorInput"), exports
|
|
|
413
413
|
__exportStar(require("./XlsxCellAnchorOutput"), exports);
|
|
414
414
|
__exportStar(require("./XlsxCellAnchorOutputOrDocxParagraphAnchorOutput"), exports);
|
|
415
415
|
__exportStar(require("./YidingConfig"), exports);
|
|
416
|
+
__exportStar(require("./YidingConfigChange"), exports);
|
|
416
417
|
__exportStar(require("./YidingCursor"), exports);
|
|
417
418
|
__exportStar(require("./ZipFileResult"), exports);
|
|
418
419
|
__exportStar(require("./ZipIngestionStatusResponse"), exports);
|
|
@@ -10,7 +10,7 @@ Name | Type
|
|
|
10
10
|
`name` | string
|
|
11
11
|
`parentPathPartId` | string
|
|
12
12
|
`connectionConfig` | [ConnectionConfig](ConnectionConfig.md)
|
|
13
|
-
`sourceConfig` | [
|
|
13
|
+
`sourceConfig` | [YidingConfigChange](YidingConfigChange.md)
|
|
14
14
|
`syncState` | [YidingCursor](YidingCursor.md)
|
|
15
15
|
|
|
16
16
|
## Example
|
|
@@ -408,7 +408,7 @@ example().catch(console.error);
|
|
|
408
408
|
|
|
409
409
|
## listWorkflowDefinitions
|
|
410
410
|
|
|
411
|
-
> PaginatedResponseWorkflowDefinitionResponse listWorkflowDefinitions(mine, search, sortBy, sortDir, isTemplate, limit, offset, createdAfter, createdBefore, updatedAfter, updatedBefore, includeTagIds, excludeTagIds)
|
|
411
|
+
> PaginatedResponseWorkflowDefinitionResponse listWorkflowDefinitions(mine, search, sortBy, sortDir, isTemplate, needsApproval, limit, offset, createdAfter, createdBefore, updatedAfter, updatedBefore, includeTagIds, excludeTagIds)
|
|
412
412
|
|
|
413
413
|
List Workflow Definitions Handler
|
|
414
414
|
|
|
@@ -442,6 +442,8 @@ async function example() {
|
|
|
442
442
|
sortDir: ...,
|
|
443
443
|
// boolean (optional)
|
|
444
444
|
isTemplate: true,
|
|
445
|
+
// boolean | Only definitions with a run awaiting approval. (optional)
|
|
446
|
+
needsApproval: true,
|
|
445
447
|
// number | Number of items per page (optional)
|
|
446
448
|
limit: 56,
|
|
447
449
|
// number | Number of items to skip (optional)
|
|
@@ -482,6 +484,7 @@ example().catch(console.error);
|
|
|
482
484
|
| **sortBy** | `WorkflowDefinitionOrder` | Field to sort definitions by (default: CREATED_AT) | [Optional] [Defaults to `undefined`] [Enum: CREATED_AT, UPDATED_AT, NAME] |
|
|
483
485
|
| **sortDir** | `SortDirection` | Sort direction; overrides the field\'s natural default | [Optional] [Defaults to `undefined`] [Enum: ASC, DESC] |
|
|
484
486
|
| **isTemplate** | `boolean` | | [Optional] [Defaults to `false`] |
|
|
487
|
+
| **needsApproval** | `boolean` | Only definitions with a run awaiting approval. | [Optional] [Defaults to `false`] |
|
|
485
488
|
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
486
489
|
| **offset** | `number` | Number of items to skip | [Optional] [Defaults to `0`] |
|
|
487
490
|
| **createdAfter** | `Date` | Only items created at or after this timestamp (inclusive) | [Optional] [Defaults to `undefined`] |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# YidingConfigChange
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`cron` | string
|
|
10
|
+
`password` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { YidingConfigChange } from '@knowledge-stack/ksapi'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"cron": null,
|
|
20
|
+
"password": null,
|
|
21
|
+
} satisfies YidingConfigChange
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as YidingConfigChange
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
package/package.json
CHANGED
|
@@ -89,6 +89,7 @@ export interface ListWorkflowDefinitionsRequest {
|
|
|
89
89
|
sortBy?: WorkflowDefinitionOrder;
|
|
90
90
|
sortDir?: SortDirection;
|
|
91
91
|
isTemplate?: boolean;
|
|
92
|
+
needsApproval?: boolean;
|
|
92
93
|
limit?: number;
|
|
93
94
|
offset?: number;
|
|
94
95
|
createdAfter?: Date | null;
|
|
@@ -262,6 +263,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
262
263
|
* @param {WorkflowDefinitionOrder} [sortBy] Field to sort definitions by (default: CREATED_AT)
|
|
263
264
|
* @param {SortDirection} [sortDir] Sort direction; overrides the field\'s natural default
|
|
264
265
|
* @param {boolean} [isTemplate]
|
|
266
|
+
* @param {boolean} [needsApproval] Only definitions with a run awaiting approval.
|
|
265
267
|
* @param {number} [limit] Number of items per page
|
|
266
268
|
* @param {number} [offset] Number of items to skip
|
|
267
269
|
* @param {Date} [createdAfter] Only items created at or after this timestamp (inclusive)
|
|
@@ -283,6 +285,7 @@ export interface WorkflowDefinitionsApiInterface {
|
|
|
283
285
|
* @param {WorkflowDefinitionOrder} [sortBy] Field to sort definitions by (default: CREATED_AT)
|
|
284
286
|
* @param {SortDirection} [sortDir] Sort direction; overrides the field\'s natural default
|
|
285
287
|
* @param {boolean} [isTemplate]
|
|
288
|
+
* @param {boolean} [needsApproval] Only definitions with a run awaiting approval.
|
|
286
289
|
* @param {number} [limit] Number of items per page
|
|
287
290
|
* @param {number} [offset] Number of items to skip
|
|
288
291
|
* @param {Date} [createdAfter] Only items created at or after this timestamp (inclusive)
|
|
@@ -725,6 +728,10 @@ export class WorkflowDefinitionsApi extends runtime.BaseAPI implements WorkflowD
|
|
|
725
728
|
queryParameters['is_template'] = requestParameters['isTemplate'];
|
|
726
729
|
}
|
|
727
730
|
|
|
731
|
+
if (requestParameters['needsApproval'] != null) {
|
|
732
|
+
queryParameters['needs_approval'] = requestParameters['needsApproval'];
|
|
733
|
+
}
|
|
734
|
+
|
|
728
735
|
if (requestParameters['limit'] != null) {
|
|
729
736
|
queryParameters['limit'] = requestParameters['limit'];
|
|
730
737
|
}
|
|
@@ -13,13 +13,13 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
-
import type {
|
|
16
|
+
import type { YidingConfigChange } from './YidingConfigChange';
|
|
17
17
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
} from './
|
|
18
|
+
YidingConfigChangeFromJSON,
|
|
19
|
+
YidingConfigChangeFromJSONTyped,
|
|
20
|
+
YidingConfigChangeToJSON,
|
|
21
|
+
YidingConfigChangeToJSONTyped,
|
|
22
|
+
} from './YidingConfigChange';
|
|
23
23
|
import type { YidingCursor } from './YidingCursor';
|
|
24
24
|
import {
|
|
25
25
|
YidingCursorFromJSON,
|
|
@@ -68,11 +68,11 @@ export interface UpdateDataSourceRequest {
|
|
|
68
68
|
*/
|
|
69
69
|
connectionConfig?: ConnectionConfig | null;
|
|
70
70
|
/**
|
|
71
|
-
*
|
|
72
|
-
* @type {
|
|
71
|
+
* What a YIDINGSYNC connector's crawler config may still change: the panel password and the crawl recurrence, each optional and each merged into the stored config rather than replacing it. Which shop and from when are fixed at creation. Rejected on a DIRECT connector. Changing ``cron`` re-arms the schedule. connection_config stays server-managed for YIDINGSYNC.
|
|
72
|
+
* @type {YidingConfigChange}
|
|
73
73
|
* @memberof UpdateDataSourceRequest
|
|
74
74
|
*/
|
|
75
|
-
sourceConfig?:
|
|
75
|
+
sourceConfig?: YidingConfigChange | null;
|
|
76
76
|
/**
|
|
77
77
|
* The crawl cursor, replaced whole. Written by the sync itself (the worker acts as the connector's owner) after each batch, so it records what has already been read. Moving it forward by hand makes the next run skip those days for good — the increment only re-scans what the cursor points at.
|
|
78
78
|
* @type {YidingCursor}
|
|
@@ -122,7 +122,7 @@ export function UpdateDataSourceRequestFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
122
122
|
'name': json['name'] == null ? undefined : json['name'],
|
|
123
123
|
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
124
124
|
'connectionConfig': json['connection_config'] == null ? undefined : ConnectionConfigFromJSON(json['connection_config']),
|
|
125
|
-
'sourceConfig': json['source_config'] == null ? undefined :
|
|
125
|
+
'sourceConfig': json['source_config'] == null ? undefined : YidingConfigChangeFromJSON(json['source_config']),
|
|
126
126
|
'syncState': json['sync_state'] == null ? undefined : YidingCursorFromJSON(json['sync_state']),
|
|
127
127
|
};
|
|
128
128
|
}
|
|
@@ -141,7 +141,7 @@ export function UpdateDataSourceRequestToJSONTyped(value?: UpdateDataSourceReque
|
|
|
141
141
|
'name': value['name'],
|
|
142
142
|
'parent_path_part_id': value['parentPathPartId'],
|
|
143
143
|
'connection_config': ConnectionConfigToJSON(value['connectionConfig']),
|
|
144
|
-
'source_config':
|
|
144
|
+
'source_config': YidingConfigChangeToJSON(value['sourceConfig']),
|
|
145
145
|
'sync_state': YidingCursorToJSON(value['syncState']),
|
|
146
146
|
};
|
|
147
147
|
}
|
|
@@ -0,0 +1,93 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface YidingConfigChange
|
|
20
|
+
*/
|
|
21
|
+
export interface YidingConfigChange {
|
|
22
|
+
/**
|
|
23
|
+
* Crawl recurrence, in the tenant's timezone
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof YidingConfigChange
|
|
26
|
+
*/
|
|
27
|
+
cron?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Write-only: omit it to keep the stored one
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof YidingConfigChange
|
|
32
|
+
*/
|
|
33
|
+
password?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export const YidingConfigChangePropertyValidationAttributesMap: {
|
|
36
|
+
[property: string]: {
|
|
37
|
+
maxLength?: number,
|
|
38
|
+
minLength?: number,
|
|
39
|
+
pattern?: string,
|
|
40
|
+
maximum?: number,
|
|
41
|
+
exclusiveMaximum?: boolean,
|
|
42
|
+
minimum?: number,
|
|
43
|
+
exclusiveMinimum?: boolean,
|
|
44
|
+
multipleOf?: number,
|
|
45
|
+
maxItems?: number,
|
|
46
|
+
minItems?: number,
|
|
47
|
+
uniqueItems?: boolean
|
|
48
|
+
}
|
|
49
|
+
} = {
|
|
50
|
+
password: {
|
|
51
|
+
minLength: 1,
|
|
52
|
+
},
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
/**
|
|
57
|
+
* Check if a given object implements the YidingConfigChange interface.
|
|
58
|
+
*/
|
|
59
|
+
export function instanceOfYidingConfigChange(value: object): value is YidingConfigChange {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export function YidingConfigChangeFromJSON(json: any): YidingConfigChange {
|
|
64
|
+
return YidingConfigChangeFromJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
export function YidingConfigChangeFromJSONTyped(json: any, ignoreDiscriminator: boolean): YidingConfigChange {
|
|
68
|
+
if (json == null) {
|
|
69
|
+
return json;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
|
|
73
|
+
'cron': json['cron'] == null ? undefined : json['cron'],
|
|
74
|
+
'password': json['password'] == null ? undefined : json['password'],
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export function YidingConfigChangeToJSON(json: any): YidingConfigChange {
|
|
79
|
+
return YidingConfigChangeToJSONTyped(json, false);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
export function YidingConfigChangeToJSONTyped(value?: YidingConfigChange | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
+
if (value == null) {
|
|
84
|
+
return value;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'cron': value['cron'],
|
|
90
|
+
'password': value['password'],
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -397,6 +397,7 @@ export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
|
397
397
|
export * from './XlsxCellAnchorOutput';
|
|
398
398
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
399
399
|
export * from './YidingConfig';
|
|
400
|
+
export * from './YidingConfigChange';
|
|
400
401
|
export * from './YidingCursor';
|
|
401
402
|
export * from './ZipFileResult';
|
|
402
403
|
export * from './ZipIngestionStatusResponse';
|