@knowledge-stack/ksapi 3.11.0 → 3.13.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.
Files changed (145) hide show
  1. package/.openapi-generator/FILES +26 -4
  2. package/README.md +18 -6
  3. package/dist/apis/AuthApi.d.ts +12 -9
  4. package/dist/apis/AuthApi.js +5 -2
  5. package/dist/apis/FeedbackApi.d.ts +10 -7
  6. package/dist/apis/FeedbackApi.js +5 -2
  7. package/dist/apis/InvitesApi.d.ts +39 -1
  8. package/dist/apis/InvitesApi.js +41 -0
  9. package/dist/apis/UsersApi.d.ts +51 -59
  10. package/dist/apis/UsersApi.js +50 -57
  11. package/dist/esm/apis/AuthApi.d.ts +12 -9
  12. package/dist/esm/apis/AuthApi.js +6 -3
  13. package/dist/esm/apis/FeedbackApi.d.ts +10 -7
  14. package/dist/esm/apis/FeedbackApi.js +5 -2
  15. package/dist/esm/apis/InvitesApi.d.ts +39 -1
  16. package/dist/esm/apis/InvitesApi.js +42 -1
  17. package/dist/esm/apis/UsersApi.d.ts +51 -59
  18. package/dist/esm/apis/UsersApi.js +51 -58
  19. package/dist/esm/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
  20. package/dist/esm/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +13 -20
  21. package/dist/esm/models/AddedBy.d.ts +25 -0
  22. package/dist/esm/models/AddedBy.js +43 -0
  23. package/dist/esm/models/CreatePasswordUserRequest.d.ts +6 -0
  24. package/dist/esm/models/CreatePasswordUserRequest.js +2 -0
  25. package/dist/esm/models/ErrorResponse.d.ts +2 -0
  26. package/dist/esm/models/ErrorResponse.js +2 -0
  27. package/dist/esm/models/FeaturesResponse.d.ts +7 -0
  28. package/dist/esm/models/FeaturesResponse.js +5 -0
  29. package/dist/esm/models/GuideModuleProgress.d.ts +66 -0
  30. package/dist/{models/OnboardingProfileRequest.js → esm/models/GuideModuleProgress.js} +31 -25
  31. package/dist/esm/models/GuideModuleStatus.d.ts +26 -0
  32. package/dist/esm/models/GuideModuleStatus.js +44 -0
  33. package/dist/esm/models/GuideModules.d.ts +126 -0
  34. package/dist/esm/models/GuideModules.js +69 -0
  35. package/dist/esm/models/InvitePreviewResponse.d.ts +80 -0
  36. package/dist/esm/models/InvitePreviewResponse.js +57 -0
  37. package/dist/esm/models/InvitePreviewState.d.ts +28 -0
  38. package/dist/esm/models/InvitePreviewState.js +46 -0
  39. package/dist/esm/models/InviteRejection.d.ts +30 -0
  40. package/dist/esm/models/InviteRejection.js +48 -0
  41. package/dist/esm/models/KbSummaryResponse.d.ts +8 -0
  42. package/dist/esm/models/KbSummaryResponse.js +4 -0
  43. package/dist/esm/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
  44. package/dist/esm/models/{OnboardingProfileRequest.js → OnboardingState.js} +17 -19
  45. package/dist/esm/models/OnboardingStateUpdate.d.ts +61 -0
  46. package/dist/esm/models/OnboardingStateUpdate.js +48 -0
  47. package/dist/esm/models/OnboardingStep.d.ts +27 -0
  48. package/dist/esm/models/OnboardingStep.js +45 -0
  49. package/dist/esm/models/SignUpResponse.d.ts +174 -0
  50. package/dist/esm/models/SignUpResponse.js +107 -0
  51. package/dist/esm/models/TenantResponse.d.ts +7 -0
  52. package/dist/esm/models/TenantResponse.js +5 -0
  53. package/dist/esm/models/TenantUserJoinMethod.d.ts +26 -0
  54. package/dist/esm/models/TenantUserJoinMethod.js +44 -0
  55. package/dist/esm/models/UserResponse.d.ts +40 -0
  56. package/dist/esm/models/UserResponse.js +18 -0
  57. package/dist/esm/models/index.d.ts +13 -2
  58. package/dist/esm/models/index.js +13 -2
  59. package/dist/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
  60. package/dist/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +19 -26
  61. package/dist/models/AddedBy.d.ts +25 -0
  62. package/dist/models/AddedBy.js +51 -0
  63. package/dist/models/CreatePasswordUserRequest.d.ts +6 -0
  64. package/dist/models/CreatePasswordUserRequest.js +2 -0
  65. package/dist/models/ErrorResponse.d.ts +2 -0
  66. package/dist/models/ErrorResponse.js +2 -0
  67. package/dist/models/FeaturesResponse.d.ts +7 -0
  68. package/dist/models/FeaturesResponse.js +5 -0
  69. package/dist/models/GuideModuleProgress.d.ts +66 -0
  70. package/dist/models/GuideModuleProgress.js +72 -0
  71. package/dist/models/GuideModuleStatus.d.ts +26 -0
  72. package/dist/models/GuideModuleStatus.js +52 -0
  73. package/dist/models/GuideModules.d.ts +126 -0
  74. package/dist/models/GuideModules.js +77 -0
  75. package/dist/models/InvitePreviewResponse.d.ts +80 -0
  76. package/dist/models/InvitePreviewResponse.js +65 -0
  77. package/dist/models/InvitePreviewState.d.ts +28 -0
  78. package/dist/models/InvitePreviewState.js +54 -0
  79. package/dist/models/InviteRejection.d.ts +30 -0
  80. package/dist/models/InviteRejection.js +56 -0
  81. package/dist/models/KbSummaryResponse.d.ts +8 -0
  82. package/dist/models/KbSummaryResponse.js +4 -0
  83. package/dist/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
  84. package/dist/models/OnboardingState.js +56 -0
  85. package/dist/models/OnboardingStateUpdate.d.ts +61 -0
  86. package/dist/models/OnboardingStateUpdate.js +56 -0
  87. package/dist/models/OnboardingStep.d.ts +27 -0
  88. package/dist/models/OnboardingStep.js +53 -0
  89. package/dist/models/SignUpResponse.d.ts +174 -0
  90. package/dist/models/SignUpResponse.js +115 -0
  91. package/dist/models/TenantResponse.d.ts +7 -0
  92. package/dist/models/TenantResponse.js +5 -0
  93. package/dist/models/TenantUserJoinMethod.d.ts +26 -0
  94. package/dist/models/TenantUserJoinMethod.js +52 -0
  95. package/dist/models/UserResponse.d.ts +40 -0
  96. package/dist/models/UserResponse.js +18 -0
  97. package/dist/models/index.d.ts +13 -2
  98. package/dist/models/index.js +13 -2
  99. package/docs/{OnboardingCompanyRequest.md → AccessRequestResponse.md} +6 -9
  100. package/docs/{OnboardingProfileRequest.md → AddedBy.md} +4 -11
  101. package/docs/AuthApi.md +8 -5
  102. package/docs/CreatePasswordUserRequest.md +2 -0
  103. package/docs/FeaturesResponse.md +2 -0
  104. package/docs/FeedbackApi.md +8 -5
  105. package/docs/GuideModuleProgress.md +40 -0
  106. package/docs/GuideModuleStatus.md +32 -0
  107. package/docs/GuideModules.md +60 -0
  108. package/docs/InvitePreviewResponse.md +44 -0
  109. package/docs/InvitePreviewState.md +32 -0
  110. package/docs/InviteRejection.md +32 -0
  111. package/docs/InvitesApi.md +70 -0
  112. package/docs/KbSummaryResponse.md +2 -0
  113. package/docs/OnboardingState.md +39 -0
  114. package/docs/OnboardingStateUpdate.md +38 -0
  115. package/docs/OnboardingStep.md +32 -0
  116. package/docs/SignUpResponse.md +74 -0
  117. package/docs/TenantResponse.md +2 -0
  118. package/docs/TenantUserJoinMethod.md +32 -0
  119. package/docs/UserResponse.md +12 -0
  120. package/docs/UsersApi.md +36 -47
  121. package/package.json +1 -1
  122. package/src/apis/AuthApi.ts +20 -10
  123. package/src/apis/FeedbackApi.ts +14 -7
  124. package/src/apis/InvitesApi.ts +78 -0
  125. package/src/apis/UsersApi.ts +91 -110
  126. package/src/models/{OnboardingCompanyRequest.ts → AccessRequestResponse.ts} +19 -32
  127. package/src/models/AddedBy.ts +53 -0
  128. package/src/models/CreatePasswordUserRequest.ts +8 -0
  129. package/src/models/ErrorResponse.ts +2 -0
  130. package/src/models/FeaturesResponse.ts +16 -0
  131. package/src/models/GuideModuleProgress.ts +127 -0
  132. package/src/models/GuideModuleStatus.ts +54 -0
  133. package/src/models/GuideModules.ts +194 -0
  134. package/src/models/InvitePreviewResponse.ts +147 -0
  135. package/src/models/InvitePreviewState.ts +56 -0
  136. package/src/models/InviteRejection.ts +58 -0
  137. package/src/models/KbSummaryResponse.ts +9 -0
  138. package/src/models/{OnboardingProfileRequest.ts → OnboardingState.ts} +47 -33
  139. package/src/models/OnboardingStateUpdate.ts +115 -0
  140. package/src/models/OnboardingStep.ts +55 -0
  141. package/src/models/SignUpResponse.ts +303 -0
  142. package/src/models/TenantResponse.ts +16 -0
  143. package/src/models/TenantUserJoinMethod.ts +54 -0
  144. package/src/models/UserResponse.ts +77 -0
  145. package/src/models/index.ts +13 -2
