@knowledge-stack/ksapi 1.80.1 → 1.81.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 (44) hide show
  1. package/.openapi-generator/FILES +4 -0
  2. package/README.md +7 -2
  3. package/dist/apis/UsersApi.d.ts +130 -1
  4. package/dist/apis/UsersApi.js +130 -0
  5. package/dist/esm/apis/UsersApi.d.ts +130 -1
  6. package/dist/esm/apis/UsersApi.js +131 -1
  7. package/dist/esm/models/OnboardingCompanyRequest.d.ts +53 -0
  8. package/dist/esm/models/OnboardingCompanyRequest.js +51 -0
  9. package/dist/esm/models/OnboardingProfileRequest.d.ts +59 -0
  10. package/dist/esm/models/OnboardingProfileRequest.js +50 -0
  11. package/dist/esm/models/TenantSettingsResponse.d.ts +6 -0
  12. package/dist/esm/models/TenantSettingsResponse.js +2 -0
  13. package/dist/esm/models/TenantSettingsUpdate.d.ts +6 -0
  14. package/dist/esm/models/TenantSettingsUpdate.js +10 -1
  15. package/dist/esm/models/UserResponse.d.ts +12 -0
  16. package/dist/esm/models/UserResponse.js +4 -0
  17. package/dist/esm/models/index.d.ts +2 -0
  18. package/dist/esm/models/index.js +2 -0
  19. package/dist/models/OnboardingCompanyRequest.d.ts +53 -0
  20. package/dist/models/OnboardingCompanyRequest.js +59 -0
  21. package/dist/models/OnboardingProfileRequest.d.ts +59 -0
  22. package/dist/models/OnboardingProfileRequest.js +58 -0
  23. package/dist/models/TenantSettingsResponse.d.ts +6 -0
  24. package/dist/models/TenantSettingsResponse.js +2 -0
  25. package/dist/models/TenantSettingsUpdate.d.ts +6 -0
  26. package/dist/models/TenantSettingsUpdate.js +10 -1
  27. package/dist/models/UserResponse.d.ts +12 -0
  28. package/dist/models/UserResponse.js +4 -0
  29. package/dist/models/index.d.ts +2 -0
  30. package/dist/models/index.js +2 -0
  31. package/docs/OnboardingCompanyRequest.md +37 -0
  32. package/docs/OnboardingProfileRequest.md +39 -0
  33. package/docs/TenantSettingsResponse.md +2 -0
  34. package/docs/TenantSettingsUpdate.md +2 -0
  35. package/docs/UserResponse.md +4 -0
  36. package/docs/UsersApi.md +222 -0
  37. package/package.json +1 -1
  38. package/src/apis/UsersApi.ts +254 -0
  39. package/src/models/OnboardingCompanyRequest.ts +96 -0
  40. package/src/models/OnboardingProfileRequest.ts +101 -0
  41. package/src/models/TenantSettingsResponse.ts +8 -0
  42. package/src/models/TenantSettingsUpdate.ts +14 -0
  43. package/src/models/UserResponse.ts +16 -0
  44. package/src/models/index.ts +2 -0
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ /* tslint:disable */
3
+ /* eslint-disable */
4
+ /**
5
+ * Knowledge Stack API
6
+ * Knowledge Stack backend API for authentication and knowledge management
7
+ *
8
+ * The version of the OpenAPI document: 0.1.0
9
+ *
10
+ *
11
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
12
+ * https://openapi-generator.tech
13
+ * Do not edit the class manually.
14
+ */
15
+ Object.defineProperty(exports, "__esModule", { value: true });
16
+ exports.OnboardingProfileRequestPropertyValidationAttributesMap = void 0;
17
+ exports.instanceOfOnboardingProfileRequest = instanceOfOnboardingProfileRequest;
18
+ exports.OnboardingProfileRequestFromJSON = OnboardingProfileRequestFromJSON;
19
+ exports.OnboardingProfileRequestFromJSONTyped = OnboardingProfileRequestFromJSONTyped;
20
+ exports.OnboardingProfileRequestToJSON = OnboardingProfileRequestToJSON;
21
+ exports.OnboardingProfileRequestToJSONTyped = OnboardingProfileRequestToJSONTyped;
22
+ exports.OnboardingProfileRequestPropertyValidationAttributesMap = {
23
+ jobTitle: {
24
+ maxLength: 120,
25
+ },
26
+ };
27
+ /**
28
+ * Check if a given object implements the OnboardingProfileRequest interface.
29
+ */
30
+ function instanceOfOnboardingProfileRequest(value) {
31
+ return true;
32
+ }
33
+ function OnboardingProfileRequestFromJSON(json) {
34
+ return OnboardingProfileRequestFromJSONTyped(json, false);
35
+ }
36
+ function OnboardingProfileRequestFromJSONTyped(json, ignoreDiscriminator) {
37
+ if (json == null) {
38
+ return json;
39
+ }
40
+ return {
41
+ 'firstName': json['first_name'] == null ? undefined : json['first_name'],
42
+ 'lastName': json['last_name'] == null ? undefined : json['last_name'],
43
+ 'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
44
+ };
45
+ }
46
+ function OnboardingProfileRequestToJSON(json) {
47
+ return OnboardingProfileRequestToJSONTyped(json, false);
48
+ }
49
+ function OnboardingProfileRequestToJSONTyped(value, ignoreDiscriminator = false) {
50
+ if (value == null) {
51
+ return value;
52
+ }
53
+ return {
54
+ 'first_name': value['firstName'],
55
+ 'last_name': value['lastName'],
56
+ 'job_title': value['jobTitle'],
57
+ };
58
+ }
@@ -29,6 +29,12 @@ export interface TenantSettingsResponse {
29
29
  * @memberof TenantSettingsResponse
30
30
  */
31
31
  description: string;
32
+ /**
33
+ * Industry / company type captured during onboarding
34
+ * @type {string}
35
+ * @memberof TenantSettingsResponse
36
+ */
37
+ industry?: string | null;
32
38
  /**
33
39
  * IANA timezone (e.g. 'America/New_York')
34
40
  * @type {string}
@@ -46,6 +46,7 @@ function TenantSettingsResponseFromJSONTyped(json, ignoreDiscriminator) {
46
46
  return {
47
47
  'language': (0, SupportedLanguage_1.SupportedLanguageFromJSON)(json['language']),
48
48
  'description': json['description'],
49
+ 'industry': json['industry'] == null ? undefined : json['industry'],
49
50
  'timezone': json['timezone'],
50
51
  'inviteLink': (0, InviteLinkSettingsResponse_1.InviteLinkSettingsResponseFromJSON)(json['invite_link']),
51
52
  };
@@ -60,6 +61,7 @@ function TenantSettingsResponseToJSONTyped(value, ignoreDiscriminator = false) {
60
61
  return {
61
62
  'language': (0, SupportedLanguage_1.SupportedLanguageToJSON)(value['language']),
62
63
  'description': value['description'],
64
+ 'industry': value['industry'],
63
65
  'timezone': value['timezone'],
64
66
  'invite_link': (0, InviteLinkSettingsResponse_1.InviteLinkSettingsResponseToJSON)(value['inviteLink']),
65
67
  };
@@ -29,6 +29,12 @@ export interface TenantSettingsUpdate {
29
29
  * @memberof TenantSettingsUpdate
30
30
  */
31
31
  description?: string | null;
32
+ /**
33
+ * Industry / company type captured during onboarding
34
+ * @type {string}
35
+ * @memberof TenantSettingsUpdate
36
+ */
37
+ industry?: string | null;
32
38
  /**
33
39
  * IANA timezone (e.g. 'America/New_York')
34
40
  * @type {string}
@@ -21,7 +21,14 @@ exports.TenantSettingsUpdateToJSON = TenantSettingsUpdateToJSON;
21
21
  exports.TenantSettingsUpdateToJSONTyped = TenantSettingsUpdateToJSONTyped;
22
22
  const SupportedLanguage_1 = require("./SupportedLanguage");
23
23
  const InviteLinkSettingsRequest_1 = require("./InviteLinkSettingsRequest");
24
- exports.TenantSettingsUpdatePropertyValidationAttributesMap = {};
24
+ exports.TenantSettingsUpdatePropertyValidationAttributesMap = {
25
+ description: {
26
+ maxLength: 5000,
27
+ },
28
+ industry: {
29
+ maxLength: 120,
30
+ },
31
+ };
25
32
  /**
26
33
  * Check if a given object implements the TenantSettingsUpdate interface.
27
34
  */
@@ -38,6 +45,7 @@ function TenantSettingsUpdateFromJSONTyped(json, ignoreDiscriminator) {
38
45
  return {
39
46
  'language': json['language'] == null ? undefined : (0, SupportedLanguage_1.SupportedLanguageFromJSON)(json['language']),
40
47
  'description': json['description'] == null ? undefined : json['description'],
48
+ 'industry': json['industry'] == null ? undefined : json['industry'],
41
49
  'timezone': json['timezone'] == null ? undefined : json['timezone'],
42
50
  'brandName': json['brand_name'] == null ? undefined : json['brand_name'],
43
51
  'brandColor': json['brand_color'] == null ? undefined : json['brand_color'],
@@ -55,6 +63,7 @@ function TenantSettingsUpdateToJSONTyped(value, ignoreDiscriminator = false) {
55
63
  return {
56
64
  'language': (0, SupportedLanguage_1.SupportedLanguageToJSON)(value['language']),
57
65
  'description': value['description'],
66
+ 'industry': value['industry'],
58
67
  'timezone': value['timezone'],
59
68
  'brand_name': value['brandName'],
60
69
  'brand_color': value['brandColor'],
@@ -65,6 +65,18 @@ export interface UserResponse {
65
65
  * @memberof UserResponse
66
66
  */
67
67
  defaultTenantId: string;
68
+ /**
69
+ * User's job title at the current tenant (per-membership)
70
+ * @type {string}
71
+ * @memberof UserResponse
72
+ */
73
+ jobTitle?: string | null;
74
+ /**
75
+ * When the user finished onboarding for the current tenant. NULL = wizard should be shown.
76
+ * @type {Date}
77
+ * @memberof UserResponse
78
+ */
79
+ onboardingCompletedAt?: Date | null;
68
80
  }
69
81
  export declare const UserResponsePropertyValidationAttributesMap: {
70
82
  [property: string]: {
@@ -60,6 +60,8 @@ function UserResponseFromJSONTyped(json, ignoreDiscriminator) {
60
60
  'currentTenantId': json['current_tenant_id'],
61
61
  'currentTenantRole': (0, TenantUserRole_1.TenantUserRoleFromJSON)(json['current_tenant_role']),
62
62
  'defaultTenantId': json['default_tenant_id'],
63
+ 'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
64
+ 'onboardingCompletedAt': json['onboarding_completed_at'] == null ? undefined : (new Date(json['onboarding_completed_at'])),
63
65
  };
64
66
  }
65
67
  function UserResponseToJSON(json) {
@@ -78,5 +80,7 @@ function UserResponseToJSONTyped(value, ignoreDiscriminator = false) {
78
80
  'current_tenant_id': value['currentTenantId'],
79
81
  'current_tenant_role': (0, TenantUserRole_1.TenantUserRoleToJSON)(value['currentTenantRole']),
80
82
  'default_tenant_id': value['defaultTenantId'],
83
+ 'job_title': value['jobTitle'],
84
+ 'onboarding_completed_at': value['onboardingCompletedAt'] == null ? value['onboardingCompletedAt'] : value['onboardingCompletedAt'].toISOString(),
81
85
  };
82
86
  }
@@ -88,6 +88,8 @@ export * from './MembershipResponse';
88
88
  export * from './MessageRole';
89
89
  export * from './MeteredQuotaStatus';
90
90
  export * from './NonFilesystemReferenceType';
91
+ export * from './OnboardingCompanyRequest';
92
+ export * from './OnboardingProfileRequest';
91
93
  export * from './PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator';
92
94
  export * from './PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator';
93
95
  export * from './PaginatedResponseDocumentResponse';
@@ -106,6 +106,8 @@ __exportStar(require("./MembershipResponse"), exports);
106
106
  __exportStar(require("./MessageRole"), exports);
107
107
  __exportStar(require("./MeteredQuotaStatus"), exports);
108
108
  __exportStar(require("./NonFilesystemReferenceType"), exports);
109
+ __exportStar(require("./OnboardingCompanyRequest"), exports);
110
+ __exportStar(require("./OnboardingProfileRequest"), exports);
109
111
  __exportStar(require("./PaginatedResponseAnnotatedUnionFolderResponseDocumentResponseDiscriminator"), exports);
110
112
  __exportStar(require("./PaginatedResponseAnnotatedUnionSectionContentItemChunkContentItemDiscriminator"), exports);
111
113
  __exportStar(require("./PaginatedResponseDocumentResponse"), exports);
@@ -0,0 +1,37 @@
1
+
2
+ # OnboardingCompanyRequest
3
+
4
+ Step 1 of onboarding — tenant-wide company info. OWNER/ADMIN only.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `description` | string
11
+ `industry` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { OnboardingCompanyRequest } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "description": null,
21
+ "industry": null,
22
+ } satisfies OnboardingCompanyRequest
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as OnboardingCompanyRequest
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -0,0 +1,39 @@
1
+
2
+ # OnboardingProfileRequest
3
+
4
+ Step 2 of onboarding — per-user info for the current tenant.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `firstName` | string
11
+ `lastName` | string
12
+ `jobTitle` | string
13
+
14
+ ## Example
15
+
16
+ ```typescript
17
+ import type { OnboardingProfileRequest } from '@knowledge-stack/ksapi'
18
+
19
+ // TODO: Update the object below with actual values
20
+ const example = {
21
+ "firstName": null,
22
+ "lastName": null,
23
+ "jobTitle": null,
24
+ } satisfies OnboardingProfileRequest
25
+
26
+ console.log(example)
27
+
28
+ // Convert the instance to a JSON string
29
+ const exampleJSON: string = JSON.stringify(example)
30
+ console.log(exampleJSON)
31
+
32
+ // Parse the JSON string back to an object
33
+ const exampleParsed = JSON.parse(exampleJSON) as OnboardingProfileRequest
34
+ console.log(exampleParsed)
35
+ ```
36
+
37
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
38
+
39
+
@@ -9,6 +9,7 @@ Name | Type
9
9
  ------------ | -------------
10
10
  `language` | [SupportedLanguage](SupportedLanguage.md)
11
11
  `description` | string
12
+ `industry` | string
12
13
  `timezone` | string
13
14
  `inviteLink` | [InviteLinkSettingsResponse](InviteLinkSettingsResponse.md)
14
15
 
@@ -21,6 +22,7 @@ import type { TenantSettingsResponse } from '@knowledge-stack/ksapi'
21
22
  const example = {
22
23
  "language": null,
23
24
  "description": null,
25
+ "industry": null,
24
26
  "timezone": null,
25
27
  "inviteLink": null,
26
28
  } satisfies TenantSettingsResponse
@@ -9,6 +9,7 @@ Name | Type
9
9
  ------------ | -------------
10
10
  `language` | [SupportedLanguage](SupportedLanguage.md)
11
11
  `description` | string
12
+ `industry` | string
12
13
  `timezone` | string
13
14
  `brandName` | string
14
15
  `brandColor` | string
@@ -24,6 +25,7 @@ import type { TenantSettingsUpdate } from '@knowledge-stack/ksapi'
24
25
  const example = {
25
26
  "language": null,
26
27
  "description": null,
28
+ "industry": null,
27
29
  "timezone": null,
28
30
  "brandName": null,
29
31
  "brandColor": null,
@@ -14,6 +14,8 @@ Name | Type
14
14
  `currentTenantId` | string
15
15
  `currentTenantRole` | [TenantUserRole](TenantUserRole.md)
16
16
  `defaultTenantId` | string
17
+ `jobTitle` | string
18
+ `onboardingCompletedAt` | Date
17
19
 
18
20
  ## Example
19
21
 
@@ -30,6 +32,8 @@ const example = {
30
32
  "currentTenantId": null,
31
33
  "currentTenantRole": null,
32
34
  "defaultTenantId": null,
35
+ "jobTitle": null,
36
+ "onboardingCompletedAt": null,
33
37
  } satisfies UserResponse
34
38
 
35
39
  console.log(example)
package/docs/UsersApi.md CHANGED
@@ -5,7 +5,10 @@ All URIs are relative to *http://localhost:8000*
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
7
  | [**getMe**](UsersApi.md#getme) | **GET** /v1/users/me | Get Me Handler |
8
+ | [**skipOnboarding**](UsersApi.md#skiponboarding) | **POST** /v1/users/me/onboarding/skip | Skip Onboarding Handler |
8
9
  | [**updateMe**](UsersApi.md#updateme) | **PATCH** /v1/users | Update Me Handler |
10
+ | [**updateOnboardingCompany**](UsersApi.md#updateonboardingcompany) | **PATCH** /v1/users/me/onboarding/company | Update Onboarding Company Handler |
11
+ | [**updateOnboardingProfile**](UsersApi.md#updateonboardingprofile) | **PATCH** /v1/users/me/onboarding/profile | Update Onboarding Profile Handler |
9
12
 
10
13
 
11
14
 
@@ -80,6 +83,77 @@ No authorization required
80
83
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
81
84
 
82
85
 
86
+ ## skipOnboarding
87
+
88
+ > UserResponse skipOnboarding(authorization, ksUat)
89
+
90
+ Skip Onboarding Handler
91
+
92
+ 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).
93
+
94
+ ### Example
95
+
96
+ ```ts
97
+ import {
98
+ Configuration,
99
+ UsersApi,
100
+ } from '@knowledge-stack/ksapi';
101
+ import type { SkipOnboardingRequest } from '@knowledge-stack/ksapi';
102
+
103
+ async function example() {
104
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
105
+ const api = new UsersApi();
106
+
107
+ const body = {
108
+ // string (optional)
109
+ authorization: authorization_example,
110
+ // string (optional)
111
+ ksUat: ksUat_example,
112
+ } satisfies SkipOnboardingRequest;
113
+
114
+ try {
115
+ const data = await api.skipOnboarding(body);
116
+ console.log(data);
117
+ } catch (error) {
118
+ console.error(error);
119
+ }
120
+ }
121
+
122
+ // Run the test
123
+ example().catch(console.error);
124
+ ```
125
+
126
+ ### Parameters
127
+
128
+
129
+ | Name | Type | Description | Notes |
130
+ |------------- | ------------- | ------------- | -------------|
131
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
132
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
133
+
134
+ ### Return type
135
+
136
+ [**UserResponse**](UserResponse.md)
137
+
138
+ ### Authorization
139
+
140
+ No authorization required
141
+
142
+ ### HTTP request headers
143
+
144
+ - **Content-Type**: Not defined
145
+ - **Accept**: `application/json`
146
+
147
+
148
+ ### HTTP response details
149
+ | Status code | Description | Response headers |
150
+ |-------------|-------------|------------------|
151
+ | **200** | Successful Response | - |
152
+ | **422** | Validation Error | - |
153
+
154
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
155
+
156
+
83
157
  ## updateMe
84
158
 
85
159
  > UserResponse updateMe(updateUserRequest, authorization, ksUat)
@@ -153,3 +227,151 @@ No authorization required
153
227
 
154
228
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
155
229
 
230
+
231
+ ## updateOnboardingCompany
232
+
233
+ > UserResponse updateOnboardingCompany(onboardingCompanyRequest, authorization, ksUat)
234
+
235
+ Update Onboarding Company Handler
236
+
237
+ 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}.
238
+
239
+ ### Example
240
+
241
+ ```ts
242
+ import {
243
+ Configuration,
244
+ UsersApi,
245
+ } from '@knowledge-stack/ksapi';
246
+ import type { UpdateOnboardingCompanyRequest } from '@knowledge-stack/ksapi';
247
+
248
+ async function example() {
249
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
250
+ const api = new UsersApi();
251
+
252
+ const body = {
253
+ // OnboardingCompanyRequest
254
+ onboardingCompanyRequest: ...,
255
+ // string (optional)
256
+ authorization: authorization_example,
257
+ // string (optional)
258
+ ksUat: ksUat_example,
259
+ } satisfies UpdateOnboardingCompanyRequest;
260
+
261
+ try {
262
+ const data = await api.updateOnboardingCompany(body);
263
+ console.log(data);
264
+ } catch (error) {
265
+ console.error(error);
266
+ }
267
+ }
268
+
269
+ // Run the test
270
+ example().catch(console.error);
271
+ ```
272
+
273
+ ### Parameters
274
+
275
+
276
+ | Name | Type | Description | Notes |
277
+ |------------- | ------------- | ------------- | -------------|
278
+ | **onboardingCompanyRequest** | [OnboardingCompanyRequest](OnboardingCompanyRequest.md) | | |
279
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
280
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
281
+
282
+ ### Return type
283
+
284
+ [**UserResponse**](UserResponse.md)
285
+
286
+ ### Authorization
287
+
288
+ No authorization required
289
+
290
+ ### HTTP request headers
291
+
292
+ - **Content-Type**: `application/json`
293
+ - **Accept**: `application/json`
294
+
295
+
296
+ ### HTTP response details
297
+ | Status code | Description | Response headers |
298
+ |-------------|-------------|------------------|
299
+ | **200** | Successful Response | - |
300
+ | **422** | Validation Error | - |
301
+
302
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
303
+
304
+
305
+ ## updateOnboardingProfile
306
+
307
+ > UserResponse updateOnboardingProfile(onboardingProfileRequest, authorization, ksUat)
308
+
309
+ Update Onboarding Profile Handler
310
+
311
+ 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 (name) or a future per-membership profile endpoint (job_title).
312
+
313
+ ### Example
314
+
315
+ ```ts
316
+ import {
317
+ Configuration,
318
+ UsersApi,
319
+ } from '@knowledge-stack/ksapi';
320
+ import type { UpdateOnboardingProfileRequest } from '@knowledge-stack/ksapi';
321
+
322
+ async function example() {
323
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
324
+ const api = new UsersApi();
325
+
326
+ const body = {
327
+ // OnboardingProfileRequest
328
+ onboardingProfileRequest: ...,
329
+ // string (optional)
330
+ authorization: authorization_example,
331
+ // string (optional)
332
+ ksUat: ksUat_example,
333
+ } satisfies UpdateOnboardingProfileRequest;
334
+
335
+ try {
336
+ const data = await api.updateOnboardingProfile(body);
337
+ console.log(data);
338
+ } catch (error) {
339
+ console.error(error);
340
+ }
341
+ }
342
+
343
+ // Run the test
344
+ example().catch(console.error);
345
+ ```
346
+
347
+ ### Parameters
348
+
349
+
350
+ | Name | Type | Description | Notes |
351
+ |------------- | ------------- | ------------- | -------------|
352
+ | **onboardingProfileRequest** | [OnboardingProfileRequest](OnboardingProfileRequest.md) | | |
353
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
354
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
355
+
356
+ ### Return type
357
+
358
+ [**UserResponse**](UserResponse.md)
359
+
360
+ ### Authorization
361
+
362
+ No authorization required
363
+
364
+ ### HTTP request headers
365
+
366
+ - **Content-Type**: `application/json`
367
+ - **Accept**: `application/json`
368
+
369
+
370
+ ### HTTP response details
371
+ | Status code | Description | Response headers |
372
+ |-------------|-------------|------------------|
373
+ | **200** | Successful Response | - |
374
+ | **422** | Validation Error | - |
375
+
376
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
377
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@knowledge-stack/ksapi",
3
- "version": "1.80.1",
3
+ "version": "1.81.0",
4
4
  "description": "OpenAPI client for @knowledge-stack/ksapi",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {