@knowledge-stack/ksapi 2.12.0 → 2.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +2 -0
- package/README.md +3 -2
- package/dist/apis/FoldersApi.d.ts +10 -10
- package/dist/apis/FoldersApi.js +4 -4
- package/dist/esm/apis/FoldersApi.d.ts +10 -10
- package/dist/esm/apis/FoldersApi.js +5 -5
- package/dist/esm/models/SearchItemsResponse.d.ts +77 -0
- package/dist/esm/models/SearchItemsResponse.js +72 -0
- package/dist/esm/models/SearchSortOrder.d.ts +6 -1
- package/dist/esm/models/SearchSortOrder.js +6 -1
- package/dist/esm/models/SearchablePartType.d.ts +1 -0
- package/dist/esm/models/SearchablePartType.js +2 -1
- package/dist/esm/models/index.d.ts +1 -0
- package/dist/esm/models/index.js +1 -0
- package/dist/models/SearchItemsResponse.d.ts +77 -0
- package/dist/models/SearchItemsResponse.js +80 -0
- package/dist/models/SearchSortOrder.d.ts +6 -1
- package/dist/models/SearchSortOrder.js +6 -1
- package/dist/models/SearchablePartType.d.ts +1 -0
- package/dist/models/SearchablePartType.js +2 -1
- package/dist/models/index.d.ts +1 -0
- package/dist/models/index.js +1 -0
- package/docs/FoldersApi.md +7 -7
- package/docs/SearchItemsResponse.md +43 -0
- package/docs/SearchSortOrder.md +1 -1
- package/package.json +1 -1
- package/src/apis/FoldersApi.ts +17 -14
- package/src/models/SearchItemsResponse.ts +141 -0
- package/src/models/SearchSortOrder.ts +6 -1
- package/src/models/SearchablePartType.ts +2 -1
- package/src/models/index.ts +1 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -293,6 +293,7 @@ docs/RunTimeseriesResponse.md
|
|
|
293
293
|
docs/SSOInitiateResponse.md
|
|
294
294
|
docs/ScheduleCadence.md
|
|
295
295
|
docs/ScoredChunkResponse.md
|
|
296
|
+
docs/SearchItemsResponse.md
|
|
296
297
|
docs/SearchSkillsRequest.md
|
|
297
298
|
docs/SearchSkillsResponse.md
|
|
298
299
|
docs/SearchSortOrder.md
|
|
@@ -748,6 +749,7 @@ src/models/RunTimeseriesResponse.ts
|
|
|
748
749
|
src/models/SSOInitiateResponse.ts
|
|
749
750
|
src/models/ScheduleCadence.ts
|
|
750
751
|
src/models/ScoredChunkResponse.ts
|
|
752
|
+
src/models/SearchItemsResponse.ts
|
|
751
753
|
src/models/SearchSkillsRequest.ts
|
|
752
754
|
src/models/SearchSkillsResponse.ts
|
|
753
755
|
src/models/SearchSortOrder.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@2.12.
|
|
1
|
+
# @knowledge-stack/ksapi@2.12.1
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -570,6 +570,7 @@ All URIs are relative to *http://localhost:8000*
|
|
|
570
570
|
- [SSOInitiateResponse](docs/SSOInitiateResponse.md)
|
|
571
571
|
- [ScheduleCadence](docs/ScheduleCadence.md)
|
|
572
572
|
- [ScoredChunkResponse](docs/ScoredChunkResponse.md)
|
|
573
|
+
- [SearchItemsResponse](docs/SearchItemsResponse.md)
|
|
573
574
|
- [SearchSkillsRequest](docs/SearchSkillsRequest.md)
|
|
574
575
|
- [SearchSkillsResponse](docs/SearchSkillsResponse.md)
|
|
575
576
|
- [SearchSortOrder](docs/SearchSortOrder.md)
|
|
@@ -724,7 +725,7 @@ and is automatically generated by the
|
|
|
724
725
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
725
726
|
|
|
726
727
|
- API version: `0.1.0`
|
|
727
|
-
- Package version: `2.12.
|
|
728
|
+
- Package version: `2.12.1`
|
|
728
729
|
- Generator version: `7.21.0`
|
|
729
730
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
730
731
|
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ContentsSortOrder, CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat, PaginatedResponseFolderResponse, PathOrder, PathPartApprovalState, SearchSortOrder, SearchablePartType, SortDirection, UpdateFolderRequest } from '../models/index';
|
|
13
|
+
import type { ContentsSortOrder, CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat, PaginatedResponseFolderResponse, PathOrder, PathPartApprovalState, SearchItemsResponse, SearchSortOrder, SearchablePartType, SortDirection, UpdateFolderRequest } from '../models/index';
|
|
14
14
|
export interface CreateFolderOperationRequest {
|
|
15
15
|
createFolderRequest: CreateFolderRequest;
|
|
16
16
|
}
|
|
@@ -58,8 +58,8 @@ export interface ListFoldersRequest {
|
|
|
58
58
|
}
|
|
59
59
|
export interface SearchItemsRequest {
|
|
60
60
|
nameLike: string;
|
|
61
|
+
partType?: Array<SearchablePartType>;
|
|
61
62
|
sortOrder?: SearchSortOrder;
|
|
62
|
-
partType?: SearchablePartType;
|
|
63
63
|
withTags?: boolean;
|
|
64
64
|
parentPathPartId?: string | null;
|
|
65
65
|
limit?: number;
|
|
@@ -258,8 +258,8 @@ export interface FoldersApiInterface {
|
|
|
258
258
|
/**
|
|
259
259
|
* Creates request options for searchItems without sending the request
|
|
260
260
|
* @param {string} nameLike Case-insensitive partial name search
|
|
261
|
-
* @param {
|
|
262
|
-
* @param {
|
|
261
|
+
* @param {Array<SearchablePartType>} [partType] Filter by item type; repeat the parameter to select several (default: all searchable types)
|
|
262
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: RELEVANCE)
|
|
263
263
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
264
264
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
265
265
|
* @param {number} [limit] Number of items per page
|
|
@@ -272,8 +272,8 @@ export interface FoldersApiInterface {
|
|
|
272
272
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
273
273
|
* @summary Search Items Handler
|
|
274
274
|
* @param {string} nameLike Case-insensitive partial name search
|
|
275
|
-
* @param {
|
|
276
|
-
* @param {
|
|
275
|
+
* @param {Array<SearchablePartType>} [partType] Filter by item type; repeat the parameter to select several (default: all searchable types)
|
|
276
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: RELEVANCE)
|
|
277
277
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
278
278
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
279
279
|
* @param {number} [limit] Number of items per page
|
|
@@ -282,12 +282,12 @@ export interface FoldersApiInterface {
|
|
|
282
282
|
* @throws {RequiredError}
|
|
283
283
|
* @memberof FoldersApiInterface
|
|
284
284
|
*/
|
|
285
|
-
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
285
|
+
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchItemsResponse>>;
|
|
286
286
|
/**
|
|
287
287
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
288
288
|
* Search Items Handler
|
|
289
289
|
*/
|
|
290
|
-
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
290
|
+
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchItemsResponse>;
|
|
291
291
|
/**
|
|
292
292
|
* Creates request options for updateFolder without sending the request
|
|
293
293
|
* @param {string} folderId
|
|
@@ -406,12 +406,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
406
406
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
407
407
|
* Search Items Handler
|
|
408
408
|
*/
|
|
409
|
-
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
409
|
+
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchItemsResponse>>;
|
|
410
410
|
/**
|
|
411
411
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
412
412
|
* Search Items Handler
|
|
413
413
|
*/
|
|
414
|
-
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
414
|
+
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchItemsResponse>;
|
|
415
415
|
/**
|
|
416
416
|
* Creates request options for updateFolder without sending the request
|
|
417
417
|
*/
|
package/dist/apis/FoldersApi.js
CHANGED
|
@@ -443,12 +443,12 @@ class FoldersApi extends runtime.BaseAPI {
|
|
|
443
443
|
if (requestParameters['nameLike'] != null) {
|
|
444
444
|
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
445
445
|
}
|
|
446
|
-
if (requestParameters['sortOrder'] != null) {
|
|
447
|
-
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
448
|
-
}
|
|
449
446
|
if (requestParameters['partType'] != null) {
|
|
450
447
|
queryParameters['part_type'] = requestParameters['partType'];
|
|
451
448
|
}
|
|
449
|
+
if (requestParameters['sortOrder'] != null) {
|
|
450
|
+
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
451
|
+
}
|
|
452
452
|
if (requestParameters['withTags'] != null) {
|
|
453
453
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
454
454
|
}
|
|
@@ -486,7 +486,7 @@ class FoldersApi extends runtime.BaseAPI {
|
|
|
486
486
|
return __awaiter(this, void 0, void 0, function* () {
|
|
487
487
|
const requestOptions = yield this.searchItemsRequestOpts(requestParameters);
|
|
488
488
|
const response = yield this.request(requestOptions, initOverrides);
|
|
489
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.
|
|
489
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.SearchItemsResponseFromJSON)(jsonValue));
|
|
490
490
|
});
|
|
491
491
|
}
|
|
492
492
|
/**
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { ContentsSortOrder, CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat, PaginatedResponseFolderResponse, PathOrder, PathPartApprovalState, SearchSortOrder, SearchablePartType, SortDirection, UpdateFolderRequest } from '../models/index';
|
|
13
|
+
import type { ContentsSortOrder, CreateFolderRequest, FolderAction, FolderActionResponse, FolderResponse, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat, PaginatedResponseFolderResponse, PathOrder, PathPartApprovalState, SearchItemsResponse, SearchSortOrder, SearchablePartType, SortDirection, UpdateFolderRequest } from '../models/index';
|
|
14
14
|
export interface CreateFolderOperationRequest {
|
|
15
15
|
createFolderRequest: CreateFolderRequest;
|
|
16
16
|
}
|
|
@@ -58,8 +58,8 @@ export interface ListFoldersRequest {
|
|
|
58
58
|
}
|
|
59
59
|
export interface SearchItemsRequest {
|
|
60
60
|
nameLike: string;
|
|
61
|
+
partType?: Array<SearchablePartType>;
|
|
61
62
|
sortOrder?: SearchSortOrder;
|
|
62
|
-
partType?: SearchablePartType;
|
|
63
63
|
withTags?: boolean;
|
|
64
64
|
parentPathPartId?: string | null;
|
|
65
65
|
limit?: number;
|
|
@@ -258,8 +258,8 @@ export interface FoldersApiInterface {
|
|
|
258
258
|
/**
|
|
259
259
|
* Creates request options for searchItems without sending the request
|
|
260
260
|
* @param {string} nameLike Case-insensitive partial name search
|
|
261
|
-
* @param {
|
|
262
|
-
* @param {
|
|
261
|
+
* @param {Array<SearchablePartType>} [partType] Filter by item type; repeat the parameter to select several (default: all searchable types)
|
|
262
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: RELEVANCE)
|
|
263
263
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
264
264
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
265
265
|
* @param {number} [limit] Number of items per page
|
|
@@ -272,8 +272,8 @@ export interface FoldersApiInterface {
|
|
|
272
272
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
273
273
|
* @summary Search Items Handler
|
|
274
274
|
* @param {string} nameLike Case-insensitive partial name search
|
|
275
|
-
* @param {
|
|
276
|
-
* @param {
|
|
275
|
+
* @param {Array<SearchablePartType>} [partType] Filter by item type; repeat the parameter to select several (default: all searchable types)
|
|
276
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: RELEVANCE)
|
|
277
277
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
278
278
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
279
279
|
* @param {number} [limit] Number of items per page
|
|
@@ -282,12 +282,12 @@ export interface FoldersApiInterface {
|
|
|
282
282
|
* @throws {RequiredError}
|
|
283
283
|
* @memberof FoldersApiInterface
|
|
284
284
|
*/
|
|
285
|
-
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
285
|
+
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchItemsResponse>>;
|
|
286
286
|
/**
|
|
287
287
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
288
288
|
* Search Items Handler
|
|
289
289
|
*/
|
|
290
|
-
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
290
|
+
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchItemsResponse>;
|
|
291
291
|
/**
|
|
292
292
|
* Creates request options for updateFolder without sending the request
|
|
293
293
|
* @param {string} folderId
|
|
@@ -406,12 +406,12 @@ export declare class FoldersApi extends runtime.BaseAPI implements FoldersApiInt
|
|
|
406
406
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
407
407
|
* Search Items Handler
|
|
408
408
|
*/
|
|
409
|
-
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
409
|
+
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchItemsResponse>>;
|
|
410
410
|
/**
|
|
411
411
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
412
412
|
* Search Items Handler
|
|
413
413
|
*/
|
|
414
|
-
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
414
|
+
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchItemsResponse>;
|
|
415
415
|
/**
|
|
416
416
|
* Creates request options for updateFolder without sending the request
|
|
417
417
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { CreateFolderRequestToJSON, FolderActionResponseFromJSON, FolderResponseFromJSON, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSON, PaginatedResponseFolderResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
24
|
+
import { CreateFolderRequestToJSON, FolderActionResponseFromJSON, FolderResponseFromJSON, PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDatFromJSON, PaginatedResponseFolderResponseFromJSON, SearchItemsResponseFromJSON, UpdateFolderRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -407,12 +407,12 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
407
407
|
if (requestParameters['nameLike'] != null) {
|
|
408
408
|
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
409
409
|
}
|
|
410
|
-
if (requestParameters['sortOrder'] != null) {
|
|
411
|
-
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
412
|
-
}
|
|
413
410
|
if (requestParameters['partType'] != null) {
|
|
414
411
|
queryParameters['part_type'] = requestParameters['partType'];
|
|
415
412
|
}
|
|
413
|
+
if (requestParameters['sortOrder'] != null) {
|
|
414
|
+
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
415
|
+
}
|
|
416
416
|
if (requestParameters['withTags'] != null) {
|
|
417
417
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
418
418
|
}
|
|
@@ -450,7 +450,7 @@ export class FoldersApi extends runtime.BaseAPI {
|
|
|
450
450
|
return __awaiter(this, void 0, void 0, function* () {
|
|
451
451
|
const requestOptions = yield this.searchItemsRequestOpts(requestParameters);
|
|
452
452
|
const response = yield this.request(requestOptions, initOverrides);
|
|
453
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
453
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SearchItemsResponseFromJSON(jsonValue));
|
|
454
454
|
});
|
|
455
455
|
}
|
|
456
456
|
/**
|
|
@@ -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
|
+
import type { FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR } from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
13
|
+
/**
|
|
14
|
+
* A search page plus how many items of each type the query matched.
|
|
15
|
+
*
|
|
16
|
+
* ``counts_by_type`` ignores any ``part_type`` filter so the filter chips can
|
|
17
|
+
* keep showing every type's count while one of them is selected.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SearchItemsResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface SearchItemsResponse {
|
|
22
|
+
/**
|
|
23
|
+
* List of items
|
|
24
|
+
* @type {Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>}
|
|
25
|
+
* @memberof SearchItemsResponse
|
|
26
|
+
*/
|
|
27
|
+
items: Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>;
|
|
28
|
+
/**
|
|
29
|
+
* Total number of items
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SearchItemsResponse
|
|
32
|
+
*/
|
|
33
|
+
total: number;
|
|
34
|
+
/**
|
|
35
|
+
* Number of items per page
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SearchItemsResponse
|
|
38
|
+
*/
|
|
39
|
+
limit: number;
|
|
40
|
+
/**
|
|
41
|
+
* Number of items to skip
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SearchItemsResponse
|
|
44
|
+
*/
|
|
45
|
+
offset: number;
|
|
46
|
+
/**
|
|
47
|
+
* Matches per item type, keyed by SearchablePartType and unaffected by the part_type filter
|
|
48
|
+
* @type {{ [key: string]: number; }}
|
|
49
|
+
* @memberof SearchItemsResponse
|
|
50
|
+
*/
|
|
51
|
+
countsByType?: {
|
|
52
|
+
[key: string]: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export declare const SearchItemsResponsePropertyValidationAttributesMap: {
|
|
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 SearchItemsResponse interface.
|
|
72
|
+
*/
|
|
73
|
+
export declare function instanceOfSearchItemsResponse(value: object): value is SearchItemsResponse;
|
|
74
|
+
export declare function SearchItemsResponseFromJSON(json: any): SearchItemsResponse;
|
|
75
|
+
export declare function SearchItemsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchItemsResponse;
|
|
76
|
+
export declare function SearchItemsResponseToJSON(json: any): SearchItemsResponse;
|
|
77
|
+
export declare function SearchItemsResponseToJSONTyped(value?: SearchItemsResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,72 @@
|
|
|
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
|
+
import { FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON, FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON, } from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
15
|
+
export const SearchItemsResponsePropertyValidationAttributesMap = {
|
|
16
|
+
total: {
|
|
17
|
+
minimum: 0,
|
|
18
|
+
exclusiveMinimum: false,
|
|
19
|
+
},
|
|
20
|
+
limit: {
|
|
21
|
+
minimum: 1,
|
|
22
|
+
exclusiveMinimum: false,
|
|
23
|
+
},
|
|
24
|
+
offset: {
|
|
25
|
+
minimum: 0,
|
|
26
|
+
exclusiveMinimum: false,
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Check if a given object implements the SearchItemsResponse interface.
|
|
31
|
+
*/
|
|
32
|
+
export function instanceOfSearchItemsResponse(value) {
|
|
33
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
34
|
+
return false;
|
|
35
|
+
if (!('total' in value) || value['total'] === undefined)
|
|
36
|
+
return false;
|
|
37
|
+
if (!('limit' in value) || value['limit'] === undefined)
|
|
38
|
+
return false;
|
|
39
|
+
if (!('offset' in value) || value['offset'] === undefined)
|
|
40
|
+
return false;
|
|
41
|
+
return true;
|
|
42
|
+
}
|
|
43
|
+
export function SearchItemsResponseFromJSON(json) {
|
|
44
|
+
return SearchItemsResponseFromJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function SearchItemsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
47
|
+
if (json == null) {
|
|
48
|
+
return json;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'items': (json['items'].map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON)),
|
|
52
|
+
'total': json['total'],
|
|
53
|
+
'limit': json['limit'],
|
|
54
|
+
'offset': json['offset'],
|
|
55
|
+
'countsByType': json['counts_by_type'] == null ? undefined : json['counts_by_type'],
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export function SearchItemsResponseToJSON(json) {
|
|
59
|
+
return SearchItemsResponseToJSONTyped(json, false);
|
|
60
|
+
}
|
|
61
|
+
export function SearchItemsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
62
|
+
if (value == null) {
|
|
63
|
+
return value;
|
|
64
|
+
}
|
|
65
|
+
return {
|
|
66
|
+
'items': (value['items'].map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON)),
|
|
67
|
+
'total': value['total'],
|
|
68
|
+
'limit': value['limit'],
|
|
69
|
+
'offset': value['offset'],
|
|
70
|
+
'counts_by_type': value['countsByType'],
|
|
71
|
+
};
|
|
72
|
+
}
|
|
@@ -10,10 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Ordering for flat name search.
|
|
14
|
+
*
|
|
15
|
+
* RELEVANCE ranks an exact name match first, then names starting with the
|
|
16
|
+
* query, then by how closely the name matches, then shorter names, then
|
|
17
|
+
* alphabetically.
|
|
14
18
|
* @export
|
|
15
19
|
*/
|
|
16
20
|
export declare const SearchSortOrder: {
|
|
21
|
+
readonly Relevance: 'RELEVANCE';
|
|
17
22
|
readonly Name: 'NAME';
|
|
18
23
|
readonly UpdatedAt: 'UPDATED_AT';
|
|
19
24
|
readonly CreatedAt: 'CREATED_AT';
|
|
@@ -12,10 +12,15 @@
|
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
14
|
/**
|
|
15
|
-
*
|
|
15
|
+
* Ordering for flat name search.
|
|
16
|
+
*
|
|
17
|
+
* RELEVANCE ranks an exact name match first, then names starting with the
|
|
18
|
+
* query, then by how closely the name matches, then shorter names, then
|
|
19
|
+
* alphabetically.
|
|
16
20
|
* @export
|
|
17
21
|
*/
|
|
18
22
|
export const SearchSortOrder = {
|
|
23
|
+
Relevance: 'RELEVANCE',
|
|
19
24
|
Name: 'NAME',
|
|
20
25
|
UpdatedAt: 'UPDATED_AT',
|
|
21
26
|
CreatedAt: 'CREATED_AT'
|
|
@@ -22,6 +22,7 @@ export declare const SearchablePartType: {
|
|
|
22
22
|
readonly DataSourceSchema: 'DATA_SOURCE_SCHEMA';
|
|
23
23
|
readonly DataSourceTable: 'DATA_SOURCE_TABLE';
|
|
24
24
|
readonly ApiConnection: 'API_CONNECTION';
|
|
25
|
+
readonly Skill: 'SKILL';
|
|
25
26
|
};
|
|
26
27
|
export type SearchablePartType = typeof SearchablePartType[keyof typeof SearchablePartType];
|
|
27
28
|
export declare function instanceOfSearchablePartType(value: any): boolean;
|
|
@@ -23,7 +23,8 @@ export const SearchablePartType = {
|
|
|
23
23
|
DataSource: 'DATA_SOURCE',
|
|
24
24
|
DataSourceSchema: 'DATA_SOURCE_SCHEMA',
|
|
25
25
|
DataSourceTable: 'DATA_SOURCE_TABLE',
|
|
26
|
-
ApiConnection: 'API_CONNECTION'
|
|
26
|
+
ApiConnection: 'API_CONNECTION',
|
|
27
|
+
Skill: 'SKILL'
|
|
27
28
|
};
|
|
28
29
|
export function instanceOfSearchablePartType(value) {
|
|
29
30
|
for (const key in SearchablePartType) {
|
|
@@ -263,6 +263,7 @@ export * from './RunTimeseriesResponse';
|
|
|
263
263
|
export * from './SSOInitiateResponse';
|
|
264
264
|
export * from './ScheduleCadence';
|
|
265
265
|
export * from './ScoredChunkResponse';
|
|
266
|
+
export * from './SearchItemsResponse';
|
|
266
267
|
export * from './SearchSkillsRequest';
|
|
267
268
|
export * from './SearchSkillsResponse';
|
|
268
269
|
export * from './SearchSortOrder';
|
package/dist/esm/models/index.js
CHANGED
|
@@ -265,6 +265,7 @@ export * from './RunTimeseriesResponse';
|
|
|
265
265
|
export * from './SSOInitiateResponse';
|
|
266
266
|
export * from './ScheduleCadence';
|
|
267
267
|
export * from './ScoredChunkResponse';
|
|
268
|
+
export * from './SearchItemsResponse';
|
|
268
269
|
export * from './SearchSkillsRequest';
|
|
269
270
|
export * from './SearchSkillsResponse';
|
|
270
271
|
export * from './SearchSortOrder';
|
|
@@ -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
|
+
import type { FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR } from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
13
|
+
/**
|
|
14
|
+
* A search page plus how many items of each type the query matched.
|
|
15
|
+
*
|
|
16
|
+
* ``counts_by_type`` ignores any ``part_type`` filter so the filter chips can
|
|
17
|
+
* keep showing every type's count while one of them is selected.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface SearchItemsResponse
|
|
20
|
+
*/
|
|
21
|
+
export interface SearchItemsResponse {
|
|
22
|
+
/**
|
|
23
|
+
* List of items
|
|
24
|
+
* @type {Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>}
|
|
25
|
+
* @memberof SearchItemsResponse
|
|
26
|
+
*/
|
|
27
|
+
items: Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>;
|
|
28
|
+
/**
|
|
29
|
+
* Total number of items
|
|
30
|
+
* @type {number}
|
|
31
|
+
* @memberof SearchItemsResponse
|
|
32
|
+
*/
|
|
33
|
+
total: number;
|
|
34
|
+
/**
|
|
35
|
+
* Number of items per page
|
|
36
|
+
* @type {number}
|
|
37
|
+
* @memberof SearchItemsResponse
|
|
38
|
+
*/
|
|
39
|
+
limit: number;
|
|
40
|
+
/**
|
|
41
|
+
* Number of items to skip
|
|
42
|
+
* @type {number}
|
|
43
|
+
* @memberof SearchItemsResponse
|
|
44
|
+
*/
|
|
45
|
+
offset: number;
|
|
46
|
+
/**
|
|
47
|
+
* Matches per item type, keyed by SearchablePartType and unaffected by the part_type filter
|
|
48
|
+
* @type {{ [key: string]: number; }}
|
|
49
|
+
* @memberof SearchItemsResponse
|
|
50
|
+
*/
|
|
51
|
+
countsByType?: {
|
|
52
|
+
[key: string]: number;
|
|
53
|
+
};
|
|
54
|
+
}
|
|
55
|
+
export declare const SearchItemsResponsePropertyValidationAttributesMap: {
|
|
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 SearchItemsResponse interface.
|
|
72
|
+
*/
|
|
73
|
+
export declare function instanceOfSearchItemsResponse(value: object): value is SearchItemsResponse;
|
|
74
|
+
export declare function SearchItemsResponseFromJSON(json: any): SearchItemsResponse;
|
|
75
|
+
export declare function SearchItemsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchItemsResponse;
|
|
76
|
+
export declare function SearchItemsResponseToJSON(json: any): SearchItemsResponse;
|
|
77
|
+
export declare function SearchItemsResponseToJSONTyped(value?: SearchItemsResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,80 @@
|
|
|
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.SearchItemsResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfSearchItemsResponse = instanceOfSearchItemsResponse;
|
|
18
|
+
exports.SearchItemsResponseFromJSON = SearchItemsResponseFromJSON;
|
|
19
|
+
exports.SearchItemsResponseFromJSONTyped = SearchItemsResponseFromJSONTyped;
|
|
20
|
+
exports.SearchItemsResponseToJSON = SearchItemsResponseToJSON;
|
|
21
|
+
exports.SearchItemsResponseToJSONTyped = SearchItemsResponseToJSONTyped;
|
|
22
|
+
const FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR_1 = require("./FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR");
|
|
23
|
+
exports.SearchItemsResponsePropertyValidationAttributesMap = {
|
|
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 SearchItemsResponse interface.
|
|
39
|
+
*/
|
|
40
|
+
function instanceOfSearchItemsResponse(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 SearchItemsResponseFromJSON(json) {
|
|
52
|
+
return SearchItemsResponseFromJSONTyped(json, false);
|
|
53
|
+
}
|
|
54
|
+
function SearchItemsResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
55
|
+
if (json == null) {
|
|
56
|
+
return json;
|
|
57
|
+
}
|
|
58
|
+
return {
|
|
59
|
+
'items': (json['items'].map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR_1.FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON)),
|
|
60
|
+
'total': json['total'],
|
|
61
|
+
'limit': json['limit'],
|
|
62
|
+
'offset': json['offset'],
|
|
63
|
+
'countsByType': json['counts_by_type'] == null ? undefined : json['counts_by_type'],
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function SearchItemsResponseToJSON(json) {
|
|
67
|
+
return SearchItemsResponseToJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
function SearchItemsResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
70
|
+
if (value == null) {
|
|
71
|
+
return value;
|
|
72
|
+
}
|
|
73
|
+
return {
|
|
74
|
+
'items': (value['items'].map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR_1.FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON)),
|
|
75
|
+
'total': value['total'],
|
|
76
|
+
'limit': value['limit'],
|
|
77
|
+
'offset': value['offset'],
|
|
78
|
+
'counts_by_type': value['countsByType'],
|
|
79
|
+
};
|
|
80
|
+
}
|
|
@@ -10,10 +10,15 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
* Ordering for flat name search.
|
|
14
|
+
*
|
|
15
|
+
* RELEVANCE ranks an exact name match first, then names starting with the
|
|
16
|
+
* query, then by how closely the name matches, then shorter names, then
|
|
17
|
+
* alphabetically.
|
|
14
18
|
* @export
|
|
15
19
|
*/
|
|
16
20
|
export declare const SearchSortOrder: {
|
|
21
|
+
readonly Relevance: 'RELEVANCE';
|
|
17
22
|
readonly Name: 'NAME';
|
|
18
23
|
readonly UpdatedAt: 'UPDATED_AT';
|
|
19
24
|
readonly CreatedAt: 'CREATED_AT';
|
|
@@ -20,10 +20,15 @@ exports.SearchSortOrderFromJSONTyped = SearchSortOrderFromJSONTyped;
|
|
|
20
20
|
exports.SearchSortOrderToJSON = SearchSortOrderToJSON;
|
|
21
21
|
exports.SearchSortOrderToJSONTyped = SearchSortOrderToJSONTyped;
|
|
22
22
|
/**
|
|
23
|
-
*
|
|
23
|
+
* Ordering for flat name search.
|
|
24
|
+
*
|
|
25
|
+
* RELEVANCE ranks an exact name match first, then names starting with the
|
|
26
|
+
* query, then by how closely the name matches, then shorter names, then
|
|
27
|
+
* alphabetically.
|
|
24
28
|
* @export
|
|
25
29
|
*/
|
|
26
30
|
exports.SearchSortOrder = {
|
|
31
|
+
Relevance: 'RELEVANCE',
|
|
27
32
|
Name: 'NAME',
|
|
28
33
|
UpdatedAt: 'UPDATED_AT',
|
|
29
34
|
CreatedAt: 'CREATED_AT'
|
|
@@ -22,6 +22,7 @@ export declare const SearchablePartType: {
|
|
|
22
22
|
readonly DataSourceSchema: 'DATA_SOURCE_SCHEMA';
|
|
23
23
|
readonly DataSourceTable: 'DATA_SOURCE_TABLE';
|
|
24
24
|
readonly ApiConnection: 'API_CONNECTION';
|
|
25
|
+
readonly Skill: 'SKILL';
|
|
25
26
|
};
|
|
26
27
|
export type SearchablePartType = typeof SearchablePartType[keyof typeof SearchablePartType];
|
|
27
28
|
export declare function instanceOfSearchablePartType(value: any): boolean;
|
|
@@ -31,7 +31,8 @@ exports.SearchablePartType = {
|
|
|
31
31
|
DataSource: 'DATA_SOURCE',
|
|
32
32
|
DataSourceSchema: 'DATA_SOURCE_SCHEMA',
|
|
33
33
|
DataSourceTable: 'DATA_SOURCE_TABLE',
|
|
34
|
-
ApiConnection: 'API_CONNECTION'
|
|
34
|
+
ApiConnection: 'API_CONNECTION',
|
|
35
|
+
Skill: 'SKILL'
|
|
35
36
|
};
|
|
36
37
|
function instanceOfSearchablePartType(value) {
|
|
37
38
|
for (const key in exports.SearchablePartType) {
|
package/dist/models/index.d.ts
CHANGED
|
@@ -263,6 +263,7 @@ export * from './RunTimeseriesResponse';
|
|
|
263
263
|
export * from './SSOInitiateResponse';
|
|
264
264
|
export * from './ScheduleCadence';
|
|
265
265
|
export * from './ScoredChunkResponse';
|
|
266
|
+
export * from './SearchItemsResponse';
|
|
266
267
|
export * from './SearchSkillsRequest';
|
|
267
268
|
export * from './SearchSkillsResponse';
|
|
268
269
|
export * from './SearchSortOrder';
|
package/dist/models/index.js
CHANGED
|
@@ -281,6 +281,7 @@ __exportStar(require("./RunTimeseriesResponse"), exports);
|
|
|
281
281
|
__exportStar(require("./SSOInitiateResponse"), exports);
|
|
282
282
|
__exportStar(require("./ScheduleCadence"), exports);
|
|
283
283
|
__exportStar(require("./ScoredChunkResponse"), exports);
|
|
284
|
+
__exportStar(require("./SearchItemsResponse"), exports);
|
|
284
285
|
__exportStar(require("./SearchSkillsRequest"), exports);
|
|
285
286
|
__exportStar(require("./SearchSkillsResponse"), exports);
|
|
286
287
|
__exportStar(require("./SearchSortOrder"), exports);
|
package/docs/FoldersApi.md
CHANGED
|
@@ -546,7 +546,7 @@ example().catch(console.error);
|
|
|
546
546
|
|
|
547
547
|
## searchItems
|
|
548
548
|
|
|
549
|
-
>
|
|
549
|
+
> SearchItemsResponse searchItems(nameLike, partType, sortOrder, withTags, parentPathPartId, limit, offset)
|
|
550
550
|
|
|
551
551
|
Search Items Handler
|
|
552
552
|
|
|
@@ -574,10 +574,10 @@ async function example() {
|
|
|
574
574
|
const body = {
|
|
575
575
|
// string | Case-insensitive partial name search
|
|
576
576
|
nameLike: nameLike_example,
|
|
577
|
-
//
|
|
578
|
-
sortOrder: ...,
|
|
579
|
-
// SearchablePartType | Filter by item type (default: all searchable types) (optional)
|
|
577
|
+
// Array<SearchablePartType> | Filter by item type; repeat the parameter to select several (default: all searchable types) (optional)
|
|
580
578
|
partType: ...,
|
|
579
|
+
// SearchSortOrder | Sort order for results (default: RELEVANCE) (optional)
|
|
580
|
+
sortOrder: ...,
|
|
581
581
|
// boolean | Include tags in the response (default: false) (optional)
|
|
582
582
|
withTags: true,
|
|
583
583
|
// string | Scope search to descendants of this folder\'s path part (optional)
|
|
@@ -606,8 +606,8 @@ example().catch(console.error);
|
|
|
606
606
|
| Name | Type | Description | Notes |
|
|
607
607
|
|------------- | ------------- | ------------- | -------------|
|
|
608
608
|
| **nameLike** | `string` | Case-insensitive partial name search | [Defaults to `undefined`] |
|
|
609
|
-
| **
|
|
610
|
-
| **
|
|
609
|
+
| **partType** | `Array<SearchablePartType>` | Filter by item type; repeat the parameter to select several (default: all searchable types) | [Optional] |
|
|
610
|
+
| **sortOrder** | `SearchSortOrder` | Sort order for results (default: RELEVANCE) | [Optional] [Defaults to `undefined`] [Enum: RELEVANCE, NAME, UPDATED_AT, CREATED_AT] |
|
|
611
611
|
| **withTags** | `boolean` | Include tags in the response (default: false) | [Optional] [Defaults to `false`] |
|
|
612
612
|
| **parentPathPartId** | `string` | Scope search to descendants of this folder\'s path part | [Optional] [Defaults to `undefined`] |
|
|
613
613
|
| **limit** | `number` | Number of items per page | [Optional] [Defaults to `20`] |
|
|
@@ -615,7 +615,7 @@ example().catch(console.error);
|
|
|
615
615
|
|
|
616
616
|
### Return type
|
|
617
617
|
|
|
618
|
-
[**
|
|
618
|
+
[**SearchItemsResponse**](SearchItemsResponse.md)
|
|
619
619
|
|
|
620
620
|
### Authorization
|
|
621
621
|
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
|
|
2
|
+
# SearchItemsResponse
|
|
3
|
+
|
|
4
|
+
A search page plus how many items of each type the query matched. ``counts_by_type`` ignores any ``part_type`` filter so the filter chips can keep showing every type\'s count while one of them is selected.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`items` | [Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>](FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR.md)
|
|
11
|
+
`total` | number
|
|
12
|
+
`limit` | number
|
|
13
|
+
`offset` | number
|
|
14
|
+
`countsByType` | { [key: string]: number; }
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { SearchItemsResponse } from '@knowledge-stack/ksapi'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"items": null,
|
|
24
|
+
"total": null,
|
|
25
|
+
"limit": null,
|
|
26
|
+
"offset": null,
|
|
27
|
+
"countsByType": null,
|
|
28
|
+
} satisfies SearchItemsResponse
|
|
29
|
+
|
|
30
|
+
console.log(example)
|
|
31
|
+
|
|
32
|
+
// Convert the instance to a JSON string
|
|
33
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
34
|
+
console.log(exampleJSON)
|
|
35
|
+
|
|
36
|
+
// Parse the JSON string back to an object
|
|
37
|
+
const exampleParsed = JSON.parse(exampleJSON) as SearchItemsResponse
|
|
38
|
+
console.log(exampleParsed)
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
42
|
+
|
|
43
|
+
|
package/docs/SearchSortOrder.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
2
|
# SearchSortOrder
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
Ordering for flat name search. RELEVANCE ranks an exact name match first, then names starting with the query, then by how closely the name matches, then shorter names, then alphabetically.
|
|
5
5
|
|
|
6
6
|
## Properties
|
|
7
7
|
|
package/package.json
CHANGED
package/src/apis/FoldersApi.ts
CHANGED
|
@@ -26,6 +26,7 @@ import type {
|
|
|
26
26
|
PaginatedResponseFolderResponse,
|
|
27
27
|
PathOrder,
|
|
28
28
|
PathPartApprovalState,
|
|
29
|
+
SearchItemsResponse,
|
|
29
30
|
SearchSortOrder,
|
|
30
31
|
SearchablePartType,
|
|
31
32
|
SortDirection,
|
|
@@ -54,6 +55,8 @@ import {
|
|
|
54
55
|
PathOrderToJSON,
|
|
55
56
|
PathPartApprovalStateFromJSON,
|
|
56
57
|
PathPartApprovalStateToJSON,
|
|
58
|
+
SearchItemsResponseFromJSON,
|
|
59
|
+
SearchItemsResponseToJSON,
|
|
57
60
|
SearchSortOrderFromJSON,
|
|
58
61
|
SearchSortOrderToJSON,
|
|
59
62
|
SearchablePartTypeFromJSON,
|
|
@@ -117,8 +120,8 @@ export interface ListFoldersRequest {
|
|
|
117
120
|
|
|
118
121
|
export interface SearchItemsRequest {
|
|
119
122
|
nameLike: string;
|
|
123
|
+
partType?: Array<SearchablePartType>;
|
|
120
124
|
sortOrder?: SearchSortOrder;
|
|
121
|
-
partType?: SearchablePartType;
|
|
122
125
|
withTags?: boolean;
|
|
123
126
|
parentPathPartId?: string | null;
|
|
124
127
|
limit?: number;
|
|
@@ -337,8 +340,8 @@ export interface FoldersApiInterface {
|
|
|
337
340
|
/**
|
|
338
341
|
* Creates request options for searchItems without sending the request
|
|
339
342
|
* @param {string} nameLike Case-insensitive partial name search
|
|
340
|
-
* @param {
|
|
341
|
-
* @param {
|
|
343
|
+
* @param {Array<SearchablePartType>} [partType] Filter by item type; repeat the parameter to select several (default: all searchable types)
|
|
344
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: RELEVANCE)
|
|
342
345
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
343
346
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
344
347
|
* @param {number} [limit] Number of items per page
|
|
@@ -352,8 +355,8 @@ export interface FoldersApiInterface {
|
|
|
352
355
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
353
356
|
* @summary Search Items Handler
|
|
354
357
|
* @param {string} nameLike Case-insensitive partial name search
|
|
355
|
-
* @param {
|
|
356
|
-
* @param {
|
|
358
|
+
* @param {Array<SearchablePartType>} [partType] Filter by item type; repeat the parameter to select several (default: all searchable types)
|
|
359
|
+
* @param {SearchSortOrder} [sortOrder] Sort order for results (default: RELEVANCE)
|
|
357
360
|
* @param {boolean} [withTags] Include tags in the response (default: false)
|
|
358
361
|
* @param {string} [parentPathPartId] Scope search to descendants of this folder\'s path part
|
|
359
362
|
* @param {number} [limit] Number of items per page
|
|
@@ -362,13 +365,13 @@ export interface FoldersApiInterface {
|
|
|
362
365
|
* @throws {RequiredError}
|
|
363
366
|
* @memberof FoldersApiInterface
|
|
364
367
|
*/
|
|
365
|
-
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
368
|
+
searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchItemsResponse>>;
|
|
366
369
|
|
|
367
370
|
/**
|
|
368
371
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
369
372
|
* Search Items Handler
|
|
370
373
|
*/
|
|
371
|
-
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
374
|
+
searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchItemsResponse>;
|
|
372
375
|
|
|
373
376
|
/**
|
|
374
377
|
* Creates request options for updateFolder without sending the request
|
|
@@ -860,14 +863,14 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
860
863
|
queryParameters['name_like'] = requestParameters['nameLike'];
|
|
861
864
|
}
|
|
862
865
|
|
|
863
|
-
if (requestParameters['sortOrder'] != null) {
|
|
864
|
-
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
865
|
-
}
|
|
866
|
-
|
|
867
866
|
if (requestParameters['partType'] != null) {
|
|
868
867
|
queryParameters['part_type'] = requestParameters['partType'];
|
|
869
868
|
}
|
|
870
869
|
|
|
870
|
+
if (requestParameters['sortOrder'] != null) {
|
|
871
|
+
queryParameters['sort_order'] = requestParameters['sortOrder'];
|
|
872
|
+
}
|
|
873
|
+
|
|
871
874
|
if (requestParameters['withTags'] != null) {
|
|
872
875
|
queryParameters['with_tags'] = requestParameters['withTags'];
|
|
873
876
|
}
|
|
@@ -909,18 +912,18 @@ export class FoldersApi extends runtime.BaseAPI implements FoldersApiInterface {
|
|
|
909
912
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
910
913
|
* Search Items Handler
|
|
911
914
|
*/
|
|
912
|
-
async searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<
|
|
915
|
+
async searchItemsRaw(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<SearchItemsResponse>> {
|
|
913
916
|
const requestOptions = await this.searchItemsRequestOpts(requestParameters);
|
|
914
917
|
const response = await this.request(requestOptions, initOverrides);
|
|
915
918
|
|
|
916
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
919
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => SearchItemsResponseFromJSON(jsonValue));
|
|
917
920
|
}
|
|
918
921
|
|
|
919
922
|
/**
|
|
920
923
|
* Search for folders, documents, and connectors by name. Performs a case-insensitive partial name match using trigram indexing. Results are filtered by the current user\'s path permissions. When parent_path_part_id is provided, only items under that folder are searched. Otherwise, all accessible items across the tenant are searched.
|
|
921
924
|
* Search Items Handler
|
|
922
925
|
*/
|
|
923
|
-
async searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<
|
|
926
|
+
async searchItems(requestParameters: SearchItemsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<SearchItemsResponse> {
|
|
924
927
|
const response = await this.searchItemsRaw(requestParameters, initOverrides);
|
|
925
928
|
return await response.value();
|
|
926
929
|
}
|
|
@@ -0,0 +1,141 @@
|
|
|
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 { FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR } from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
17
|
+
import {
|
|
18
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON,
|
|
19
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSONTyped,
|
|
20
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON,
|
|
21
|
+
FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSONTyped,
|
|
22
|
+
} from './FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A search page plus how many items of each type the query matched.
|
|
26
|
+
*
|
|
27
|
+
* ``counts_by_type`` ignores any ``part_type`` filter so the filter chips can
|
|
28
|
+
* keep showing every type's count while one of them is selected.
|
|
29
|
+
* @export
|
|
30
|
+
* @interface SearchItemsResponse
|
|
31
|
+
*/
|
|
32
|
+
export interface SearchItemsResponse {
|
|
33
|
+
/**
|
|
34
|
+
* List of items
|
|
35
|
+
* @type {Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>}
|
|
36
|
+
* @memberof SearchItemsResponse
|
|
37
|
+
*/
|
|
38
|
+
items: Array<FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaR>;
|
|
39
|
+
/**
|
|
40
|
+
* Total number of items
|
|
41
|
+
* @type {number}
|
|
42
|
+
* @memberof SearchItemsResponse
|
|
43
|
+
*/
|
|
44
|
+
total: number;
|
|
45
|
+
/**
|
|
46
|
+
* Number of items per page
|
|
47
|
+
* @type {number}
|
|
48
|
+
* @memberof SearchItemsResponse
|
|
49
|
+
*/
|
|
50
|
+
limit: number;
|
|
51
|
+
/**
|
|
52
|
+
* Number of items to skip
|
|
53
|
+
* @type {number}
|
|
54
|
+
* @memberof SearchItemsResponse
|
|
55
|
+
*/
|
|
56
|
+
offset: number;
|
|
57
|
+
/**
|
|
58
|
+
* Matches per item type, keyed by SearchablePartType and unaffected by the part_type filter
|
|
59
|
+
* @type {{ [key: string]: number; }}
|
|
60
|
+
* @memberof SearchItemsResponse
|
|
61
|
+
*/
|
|
62
|
+
countsByType?: { [key: string]: number; };
|
|
63
|
+
}
|
|
64
|
+
export const SearchItemsResponsePropertyValidationAttributesMap: {
|
|
65
|
+
[property: string]: {
|
|
66
|
+
maxLength?: number,
|
|
67
|
+
minLength?: number,
|
|
68
|
+
pattern?: string,
|
|
69
|
+
maximum?: number,
|
|
70
|
+
exclusiveMaximum?: boolean,
|
|
71
|
+
minimum?: number,
|
|
72
|
+
exclusiveMinimum?: boolean,
|
|
73
|
+
multipleOf?: number,
|
|
74
|
+
maxItems?: number,
|
|
75
|
+
minItems?: number,
|
|
76
|
+
uniqueItems?: boolean
|
|
77
|
+
}
|
|
78
|
+
} = {
|
|
79
|
+
total: {
|
|
80
|
+
minimum: 0,
|
|
81
|
+
exclusiveMinimum: false,
|
|
82
|
+
},
|
|
83
|
+
limit: {
|
|
84
|
+
minimum: 1,
|
|
85
|
+
exclusiveMinimum: false,
|
|
86
|
+
},
|
|
87
|
+
offset: {
|
|
88
|
+
minimum: 0,
|
|
89
|
+
exclusiveMinimum: false,
|
|
90
|
+
},
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Check if a given object implements the SearchItemsResponse interface.
|
|
96
|
+
*/
|
|
97
|
+
export function instanceOfSearchItemsResponse(value: object): value is SearchItemsResponse {
|
|
98
|
+
if (!('items' in value) || value['items'] === undefined) return false;
|
|
99
|
+
if (!('total' in value) || value['total'] === undefined) return false;
|
|
100
|
+
if (!('limit' in value) || value['limit'] === undefined) return false;
|
|
101
|
+
if (!('offset' in value) || value['offset'] === undefined) return false;
|
|
102
|
+
return true;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export function SearchItemsResponseFromJSON(json: any): SearchItemsResponse {
|
|
106
|
+
return SearchItemsResponseFromJSONTyped(json, false);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
export function SearchItemsResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SearchItemsResponse {
|
|
110
|
+
if (json == null) {
|
|
111
|
+
return json;
|
|
112
|
+
}
|
|
113
|
+
return {
|
|
114
|
+
|
|
115
|
+
'items': ((json['items'] as Array<any>).map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRFromJSON)),
|
|
116
|
+
'total': json['total'],
|
|
117
|
+
'limit': json['limit'],
|
|
118
|
+
'offset': json['offset'],
|
|
119
|
+
'countsByType': json['counts_by_type'] == null ? undefined : json['counts_by_type'],
|
|
120
|
+
};
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export function SearchItemsResponseToJSON(json: any): SearchItemsResponse {
|
|
124
|
+
return SearchItemsResponseToJSONTyped(json, false);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export function SearchItemsResponseToJSONTyped(value?: SearchItemsResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
128
|
+
if (value == null) {
|
|
129
|
+
return value;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
return {
|
|
133
|
+
|
|
134
|
+
'items': ((value['items'] as Array<any>).map(FolderResponseOrDocumentResponseOrWorkflowDefinitionResponseOrWorkflowRunResponseOrDataSourceResponseOrDataSourceSchemaRToJSON)),
|
|
135
|
+
'total': value['total'],
|
|
136
|
+
'limit': value['limit'],
|
|
137
|
+
'offset': value['offset'],
|
|
138
|
+
'counts_by_type': value['countsByType'],
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
|
|
@@ -14,10 +14,15 @@
|
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Ordering for flat name search.
|
|
18
|
+
*
|
|
19
|
+
* RELEVANCE ranks an exact name match first, then names starting with the
|
|
20
|
+
* query, then by how closely the name matches, then shorter names, then
|
|
21
|
+
* alphabetically.
|
|
18
22
|
* @export
|
|
19
23
|
*/
|
|
20
24
|
export const SearchSortOrder = {
|
|
25
|
+
Relevance: 'RELEVANCE',
|
|
21
26
|
Name: 'NAME',
|
|
22
27
|
UpdatedAt: 'UPDATED_AT',
|
|
23
28
|
CreatedAt: 'CREATED_AT'
|
|
@@ -25,7 +25,8 @@ export const SearchablePartType = {
|
|
|
25
25
|
DataSource: 'DATA_SOURCE',
|
|
26
26
|
DataSourceSchema: 'DATA_SOURCE_SCHEMA',
|
|
27
27
|
DataSourceTable: 'DATA_SOURCE_TABLE',
|
|
28
|
-
ApiConnection: 'API_CONNECTION'
|
|
28
|
+
ApiConnection: 'API_CONNECTION',
|
|
29
|
+
Skill: 'SKILL'
|
|
29
30
|
} as const;
|
|
30
31
|
export type SearchablePartType = typeof SearchablePartType[keyof typeof SearchablePartType];
|
|
31
32
|
|
package/src/models/index.ts
CHANGED
|
@@ -265,6 +265,7 @@ export * from './RunTimeseriesResponse';
|
|
|
265
265
|
export * from './SSOInitiateResponse';
|
|
266
266
|
export * from './ScheduleCadence';
|
|
267
267
|
export * from './ScoredChunkResponse';
|
|
268
|
+
export * from './SearchItemsResponse';
|
|
268
269
|
export * from './SearchSkillsRequest';
|
|
269
270
|
export * from './SearchSkillsResponse';
|
|
270
271
|
export * from './SearchSortOrder';
|