@knowledge-stack/ksapi 1.153.0 → 1.155.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +28 -0
- package/README.md +20 -2
- package/dist/apis/BulkDeleteApi.d.ts +64 -0
- package/dist/apis/BulkDeleteApi.js +115 -0
- package/dist/apis/BulkMoveApi.d.ts +64 -0
- package/dist/apis/BulkMoveApi.js +115 -0
- package/dist/apis/DocumentsApi.d.ts +6 -6
- package/dist/apis/DocumentsApi.js +6 -6
- package/dist/apis/TrashApi.d.ts +77 -1
- package/dist/apis/TrashApi.js +98 -0
- package/dist/apis/UserPermissionsApi.d.ts +77 -1
- package/dist/apis/UserPermissionsApi.js +98 -0
- package/dist/apis/index.d.ts +2 -0
- package/dist/apis/index.js +2 -0
- package/dist/esm/apis/BulkDeleteApi.d.ts +64 -0
- package/dist/esm/apis/BulkDeleteApi.js +78 -0
- package/dist/esm/apis/BulkMoveApi.d.ts +64 -0
- package/dist/esm/apis/BulkMoveApi.js +78 -0
- package/dist/esm/apis/DocumentsApi.d.ts +6 -6
- package/dist/esm/apis/DocumentsApi.js +6 -6
- package/dist/esm/apis/TrashApi.d.ts +77 -1
- package/dist/esm/apis/TrashApi.js +99 -1
- package/dist/esm/apis/UserPermissionsApi.d.ts +77 -1
- package/dist/esm/apis/UserPermissionsApi.js +99 -1
- package/dist/esm/apis/index.d.ts +2 -0
- package/dist/esm/apis/index.js +2 -0
- package/dist/esm/models/BulkDeleteRequest.d.ts +53 -0
- package/dist/esm/models/BulkDeleteRequest.js +44 -0
- package/dist/esm/models/BulkFailureReason.d.ts +37 -0
- package/dist/esm/models/BulkFailureReason.js +55 -0
- package/dist/esm/models/BulkGrantItem.d.ts +66 -0
- package/dist/esm/models/BulkGrantItem.js +55 -0
- package/dist/esm/models/BulkGrantItemFailure.d.ts +60 -0
- package/dist/esm/models/BulkGrantItemFailure.js +53 -0
- package/dist/esm/models/BulkGrantRequest.d.ts +54 -0
- package/dist/esm/models/BulkGrantRequest.js +47 -0
- package/dist/esm/models/BulkGrantResponse.d.ts +55 -0
- package/dist/esm/models/BulkGrantResponse.js +46 -0
- package/dist/esm/models/BulkGrantSuccess.d.ts +72 -0
- package/dist/esm/models/BulkGrantSuccess.js +61 -0
- package/dist/esm/models/BulkItemFailure.d.ts +54 -0
- package/dist/esm/models/BulkItemFailure.js +49 -0
- package/dist/esm/models/BulkMoveRequest.d.ts +59 -0
- package/dist/esm/models/BulkMoveRequest.js +48 -0
- package/dist/esm/models/BulkOperationResponse.d.ts +54 -0
- package/dist/esm/models/BulkOperationResponse.js +45 -0
- package/dist/esm/models/BulkRevokeRequest.d.ts +53 -0
- package/dist/esm/models/BulkRevokeRequest.js +46 -0
- package/dist/esm/models/BulkTrashRequest.d.ts +47 -0
- package/dist/esm/models/BulkTrashRequest.js +42 -0
- package/dist/esm/models/CreateUploadRequest.d.ts +6 -0
- package/dist/esm/models/CreateUploadRequest.js +2 -0
- package/dist/esm/models/DocumentVersionMetadata.d.ts +18 -0
- package/dist/esm/models/DocumentVersionMetadata.js +6 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.d.ts +18 -0
- package/dist/esm/models/DocumentVersionMetadataUpdate.js +6 -0
- package/dist/esm/models/ErrorResponse.d.ts +1 -0
- package/dist/esm/models/ErrorResponse.js +1 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/BulkDeleteRequest.d.ts +53 -0
- package/dist/models/BulkDeleteRequest.js +52 -0
- package/dist/models/BulkFailureReason.d.ts +37 -0
- package/dist/models/BulkFailureReason.js +63 -0
- package/dist/models/BulkGrantItem.d.ts +66 -0
- package/dist/models/BulkGrantItem.js +63 -0
- package/dist/models/BulkGrantItemFailure.d.ts +60 -0
- package/dist/models/BulkGrantItemFailure.js +61 -0
- package/dist/models/BulkGrantRequest.d.ts +54 -0
- package/dist/models/BulkGrantRequest.js +55 -0
- package/dist/models/BulkGrantResponse.d.ts +55 -0
- package/dist/models/BulkGrantResponse.js +54 -0
- package/dist/models/BulkGrantSuccess.d.ts +72 -0
- package/dist/models/BulkGrantSuccess.js +69 -0
- package/dist/models/BulkItemFailure.d.ts +54 -0
- package/dist/models/BulkItemFailure.js +57 -0
- package/dist/models/BulkMoveRequest.d.ts +59 -0
- package/dist/models/BulkMoveRequest.js +56 -0
- package/dist/models/BulkOperationResponse.d.ts +54 -0
- package/dist/models/BulkOperationResponse.js +53 -0
- package/dist/models/BulkRevokeRequest.d.ts +53 -0
- package/dist/models/BulkRevokeRequest.js +54 -0
- package/dist/models/BulkTrashRequest.d.ts +47 -0
- package/dist/models/BulkTrashRequest.js +50 -0
- package/dist/models/CreateUploadRequest.d.ts +6 -0
- package/dist/models/CreateUploadRequest.js +2 -0
- package/dist/models/DocumentVersionMetadata.d.ts +18 -0
- package/dist/models/DocumentVersionMetadata.js +6 -0
- package/dist/models/DocumentVersionMetadataUpdate.d.ts +18 -0
- package/dist/models/DocumentVersionMetadataUpdate.js +6 -0
- package/dist/models/ErrorResponse.d.ts +1 -0
- package/dist/models/ErrorResponse.js +1 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/BulkDeleteApi.md +84 -0
- package/docs/BulkDeleteRequest.md +37 -0
- package/docs/BulkFailureReason.md +33 -0
- package/docs/BulkGrantItem.md +41 -0
- package/docs/BulkGrantItemFailure.md +39 -0
- package/docs/BulkGrantRequest.md +37 -0
- package/docs/BulkGrantResponse.md +37 -0
- package/docs/BulkGrantSuccess.md +43 -0
- package/docs/BulkItemFailure.md +37 -0
- package/docs/BulkMoveApi.md +84 -0
- package/docs/BulkMoveRequest.md +39 -0
- package/docs/BulkOperationResponse.md +37 -0
- package/docs/BulkRevokeRequest.md +37 -0
- package/docs/BulkTrashRequest.md +35 -0
- package/docs/CreateUploadRequest.md +2 -0
- package/docs/DocumentVersionMetadata.md +6 -0
- package/docs/DocumentVersionMetadataUpdate.md +6 -0
- package/docs/DocumentsApi.md +7 -7
- package/docs/TrashApi.md +152 -0
- package/docs/UserPermissionsApi.md +152 -0
- package/package.json +1 -1
- package/src/apis/BulkDeleteApi.ts +133 -0
- package/src/apis/BulkMoveApi.ts +133 -0
- package/src/apis/DocumentsApi.ts +14 -14
- package/src/apis/TrashApi.ts +176 -0
- package/src/apis/UserPermissionsApi.ts +182 -0
- package/src/apis/index.ts +2 -0
- package/src/models/BulkDeleteRequest.ts +90 -0
- package/src/models/BulkFailureReason.ts +65 -0
- package/src/models/BulkGrantItem.ts +119 -0
- package/src/models/BulkGrantItemFailure.ts +111 -0
- package/src/models/BulkGrantRequest.ts +99 -0
- package/src/models/BulkGrantResponse.ts +105 -0
- package/src/models/BulkGrantSuccess.ts +129 -0
- package/src/models/BulkItemFailure.ts +102 -0
- package/src/models/BulkMoveRequest.ts +99 -0
- package/src/models/BulkOperationResponse.ts +98 -0
- package/src/models/BulkRevokeRequest.ts +91 -0
- package/src/models/BulkTrashRequest.ts +82 -0
- package/src/models/CreateUploadRequest.ts +8 -0
- package/src/models/DocumentVersionMetadata.ts +24 -0
- package/src/models/DocumentVersionMetadataUpdate.ts +24 -0
- package/src/models/ErrorResponse.ts +1 -0
- package/src/models/index.ts +12 -0
package/.openapi-generator/FILES
CHANGED
|
@@ -28,11 +28,25 @@ docs/AuthApi.md
|
|
|
28
28
|
docs/BlockChangeType.md
|
|
29
29
|
docs/BlockKind.md
|
|
30
30
|
docs/BrandingLogoType.md
|
|
31
|
+
docs/BulkDeleteApi.md
|
|
32
|
+
docs/BulkDeleteRequest.md
|
|
31
33
|
docs/BulkDownloadApi.md
|
|
32
34
|
docs/BulkDownloadRequest.md
|
|
35
|
+
docs/BulkFailureReason.md
|
|
36
|
+
docs/BulkGrantItem.md
|
|
37
|
+
docs/BulkGrantItemFailure.md
|
|
38
|
+
docs/BulkGrantRequest.md
|
|
39
|
+
docs/BulkGrantResponse.md
|
|
40
|
+
docs/BulkGrantSuccess.md
|
|
41
|
+
docs/BulkItemFailure.md
|
|
33
42
|
docs/BulkModelTablesRequest.md
|
|
34
43
|
docs/BulkModelTablesResponse.md
|
|
44
|
+
docs/BulkMoveApi.md
|
|
45
|
+
docs/BulkMoveRequest.md
|
|
46
|
+
docs/BulkOperationResponse.md
|
|
47
|
+
docs/BulkRevokeRequest.md
|
|
35
48
|
docs/BulkTagRequest.md
|
|
49
|
+
docs/BulkTrashRequest.md
|
|
36
50
|
docs/CatalogColumnResponse.md
|
|
37
51
|
docs/CatalogTableResponse.md
|
|
38
52
|
docs/CellChange.md
|
|
@@ -417,7 +431,9 @@ src/apis/ApiConnectionsApi.ts
|
|
|
417
431
|
src/apis/ApiKeysApi.ts
|
|
418
432
|
src/apis/AuditEventsApi.ts
|
|
419
433
|
src/apis/AuthApi.ts
|
|
434
|
+
src/apis/BulkDeleteApi.ts
|
|
420
435
|
src/apis/BulkDownloadApi.ts
|
|
436
|
+
src/apis/BulkMoveApi.ts
|
|
421
437
|
src/apis/ChunkLineagesApi.ts
|
|
422
438
|
src/apis/ChunksApi.ts
|
|
423
439
|
src/apis/DataSourcesApi.ts
|
|
@@ -469,10 +485,22 @@ src/models/AskResponse.ts
|
|
|
469
485
|
src/models/BlockChangeType.ts
|
|
470
486
|
src/models/BlockKind.ts
|
|
471
487
|
src/models/BrandingLogoType.ts
|
|
488
|
+
src/models/BulkDeleteRequest.ts
|
|
472
489
|
src/models/BulkDownloadRequest.ts
|
|
490
|
+
src/models/BulkFailureReason.ts
|
|
491
|
+
src/models/BulkGrantItem.ts
|
|
492
|
+
src/models/BulkGrantItemFailure.ts
|
|
493
|
+
src/models/BulkGrantRequest.ts
|
|
494
|
+
src/models/BulkGrantResponse.ts
|
|
495
|
+
src/models/BulkGrantSuccess.ts
|
|
496
|
+
src/models/BulkItemFailure.ts
|
|
473
497
|
src/models/BulkModelTablesRequest.ts
|
|
474
498
|
src/models/BulkModelTablesResponse.ts
|
|
499
|
+
src/models/BulkMoveRequest.ts
|
|
500
|
+
src/models/BulkOperationResponse.ts
|
|
501
|
+
src/models/BulkRevokeRequest.ts
|
|
475
502
|
src/models/BulkTagRequest.ts
|
|
503
|
+
src/models/BulkTrashRequest.ts
|
|
476
504
|
src/models/CatalogColumnResponse.ts
|
|
477
505
|
src/models/CatalogTableResponse.ts
|
|
478
506
|
src/models/CellChange.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @knowledge-stack/ksapi@1.
|
|
1
|
+
# @knowledge-stack/ksapi@1.155.0
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the localhost API.
|
|
4
4
|
|
|
@@ -90,7 +90,9 @@ All URIs are relative to *http://localhost:8000*
|
|
|
90
90
|
*AuthApi* | [**signout**](docs/AuthApi.md#signout) | **POST** /v1/auth/signout | Signout Handler
|
|
91
91
|
*AuthApi* | [**ssoSignin**](docs/AuthApi.md#ssosignin) | **GET** /v1/auth/sso/{tenant_id}/signin | Sso Login Handler
|
|
92
92
|
*AuthApi* | [**validatePwResetCode**](docs/AuthApi.md#validatepwresetcode) | **POST** /v1/auth/pw/validate_reset_code | Validate Reset Code Handler
|
|
93
|
+
*BulkDeleteApi* | [**bulkDelete**](docs/BulkDeleteApi.md#bulkdeleteoperation) | **POST** /v1/bulk-delete | Bulk Delete Handler
|
|
93
94
|
*BulkDownloadApi* | [**startBulkDownload**](docs/BulkDownloadApi.md#startbulkdownload) | **POST** /v1/bulk-download | Start Bulk Download Handler
|
|
95
|
+
*BulkMoveApi* | [**bulkMove**](docs/BulkMoveApi.md#bulkmoveoperation) | **POST** /v1/bulk-move | Bulk Move Handler
|
|
94
96
|
*ChunkLineagesApi* | [**createChunkLineage**](docs/ChunkLineagesApi.md#createchunklineageoperation) | **POST** /v1/chunk-lineages | Create Chunk Lineage Handler
|
|
95
97
|
*ChunkLineagesApi* | [**deleteChunkLineage**](docs/ChunkLineagesApi.md#deletechunklineage) | **DELETE** /v1/chunk-lineages | Delete Chunk Lineage Handler
|
|
96
98
|
*ChunkLineagesApi* | [**getChunkLineage**](docs/ChunkLineagesApi.md#getchunklineage) | **GET** /v1/chunk-lineages/{chunk_id} | Get Chunk Lineage Handler
|
|
@@ -255,9 +257,13 @@ All URIs are relative to *http://localhost:8000*
|
|
|
255
257
|
*ThreadsApi* | [**sendUserMessage**](docs/ThreadsApi.md#sendusermessage) | **POST** /v1/threads/{thread_id}/user_message | Send User Message Handler
|
|
256
258
|
*ThreadsApi* | [**streamThread**](docs/ThreadsApi.md#streamthread) | **GET** /v1/threads/{thread_id}/stream | Stream Thread Handler
|
|
257
259
|
*ThreadsApi* | [**updateThread**](docs/ThreadsApi.md#updatethreadoperation) | **PATCH** /v1/threads/{thread_id} | Update Thread Handler
|
|
260
|
+
*TrashApi* | [**bulkPermanentlyDeleteTrash**](docs/TrashApi.md#bulkpermanentlydeletetrash) | **POST** /v1/trash/bulk-delete | Bulk Permanently Delete Trash Handler
|
|
261
|
+
*TrashApi* | [**bulkRestoreTrash**](docs/TrashApi.md#bulkrestoretrash) | **POST** /v1/trash/bulk-restore | Bulk Restore Trash Handler
|
|
258
262
|
*TrashApi* | [**listTrash**](docs/TrashApi.md#listtrash) | **GET** /v1/trash | List Trash Handler
|
|
259
263
|
*TrashApi* | [**permanentlyDeleteTrashItem**](docs/TrashApi.md#permanentlydeletetrashitem) | **DELETE** /v1/trash/{path_part_id} | Permanently Delete Trash Item Handler
|
|
260
264
|
*TrashApi* | [**restoreTrashItem**](docs/TrashApi.md#restoretrashitem) | **POST** /v1/trash/{path_part_id}/restore | Restore Trash Item Handler
|
|
265
|
+
*UserPermissionsApi* | [**bulkGrantUserPermissions**](docs/UserPermissionsApi.md#bulkgrantuserpermissions) | **POST** /v1/user-permissions/bulk | Bulk Grant User Permissions Handler
|
|
266
|
+
*UserPermissionsApi* | [**bulkRevokeUserPermissions**](docs/UserPermissionsApi.md#bulkrevokeuserpermissions) | **POST** /v1/user-permissions/bulk-delete | Bulk Revoke User Permissions Handler
|
|
261
267
|
*UserPermissionsApi* | [**createUserPermission**](docs/UserPermissionsApi.md#createuserpermission) | **POST** /v1/user-permissions | Create User Permission Handler
|
|
262
268
|
*UserPermissionsApi* | [**deleteUserPermission**](docs/UserPermissionsApi.md#deleteuserpermission) | **DELETE** /v1/user-permissions/{permission_id} | Delete User Permission Handler
|
|
263
269
|
*UserPermissionsApi* | [**listUserPermissions**](docs/UserPermissionsApi.md#listuserpermissions) | **GET** /v1/user-permissions | List User Permissions Handler
|
|
@@ -315,10 +321,22 @@ All URIs are relative to *http://localhost:8000*
|
|
|
315
321
|
- [BlockChangeType](docs/BlockChangeType.md)
|
|
316
322
|
- [BlockKind](docs/BlockKind.md)
|
|
317
323
|
- [BrandingLogoType](docs/BrandingLogoType.md)
|
|
324
|
+
- [BulkDeleteRequest](docs/BulkDeleteRequest.md)
|
|
318
325
|
- [BulkDownloadRequest](docs/BulkDownloadRequest.md)
|
|
326
|
+
- [BulkFailureReason](docs/BulkFailureReason.md)
|
|
327
|
+
- [BulkGrantItem](docs/BulkGrantItem.md)
|
|
328
|
+
- [BulkGrantItemFailure](docs/BulkGrantItemFailure.md)
|
|
329
|
+
- [BulkGrantRequest](docs/BulkGrantRequest.md)
|
|
330
|
+
- [BulkGrantResponse](docs/BulkGrantResponse.md)
|
|
331
|
+
- [BulkGrantSuccess](docs/BulkGrantSuccess.md)
|
|
332
|
+
- [BulkItemFailure](docs/BulkItemFailure.md)
|
|
319
333
|
- [BulkModelTablesRequest](docs/BulkModelTablesRequest.md)
|
|
320
334
|
- [BulkModelTablesResponse](docs/BulkModelTablesResponse.md)
|
|
335
|
+
- [BulkMoveRequest](docs/BulkMoveRequest.md)
|
|
336
|
+
- [BulkOperationResponse](docs/BulkOperationResponse.md)
|
|
337
|
+
- [BulkRevokeRequest](docs/BulkRevokeRequest.md)
|
|
321
338
|
- [BulkTagRequest](docs/BulkTagRequest.md)
|
|
339
|
+
- [BulkTrashRequest](docs/BulkTrashRequest.md)
|
|
322
340
|
- [CatalogColumnResponse](docs/CatalogColumnResponse.md)
|
|
323
341
|
- [CatalogTableResponse](docs/CatalogTableResponse.md)
|
|
324
342
|
- [CellChange](docs/CellChange.md)
|
|
@@ -690,7 +708,7 @@ and is automatically generated by the
|
|
|
690
708
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
691
709
|
|
|
692
710
|
- API version: `0.1.0`
|
|
693
|
-
- Package version: `1.
|
|
711
|
+
- Package version: `1.155.0`
|
|
694
712
|
- Generator version: `7.21.0`
|
|
695
713
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
696
714
|
|
|
@@ -0,0 +1,64 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { BulkDeleteRequest, BulkOperationResponse } from '../models/index';
|
|
14
|
+
export interface BulkDeleteOperationRequest {
|
|
15
|
+
bulkDeleteRequest: BulkDeleteRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* BulkDeleteApi - interface
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface BulkDeleteApiInterface
|
|
22
|
+
*/
|
|
23
|
+
export interface BulkDeleteApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
* Creates request options for bulkDelete without sending the request
|
|
26
|
+
* @param {BulkDeleteRequest} bulkDeleteRequest
|
|
27
|
+
* @throws {RequiredError}
|
|
28
|
+
* @memberof BulkDeleteApiInterface
|
|
29
|
+
*/
|
|
30
|
+
bulkDeleteRequestOpts(requestParameters: BulkDeleteOperationRequest): Promise<runtime.RequestOpts>;
|
|
31
|
+
/**
|
|
32
|
+
* Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
|
|
33
|
+
* @summary Bulk Delete Handler
|
|
34
|
+
* @param {BulkDeleteRequest} bulkDeleteRequest
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
* @memberof BulkDeleteApiInterface
|
|
38
|
+
*/
|
|
39
|
+
bulkDeleteRaw(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
40
|
+
/**
|
|
41
|
+
* Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
|
|
42
|
+
* Bulk Delete Handler
|
|
43
|
+
*/
|
|
44
|
+
bulkDelete(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
export declare class BulkDeleteApi extends runtime.BaseAPI implements BulkDeleteApiInterface {
|
|
50
|
+
/**
|
|
51
|
+
* Creates request options for bulkDelete without sending the request
|
|
52
|
+
*/
|
|
53
|
+
bulkDeleteRequestOpts(requestParameters: BulkDeleteOperationRequest): Promise<runtime.RequestOpts>;
|
|
54
|
+
/**
|
|
55
|
+
* Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
|
|
56
|
+
* Bulk Delete Handler
|
|
57
|
+
*/
|
|
58
|
+
bulkDeleteRaw(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
59
|
+
/**
|
|
60
|
+
* Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
|
|
61
|
+
* Bulk Delete Handler
|
|
62
|
+
*/
|
|
63
|
+
bulkDelete(requestParameters: BulkDeleteOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
49
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
50
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
51
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
52
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
53
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
54
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
exports.BulkDeleteApi = void 0;
|
|
59
|
+
const runtime = __importStar(require("../runtime"));
|
|
60
|
+
const index_1 = require("../models/index");
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
class BulkDeleteApi extends runtime.BaseAPI {
|
|
65
|
+
/**
|
|
66
|
+
* Creates request options for bulkDelete without sending the request
|
|
67
|
+
*/
|
|
68
|
+
bulkDeleteRequestOpts(requestParameters) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (requestParameters['bulkDeleteRequest'] == null) {
|
|
71
|
+
throw new runtime.RequiredError('bulkDeleteRequest', 'Required parameter "bulkDeleteRequest" was null or undefined when calling bulkDelete().');
|
|
72
|
+
}
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
76
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
77
|
+
const token = this.configuration.accessToken;
|
|
78
|
+
const tokenString = yield token("bearerAuth", []);
|
|
79
|
+
if (tokenString) {
|
|
80
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
let urlPath = `/v1/bulk-delete`;
|
|
84
|
+
return {
|
|
85
|
+
path: urlPath,
|
|
86
|
+
method: 'POST',
|
|
87
|
+
headers: headerParameters,
|
|
88
|
+
query: queryParameters,
|
|
89
|
+
body: (0, index_1.BulkDeleteRequestToJSON)(requestParameters['bulkDeleteRequest']),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
|
|
95
|
+
* Bulk Delete Handler
|
|
96
|
+
*/
|
|
97
|
+
bulkDeleteRaw(requestParameters, initOverrides) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const requestOptions = yield this.bulkDeleteRequestOpts(requestParameters);
|
|
100
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BulkOperationResponseFromJSON)(jsonValue));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Move the selected folders and documents to Trash, reporting per item. Each id is soft-deleted in its own transaction: items the caller may not delete, that are approval-sealed, held by another user, contain an in-progress run, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed. Over the selection cap returns ``400``.
|
|
106
|
+
* Bulk Delete Handler
|
|
107
|
+
*/
|
|
108
|
+
bulkDelete(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const response = yield this.bulkDeleteRaw(requestParameters, initOverrides);
|
|
111
|
+
return yield response.value();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.BulkDeleteApi = BulkDeleteApi;
|
|
@@ -0,0 +1,64 @@
|
|
|
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 * as runtime from '../runtime';
|
|
13
|
+
import type { BulkMoveRequest, BulkOperationResponse } from '../models/index';
|
|
14
|
+
export interface BulkMoveOperationRequest {
|
|
15
|
+
bulkMoveRequest: BulkMoveRequest;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* BulkMoveApi - interface
|
|
19
|
+
*
|
|
20
|
+
* @export
|
|
21
|
+
* @interface BulkMoveApiInterface
|
|
22
|
+
*/
|
|
23
|
+
export interface BulkMoveApiInterface {
|
|
24
|
+
/**
|
|
25
|
+
* Creates request options for bulkMove without sending the request
|
|
26
|
+
* @param {BulkMoveRequest} bulkMoveRequest
|
|
27
|
+
* @throws {RequiredError}
|
|
28
|
+
* @memberof BulkMoveApiInterface
|
|
29
|
+
*/
|
|
30
|
+
bulkMoveRequestOpts(requestParameters: BulkMoveOperationRequest): Promise<runtime.RequestOpts>;
|
|
31
|
+
/**
|
|
32
|
+
* Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
|
|
33
|
+
* @summary Bulk Move Handler
|
|
34
|
+
* @param {BulkMoveRequest} bulkMoveRequest
|
|
35
|
+
* @param {*} [options] Override http request option.
|
|
36
|
+
* @throws {RequiredError}
|
|
37
|
+
* @memberof BulkMoveApiInterface
|
|
38
|
+
*/
|
|
39
|
+
bulkMoveRaw(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
40
|
+
/**
|
|
41
|
+
* Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
|
|
42
|
+
* Bulk Move Handler
|
|
43
|
+
*/
|
|
44
|
+
bulkMove(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
45
|
+
}
|
|
46
|
+
/**
|
|
47
|
+
*
|
|
48
|
+
*/
|
|
49
|
+
export declare class BulkMoveApi extends runtime.BaseAPI implements BulkMoveApiInterface {
|
|
50
|
+
/**
|
|
51
|
+
* Creates request options for bulkMove without sending the request
|
|
52
|
+
*/
|
|
53
|
+
bulkMoveRequestOpts(requestParameters: BulkMoveOperationRequest): Promise<runtime.RequestOpts>;
|
|
54
|
+
/**
|
|
55
|
+
* Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
|
|
56
|
+
* Bulk Move Handler
|
|
57
|
+
*/
|
|
58
|
+
bulkMoveRaw(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BulkOperationResponse>>;
|
|
59
|
+
/**
|
|
60
|
+
* Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
|
|
61
|
+
* Bulk Move Handler
|
|
62
|
+
*/
|
|
63
|
+
bulkMove(requestParameters: BulkMoveOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BulkOperationResponse>;
|
|
64
|
+
}
|
|
@@ -0,0 +1,115 @@
|
|
|
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
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
16
|
+
if (k2 === undefined) k2 = k;
|
|
17
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
18
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
19
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
20
|
+
}
|
|
21
|
+
Object.defineProperty(o, k2, desc);
|
|
22
|
+
}) : (function(o, m, k, k2) {
|
|
23
|
+
if (k2 === undefined) k2 = k;
|
|
24
|
+
o[k2] = m[k];
|
|
25
|
+
}));
|
|
26
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
27
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
28
|
+
}) : function(o, v) {
|
|
29
|
+
o["default"] = v;
|
|
30
|
+
});
|
|
31
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
32
|
+
var ownKeys = function(o) {
|
|
33
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
34
|
+
var ar = [];
|
|
35
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
36
|
+
return ar;
|
|
37
|
+
};
|
|
38
|
+
return ownKeys(o);
|
|
39
|
+
};
|
|
40
|
+
return function (mod) {
|
|
41
|
+
if (mod && mod.__esModule) return mod;
|
|
42
|
+
var result = {};
|
|
43
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
44
|
+
__setModuleDefault(result, mod);
|
|
45
|
+
return result;
|
|
46
|
+
};
|
|
47
|
+
})();
|
|
48
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
49
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
50
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
51
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
52
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
53
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
54
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
55
|
+
});
|
|
56
|
+
};
|
|
57
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
58
|
+
exports.BulkMoveApi = void 0;
|
|
59
|
+
const runtime = __importStar(require("../runtime"));
|
|
60
|
+
const index_1 = require("../models/index");
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
*/
|
|
64
|
+
class BulkMoveApi extends runtime.BaseAPI {
|
|
65
|
+
/**
|
|
66
|
+
* Creates request options for bulkMove without sending the request
|
|
67
|
+
*/
|
|
68
|
+
bulkMoveRequestOpts(requestParameters) {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
+
if (requestParameters['bulkMoveRequest'] == null) {
|
|
71
|
+
throw new runtime.RequiredError('bulkMoveRequest', 'Required parameter "bulkMoveRequest" was null or undefined when calling bulkMove().');
|
|
72
|
+
}
|
|
73
|
+
const queryParameters = {};
|
|
74
|
+
const headerParameters = {};
|
|
75
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
76
|
+
if (this.configuration && this.configuration.accessToken) {
|
|
77
|
+
const token = this.configuration.accessToken;
|
|
78
|
+
const tokenString = yield token("bearerAuth", []);
|
|
79
|
+
if (tokenString) {
|
|
80
|
+
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
let urlPath = `/v1/bulk-move`;
|
|
84
|
+
return {
|
|
85
|
+
path: urlPath,
|
|
86
|
+
method: 'POST',
|
|
87
|
+
headers: headerParameters,
|
|
88
|
+
query: queryParameters,
|
|
89
|
+
body: (0, index_1.BulkMoveRequestToJSON)(requestParameters['bulkMoveRequest']),
|
|
90
|
+
};
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
|
|
95
|
+
* Bulk Move Handler
|
|
96
|
+
*/
|
|
97
|
+
bulkMoveRaw(requestParameters, initOverrides) {
|
|
98
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
99
|
+
const requestOptions = yield this.bulkMoveRequestOpts(requestParameters);
|
|
100
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
101
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, index_1.BulkOperationResponseFromJSON)(jsonValue));
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Move the selected folders and documents into ``target_folder_id``. The destination is checked once up front — an invalid target returns ``400`` and a target the caller cannot write returns ``403``, before any item moves. Each source then moves in its own transaction; items the caller may not write, that are sealed, held by another user, that would form a cycle, hit a name collision, or sit inside another selected folder land in ``failed`` with a reason while the rest succeed.
|
|
106
|
+
* Bulk Move Handler
|
|
107
|
+
*/
|
|
108
|
+
bulkMove(requestParameters, initOverrides) {
|
|
109
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
110
|
+
const response = yield this.bulkMoveRaw(requestParameters, initOverrides);
|
|
111
|
+
return yield response.value();
|
|
112
|
+
});
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
exports.BulkMoveApi = BulkMoveApi;
|
|
@@ -41,13 +41,13 @@ export interface IngestDocumentRequest {
|
|
|
41
41
|
file: Blob;
|
|
42
42
|
pathPartId: string;
|
|
43
43
|
name?: string | null;
|
|
44
|
+
tagIds?: Array<string>;
|
|
45
|
+
idempotencyKey?: string | null;
|
|
44
46
|
ingestionMode?: IngestionMode;
|
|
45
47
|
chunkType?: ChunkType;
|
|
46
48
|
secondaryTaxonomy?: ImageTaxonomy;
|
|
47
49
|
pageDpi?: number;
|
|
48
50
|
workflowRunId?: string | null;
|
|
49
|
-
tagIds?: Array<string>;
|
|
50
|
-
idempotencyKey?: string | null;
|
|
51
51
|
workflowDefinitionId?: string | null;
|
|
52
52
|
}
|
|
53
53
|
export interface IngestDocumentVersionRequest {
|
|
@@ -272,13 +272,13 @@ export interface DocumentsApiInterface {
|
|
|
272
272
|
* @param {Blob} file
|
|
273
273
|
* @param {string} pathPartId Parent path part ID (must be a FOLDER type)
|
|
274
274
|
* @param {string} [name] Document name (defaults to filename)
|
|
275
|
+
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
276
|
+
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
275
277
|
* @param {IngestionMode} [ingestionMode]
|
|
276
278
|
* @param {ChunkType} [chunkType]
|
|
277
279
|
* @param {ImageTaxonomy} [secondaryTaxonomy]
|
|
278
280
|
* @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
|
|
279
281
|
* @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
|
|
280
|
-
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
281
|
-
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
282
282
|
* @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
|
|
283
283
|
* @throws {RequiredError}
|
|
284
284
|
* @memberof DocumentsApiInterface
|
|
@@ -290,13 +290,13 @@ export interface DocumentsApiInterface {
|
|
|
290
290
|
* @param {Blob} file
|
|
291
291
|
* @param {string} pathPartId Parent path part ID (must be a FOLDER type)
|
|
292
292
|
* @param {string} [name] Document name (defaults to filename)
|
|
293
|
+
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
294
|
+
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
293
295
|
* @param {IngestionMode} [ingestionMode]
|
|
294
296
|
* @param {ChunkType} [chunkType]
|
|
295
297
|
* @param {ImageTaxonomy} [secondaryTaxonomy]
|
|
296
298
|
* @param {number} [pageDpi] DPI for PDF page screenshots (default 72, min 36, max 216).
|
|
297
299
|
* @param {string} [workflowRunId] Workflow run context for assumed agent uploads.
|
|
298
|
-
* @param {Array<string>} [tagIds] Tag IDs applied to the created document.
|
|
299
|
-
* @param {string} [idempotencyKey] Opt-in key: a repeat with the same key at the same (parent, name) replays the existing document instead of a 409.
|
|
300
300
|
* @param {string} [workflowDefinitionId] Workflow definition context for assumed agent uploads.
|
|
301
301
|
* @param {*} [options] Override http request option.
|
|
302
302
|
* @throws {RequiredError}
|
|
@@ -499,6 +499,12 @@ class DocumentsApi extends runtime.BaseAPI {
|
|
|
499
499
|
if (requestParameters['name'] != null) {
|
|
500
500
|
formParams.append('name', requestParameters['name']);
|
|
501
501
|
}
|
|
502
|
+
if (requestParameters['tagIds'] != null) {
|
|
503
|
+
formParams.append('tag_ids', requestParameters['tagIds'].join(runtime.COLLECTION_FORMATS["csv"]));
|
|
504
|
+
}
|
|
505
|
+
if (requestParameters['idempotencyKey'] != null) {
|
|
506
|
+
formParams.append('idempotency_key', requestParameters['idempotencyKey']);
|
|
507
|
+
}
|
|
502
508
|
if (requestParameters['ingestionMode'] != null) {
|
|
503
509
|
formParams.append('ingestion_mode', requestParameters['ingestionMode']);
|
|
504
510
|
}
|
|
@@ -514,12 +520,6 @@ class DocumentsApi extends runtime.BaseAPI {
|
|
|
514
520
|
if (requestParameters['workflowRunId'] != null) {
|
|
515
521
|
formParams.append('workflow_run_id', requestParameters['workflowRunId']);
|
|
516
522
|
}
|
|
517
|
-
if (requestParameters['tagIds'] != null) {
|
|
518
|
-
formParams.append('tag_ids', requestParameters['tagIds'].join(runtime.COLLECTION_FORMATS["csv"]));
|
|
519
|
-
}
|
|
520
|
-
if (requestParameters['idempotencyKey'] != null) {
|
|
521
|
-
formParams.append('idempotency_key', requestParameters['idempotencyKey']);
|
|
522
|
-
}
|
|
523
523
|
if (requestParameters['workflowDefinitionId'] != null) {
|
|
524
524
|
formParams.append('workflow_definition_id', requestParameters['workflowDefinitionId']);
|
|
525
525
|
}
|