@knowledge-stack/ksapi 3.16.2 → 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.
Files changed (114) hide show
  1. package/.openapi-generator/FILES +26 -4
  2. package/README.md +23 -4
  3. package/dist/apis/MemoryApi.d.ts +5 -5
  4. package/dist/apis/MemoryApi.js +1 -1
  5. package/dist/apis/WorkflowMemoryApi.d.ts +17 -17
  6. package/dist/apis/WorkflowMemoryApi.js +4 -4
  7. package/dist/apis/WorkflowRepositoryApi.d.ts +419 -0
  8. package/dist/apis/WorkflowRepositoryApi.js +595 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/MemoryApi.d.ts +5 -5
  12. package/dist/esm/apis/MemoryApi.js +2 -2
  13. package/dist/esm/apis/WorkflowMemoryApi.d.ts +17 -17
  14. package/dist/esm/apis/WorkflowMemoryApi.js +5 -5
  15. package/dist/esm/apis/WorkflowRepositoryApi.d.ts +419 -0
  16. package/dist/esm/apis/WorkflowRepositoryApi.js +558 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/ErrorResponse.d.ts +7 -0
  20. package/dist/esm/models/ErrorResponse.js +7 -0
  21. package/dist/esm/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
  22. package/dist/esm/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +9 -9
  23. package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
  24. package/dist/esm/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +12 -12
  25. package/dist/esm/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
  26. package/dist/esm/models/PaginatedResponseRepoVersionResponse.js +70 -0
  27. package/dist/esm/models/RecordRepoSaveSkipRequest.d.ts +60 -0
  28. package/dist/esm/models/RecordRepoSaveSkipRequest.js +55 -0
  29. package/dist/esm/models/RepoBranchResponse.d.ts +126 -0
  30. package/dist/esm/models/RepoBranchResponse.js +95 -0
  31. package/dist/esm/models/RepoCommitSummary.d.ts +71 -0
  32. package/dist/esm/models/RepoCommitSummary.js +60 -0
  33. package/dist/esm/models/RepoSaveSkipReason.d.ts +36 -0
  34. package/dist/esm/models/RepoSaveSkipReason.js +54 -0
  35. package/dist/esm/models/RepoSnapshot.d.ts +59 -0
  36. package/dist/esm/models/RepoSnapshot.js +50 -0
  37. package/dist/esm/models/RepoTreeEntry.d.ts +59 -0
  38. package/dist/esm/models/RepoTreeEntry.js +52 -0
  39. package/dist/esm/models/RepoTreeResponse.d.ts +54 -0
  40. package/dist/esm/models/RepoTreeResponse.js +49 -0
  41. package/dist/esm/models/RepoVersionResponse.d.ts +95 -0
  42. package/dist/esm/models/RepoVersionResponse.js +74 -0
  43. package/dist/esm/models/WorkflowRepoResponse.d.ts +102 -0
  44. package/dist/esm/models/WorkflowRepoResponse.js +81 -0
  45. package/dist/esm/models/WorkflowRunSnapshot.d.ts +7 -0
  46. package/dist/esm/models/WorkflowRunSnapshot.js +3 -0
  47. package/dist/esm/models/index.d.ts +12 -2
  48. package/dist/esm/models/index.js +12 -2
  49. package/dist/models/ErrorResponse.d.ts +7 -0
  50. package/dist/models/ErrorResponse.js +7 -0
  51. package/dist/models/{MemoryChunkResponse.d.ts → MemoryEntryResponse.d.ts} +12 -12
  52. package/dist/models/{MemoryChunkResponse.js → MemoryEntryResponse.js} +15 -15
  53. package/dist/models/{PaginatedResponseMemoryChunkResponse.d.ts → PaginatedResponseMemoryEntryResponse.d.ts} +16 -16
  54. package/dist/models/{PaginatedResponseMemoryChunkResponse.js → PaginatedResponseMemoryEntryResponse.js} +18 -18
  55. package/dist/models/PaginatedResponseRepoVersionResponse.d.ts +66 -0
  56. package/dist/models/PaginatedResponseRepoVersionResponse.js +78 -0
  57. package/dist/models/RecordRepoSaveSkipRequest.d.ts +60 -0
  58. package/dist/models/RecordRepoSaveSkipRequest.js +63 -0
  59. package/dist/models/RepoBranchResponse.d.ts +126 -0
  60. package/dist/models/RepoBranchResponse.js +103 -0
  61. package/dist/models/RepoCommitSummary.d.ts +71 -0
  62. package/dist/models/RepoCommitSummary.js +68 -0
  63. package/dist/models/RepoSaveSkipReason.d.ts +36 -0
  64. package/dist/models/RepoSaveSkipReason.js +62 -0
  65. package/dist/models/RepoSnapshot.d.ts +59 -0
  66. package/dist/models/RepoSnapshot.js +58 -0
  67. package/dist/models/RepoTreeEntry.d.ts +59 -0
  68. package/dist/models/RepoTreeEntry.js +60 -0
  69. package/dist/models/RepoTreeResponse.d.ts +54 -0
  70. package/dist/models/RepoTreeResponse.js +57 -0
  71. package/dist/models/RepoVersionResponse.d.ts +95 -0
  72. package/dist/models/RepoVersionResponse.js +82 -0
  73. package/dist/models/WorkflowRepoResponse.d.ts +102 -0
  74. package/dist/models/WorkflowRepoResponse.js +89 -0
  75. package/dist/models/WorkflowRunSnapshot.d.ts +7 -0
  76. package/dist/models/WorkflowRunSnapshot.js +3 -0
  77. package/dist/models/index.d.ts +12 -2
  78. package/dist/models/index.js +12 -2
  79. package/docs/MemoryApi.md +2 -2
  80. package/docs/{MemoryChunkResponse.md → MemoryEntryResponse.md} +4 -4
  81. package/docs/{PaginatedResponseMemoryChunkResponse.md → PaginatedResponseMemoryEntryResponse.md} +5 -5
  82. package/docs/PaginatedResponseRepoVersionResponse.md +40 -0
  83. package/docs/RecordRepoSaveSkipRequest.md +38 -0
  84. package/docs/RepoBranchResponse.md +61 -0
  85. package/docs/RepoCommitSummary.md +42 -0
  86. package/docs/RepoSaveSkipReason.md +33 -0
  87. package/docs/RepoSnapshot.md +39 -0
  88. package/docs/RepoTreeEntry.md +38 -0
  89. package/docs/RepoTreeResponse.md +36 -0
  90. package/docs/RepoVersionResponse.md +51 -0
  91. package/docs/WorkflowMemoryApi.md +8 -8
  92. package/docs/WorkflowRepoResponse.md +53 -0
  93. package/docs/WorkflowRepositoryApi.md +745 -0
  94. package/docs/WorkflowRunSnapshot.md +2 -0
  95. package/package.json +1 -1
  96. package/src/apis/MemoryApi.ts +8 -8
  97. package/src/apis/WorkflowMemoryApi.ts +26 -26
  98. package/src/apis/WorkflowRepositoryApi.ts +1002 -0
  99. package/src/apis/index.ts +1 -0
  100. package/src/models/ErrorResponse.ts +7 -0
  101. package/src/models/{MemoryChunkResponse.ts → MemoryEntryResponse.ts} +14 -14
  102. package/src/models/{PaginatedResponseMemoryChunkResponse.ts → PaginatedResponseMemoryEntryResponse.ts} +25 -25
  103. package/src/models/PaginatedResponseRepoVersionResponse.ts +130 -0
  104. package/src/models/RecordRepoSaveSkipRequest.ts +113 -0
  105. package/src/models/RepoBranchResponse.ts +207 -0
  106. package/src/models/RepoCommitSummary.ts +119 -0
  107. package/src/models/RepoSaveSkipReason.ts +64 -0
  108. package/src/models/RepoSnapshot.ts +100 -0
  109. package/src/models/RepoTreeEntry.ts +101 -0
  110. package/src/models/RepoTreeResponse.ts +100 -0
  111. package/src/models/RepoVersionResponse.ts +154 -0
  112. package/src/models/WorkflowRepoResponse.ts +172 -0
  113. package/src/models/WorkflowRunSnapshot.ts +15 -0
  114. package/src/models/index.ts +12 -2
