@knowledge-stack/ksapi 3.11.0 → 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
@@ -15,22 +15,22 @@
15
15
 
16
16
  import * as runtime from '../runtime';
17
17
  import type {
18
+ AccessRequestResponse,
18
19
  ErrorResponse,
19
20
  HTTPValidationError,
20
- OnboardingCompanyRequest,
21
- OnboardingProfileRequest,
21
+ OnboardingStateUpdate,
22
22
  UpdateUserRequest,
23
23
  UserResponse,
24
24
  } from '../models/index';
25
25
  import {
26
+ AccessRequestResponseFromJSON,
27
+ AccessRequestResponseToJSON,
26
28
  ErrorResponseFromJSON,
27
29
  ErrorResponseToJSON,
28
30
  HTTPValidationErrorFromJSON,
29
31
  HTTPValidationErrorToJSON,
30
- OnboardingCompanyRequestFromJSON,
31
- OnboardingCompanyRequestToJSON,
32
- OnboardingProfileRequestFromJSON,
33
- OnboardingProfileRequestToJSON,
32
+ OnboardingStateUpdateFromJSON,
33
+ OnboardingStateUpdateToJSON,
34
34
  UpdateUserRequestFromJSON,
35
35
  UpdateUserRequestToJSON,
36
36
  UserResponseFromJSON,
@@ -41,12 +41,8 @@ export interface UpdateMeRequest {
41
41
  updateUserRequest: UpdateUserRequest;
42
42
  }
43
43
 
44
- export interface UpdateOnboardingCompanyRequest {
45
- onboardingCompanyRequest: OnboardingCompanyRequest;
46
- }
47
-
48
- export interface UpdateOnboardingProfileRequest {
49
- onboardingProfileRequest: OnboardingProfileRequest;
44
+ export interface UpdateOnboardingStateRequest {
45
+ onboardingStateUpdate: OnboardingStateUpdate;
50
46
  }
51
47
 
52
48
  export interface UploadMyAvatarRequest {
@@ -104,6 +100,28 @@ export interface UsersApiInterface {
104
100
  */
105
101
  getMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
106
102
 
103
+ /**
104
+ * Creates request options for requestAccess without sending the request
105
+ * @throws {RequiredError}
106
+ * @memberof UsersApiInterface
107
+ */
108
+ requestAccessRequestOpts(): Promise<runtime.RequestOpts>;
109
+
110
+ /**
111
+ * Email the owner and admins for access; one request per member per day.
112
+ * @summary Request Access Handler
113
+ * @param {*} [options] Override http request option.
114
+ * @throws {RequiredError}
115
+ * @memberof UsersApiInterface
116
+ */
117
+ requestAccessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessRequestResponse>>;
118
+
119
+ /**
120
+ * Email the owner and admins for access; one request per member per day.
121
+ * Request Access Handler
122
+ */
123
+ requestAccess(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessRequestResponse>;
124
+
107
125
  /**
108
126
  * Creates request options for skipOnboarding without sending the request
109
127
  * @throws {RequiredError}
@@ -151,52 +169,27 @@ export interface UsersApiInterface {
151
169
  updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
152
170
 
153
171
  /**
154
- * Creates request options for updateOnboardingCompany without sending the request
155
- * @param {OnboardingCompanyRequest} onboardingCompanyRequest
156
- * @throws {RequiredError}
157
- * @memberof UsersApiInterface
158
- */
159
- updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts>;
160
-
161
- /**
162
- * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
163
- * @summary Update Onboarding Company Handler
164
- * @param {OnboardingCompanyRequest} onboardingCompanyRequest
165
- * @param {*} [options] Override http request option.
166
- * @throws {RequiredError}
167
- * @memberof UsersApiInterface
168
- */
169
- updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
170
-
171
- /**
172
- * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
173
- * Update Onboarding Company Handler
174
- */
175
- updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
176
-
177
- /**
178
- * Creates request options for updateOnboardingProfile without sending the request
179
- * @param {OnboardingProfileRequest} onboardingProfileRequest
172
+ * Creates request options for updateOnboardingState without sending the request
173
+ * @param {OnboardingStateUpdate} onboardingStateUpdate
180
174
  * @throws {RequiredError}
181
175
  * @memberof UsersApiInterface
182
176
  */
183
- updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts>;
177
+ updateOnboardingStateRequestOpts(requestParameters: UpdateOnboardingStateRequest): Promise<runtime.RequestOpts>;
184
178
 
185
179
  /**
186
- * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users.
187
- * @summary Update Onboarding Profile Handler
188
- * @param {OnboardingProfileRequest} onboardingProfileRequest
180
+ *
181
+ * @summary Update Onboarding State Handler
182
+ * @param {OnboardingStateUpdate} onboardingStateUpdate
189
183
  * @param {*} [options] Override http request option.
190
184
  * @throws {RequiredError}
191
185
  * @memberof UsersApiInterface
192
186
  */
193
- updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
187
+ updateOnboardingStateRaw(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
194
188
 
195
189
  /**
196
- * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users.
197
- * Update Onboarding Profile Handler
190
+ * Update Onboarding State Handler
198
191
  */
199
- updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
192
+ updateOnboardingState(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
200
193
 
201
194
  /**
202
195
  * Creates request options for uploadMyAvatar without sending the request
@@ -324,9 +317,9 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
324
317
  }
325
318
 
326
319
  /**
327
- * Creates request options for skipOnboarding without sending the request
320
+ * Creates request options for requestAccess without sending the request
328
321
  */
329
- async skipOnboardingRequestOpts(): Promise<runtime.RequestOpts> {
322
+ async requestAccessRequestOpts(): Promise<runtime.RequestOpts> {
330
323
  const queryParameters: any = {};
331
324
 
332
325
  const headerParameters: runtime.HTTPHeaders = {};
@@ -340,7 +333,7 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
340
333
  }
341
334
  }
342
335
 
343
- let urlPath = `/v1/users/me/onboarding/skip`;
336
+ let urlPath = `/v1/users/me/access_requests`;
344
337
 
345
338
  return {
346
339
  path: urlPath,
@@ -351,42 +344,33 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
351
344
  }
352
345
 
353
346
  /**
354
- * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
355
- * Skip Onboarding Handler
347
+ * Email the owner and admins for access; one request per member per day.
348
+ * Request Access Handler
356
349
  */
357
- async skipOnboardingRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
358
- const requestOptions = await this.skipOnboardingRequestOpts();
350
+ async requestAccessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessRequestResponse>> {
351
+ const requestOptions = await this.requestAccessRequestOpts();
359
352
  const response = await this.request(requestOptions, initOverrides);
360
353
 
361
- return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
354
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccessRequestResponseFromJSON(jsonValue));
362
355
  }
363
356
 
364
357
  /**
365
- * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
366
- * Skip Onboarding Handler
358
+ * Email the owner and admins for access; one request per member per day.
359
+ * Request Access Handler
367
360
  */
368
- async skipOnboarding(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
369
- const response = await this.skipOnboardingRaw(initOverrides);
361
+ async requestAccess(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessRequestResponse> {
362
+ const response = await this.requestAccessRaw(initOverrides);
370
363
  return await response.value();
371
364
  }
372
365
 
373
366
  /**
374
- * Creates request options for updateMe without sending the request
367
+ * Creates request options for skipOnboarding without sending the request
375
368
  */
376
- async updateMeRequestOpts(requestParameters: UpdateMeRequest): Promise<runtime.RequestOpts> {
377
- if (requestParameters['updateUserRequest'] == null) {
378
- throw new runtime.RequiredError(
379
- 'updateUserRequest',
380
- 'Required parameter "updateUserRequest" was null or undefined when calling updateMe().'
381
- );
382
- }
383
-
369
+ async skipOnboardingRequestOpts(): Promise<runtime.RequestOpts> {
384
370
  const queryParameters: any = {};
385
371
 
386
372
  const headerParameters: runtime.HTTPHeaders = {};
387
373
 
388
- headerParameters['Content-Type'] = 'application/json';
389
-
390
374
  if (this.configuration && this.configuration.accessToken) {
391
375
  const token = this.configuration.accessToken;
392
376
  const tokenString = await token("bearerAuth", []);
@@ -396,45 +380,44 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
396
380
  }
397
381
  }
398
382
 
399
- let urlPath = `/v1/users`;
383
+ let urlPath = `/v1/users/me/onboarding/skip`;
400
384
 
401
385
  return {
402
386
  path: urlPath,
403
- method: 'PATCH',
387
+ method: 'POST',
404
388
  headers: headerParameters,
405
389
  query: queryParameters,
406
- body: UpdateUserRequestToJSON(requestParameters['updateUserRequest']),
407
390
  };
408
391
  }
409
392
 
410
393
  /**
411
- * Update the user\'s name and default tenant, and the membership\'s profile. When updating default_tenant_id, the user must belong to the specified tenant.
412
- * Update Me Handler
394
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
395
+ * Skip Onboarding Handler
413
396
  */
414
- async updateMeRaw(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
415
- const requestOptions = await this.updateMeRequestOpts(requestParameters);
397
+ async skipOnboardingRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
398
+ const requestOptions = await this.skipOnboardingRequestOpts();
416
399
  const response = await this.request(requestOptions, initOverrides);
417
400
 
418
401
  return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
419
402
  }
420
403
 
421
404
  /**
422
- * Update the user\'s name and default tenant, and the membership\'s profile. When updating default_tenant_id, the user must belong to the specified tenant.
423
- * Update Me Handler
405
+ * Mark onboarding complete without writing any profile/company fields. Idempotent — calling this after onboarding is already complete returns the current state unchanged (the CRUD only stamps the timestamp when it is NULL).
406
+ * Skip Onboarding Handler
424
407
  */
425
- async updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
426
- const response = await this.updateMeRaw(requestParameters, initOverrides);
408
+ async skipOnboarding(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
409
+ const response = await this.skipOnboardingRaw(initOverrides);
427
410
  return await response.value();
428
411
  }
429
412
 
430
413
  /**
431
- * Creates request options for updateOnboardingCompany without sending the request
414
+ * Creates request options for updateMe without sending the request
432
415
  */
433
- async updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts> {
434
- if (requestParameters['onboardingCompanyRequest'] == null) {
416
+ async updateMeRequestOpts(requestParameters: UpdateMeRequest): Promise<runtime.RequestOpts> {
417
+ if (requestParameters['updateUserRequest'] == null) {
435
418
  throw new runtime.RequiredError(
436
- 'onboardingCompanyRequest',
437
- 'Required parameter "onboardingCompanyRequest" was null or undefined when calling updateOnboardingCompany().'
419
+ 'updateUserRequest',
420
+ 'Required parameter "updateUserRequest" was null or undefined when calling updateMe().'
438
421
  );
439
422
  }
440
423
 
@@ -453,45 +436,45 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
453
436
  }
454
437
  }
455
438
 
456
- let urlPath = `/v1/users/me/onboarding/company`;
439
+ let urlPath = `/v1/users`;
457
440
 
458
441
  return {
459
442
  path: urlPath,
460
443
  method: 'PATCH',
461
444
  headers: headerParameters,
462
445
  query: queryParameters,
463
- body: OnboardingCompanyRequestToJSON(requestParameters['onboardingCompanyRequest']),
446
+ body: UpdateUserRequestToJSON(requestParameters['updateUserRequest']),
464
447
  };
465
448
  }
466
449
 
467
450
  /**
468
- * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
469
- * Update Onboarding Company Handler
451
+ * Update the user\'s name and default tenant, and the membership\'s profile. When updating default_tenant_id, the user must belong to the specified tenant.
452
+ * Update Me Handler
470
453
  */
471
- async updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
472
- const requestOptions = await this.updateOnboardingCompanyRequestOpts(requestParameters);
454
+ async updateMeRaw(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
455
+ const requestOptions = await this.updateMeRequestOpts(requestParameters);
473
456
  const response = await this.request(requestOptions, initOverrides);
474
457
 
475
458
  return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
476
459
  }
477
460
 
478
461
  /**
479
- * Step 1 of onboarding: tenant-wide company info. Writes ``industry`` and ``description`` into the current tenant\'s settings JSONB. Restricted to OWNER and ADMIN — invited USERs see a pre-filled, read-only step on the frontend instead. Does not mark onboarding complete; the user finishes via the profile step. Re-running while the wizard is still open overwrites prior values; once onboarding has been completed/skipped, this endpoint returns 409. Post-onboarding edits go through PATCH /v1/tenants/{id}.
480
- * Update Onboarding Company Handler
462
+ * Update the user\'s name and default tenant, and the membership\'s profile. When updating default_tenant_id, the user must belong to the specified tenant.
463
+ * Update Me Handler
481
464
  */
482
- async updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
483
- const response = await this.updateOnboardingCompanyRaw(requestParameters, initOverrides);
465
+ async updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
466
+ const response = await this.updateMeRaw(requestParameters, initOverrides);
484
467
  return await response.value();
485
468
  }
486
469
 
487
470
  /**
488
- * Creates request options for updateOnboardingProfile without sending the request
471
+ * Creates request options for updateOnboardingState without sending the request
489
472
  */
490
- async updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts> {
491
- if (requestParameters['onboardingProfileRequest'] == null) {
473
+ async updateOnboardingStateRequestOpts(requestParameters: UpdateOnboardingStateRequest): Promise<runtime.RequestOpts> {
474
+ if (requestParameters['onboardingStateUpdate'] == null) {
492
475
  throw new runtime.RequiredError(
493
- 'onboardingProfileRequest',
494
- 'Required parameter "onboardingProfileRequest" was null or undefined when calling updateOnboardingProfile().'
476
+ 'onboardingStateUpdate',
477
+ 'Required parameter "onboardingStateUpdate" was null or undefined when calling updateOnboardingState().'
495
478
  );
496
479
  }
497
480
 
@@ -510,34 +493,32 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
510
493
  }
511
494
  }
512
495
 
513
- let urlPath = `/v1/users/me/onboarding/profile`;
496
+ let urlPath = `/v1/users/me/onboarding`;
514
497
 
515
498
  return {
516
499
  path: urlPath,
517
500
  method: 'PATCH',
518
501
  headers: headerParameters,
519
502
  query: queryParameters,
520
- body: OnboardingProfileRequestToJSON(requestParameters['onboardingProfileRequest']),
503
+ body: OnboardingStateUpdateToJSON(requestParameters['onboardingStateUpdate']),
521
504
  };
522
505
  }
523
506
 
524
507
  /**
525
- * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users.
526
- * Update Onboarding Profile Handler
508
+ * Update Onboarding State Handler
527
509
  */
528
- async updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
529
- const requestOptions = await this.updateOnboardingProfileRequestOpts(requestParameters);
510
+ async updateOnboardingStateRaw(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
511
+ const requestOptions = await this.updateOnboardingStateRequestOpts(requestParameters);
530
512
  const response = await this.request(requestOptions, initOverrides);
531
513
 
532
514
  return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
533
515
  }
534
516
 
535
517
  /**
536
- * Step 2 (final) of onboarding: per-user profile for the current tenant. Writes name to the User row (global) and job_title to the TenantUser row (per-tenant), then stamps ``onboarding_completed_at`` on the membership. Returns 409 if onboarding has already been completed or skipped — post-onboarding edits go through PATCH /v1/users.
537
- * Update Onboarding Profile Handler
518
+ * Update Onboarding State Handler
538
519
  */
539
- async updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
540
- const response = await this.updateOnboardingProfileRaw(requestParameters, initOverrides);
520
+ async updateOnboardingState(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
521
+ const response = await this.updateOnboardingStateRaw(requestParameters, initOverrides);
541
522
  return await response.value();
542
523
  }
543
524
 
@@ -14,25 +14,19 @@
14
14
 
15
15
  import { mapValues } from '../runtime';
16
16
  /**
17
- * Step 1 of onboarding — tenant-wide company info. OWNER/ADMIN only.
17
+ *
18
18
  * @export
19
- * @interface OnboardingCompanyRequest
19
+ * @interface AccessRequestResponse
20
20
  */
21
- export interface OnboardingCompanyRequest {
22
- /**
23
- * Brief company description (≤5000 chars)
24
- * @type {string}
25
- * @memberof OnboardingCompanyRequest
26
- */
27
- description?: string | null;
21
+ export interface AccessRequestResponse {
28
22
  /**
29
- * Industry / company type (free text)
30
- * @type {string}
31
- * @memberof OnboardingCompanyRequest
23
+ * When this member's request was recorded. A repeat inside the daily window returns the original request and sends no second email.
24
+ * @type {Date}
25
+ * @memberof AccessRequestResponse
32
26
  */
33
- industry?: string | null;
27
+ requestedAt: Date;
34
28
  }
35
- export const OnboardingCompanyRequestPropertyValidationAttributesMap: {
29
+ export const AccessRequestResponsePropertyValidationAttributesMap: {
36
30
  [property: string]: {
37
31
  maxLength?: number,
38
32
  minLength?: number,
@@ -47,50 +41,43 @@ export const OnboardingCompanyRequestPropertyValidationAttributesMap: {
47
41
  uniqueItems?: boolean
48
42
  }
49
43
  } = {
50
- description: {
51
- maxLength: 5000,
52
- },
53
- industry: {
54
- maxLength: 120,
55
- },
56
44
  }
57
45
 
58
46
 
59
47
  /**
60
- * Check if a given object implements the OnboardingCompanyRequest interface.
48
+ * Check if a given object implements the AccessRequestResponse interface.
61
49
  */
62
- export function instanceOfOnboardingCompanyRequest(value: object): value is OnboardingCompanyRequest {
50
+ export function instanceOfAccessRequestResponse(value: object): value is AccessRequestResponse {
51
+ if (!('requestedAt' in value) || value['requestedAt'] === undefined) return false;
63
52
  return true;
64
53
  }
65
54
 
66
- export function OnboardingCompanyRequestFromJSON(json: any): OnboardingCompanyRequest {
67
- return OnboardingCompanyRequestFromJSONTyped(json, false);
55
+ export function AccessRequestResponseFromJSON(json: any): AccessRequestResponse {
56
+ return AccessRequestResponseFromJSONTyped(json, false);
68
57
  }
69
58
 
70
- export function OnboardingCompanyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingCompanyRequest {
59
+ export function AccessRequestResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessRequestResponse {
71
60
  if (json == null) {
72
61
  return json;
73
62
  }
74
63
  return {
75
64
 
76
- 'description': json['description'] == null ? undefined : json['description'],
77
- 'industry': json['industry'] == null ? undefined : json['industry'],
65
+ 'requestedAt': (new Date(json['requested_at'])),
78
66
  };
79
67
  }
80
68
 
81
- export function OnboardingCompanyRequestToJSON(json: any): OnboardingCompanyRequest {
82
- return OnboardingCompanyRequestToJSONTyped(json, false);
69
+ export function AccessRequestResponseToJSON(json: any): AccessRequestResponse {
70
+ return AccessRequestResponseToJSONTyped(json, false);
83
71
  }
84
72
 
85
- export function OnboardingCompanyRequestToJSONTyped(value?: OnboardingCompanyRequest | null, ignoreDiscriminator: boolean = false): any {
73
+ export function AccessRequestResponseToJSONTyped(value?: AccessRequestResponse | null, ignoreDiscriminator: boolean = false): any {
86
74
  if (value == null) {
87
75
  return value;
88
76
  }
89
77
 
90
78
  return {
91
79
 
92
- 'description': value['description'],
93
- 'industry': value['industry'],
80
+ 'requested_at': value['requestedAt'].toISOString(),
94
81
  };
95
82
  }
96
83
 
@@ -0,0 +1,53 @@
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
+ /**
17
+ *
18
+ * @export
19
+ */
20
+ export const AddedBy = {
21
+ DirectorySync: 'directory_sync',
22
+ Operator: 'operator'
23
+ } as const;
24
+ export type AddedBy = typeof AddedBy[keyof typeof AddedBy];
25
+
26
+
27
+ export function instanceOfAddedBy(value: any): boolean {
28
+ for (const key in AddedBy) {
29
+ if (Object.prototype.hasOwnProperty.call(AddedBy, key)) {
30
+ if (AddedBy[key as keyof typeof AddedBy] === value) {
31
+ return true;
32
+ }
33
+ }
34
+ }
35
+ return false;
36
+ }
37
+
38
+ export function AddedByFromJSON(json: any): AddedBy {
39
+ return AddedByFromJSONTyped(json, false);
40
+ }
41
+
42
+ export function AddedByFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddedBy {
43
+ return json as AddedBy;
44
+ }
45
+
46
+ export function AddedByToJSON(value?: AddedBy | null): any {
47
+ return value as any;
48
+ }
49
+
50
+ export function AddedByToJSONTyped(value: any, ignoreDiscriminator: boolean): AddedBy {
51
+ return value as AddedBy;
52
+ }
53
+
@@ -43,6 +43,12 @@ export interface CreatePasswordUserRequest {
43
43
  * @memberof CreatePasswordUserRequest
44
44
  */
45
45
  lastName?: string | null;
46
+ /**
47
+ * Invite to resolve before any workspace is provisioned. When it is valid for the verified email the account joins that tenant only; otherwise sign-up proceeds as usual and invite_rejection says why.
48
+ * @type {string}
49
+ * @memberof CreatePasswordUserRequest
50
+ */
51
+ inviteId?: string | null;
46
52
  }
47
53
  export const CreatePasswordUserRequestPropertyValidationAttributesMap: {
48
54
  [property: string]: {
@@ -88,6 +94,7 @@ export function CreatePasswordUserRequestFromJSONTyped(json: any, ignoreDiscrimi
88
94
  'emailToken': json['email_token'],
89
95
  'firstName': json['first_name'] == null ? undefined : json['first_name'],
90
96
  'lastName': json['last_name'] == null ? undefined : json['last_name'],
97
+ 'inviteId': json['invite_id'] == null ? undefined : json['invite_id'],
91
98
  };
92
99
  }
93
100
 
@@ -106,6 +113,7 @@ export function CreatePasswordUserRequestToJSONTyped(value?: CreatePasswordUserR
106
113
  'email_token': value['emailToken'],
107
114
  'first_name': value['firstName'],
108
115
  'last_name': value['lastName'],
116
+ 'invite_id': value['inviteId'],
109
117
  };
110
118
  }
111
119
 
@@ -49,8 +49,10 @@ export const ErrorResponseCodeEnum = {
49
49
  PermissionLimit: 'permission_limit',
50
50
  Unauthorized: 'unauthorized',
51
51
  Forbidden: 'forbidden',
52
+ NoWorkspace: 'no_workspace',
52
53
  NotFound: 'not_found',
53
54
  Conflict: 'conflict',
55
+ TenantDeactivated: 'tenant_deactivated',
54
56
  RunBusy: 'run_busy',
55
57
  PayloadTooLarge: 'payload_too_large',
56
58
  UnsupportedMediaType: 'unsupported_media_type',
@@ -27,6 +27,13 @@ import {
27
27
  UploadConstraintsToJSON,
28
28
  UploadConstraintsToJSONTyped,
29
29
  } from './UploadConstraints';
30
+ import type { DataSourceEngine } from './DataSourceEngine';
31
+ import {
32
+ DataSourceEngineFromJSON,
33
+ DataSourceEngineFromJSONTyped,
34
+ DataSourceEngineToJSON,
35
+ DataSourceEngineToJSONTyped,
36
+ } from './DataSourceEngine';
30
37
 
31
38
  /**
32
39
  *
@@ -70,6 +77,12 @@ export interface FeaturesResponse {
70
77
  * @memberof FeaturesResponse
71
78
  */
72
79
  upload: UploadConstraints;
80
+ /**
81
+ *
82
+ * @type {Array<DataSourceEngine>}
83
+ * @memberof FeaturesResponse
84
+ */
85
+ dataSourceEngines: Array<DataSourceEngine>;
73
86
  }
74
87
 
75
88
 
@@ -101,6 +114,7 @@ export function instanceOfFeaturesResponse(value: object): value is FeaturesResp
101
114
  if (!('smsLoginEnabled' in value) || value['smsLoginEnabled'] === undefined) return false;
102
115
  if (!('defaultFrontendLanguage' in value) || value['defaultFrontendLanguage'] === undefined) return false;
103
116
  if (!('upload' in value) || value['upload'] === undefined) return false;
117
+ if (!('dataSourceEngines' in value) || value['dataSourceEngines'] === undefined) return false;
104
118
  return true;
105
119
  }
106
120
 
@@ -120,6 +134,7 @@ export function FeaturesResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
120
134
  'smsLoginEnabled': json['sms_login_enabled'],
121
135
  'defaultFrontendLanguage': SupportedLanguageFromJSON(json['default_frontend_language']),
122
136
  'upload': UploadConstraintsFromJSON(json['upload']),
137
+ 'dataSourceEngines': ((json['data_source_engines'] as Array<any>).map(DataSourceEngineFromJSON)),
123
138
  };
124
139
  }
125
140
 
@@ -140,6 +155,7 @@ export function FeaturesResponseToJSONTyped(value?: FeaturesResponse | null, ign
140
155
  'sms_login_enabled': value['smsLoginEnabled'],
141
156
  'default_frontend_language': SupportedLanguageToJSON(value['defaultFrontendLanguage']),
142
157
  'upload': UploadConstraintsToJSON(value['upload']),
158
+ 'data_source_engines': ((value['dataSourceEngines'] as Array<any>).map(DataSourceEngineToJSON)),
143
159
  };
144
160
  }
145
161