@knowledge-stack/ksapi 3.16.1 → 3.17.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 +26 -4
- package/README.md +23 -4
- package/dist/apis/MemoryApi.d.ts +5 -5
- package/dist/apis/MemoryApi.js +1 -1
- package/dist/apis/WorkflowMemoryApi.d.ts +17 -17
- package/dist/apis/WorkflowMemoryApi.js +4 -4
- package/dist/apis/WorkflowRepositoryApi.d.ts +419 -0
- package/dist/apis/WorkflowRepositoryApi.js +595 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/MemoryApi.d.ts +5 -5
- package/dist/esm/apis/MemoryApi.js +2 -2
- package/dist/esm/apis/WorkflowMemoryApi.d.ts +17 -17
- package/dist/esm/apis/WorkflowMemoryApi.js +5 -5
- package/dist/esm/apis/WorkflowRepositoryApi.d.ts +419 -0
- package/dist/esm/apis/WorkflowRepositoryApi.js +558 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/ErrorResponse.d.ts +7 -0
- package/dist/esm/models/ErrorResponse.js +7 -0
- package/dist/esm/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
- package/dist/esm/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +9 -9
- package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
- package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +12 -12
- package/dist/esm/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
- package/dist/esm/models/PaginatedResponseRepoVersionResponse.js +70 -0
- package/dist/esm/models/RecordRepoSaveSkipRequest.d.ts +60 -0
- package/dist/esm/models/RecordRepoSaveSkipRequest.js +55 -0
- package/dist/esm/models/RepoBranchResponse.d.ts +126 -0
- package/dist/esm/models/RepoBranchResponse.js +95 -0
- package/dist/esm/models/RepoCommitSummary.d.ts +71 -0
- package/dist/esm/models/RepoCommitSummary.js +60 -0
- package/dist/esm/models/RepoSaveSkipReason.d.ts +36 -0
- package/dist/esm/models/RepoSaveSkipReason.js +54 -0
- package/dist/esm/models/RepoSnapshot.d.ts +59 -0
- package/dist/esm/models/RepoSnapshot.js +50 -0
- package/dist/esm/models/RepoTreeEntry.d.ts +59 -0
- package/dist/esm/models/RepoTreeEntry.js +52 -0
- package/dist/esm/models/RepoTreeResponse.d.ts +54 -0
- package/dist/esm/models/RepoTreeResponse.js +49 -0
- package/dist/esm/models/RepoVersionResponse.d.ts +95 -0
- package/dist/esm/models/RepoVersionResponse.js +74 -0
- package/dist/esm/models/WorkflowRepoResponse.d.ts +102 -0
- package/dist/esm/models/WorkflowRepoResponse.js +81 -0
- package/dist/esm/models/WorkflowRunSnapshot.d.ts +7 -0
- package/dist/esm/models/WorkflowRunSnapshot.js +3 -0
- package/dist/esm/models/index.d.ts +12 -2
- package/dist/esm/models/index.js +12 -2
- package/dist/models/ErrorResponse.d.ts +7 -0
- package/dist/models/ErrorResponse.js +7 -0
- package/dist/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
- package/dist/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +15 -15
- package/dist/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
- package/dist/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +18 -18
- package/dist/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
- package/dist/models/PaginatedResponseRepoVersionResponse.js +78 -0
- package/dist/models/RecordRepoSaveSkipRequest.d.ts +60 -0
- package/dist/models/RecordRepoSaveSkipRequest.js +63 -0
- package/dist/models/RepoBranchResponse.d.ts +126 -0
- package/dist/models/RepoBranchResponse.js +103 -0
- package/dist/models/RepoCommitSummary.d.ts +71 -0
- package/dist/models/RepoCommitSummary.js +68 -0
- package/dist/models/RepoSaveSkipReason.d.ts +36 -0
- package/dist/models/RepoSaveSkipReason.js +62 -0
- package/dist/models/RepoSnapshot.d.ts +59 -0
- package/dist/models/RepoSnapshot.js +58 -0
- package/dist/models/RepoTreeEntry.d.ts +59 -0
- package/dist/models/RepoTreeEntry.js +60 -0
- package/dist/models/RepoTreeResponse.d.ts +54 -0
- package/dist/models/RepoTreeResponse.js +57 -0
- package/dist/models/RepoVersionResponse.d.ts +95 -0
- package/dist/models/RepoVersionResponse.js +82 -0
- package/dist/models/WorkflowRepoResponse.d.ts +102 -0
- package/dist/models/WorkflowRepoResponse.js +89 -0
- package/dist/models/WorkflowRunSnapshot.d.ts +7 -0
- package/dist/models/WorkflowRunSnapshot.js +3 -0
- package/dist/models/index.d.ts +12 -2
- package/dist/models/index.js +12 -2
- package/docs/MemoryApi.md +2 -2
- package/docs/{MemoryChunkResponse.md → MemoryEntryResponse.md} +4 -4
- package/docs/{PaginatedResponseMemoryChunkResponse.md → PaginatedResponseMemoryEntryResponse.md} +5 -5
- package/docs/PaginatedResponseRepoVersionResponse.md +40 -0
- package/docs/RecordRepoSaveSkipRequest.md +38 -0
- package/docs/RepoBranchResponse.md +61 -0
- package/docs/RepoCommitSummary.md +42 -0
- package/docs/RepoSaveSkipReason.md +33 -0
- package/docs/RepoSnapshot.md +39 -0
- package/docs/RepoTreeEntry.md +38 -0
- package/docs/RepoTreeResponse.md +36 -0
- package/docs/RepoVersionResponse.md +51 -0
- package/docs/WorkflowMemoryApi.md +8 -8
- package/docs/WorkflowRepoResponse.md +53 -0
- package/docs/WorkflowRepositoryApi.md +745 -0
- package/docs/WorkflowRunSnapshot.md +2 -0
- package/package.json +1 -1
- package/src/apis/MemoryApi.ts +8 -8
- package/src/apis/WorkflowMemoryApi.ts +26 -26
- package/src/apis/WorkflowRepositoryApi.ts +1002 -0
- package/src/apis/index.ts +1 -0
- package/src/models/ErrorResponse.ts +7 -0
- package/src/models/{MemoryChunkResponse.ts → MemoryEntryResponse.ts} +14 -14
- package/src/models/{PaginatedResponseMemoryChunkResponse.ts → PaginatedResponseMemoryEntryResponse.ts} +25 -25
- package/src/models/PaginatedResponseRepoVersionResponse.ts +130 -0
- package/src/models/RecordRepoSaveSkipRequest.ts +113 -0
- package/src/models/RepoBranchResponse.ts +207 -0
- package/src/models/RepoCommitSummary.ts +119 -0
- package/src/models/RepoSaveSkipReason.ts +64 -0
- package/src/models/RepoSnapshot.ts +100 -0
- package/src/models/RepoTreeEntry.ts +101 -0
- package/src/models/RepoTreeResponse.ts +100 -0
- package/src/models/RepoVersionResponse.ts +154 -0
- package/src/models/WorkflowRepoResponse.ts +172 -0
- package/src/models/WorkflowRunSnapshot.ts +15 -0
- package/src/models/index.ts +12 -2
|
@@ -0,0 +1,119 @@
|
|
|
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 RepoCommitSummary
|
|
20
|
+
*/
|
|
21
|
+
export interface RepoCommitSummary {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RepoCommitSummary
|
|
26
|
+
*/
|
|
27
|
+
sha: string;
|
|
28
|
+
/**
|
|
29
|
+
* First line of the commit message.
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RepoCommitSummary
|
|
32
|
+
*/
|
|
33
|
+
subject: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {Date}
|
|
37
|
+
* @memberof RepoCommitSummary
|
|
38
|
+
*/
|
|
39
|
+
authoredAt: Date;
|
|
40
|
+
/**
|
|
41
|
+
* The run saving this repository snapshot.
|
|
42
|
+
* @type {string}
|
|
43
|
+
* @memberof RepoCommitSummary
|
|
44
|
+
*/
|
|
45
|
+
runId: string | null;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof RepoCommitSummary
|
|
50
|
+
*/
|
|
51
|
+
savedByUserId: string;
|
|
52
|
+
}
|
|
53
|
+
export const RepoCommitSummaryPropertyValidationAttributesMap: {
|
|
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
|
+
}
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
/**
|
|
72
|
+
* Check if a given object implements the RepoCommitSummary interface.
|
|
73
|
+
*/
|
|
74
|
+
export function instanceOfRepoCommitSummary(value: object): value is RepoCommitSummary {
|
|
75
|
+
if (!('sha' in value) || value['sha'] === undefined) return false;
|
|
76
|
+
if (!('subject' in value) || value['subject'] === undefined) return false;
|
|
77
|
+
if (!('authoredAt' in value) || value['authoredAt'] === undefined) return false;
|
|
78
|
+
if (!('runId' in value) || value['runId'] === undefined) return false;
|
|
79
|
+
if (!('savedByUserId' in value) || value['savedByUserId'] === undefined) return false;
|
|
80
|
+
return true;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function RepoCommitSummaryFromJSON(json: any): RepoCommitSummary {
|
|
84
|
+
return RepoCommitSummaryFromJSONTyped(json, false);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function RepoCommitSummaryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoCommitSummary {
|
|
88
|
+
if (json == null) {
|
|
89
|
+
return json;
|
|
90
|
+
}
|
|
91
|
+
return {
|
|
92
|
+
|
|
93
|
+
'sha': json['sha'],
|
|
94
|
+
'subject': json['subject'],
|
|
95
|
+
'authoredAt': (new Date(json['authored_at'])),
|
|
96
|
+
'runId': json['run_id'],
|
|
97
|
+
'savedByUserId': json['saved_by_user_id'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
export function RepoCommitSummaryToJSON(json: any): RepoCommitSummary {
|
|
102
|
+
return RepoCommitSummaryToJSONTyped(json, false);
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function RepoCommitSummaryToJSONTyped(value?: RepoCommitSummary | null, ignoreDiscriminator: boolean = false): any {
|
|
106
|
+
if (value == null) {
|
|
107
|
+
return value;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
|
|
112
|
+
'sha': value['sha'],
|
|
113
|
+
'subject': value['subject'],
|
|
114
|
+
'authored_at': value['authoredAt'].toISOString(),
|
|
115
|
+
'run_id': value['runId'],
|
|
116
|
+
'saved_by_user_id': value['savedByUserId'],
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
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
|
+
* Why retention or integration could not complete.
|
|
18
|
+
*
|
|
19
|
+
* ``conflict``: integration failed; a retained branch remains recoverable.
|
|
20
|
+
* ``history_rewrite``:
|
|
21
|
+
* the run rewrote saved history. ``no_write``: the turn's user cannot write the
|
|
22
|
+
* workflow. ``uncommitted``: changes were never committed to the assigned branch.
|
|
23
|
+
* ``rejected``: the platform refused the bundle (too large, unsafe paths).
|
|
24
|
+
* ``failed``: the checkout or the save itself failed.
|
|
25
|
+
* @export
|
|
26
|
+
*/
|
|
27
|
+
export const RepoSaveSkipReason = {
|
|
28
|
+
Conflict: 'conflict',
|
|
29
|
+
HistoryRewrite: 'history_rewrite',
|
|
30
|
+
NoWrite: 'no_write',
|
|
31
|
+
Uncommitted: 'uncommitted',
|
|
32
|
+
Rejected: 'rejected',
|
|
33
|
+
Failed: 'failed'
|
|
34
|
+
} as const;
|
|
35
|
+
export type RepoSaveSkipReason = typeof RepoSaveSkipReason[keyof typeof RepoSaveSkipReason];
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
export function instanceOfRepoSaveSkipReason(value: any): boolean {
|
|
39
|
+
for (const key in RepoSaveSkipReason) {
|
|
40
|
+
if (Object.prototype.hasOwnProperty.call(RepoSaveSkipReason, key)) {
|
|
41
|
+
if (RepoSaveSkipReason[key as keyof typeof RepoSaveSkipReason] === value) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
return false;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function RepoSaveSkipReasonFromJSON(json: any): RepoSaveSkipReason {
|
|
50
|
+
return RepoSaveSkipReasonFromJSONTyped(json, false);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export function RepoSaveSkipReasonFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoSaveSkipReason {
|
|
54
|
+
return json as RepoSaveSkipReason;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export function RepoSaveSkipReasonToJSON(value?: RepoSaveSkipReason | null): any {
|
|
58
|
+
return value as any;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function RepoSaveSkipReasonToJSONTyped(value: any, ignoreDiscriminator: boolean): RepoSaveSkipReason {
|
|
62
|
+
return value as RepoSaveSkipReason;
|
|
63
|
+
}
|
|
64
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
* The workflow repository version a run was started against.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface RepoSnapshot
|
|
20
|
+
*/
|
|
21
|
+
export interface RepoSnapshot {
|
|
22
|
+
/**
|
|
23
|
+
* Commit id of main the run checks out
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RepoSnapshot
|
|
26
|
+
*/
|
|
27
|
+
commit: string;
|
|
28
|
+
/**
|
|
29
|
+
* DocumentVersion holding that main's bundle
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RepoSnapshot
|
|
32
|
+
*/
|
|
33
|
+
versionId: string;
|
|
34
|
+
/**
|
|
35
|
+
* Instruction version (DOCUMENT_VERSION path_part) that repository version was saved against; the runner compares it with this run's pinned instruction.
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof RepoSnapshot
|
|
38
|
+
*/
|
|
39
|
+
instructionVersionId?: string | null;
|
|
40
|
+
}
|
|
41
|
+
export const RepoSnapshotPropertyValidationAttributesMap: {
|
|
42
|
+
[property: string]: {
|
|
43
|
+
maxLength?: number,
|
|
44
|
+
minLength?: number,
|
|
45
|
+
pattern?: string,
|
|
46
|
+
maximum?: number,
|
|
47
|
+
exclusiveMaximum?: boolean,
|
|
48
|
+
minimum?: number,
|
|
49
|
+
exclusiveMinimum?: boolean,
|
|
50
|
+
multipleOf?: number,
|
|
51
|
+
maxItems?: number,
|
|
52
|
+
minItems?: number,
|
|
53
|
+
uniqueItems?: boolean
|
|
54
|
+
}
|
|
55
|
+
} = {
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the RepoSnapshot interface.
|
|
61
|
+
*/
|
|
62
|
+
export function instanceOfRepoSnapshot(value: object): value is RepoSnapshot {
|
|
63
|
+
if (!('commit' in value) || value['commit'] === undefined) return false;
|
|
64
|
+
if (!('versionId' in value) || value['versionId'] === undefined) return false;
|
|
65
|
+
return true;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export function RepoSnapshotFromJSON(json: any): RepoSnapshot {
|
|
69
|
+
return RepoSnapshotFromJSONTyped(json, false);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function RepoSnapshotFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoSnapshot {
|
|
73
|
+
if (json == null) {
|
|
74
|
+
return json;
|
|
75
|
+
}
|
|
76
|
+
return {
|
|
77
|
+
|
|
78
|
+
'commit': json['commit'],
|
|
79
|
+
'versionId': json['version_id'],
|
|
80
|
+
'instructionVersionId': json['instruction_version_id'] == null ? undefined : json['instruction_version_id'],
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function RepoSnapshotToJSON(json: any): RepoSnapshot {
|
|
85
|
+
return RepoSnapshotToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function RepoSnapshotToJSONTyped(value?: RepoSnapshot | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'commit': value['commit'],
|
|
96
|
+
'version_id': value['versionId'],
|
|
97
|
+
'instruction_version_id': value['instructionVersionId'],
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
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 RepoTreeEntry
|
|
20
|
+
*/
|
|
21
|
+
export interface RepoTreeEntry {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RepoTreeEntry
|
|
26
|
+
*/
|
|
27
|
+
path: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof RepoTreeEntry
|
|
32
|
+
*/
|
|
33
|
+
size: number;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {boolean}
|
|
37
|
+
* @memberof RepoTreeEntry
|
|
38
|
+
*/
|
|
39
|
+
isBinary: boolean;
|
|
40
|
+
}
|
|
41
|
+
export const RepoTreeEntryPropertyValidationAttributesMap: {
|
|
42
|
+
[property: string]: {
|
|
43
|
+
maxLength?: number,
|
|
44
|
+
minLength?: number,
|
|
45
|
+
pattern?: string,
|
|
46
|
+
maximum?: number,
|
|
47
|
+
exclusiveMaximum?: boolean,
|
|
48
|
+
minimum?: number,
|
|
49
|
+
exclusiveMinimum?: boolean,
|
|
50
|
+
multipleOf?: number,
|
|
51
|
+
maxItems?: number,
|
|
52
|
+
minItems?: number,
|
|
53
|
+
uniqueItems?: boolean
|
|
54
|
+
}
|
|
55
|
+
} = {
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the RepoTreeEntry interface.
|
|
61
|
+
*/
|
|
62
|
+
export function instanceOfRepoTreeEntry(value: object): value is RepoTreeEntry {
|
|
63
|
+
if (!('path' in value) || value['path'] === undefined) return false;
|
|
64
|
+
if (!('size' in value) || value['size'] === undefined) return false;
|
|
65
|
+
if (!('isBinary' in value) || value['isBinary'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function RepoTreeEntryFromJSON(json: any): RepoTreeEntry {
|
|
70
|
+
return RepoTreeEntryFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function RepoTreeEntryFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoTreeEntry {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'path': json['path'],
|
|
80
|
+
'size': json['size'],
|
|
81
|
+
'isBinary': json['is_binary'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function RepoTreeEntryToJSON(json: any): RepoTreeEntry {
|
|
86
|
+
return RepoTreeEntryToJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function RepoTreeEntryToJSONTyped(value?: RepoTreeEntry | null, ignoreDiscriminator: boolean = false): any {
|
|
90
|
+
if (value == null) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'path': value['path'],
|
|
97
|
+
'size': value['size'],
|
|
98
|
+
'is_binary': value['isBinary'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
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
|
+
import type { RepoTreeEntry } from './RepoTreeEntry';
|
|
17
|
+
import {
|
|
18
|
+
RepoTreeEntryFromJSON,
|
|
19
|
+
RepoTreeEntryFromJSONTyped,
|
|
20
|
+
RepoTreeEntryToJSON,
|
|
21
|
+
RepoTreeEntryToJSONTyped,
|
|
22
|
+
} from './RepoTreeEntry';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @export
|
|
27
|
+
* @interface RepoTreeResponse
|
|
28
|
+
*/
|
|
29
|
+
export interface RepoTreeResponse {
|
|
30
|
+
/**
|
|
31
|
+
* Null when the repository does not exist.
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof RepoTreeResponse
|
|
34
|
+
*/
|
|
35
|
+
commit: string | null;
|
|
36
|
+
/**
|
|
37
|
+
* Every file, path-sorted.
|
|
38
|
+
* @type {Array<RepoTreeEntry>}
|
|
39
|
+
* @memberof RepoTreeResponse
|
|
40
|
+
*/
|
|
41
|
+
entries: Array<RepoTreeEntry>;
|
|
42
|
+
}
|
|
43
|
+
export const RepoTreeResponsePropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number,
|
|
46
|
+
minLength?: number,
|
|
47
|
+
pattern?: string,
|
|
48
|
+
maximum?: number,
|
|
49
|
+
exclusiveMaximum?: boolean,
|
|
50
|
+
minimum?: number,
|
|
51
|
+
exclusiveMinimum?: boolean,
|
|
52
|
+
multipleOf?: number,
|
|
53
|
+
maxItems?: number,
|
|
54
|
+
minItems?: number,
|
|
55
|
+
uniqueItems?: boolean
|
|
56
|
+
}
|
|
57
|
+
} = {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the RepoTreeResponse interface.
|
|
63
|
+
*/
|
|
64
|
+
export function instanceOfRepoTreeResponse(value: object): value is RepoTreeResponse {
|
|
65
|
+
if (!('commit' in value) || value['commit'] === undefined) return false;
|
|
66
|
+
if (!('entries' in value) || value['entries'] === undefined) return false;
|
|
67
|
+
return true;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function RepoTreeResponseFromJSON(json: any): RepoTreeResponse {
|
|
71
|
+
return RepoTreeResponseFromJSONTyped(json, false);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export function RepoTreeResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoTreeResponse {
|
|
75
|
+
if (json == null) {
|
|
76
|
+
return json;
|
|
77
|
+
}
|
|
78
|
+
return {
|
|
79
|
+
|
|
80
|
+
'commit': json['commit'],
|
|
81
|
+
'entries': ((json['entries'] as Array<any>).map(RepoTreeEntryFromJSON)),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function RepoTreeResponseToJSON(json: any): RepoTreeResponse {
|
|
86
|
+
return RepoTreeResponseToJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function RepoTreeResponseToJSONTyped(value?: RepoTreeResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
90
|
+
if (value == null) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'commit': value['commit'],
|
|
97
|
+
'entries': ((value['entries'] as Array<any>).map(RepoTreeEntryToJSON)),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
|
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
* One saved version: a new main and the run that saved it.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface RepoVersionResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface RepoVersionResponse {
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof RepoVersionResponse
|
|
26
|
+
*/
|
|
27
|
+
versionId: string;
|
|
28
|
+
/**
|
|
29
|
+
*
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof RepoVersionResponse
|
|
32
|
+
*/
|
|
33
|
+
headSha: string;
|
|
34
|
+
/**
|
|
35
|
+
*
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof RepoVersionResponse
|
|
38
|
+
*/
|
|
39
|
+
previousHeadSha: string | null;
|
|
40
|
+
/**
|
|
41
|
+
*
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof RepoVersionResponse
|
|
44
|
+
*/
|
|
45
|
+
commitsAdded: number;
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
* @type {string}
|
|
49
|
+
* @memberof RepoVersionResponse
|
|
50
|
+
*/
|
|
51
|
+
runId: string | null;
|
|
52
|
+
/**
|
|
53
|
+
*
|
|
54
|
+
* @type {string}
|
|
55
|
+
* @memberof RepoVersionResponse
|
|
56
|
+
*/
|
|
57
|
+
savedByUserId: string;
|
|
58
|
+
/**
|
|
59
|
+
*
|
|
60
|
+
* @type {Date}
|
|
61
|
+
* @memberof RepoVersionResponse
|
|
62
|
+
*/
|
|
63
|
+
savedAt: Date;
|
|
64
|
+
/**
|
|
65
|
+
*
|
|
66
|
+
* @type {string}
|
|
67
|
+
* @memberof RepoVersionResponse
|
|
68
|
+
*/
|
|
69
|
+
instructionVersionId: string | null;
|
|
70
|
+
/**
|
|
71
|
+
* Retained run-branch version this publication integrated.
|
|
72
|
+
* @type {string}
|
|
73
|
+
* @memberof RepoVersionResponse
|
|
74
|
+
*/
|
|
75
|
+
candidateVersionId?: string | null;
|
|
76
|
+
}
|
|
77
|
+
export const RepoVersionResponsePropertyValidationAttributesMap: {
|
|
78
|
+
[property: string]: {
|
|
79
|
+
maxLength?: number,
|
|
80
|
+
minLength?: number,
|
|
81
|
+
pattern?: string,
|
|
82
|
+
maximum?: number,
|
|
83
|
+
exclusiveMaximum?: boolean,
|
|
84
|
+
minimum?: number,
|
|
85
|
+
exclusiveMinimum?: boolean,
|
|
86
|
+
multipleOf?: number,
|
|
87
|
+
maxItems?: number,
|
|
88
|
+
minItems?: number,
|
|
89
|
+
uniqueItems?: boolean
|
|
90
|
+
}
|
|
91
|
+
} = {
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* Check if a given object implements the RepoVersionResponse interface.
|
|
97
|
+
*/
|
|
98
|
+
export function instanceOfRepoVersionResponse(value: object): value is RepoVersionResponse {
|
|
99
|
+
if (!('versionId' in value) || value['versionId'] === undefined) return false;
|
|
100
|
+
if (!('headSha' in value) || value['headSha'] === undefined) return false;
|
|
101
|
+
if (!('previousHeadSha' in value) || value['previousHeadSha'] === undefined) return false;
|
|
102
|
+
if (!('commitsAdded' in value) || value['commitsAdded'] === undefined) return false;
|
|
103
|
+
if (!('runId' in value) || value['runId'] === undefined) return false;
|
|
104
|
+
if (!('savedByUserId' in value) || value['savedByUserId'] === undefined) return false;
|
|
105
|
+
if (!('savedAt' in value) || value['savedAt'] === undefined) return false;
|
|
106
|
+
if (!('instructionVersionId' in value) || value['instructionVersionId'] === undefined) return false;
|
|
107
|
+
return true;
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
export function RepoVersionResponseFromJSON(json: any): RepoVersionResponse {
|
|
111
|
+
return RepoVersionResponseFromJSONTyped(json, false);
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
export function RepoVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoVersionResponse {
|
|
115
|
+
if (json == null) {
|
|
116
|
+
return json;
|
|
117
|
+
}
|
|
118
|
+
return {
|
|
119
|
+
|
|
120
|
+
'versionId': json['version_id'],
|
|
121
|
+
'headSha': json['head_sha'],
|
|
122
|
+
'previousHeadSha': json['previous_head_sha'],
|
|
123
|
+
'commitsAdded': json['commits_added'],
|
|
124
|
+
'runId': json['run_id'],
|
|
125
|
+
'savedByUserId': json['saved_by_user_id'],
|
|
126
|
+
'savedAt': (new Date(json['saved_at'])),
|
|
127
|
+
'instructionVersionId': json['instruction_version_id'],
|
|
128
|
+
'candidateVersionId': json['candidate_version_id'] == null ? undefined : json['candidate_version_id'],
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export function RepoVersionResponseToJSON(json: any): RepoVersionResponse {
|
|
133
|
+
return RepoVersionResponseToJSONTyped(json, false);
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
export function RepoVersionResponseToJSONTyped(value?: RepoVersionResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
137
|
+
if (value == null) {
|
|
138
|
+
return value;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
return {
|
|
142
|
+
|
|
143
|
+
'version_id': value['versionId'],
|
|
144
|
+
'head_sha': value['headSha'],
|
|
145
|
+
'previous_head_sha': value['previousHeadSha'],
|
|
146
|
+
'commits_added': value['commitsAdded'],
|
|
147
|
+
'run_id': value['runId'],
|
|
148
|
+
'saved_by_user_id': value['savedByUserId'],
|
|
149
|
+
'saved_at': value['savedAt'].toISOString(),
|
|
150
|
+
'instruction_version_id': value['instructionVersionId'],
|
|
151
|
+
'candidate_version_id': value['candidateVersionId'],
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
|