@@ -9,39 +9,39 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
- import type { MemoryChunkResponse } from './MemoryChunkResponse';
12
+ import type { MemoryEntryResponse } from './MemoryEntryResponse';
13
13
  /**
14
14
  *
15
15
  * @export
16
- * @interface PaginatedResponseMemoryChunkResponse
16
+ * @interface PaginatedResponseMemoryEntryResponse
17
17
  */
18
- export interface PaginatedResponseMemoryChunkResponse {
18
+ export interface PaginatedResponseMemoryEntryResponse {
19
19
  /**
20
20
  * List of items
21
- * @type {Array<MemoryChunkResponse>}
22
- * @memberof PaginatedResponseMemoryChunkResponse
21
+ * @type {Array<MemoryEntryResponse>}
22
+ * @memberof PaginatedResponseMemoryEntryResponse
23
23
  */
24
- items: Array<MemoryChunkResponse>;
24
+ items: Array<MemoryEntryResponse>;
25
25
  /**
26
26
  * Total number of items
27
27
  * @type {number}
28
- * @memberof PaginatedResponseMemoryChunkResponse
28
+ * @memberof PaginatedResponseMemoryEntryResponse
29
29
  */
30
30
  total: number;
31
31
  /**
32
32
  * Number of items per page
33
33
  * @type {number}
34
- * @memberof PaginatedResponseMemoryChunkResponse
34
+ * @memberof PaginatedResponseMemoryEntryResponse
35
35
  */
36
36
  limit: number;
37
37
  /**
38
38
  * Number of items to skip
39
39
  * @type {number}
40
- * @memberof PaginatedResponseMemoryChunkResponse
40
+ * @memberof PaginatedResponseMemoryEntryResponse
41
41
  */
42
42
  offset: number;
43
43
  }
44
- export declare const PaginatedResponseMemoryChunkResponsePropertyValidationAttributesMap: {
44
+ export declare const PaginatedResponseMemoryEntryResponsePropertyValidationAttributesMap: {
45
45
  [property: string]: {
46
46
  maxLength?: number;
47
47
  minLength?: number;
@@ -57,10 +57,10 @@ export declare const PaginatedResponseMemoryChunkResponsePropertyValidationAttri
57
57
  };
58
58
  };
59
59
  /**
60
- * Check if a given object implements the PaginatedResponseMemoryChunkResponse interface.
60
+ * Check if a given object implements the PaginatedResponseMemoryEntryResponse interface.
61
61
  */
62
- export declare function instanceOfPaginatedResponseMemoryChunkResponse(value: object): value is PaginatedResponseMemoryChunkResponse;
63
- export declare function PaginatedResponseMemoryChunkResponseFromJSON(json: any): PaginatedResponseMemoryChunkResponse;
64
- export declare function PaginatedResponseMemoryChunkResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseMemoryChunkResponse;
65
- export declare function PaginatedResponseMemoryChunkResponseToJSON(json: any): PaginatedResponseMemoryChunkResponse;
66
- export declare function PaginatedResponseMemoryChunkResponseToJSONTyped(value?: PaginatedResponseMemoryChunkResponse | null, ignoreDiscriminator?: boolean): any;
62
+ export declare function instanceOfPaginatedResponseMemoryEntryResponse(value: object): value is PaginatedResponseMemoryEntryResponse;
63
+ export declare function PaginatedResponseMemoryEntryResponseFromJSON(json: any): PaginatedResponseMemoryEntryResponse;
64
+ export declare function PaginatedResponseMemoryEntryResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseMemoryEntryResponse;
65
+ export declare function PaginatedResponseMemoryEntryResponseToJSON(json: any): PaginatedResponseMemoryEntryResponse;
66
+ export declare function PaginatedResponseMemoryEntryResponseToJSONTyped(value?: PaginatedResponseMemoryEntryResponse | null, ignoreDiscriminator?: boolean): any;
@@ -13,14 +13,14 @@
13
13
  * Do not edit the class manually.
14
14
  */
15
15
  Object.defineProperty(exports, "__esModule", { value: true });
16
- exports.PaginatedResponseMemoryChunkResponsePropertyValidationAttributesMap = void 0;
17
- exports.instanceOfPaginatedResponseMemoryChunkResponse = instanceOfPaginatedResponseMemoryChunkResponse;
18
- exports.PaginatedResponseMemoryChunkResponseFromJSON = PaginatedResponseMemoryChunkResponseFromJSON;
19
- exports.PaginatedResponseMemoryChunkResponseFromJSONTyped = PaginatedResponseMemoryChunkResponseFromJSONTyped;
20
- exports.PaginatedResponseMemoryChunkResponseToJSON = PaginatedResponseMemoryChunkResponseToJSON;
21
- exports.PaginatedResponseMemoryChunkResponseToJSONTyped = PaginatedResponseMemoryChunkResponseToJSONTyped;
22
- const MemoryChunkResponse_1 = require("./MemoryChunkResponse");
23
- exports.PaginatedResponseMemoryChunkResponsePropertyValidationAttributesMap = {
16
+ exports.PaginatedResponseMemoryEntryResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfPaginatedResponseMemoryEntryResponse = instanceOfPaginatedResponseMemoryEntryResponse;
18
+ exports.PaginatedResponseMemoryEntryResponseFromJSON = PaginatedResponseMemoryEntryResponseFromJSON;
19
+ exports.PaginatedResponseMemoryEntryResponseFromJSONTyped = PaginatedResponseMemoryEntryResponseFromJSONTyped;
20
+ exports.PaginatedResponseMemoryEntryResponseToJSON = PaginatedResponseMemoryEntryResponseToJSON;
21
+ exports.PaginatedResponseMemoryEntryResponseToJSONTyped = PaginatedResponseMemoryEntryResponseToJSONTyped;
22
+ const MemoryEntryResponse_1 = require("./MemoryEntryResponse");
23
+ exports.PaginatedResponseMemoryEntryResponsePropertyValidationAttributesMap = {
24
24
  total: {
25
25
  minimum: 0,
26
26
  exclusiveMinimum: false,
@@ -35,9 +35,9 @@ exports.PaginatedResponseMemoryChunkResponsePropertyValidationAttributesMap = {
35
35
  },
36
36
  };
37
37
  /**
38
- * Check if a given object implements the PaginatedResponseMemoryChunkResponse interface.
38
+ * Check if a given object implements the PaginatedResponseMemoryEntryResponse interface.
39
39
  */
40
- function instanceOfPaginatedResponseMemoryChunkResponse(value) {
40
+ function instanceOfPaginatedResponseMemoryEntryResponse(value) {
41
41
  if (!('items' in value) || value['items'] === undefined)
42
42
  return false;
43
43
  if (!('total' in value) || value['total'] === undefined)
@@ -48,29 +48,29 @@ function instanceOfPaginatedResponseMemoryChunkResponse(value) {
48
48
  return false;
49
49
  return true;
50
50
  }
51
- function PaginatedResponseMemoryChunkResponseFromJSON(json) {
52
- return PaginatedResponseMemoryChunkResponseFromJSONTyped(json, false);
51
+ function PaginatedResponseMemoryEntryResponseFromJSON(json) {
52
+ return PaginatedResponseMemoryEntryResponseFromJSONTyped(json, false);
53
53
  }
54
- function PaginatedResponseMemoryChunkResponseFromJSONTyped(json, ignoreDiscriminator) {
54
+ function PaginatedResponseMemoryEntryResponseFromJSONTyped(json, ignoreDiscriminator) {
55
55
  if (json == null) {
56
56
  return json;
57
57
  }
58
58
  return {
59
- 'items': (json['items'].map(MemoryChunkResponse_1.MemoryChunkResponseFromJSON)),
59
+ 'items': (json['items'].map(MemoryEntryResponse_1.MemoryEntryResponseFromJSON)),
60
60
  'total': json['total'],
61
61
  'limit': json['limit'],
62
62
  'offset': json['offset'],
63
63
  };
64
64
  }
65
- function PaginatedResponseMemoryChunkResponseToJSON(json) {
66
- return PaginatedResponseMemoryChunkResponseToJSONTyped(json, false);
65
+ function PaginatedResponseMemoryEntryResponseToJSON(json) {
66
+ return PaginatedResponseMemoryEntryResponseToJSONTyped(json, false);
67
67
  }
68
- function PaginatedResponseMemoryChunkResponseToJSONTyped(value, ignoreDiscriminator = false) {
68
+ function PaginatedResponseMemoryEntryResponseToJSONTyped(value, ignoreDiscriminator = false) {
69
69
  if (value == null) {
70
70
  return value;
71
71
  }
72
72
  return {
73
- 'items': (value['items'].map(MemoryChunkResponse_1.MemoryChunkResponseToJSON)),
73
+ 'items': (value['items'].map(MemoryEntryResponse_1.MemoryEntryResponseToJSON)),
74
74
  'total': value['total'],
75
75
  'limit': value['limit'],
76
76
  'offset': value['offset'],
@@ -0,0 +1,66 @@
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
+ import type { RepoVersionResponse } from './RepoVersionResponse';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface PaginatedResponseRepoVersionResponse
17
+ */
18
+ export interface PaginatedResponseRepoVersionResponse {
19
+ /**
20
+ * List of items
21
+ * @type {Array<RepoVersionResponse>}
22
+ * @memberof PaginatedResponseRepoVersionResponse
23
+ */
24
+ items: Array<RepoVersionResponse>;
25
+ /**
26
+ * Total number of items
27
+ * @type {number}
28
+ * @memberof PaginatedResponseRepoVersionResponse
29
+ */
30
+ total: number;
31
+ /**
32
+ * Number of items per page
33
+ * @type {number}
34
+ * @memberof PaginatedResponseRepoVersionResponse
35
+ */
36
+ limit: number;
37
+ /**
38
+ * Number of items to skip
39
+ * @type {number}
40
+ * @memberof PaginatedResponseRepoVersionResponse
41
+ */
42
+ offset: number;
43
+ }
44
+ export declare const PaginatedResponseRepoVersionResponsePropertyValidationAttributesMap: {
45
+ [property: string]: {
46
+ maxLength?: number;
47
+ minLength?: number;
48
+ pattern?: string;
49
+ maximum?: number;
50
+ exclusiveMaximum?: boolean;
51
+ minimum?: number;
52
+ exclusiveMinimum?: boolean;
53
+ multipleOf?: number;
54
+ maxItems?: number;
55
+ minItems?: number;
56
+ uniqueItems?: boolean;
57
+ };
58
+ };
59
+ /**
60
+ * Check if a given object implements the PaginatedResponseRepoVersionResponse interface.
61
+ */
62
+ export declare function instanceOfPaginatedResponseRepoVersionResponse(value: object): value is PaginatedResponseRepoVersionResponse;
63
+ export declare function PaginatedResponseRepoVersionResponseFromJSON(json: any): PaginatedResponseRepoVersionResponse;
64
+ export declare function PaginatedResponseRepoVersionResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): PaginatedResponseRepoVersionResponse;
65
+ export declare function PaginatedResponseRepoVersionResponseToJSON(json: any): PaginatedResponseRepoVersionResponse;
66
+ export declare function PaginatedResponseRepoVersionResponseToJSONTyped(value?: PaginatedResponseRepoVersionResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.PaginatedResponseRepoVersionResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfPaginatedResponseRepoVersionResponse = instanceOfPaginatedResponseRepoVersionResponse;
18
+ exports.PaginatedResponseRepoVersionResponseFromJSON = PaginatedResponseRepoVersionResponseFromJSON;
19
+ exports.PaginatedResponseRepoVersionResponseFromJSONTyped = PaginatedResponseRepoVersionResponseFromJSONTyped;
20
+ exports.PaginatedResponseRepoVersionResponseToJSON = PaginatedResponseRepoVersionResponseToJSON;
21
+ exports.PaginatedResponseRepoVersionResponseToJSONTyped = PaginatedResponseRepoVersionResponseToJSONTyped;
22
+ const RepoVersionResponse_1 = require("./RepoVersionResponse");
23
+ exports.PaginatedResponseRepoVersionResponsePropertyValidationAttributesMap = {
24
+ total: {
25
+ minimum: 0,
26
+ exclusiveMinimum: false,
27
+ },
28
+ limit: {
29
+ minimum: 1,
30
+ exclusiveMinimum: false,
31
+ },
32
+ offset: {
33
+ minimum: 0,
34
+ exclusiveMinimum: false,
35
+ },
36
+ };
37
+ /**
38
+ * Check if a given object implements the PaginatedResponseRepoVersionResponse interface.
39
+ */
40
+ function instanceOfPaginatedResponseRepoVersionResponse(value) {
41
+ if (!('items' in value) || value['items'] === undefined)
42
+ return false;
43
+ if (!('total' in value) || value['total'] === undefined)
44
+ return false;
45
+ if (!('limit' in value) || value['limit'] === undefined)
46
+ return false;
47
+ if (!('offset' in value) || value['offset'] === undefined)
48
+ return false;
49
+ return true;
50
+ }
51
+ function PaginatedResponseRepoVersionResponseFromJSON(json) {
52
+ return PaginatedResponseRepoVersionResponseFromJSONTyped(json, false);
53
+ }
54
+ function PaginatedResponseRepoVersionResponseFromJSONTyped(json, ignoreDiscriminator) {
55
+ if (json == null) {
56
+ return json;
57
+ }
58
+ return {
59
+ 'items': (json['items'].map(RepoVersionResponse_1.RepoVersionResponseFromJSON)),
60
+ 'total': json['total'],
61
+ 'limit': json['limit'],
62
+ 'offset': json['offset'],
63
+ };
64
+ }
65
+ function PaginatedResponseRepoVersionResponseToJSON(json) {
66
+ return PaginatedResponseRepoVersionResponseToJSONTyped(json, false);
67
+ }
68
+ function PaginatedResponseRepoVersionResponseToJSONTyped(value, ignoreDiscriminator = false) {
69
+ if (value == null) {
70
+ return value;
71
+ }
72
+ return {
73
+ 'items': (value['items'].map(RepoVersionResponse_1.RepoVersionResponseToJSON)),
74
+ 'total': value['total'],
75
+ 'limit': value['limit'],
76
+ 'offset': value['offset'],
77
+ };
78
+ }
@@ -0,0 +1,60 @@
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
+ import type { RepoSaveSkipReason } from './RepoSaveSkipReason';
13
+ /**
14
+ *
15
+ * @export
16
+ * @interface RecordRepoSaveSkipRequest
17
+ */
18
+ export interface RecordRepoSaveSkipRequest {
19
+ /**
20
+ * The run whose turn produced the changes.
21
+ * @type {string}
22
+ * @memberof RecordRepoSaveSkipRequest
23
+ */
24
+ runId: string;
25
+ /**
26
+ *
27
+ * @type {RepoSaveSkipReason}
28
+ * @memberof RecordRepoSaveSkipRequest
29
+ */
30
+ reason: RepoSaveSkipReason;
31
+ /**
32
+ * A machine-readable code adding context, e.g. the refusal code (`repo_too_large`) or `commits_not_on_main`; never free text.
33
+ * @type {string}
34
+ * @memberof RecordRepoSaveSkipRequest
35
+ */
36
+ detail?: string | null;
37
+ }
38
+ export declare const RecordRepoSaveSkipRequestPropertyValidationAttributesMap: {
39
+ [property: string]: {
40
+ maxLength?: number;
41
+ minLength?: number;
42
+ pattern?: string;
43
+ maximum?: number;
44
+ exclusiveMaximum?: boolean;
45
+ minimum?: number;
46
+ exclusiveMinimum?: boolean;
47
+ multipleOf?: number;
48
+ maxItems?: number;
49
+ minItems?: number;
50
+ uniqueItems?: boolean;
51
+ };
52
+ };
53
+ /**
54
+ * Check if a given object implements the RecordRepoSaveSkipRequest interface.
55
+ */
56
+ export declare function instanceOfRecordRepoSaveSkipRequest(value: object): value is RecordRepoSaveSkipRequest;
57
+ export declare function RecordRepoSaveSkipRequestFromJSON(json: any): RecordRepoSaveSkipRequest;
58
+ export declare function RecordRepoSaveSkipRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): RecordRepoSaveSkipRequest;
59
+ export declare function RecordRepoSaveSkipRequestToJSON(json: any): RecordRepoSaveSkipRequest;
60
+ export declare function RecordRepoSaveSkipRequestToJSONTyped(value?: RecordRepoSaveSkipRequest | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,63 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RecordRepoSaveSkipRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfRecordRepoSaveSkipRequest = instanceOfRecordRepoSaveSkipRequest;
18
+ exports.RecordRepoSaveSkipRequestFromJSON = RecordRepoSaveSkipRequestFromJSON;
19
+ exports.RecordRepoSaveSkipRequestFromJSONTyped = RecordRepoSaveSkipRequestFromJSONTyped;
20
+ exports.RecordRepoSaveSkipRequestToJSON = RecordRepoSaveSkipRequestToJSON;
21
+ exports.RecordRepoSaveSkipRequestToJSONTyped = RecordRepoSaveSkipRequestToJSONTyped;
22
+ const RepoSaveSkipReason_1 = require("./RepoSaveSkipReason");
23
+ exports.RecordRepoSaveSkipRequestPropertyValidationAttributesMap = {
24
+ detail: {
25
+ pattern: '/^[a-z0-9_]{1,64}$/',
26
+ },
27
+ };
28
+ /**
29
+ * Check if a given object implements the RecordRepoSaveSkipRequest interface.
30
+ */
31
+ function instanceOfRecordRepoSaveSkipRequest(value) {
32
+ if (!('runId' in value) || value['runId'] === undefined)
33
+ return false;
34
+ if (!('reason' in value) || value['reason'] === undefined)
35
+ return false;
36
+ return true;
37
+ }
38
+ function RecordRepoSaveSkipRequestFromJSON(json) {
39
+ return RecordRepoSaveSkipRequestFromJSONTyped(json, false);
40
+ }
41
+ function RecordRepoSaveSkipRequestFromJSONTyped(json, ignoreDiscriminator) {
42
+ if (json == null) {
43
+ return json;
44
+ }
45
+ return {
46
+ 'runId': json['run_id'],
47
+ 'reason': (0, RepoSaveSkipReason_1.RepoSaveSkipReasonFromJSON)(json['reason']),
48
+ 'detail': json['detail'] == null ? undefined : json['detail'],
49
+ };
50
+ }
51
+ function RecordRepoSaveSkipRequestToJSON(json) {
52
+ return RecordRepoSaveSkipRequestToJSONTyped(json, false);
53
+ }
54
+ function RecordRepoSaveSkipRequestToJSONTyped(value, ignoreDiscriminator = false) {
55
+ if (value == null) {
56
+ return value;
57
+ }
58
+ return {
59
+ 'run_id': value['runId'],
60
+ 'reason': (0, RepoSaveSkipReason_1.RepoSaveSkipReasonToJSON)(value['reason']),
61
+ 'detail': value['detail'],
62
+ };
63
+ }
@@ -0,0 +1,126 @@
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
+ import type { RepoTreeEntry } from './RepoTreeEntry';
13
+ /**
14
+ * A retained run branch, independently of whether it reached main.
15
+ * @export
16
+ * @interface RepoBranchResponse
17
+ */
18
+ export interface RepoBranchResponse {
19
+ /**
20
+ *
21
+ * @type {string}
22
+ * @memberof RepoBranchResponse
23
+ */
24
+ versionId: string;
25
+ /**
26
+ *
27
+ * @type {string}
28
+ * @memberof RepoBranchResponse
29
+ */
30
+ headSha: string;
31
+ /**
32
+ *
33
+ * @type {string}
34
+ * @memberof RepoBranchResponse
35
+ */
36
+ previousHeadSha: string | null;
37
+ /**
38
+ *
39
+ * @type {number}
40
+ * @memberof RepoBranchResponse
41
+ */
42
+ commitsAdded: number;
43
+ /**
44
+ *
45
+ * @type {string}
46
+ * @memberof RepoBranchResponse
47
+ */
48
+ runId: string | null;
49
+ /**
50
+ *
51
+ * @type {string}
52
+ * @memberof RepoBranchResponse
53
+ */
54
+ savedByUserId: string;
55
+ /**
56
+ *
57
+ * @type {Date}
58
+ * @memberof RepoBranchResponse
59
+ */
60
+ savedAt: Date;
61
+ /**
62
+ *
63
+ * @type {string}
64
+ * @memberof RepoBranchResponse
65
+ */
66
+ instructionVersionId: string | null;
67
+ /**
68
+ * Retained run-branch version this publication integrated.
69
+ * @type {string}
70
+ * @memberof RepoBranchResponse
71
+ */
72
+ candidateVersionId?: string | null;
73
+ /**
74
+ *
75
+ * @type {string}
76
+ * @memberof RepoBranchResponse
77
+ */
78
+ branch: string;
79
+ /**
80
+ *
81
+ * @type {string}
82
+ * @memberof RepoBranchResponse
83
+ */
84
+ baseVersionId: string | null;
85
+ /**
86
+ *
87
+ * @type {string}
88
+ * @memberof RepoBranchResponse
89
+ */
90
+ integratedVersionId: string | null;
91
+ /**
92
+ *
93
+ * @type {string}
94
+ * @memberof RepoBranchResponse
95
+ */
96
+ integratedHeadSha: string | null;
97
+ /**
98
+ *
99
+ * @type {Array<RepoTreeEntry>}
100
+ * @memberof RepoBranchResponse
101
+ */
102
+ files: Array<RepoTreeEntry>;
103
+ }
104
+ export declare const RepoBranchResponsePropertyValidationAttributesMap: {
105
+ [property: string]: {
106
+ maxLength?: number;
107
+ minLength?: number;
108
+ pattern?: string;
109
+ maximum?: number;
110
+ exclusiveMaximum?: boolean;
111
+ minimum?: number;
112
+ exclusiveMinimum?: boolean;
113
+ multipleOf?: number;
114
+ maxItems?: number;
115
+ minItems?: number;
116
+ uniqueItems?: boolean;
117
+ };
118
+ };
119
+ /**
120
+ * Check if a given object implements the RepoBranchResponse interface.
121
+ */
122
+ export declare function instanceOfRepoBranchResponse(value: object): value is RepoBranchResponse;
123
+ export declare function RepoBranchResponseFromJSON(json: any): RepoBranchResponse;
124
+ export declare function RepoBranchResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): RepoBranchResponse;
125
+ export declare function RepoBranchResponseToJSON(json: any): RepoBranchResponse;
126
+ export declare function RepoBranchResponseToJSONTyped(value?: RepoBranchResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,103 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.RepoBranchResponsePropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfRepoBranchResponse = instanceOfRepoBranchResponse;
18
+ exports.RepoBranchResponseFromJSON = RepoBranchResponseFromJSON;
19
+ exports.RepoBranchResponseFromJSONTyped = RepoBranchResponseFromJSONTyped;
20
+ exports.RepoBranchResponseToJSON = RepoBranchResponseToJSON;
21
+ exports.RepoBranchResponseToJSONTyped = RepoBranchResponseToJSONTyped;
22
+ const RepoTreeEntry_1 = require("./RepoTreeEntry");
23
+ exports.RepoBranchResponsePropertyValidationAttributesMap = {};
24
+ /**
25
+ * Check if a given object implements the RepoBranchResponse interface.
26
+ */
27
+ function instanceOfRepoBranchResponse(value) {
28
+ if (!('versionId' in value) || value['versionId'] === undefined)
29
+ return false;
30
+ if (!('headSha' in value) || value['headSha'] === undefined)
31
+ return false;
32
+ if (!('previousHeadSha' in value) || value['previousHeadSha'] === undefined)
33
+ return false;
34
+ if (!('commitsAdded' in value) || value['commitsAdded'] === undefined)
35
+ return false;
36
+ if (!('runId' in value) || value['runId'] === undefined)
37
+ return false;
38
+ if (!('savedByUserId' in value) || value['savedByUserId'] === undefined)
39
+ return false;
40
+ if (!('savedAt' in value) || value['savedAt'] === undefined)
41
+ return false;
42
+ if (!('instructionVersionId' in value) || value['instructionVersionId'] === undefined)
43
+ return false;
44
+ if (!('branch' in value) || value['branch'] === undefined)
45
+ return false;
46
+ if (!('baseVersionId' in value) || value['baseVersionId'] === undefined)
47
+ return false;
48
+ if (!('integratedVersionId' in value) || value['integratedVersionId'] === undefined)
49
+ return false;
50
+ if (!('integratedHeadSha' in value) || value['integratedHeadSha'] === undefined)
51
+ return false;
52
+ if (!('files' in value) || value['files'] === undefined)
53
+ return false;
54
+ return true;
55
+ }
56
+ function RepoBranchResponseFromJSON(json) {
57
+ return RepoBranchResponseFromJSONTyped(json, false);
58
+ }
59
+ function RepoBranchResponseFromJSONTyped(json, ignoreDiscriminator) {
60
+ if (json == null) {
61
+ return json;
62
+ }
63
+ return {
64
+ 'versionId': json['version_id'],
65
+ 'headSha': json['head_sha'],
66
+ 'previousHeadSha': json['previous_head_sha'],
67
+ 'commitsAdded': json['commits_added'],
68
+ 'runId': json['run_id'],
69
+ 'savedByUserId': json['saved_by_user_id'],
70
+ 'savedAt': (new Date(json['saved_at'])),
71
+ 'instructionVersionId': json['instruction_version_id'],
72
+ 'candidateVersionId': json['candidate_version_id'] == null ? undefined : json['candidate_version_id'],
73
+ 'branch': json['branch'],
74
+ 'baseVersionId': json['base_version_id'],
75
+ 'integratedVersionId': json['integrated_version_id'],
76
+ 'integratedHeadSha': json['integrated_head_sha'],
77
+ 'files': (json['files'].map(RepoTreeEntry_1.RepoTreeEntryFromJSON)),
78
+ };
79
+ }
80
+ function RepoBranchResponseToJSON(json) {
81
+ return RepoBranchResponseToJSONTyped(json, false);
82
+ }
83
+ function RepoBranchResponseToJSONTyped(value, ignoreDiscriminator = false) {
84
+ if (value == null) {
85
+ return value;
86
+ }
87
+ return {
88
+ 'version_id': value['versionId'],
89
+ 'head_sha': value['headSha'],
90
+ 'previous_head_sha': value['previousHeadSha'],
91
+ 'commits_added': value['commitsAdded'],
92
+ 'run_id': value['runId'],
93
+ 'saved_by_user_id': value['savedByUserId'],
94
+ 'saved_at': value['savedAt'].toISOString(),
95
+ 'instruction_version_id': value['instructionVersionId'],
96
+ 'candidate_version_id': value['candidateVersionId'],
97
+ 'branch': value['branch'],
98
+ 'base_version_id': value['baseVersionId'],
99
+ 'integrated_version_id': value['integratedVersionId'],
100
+ 'integrated_head_sha': value['integratedHeadSha'],
101
+ 'files': (value['files'].map(RepoTreeEntry_1.RepoTreeEntryToJSON)),
102
+ };
103
+ }