@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
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 0.1.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
import type { PermissionCapability } from './PermissionCapability';
|
|
17
|
+
import {
|
|
18
|
+
PermissionCapabilityFromJSON,
|
|
19
|
+
PermissionCapabilityFromJSONTyped,
|
|
20
|
+
PermissionCapabilityToJSON,
|
|
21
|
+
PermissionCapabilityToJSONTyped,
|
|
22
|
+
} from './PermissionCapability';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* One requested grant: a capability on an object (PDO id) for a user.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface BulkGrantItem
|
|
28
|
+
*/
|
|
29
|
+
export interface BulkGrantItem {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof BulkGrantItem
|
|
34
|
+
*/
|
|
35
|
+
userId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof BulkGrantItem
|
|
40
|
+
*/
|
|
41
|
+
objectId: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {PermissionCapability}
|
|
45
|
+
* @memberof BulkGrantItem
|
|
46
|
+
*/
|
|
47
|
+
capability: PermissionCapability;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof BulkGrantItem
|
|
52
|
+
*/
|
|
53
|
+
canApprove?: boolean;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
export const BulkGrantItemPropertyValidationAttributesMap: {
|
|
58
|
+
[property: string]: {
|
|
59
|
+
maxLength?: number,
|
|
60
|
+
minLength?: number,
|
|
61
|
+
pattern?: string,
|
|
62
|
+
maximum?: number,
|
|
63
|
+
exclusiveMaximum?: boolean,
|
|
64
|
+
minimum?: number,
|
|
65
|
+
exclusiveMinimum?: boolean,
|
|
66
|
+
multipleOf?: number,
|
|
67
|
+
maxItems?: number,
|
|
68
|
+
minItems?: number,
|
|
69
|
+
uniqueItems?: boolean
|
|
70
|
+
}
|
|
71
|
+
} = {
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Check if a given object implements the BulkGrantItem interface.
|
|
77
|
+
*/
|
|
78
|
+
export function instanceOfBulkGrantItem(value: object): value is BulkGrantItem {
|
|
79
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
80
|
+
if (!('objectId' in value) || value['objectId'] === undefined) return false;
|
|
81
|
+
if (!('capability' in value) || value['capability'] === undefined) return false;
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function BulkGrantItemFromJSON(json: any): BulkGrantItem {
|
|
86
|
+
return BulkGrantItemFromJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function BulkGrantItemFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantItem {
|
|
90
|
+
if (json == null) {
|
|
91
|
+
return json;
|
|
92
|
+
}
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'userId': json['user_id'],
|
|
96
|
+
'objectId': json['object_id'],
|
|
97
|
+
'capability': PermissionCapabilityFromJSON(json['capability']),
|
|
98
|
+
'canApprove': json['can_approve'] == null ? undefined : json['can_approve'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export function BulkGrantItemToJSON(json: any): BulkGrantItem {
|
|
103
|
+
return BulkGrantItemToJSONTyped(json, false);
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export function BulkGrantItemToJSONTyped(value?: BulkGrantItem | null, ignoreDiscriminator: boolean = false): any {
|
|
107
|
+
if (value == null) {
|
|
108
|
+
return value;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
return {
|
|
112
|
+
|
|
113
|
+
'user_id': value['userId'],
|
|
114
|
+
'object_id': value['objectId'],
|
|
115
|
+
'capability': PermissionCapabilityToJSON(value['capability']),
|
|
116
|
+
'can_approve': value['canApprove'],
|
|
117
|
+
};
|
|
118
|
+
}
|
|
119
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
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 { BulkFailureReason } from './BulkFailureReason';
|
|
17
|
+
import {
|
|
18
|
+
BulkFailureReasonFromJSON,
|
|
19
|
+
BulkFailureReasonFromJSONTyped,
|
|
20
|
+
BulkFailureReasonToJSON,
|
|
21
|
+
BulkFailureReasonToJSONTyped,
|
|
22
|
+
} from './BulkFailureReason';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A grant that could not be created, keyed on its (user, object) pair.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface BulkGrantItemFailure
|
|
28
|
+
*/
|
|
29
|
+
export interface BulkGrantItemFailure {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof BulkGrantItemFailure
|
|
34
|
+
*/
|
|
35
|
+
userId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof BulkGrantItemFailure
|
|
40
|
+
*/
|
|
41
|
+
objectId: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {BulkFailureReason}
|
|
45
|
+
* @memberof BulkGrantItemFailure
|
|
46
|
+
*/
|
|
47
|
+
reason: BulkFailureReason;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
export const BulkGrantItemFailurePropertyValidationAttributesMap: {
|
|
52
|
+
[property: string]: {
|
|
53
|
+
maxLength?: number,
|
|
54
|
+
minLength?: number,
|
|
55
|
+
pattern?: string,
|
|
56
|
+
maximum?: number,
|
|
57
|
+
exclusiveMaximum?: boolean,
|
|
58
|
+
minimum?: number,
|
|
59
|
+
exclusiveMinimum?: boolean,
|
|
60
|
+
multipleOf?: number,
|
|
61
|
+
maxItems?: number,
|
|
62
|
+
minItems?: number,
|
|
63
|
+
uniqueItems?: boolean
|
|
64
|
+
}
|
|
65
|
+
} = {
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Check if a given object implements the BulkGrantItemFailure interface.
|
|
71
|
+
*/
|
|
72
|
+
export function instanceOfBulkGrantItemFailure(value: object): value is BulkGrantItemFailure {
|
|
73
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
74
|
+
if (!('objectId' in value) || value['objectId'] === undefined) return false;
|
|
75
|
+
if (!('reason' in value) || value['reason'] === undefined) return false;
|
|
76
|
+
return true;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function BulkGrantItemFailureFromJSON(json: any): BulkGrantItemFailure {
|
|
80
|
+
return BulkGrantItemFailureFromJSONTyped(json, false);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
export function BulkGrantItemFailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantItemFailure {
|
|
84
|
+
if (json == null) {
|
|
85
|
+
return json;
|
|
86
|
+
}
|
|
87
|
+
return {
|
|
88
|
+
|
|
89
|
+
'userId': json['user_id'],
|
|
90
|
+
'objectId': json['object_id'],
|
|
91
|
+
'reason': BulkFailureReasonFromJSON(json['reason']),
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
export function BulkGrantItemFailureToJSON(json: any): BulkGrantItemFailure {
|
|
96
|
+
return BulkGrantItemFailureToJSONTyped(json, false);
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function BulkGrantItemFailureToJSONTyped(value?: BulkGrantItemFailure | null, ignoreDiscriminator: boolean = false): any {
|
|
100
|
+
if (value == null) {
|
|
101
|
+
return value;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
return {
|
|
105
|
+
|
|
106
|
+
'user_id': value['userId'],
|
|
107
|
+
'object_id': value['objectId'],
|
|
108
|
+
'reason': BulkFailureReasonToJSON(value['reason']),
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
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 { BulkGrantItem } from './BulkGrantItem';
|
|
17
|
+
import {
|
|
18
|
+
BulkGrantItemFromJSON,
|
|
19
|
+
BulkGrantItemFromJSONTyped,
|
|
20
|
+
BulkGrantItemToJSON,
|
|
21
|
+
BulkGrantItemToJSONTyped,
|
|
22
|
+
} from './BulkGrantItem';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Grant many (user, object, capability) permissions in one request.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface BulkGrantRequest
|
|
28
|
+
*/
|
|
29
|
+
export interface BulkGrantRequest {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof BulkGrantRequest
|
|
34
|
+
*/
|
|
35
|
+
tenantId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Array<BulkGrantItem>}
|
|
39
|
+
* @memberof BulkGrantRequest
|
|
40
|
+
*/
|
|
41
|
+
grants?: Array<BulkGrantItem>;
|
|
42
|
+
}
|
|
43
|
+
export const BulkGrantRequestPropertyValidationAttributesMap: {
|
|
44
|
+
[property: string]: {
|
|
45
|
+
maxLength?: number,
|
|
46
|
+
minLength?: number,
|
|
47
|
+
pattern?: string,
|
|
48
|
+
maximum?: number,
|
|
49
|
+
exclusiveMaximum?: boolean,
|
|
50
|
+
minimum?: number,
|
|
51
|
+
exclusiveMinimum?: boolean,
|
|
52
|
+
multipleOf?: number,
|
|
53
|
+
maxItems?: number,
|
|
54
|
+
minItems?: number,
|
|
55
|
+
uniqueItems?: boolean
|
|
56
|
+
}
|
|
57
|
+
} = {
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
/**
|
|
62
|
+
* Check if a given object implements the BulkGrantRequest interface.
|
|
63
|
+
*/
|
|
64
|
+
export function instanceOfBulkGrantRequest(value: object): value is BulkGrantRequest {
|
|
65
|
+
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function BulkGrantRequestFromJSON(json: any): BulkGrantRequest {
|
|
70
|
+
return BulkGrantRequestFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function BulkGrantRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantRequest {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'tenantId': json['tenant_id'],
|
|
80
|
+
'grants': json['grants'] == null ? undefined : ((json['grants'] as Array<any>).map(BulkGrantItemFromJSON)),
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function BulkGrantRequestToJSON(json: any): BulkGrantRequest {
|
|
85
|
+
return BulkGrantRequestToJSONTyped(json, false);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export function BulkGrantRequestToJSONTyped(value?: BulkGrantRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
return {
|
|
94
|
+
|
|
95
|
+
'tenant_id': value['tenantId'],
|
|
96
|
+
'grants': value['grants'] == null ? undefined : ((value['grants'] as Array<any>).map(BulkGrantItemToJSON)),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
99
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
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 { BulkGrantItemFailure } from './BulkGrantItemFailure';
|
|
17
|
+
import {
|
|
18
|
+
BulkGrantItemFailureFromJSON,
|
|
19
|
+
BulkGrantItemFailureFromJSONTyped,
|
|
20
|
+
BulkGrantItemFailureToJSON,
|
|
21
|
+
BulkGrantItemFailureToJSONTyped,
|
|
22
|
+
} from './BulkGrantItemFailure';
|
|
23
|
+
import type { BulkGrantSuccess } from './BulkGrantSuccess';
|
|
24
|
+
import {
|
|
25
|
+
BulkGrantSuccessFromJSON,
|
|
26
|
+
BulkGrantSuccessFromJSONTyped,
|
|
27
|
+
BulkGrantSuccessToJSON,
|
|
28
|
+
BulkGrantSuccessToJSONTyped,
|
|
29
|
+
} from './BulkGrantSuccess';
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Per-item outcome of a bulk grant (composite-keyed, unlike other bulks).
|
|
33
|
+
* @export
|
|
34
|
+
* @interface BulkGrantResponse
|
|
35
|
+
*/
|
|
36
|
+
export interface BulkGrantResponse {
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<BulkGrantSuccess>}
|
|
40
|
+
* @memberof BulkGrantResponse
|
|
41
|
+
*/
|
|
42
|
+
succeeded?: Array<BulkGrantSuccess>;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Array<BulkGrantItemFailure>}
|
|
46
|
+
* @memberof BulkGrantResponse
|
|
47
|
+
*/
|
|
48
|
+
failed?: Array<BulkGrantItemFailure>;
|
|
49
|
+
}
|
|
50
|
+
export const BulkGrantResponsePropertyValidationAttributesMap: {
|
|
51
|
+
[property: string]: {
|
|
52
|
+
maxLength?: number,
|
|
53
|
+
minLength?: number,
|
|
54
|
+
pattern?: string,
|
|
55
|
+
maximum?: number,
|
|
56
|
+
exclusiveMaximum?: boolean,
|
|
57
|
+
minimum?: number,
|
|
58
|
+
exclusiveMinimum?: boolean,
|
|
59
|
+
multipleOf?: number,
|
|
60
|
+
maxItems?: number,
|
|
61
|
+
minItems?: number,
|
|
62
|
+
uniqueItems?: boolean
|
|
63
|
+
}
|
|
64
|
+
} = {
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Check if a given object implements the BulkGrantResponse interface.
|
|
70
|
+
*/
|
|
71
|
+
export function instanceOfBulkGrantResponse(value: object): value is BulkGrantResponse {
|
|
72
|
+
return true;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export function BulkGrantResponseFromJSON(json: any): BulkGrantResponse {
|
|
76
|
+
return BulkGrantResponseFromJSONTyped(json, false);
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
export function BulkGrantResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantResponse {
|
|
80
|
+
if (json == null) {
|
|
81
|
+
return json;
|
|
82
|
+
}
|
|
83
|
+
return {
|
|
84
|
+
|
|
85
|
+
'succeeded': json['succeeded'] == null ? undefined : ((json['succeeded'] as Array<any>).map(BulkGrantSuccessFromJSON)),
|
|
86
|
+
'failed': json['failed'] == null ? undefined : ((json['failed'] as Array<any>).map(BulkGrantItemFailureFromJSON)),
|
|
87
|
+
};
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export function BulkGrantResponseToJSON(json: any): BulkGrantResponse {
|
|
91
|
+
return BulkGrantResponseToJSONTyped(json, false);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export function BulkGrantResponseToJSONTyped(value?: BulkGrantResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
95
|
+
if (value == null) {
|
|
96
|
+
return value;
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
return {
|
|
100
|
+
|
|
101
|
+
'succeeded': value['succeeded'] == null ? undefined : ((value['succeeded'] as Array<any>).map(BulkGrantSuccessToJSON)),
|
|
102
|
+
'failed': value['failed'] == null ? undefined : ((value['failed'] as Array<any>).map(BulkGrantItemFailureToJSON)),
|
|
103
|
+
};
|
|
104
|
+
}
|
|
105
|
+
|
|
@@ -0,0 +1,129 @@
|
|
|
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 { PermissionCapability } from './PermissionCapability';
|
|
17
|
+
import {
|
|
18
|
+
PermissionCapabilityFromJSON,
|
|
19
|
+
PermissionCapabilityFromJSONTyped,
|
|
20
|
+
PermissionCapabilityToJSON,
|
|
21
|
+
PermissionCapabilityToJSONTyped,
|
|
22
|
+
} from './PermissionCapability';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A grant that was created, keyed on its (user, object) pair plus new id.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface BulkGrantSuccess
|
|
28
|
+
*/
|
|
29
|
+
export interface BulkGrantSuccess {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof BulkGrantSuccess
|
|
34
|
+
*/
|
|
35
|
+
userId: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {string}
|
|
39
|
+
* @memberof BulkGrantSuccess
|
|
40
|
+
*/
|
|
41
|
+
objectId: string;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {string}
|
|
45
|
+
* @memberof BulkGrantSuccess
|
|
46
|
+
*/
|
|
47
|
+
permissionId: string;
|
|
48
|
+
/**
|
|
49
|
+
*
|
|
50
|
+
* @type {PermissionCapability}
|
|
51
|
+
* @memberof BulkGrantSuccess
|
|
52
|
+
*/
|
|
53
|
+
capability: PermissionCapability;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {boolean}
|
|
57
|
+
* @memberof BulkGrantSuccess
|
|
58
|
+
*/
|
|
59
|
+
canApprove: boolean;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
export const BulkGrantSuccessPropertyValidationAttributesMap: {
|
|
64
|
+
[property: string]: {
|
|
65
|
+
maxLength?: number,
|
|
66
|
+
minLength?: number,
|
|
67
|
+
pattern?: string,
|
|
68
|
+
maximum?: number,
|
|
69
|
+
exclusiveMaximum?: boolean,
|
|
70
|
+
minimum?: number,
|
|
71
|
+
exclusiveMinimum?: boolean,
|
|
72
|
+
multipleOf?: number,
|
|
73
|
+
maxItems?: number,
|
|
74
|
+
minItems?: number,
|
|
75
|
+
uniqueItems?: boolean
|
|
76
|
+
}
|
|
77
|
+
} = {
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Check if a given object implements the BulkGrantSuccess interface.
|
|
83
|
+
*/
|
|
84
|
+
export function instanceOfBulkGrantSuccess(value: object): value is BulkGrantSuccess {
|
|
85
|
+
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
86
|
+
if (!('objectId' in value) || value['objectId'] === undefined) return false;
|
|
87
|
+
if (!('permissionId' in value) || value['permissionId'] === undefined) return false;
|
|
88
|
+
if (!('capability' in value) || value['capability'] === undefined) return false;
|
|
89
|
+
if (!('canApprove' in value) || value['canApprove'] === undefined) return false;
|
|
90
|
+
return true;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export function BulkGrantSuccessFromJSON(json: any): BulkGrantSuccess {
|
|
94
|
+
return BulkGrantSuccessFromJSONTyped(json, false);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export function BulkGrantSuccessFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkGrantSuccess {
|
|
98
|
+
if (json == null) {
|
|
99
|
+
return json;
|
|
100
|
+
}
|
|
101
|
+
return {
|
|
102
|
+
|
|
103
|
+
'userId': json['user_id'],
|
|
104
|
+
'objectId': json['object_id'],
|
|
105
|
+
'permissionId': json['permission_id'],
|
|
106
|
+
'capability': PermissionCapabilityFromJSON(json['capability']),
|
|
107
|
+
'canApprove': json['can_approve'],
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export function BulkGrantSuccessToJSON(json: any): BulkGrantSuccess {
|
|
112
|
+
return BulkGrantSuccessToJSONTyped(json, false);
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
export function BulkGrantSuccessToJSONTyped(value?: BulkGrantSuccess | null, ignoreDiscriminator: boolean = false): any {
|
|
116
|
+
if (value == null) {
|
|
117
|
+
return value;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
return {
|
|
121
|
+
|
|
122
|
+
'user_id': value['userId'],
|
|
123
|
+
'object_id': value['objectId'],
|
|
124
|
+
'permission_id': value['permissionId'],
|
|
125
|
+
'capability': PermissionCapabilityToJSON(value['capability']),
|
|
126
|
+
'can_approve': value['canApprove'],
|
|
127
|
+
};
|
|
128
|
+
}
|
|
129
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
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 { BulkFailureReason } from './BulkFailureReason';
|
|
17
|
+
import {
|
|
18
|
+
BulkFailureReasonFromJSON,
|
|
19
|
+
BulkFailureReasonFromJSONTyped,
|
|
20
|
+
BulkFailureReasonToJSON,
|
|
21
|
+
BulkFailureReasonToJSONTyped,
|
|
22
|
+
} from './BulkFailureReason';
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* A single id that could not be applied, and why.
|
|
26
|
+
* @export
|
|
27
|
+
* @interface BulkItemFailure
|
|
28
|
+
*/
|
|
29
|
+
export interface BulkItemFailure {
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof BulkItemFailure
|
|
34
|
+
*/
|
|
35
|
+
id: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {BulkFailureReason}
|
|
39
|
+
* @memberof BulkItemFailure
|
|
40
|
+
*/
|
|
41
|
+
reason: BulkFailureReason;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
|
|
45
|
+
export const BulkItemFailurePropertyValidationAttributesMap: {
|
|
46
|
+
[property: string]: {
|
|
47
|
+
maxLength?: number,
|
|
48
|
+
minLength?: number,
|
|
49
|
+
pattern?: string,
|
|
50
|
+
maximum?: number,
|
|
51
|
+
exclusiveMaximum?: boolean,
|
|
52
|
+
minimum?: number,
|
|
53
|
+
exclusiveMinimum?: boolean,
|
|
54
|
+
multipleOf?: number,
|
|
55
|
+
maxItems?: number,
|
|
56
|
+
minItems?: number,
|
|
57
|
+
uniqueItems?: boolean
|
|
58
|
+
}
|
|
59
|
+
} = {
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Check if a given object implements the BulkItemFailure interface.
|
|
65
|
+
*/
|
|
66
|
+
export function instanceOfBulkItemFailure(value: object): value is BulkItemFailure {
|
|
67
|
+
if (!('id' in value) || value['id'] === undefined) return false;
|
|
68
|
+
if (!('reason' in value) || value['reason'] === undefined) return false;
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export function BulkItemFailureFromJSON(json: any): BulkItemFailure {
|
|
73
|
+
return BulkItemFailureFromJSONTyped(json, false);
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export function BulkItemFailureFromJSONTyped(json: any, ignoreDiscriminator: boolean): BulkItemFailure {
|
|
77
|
+
if (json == null) {
|
|
78
|
+
return json;
|
|
79
|
+
}
|
|
80
|
+
return {
|
|
81
|
+
|
|
82
|
+
'id': json['id'],
|
|
83
|
+
'reason': BulkFailureReasonFromJSON(json['reason']),
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
export function BulkItemFailureToJSON(json: any): BulkItemFailure {
|
|
88
|
+
return BulkItemFailureToJSONTyped(json, false);
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export function BulkItemFailureToJSONTyped(value?: BulkItemFailure | null, ignoreDiscriminator: boolean = false): any {
|
|
92
|
+
if (value == null) {
|
|
93
|
+
return value;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
return {
|
|
97
|
+
|
|
98
|
+
'id': value['id'],
|
|
99
|
+
'reason': BulkFailureReasonToJSON(value['reason']),
|
|
100
|
+
};
|
|
101
|
+
}
|
|
102
|
+
|