@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.
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,45 @@
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 OnboardingStep = {
19
+ Workspace: 'WORKSPACE',
20
+ Knowledge: 'KNOWLEDGE',
21
+ Team: 'TEAM',
22
+ Destination: 'DESTINATION'
23
+ };
24
+ export function instanceOfOnboardingStep(value) {
25
+ for (const key in OnboardingStep) {
26
+ if (Object.prototype.hasOwnProperty.call(OnboardingStep, key)) {
27
+ if (OnboardingStep[key] === value) {
28
+ return true;
29
+ }
30
+ }
31
+ }
32
+ return false;
33
+ }
34
+ export function OnboardingStepFromJSON(json) {
35
+ return OnboardingStepFromJSONTyped(json, false);
36
+ }
37
+ export function OnboardingStepFromJSONTyped(json, ignoreDiscriminator) {
38
+ return json;
39
+ }
40
+ export function OnboardingStepToJSON(value) {
41
+ return value;
42
+ }
43
+ export function OnboardingStepToJSONTyped(value, ignoreDiscriminator) {
44
+ return value;
45
+ }
@@ -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,107 @@
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 { TenantUserJoinMethodFromJSON, TenantUserJoinMethodToJSON, } from './TenantUserJoinMethod';
15
+ import { IdpTypeFromJSON, IdpTypeToJSON, } from './IdpType';
16
+ import { InviteRejectionFromJSON, InviteRejectionToJSON, } from './InviteRejection';
17
+ import { TenantUserRoleFromJSON, TenantUserRoleToJSON, } from './TenantUserRole';
18
+ import { OnboardingStateFromJSON, OnboardingStateToJSON, } from './OnboardingState';
19
+ import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
20
+ import { AddedByFromJSON, AddedByToJSON, } from './AddedBy';
21
+ export const SignUpResponsePropertyValidationAttributesMap = {};
22
+ /**
23
+ * Check if a given object implements the SignUpResponse interface.
24
+ */
25
+ export function instanceOfSignUpResponse(value) {
26
+ if (!('id' in value) || value['id'] === undefined)
27
+ return false;
28
+ if (!('email' in value) || value['email'] === undefined)
29
+ return false;
30
+ if (!('firstName' in value) || value['firstName'] === undefined)
31
+ return false;
32
+ if (!('lastName' in value) || value['lastName'] === undefined)
33
+ return false;
34
+ if (!('idpType' in value) || value['idpType'] === undefined)
35
+ return false;
36
+ if (!('currentTenantId' in value) || value['currentTenantId'] === undefined)
37
+ return false;
38
+ if (!('currentTenantRole' in value) || value['currentTenantRole'] === undefined)
39
+ return false;
40
+ if (!('defaultTenantId' in value) || value['defaultTenantId'] === undefined)
41
+ return false;
42
+ if (!('joinMethod' in value) || value['joinMethod'] === undefined)
43
+ return false;
44
+ return true;
45
+ }
46
+ export function SignUpResponseFromJSON(json) {
47
+ return SignUpResponseFromJSONTyped(json, false);
48
+ }
49
+ export function SignUpResponseFromJSONTyped(json, ignoreDiscriminator) {
50
+ if (json == null) {
51
+ return json;
52
+ }
53
+ return {
54
+ 'id': json['id'],
55
+ 'email': json['email'],
56
+ 'phoneNumber': json['phone_number'] == null ? undefined : json['phone_number'],
57
+ 'firstName': json['first_name'],
58
+ 'lastName': json['last_name'],
59
+ 'idpType': IdpTypeFromJSON(json['idp_type']),
60
+ 'currentTenantId': json['current_tenant_id'],
61
+ 'currentTenantRole': TenantUserRoleFromJSON(json['current_tenant_role']),
62
+ 'defaultTenantId': json['default_tenant_id'],
63
+ 'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
64
+ 'department': json['department'] == null ? undefined : json['department'],
65
+ 'bio': json['bio'] == null ? undefined : json['bio'],
66
+ 'avatarUrl': json['avatar_url'] == null ? undefined : json['avatar_url'],
67
+ 'onboardingCompletedAt': json['onboarding_completed_at'] == null ? undefined : (new Date(json['onboarding_completed_at'])),
68
+ 'joinMethod': TenantUserJoinMethodFromJSON(json['join_method']),
69
+ 'onboardingState': json['onboarding_state'] == null ? undefined : OnboardingStateFromJSON(json['onboarding_state']),
70
+ 'invitedBy': json['invited_by'] == null ? undefined : UserInfoFromJSON(json['invited_by']),
71
+ 'addedBy': json['added_by'] == null ? undefined : AddedByFromJSON(json['added_by']),
72
+ 'idpManagedFields': json['idp_managed_fields'] == null ? undefined : json['idp_managed_fields'],
73
+ 'onboardingEnabled': json['onboarding_enabled'] == null ? undefined : json['onboarding_enabled'],
74
+ 'inviteRejection': json['invite_rejection'] == null ? undefined : InviteRejectionFromJSON(json['invite_rejection']),
75
+ };
76
+ }
77
+ export function SignUpResponseToJSON(json) {
78
+ return SignUpResponseToJSONTyped(json, false);
79
+ }
80
+ export function SignUpResponseToJSONTyped(value, ignoreDiscriminator = false) {
81
+ if (value == null) {
82
+ return value;
83
+ }
84
+ return {
85
+ 'id': value['id'],
86
+ 'email': value['email'],
87
+ 'phone_number': value['phoneNumber'],
88
+ 'first_name': value['firstName'],
89
+ 'last_name': value['lastName'],
90
+ 'idp_type': IdpTypeToJSON(value['idpType']),
91
+ 'current_tenant_id': value['currentTenantId'],
92
+ 'current_tenant_role': TenantUserRoleToJSON(value['currentTenantRole']),
93
+ 'default_tenant_id': value['defaultTenantId'],
94
+ 'job_title': value['jobTitle'],
95
+ 'department': value['department'],
96
+ 'bio': value['bio'],
97
+ 'avatar_url': value['avatarUrl'],
98
+ 'onboarding_completed_at': value['onboardingCompletedAt'] == null ? value['onboardingCompletedAt'] : value['onboardingCompletedAt'].toISOString(),
99
+ 'join_method': TenantUserJoinMethodToJSON(value['joinMethod']),
100
+ 'onboarding_state': OnboardingStateToJSON(value['onboardingState']),
101
+ 'invited_by': UserInfoToJSON(value['invitedBy']),
102
+ 'added_by': AddedByToJSON(value['addedBy']),
103
+ 'idp_managed_fields': value['idpManagedFields'],
104
+ 'onboarding_enabled': value['onboardingEnabled'],
105
+ 'invite_rejection': InviteRejectionToJSON(value['inviteRejection']),
106
+ };
107
+ }
@@ -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; }}
@@ -12,6 +12,7 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
  import { TenantBrandingResponseFromJSON, TenantBrandingResponseToJSON, } from './TenantBrandingResponse';
