@knowledge-stack/ksapi 3.2.0 → 3.3.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 +7 -2
- package/dist/apis/DataSourcesApi.d.ts +14 -14
- package/dist/apis/DataSourcesApi.js +14 -7
- package/dist/esm/apis/DataSourcesApi.d.ts +14 -14
- package/dist/esm/apis/DataSourcesApi.js +14 -7
- package/dist/esm/models/ConnectionSummary.d.ts +65 -0
- package/dist/esm/models/ConnectionSummary.js +54 -0
- package/dist/esm/models/CreateDataSourceRequest.d.ts +16 -2
- package/dist/esm/models/CreateDataSourceRequest.js +8 -6
- package/dist/esm/models/DataSourceResponse.d.ts +26 -2
- package/dist/esm/models/DataSourceResponse.js +11 -0
- package/dist/esm/models/SourceConfigSummary.d.ts +71 -0
- package/dist/esm/models/SourceConfigSummary.js +71 -0
- package/dist/esm/models/SourceType.d.ts +25 -0
- package/dist/esm/models/SourceType.js +43 -0
- package/dist/esm/models/UpdateDataSourceRequest.d.ts +14 -0
- package/dist/esm/models/UpdateDataSourceRequest.js +6 -0
- package/dist/esm/models/YidingConfig.d.ts +77 -0
- package/dist/esm/models/YidingConfig.js +78 -0
- package/dist/esm/models/YidingCursor.d.ts +53 -0
- package/dist/esm/models/YidingCursor.js +44 -0
- package/dist/esm/models/index.d.ts +5 -0
- package/dist/esm/models/index.js +5 -0
- package/dist/models/ConnectionSummary.d.ts +65 -0
- package/dist/models/ConnectionSummary.js +62 -0
- package/dist/models/CreateDataSourceRequest.d.ts +16 -2
- package/dist/models/CreateDataSourceRequest.js +8 -6
- package/dist/models/DataSourceResponse.d.ts +26 -2
- package/dist/models/DataSourceResponse.js +11 -0
- package/dist/models/SourceConfigSummary.d.ts +71 -0
- package/dist/models/SourceConfigSummary.js +79 -0
- package/dist/models/SourceType.d.ts +25 -0
- package/dist/models/SourceType.js +51 -0
- package/dist/models/UpdateDataSourceRequest.d.ts +14 -0
- package/dist/models/UpdateDataSourceRequest.js +6 -0
- package/dist/models/YidingConfig.d.ts +77 -0
- package/dist/models/YidingConfig.js +86 -0
- package/dist/models/YidingCursor.d.ts +53 -0
- package/dist/models/YidingCursor.js +52 -0
- package/dist/models/index.d.ts +5 -0
- package/dist/models/index.js +5 -0
- package/docs/ConnectionSummary.md +41 -0
- package/docs/CreateDataSourceRequest.md +4 -0
- package/docs/DataSourceResponse.md +7 -1
- package/docs/DataSourcesApi.md +4 -3
- package/docs/FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md +6 -0
- package/docs/SourceConfigSummary.md +43 -0
- package/docs/SourceType.md +33 -0
- package/docs/UpdateDataSourceRequest.md +4 -0
- package/docs/YidingConfig.md +45 -0
- package/docs/YidingCursor.md +37 -0
- package/package.json +1 -1
- package/src/apis/DataSourcesApi.ts +22 -15
- package/src/models/ConnectionSummary.ts +109 -0
- package/src/models/CreateDataSourceRequest.ts +34 -6
- package/src/models/DataSourceResponse.ts +51 -2
- package/src/models/SourceConfigSummary.ts +130 -0
- package/src/models/SourceType.ts +53 -0
- package/src/models/UpdateDataSourceRequest.ts +30 -0
- package/src/models/YidingConfig.ts +142 -0
- package/src/models/YidingCursor.ts +90 -0
- package/src/models/index.ts +5 -0
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
* A YIDINGSYNC connector's stored config, with the password left out.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SourceConfigSummary
|
|
20
|
+
*/
|
|
21
|
+
export interface SourceConfigSummary {
|
|
22
|
+
/**
|
|
23
|
+
* The account the crawler signs in to the panel as
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof SourceConfigSummary
|
|
26
|
+
*/
|
|
27
|
+
username: string;
|
|
28
|
+
/**
|
|
29
|
+
* The panel's own id for the shop. Only the customer list is scoped by it — orders follow the logged-in account — but it answers a wrong one with a 500, so an empty value fails the crawl, not just that page.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof SourceConfigSummary
|
|
32
|
+
*/
|
|
33
|
+
businessId: string;
|
|
34
|
+
/**
|
|
35
|
+
* First dining day to sync; earlier orders are not fetched
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof SourceConfigSummary
|
|
38
|
+
*/
|
|
39
|
+
startDate: Date;
|
|
40
|
+
/**
|
|
41
|
+
* Crawl recurrence, in the tenant's timezone
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof SourceConfigSummary
|
|
44
|
+
*/
|
|
45
|
+
cron: string;
|
|
46
|
+
/**
|
|
47
|
+
* Root of the YiDing admin panel the crawler signs in to
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof SourceConfigSummary
|
|
50
|
+
*/
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
}
|
|
53
|
+
export const SourceConfigSummaryPropertyValidationAttributesMap: {
|
|
54
|
+
[property: string]: {
|
|
55
|
+
maxLength?: number,
|
|
56
|
+
minLength?: number,
|
|
57
|
+
pattern?: string,
|
|
58
|
+
maximum?: number,
|
|
59
|
+
exclusiveMaximum?: boolean,
|
|
60
|
+
minimum?: number,
|
|
61
|
+
exclusiveMinimum?: boolean,
|
|
62
|
+
multipleOf?: number,
|
|
63
|
+
maxItems?: number,
|
|
64
|
+
minItems?: number,
|
|
65
|
+
uniqueItems?: boolean
|
|
66
|
+
}
|
|
67
|
+
} = {
|
|
68
|
+
username: {
|
|
69
|
+
minLength: 1,
|
|
70
|
+
},
|
|
71
|
+
businessId: {
|
|
72
|
+
minLength: 1,
|
|
73
|
+
},
|
|
74
|
+
cron: {
|
|
75
|
+
minLength: 1,
|
|
76
|
+
},
|
|
77
|
+
baseUrl: {
|
|
78
|
+
maxLength: 2048,
|
|
79
|
+
},
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Check if a given object implements the SourceConfigSummary interface.
|
|
85
|
+
*/
|
|
86
|
+
export function instanceOfSourceConfigSummary(value: object): value is SourceConfigSummary {
|
|
87
|
+
if (!('username' in value) || value['username'] === undefined) return false;
|
|
88
|
+
if (!('businessId' in value) || value['businessId'] === undefined) return false;
|
|
89
|
+
if (!('startDate' in value) || value['startDate'] === undefined) return false;
|
|
90
|
+
if (!('cron' in value) || value['cron'] === undefined) return false;
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function SourceConfigSummaryFromJSON(json: any): SourceConfigSummary {
|
|
95
|
+
return SourceConfigSummaryFromJSONTyped(json, false);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export function SourceConfigSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceConfigSummary {
|
|
99
|
+
if (json == null) {
|
|
100
|
+
return json;
|
|
101
|
+
}
|
|
102
|
+
return {
|
|
103
|
+
|
|
104
|
+
'username': json['username'],
|
|
105
|
+
'businessId': json['business_id'],
|
|
106
|
+
'startDate': (new Date(json['start_date'])),
|
|
107
|
+
'cron': json['cron'],
|
|
108
|
+
'baseUrl': json['base_url'] == null ? undefined : json['base_url'],
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export function SourceConfigSummaryToJSON(json: any): SourceConfigSummary {
|
|
113
|
+
return SourceConfigSummaryToJSONTyped(json, false);
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function SourceConfigSummaryToJSONTyped(value?: SourceConfigSummary | null, ignoreDiscriminator: boolean = false): any {
|
|
117
|
+
if (value == null) {
|
|
118
|
+
return value;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return {
|
|
122
|
+
|
|
123
|
+
'username': value['username'],
|
|
124
|
+
'business_id': value['businessId'],
|
|
125
|
+
'start_date': value['startDate'].toISOString().substring(0,10),
|
|
126
|
+
'cron': value['cron'],
|
|
127
|
+
'base_url': value['baseUrl'],
|
|
128
|
+
};
|
|
129
|
+
}
|
|
130
|
+
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Extra connector config for data sync model direct connect or automatic login/copy method.
|
|
18
|
+
* @export
|
|
19
|
+
*/
|
|
20
|
+
export const SourceType = {
|
|
21
|
+
Direct: 'DIRECT',
|
|
22
|
+
Yidingsync: 'YIDINGSYNC'
|
|
23
|
+
} as const;
|
|
24
|
+
export type SourceType = typeof SourceType[keyof typeof SourceType];
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
export function instanceOfSourceType(value: any): boolean {
|
|
28
|
+
for (const key in SourceType) {
|
|
29
|
+
if (Object.prototype.hasOwnProperty.call(SourceType, key)) {
|
|
30
|
+
if (SourceType[key as keyof typeof SourceType] === value) {
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export function SourceTypeFromJSON(json: any): SourceType {
|
|
39
|
+
return SourceTypeFromJSONTyped(json, false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function SourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceType {
|
|
43
|
+
return json as SourceType;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
export function SourceTypeToJSON(value?: SourceType | null): any {
|
|
47
|
+
return value as any;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export function SourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SourceType {
|
|
51
|
+
return value as SourceType;
|
|
52
|
+
}
|
|
53
|
+
|
|
@@ -13,6 +13,20 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import { mapValues } from '../runtime';
|
|
16
|
+
import type { YidingConfig } from './YidingConfig';
|
|
17
|
+
import {
|
|
18
|
+
YidingConfigFromJSON,
|
|
19
|
+
YidingConfigFromJSONTyped,
|
|
20
|
+
YidingConfigToJSON,
|
|
21
|
+
YidingConfigToJSONTyped,
|
|
22
|
+
} from './YidingConfig';
|
|
23
|
+
import type { YidingCursor } from './YidingCursor';
|
|
24
|
+
import {
|
|
25
|
+
YidingCursorFromJSON,
|
|
26
|
+
YidingCursorFromJSONTyped,
|
|
27
|
+
YidingCursorToJSON,
|
|
28
|
+
YidingCursorToJSONTyped,
|
|
29
|
+
} from './YidingCursor';
|
|
16
30
|
import type { ConnectionConfig } from './ConnectionConfig';
|
|
17
31
|
import {
|
|
18
32
|
ConnectionConfigFromJSON,
|
|
@@ -53,6 +67,18 @@ export interface UpdateDataSourceRequest {
|
|
|
53
67
|
* @memberof UpdateDataSourceRequest
|
|
54
68
|
*/
|
|
55
69
|
connectionConfig?: ConnectionConfig | null;
|
|
70
|
+
/**
|
|
71
|
+
* Fresh YIDINGSYNC crawler config to replace the stored one (login, shop, start date, recurrence); rejected on a DIRECT connector. Changing ``cron`` re-arms the schedule. connection_config stays server-managed for YIDINGSYNC.
|
|
72
|
+
* @type {YidingConfig}
|
|
73
|
+
* @memberof UpdateDataSourceRequest
|
|
74
|
+
*/
|
|
75
|
+
sourceConfig?: YidingConfig | null;
|
|
76
|
+
/**
|
|
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
|
+
* @type {YidingCursor}
|
|
79
|
+
* @memberof UpdateDataSourceRequest
|
|
80
|
+
*/
|
|
81
|
+
syncState?: YidingCursor | null;
|
|
56
82
|
}
|
|
57
83
|
export const UpdateDataSourceRequestPropertyValidationAttributesMap: {
|
|
58
84
|
[property: string]: {
|
|
@@ -96,6 +122,8 @@ export function UpdateDataSourceRequestFromJSONTyped(json: any, ignoreDiscrimina
|
|
|
96
122
|
'name': json['name'] == null ? undefined : json['name'],
|
|
97
123
|
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
98
124
|
'connectionConfig': json['connection_config'] == null ? undefined : ConnectionConfigFromJSON(json['connection_config']),
|
|
125
|
+
'sourceConfig': json['source_config'] == null ? undefined : YidingConfigFromJSON(json['source_config']),
|
|
126
|
+
'syncState': json['sync_state'] == null ? undefined : YidingCursorFromJSON(json['sync_state']),
|
|
99
127
|
};
|
|
100
128
|
}
|
|
101
129
|
|
|
@@ -113,6 +141,8 @@ export function UpdateDataSourceRequestToJSONTyped(value?: UpdateDataSourceReque
|
|
|
113
141
|
'name': value['name'],
|
|
114
142
|
'parent_path_part_id': value['parentPathPartId'],
|
|
115
143
|
'connection_config': ConnectionConfigToJSON(value['connectionConfig']),
|
|
144
|
+
'source_config': YidingConfigToJSON(value['sourceConfig']),
|
|
145
|
+
'sync_state': YidingCursorToJSON(value['syncState']),
|
|
116
146
|
};
|
|
117
147
|
}
|
|
118
148
|
|
|
@@ -0,0 +1,142 @@
|
|
|
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
|
+
* What a customer supplies for a YiDing sync: the summary plus the secret.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface YidingConfig
|
|
20
|
+
*/
|
|
21
|
+
export interface YidingConfig {
|
|
22
|
+
/**
|
|
23
|
+
* The account the crawler signs in to the panel as
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof YidingConfig
|
|
26
|
+
*/
|
|
27
|
+
username: string;
|
|
28
|
+
/**
|
|
29
|
+
* The panel's own id for the shop. Only the customer list is scoped by it — orders follow the logged-in account — but it answers a wrong one with a 500, so an empty value fails the crawl, not just that page.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof YidingConfig
|
|
32
|
+
*/
|
|
33
|
+
businessId: string;
|
|
34
|
+
/**
|
|
35
|
+
* First dining day to sync; earlier orders are not fetched
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof YidingConfig
|
|
38
|
+
*/
|
|
39
|
+
startDate: Date;
|
|
40
|
+
/**
|
|
41
|
+
* Crawl recurrence, in the tenant's timezone
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof YidingConfig
|
|
44
|
+
*/
|
|
45
|
+
cron: string;
|
|
46
|
+
/**
|
|
47
|
+
* Root of the YiDing admin panel the crawler signs in to
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof YidingConfig
|
|
50
|
+
*/
|
|
51
|
+
baseUrl?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Write-only: the settings panel never reads it back
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof YidingConfig
|
|
56
|
+
*/
|
|
57
|
+
password: string;
|
|
58
|
+
}
|
|
59
|
+
export const YidingConfigPropertyValidationAttributesMap: {
|
|
60
|
+
[property: string]: {
|
|
61
|
+
maxLength?: number,
|
|
62
|
+
minLength?: number,
|
|
63
|
+
pattern?: string,
|
|
64
|
+
maximum?: number,
|
|
65
|
+
exclusiveMaximum?: boolean,
|
|
66
|
+
minimum?: number,
|
|
67
|
+
exclusiveMinimum?: boolean,
|
|
68
|
+
multipleOf?: number,
|
|
69
|
+
maxItems?: number,
|
|
70
|
+
minItems?: number,
|
|
71
|
+
uniqueItems?: boolean
|
|
72
|
+
}
|
|
73
|
+
} = {
|
|
74
|
+
username: {
|
|
75
|
+
minLength: 1,
|
|
76
|
+
},
|
|
77
|
+
businessId: {
|
|
78
|
+
minLength: 1,
|
|
79
|
+
},
|
|
80
|
+
cron: {
|
|
81
|
+
minLength: 1,
|
|
82
|
+
},
|
|
83
|
+
baseUrl: {
|
|
84
|
+
maxLength: 2048,
|
|
85
|
+
},
|
|
86
|
+
password: {
|
|
87
|
+
minLength: 1,
|
|
88
|
+
},
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Check if a given object implements the YidingConfig interface.
|
|
94
|
+
*/
|
|
95
|
+
export function instanceOfYidingConfig(value: object): value is YidingConfig {
|
|
96
|
+
if (!('username' in value) || value['username'] === undefined) return false;
|
|
97
|
+
if (!('businessId' in value) || value['businessId'] === undefined) return false;
|
|
98
|
+
if (!('startDate' in value) || value['startDate'] === undefined) return false;
|
|
99
|
+
if (!('cron' in value) || value['cron'] === undefined) return false;
|
|
100
|
+
if (!('password' in value) || value['password'] === undefined) return false;
|
|
101
|
+
return true;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export function YidingConfigFromJSON(json: any): YidingConfig {
|
|
105
|
+
return YidingConfigFromJSONTyped(json, false);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export function YidingConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): YidingConfig {
|
|
109
|
+
if (json == null) {
|
|
110
|
+
return json;
|
|
111
|
+
}
|
|
112
|
+
return {
|
|
113
|
+
|
|
114
|
+
'username': json['username'],
|
|
115
|
+
'businessId': json['business_id'],
|
|
116
|
+
'startDate': (new Date(json['start_date'])),
|
|
117
|
+
'cron': json['cron'],
|
|
118
|
+
'baseUrl': json['base_url'] == null ? undefined : json['base_url'],
|
|
119
|
+
'password': json['password'],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function YidingConfigToJSON(json: any): YidingConfig {
|
|
124
|
+
return YidingConfigToJSONTyped(json, false);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function YidingConfigToJSONTyped(value?: YidingConfig | null, ignoreDiscriminator: boolean = false): any {
|
|
128
|
+
if (value == null) {
|
|
129
|
+
return value;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
|
|
134
|
+
'username': value['username'],
|
|
135
|
+
'business_id': value['businessId'],
|
|
136
|
+
'start_date': value['startDate'].toISOString().substring(0,10),
|
|
137
|
+
'cron': value['cron'],
|
|
138
|
+
'base_url': value['baseUrl'],
|
|
139
|
+
'password': value['password'],
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
@@ -0,0 +1,90 @@
|
|
|
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
|
+
* How far a crawl has read; a missing mark means "never", not "day zero".
|
|
18
|
+
* @export
|
|
19
|
+
* @interface YidingCursor
|
|
20
|
+
*/
|
|
21
|
+
export interface YidingCursor {
|
|
22
|
+
/**
|
|
23
|
+
* Seating time of the last order read
|
|
24
|
+
* @type {Date}
|
|
25
|
+
* @memberof YidingCursor
|
|
26
|
+
*/
|
|
27
|
+
lastSyncedOrderTs?: Date | null;
|
|
28
|
+
/**
|
|
29
|
+
* When the customer list was last refreshed
|
|
30
|
+
* @type {Date}
|
|
31
|
+
* @memberof YidingCursor
|
|
32
|
+
*/
|
|
33
|
+
lastSyncedUserTs?: Date | null;
|
|
34
|
+
}
|
|
35
|
+
export const YidingCursorPropertyValidationAttributesMap: {
|
|
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
|
+
}
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Check if a given object implements the YidingCursor interface.
|
|
55
|
+
*/
|
|
56
|
+
export function instanceOfYidingCursor(value: object): value is YidingCursor {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function YidingCursorFromJSON(json: any): YidingCursor {
|
|
61
|
+
return YidingCursorFromJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function YidingCursorFromJSONTyped(json: any, ignoreDiscriminator: boolean): YidingCursor {
|
|
65
|
+
if (json == null) {
|
|
66
|
+
return json;
|
|
67
|
+
}
|
|
68
|
+
return {
|
|
69
|
+
|
|
70
|
+
'lastSyncedOrderTs': json['last_synced_order_ts'] == null ? undefined : (new Date(json['last_synced_order_ts'])),
|
|
71
|
+
'lastSyncedUserTs': json['last_synced_user_ts'] == null ? undefined : (new Date(json['last_synced_user_ts'])),
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function YidingCursorToJSON(json: any): YidingCursor {
|
|
76
|
+
return YidingCursorToJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function YidingCursorToJSONTyped(value?: YidingCursor | null, ignoreDiscriminator: boolean = false): any {
|
|
80
|
+
if (value == null) {
|
|
81
|
+
return value;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
return {
|
|
85
|
+
|
|
86
|
+
'last_synced_order_ts': value['lastSyncedOrderTs'] == null ? value['lastSyncedOrderTs'] : value['lastSyncedOrderTs'].toISOString(),
|
|
87
|
+
'last_synced_user_ts': value['lastSyncedUserTs'] == null ? value['lastSyncedUserTs'] : value['lastSyncedUserTs'].toISOString(),
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
|
package/src/models/index.ts
CHANGED
|
@@ -68,6 +68,7 @@ export * from './ColumnReference';
|
|
|
68
68
|
export * from './CommonFileExclusionReason';
|
|
69
69
|
export * from './CompleteUploadRequest';
|
|
70
70
|
export * from './ConnectionConfig';
|
|
71
|
+
export * from './ConnectionSummary';
|
|
71
72
|
export * from './ContentsSortOrder';
|
|
72
73
|
export * from './CreateApiConnectionRequest';
|
|
73
74
|
export * from './CreateApiKeyRequest';
|
|
@@ -291,6 +292,8 @@ export * from './SkillResponse';
|
|
|
291
292
|
export * from './SkillSearchResult';
|
|
292
293
|
export * from './SkillVersionResponse';
|
|
293
294
|
export * from './SortDirection';
|
|
295
|
+
export * from './SourceConfigSummary';
|
|
296
|
+
export * from './SourceType';
|
|
294
297
|
export * from './StartWorkflowRunRequest';
|
|
295
298
|
export * from './Step';
|
|
296
299
|
export * from './StepKind';
|
|
@@ -393,6 +396,8 @@ export * from './XlsxCellAnchorInput';
|
|
|
393
396
|
export * from './XlsxCellAnchorInputOrDocxParagraphAnchorInput';
|
|
394
397
|
export * from './XlsxCellAnchorOutput';
|
|
395
398
|
export * from './XlsxCellAnchorOutputOrDocxParagraphAnchorOutput';
|
|
399
|
+
export * from './YidingConfig';
|
|
400
|
+
export * from './YidingCursor';
|
|
396
401
|
export * from './ZipFileResult';
|
|
397
402
|
export * from './ZipIngestionStatusResponse';
|
|
398
403
|
export * from './ZipMemberStatusResponse';
|