@knowledge-stack/ksapi 3.10.2 → 3.12.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 +26 -4
- package/README.md +18 -6
- package/dist/apis/AuthApi.d.ts +12 -9
- package/dist/apis/AuthApi.js +5 -2
- package/dist/apis/FeedbackApi.d.ts +10 -7
- package/dist/apis/FeedbackApi.js +5 -2
- package/dist/apis/InvitesApi.d.ts +39 -1
- package/dist/apis/InvitesApi.js +41 -0
- package/dist/apis/UsersApi.d.ts +51 -59
- package/dist/apis/UsersApi.js +50 -57
- package/dist/esm/apis/AuthApi.d.ts +12 -9
- package/dist/esm/apis/AuthApi.js +6 -3
- package/dist/esm/apis/FeedbackApi.d.ts +10 -7
- package/dist/esm/apis/FeedbackApi.js +5 -2
- package/dist/esm/apis/InvitesApi.d.ts +39 -1
- package/dist/esm/apis/InvitesApi.js +42 -1
- package/dist/esm/apis/UsersApi.d.ts +51 -59
- package/dist/esm/apis/UsersApi.js +51 -58
- package/dist/esm/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
- package/dist/esm/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +13 -20
- package/dist/esm/models/AddedBy.d.ts +25 -0
- package/dist/esm/models/AddedBy.js +43 -0
- package/dist/esm/models/CreatePasswordUserRequest.d.ts +6 -0
- package/dist/esm/models/CreatePasswordUserRequest.js +2 -0
- package/dist/esm/models/ErrorResponse.d.ts +2 -0
- package/dist/esm/models/ErrorResponse.js +2 -0
- package/dist/esm/models/FeaturesResponse.d.ts +7 -0
- package/dist/esm/models/FeaturesResponse.js +5 -0
- package/dist/esm/models/GuideModuleProgress.d.ts +66 -0
- package/dist/{models/OnboardingProfileRequest.js → esm/models/GuideModuleProgress.js} +31 -25
- package/dist/esm/models/GuideModuleStatus.d.ts +26 -0
- package/dist/esm/models/GuideModuleStatus.js +44 -0
- package/dist/esm/models/GuideModules.d.ts +126 -0
- package/dist/esm/models/GuideModules.js +69 -0
- package/dist/esm/models/InvitePreviewResponse.d.ts +80 -0
- package/dist/esm/models/InvitePreviewResponse.js +57 -0
- package/dist/esm/models/InvitePreviewState.d.ts +28 -0
- package/dist/esm/models/InvitePreviewState.js +46 -0
- package/dist/esm/models/InviteRejection.d.ts +30 -0
- package/dist/esm/models/InviteRejection.js +48 -0
- package/dist/esm/models/KbSummaryResponse.d.ts +8 -0
- package/dist/esm/models/KbSummaryResponse.js +4 -0
- package/dist/esm/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
- package/dist/esm/models/{OnboardingProfileRequest.js → OnboardingState.js} +17 -19
- package/dist/esm/models/OnboardingStateUpdate.d.ts +61 -0
- package/dist/esm/models/OnboardingStateUpdate.js +48 -0
- package/dist/esm/models/OnboardingStep.d.ts +27 -0
- package/dist/esm/models/OnboardingStep.js +45 -0
- package/dist/esm/models/SignUpResponse.d.ts +174 -0
- package/dist/esm/models/SignUpResponse.js +107 -0
- package/dist/esm/models/TenantResponse.d.ts +7 -0
- package/dist/esm/models/TenantResponse.js +5 -0
- package/dist/esm/models/TenantUserJoinMethod.d.ts +26 -0
- package/dist/esm/models/TenantUserJoinMethod.js +44 -0
- package/dist/esm/models/UserResponse.d.ts +40 -0
- package/dist/esm/models/UserResponse.js +18 -0
- package/dist/esm/models/index.d.ts +13 -2
- package/dist/esm/models/index.js +13 -2
- package/dist/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
- package/dist/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +19 -26
- package/dist/models/AddedBy.d.ts +25 -0
- package/dist/models/AddedBy.js +51 -0
- package/dist/models/CreatePasswordUserRequest.d.ts +6 -0
- package/dist/models/CreatePasswordUserRequest.js +2 -0
- package/dist/models/ErrorResponse.d.ts +2 -0
- package/dist/models/ErrorResponse.js +2 -0
- package/dist/models/FeaturesResponse.d.ts +7 -0
- package/dist/models/FeaturesResponse.js +5 -0
- package/dist/models/GuideModuleProgress.d.ts +66 -0
- package/dist/models/GuideModuleProgress.js +72 -0
- package/dist/models/GuideModuleStatus.d.ts +26 -0
- package/dist/models/GuideModuleStatus.js +52 -0
- package/dist/models/GuideModules.d.ts +126 -0
- package/dist/models/GuideModules.js +77 -0
- package/dist/models/InvitePreviewResponse.d.ts +80 -0
- package/dist/models/InvitePreviewResponse.js +65 -0
- package/dist/models/InvitePreviewState.d.ts +28 -0
- package/dist/models/InvitePreviewState.js +54 -0
- package/dist/models/InviteRejection.d.ts +30 -0
- package/dist/models/InviteRejection.js +56 -0
- package/dist/models/KbSummaryResponse.d.ts +8 -0
- package/dist/models/KbSummaryResponse.js +4 -0
- package/dist/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
- package/dist/models/OnboardingState.js +56 -0
- package/dist/models/OnboardingStateUpdate.d.ts +61 -0
- package/dist/models/OnboardingStateUpdate.js +56 -0
- package/dist/models/OnboardingStep.d.ts +27 -0
- package/dist/models/OnboardingStep.js +53 -0
- package/dist/models/SignUpResponse.d.ts +174 -0
- package/dist/models/SignUpResponse.js +115 -0
- package/dist/models/TenantResponse.d.ts +7 -0
- package/dist/models/TenantResponse.js +5 -0
- package/dist/models/TenantUserJoinMethod.d.ts +26 -0
- package/dist/models/TenantUserJoinMethod.js +52 -0
- package/dist/models/UserResponse.d.ts +40 -0
- package/dist/models/UserResponse.js +18 -0
- package/dist/models/index.d.ts +13 -2
- package/dist/models/index.js +13 -2
- package/docs/{OnboardingCompanyRequest.md → AccessRequestResponse.md} +6 -9
- package/docs/{OnboardingProfileRequest.md → AddedBy.md} +4 -11
- package/docs/AuthApi.md +8 -5
- package/docs/CreatePasswordUserRequest.md +2 -0
- package/docs/FeaturesResponse.md +2 -0
- package/docs/FeedbackApi.md +8 -5
- package/docs/GuideModuleProgress.md +40 -0
- package/docs/GuideModuleStatus.md +32 -0
- package/docs/GuideModules.md +60 -0
- package/docs/InvitePreviewResponse.md +44 -0
- package/docs/InvitePreviewState.md +32 -0
- package/docs/InviteRejection.md +32 -0
- package/docs/InvitesApi.md +70 -0
- package/docs/KbSummaryResponse.md +2 -0
- package/docs/OnboardingState.md +39 -0
- package/docs/OnboardingStateUpdate.md +38 -0
- package/docs/OnboardingStep.md +32 -0
- package/docs/SignUpResponse.md +74 -0
- package/docs/TenantResponse.md +2 -0
- package/docs/TenantUserJoinMethod.md +32 -0
- package/docs/UserResponse.md +12 -0
- package/docs/UsersApi.md +36 -47
- package/package.json +1 -1
- package/src/apis/AuthApi.ts +20 -10
- package/src/apis/FeedbackApi.ts +14 -7
- package/src/apis/InvitesApi.ts +78 -0
- package/src/apis/UsersApi.ts +91 -110
- package/src/models/{OnboardingCompanyRequest.ts → AccessRequestResponse.ts} +19 -32
- package/src/models/AddedBy.ts +53 -0
- package/src/models/CreatePasswordUserRequest.ts +8 -0
- package/src/models/ErrorResponse.ts +2 -0
- package/src/models/FeaturesResponse.ts +16 -0
- package/src/models/GuideModuleProgress.ts +127 -0
- package/src/models/GuideModuleStatus.ts +54 -0
- package/src/models/GuideModules.ts +194 -0
- package/src/models/InvitePreviewResponse.ts +147 -0
- package/src/models/InvitePreviewState.ts +56 -0
- package/src/models/InviteRejection.ts +58 -0
- package/src/models/KbSummaryResponse.ts +9 -0
- package/src/models/{OnboardingProfileRequest.ts → OnboardingState.ts} +47 -33
- package/src/models/OnboardingStateUpdate.ts +115 -0
- package/src/models/OnboardingStep.ts +55 -0
- package/src/models/SignUpResponse.ts +303 -0
- package/src/models/TenantResponse.ts +16 -0
- package/src/models/TenantUserJoinMethod.ts +54 -0
- package/src/models/UserResponse.ts +77 -0
- package/src/models/index.ts +13 -2
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OnboardingStatePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfOnboardingState = instanceOfOnboardingState;
|
|
18
|
+
exports.OnboardingStateFromJSON = OnboardingStateFromJSON;
|
|
19
|
+
exports.OnboardingStateFromJSONTyped = OnboardingStateFromJSONTyped;
|
|
20
|
+
exports.OnboardingStateToJSON = OnboardingStateToJSON;
|
|
21
|
+
exports.OnboardingStateToJSONTyped = OnboardingStateToJSONTyped;
|
|
22
|
+
const GuideModules_1 = require("./GuideModules");
|
|
23
|
+
const OnboardingStep_1 = require("./OnboardingStep");
|
|
24
|
+
exports.OnboardingStatePropertyValidationAttributesMap = {};
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the OnboardingState interface.
|
|
27
|
+
*/
|
|
28
|
+
function instanceOfOnboardingState(value) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function OnboardingStateFromJSON(json) {
|
|
32
|
+
return OnboardingStateFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function OnboardingStateFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'currentStep': json['current_step'] == null ? undefined : (0, OnboardingStep_1.OnboardingStepFromJSON)(json['current_step']),
|
|
40
|
+
'guideModules': json['guide_modules'] == null ? undefined : (0, GuideModules_1.GuideModulesFromJSON)(json['guide_modules']),
|
|
41
|
+
'setupChecklistDismissed': json['setup_checklist_dismissed'] == null ? undefined : json['setup_checklist_dismissed'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function OnboardingStateToJSON(json) {
|
|
45
|
+
return OnboardingStateToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function OnboardingStateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'current_step': (0, OnboardingStep_1.OnboardingStepToJSON)(value['currentStep']),
|
|
53
|
+
'guide_modules': (0, GuideModules_1.GuideModulesToJSON)(value['guideModules']),
|
|
54
|
+
'setup_checklist_dismissed': value['setupChecklistDismissed'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { GuideModules } from './GuideModules';
|
|
13
|
+
import type { OnboardingStep } from './OnboardingStep';
|
|
14
|
+
/**
|
|
15
|
+
*
|
|
16
|
+
* @export
|
|
17
|
+
* @interface OnboardingStateUpdate
|
|
18
|
+
*/
|
|
19
|
+
export interface OnboardingStateUpdate {
|
|
20
|
+
/**
|
|
21
|
+
*
|
|
22
|
+
* @type {OnboardingStep}
|
|
23
|
+
* @memberof OnboardingStateUpdate
|
|
24
|
+
*/
|
|
25
|
+
currentStep?: OnboardingStep;
|
|
26
|
+
/**
|
|
27
|
+
* Guide module progress to merge in. A completed or dismissed module only moves back to in progress under a newer module version.
|
|
28
|
+
* @type {GuideModules}
|
|
29
|
+
* @memberof OnboardingStateUpdate
|
|
30
|
+
*/
|
|
31
|
+
guideModules?: GuideModules | null;
|
|
32
|
+
/**
|
|
33
|
+
* Whether the setup checklist is dismissed
|
|
34
|
+
* @type {boolean}
|
|
35
|
+
* @memberof OnboardingStateUpdate
|
|
36
|
+
*/
|
|
37
|
+
setupChecklistDismissed?: boolean | null;
|
|
38
|
+
}
|
|
39
|
+
export declare const OnboardingStateUpdatePropertyValidationAttributesMap: {
|
|
40
|
+
[property: string]: {
|
|
41
|
+
maxLength?: number;
|
|
42
|
+
minLength?: number;
|
|
43
|
+
pattern?: string;
|
|
44
|
+
maximum?: number;
|
|
45
|
+
exclusiveMaximum?: boolean;
|
|
46
|
+
minimum?: number;
|
|
47
|
+
exclusiveMinimum?: boolean;
|
|
48
|
+
multipleOf?: number;
|
|
49
|
+
maxItems?: number;
|
|
50
|
+
minItems?: number;
|
|
51
|
+
uniqueItems?: boolean;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* Check if a given object implements the OnboardingStateUpdate interface.
|
|
56
|
+
*/
|
|
57
|
+
export declare function instanceOfOnboardingStateUpdate(value: object): value is OnboardingStateUpdate;
|
|
58
|
+
export declare function OnboardingStateUpdateFromJSON(json: any): OnboardingStateUpdate;
|
|
59
|
+
export declare function OnboardingStateUpdateFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingStateUpdate;
|
|
60
|
+
export declare function OnboardingStateUpdateToJSON(json: any): OnboardingStateUpdate;
|
|
61
|
+
export declare function OnboardingStateUpdateToJSONTyped(value?: OnboardingStateUpdate | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OnboardingStateUpdatePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfOnboardingStateUpdate = instanceOfOnboardingStateUpdate;
|
|
18
|
+
exports.OnboardingStateUpdateFromJSON = OnboardingStateUpdateFromJSON;
|
|
19
|
+
exports.OnboardingStateUpdateFromJSONTyped = OnboardingStateUpdateFromJSONTyped;
|
|
20
|
+
exports.OnboardingStateUpdateToJSON = OnboardingStateUpdateToJSON;
|
|
21
|
+
exports.OnboardingStateUpdateToJSONTyped = OnboardingStateUpdateToJSONTyped;
|
|
22
|
+
const GuideModules_1 = require("./GuideModules");
|
|
23
|
+
const OnboardingStep_1 = require("./OnboardingStep");
|
|
24
|
+
exports.OnboardingStateUpdatePropertyValidationAttributesMap = {};
|
|
25
|
+
/**
|
|
26
|
+
* Check if a given object implements the OnboardingStateUpdate interface.
|
|
27
|
+
*/
|
|
28
|
+
function instanceOfOnboardingStateUpdate(value) {
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function OnboardingStateUpdateFromJSON(json) {
|
|
32
|
+
return OnboardingStateUpdateFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function OnboardingStateUpdateFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'currentStep': json['current_step'] == null ? undefined : (0, OnboardingStep_1.OnboardingStepFromJSON)(json['current_step']),
|
|
40
|
+
'guideModules': json['guide_modules'] == null ? undefined : (0, GuideModules_1.GuideModulesFromJSON)(json['guide_modules']),
|
|
41
|
+
'setupChecklistDismissed': json['setup_checklist_dismissed'] == null ? undefined : json['setup_checklist_dismissed'],
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function OnboardingStateUpdateToJSON(json) {
|
|
45
|
+
return OnboardingStateUpdateToJSONTyped(json, false);
|
|
46
|
+
}
|
|
47
|
+
function OnboardingStateUpdateToJSONTyped(value, ignoreDiscriminator = false) {
|
|
48
|
+
if (value == null) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
return {
|
|
52
|
+
'current_step': (0, OnboardingStep_1.OnboardingStepToJSON)(value['currentStep']),
|
|
53
|
+
'guide_modules': (0, GuideModules_1.GuideModulesToJSON)(value['guideModules']),
|
|
54
|
+
'setup_checklist_dismissed': value['setupChecklistDismissed'],
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const OnboardingStep: {
|
|
17
|
+
readonly Workspace: 'WORKSPACE';
|
|
18
|
+
readonly Knowledge: 'KNOWLEDGE';
|
|
19
|
+
readonly Team: 'TEAM';
|
|
20
|
+
readonly Destination: 'DESTINATION';
|
|
21
|
+
};
|
|
22
|
+
export type OnboardingStep = typeof OnboardingStep[keyof typeof OnboardingStep];
|
|
23
|
+
export declare function instanceOfOnboardingStep(value: any): boolean;
|
|
24
|
+
export declare function OnboardingStepFromJSON(json: any): OnboardingStep;
|
|
25
|
+
export declare function OnboardingStepFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingStep;
|
|
26
|
+
export declare function OnboardingStepToJSON(value?: OnboardingStep | null): any;
|
|
27
|
+
export declare function OnboardingStepToJSONTyped(value: any, ignoreDiscriminator: boolean): OnboardingStep;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* Knowledge Stack API
|
|
6
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 0.1.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.OnboardingStep = void 0;
|
|
17
|
+
exports.instanceOfOnboardingStep = instanceOfOnboardingStep;
|
|
18
|
+
exports.OnboardingStepFromJSON = OnboardingStepFromJSON;
|
|
19
|
+
exports.OnboardingStepFromJSONTyped = OnboardingStepFromJSONTyped;
|
|
20
|
+
exports.OnboardingStepToJSON = OnboardingStepToJSON;
|
|
21
|
+
exports.OnboardingStepToJSONTyped = OnboardingStepToJSONTyped;
|
|
22
|
+
/**
|
|
23
|
+
*
|
|
24
|
+
* @export
|
|
25
|
+
*/
|
|
26
|
+
exports.OnboardingStep = {
|
|
27
|
+
Workspace: 'WORKSPACE',
|
|
28
|
+
Knowledge: 'KNOWLEDGE',
|
|
29
|
+
Team: 'TEAM',
|
|
30
|
+
Destination: 'DESTINATION'
|
|
31
|
+
};
|
|
32
|
+
function instanceOfOnboardingStep(value) {
|
|
33
|
+
for (const key in exports.OnboardingStep) {
|
|
34
|
+
if (Object.prototype.hasOwnProperty.call(exports.OnboardingStep, key)) {
|
|
35
|
+
if (exports.OnboardingStep[key] === value) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
return false;
|
|
41
|
+
}
|
|
42
|
+
function OnboardingStepFromJSON(json) {
|
|
43
|
+
return OnboardingStepFromJSONTyped(json, false);
|
|
44
|
+
}
|
|
45
|
+
function OnboardingStepFromJSONTyped(json, ignoreDiscriminator) {
|
|
46
|
+
return json;
|
|
47
|
+
}
|
|
48
|
+
function OnboardingStepToJSON(value) {
|
|
49
|
+
return value;
|
|
50
|
+
}
|
|
51
|
+
function OnboardingStepToJSONTyped(value, ignoreDiscriminator) {
|
|
52
|
+
return value;
|
|
53
|
+
}
|
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Knowledge Stack API
|
|
3
|
+
* Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 0.1.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { TenantUserJoinMethod } from './TenantUserJoinMethod';
|
|
13
|
+
import type { IdpType } from './IdpType';
|
|
14
|
+
import type { InviteRejection } from './InviteRejection';
|
|
15
|
+
import type { TenantUserRole } from './TenantUserRole';
|
|
16
|
+
import type { OnboardingState } from './OnboardingState';
|
|
17
|
+
import type { UserInfo } from './UserInfo';
|
|
18
|
+
import type { AddedBy } from './AddedBy';
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @export
|
|
22
|
+
* @interface SignUpResponse
|
|
23
|
+
*/
|
|
24
|
+
export interface SignUpResponse {
|
|
25
|
+
/**
|
|
26
|
+
* User ID
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof SignUpResponse
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Email address of the user
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof SignUpResponse
|
|
35
|
+
*/
|
|
36
|
+
email: string | null;
|
|
37
|
+
/**
|
|
38
|
+
* Subscriber number as a string of digits (no country code). Returned as a string to avoid JS Number precision issues.
|
|
39
|
+
* @type {string}
|
|
40
|
+
* @memberof SignUpResponse
|
|
41
|
+
*/
|
|
42
|
+
phoneNumber?: string | null;
|
|
43
|
+
/**
|
|
44
|
+
* First name of the user
|
|
45
|
+
* @type {string}
|
|
46
|
+
* @memberof SignUpResponse
|
|
47
|
+
*/
|
|
48
|
+
firstName: string | null;
|
|
49
|
+
/**
|
|
50
|
+
* Last name of the user
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof SignUpResponse
|
|
53
|
+
*/
|
|
54
|
+
lastName: string | null;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {IdpType}
|
|
58
|
+
* @memberof SignUpResponse
|
|
59
|
+
*/
|
|
60
|
+
idpType: IdpType;
|
|
61
|
+
/**
|
|
62
|
+
* Current tenant ID the user is logged into
|
|
63
|
+
* @type {string}
|
|
64
|
+
* @memberof SignUpResponse
|
|
65
|
+
*/
|
|
66
|
+
currentTenantId: string;
|
|
67
|
+
/**
|
|
68
|
+
*
|
|
69
|
+
* @type {TenantUserRole}
|
|
70
|
+
* @memberof SignUpResponse
|
|
71
|
+
*/
|
|
72
|
+
currentTenantRole: TenantUserRole;
|
|
73
|
+
/**
|
|
74
|
+
* Default tenant ID the user shall be logged into
|
|
75
|
+
* @type {string}
|
|
76
|
+
* @memberof SignUpResponse
|
|
77
|
+
*/
|
|
78
|
+
defaultTenantId: string;
|
|
79
|
+
/**
|
|
80
|
+
* User's job title at the current tenant (per-membership)
|
|
81
|
+
* @type {string}
|
|
82
|
+
* @memberof SignUpResponse
|
|
83
|
+
*/
|
|
84
|
+
jobTitle?: string | null;
|
|
85
|
+
/**
|
|
86
|
+
* User's department at the current tenant (per-membership)
|
|
87
|
+
* @type {string}
|
|
88
|
+
* @memberof SignUpResponse
|
|
89
|
+
*/
|
|
90
|
+
department?: string | null;
|
|
91
|
+
/**
|
|
92
|
+
* What the user wrote about themselves at the current tenant. The chat agent reads it on every turn.
|
|
93
|
+
* @type {string}
|
|
94
|
+
* @memberof SignUpResponse
|
|
95
|
+
*/
|
|
96
|
+
bio?: string | null;
|
|
97
|
+
/**
|
|
98
|
+
* Presigned URL of the user's profile photo at the current tenant. Expires after six hours; read GET /v1/users/me again for a fresh one.
|
|
99
|
+
* @type {string}
|
|
100
|
+
* @memberof SignUpResponse
|
|
101
|
+
*/
|
|
102
|
+
avatarUrl?: string | null;
|
|
103
|
+
/**
|
|
104
|
+
* When the user finished onboarding for the current tenant. NULL = wizard should be shown.
|
|
105
|
+
* @type {Date}
|
|
106
|
+
* @memberof SignUpResponse
|
|
107
|
+
*/
|
|
108
|
+
onboardingCompletedAt?: Date | null;
|
|
109
|
+
/**
|
|
110
|
+
*
|
|
111
|
+
* @type {TenantUserJoinMethod}
|
|
112
|
+
* @memberof SignUpResponse
|
|
113
|
+
*/
|
|
114
|
+
joinMethod: TenantUserJoinMethod;
|
|
115
|
+
/**
|
|
116
|
+
* Resume step and guide progress for the current membership.
|
|
117
|
+
* @type {OnboardingState}
|
|
118
|
+
* @memberof SignUpResponse
|
|
119
|
+
*/
|
|
120
|
+
onboardingState?: OnboardingState | null;
|
|
121
|
+
/**
|
|
122
|
+
* Who sent the accepted invite that created the current membership. NULL when the membership did not come from an email invite, and on the sign-in and sign-up responses; read it from GET /v1/users/me.
|
|
123
|
+
* @type {UserInfo}
|
|
124
|
+
* @memberof SignUpResponse
|
|
125
|
+
*/
|
|
126
|
+
invitedBy?: UserInfo | null;
|
|
127
|
+
/**
|
|
128
|
+
*
|
|
129
|
+
* @type {AddedBy}
|
|
130
|
+
* @memberof SignUpResponse
|
|
131
|
+
*/
|
|
132
|
+
addedBy?: AddedBy;
|
|
133
|
+
/**
|
|
134
|
+
* Profile fields the identity provider overwrites on every sync, so clients render them read-only. Empty unless directory-managed.
|
|
135
|
+
* @type {Array<string>}
|
|
136
|
+
* @memberof SignUpResponse
|
|
137
|
+
*/
|
|
138
|
+
idpManagedFields?: Array<string>;
|
|
139
|
+
/**
|
|
140
|
+
* The current tenant's onboarding switch: true forces the flow on, false hides it, NULL follows the deployment default.
|
|
141
|
+
* @type {boolean}
|
|
142
|
+
* @memberof SignUpResponse
|
|
143
|
+
*/
|
|
144
|
+
onboardingEnabled?: boolean | null;
|
|
145
|
+
/**
|
|
146
|
+
*
|
|
147
|
+
* @type {InviteRejection}
|
|
148
|
+
* @memberof SignUpResponse
|
|
149
|
+
*/
|
|
150
|
+
inviteRejection?: InviteRejection;
|
|
151
|
+
}
|
|
152
|
+
export declare const SignUpResponsePropertyValidationAttributesMap: {
|
|
153
|
+
[property: string]: {
|
|
154
|
+
maxLength?: number;
|
|
155
|
+
minLength?: number;
|
|
156
|
+
pattern?: string;
|
|
157
|
+
maximum?: number;
|
|
158
|
+
exclusiveMaximum?: boolean;
|
|
159
|
+
minimum?: number;
|
|
160
|
+
exclusiveMinimum?: boolean;
|
|
161
|
+
multipleOf?: number;
|
|
162
|
+
maxItems?: number;
|
|
163
|
+
minItems?: number;
|
|
164
|
+
uniqueItems?: boolean;
|
|
165
|
+
};
|
|
166
|
+
};
|
|
167
|
+
/**
|
|
168
|
+
* Check if a given object implements the SignUpResponse interface.
|
|
169
|
+
*/
|
|
170
|
+
export declare function instanceOfSignUpResponse(value: object): value is SignUpResponse;
|
|
171
|
+
export declare function SignUpResponseFromJSON(json: any): SignUpResponse;
|
|
172
|
+
export declare function SignUpResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): SignUpResponse;
|
|
173
|
+
export declare function SignUpResponseToJSON(json: any): SignUpResponse;
|
|
174
|
+
export declare function SignUpResponseToJSONTyped(value?: SignUpResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -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
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.SignUpResponsePropertyValidationAttributesMap = void 0;
|
|
17
|
+
exports.instanceOfSignUpResponse = instanceOfSignUpResponse;
|
|
18
|
+
exports.SignUpResponseFromJSON = SignUpResponseFromJSON;
|
|
19
|
+
exports.SignUpResponseFromJSONTyped = SignUpResponseFromJSONTyped;
|
|
20
|
+
exports.SignUpResponseToJSON = SignUpResponseToJSON;
|
|
21
|
+
exports.SignUpResponseToJSONTyped = SignUpResponseToJSONTyped;
|
|
22
|
+
const TenantUserJoinMethod_1 = require("./TenantUserJoinMethod");
|
|
23
|
+
const IdpType_1 = require("./IdpType");
|
|
24
|
+
const InviteRejection_1 = require("./InviteRejection");
|
|
25
|
+
const TenantUserRole_1 = require("./TenantUserRole");
|
|
26
|
+
const OnboardingState_1 = require("./OnboardingState");
|
|
27
|
+
const UserInfo_1 = require("./UserInfo");
|
|
28
|
+
const AddedBy_1 = require("./AddedBy");
|
|
29
|
+
exports.SignUpResponsePropertyValidationAttributesMap = {};
|
|
30
|
+
/**
|
|
31
|
+
* Check if a given object implements the SignUpResponse interface.
|
|
32
|
+
*/
|
|
33
|
+
function instanceOfSignUpResponse(value) {
|
|
34
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('email' in value) || value['email'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('firstName' in value) || value['firstName'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('lastName' in value) || value['lastName'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('idpType' in value) || value['idpType'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
if (!('currentTenantId' in value) || value['currentTenantId'] === undefined)
|
|
45
|
+
return false;
|
|
46
|
+
if (!('currentTenantRole' in value) || value['currentTenantRole'] === undefined)
|
|
47
|
+
return false;
|
|
48
|
+
if (!('defaultTenantId' in value) || value['defaultTenantId'] === undefined)
|
|
49
|
+
return false;
|
|
50
|
+
if (!('joinMethod' in value) || value['joinMethod'] === undefined)
|
|
51
|
+
return false;
|
|
52
|
+
return true;
|
|
53
|
+
}
|
|
54
|
+
function SignUpResponseFromJSON(json) {
|
|
55
|
+
return SignUpResponseFromJSONTyped(json, false);
|
|
56
|
+
}
|
|
57
|
+
function SignUpResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
58
|
+
if (json == null) {
|
|
59
|
+
return json;
|
|
60
|
+
}
|
|
61
|
+
return {
|
|
62
|
+
'id': json['id'],
|
|
63
|
+
'email': json['email'],
|
|
64
|
+
'phoneNumber': json['phone_number'] == null ? undefined : json['phone_number'],
|
|
65
|
+
'firstName': json['first_name'],
|
|
66
|
+
'lastName': json['last_name'],
|
|
67
|
+
'idpType': (0, IdpType_1.IdpTypeFromJSON)(json['idp_type']),
|
|
68
|
+
'currentTenantId': json['current_tenant_id'],
|
|
69
|
+
'currentTenantRole': (0, TenantUserRole_1.TenantUserRoleFromJSON)(json['current_tenant_role']),
|
|
70
|
+
'defaultTenantId': json['default_tenant_id'],
|
|
71
|
+
'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
|
|
72
|
+
'department': json['department'] == null ? undefined : json['department'],
|
|
73
|
+
'bio': json['bio'] == null ? undefined : json['bio'],
|
|
74
|
+
'avatarUrl': json['avatar_url'] == null ? undefined : json['avatar_url'],
|
|
75
|
+
'onboardingCompletedAt': json['onboarding_completed_at'] == null ? undefined : (new Date(json['onboarding_completed_at'])),
|
|
76
|
+
'joinMethod': (0, TenantUserJoinMethod_1.TenantUserJoinMethodFromJSON)(json['join_method']),
|
|
77
|
+
'onboardingState': json['onboarding_state'] == null ? undefined : (0, OnboardingState_1.OnboardingStateFromJSON)(json['onboarding_state']),
|
|
78
|
+
'invitedBy': json['invited_by'] == null ? undefined : (0, UserInfo_1.UserInfoFromJSON)(json['invited_by']),
|
|
79
|
+
'addedBy': json['added_by'] == null ? undefined : (0, AddedBy_1.AddedByFromJSON)(json['added_by']),
|
|
80
|
+
'idpManagedFields': json['idp_managed_fields'] == null ? undefined : json['idp_managed_fields'],
|
|
81
|
+
'onboardingEnabled': json['onboarding_enabled'] == null ? undefined : json['onboarding_enabled'],
|
|
82
|
+
'inviteRejection': json['invite_rejection'] == null ? undefined : (0, InviteRejection_1.InviteRejectionFromJSON)(json['invite_rejection']),
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
function SignUpResponseToJSON(json) {
|
|
86
|
+
return SignUpResponseToJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
function SignUpResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
89
|
+
if (value == null) {
|
|
90
|
+
return value;
|
|
91
|
+
}
|
|
92
|
+
return {
|
|
93
|
+
'id': value['id'],
|
|
94
|
+
'email': value['email'],
|
|
95
|
+
'phone_number': value['phoneNumber'],
|
|
96
|
+
'first_name': value['firstName'],
|
|
97
|
+
'last_name': value['lastName'],
|
|
98
|
+
'idp_type': (0, IdpType_1.IdpTypeToJSON)(value['idpType']),
|
|
99
|
+
'current_tenant_id': value['currentTenantId'],
|
|
100
|
+
'current_tenant_role': (0, TenantUserRole_1.TenantUserRoleToJSON)(value['currentTenantRole']),
|
|
101
|
+
'default_tenant_id': value['defaultTenantId'],
|
|
102
|
+
'job_title': value['jobTitle'],
|
|
103
|
+
'department': value['department'],
|
|
104
|
+
'bio': value['bio'],
|
|
105
|
+
'avatar_url': value['avatarUrl'],
|
|
106
|
+
'onboarding_completed_at': value['onboardingCompletedAt'] == null ? value['onboardingCompletedAt'] : value['onboardingCompletedAt'].toISOString(),
|
|
107
|
+
'join_method': (0, TenantUserJoinMethod_1.TenantUserJoinMethodToJSON)(value['joinMethod']),
|
|
108
|
+
'onboarding_state': (0, OnboardingState_1.OnboardingStateToJSON)(value['onboardingState']),
|
|
109
|
+
'invited_by': (0, UserInfo_1.UserInfoToJSON)(value['invitedBy']),
|
|
110
|
+
'added_by': (0, AddedBy_1.AddedByToJSON)(value['addedBy']),
|
|
111
|
+
'idp_managed_fields': value['idpManagedFields'],
|
|
112
|
+
'onboarding_enabled': value['onboardingEnabled'],
|
|
113
|
+
'invite_rejection': (0, InviteRejection_1.InviteRejectionToJSON)(value['inviteRejection']),
|
|
114
|
+
};
|
|
115
|
+
}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import type { TenantBrandingResponse } from './TenantBrandingResponse';
|
|
13
|
+
import type { UserInfo } from './UserInfo';
|
|
13
14
|
import type { TenantSettingsResponse } from './TenantSettingsResponse';
|
|
14
15
|
/**
|
|
15
16
|
* Tenant response model.
|
|
@@ -29,6 +30,12 @@ export interface TenantResponse {
|
|
|
29
30
|
* @memberof TenantResponse
|
|
30
31
|
*/
|
|
31
32
|
name: string;
|
|
33
|
+
/**
|
|
34
|
+
* The tenant OWNER's name, so a member knows who can grant access. Null only when the tenant has no OWNER membership.
|
|
35
|
+
* @type {UserInfo}
|
|
36
|
+
* @memberof TenantResponse
|
|
37
|
+
*/
|
|
38
|
+
owner: UserInfo | null;
|
|
32
39
|
/**
|
|
33
40
|
* External IdP configuration
|
|
34
41
|
* @type {{ [key: string]: any; }}
|
|
@@ -20,6 +20,7 @@ exports.TenantResponseFromJSONTyped = TenantResponseFromJSONTyped;
|
|
|
20
20
|
exports.TenantResponseToJSON = TenantResponseToJSON;
|
|
21
21
|
exports.TenantResponseToJSONTyped = TenantResponseToJSONTyped;
|
|
22
22
|
const TenantBrandingResponse_1 = require("./TenantBrandingResponse");
|
|
23
|
+
const UserInfo_1 = require("./UserInfo");
|
|
23
24
|
const TenantSettingsResponse_1 = require("./TenantSettingsResponse");
|
|
24
25
|
exports.TenantResponsePropertyValidationAttributesMap = {
|
|
25
26
|
seats: {
|
|
@@ -35,6 +36,8 @@ function instanceOfTenantResponse(value) {
|
|
|
35
36
|
return false;
|
|
36
37
|
if (!('name' in value) || value['name'] === undefined)
|
|
37
38
|
return false;
|
|
39
|
+
if (!('owner' in value) || value['owner'] === undefined)
|
|
40
|
+
return false;
|
|
38
41
|
if (!('settings' in value) || value['settings'] === undefined)
|
|
39
42
|
return false;
|
|
40
43
|
if (!('seats' in value) || value['seats'] === undefined)
|
|
@@ -53,6 +56,7 @@ function TenantResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
53
56
|
return {
|
|
54
57
|
'id': json['id'],
|
|
55
58
|
'name': json['name'],
|
|
59
|
+
'owner': (0, UserInfo_1.UserInfoFromJSON)(json['owner']),
|
|
56
60
|
'idpConfig': json['idp_config'] == null ? undefined : json['idp_config'],
|
|
57
61
|
'settings': (0, TenantSettingsResponse_1.TenantSettingsResponseFromJSON)(json['settings']),
|
|
58
62
|
'branding': json['branding'] == null ? undefined : (0, TenantBrandingResponse_1.TenantBrandingResponseFromJSON)(json['branding']),
|
|
@@ -70,6 +74,7 @@ function TenantResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
70
74
|
return {
|
|
71
75
|
'id': value['id'],
|
|
72
76
|
'name': value['name'],
|
|
77
|
+
'owner': (0, UserInfo_1.UserInfoToJSON)(value['owner']),
|
|
73
78
|
'idp_config': value['idpConfig'],
|
|
74
79
|
'settings': (0, TenantSettingsResponse_1.TenantSettingsResponseToJSON)(value['settings']),
|
|
75
80
|
'branding': (0, TenantBrandingResponse_1.TenantBrandingResponseToJSON)(value['branding']),
|
|
@@ -0,0 +1,26 @@
|
|
|
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
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
*/
|
|
16
|
+
export declare const TenantUserJoinMethod: {
|
|
17
|
+
readonly Creator: 'CREATOR';
|
|
18
|
+
readonly Invited: 'INVITED';
|
|
19
|
+
readonly Added: 'ADDED';
|
|
20
|
+
};
|
|
21
|
+
export type TenantUserJoinMethod = typeof TenantUserJoinMethod[keyof typeof TenantUserJoinMethod];
|
|
22
|
+
export declare function instanceOfTenantUserJoinMethod(value: any): boolean;
|
|
23
|
+
export declare function TenantUserJoinMethodFromJSON(json: any): TenantUserJoinMethod;
|
|
24
|
+
export declare function TenantUserJoinMethodFromJSONTyped(json: any, ignoreDiscriminator: boolean): TenantUserJoinMethod;
|
|
25
|
+
export declare function TenantUserJoinMethodToJSON(value?: TenantUserJoinMethod | null): any;
|
|
26
|
+
export declare function TenantUserJoinMethodToJSONTyped(value: any, ignoreDiscriminator: boolean): TenantUserJoinMethod;
|