15
+ import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
15
16
  import { TenantSettingsResponseFromJSON, TenantSettingsResponseToJSON, } from './TenantSettingsResponse';
16
17
  export const TenantResponsePropertyValidationAttributesMap = {
17
18
  seats: {
@@ -27,6 +28,8 @@ export function instanceOfTenantResponse(value) {
27
28
  return false;
28
29
  if (!('name' in value) || value['name'] === undefined)
29
30
  return false;
31
+ if (!('owner' in value) || value['owner'] === undefined)
32
+ return false;
30
33
  if (!('settings' in value) || value['settings'] === undefined)
31
34
  return false;
32
35
  if (!('seats' in value) || value['seats'] === undefined)
@@ -45,6 +48,7 @@ export function TenantResponseFromJSONTyped(json, ignoreDiscriminator) {
45
48
  return {
46
49
  'id': json['id'],
47
50
  'name': json['name'],
51
+ 'owner': UserInfoFromJSON(json['owner']),
48
52
  'idpConfig': json['idp_config'] == null ? undefined : json['idp_config'],
49
53
  'settings': TenantSettingsResponseFromJSON(json['settings']),
50
54
  'branding': json['branding'] == null ? undefined : TenantBrandingResponseFromJSON(json['branding']),
@@ -62,6 +66,7 @@ export function TenantResponseToJSONTyped(value, ignoreDiscriminator = false) {
62
66
  return {
63
67
  'id': value['id'],
64
68
  'name': value['name'],
69
+ 'owner': UserInfoToJSON(value['owner']),
65
70
  'idp_config': value['idpConfig'],
66
71
  'settings': TenantSettingsResponseToJSON(value['settings']),
67
72
  'branding': 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;
@@ -0,0 +1,44 @@
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 TenantUserJoinMethod = {
19
+ Creator: 'CREATOR',
20
+ Invited: 'INVITED',
21
+ Added: 'ADDED'
22
+ };
23
+ export function instanceOfTenantUserJoinMethod(value) {
24
+ for (const key in TenantUserJoinMethod) {
25
+ if (Object.prototype.hasOwnProperty.call(TenantUserJoinMethod, key)) {
26
+ if (TenantUserJoinMethod[key] === value) {
27
+ return true;
28
+ }
29
+ }
30
+ }
31
+ return false;
32
+ }
33
+ export function TenantUserJoinMethodFromJSON(json) {
34
+ return TenantUserJoinMethodFromJSONTyped(json, false);
35
+ }
36
+ export function TenantUserJoinMethodFromJSONTyped(json, ignoreDiscriminator) {
37
+ return json;
38
+ }
39
+ export function TenantUserJoinMethodToJSON(value) {
40
+ return value;
41
+ }
42
+ export function TenantUserJoinMethodToJSONTyped(value, ignoreDiscriminator) {
43
+ return value;
44
+ }
@@ -9,8 +9,12 @@
9
9
  * https://openapi-generator.tech
10
10
  * Do not edit the class manually.
11
11
  */
12
+ import type { TenantUserJoinMethod } from './TenantUserJoinMethod';
12
13
  import type { IdpType } from './IdpType';
13
14
  import type { TenantUserRole } from './TenantUserRole';
15
+ import type { OnboardingState } from './OnboardingState';
16
+ import type { UserInfo } from './UserInfo';
17
+ import type { AddedBy } from './AddedBy';
14
18
  /**
15
19
  *
16
20
  * @export
@@ -101,6 +105,42 @@ export interface UserResponse {
101
105
  * @memberof UserResponse
102
106
  */
103
107
  onboardingCompletedAt?: Date | null;
108
+ /**
109
+ *
110
+ * @type {TenantUserJoinMethod}
111
+ * @memberof UserResponse
112
+ */
113
+ joinMethod: TenantUserJoinMethod;
114
+ /**
115
+ * Resume step and guide progress for the current membership.
116
+ * @type {OnboardingState}
117
+ * @memberof UserResponse
118
+ */
119
+ onboardingState?: OnboardingState | null;
120
+ /**
121
+ * 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.
122
+ * @type {UserInfo}
123
+ * @memberof UserResponse
124
+ */
125
+ invitedBy?: UserInfo | null;
126
+ /**
127
+ *
128
+ * @type {AddedBy}
129
+ * @memberof UserResponse
130
+ */
131
+ addedBy?: AddedBy;
132
+ /**
133
+ * Profile fields the identity provider overwrites on every sync, so clients render them read-only. Empty unless directory-managed.
134
+ * @type {Array<string>}
135
+ * @memberof UserResponse
136
+ */
137
+ idpManagedFields?: Array<string>;
138
+ /**
139
+ * The current tenant's onboarding switch: true forces the flow on, false hides it, NULL follows the deployment default.
140
+ * @type {boolean}
141
+ * @memberof UserResponse
142
+ */
143
+ onboardingEnabled?: boolean | null;
104
144
  }
105
145
  export declare const UserResponsePropertyValidationAttributesMap: {
106
146
  [property: string]: {
@@ -11,8 +11,12 @@
11
11
  * https://openapi-generator.tech
12
12
  * Do not edit the class manually.
13
13
  */
14
+ import { TenantUserJoinMethodFromJSON, TenantUserJoinMethodToJSON, } from './TenantUserJoinMethod';
14
15
  import { IdpTypeFromJSON, IdpTypeToJSON, } from './IdpType';
15
16
  import { TenantUserRoleFromJSON, TenantUserRoleToJSON, } from './TenantUserRole';
17
+ import { OnboardingStateFromJSON, OnboardingStateToJSON, } from './OnboardingState';
18
+ import { UserInfoFromJSON, UserInfoToJSON, } from './UserInfo';
19
+ import { AddedByFromJSON, AddedByToJSON, } from './AddedBy';
16
20
  export const UserResponsePropertyValidationAttributesMap = {};
17
21
  /**
18
22
  * Check if a given object implements the UserResponse interface.
@@ -34,6 +38,8 @@ export function instanceOfUserResponse(value) {
34
38
  return false;
35
39
  if (!('defaultTenantId' in value) || value['defaultTenantId'] === undefined)
36
40
  return false;
41
+ if (!('joinMethod' in value) || value['joinMethod'] === undefined)
42
+ return false;
37
43
  return true;
38
44
  }
39
45
  export function UserResponseFromJSON(json) {
@@ -58,6 +64,12 @@ export function UserResponseFromJSONTyped(json, ignoreDiscriminator) {
58
64
  'bio': json['bio'] == null ? undefined : json['bio'],
59
65
  'avatarUrl': json['avatar_url'] == null ? undefined : json['avatar_url'],
60
66
  'onboardingCompletedAt': json['onboarding_completed_at'] == null ? undefined : (new Date(json['onboarding_completed_at'])),
67
+ 'joinMethod': TenantUserJoinMethodFromJSON(json['join_method']),
68
+ 'onboardingState': json['onboarding_state'] == null ? undefined : OnboardingStateFromJSON(json['onboarding_state']),
69
+ 'invitedBy': json['invited_by'] == null ? undefined : UserInfoFromJSON(json['invited_by']),
70
+ 'addedBy': json['added_by'] == null ? undefined : AddedByFromJSON(json['added_by']),
71
+ 'idpManagedFields': json['idp_managed_fields'] == null ? undefined : json['idp_managed_fields'],
72
+ 'onboardingEnabled': json['onboarding_enabled'] == null ? undefined : json['onboarding_enabled'],
61
73
  };
62
74
  }
63
75
  export function UserResponseToJSON(json) {
@@ -82,5 +94,11 @@ export function UserResponseToJSONTyped(value, ignoreDiscriminator = false) {
82
94
  'bio': value['bio'],
83
95
  'avatar_url': value['avatarUrl'],
84
96
  'onboarding_completed_at': value['onboardingCompletedAt'] == null ? value['onboardingCompletedAt'] : value['onboardingCompletedAt'].toISOString(),
97
+ 'join_method': TenantUserJoinMethodToJSON(value['joinMethod']),
98
+ 'onboarding_state': OnboardingStateToJSON(value['onboardingState']),
99
+ 'invited_by': UserInfoToJSON(value['invitedBy']),
100
+ 'added_by': AddedByToJSON(value['addedBy']),
101
+ 'idp_managed_fields': value['idpManagedFields'],
102
+ 'onboarding_enabled': value['onboardingEnabled'],
85
103
  };
86
104
  }
@@ -1,8 +1,10 @@
1
1
  export * from './AcceptDisclaimerRequest';
2
2
  export * from './AcceptInviteResponse';
3
3
  export * from './AccessCheckResponse';
4
+ export * from './AccessRequestResponse';
4
5
  export * from './ActivateSkillVersionRequest';
5
6
  export * from './AddMemberRequest';
7
+ export * from './AddedBy';
6
8
  export * from './AncestryResponse';
7
9
  export * from './ApiAuthConfig';
8
10
  export * from './ApiConnectionRequestRequest';
@@ -156,6 +158,9 @@ export * from './GroupMemberOrder';
156
158
  export * from './GroupPermissionOrder';
157
159
  export * from './GroupPermissionResponse';
158
160
  export * from './GroupResponse';
161
+ export * from './GuideModuleProgress';
162
+ export * from './GuideModuleStatus';
163
+ export * from './GuideModules';
159
164
  export * from './HTTPValidationError';
160
165
  export * from './HealthCheckResponse';
161
166
  export * from './HourHistogramResponse';
@@ -175,6 +180,9 @@ export * from './InstructionSnapshot';
175
180
  export * from './InviteLinkSettingsRequest';
176
181
  export * from './InviteLinkSettingsResponse';
177
182
  export * from './InviteOrder';
183
+ export * from './InvitePreviewResponse';
184
+ export * from './InvitePreviewState';
185
+ export * from './InviteRejection';
178
186
  export * from './InviteResponse';
179
187
  export * from './InviteStatus';
180
188
  export * from './InviteUserRequest';
@@ -201,8 +209,9 @@ export * from './ModelTableRequest';
201
209
  export * from './ModelTableResult';
202
210
  export * from './NetworkClass';
203
211
  export * from './NonFilesystemReferenceType';
204
- export * from './OnboardingCompanyRequest';
205
- export * from './OnboardingProfileRequest';
212
+ export * from './OnboardingState';
213
+ export * from './OnboardingStateUpdate';
214
+ export * from './OnboardingStep';
206
215
  export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseWorkflowDefinitionResponseWorkflowRunResponseDat';
207
216
  export * from './PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator';
208
217
  export * from './PaginatedResponseBillingPaymentResponse';
@@ -286,6 +295,7 @@ export * from './SetApprovalStateRequest';
286
295
  export * from './SetWorkflowRunApprovalRequest';
287
296
  export * from './SheetVisibilityChange';
288
297
  export * from './SignInRequest';
298
+ export * from './SignUpResponse';
289
299
  export * from './SkillFile';
290
300
  export * from './SkillOrder';
291
301
  export * from './SkillResponse';
@@ -319,6 +329,7 @@ export * from './TenantSettingsResponse';
319
329
  export * from './TenantSettingsUpdate';
320
330
  export * from './TenantSubscriptionResponse';
321
331
  export * from './TenantUserEditRequest';
332
+ export * from './TenantUserJoinMethod';
322
333
  export * from './TenantUserOrder';
323
334
  export * from './TenantUserResponse';
324
335
  export * from './TenantUserRole';