@knowledge-stack/ksapi 3.2.1 → 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
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { SourceType } from './SourceType';
|
|
13
|
+
import type { YidingConfig } from './YidingConfig';
|
|
12
14
|
import type { ConnectionConfig } from './ConnectionConfig';
|
|
13
15
|
import type { DataSourceEngine } from './DataSourceEngine';
|
|
14
16
|
/**
|
|
@@ -29,18 +31,30 @@ export interface CreateDataSourceRequest {
|
|
|
29
31
|
* @memberof CreateDataSourceRequest
|
|
30
32
|
*/
|
|
31
33
|
parentPathPartId: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {SourceType}
|
|
37
|
+
* @memberof CreateDataSourceRequest
|
|
38
|
+
*/
|
|
39
|
+
sourceType?: SourceType;
|
|
32
40
|
/**
|
|
33
41
|
*
|
|
34
42
|
* @type {DataSourceEngine}
|
|
35
43
|
* @memberof CreateDataSourceRequest
|
|
36
44
|
*/
|
|
37
|
-
engine
|
|
45
|
+
engine?: DataSourceEngine;
|
|
38
46
|
/**
|
|
39
47
|
*
|
|
40
48
|
* @type {ConnectionConfig}
|
|
41
49
|
* @memberof CreateDataSourceRequest
|
|
42
50
|
*/
|
|
43
|
-
connectionConfig
|
|
51
|
+
connectionConfig?: ConnectionConfig | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {YidingConfig}
|
|
55
|
+
* @memberof CreateDataSourceRequest
|
|
56
|
+
*/
|
|
57
|
+
sourceConfig?: YidingConfig | null;
|
|
44
58
|
}
|
|
45
59
|
export declare const CreateDataSourceRequestPropertyValidationAttributesMap: {
|
|
46
60
|
[property: string]: {
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { SourceTypeFromJSON, SourceTypeToJSON, } from './SourceType';
|
|
15
|
+
import { YidingConfigFromJSON, YidingConfigToJSON, } from './YidingConfig';
|
|
14
16
|
import { ConnectionConfigFromJSON, ConnectionConfigToJSON, } from './ConnectionConfig';
|
|
15
17
|
import { DataSourceEngineFromJSON, DataSourceEngineToJSON, } from './DataSourceEngine';
|
|
16
18
|
export const CreateDataSourceRequestPropertyValidationAttributesMap = {
|
|
@@ -26,10 +28,6 @@ export function instanceOfCreateDataSourceRequest(value) {
|
|
|
26
28
|
return false;
|
|
27
29
|
if (!('parentPathPartId' in value) || value['parentPathPartId'] === undefined)
|
|
28
30
|
return false;
|
|
29
|
-
if (!('engine' in value) || value['engine'] === undefined)
|
|
30
|
-
return false;
|
|
31
|
-
if (!('connectionConfig' in value) || value['connectionConfig'] === undefined)
|
|
32
|
-
return false;
|
|
33
31
|
return true;
|
|
34
32
|
}
|
|
35
33
|
export function CreateDataSourceRequestFromJSON(json) {
|
|
@@ -42,8 +40,10 @@ export function CreateDataSourceRequestFromJSONTyped(json, ignoreDiscriminator)
|
|
|
42
40
|
return {
|
|
43
41
|
'name': json['name'],
|
|
44
42
|
'parentPathPartId': json['parent_path_part_id'],
|
|
45
|
-
'
|
|
46
|
-
'
|
|
43
|
+
'sourceType': json['source_type'] == null ? undefined : SourceTypeFromJSON(json['source_type']),
|
|
44
|
+
'engine': json['engine'] == null ? undefined : DataSourceEngineFromJSON(json['engine']),
|
|
45
|
+
'connectionConfig': json['connection_config'] == null ? undefined : ConnectionConfigFromJSON(json['connection_config']),
|
|
46
|
+
'sourceConfig': json['source_config'] == null ? undefined : YidingConfigFromJSON(json['source_config']),
|
|
47
47
|
};
|
|
48
48
|
}
|
|
49
49
|
export function CreateDataSourceRequestToJSON(json) {
|
|
@@ -56,7 +56,9 @@ export function CreateDataSourceRequestToJSONTyped(value, ignoreDiscriminator =
|
|
|
56
56
|
return {
|
|
57
57
|
'name': value['name'],
|
|
58
58
|
'parent_path_part_id': value['parentPathPartId'],
|
|
59
|
+
'source_type': SourceTypeToJSON(value['sourceType']),
|
|
59
60
|
'engine': DataSourceEngineToJSON(value['engine']),
|
|
60
61
|
'connection_config': ConnectionConfigToJSON(value['connectionConfig']),
|
|
62
|
+
'source_config': YidingConfigToJSON(value['sourceConfig']),
|
|
61
63
|
};
|
|
62
64
|
}
|
|
@@ -9,15 +9,21 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { ConnectionSummary } from './ConnectionSummary';
|
|
12
13
|
import type { ItemPermissions } from './ItemPermissions';
|
|
14
|
+
import type { SourceType } from './SourceType';
|
|
13
15
|
import type { PathPartApprovalState } from './PathPartApprovalState';
|
|
16
|
+
import type { SourceConfigSummary } from './SourceConfigSummary';
|
|
14
17
|
import type { UserInfo } from './UserInfo';
|
|
15
18
|
import type { DataSourceEngine } from './DataSourceEngine';
|
|
16
19
|
/**
|
|
17
20
|
* Connector response; a discriminated-union variant for folder listings.
|
|
18
21
|
*
|
|
19
|
-
* The ``connection_config``
|
|
20
|
-
*
|
|
22
|
+
* The stored ``connection_config`` is never returned whole: the password is
|
|
23
|
+
* write-only and never serialized back. What it points at travels in
|
|
24
|
+
* ``connection_summary`` instead, which a YIDINGSYNC connector needs — the
|
|
25
|
+
* server generated those credentials, so this is the only place its owner ever
|
|
26
|
+
* sees which database the sync built.
|
|
21
27
|
* @export
|
|
22
28
|
* @interface DataSourceResponse
|
|
23
29
|
*/
|
|
@@ -70,6 +76,24 @@ export interface DataSourceResponse {
|
|
|
70
76
|
* @memberof DataSourceResponse
|
|
71
77
|
*/
|
|
72
78
|
engine: DataSourceEngine;
|
|
79
|
+
/**
|
|
80
|
+
*
|
|
81
|
+
* @type {SourceType}
|
|
82
|
+
* @memberof DataSourceResponse
|
|
83
|
+
*/
|
|
84
|
+
sourceType: SourceType;
|
|
85
|
+
/**
|
|
86
|
+
* Where the connector points, without the password. Null on a YIDINGSYNC connector until provisioning has built its database, so polling this is how the UI learns the sync is ready.
|
|
87
|
+
* @type {ConnectionSummary}
|
|
88
|
+
* @memberof DataSourceResponse
|
|
89
|
+
*/
|
|
90
|
+
connectionSummary?: ConnectionSummary | null;
|
|
91
|
+
/**
|
|
92
|
+
* A YIDINGSYNC connector's crawler config without the password: which shop, from when, and the crawl recurrence. Null on DIRECT.
|
|
93
|
+
* @type {SourceConfigSummary}
|
|
94
|
+
* @memberof DataSourceResponse
|
|
95
|
+
*/
|
|
96
|
+
sourceConfig?: SourceConfigSummary | null;
|
|
73
97
|
/**
|
|
74
98
|
*
|
|
75
99
|
* @type {PathPartApprovalState}
|
|
@@ -11,8 +11,11 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { ConnectionSummaryFromJSON, ConnectionSummaryToJSON, } from './ConnectionSummary';
|
|
14
15
|
import { ItemPermissionsFromJSON, ItemPermissionsToJSON, } from './ItemPermissions';
|
|
16
|
+
import { SourceTypeFromJSON, SourceTypeToJSON, } from './SourceType';
|
|
15
17
|
import { PathPartApprovalStateFromJSON, PathPartApprovalStateToJSON, } from './PathPartApprovalState';
|
|
18
|
+
import { SourceConfigSummaryFromJSON, SourceConfigSummaryToJSON, } from './SourceConfigSummary';
|
|
16
19
|
import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
|
|
17
20
|
import { DataSourceEngineFromJSON, DataSourceEngineToJSON, } from './DataSourceEngine';
|
|
18
21
|
/**
|
|
@@ -40,6 +43,8 @@ export function instanceOfDataSourceResponse(value) {
|
|
|
40
43
|
return false;
|
|
41
44
|
if (!('engine' in value) || value['engine'] === undefined)
|
|
42
45
|
return false;
|
|
46
|
+
if (!('sourceType' in value) || value['sourceType'] === undefined)
|
|
47
|
+
return false;
|
|
43
48
|
if (!('approvalState' in value) || value['approvalState'] === undefined)
|
|
44
49
|
return false;
|
|
45
50
|
if (!('permissions' in value) || value['permissions'] === undefined)
|
|
@@ -66,6 +71,9 @@ export function DataSourceResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
66
71
|
'tenantId': json['tenant_id'],
|
|
67
72
|
'name': json['name'],
|
|
68
73
|
'engine': DataSourceEngineFromJSON(json['engine']),
|
|
74
|
+
'sourceType': SourceTypeFromJSON(json['source_type']),
|
|
75
|
+
'connectionSummary': json['connection_summary'] == null ? undefined : ConnectionSummaryFromJSON(json['connection_summary']),
|
|
76
|
+
'sourceConfig': json['source_config'] == null ? undefined : SourceConfigSummaryFromJSON(json['source_config']),
|
|
69
77
|
'approvalState': PathPartApprovalStateFromJSON(json['approval_state']),
|
|
70
78
|
'owner': json['owner'] == null ? undefined : UserInfoFromJSON(json['owner']),
|
|
71
79
|
'permissions': ItemPermissionsFromJSON(json['permissions']),
|
|
@@ -89,6 +97,9 @@ export function DataSourceResponseToJSONTyped(value, ignoreDiscriminator = false
|
|
|
89
97
|
'tenant_id': value['tenantId'],
|
|
90
98
|
'name': value['name'],
|
|
91
99
|
'engine': DataSourceEngineToJSON(value['engine']),
|
|
100
|
+
'source_type': SourceTypeToJSON(value['sourceType']),
|
|
101
|
+
'connection_summary': ConnectionSummaryToJSON(value['connectionSummary']),
|
|
102
|
+
'source_config': SourceConfigSummaryToJSON(value['sourceConfig']),
|
|
92
103
|
'approval_state': PathPartApprovalStateToJSON(value['approvalState']),
|
|
93
104
|
'owner': UserInfoToJSON(value['owner']),
|
|
94
105
|
'permissions': ItemPermissionsToJSON(value['permissions']),
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
* A YIDINGSYNC connector's stored config, with the password left out.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface SourceConfigSummary
|
|
16
|
+
*/
|
|
17
|
+
export interface SourceConfigSummary {
|
|
18
|
+
/**
|
|
19
|
+
* The account the crawler signs in to the panel as
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof SourceConfigSummary
|
|
22
|
+
*/
|
|
23
|
+
username: string;
|
|
24
|
+
/**
|
|
25
|
+
* 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.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof SourceConfigSummary
|
|
28
|
+
*/
|
|
29
|
+
businessId: string;
|
|
30
|
+
/**
|
|
31
|
+
* First dining day to sync; earlier orders are not fetched
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof SourceConfigSummary
|
|
34
|
+
*/
|
|
35
|
+
startDate: Date;
|
|
36
|
+
/**
|
|
37
|
+
* Crawl recurrence, in the tenant's timezone
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof SourceConfigSummary
|
|
40
|
+
*/
|
|
41
|
+
cron: string;
|
|
42
|
+
/**
|
|
43
|
+
* Root of the YiDing admin panel the crawler signs in to
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof SourceConfigSummary
|
|
46
|
+
*/
|
|
47
|
+
baseUrl?: string;
|
|
48
|
+
}
|
|
49
|
+
export declare const SourceConfigSummaryPropertyValidationAttributesMap: {
|
|
50
|
+
[property: string]: {
|
|
51
|
+
maxLength?: number;
|
|
52
|
+
minLength?: number;
|
|
53
|
+
pattern?: string;
|
|
54
|
+
maximum?: number;
|
|
55
|
+
exclusiveMaximum?: boolean;
|
|
56
|
+
minimum?: number;
|
|
57
|
+
exclusiveMinimum?: boolean;
|
|
58
|
+
multipleOf?: number;
|
|
59
|
+
maxItems?: number;
|
|
60
|
+
minItems?: number;
|
|
61
|
+
uniqueItems?: boolean;
|
|
62
|
+
};
|
|
63
|
+
};
|
|
64
|
+
/**
|
|
65
|
+
* Check if a given object implements the SourceConfigSummary interface.
|
|
66
|
+
*/
|
|
67
|
+
export declare function instanceOfSourceConfigSummary(value: object): value is SourceConfigSummary;
|
|
68
|
+
export declare function SourceConfigSummaryFromJSON(json: any): SourceConfigSummary;
|
|
69
|
+
export declare function SourceConfigSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceConfigSummary;
|
|
70
|
+
export declare function SourceConfigSummaryToJSON(json: any): SourceConfigSummary;
|
|
71
|
+
export declare function SourceConfigSummaryToJSONTyped(value?: SourceConfigSummary | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,71 @@
|
|
|
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 SourceConfigSummaryPropertyValidationAttributesMap = {
|
|
15
|
+
username: {
|
|
16
|
+
minLength: 1,
|
|
17
|
+
},
|
|
18
|
+
businessId: {
|
|
19
|
+
minLength: 1,
|
|
20
|
+
},
|
|
21
|
+
cron: {
|
|
22
|
+
minLength: 1,
|
|
23
|
+
},
|
|
24
|
+
baseUrl: {
|
|
25
|
+
maxLength: 2048,
|
|
26
|
+
},
|
|
27
|
+
};
|
|
28
|
+
/**
|
|
29
|
+
* Check if a given object implements the SourceConfigSummary interface.
|
|
30
|
+
*/
|
|
31
|
+
export function instanceOfSourceConfigSummary(value) {
|
|
32
|
+
if (!('username' in value) || value['username'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('businessId' in value) || value['businessId'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('startDate' in value) || value['startDate'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('cron' in value) || value['cron'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
return true;
|
|
41
|
+
}
|
|
42
|
+
export function SourceConfigSummaryFromJSON(json) {
|
|
43
|
+
return SourceConfigSummaryFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
export function SourceConfigSummaryFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
if (json == null) {
|
|
47
|
+
return json;
|
|
48
|
+
}
|
|
49
|
+
return {
|
|
50
|
+
'username': json['username'],
|
|
51
|
+
'businessId': json['business_id'],
|
|
52
|
+
'startDate': (new Date(json['start_date'])),
|
|
53
|
+
'cron': json['cron'],
|
|
54
|
+
'baseUrl': json['base_url'] == null ? undefined : json['base_url'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
57
|
+
export function SourceConfigSummaryToJSON(json) {
|
|
58
|
+
return SourceConfigSummaryToJSONTyped(json, false);
|
|
59
|
+
}
|
|
60
|
+
export function SourceConfigSummaryToJSONTyped(value, ignoreDiscriminator = false) {
|
|
61
|
+
if (value == null) {
|
|
62
|
+
return value;
|
|
63
|
+
}
|
|
64
|
+
return {
|
|
65
|
+
'username': value['username'],
|
|
66
|
+
'business_id': value['businessId'],
|
|
67
|
+
'start_date': value['startDate'].toISOString().substring(0, 10),
|
|
68
|
+
'cron': value['cron'],
|
|
69
|
+
'base_url': value['baseUrl'],
|
|
70
|
+
};
|
|
71
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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
|
+
* Extra connector config for data sync model direct connect or automatic login/copy method.
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const SourceType: {
|
|
17
|
+
readonly Direct: 'DIRECT';
|
|
18
|
+
readonly Yidingsync: 'YIDINGSYNC';
|
|
19
|
+
};
|
|
20
|
+
export type SourceType = typeof SourceType[keyof typeof SourceType];
|
|
21
|
+
export declare function instanceOfSourceType(value: any): boolean;
|
|
22
|
+
export declare function SourceTypeFromJSON(json: any): SourceType;
|
|
23
|
+
export declare function SourceTypeFromJSONTyped(json: any, ignoreDiscriminator: boolean): SourceType;
|
|
24
|
+
export declare function SourceTypeToJSON(value?: SourceType | null): any;
|
|
25
|
+
export declare function SourceTypeToJSONTyped(value: any, ignoreDiscriminator: boolean): SourceType;
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
* Extra connector config for data sync model direct connect or automatic login/copy method.
|
|
16
|
+
* @export
|
|
17
|
+
*/
|
|
18
|
+
export const SourceType = {
|
|
19
|
+
Direct: 'DIRECT',
|
|
20
|
+
Yidingsync: 'YIDINGSYNC'
|
|
21
|
+
};
|
|
22
|
+
export function instanceOfSourceType(value) {
|
|
23
|
+
for (const key in SourceType) {
|
|
24
|
+
if (Object.prototype.hasOwnProperty.call(SourceType, key)) {
|
|
25
|
+
if (SourceType[key] === value) {
|
|
26
|
+
return true;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return false;
|
|
31
|
+
}
|
|
32
|
+
export function SourceTypeFromJSON(json) {
|
|
33
|
+
return SourceTypeFromJSONTyped(json, false);
|
|
34
|
+
}
|
|
35
|
+
export function SourceTypeFromJSONTyped(json, ignoreDiscriminator) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
export function SourceTypeToJSON(value) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
export function SourceTypeToJSONTyped(value, ignoreDiscriminator) {
|
|
42
|
+
return value;
|
|
43
|
+
}
|
|
@@ -9,6 +9,8 @@
|
|
|
9
9
|
* https://openapi-generator.tech
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
|
+
import type { YidingConfig } from './YidingConfig';
|
|
13
|
+
import type { YidingCursor } from './YidingCursor';
|
|
12
14
|
import type { ConnectionConfig } from './ConnectionConfig';
|
|
13
15
|
/**
|
|
14
16
|
* Rename, move, and/or re-credential a connector (PATCH). All optional.
|
|
@@ -42,6 +44,18 @@ export interface UpdateDataSourceRequest {
|
|
|
42
44
|
* @memberof UpdateDataSourceRequest
|
|
43
45
|
*/
|
|
44
46
|
connectionConfig?: ConnectionConfig | null;
|
|
47
|
+
/**
|
|
48
|
+
* 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.
|
|
49
|
+
* @type {YidingConfig}
|
|
50
|
+
* @memberof UpdateDataSourceRequest
|
|
51
|
+
*/
|
|
52
|
+
sourceConfig?: YidingConfig | null;
|
|
53
|
+
/**
|
|
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
|
+
* @type {YidingCursor}
|
|
56
|
+
* @memberof UpdateDataSourceRequest
|
|
57
|
+
*/
|
|
58
|
+
syncState?: YidingCursor | null;
|
|
45
59
|
}
|
|
46
60
|
export declare const UpdateDataSourceRequestPropertyValidationAttributesMap: {
|
|
47
61
|
[property: string]: {
|
|
@@ -11,6 +11,8 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
+
import { YidingConfigFromJSON, YidingConfigToJSON, } from './YidingConfig';
|
|
15
|
+
import { YidingCursorFromJSON, YidingCursorToJSON, } from './YidingCursor';
|
|
14
16
|
import { ConnectionConfigFromJSON, ConnectionConfigToJSON, } from './ConnectionConfig';
|
|
15
17
|
export const UpdateDataSourceRequestPropertyValidationAttributesMap = {
|
|
16
18
|
name: {
|
|
@@ -35,6 +37,8 @@ export function UpdateDataSourceRequestFromJSONTyped(json, ignoreDiscriminator)
|
|
|
35
37
|
'name': json['name'] == null ? undefined : json['name'],
|
|
36
38
|
'parentPathPartId': json['parent_path_part_id'] == null ? undefined : json['parent_path_part_id'],
|
|
37
39
|
'connectionConfig': json['connection_config'] == null ? undefined : ConnectionConfigFromJSON(json['connection_config']),
|
|
40
|
+
'sourceConfig': json['source_config'] == null ? undefined : YidingConfigFromJSON(json['source_config']),
|
|
41
|
+
'syncState': json['sync_state'] == null ? undefined : YidingCursorFromJSON(json['sync_state']),
|
|
38
42
|
};
|
|
39
43
|
}
|
|
40
44
|
export function UpdateDataSourceRequestToJSON(json) {
|
|
@@ -48,5 +52,7 @@ export function UpdateDataSourceRequestToJSONTyped(value, ignoreDiscriminator =
|
|
|
48
52
|
'name': value['name'],
|
|
49
53
|
'parent_path_part_id': value['parentPathPartId'],
|
|
50
54
|
'connection_config': ConnectionConfigToJSON(value['connectionConfig']),
|
|
55
|
+
'source_config': YidingConfigToJSON(value['sourceConfig']),
|
|
56
|
+
'sync_state': YidingCursorToJSON(value['syncState']),
|
|
51
57
|
};
|
|
52
58
|
}
|
|
@@ -0,0 +1,77 @@
|
|
|
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
|
+
* What a customer supplies for a YiDing sync: the summary plus the secret.
|
|
14
|
+
* @export
|
|
15
|
+
* @interface YidingConfig
|
|
16
|
+
*/
|
|
17
|
+
export interface YidingConfig {
|
|
18
|
+
/**
|
|
19
|
+
* The account the crawler signs in to the panel as
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof YidingConfig
|
|
22
|
+
*/
|
|
23
|
+
username: string;
|
|
24
|
+
/**
|
|
25
|
+
* 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.
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof YidingConfig
|
|
28
|
+
*/
|
|
29
|
+
businessId: string;
|
|
30
|
+
/**
|
|
31
|
+
* First dining day to sync; earlier orders are not fetched
|
|
32
|
+
* @type {Date}
|
|
33
|
+
* @memberof YidingConfig
|
|
34
|
+
*/
|
|
35
|
+
startDate: Date;
|
|
36
|
+
/**
|
|
37
|
+
* Crawl recurrence, in the tenant's timezone
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof YidingConfig
|
|
40
|
+
*/
|
|
41
|
+
cron: string;
|
|
42
|
+
/**
|
|
43
|
+
* Root of the YiDing admin panel the crawler signs in to
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof YidingConfig
|
|
46
|
+
*/
|
|
47
|
+
baseUrl?: string;
|
|
48
|
+
/**
|
|
49
|
+
* Write-only: the settings panel never reads it back
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof YidingConfig
|
|
52
|
+
*/
|
|
53
|
+
password: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const YidingConfigPropertyValidationAttributesMap: {
|
|
56
|
+
[property: string]: {
|
|
57
|
+
maxLength?: number;
|
|
58
|
+
minLength?: number;
|
|
59
|
+
pattern?: string;
|
|
60
|
+
maximum?: number;
|
|
61
|
+
exclusiveMaximum?: boolean;
|
|
62
|
+
minimum?: number;
|
|
63
|
+
exclusiveMinimum?: boolean;
|
|
64
|
+
multipleOf?: number;
|
|
65
|
+
maxItems?: number;
|
|
66
|
+
minItems?: number;
|
|
67
|
+
uniqueItems?: boolean;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
/**
|
|
71
|
+
* Check if a given object implements the YidingConfig interface.
|
|
72
|
+
*/
|
|
73
|
+
export declare function instanceOfYidingConfig(value: object): value is YidingConfig;
|
|
74
|
+
export declare function YidingConfigFromJSON(json: any): YidingConfig;
|
|
75
|
+
export declare function YidingConfigFromJSONTyped(json: any, ignoreDiscriminator: boolean): YidingConfig;
|
|
76
|
+
export declare function YidingConfigToJSON(json: any): YidingConfig;
|
|
77
|
+
export declare function YidingConfigToJSONTyped(value?: YidingConfig | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,78 @@
|
|
|
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 YidingConfigPropertyValidationAttributesMap = {
|
|
15
|
+
username: {
|
|
16
|
+
minLength: 1,
|
|
17
|
+
},
|
|
18
|
+
businessId: {
|
|
19
|
+
minLength: 1,
|
|
20
|
+
},
|
|
21
|
+
cron: {
|
|
22
|
+
minLength: 1,
|
|
23
|
+
},
|
|
24
|
+
baseUrl: {
|
|
25
|
+
maxLength: 2048,
|
|
26
|
+
},
|
|
27
|
+
password: {
|
|
28
|
+
minLength: 1,
|
|
29
|
+
},
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Check if a given object implements the YidingConfig interface.
|
|
33
|
+
*/
|
|
34
|
+
export function instanceOfYidingConfig(value) {
|
|
35
|
+
if (!('username' in value) || value['username'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('businessId' in value) || value['businessId'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('startDate' in value) || value['startDate'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
if (!('cron' in value) || value['cron'] === undefined)
|
|
42
|
+
return false;
|
|
43
|
+
if (!('password' in value) || value['password'] === undefined)
|
|
44
|
+
return false;
|
|
45
|
+
return true;
|
|
46
|
+
}
|
|
47
|
+
export function YidingConfigFromJSON(json) {
|
|
48
|
+
return YidingConfigFromJSONTyped(json, false);
|
|
49
|
+
}
|
|
50
|
+
export function YidingConfigFromJSONTyped(json, ignoreDiscriminator) {
|
|
51
|
+
if (json == null) {
|
|
52
|
+
return json;
|
|
53
|
+
}
|
|
54
|
+
return {
|
|
55
|
+
'username': json['username'],
|
|
56
|
+
'businessId': json['business_id'],
|
|
57
|
+
'startDate': (new Date(json['start_date'])),
|
|
58
|
+
'cron': json['cron'],
|
|
59
|
+
'baseUrl': json['base_url'] == null ? undefined : json['base_url'],
|
|
60
|
+
'password': json['password'],
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
export function YidingConfigToJSON(json) {
|
|
64
|
+
return YidingConfigToJSONTyped(json, false);
|
|
65
|
+
}
|
|
66
|
+
export function YidingConfigToJSONTyped(value, ignoreDiscriminator = false) {
|
|
67
|
+
if (value == null) {
|
|
68
|
+
return value;
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
'username': value['username'],
|
|
72
|
+
'business_id': value['businessId'],
|
|
73
|
+
'start_date': value['startDate'].toISOString().substring(0, 10),
|
|
74
|
+
'cron': value['cron'],
|
|
75
|
+
'base_url': value['baseUrl'],
|
|
76
|
+
'password': value['password'],
|
|
77
|
+
};
|
|
78
|
+
}
|