@@ -0,0 +1,80 @@
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 { TenantUserRole } from './TenantUserRole';
13
+ import type { UserInfo } from './UserInfo';
14
+ import type { InvitePreviewState } from './InvitePreviewState';
15
+ /**
16
+ *
17
+ * @export
18
+ * @interface InvitePreviewResponse
19
+ */
20
+ export interface InvitePreviewResponse {
21
+ /**
22
+ *
23
+ * @type {InvitePreviewState}
24
+ * @memberof InvitePreviewResponse
25
+ */
26
+ state: InvitePreviewState;
27
+ /**
28
+ * Invitee email, to lock the form
29
+ * @type {string}
30
+ * @memberof InvitePreviewResponse
31
+ */
32
+ email?: string | null;
33
+ /**
34
+ *
35
+ * @type {string}
36
+ * @memberof InvitePreviewResponse
37
+ */
38
+ tenantName?: string | null;
39
+ /**
40
+ *
41
+ * @type {TenantUserRole}
42
+ * @memberof InvitePreviewResponse
43
+ */
44
+ role?: TenantUserRole;
45
+ /**
46
+ *
47
+ * @type {Date}
48
+ * @memberof InvitePreviewResponse
49
+ */
50
+ expiresAt?: Date | null;
51
+ /**
52
+ * Display name only, no email
53
+ * @type {UserInfo}
54
+ * @memberof InvitePreviewResponse
55
+ */
56
+ invitedBy?: UserInfo | null;
57
+ }
58
+ export declare const InvitePreviewResponsePropertyValidationAttributesMap: {
59
+ [property: string]: {
60
+ maxLength?: number;
61
+ minLength?: number;
62
+ pattern?: string;
63
+ maximum?: number;
64
+ exclusiveMaximum?: boolean;
65
+ minimum?: number;
66
+ exclusiveMinimum?: boolean;
67
+ multipleOf?: number;
68
+ maxItems?: number;
69
+ minItems?: number;
70
+ uniqueItems?: boolean;
71
+ };
72
+ };
73
+ /**
74
+ * Check if a given object implements the InvitePreviewResponse interface.
75
+ */
76
+ export declare function instanceOfInvitePreviewResponse(value: object): value is InvitePreviewResponse;
77
+ export declare function InvitePreviewResponseFromJSON(json: any): InvitePreviewResponse;
78
+ export declare function InvitePreviewResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitePreviewResponse;
79
+ export declare function InvitePreviewResponseToJSON(json: any): InvitePreviewResponse;
80
+ export declare function InvitePreviewResponseToJSONTyped(value?: InvitePreviewResponse | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,57 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { TenantUserRoleFromJSON, TenantUserRoleToJSON, } from './TenantUserRole';
15
+ import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
16
+ import { InvitePreviewStateFromJSON, InvitePreviewStateToJSON, } from './InvitePreviewState';
17
+ export const InvitePreviewResponsePropertyValidationAttributesMap = {};
18
+ /**
19
+ * Check if a given object implements the InvitePreviewResponse interface.
20
+ */
21
+ export function instanceOfInvitePreviewResponse(value) {
22
+ if (!('state' in value) || value['state'] === undefined)
23
+ return false;
24
+ return true;
25
+ }
26
+ export function InvitePreviewResponseFromJSON(json) {
27
+ return InvitePreviewResponseFromJSONTyped(json, false);
28
+ }
29
+ export function InvitePreviewResponseFromJSONTyped(json, ignoreDiscriminator) {
30
+ if (json == null) {
31
+ return json;
32
+ }
33
+ return {
34
+ 'state': InvitePreviewStateFromJSON(json['state']),
35
+ 'email': json['email'] == null ? undefined : json['email'],
36
+ 'tenantName': json['tenant_name'] == null ? undefined : json['tenant_name'],
37
+ 'role': json['role'] == null ? undefined : TenantUserRoleFromJSON(json['role']),
38
+ 'expiresAt': json['expires_at'] == null ? undefined : (new Date(json['expires_at'])),
39
+ 'invitedBy': json['invited_by'] == null ? undefined : UserInfoFromJSON(json['invited_by']),
40
+ };
41
+ }
42
+ export function InvitePreviewResponseToJSON(json) {
43
+ return InvitePreviewResponseToJSONTyped(json, false);
44
+ }
45
+ export function InvitePreviewResponseToJSONTyped(value, ignoreDiscriminator = false) {
46
+ if (value == null) {
47
+ return value;
48
+ }
49
+ return {
50
+ 'state': InvitePreviewStateToJSON(value['state']),
51
+ 'email': value['email'],
52
+ 'tenant_name': value['tenantName'],
53
+ 'role': TenantUserRoleToJSON(value['role']),
54
+ 'expires_at': value['expiresAt'] == null ? value['expiresAt'] : value['expiresAt'].toISOString(),
55
+ 'invited_by': UserInfoToJSON(value['invitedBy']),
56
+ };
57
+ }
@@ -0,0 +1,28 @@
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 InvitePreviewState: {
17
+ readonly Valid: 'valid';
18
+ readonly Expired: 'expired';
19
+ readonly Accepted: 'accepted';
20
+ readonly NotFound: 'not_found';
21
+ readonly TenantUnavailable: 'tenant_unavailable';
22
+ };
23
+ export type InvitePreviewState = typeof InvitePreviewState[keyof typeof InvitePreviewState];
24
+ export declare function instanceOfInvitePreviewState(value: any): boolean;
25
+ export declare function InvitePreviewStateFromJSON(json: any): InvitePreviewState;
26
+ export declare function InvitePreviewStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): InvitePreviewState;
27
+ export declare function InvitePreviewStateToJSON(value?: InvitePreviewState | null): any;
28
+ export declare function InvitePreviewStateToJSONTyped(value: any, ignoreDiscriminator: boolean): InvitePreviewState;
@@ -0,0 +1,46 @@
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
+ * @export
17
+ */
18
+ export const InvitePreviewState = {
19
+ Valid: 'valid',
20
+ Expired: 'expired',
21
+ Accepted: 'accepted',
22
+ NotFound: 'not_found',
23
+ TenantUnavailable: 'tenant_unavailable'
24
+ };
25
+ export function instanceOfInvitePreviewState(value) {
26
+ for (const key in InvitePreviewState) {
27
+ if (Object.prototype.hasOwnProperty.call(InvitePreviewState, key)) {
28
+ if (InvitePreviewState[key] === value) {
29
+ return true;
30
+ }
31
+ }
32
+ }
33
+ return false;
34
+ }
35
+ export function InvitePreviewStateFromJSON(json) {
36
+ return InvitePreviewStateFromJSONTyped(json, false);
37
+ }
38
+ export function InvitePreviewStateFromJSONTyped(json, ignoreDiscriminator) {
39
+ return json;
40
+ }
41
+ export function InvitePreviewStateToJSON(value) {
42
+ return value;
43
+ }
44
+ export function InvitePreviewStateToJSONTyped(value, ignoreDiscriminator) {
45
+ return value;
46
+ }
@@ -0,0 +1,30 @@
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 InviteRejection: {
17
+ readonly NotFound: 'not_found';
18
+ readonly Accepted: 'accepted';
19
+ readonly Expired: 'expired';
20
+ readonly TenantUnavailable: 'tenant_unavailable';
21
+ readonly InvitesDisabled: 'invites_disabled';
22
+ readonly EmailMismatch: 'email_mismatch';
23
+ readonly NoSeat: 'no_seat';
24
+ };
25
+ export type InviteRejection = typeof InviteRejection[keyof typeof InviteRejection];
26
+ export declare function instanceOfInviteRejection(value: any): boolean;
27
+ export declare function InviteRejectionFromJSON(json: any): InviteRejection;
28
+ export declare function InviteRejectionFromJSONTyped(json: any, ignoreDiscriminator: boolean): InviteRejection;
29
+ export declare function InviteRejectionToJSON(value?: InviteRejection | null): any;
30
+ export declare function InviteRejectionToJSONTyped(value: any, ignoreDiscriminator: boolean): InviteRejection;
@@ -0,0 +1,48 @@
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
+ * @export
17
+ */
18
+ export const InviteRejection = {
19
+ NotFound: 'not_found',
20
+ Accepted: 'accepted',
21
+ Expired: 'expired',
22
+ TenantUnavailable: 'tenant_unavailable',
23
+ InvitesDisabled: 'invites_disabled',
24
+ EmailMismatch: 'email_mismatch',
25
+ NoSeat: 'no_seat'
26
+ };
27
+ export function instanceOfInviteRejection(value) {
28
+ for (const key in InviteRejection) {
29
+ if (Object.prototype.hasOwnProperty.call(InviteRejection, key)) {
30
+ if (InviteRejection[key] === value) {
31
+ return true;
32
+ }
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+ export function InviteRejectionFromJSON(json) {
38
+ return InviteRejectionFromJSONTyped(json, false);
39
+ }
40
+ export function InviteRejectionFromJSONTyped(json, ignoreDiscriminator) {
41
+ return json;
42
+ }
43
+ export function InviteRejectionToJSON(value) {
44
+ return value;
45
+ }
46
+ export function InviteRejectionToJSONTyped(value, ignoreDiscriminator) {
47
+ return value;
48
+ }
@@ -38,6 +38,14 @@ export interface KbSummaryResponse {
38
38
  documentsByType: {
39
39
  [key: string]: number;
40
40
  };
41
+ /**
42
+ * Live document count keyed by the active version's pipeline status (pending, processing, completed, failed, cancelled, quota_limit). Documents whose active version was never ingested are absent.
43
+ * @type {{ [key: string]: number; }}
44
+ * @memberof KbSummaryResponse
45
+ */
46
+ documentsByIngestionStatus: {
47
+ [key: string]: number;
48
+ };
41
49
  /**
42
50
  *
43
51
  * @type {number}
@@ -23,6 +23,8 @@ export function instanceOfKbSummaryResponse(value) {
23
23
  return false;
24
24
  if (!('documentsByType' in value) || value['documentsByType'] === undefined)
25
25
  return false;
26
+ if (!('documentsByIngestionStatus' in value) || value['documentsByIngestionStatus'] === undefined)
27
+ return false;
26
28
  if (!('documentVersionsTotal' in value) || value['documentVersionsTotal'] === undefined)
27
29
  return false;
28
30
  if (!('chunksTotal' in value) || value['chunksTotal'] === undefined)
@@ -64,6 +66,7 @@ export function KbSummaryResponseFromJSONTyped(json, ignoreDiscriminator) {
64
66
  'documentsTotal': json['documents_total'],
65
67
  'documentsByOrigin': json['documents_by_origin'],
66
68
  'documentsByType': json['documents_by_type'],
69
+ 'documentsByIngestionStatus': json['documents_by_ingestion_status'],
67
70
  'documentVersionsTotal': json['document_versions_total'],
68
71
  'chunksTotal': json['chunks_total'],
69
72
  'chunksByType': json['chunks_by_type'],
@@ -91,6 +94,7 @@ export function KbSummaryResponseToJSONTyped(value, ignoreDiscriminator = false)
91
94
  'documents_total': value['documentsTotal'],
92
95
  'documents_by_origin': value['documentsByOrigin'],
93
96
  'documents_by_type': value['documentsByType'],
97
+ 'documents_by_ingestion_status': value['documentsByIngestionStatus'],
94
98
  'document_versions_total': value['documentVersionsTotal'],
95
99
  'chunks_total': value['chunksTotal'],
96
100
  'chunks_by_type': value['chunksByType'],
@@ -9,26 +9,34 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { GuideModules } from './GuideModules';
13
+ import type { OnboardingStep } from './OnboardingStep';
12
14
  /**
13
- * Step 1 of onboarding — tenant-wide company info. OWNER/ADMIN only.
15
+ * Stored state: keys and steps this release does not know are dropped.
14
16
  * @export
15
- * @interface OnboardingCompanyRequest
17
+ * @interface OnboardingState
16
18
  */
17
- export interface OnboardingCompanyRequest {
19
+ export interface OnboardingState {
18
20
  /**
19
- * Brief company description (≤5000 chars)
20
- * @type {string}
21
- * @memberof OnboardingCompanyRequest
21
+ *
22
+ * @type {OnboardingStep}
23
+ * @memberof OnboardingState
22
24
  */
23
- description?: string | null;
25
+ currentStep?: OnboardingStep;
24
26
  /**
25
- * Industry / company type (free text)
26
- * @type {string}
27
- * @memberof OnboardingCompanyRequest
27
+ *
28
+ * @type {GuideModules}
29
+ * @memberof OnboardingState
28
30
  */
29
- industry?: string | null;
31
+ guideModules?: GuideModules;
32
+ /**
33
+ *
34
+ * @type {boolean}
35
+ * @memberof OnboardingState
36
+ */
37
+ setupChecklistDismissed?: boolean;
30
38
  }
31
- export declare const OnboardingCompanyRequestPropertyValidationAttributesMap: {
39
+ export declare const OnboardingStatePropertyValidationAttributesMap: {
32
40
  [property: string]: {
33
41
  maxLength?: number;
34
42
  minLength?: number;
@@ -44,10 +52,10 @@ export declare const OnboardingCompanyRequestPropertyValidationAttributesMap: {
44
52
  };
45
53
  };
46
54
  /**
47
- * Check if a given object implements the OnboardingCompanyRequest interface.
55
+ * Check if a given object implements the OnboardingState interface.
48
56
  */
49
- export declare function instanceOfOnboardingCompanyRequest(value: object): value is OnboardingCompanyRequest;
50
- export declare function OnboardingCompanyRequestFromJSON(json: any): OnboardingCompanyRequest;
51
- export declare function OnboardingCompanyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingCompanyRequest;
52
- export declare function OnboardingCompanyRequestToJSON(json: any): OnboardingCompanyRequest;
53
- export declare function OnboardingCompanyRequestToJSONTyped(value?: OnboardingCompanyRequest | null, ignoreDiscriminator?: boolean): any;
57
+ export declare function instanceOfOnboardingState(value: object): value is OnboardingState;
58
+ export declare function OnboardingStateFromJSON(json: any): OnboardingState;
59
+ export declare function OnboardingStateFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingState;
60
+ export declare function OnboardingStateToJSON(json: any): OnboardingState;
61
+ export declare function OnboardingStateToJSONTyped(value?: OnboardingState | null, ignoreDiscriminator?: boolean): any;
@@ -11,40 +11,38 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
- export const OnboardingProfileRequestPropertyValidationAttributesMap = {
15
- jobTitle: {
16
- maxLength: 120,
17
- },
18
- };
14
+ import { GuideModulesFromJSON, GuideModulesToJSON, } from './GuideModules';
15
+ import { OnboardingStepFromJSON, OnboardingStepToJSON, } from './OnboardingStep';
16
+ export const OnboardingStatePropertyValidationAttributesMap = {};
19
17
  /**
20
- * Check if a given object implements the OnboardingProfileRequest interface.
18
+ * Check if a given object implements the OnboardingState interface.
21
19
  */
22
- export function instanceOfOnboardingProfileRequest(value) {
20
+ export function instanceOfOnboardingState(value) {
23
21
  return true;
24
22
  }
25
- export function OnboardingProfileRequestFromJSON(json) {
26
- return OnboardingProfileRequestFromJSONTyped(json, false);
23
+ export function OnboardingStateFromJSON(json) {
24
+ return OnboardingStateFromJSONTyped(json, false);
27
25
  }
28
- export function OnboardingProfileRequestFromJSONTyped(json, ignoreDiscriminator) {
26
+ export function OnboardingStateFromJSONTyped(json, ignoreDiscriminator) {
29
27
  if (json == null) {
30
28
  return json;
31
29
  }
32
30
  return {
33
- 'firstName': json['first_name'] == null ? undefined : json['first_name'],
34
- 'lastName': json['last_name'] == null ? undefined : json['last_name'],
35
- 'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
31
+ 'currentStep': json['current_step'] == null ? undefined : OnboardingStepFromJSON(json['current_step']),
32
+ 'guideModules': json['guide_modules'] == null ? undefined : GuideModulesFromJSON(json['guide_modules']),
33
+ 'setupChecklistDismissed': json['setup_checklist_dismissed'] == null ? undefined : json['setup_checklist_dismissed'],
36
34
  };
37
35
  }
38
- export function OnboardingProfileRequestToJSON(json) {
39
- return OnboardingProfileRequestToJSONTyped(json, false);
36
+ export function OnboardingStateToJSON(json) {
37
+ return OnboardingStateToJSONTyped(json, false);
40
38
  }
41
- export function OnboardingProfileRequestToJSONTyped(value, ignoreDiscriminator = false) {
39
+ export function OnboardingStateToJSONTyped(value, ignoreDiscriminator = false) {
42
40
  if (value == null) {
43
41
  return value;
44
42
  }
45
43
  return {
46
- 'first_name': value['firstName'],
47
- 'last_name': value['lastName'],
48
- 'job_title': value['jobTitle'],
44
+ 'current_step': OnboardingStepToJSON(value['currentStep']),
45
+ 'guide_modules': GuideModulesToJSON(value['guideModules']),
46
+ 'setup_checklist_dismissed': value['setupChecklistDismissed'],
49
47
  };
50
48
  }
@@ -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,48 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Knowledge Stack API
5
+ * Knowledge Stack backend API for authentication and knowledge management. ## Integrating (RPA / machine clients) **Base URL.** Knowledge Stack is self-hosted — point at your own deployment host (see `servers`). The `localhost` entry is for local development only. **Authentication.** Send `Authorization: Bearer <api-key>` on every request. Mint an API key once via `POST /v1/api-keys` from a signed-in browser session; the raw `sk-user-...` secret is returned **only** at creation, so store it then. A key inherits its owning user\'s live tenant role and path permissions — create RPA keys from a least-privilege user, and set `expires_at` for rotation. The `ks_uat` cookie scheme is browser-only and cannot be used by headless clients. **Async work is polled, not pushed.** There are no outbound webhooks. - `POST /v1/documents/ingest` returns `201` immediately with a `workflow_id`; poll `GET /v1/system-jobs/document_versions/{workflow_id}` until `status` is terminal (anything other than `pending`/`processing`). The `Location` response header points at this poll resource. - `POST /v1/workflow-runs/{run_id}/start` returns `202`; poll `GET /v1/workflow-runs/{run_id}` until `execution_state` is `COMPLETED` or `FAILED`. The `Location` header points at the run resource. - `POST /v1/agent/ask` is **synchronous** — it blocks until the agent finishes and returns the answer inline. Use a generous HTTP timeout. **Pagination.** List endpoints accept `limit`/`offset` and return `{items, total, limit, offset}`. **Errors.** Every non-2xx body is `{detail, code, request_id}`. `code` is a stable value from a closed set (see the `ErrorResponse` schema\'s `code` enum) — branch on it rather than parsing `detail`. Quota rejections return `429` with a `Retry-After` header; transient lock contention returns a retryable `503`. Quote `request_id` (also the `x-request-id` response header) to support. **Idempotency.** `POST /v1/workflow-runs` accepts an `idempotency_key` to dedupe retried run creation. `agent/ask` charges one message *before* running and does not refund a client-cancelled call.
6
+ *
7
+ * The version of the OpenAPI document: 0.1.0
8
+ *
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+ import { GuideModulesFromJSON, GuideModulesToJSON, } from './GuideModules';
15
+ import { OnboardingStepFromJSON, OnboardingStepToJSON, } from './OnboardingStep';
16
+ export const OnboardingStateUpdatePropertyValidationAttributesMap = {};
17
+ /**
18
+ * Check if a given object implements the OnboardingStateUpdate interface.
19
+ */
20
+ export function instanceOfOnboardingStateUpdate(value) {
21
+ return true;
22
+ }
23
+ export function OnboardingStateUpdateFromJSON(json) {
24
+ return OnboardingStateUpdateFromJSONTyped(json, false);
25
+ }
26
+ export function OnboardingStateUpdateFromJSONTyped(json, ignoreDiscriminator) {
27
+ if (json == null) {
28
+ return json;
29
+ }
30
+ return {
31
+ 'currentStep': json['current_step'] == null ? undefined : OnboardingStepFromJSON(json['current_step']),
32
+ 'guideModules': json['guide_modules'] == null ? undefined : GuideModulesFromJSON(json['guide_modules']),
33
+ 'setupChecklistDismissed': json['setup_checklist_dismissed'] == null ? undefined : json['setup_checklist_dismissed'],
34
+ };
35
+ }
36
+ export function OnboardingStateUpdateToJSON(json) {
37
+ return OnboardingStateUpdateToJSONTyped(json, false);
38
+ }
39
+ export function OnboardingStateUpdateToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'current_step': OnboardingStepToJSON(value['currentStep']),
45
+ 'guide_modules': GuideModulesToJSON(value['guideModules']),
46
+ 'setup_checklist_dismissed': value['setupChecklistDismissed'],
47
+ };
48
+ }
@@ -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;