@knowledge-stack/ksapi 2.6.0 → 2.7.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 +0 -6
- package/README.md +2 -5
- package/dist/apis/TenantsApi.d.ts +4 -4
- package/dist/apis/TenantsApi.js +2 -2
- package/dist/apis/index.d.ts +0 -1
- package/dist/apis/index.js +0 -1
- package/dist/esm/apis/TenantsApi.d.ts +4 -4
- package/dist/esm/apis/TenantsApi.js +2 -2
- package/dist/esm/apis/index.d.ts +0 -1
- package/dist/esm/apis/index.js +0 -1
- package/dist/esm/models/EventResponse.d.ts +0 -6
- package/dist/esm/models/EventResponse.js +0 -2
- package/dist/esm/models/index.d.ts +0 -2
- package/dist/esm/models/index.js +0 -2
- package/dist/models/EventResponse.d.ts +0 -6
- package/dist/models/EventResponse.js +0 -2
- package/dist/models/index.d.ts +0 -2
- package/dist/models/index.js +0 -2
- package/docs/EventResponse.md +0 -2
- package/docs/TenantsApi.md +1 -1
- package/package.json +1 -1
- package/src/apis/TenantsApi.ts +4 -4
- package/src/apis/index.ts +0 -1
- package/src/models/EventResponse.ts +0 -8
- package/src/models/index.ts +0 -2
- package/dist/apis/TenantInvitationsApi.d.ts +0 -67
- package/dist/apis/TenantInvitationsApi.js +0 -112
- package/dist/esm/apis/TenantInvitationsApi.d.ts +0 -67
- package/dist/esm/apis/TenantInvitationsApi.js +0 -75
- package/dist/esm/models/AcceptTenantInvitationRequest.d.ts +0 -53
- package/dist/esm/models/AcceptTenantInvitationRequest.js +0 -48
- package/dist/esm/models/AcceptTenantInvitationResponse.d.ts +0 -59
- package/dist/esm/models/AcceptTenantInvitationResponse.js +0 -52
- package/dist/models/AcceptTenantInvitationRequest.d.ts +0 -53
- package/dist/models/AcceptTenantInvitationRequest.js +0 -56
- package/dist/models/AcceptTenantInvitationResponse.d.ts +0 -59
- package/dist/models/AcceptTenantInvitationResponse.js +0 -60
- package/docs/AcceptTenantInvitationRequest.md +0 -36
- package/docs/AcceptTenantInvitationResponse.md +0 -38
- package/docs/TenantInvitationsApi.md +0 -85
- package/src/apis/TenantInvitationsApi.ts +0 -136
- package/src/models/AcceptTenantInvitationRequest.ts +0 -93
- package/src/models/AcceptTenantInvitationResponse.ts +0 -101
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
# AcceptTenantInvitationResponse
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
## Properties
|
|
6
|
-
|
|
7
|
-
Name | Type
|
|
8
|
-
------------ | -------------
|
|
9
|
-
`tenantId` | string
|
|
10
|
-
`tenantName` | string
|
|
11
|
-
`userId` | string
|
|
12
|
-
|
|
13
|
-
## Example
|
|
14
|
-
|
|
15
|
-
```typescript
|
|
16
|
-
import type { AcceptTenantInvitationResponse } from '@knowledge-stack/ksapi'
|
|
17
|
-
|
|
18
|
-
// TODO: Update the object below with actual values
|
|
19
|
-
const example = {
|
|
20
|
-
"tenantId": null,
|
|
21
|
-
"tenantName": null,
|
|
22
|
-
"userId": null,
|
|
23
|
-
} satisfies AcceptTenantInvitationResponse
|
|
24
|
-
|
|
25
|
-
console.log(example)
|
|
26
|
-
|
|
27
|
-
// Convert the instance to a JSON string
|
|
28
|
-
const exampleJSON: string = JSON.stringify(example)
|
|
29
|
-
console.log(exampleJSON)
|
|
30
|
-
|
|
31
|
-
// Parse the JSON string back to an object
|
|
32
|
-
const exampleParsed = JSON.parse(exampleJSON) as AcceptTenantInvitationResponse
|
|
33
|
-
console.log(exampleParsed)
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
37
|
-
|
|
38
|
-
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
# TenantInvitationsApi
|
|
2
|
-
|
|
3
|
-
All URIs are relative to *http://localhost:8000*
|
|
4
|
-
|
|
5
|
-
| Method | HTTP request | Description |
|
|
6
|
-
|------------- | ------------- | -------------|
|
|
7
|
-
| [**acceptTenantInvitation**](TenantInvitationsApi.md#accepttenantinvitationoperation) | **POST** /v1/tenant-invitations/{invitation_id}/accept | Accept Tenant Invitation Handler |
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
## acceptTenantInvitation
|
|
12
|
-
|
|
13
|
-
> AcceptTenantInvitationResponse acceptTenantInvitation(invitationId, acceptTenantInvitationRequest)
|
|
14
|
-
|
|
15
|
-
Accept Tenant Invitation Handler
|
|
16
|
-
|
|
17
|
-
Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
|
|
18
|
-
|
|
19
|
-
### Example
|
|
20
|
-
|
|
21
|
-
```ts
|
|
22
|
-
import {
|
|
23
|
-
Configuration,
|
|
24
|
-
TenantInvitationsApi,
|
|
25
|
-
} from '@knowledge-stack/ksapi';
|
|
26
|
-
import type { AcceptTenantInvitationOperationRequest } from '@knowledge-stack/ksapi';
|
|
27
|
-
|
|
28
|
-
async function example() {
|
|
29
|
-
console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
|
|
30
|
-
const config = new Configuration({
|
|
31
|
-
// To configure API key authorization: cookieAuth
|
|
32
|
-
apiKey: "YOUR API KEY",
|
|
33
|
-
});
|
|
34
|
-
const api = new TenantInvitationsApi(config);
|
|
35
|
-
|
|
36
|
-
const body = {
|
|
37
|
-
// string
|
|
38
|
-
invitationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
39
|
-
// AcceptTenantInvitationRequest
|
|
40
|
-
acceptTenantInvitationRequest: ...,
|
|
41
|
-
} satisfies AcceptTenantInvitationOperationRequest;
|
|
42
|
-
|
|
43
|
-
try {
|
|
44
|
-
const data = await api.acceptTenantInvitation(body);
|
|
45
|
-
console.log(data);
|
|
46
|
-
} catch (error) {
|
|
47
|
-
console.error(error);
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
// Run the test
|
|
52
|
-
example().catch(console.error);
|
|
53
|
-
```
|
|
54
|
-
|
|
55
|
-
### Parameters
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
| Name | Type | Description | Notes |
|
|
59
|
-
|------------- | ------------- | ------------- | -------------|
|
|
60
|
-
| **invitationId** | `string` | | [Defaults to `undefined`] |
|
|
61
|
-
| **acceptTenantInvitationRequest** | [AcceptTenantInvitationRequest](AcceptTenantInvitationRequest.md) | | |
|
|
62
|
-
|
|
63
|
-
### Return type
|
|
64
|
-
|
|
65
|
-
[**AcceptTenantInvitationResponse**](AcceptTenantInvitationResponse.md)
|
|
66
|
-
|
|
67
|
-
### Authorization
|
|
68
|
-
|
|
69
|
-
[cookieAuth](../README.md#cookieAuth)
|
|
70
|
-
|
|
71
|
-
### HTTP request headers
|
|
72
|
-
|
|
73
|
-
- **Content-Type**: `application/json`
|
|
74
|
-
- **Accept**: `application/json`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
### HTTP response details
|
|
78
|
-
| Status code | Description | Response headers |
|
|
79
|
-
|-------------|-------------|------------------|
|
|
80
|
-
| **200** | Successful Response | - |
|
|
81
|
-
| **422** | Validation Error | - |
|
|
82
|
-
| **0** | Error response. | - |
|
|
83
|
-
|
|
84
|
-
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
85
|
-
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Knowledge Stack API
|
|
5
|
-
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
import * as runtime from '../runtime';
|
|
17
|
-
import type {
|
|
18
|
-
AcceptTenantInvitationRequest,
|
|
19
|
-
AcceptTenantInvitationResponse,
|
|
20
|
-
ErrorResponse,
|
|
21
|
-
HTTPValidationError,
|
|
22
|
-
} from '../models/index';
|
|
23
|
-
import {
|
|
24
|
-
AcceptTenantInvitationRequestFromJSON,
|
|
25
|
-
AcceptTenantInvitationRequestToJSON,
|
|
26
|
-
AcceptTenantInvitationResponseFromJSON,
|
|
27
|
-
AcceptTenantInvitationResponseToJSON,
|
|
28
|
-
ErrorResponseFromJSON,
|
|
29
|
-
ErrorResponseToJSON,
|
|
30
|
-
HTTPValidationErrorFromJSON,
|
|
31
|
-
HTTPValidationErrorToJSON,
|
|
32
|
-
} from '../models/index';
|
|
33
|
-
|
|
34
|
-
export interface AcceptTenantInvitationOperationRequest {
|
|
35
|
-
invitationId: string;
|
|
36
|
-
acceptTenantInvitationRequest: AcceptTenantInvitationRequest;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* TenantInvitationsApi - interface
|
|
41
|
-
*
|
|
42
|
-
* @export
|
|
43
|
-
* @interface TenantInvitationsApiInterface
|
|
44
|
-
*/
|
|
45
|
-
export interface TenantInvitationsApiInterface {
|
|
46
|
-
/**
|
|
47
|
-
* Creates request options for acceptTenantInvitation without sending the request
|
|
48
|
-
* @param {string} invitationId
|
|
49
|
-
* @param {AcceptTenantInvitationRequest} acceptTenantInvitationRequest
|
|
50
|
-
* @throws {RequiredError}
|
|
51
|
-
* @memberof TenantInvitationsApiInterface
|
|
52
|
-
*/
|
|
53
|
-
acceptTenantInvitationRequestOpts(requestParameters: AcceptTenantInvitationOperationRequest): Promise<runtime.RequestOpts>;
|
|
54
|
-
|
|
55
|
-
/**
|
|
56
|
-
* Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
|
|
57
|
-
* @summary Accept Tenant Invitation Handler
|
|
58
|
-
* @param {string} invitationId
|
|
59
|
-
* @param {AcceptTenantInvitationRequest} acceptTenantInvitationRequest
|
|
60
|
-
* @param {*} [options] Override http request option.
|
|
61
|
-
* @throws {RequiredError}
|
|
62
|
-
* @memberof TenantInvitationsApiInterface
|
|
63
|
-
*/
|
|
64
|
-
acceptTenantInvitationRaw(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptTenantInvitationResponse>>;
|
|
65
|
-
|
|
66
|
-
/**
|
|
67
|
-
* Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
|
|
68
|
-
* Accept Tenant Invitation Handler
|
|
69
|
-
*/
|
|
70
|
-
acceptTenantInvitation(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptTenantInvitationResponse>;
|
|
71
|
-
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
/**
|
|
75
|
-
*
|
|
76
|
-
*/
|
|
77
|
-
export class TenantInvitationsApi extends runtime.BaseAPI implements TenantInvitationsApiInterface {
|
|
78
|
-
|
|
79
|
-
/**
|
|
80
|
-
* Creates request options for acceptTenantInvitation without sending the request
|
|
81
|
-
*/
|
|
82
|
-
async acceptTenantInvitationRequestOpts(requestParameters: AcceptTenantInvitationOperationRequest): Promise<runtime.RequestOpts> {
|
|
83
|
-
if (requestParameters['invitationId'] == null) {
|
|
84
|
-
throw new runtime.RequiredError(
|
|
85
|
-
'invitationId',
|
|
86
|
-
'Required parameter "invitationId" was null or undefined when calling acceptTenantInvitation().'
|
|
87
|
-
);
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
if (requestParameters['acceptTenantInvitationRequest'] == null) {
|
|
91
|
-
throw new runtime.RequiredError(
|
|
92
|
-
'acceptTenantInvitationRequest',
|
|
93
|
-
'Required parameter "acceptTenantInvitationRequest" was null or undefined when calling acceptTenantInvitation().'
|
|
94
|
-
);
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
const queryParameters: any = {};
|
|
98
|
-
|
|
99
|
-
const headerParameters: runtime.HTTPHeaders = {};
|
|
100
|
-
|
|
101
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
let urlPath = `/v1/tenant-invitations/{invitation_id}/accept`;
|
|
105
|
-
urlPath = urlPath.replace(`{${"invitation_id"}}`, encodeURIComponent(String(requestParameters['invitationId'])));
|
|
106
|
-
|
|
107
|
-
return {
|
|
108
|
-
path: urlPath,
|
|
109
|
-
method: 'POST',
|
|
110
|
-
headers: headerParameters,
|
|
111
|
-
query: queryParameters,
|
|
112
|
-
body: AcceptTenantInvitationRequestToJSON(requestParameters['acceptTenantInvitationRequest']),
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
/**
|
|
117
|
-
* Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
|
|
118
|
-
* Accept Tenant Invitation Handler
|
|
119
|
-
*/
|
|
120
|
-
async acceptTenantInvitationRaw(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AcceptTenantInvitationResponse>> {
|
|
121
|
-
const requestOptions = await this.acceptTenantInvitationRequestOpts(requestParameters);
|
|
122
|
-
const response = await this.request(requestOptions, initOverrides);
|
|
123
|
-
|
|
124
|
-
return new runtime.JSONApiResponse(response, (jsonValue) => AcceptTenantInvitationResponseFromJSON(jsonValue));
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Accept an invitation, creating the customer tenant and its OWNER. New owner: supply ``password`` — the account is created and signed in. Existing owner: accept while signed in as ``owner_email`` (no password).
|
|
129
|
-
* Accept Tenant Invitation Handler
|
|
130
|
-
*/
|
|
131
|
-
async acceptTenantInvitation(requestParameters: AcceptTenantInvitationOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AcceptTenantInvitationResponse> {
|
|
132
|
-
const response = await this.acceptTenantInvitationRaw(requestParameters, initOverrides);
|
|
133
|
-
return await response.value();
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
}
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Knowledge Stack API
|
|
5
|
-
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface AcceptTenantInvitationRequest
|
|
20
|
-
*/
|
|
21
|
-
export interface AcceptTenantInvitationRequest {
|
|
22
|
-
/**
|
|
23
|
-
* Required only when the owner has no existing KS account.
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof AcceptTenantInvitationRequest
|
|
26
|
-
*/
|
|
27
|
-
password?: string | null;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof AcceptTenantInvitationRequest
|
|
32
|
-
*/
|
|
33
|
-
firstName?: string | null;
|
|
34
|
-
}
|
|
35
|
-
export const AcceptTenantInvitationRequestPropertyValidationAttributesMap: {
|
|
36
|
-
[property: string]: {
|
|
37
|
-
maxLength?: number,
|
|
38
|
-
minLength?: number,
|
|
39
|
-
pattern?: string,
|
|
40
|
-
maximum?: number,
|
|
41
|
-
exclusiveMaximum?: boolean,
|
|
42
|
-
minimum?: number,
|
|
43
|
-
exclusiveMinimum?: boolean,
|
|
44
|
-
multipleOf?: number,
|
|
45
|
-
maxItems?: number,
|
|
46
|
-
minItems?: number,
|
|
47
|
-
uniqueItems?: boolean
|
|
48
|
-
}
|
|
49
|
-
} = {
|
|
50
|
-
password: {
|
|
51
|
-
minLength: 8,
|
|
52
|
-
},
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
/**
|
|
57
|
-
* Check if a given object implements the AcceptTenantInvitationRequest interface.
|
|
58
|
-
*/
|
|
59
|
-
export function instanceOfAcceptTenantInvitationRequest(value: object): value is AcceptTenantInvitationRequest {
|
|
60
|
-
return true;
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
export function AcceptTenantInvitationRequestFromJSON(json: any): AcceptTenantInvitationRequest {
|
|
64
|
-
return AcceptTenantInvitationRequestFromJSONTyped(json, false);
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
export function AcceptTenantInvitationRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptTenantInvitationRequest {
|
|
68
|
-
if (json == null) {
|
|
69
|
-
return json;
|
|
70
|
-
}
|
|
71
|
-
return {
|
|
72
|
-
|
|
73
|
-
'password': json['password'] == null ? undefined : json['password'],
|
|
74
|
-
'firstName': json['first_name'] == null ? undefined : json['first_name'],
|
|
75
|
-
};
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export function AcceptTenantInvitationRequestToJSON(json: any): AcceptTenantInvitationRequest {
|
|
79
|
-
return AcceptTenantInvitationRequestToJSONTyped(json, false);
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
export function AcceptTenantInvitationRequestToJSONTyped(value?: AcceptTenantInvitationRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
83
|
-
if (value == null) {
|
|
84
|
-
return value;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
return {
|
|
88
|
-
|
|
89
|
-
'password': value['password'],
|
|
90
|
-
'first_name': value['firstName'],
|
|
91
|
-
};
|
|
92
|
-
}
|
|
93
|
-
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
/* tslint:disable */
|
|
2
|
-
/* eslint-disable */
|
|
3
|
-
/**
|
|
4
|
-
* Knowledge Stack API
|
|
5
|
-
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
6
|
-
*
|
|
7
|
-
* The version of the OpenAPI document: 0.1.0
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
-
* https://openapi-generator.tech
|
|
12
|
-
* Do not edit the class manually.
|
|
13
|
-
*/
|
|
14
|
-
|
|
15
|
-
import { mapValues } from '../runtime';
|
|
16
|
-
/**
|
|
17
|
-
*
|
|
18
|
-
* @export
|
|
19
|
-
* @interface AcceptTenantInvitationResponse
|
|
20
|
-
*/
|
|
21
|
-
export interface AcceptTenantInvitationResponse {
|
|
22
|
-
/**
|
|
23
|
-
*
|
|
24
|
-
* @type {string}
|
|
25
|
-
* @memberof AcceptTenantInvitationResponse
|
|
26
|
-
*/
|
|
27
|
-
tenantId: string;
|
|
28
|
-
/**
|
|
29
|
-
*
|
|
30
|
-
* @type {string}
|
|
31
|
-
* @memberof AcceptTenantInvitationResponse
|
|
32
|
-
*/
|
|
33
|
-
tenantName: string;
|
|
34
|
-
/**
|
|
35
|
-
*
|
|
36
|
-
* @type {string}
|
|
37
|
-
* @memberof AcceptTenantInvitationResponse
|
|
38
|
-
*/
|
|
39
|
-
userId: string;
|
|
40
|
-
}
|
|
41
|
-
export const AcceptTenantInvitationResponsePropertyValidationAttributesMap: {
|
|
42
|
-
[property: string]: {
|
|
43
|
-
maxLength?: number,
|
|
44
|
-
minLength?: number,
|
|
45
|
-
pattern?: string,
|
|
46
|
-
maximum?: number,
|
|
47
|
-
exclusiveMaximum?: boolean,
|
|
48
|
-
minimum?: number,
|
|
49
|
-
exclusiveMinimum?: boolean,
|
|
50
|
-
multipleOf?: number,
|
|
51
|
-
maxItems?: number,
|
|
52
|
-
minItems?: number,
|
|
53
|
-
uniqueItems?: boolean
|
|
54
|
-
}
|
|
55
|
-
} = {
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
/**
|
|
60
|
-
* Check if a given object implements the AcceptTenantInvitationResponse interface.
|
|
61
|
-
*/
|
|
62
|
-
export function instanceOfAcceptTenantInvitationResponse(value: object): value is AcceptTenantInvitationResponse {
|
|
63
|
-
if (!('tenantId' in value) || value['tenantId'] === undefined) return false;
|
|
64
|
-
if (!('tenantName' in value) || value['tenantName'] === undefined) return false;
|
|
65
|
-
if (!('userId' in value) || value['userId'] === undefined) return false;
|
|
66
|
-
return true;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export function AcceptTenantInvitationResponseFromJSON(json: any): AcceptTenantInvitationResponse {
|
|
70
|
-
return AcceptTenantInvitationResponseFromJSONTyped(json, false);
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
export function AcceptTenantInvitationResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AcceptTenantInvitationResponse {
|
|
74
|
-
if (json == null) {
|
|
75
|
-
return json;
|
|
76
|
-
}
|
|
77
|
-
return {
|
|
78
|
-
|
|
79
|
-
'tenantId': json['tenant_id'],
|
|
80
|
-
'tenantName': json['tenant_name'],
|
|
81
|
-
'userId': json['user_id'],
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
export function AcceptTenantInvitationResponseToJSON(json: any): AcceptTenantInvitationResponse {
|
|
86
|
-
return AcceptTenantInvitationResponseToJSONTyped(json, false);
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
export function AcceptTenantInvitationResponseToJSONTyped(value?: AcceptTenantInvitationResponse | null, ignoreDiscriminator: boolean = false): any {
|
|
90
|
-
if (value == null) {
|
|
91
|
-
return value;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
return {
|
|
95
|
-
|
|
96
|
-
'tenant_id': value['tenantId'],
|
|
97
|
-
'tenant_name': value['tenantName'],
|
|
98
|
-
'user_id': value['userId'],
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
|