@knowledge-stack/ksapi 1.80.0 → 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.
- package/.openapi-generator/FILES +6 -0
- package/README.md +8 -2
- package/dist/apis/AgentApi.d.ts +4 -4
- package/dist/apis/AgentApi.js +2 -2
- package/dist/apis/SubscriptionsApi.d.ts +9 -9
- package/dist/apis/SubscriptionsApi.js +3 -3
- package/dist/apis/UsersApi.d.ts +130 -1
- package/dist/apis/UsersApi.js +130 -0
- package/dist/esm/apis/AgentApi.d.ts +4 -4
- package/dist/esm/apis/AgentApi.js +2 -2
- package/dist/esm/apis/SubscriptionsApi.d.ts +9 -9
- package/dist/esm/apis/SubscriptionsApi.js +4 -4
- package/dist/esm/apis/UsersApi.d.ts +130 -1
- package/dist/esm/apis/UsersApi.js +131 -1
- package/dist/esm/models/DocumentResponse.d.ts +6 -0
- package/dist/esm/models/DocumentResponse.js +2 -0
- package/dist/esm/models/FolderResponse.d.ts +6 -0
- package/dist/esm/models/FolderResponse.js +2 -0
- package/dist/esm/models/MeteredQuotaStatus.d.ts +6 -0
- package/dist/esm/models/MeteredQuotaStatus.js +2 -0
- package/dist/esm/models/OnboardingCompanyRequest.d.ts +53 -0
- package/dist/esm/models/OnboardingCompanyRequest.js +51 -0
- package/dist/esm/models/OnboardingProfileRequest.d.ts +59 -0
- package/dist/esm/models/OnboardingProfileRequest.js +50 -0
- package/dist/esm/models/SubmitSubscriptionResponse.d.ts +75 -0
- package/dist/esm/models/SubmitSubscriptionResponse.js +52 -0
- package/dist/esm/models/TenantSettingsResponse.d.ts +6 -0
- package/dist/esm/models/TenantSettingsResponse.js +2 -0
- package/dist/esm/models/TenantSettingsUpdate.d.ts +6 -0
- package/dist/esm/models/TenantSettingsUpdate.js +10 -1
- package/dist/esm/models/UserResponse.d.ts +12 -0
- package/dist/esm/models/UserResponse.js +4 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/DocumentResponse.d.ts +6 -0
- package/dist/models/DocumentResponse.js +2 -0
- package/dist/models/FolderResponse.d.ts +6 -0
- package/dist/models/FolderResponse.js +2 -0
- package/dist/models/MeteredQuotaStatus.d.ts +6 -0
- package/dist/models/MeteredQuotaStatus.js +2 -0
- package/dist/models/OnboardingCompanyRequest.d.ts +53 -0
- package/dist/models/OnboardingCompanyRequest.js +59 -0
- package/dist/models/OnboardingProfileRequest.d.ts +59 -0
- package/dist/models/OnboardingProfileRequest.js +58 -0
- package/dist/models/SubmitSubscriptionResponse.d.ts +75 -0
- package/dist/models/SubmitSubscriptionResponse.js +60 -0
- package/dist/models/TenantSettingsResponse.d.ts +6 -0
- package/dist/models/TenantSettingsResponse.js +2 -0
- package/dist/models/TenantSettingsUpdate.d.ts +6 -0
- package/dist/models/TenantSettingsUpdate.js +10 -1
- package/dist/models/UserResponse.d.ts +12 -0
- package/dist/models/UserResponse.js +4 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/AgentApi.md +1 -1
- package/docs/DocumentResponse.md +2 -0
- package/docs/FolderResponse.md +2 -0
- package/docs/FolderResponseOrDocumentResponse.md +2 -0
- package/docs/MeteredQuotaStatus.md +2 -0
- package/docs/OnboardingCompanyRequest.md +37 -0
- package/docs/OnboardingProfileRequest.md +39 -0
- package/docs/SubmitSubscriptionResponse.md +39 -0
- package/docs/SubscriptionsApi.md +4 -4
- package/docs/TenantSettingsResponse.md +2 -0
- package/docs/TenantSettingsUpdate.md +2 -0
- package/docs/UserResponse.md +4 -0
- package/docs/UsersApi.md +222 -0
- package/package.json +1 -1
- package/src/apis/AgentApi.ts +4 -4
- package/src/apis/SubscriptionsApi.ts +12 -12
- package/src/apis/UsersApi.ts +254 -0
- package/src/models/DocumentResponse.ts +8 -0
- package/src/models/FolderResponse.ts +8 -0
- package/src/models/MeteredQuotaStatus.ts +8 -0
- package/src/models/OnboardingCompanyRequest.ts +96 -0
- package/src/models/OnboardingProfileRequest.ts +101 -0
- package/src/models/SubmitSubscriptionResponse.ts +117 -0
- package/src/models/TenantSettingsResponse.ts +8 -0
- package/src/models/TenantSettingsUpdate.ts +14 -0
- package/src/models/UserResponse.ts +16 -0
- package/src/models/index.ts +3 -0
package/src/apis/UsersApi.ts
CHANGED
|
@@ -16,12 +16,18 @@
|
|
|
16
16
|
import * as runtime from '../runtime';
|
|
17
17
|
import type {
|
|
18
18
|
HTTPValidationError,
|
|
19
|
+
OnboardingCompanyRequest,
|
|
20
|
+
OnboardingProfileRequest,
|
|
19
21
|
UpdateUserRequest,
|
|
20
22
|
UserResponse,
|
|
21
23
|
} from '../models/index';
|
|
22
24
|
import {
|
|
23
25
|
HTTPValidationErrorFromJSON,
|
|
24
26
|
HTTPValidationErrorToJSON,
|
|
27
|
+
OnboardingCompanyRequestFromJSON,
|
|
28
|
+
OnboardingCompanyRequestToJSON,
|
|
29
|
+
OnboardingProfileRequestFromJSON,
|
|
30
|
+
OnboardingProfileRequestToJSON,
|
|
25
31
|
UpdateUserRequestFromJSON,
|
|
26
32
|
UpdateUserRequestToJSON,
|
|
27
33
|
UserResponseFromJSON,
|
|
@@ -33,12 +39,29 @@ export interface GetMeRequest {
|
|
|
33
39
|
ksUat?: string | null;
|
|
34
40
|
}
|
|
35
41
|
|
|
42
|
+
export interface SkipOnboardingRequest {
|
|
43
|
+
authorization?: string | null;
|
|
44
|
+
ksUat?: string | null;
|
|
45
|
+
}
|
|
46
|
+
|
|
36
47
|
export interface UpdateMeRequest {
|
|
37
48
|
updateUserRequest: UpdateUserRequest;
|
|
38
49
|
authorization?: string | null;
|
|
39
50
|
ksUat?: string | null;
|
|
40
51
|
}
|
|
41
52
|
|
|
53
|
+
export interface UpdateOnboardingCompanyRequest {
|
|
54
|
+
onboardingCompanyRequest: OnboardingCompanyRequest;
|
|
55
|
+
authorization?: string | null;
|
|
56
|
+
ksUat?: string | null;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export interface UpdateOnboardingProfileRequest {
|
|
60
|
+
onboardingProfileRequest: OnboardingProfileRequest;
|
|
61
|
+
authorization?: string | null;
|
|
62
|
+
ksUat?: string | null;
|
|
63
|
+
}
|
|
64
|
+
|
|
42
65
|
/**
|
|
43
66
|
* UsersApi - interface
|
|
44
67
|
*
|
|
@@ -72,6 +95,32 @@ export interface UsersApiInterface {
|
|
|
72
95
|
*/
|
|
73
96
|
getMe(requestParameters: GetMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
74
97
|
|
|
98
|
+
/**
|
|
99
|
+
* Creates request options for skipOnboarding without sending the request
|
|
100
|
+
* @param {string} [authorization]
|
|
101
|
+
* @param {string} [ksUat]
|
|
102
|
+
* @throws {RequiredError}
|
|
103
|
+
* @memberof UsersApiInterface
|
|
104
|
+
*/
|
|
105
|
+
skipOnboardingRequestOpts(requestParameters: SkipOnboardingRequest): Promise<runtime.RequestOpts>;
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* 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).
|
|
109
|
+
* @summary Skip Onboarding Handler
|
|
110
|
+
* @param {string} [authorization]
|
|
111
|
+
* @param {string} [ksUat]
|
|
112
|
+
* @param {*} [options] Override http request option.
|
|
113
|
+
* @throws {RequiredError}
|
|
114
|
+
* @memberof UsersApiInterface
|
|
115
|
+
*/
|
|
116
|
+
skipOnboardingRaw(requestParameters: SkipOnboardingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
|
|
117
|
+
|
|
118
|
+
/**
|
|
119
|
+
* 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).
|
|
120
|
+
* Skip Onboarding Handler
|
|
121
|
+
*/
|
|
122
|
+
skipOnboarding(requestParameters: SkipOnboardingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
123
|
+
|
|
75
124
|
/**
|
|
76
125
|
* Creates request options for updateMe without sending the request
|
|
77
126
|
* @param {UpdateUserRequest} updateUserRequest
|
|
@@ -100,6 +149,62 @@ export interface UsersApiInterface {
|
|
|
100
149
|
*/
|
|
101
150
|
updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
102
151
|
|
|
152
|
+
/**
|
|
153
|
+
* Creates request options for updateOnboardingCompany without sending the request
|
|
154
|
+
* @param {OnboardingCompanyRequest} onboardingCompanyRequest
|
|
155
|
+
* @param {string} [authorization]
|
|
156
|
+
* @param {string} [ksUat]
|
|
157
|
+
* @throws {RequiredError}
|
|
158
|
+
* @memberof UsersApiInterface
|
|
159
|
+
*/
|
|
160
|
+
updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts>;
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* 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}.
|
|
164
|
+
* @summary Update Onboarding Company Handler
|
|
165
|
+
* @param {OnboardingCompanyRequest} onboardingCompanyRequest
|
|
166
|
+
* @param {string} [authorization]
|
|
167
|
+
* @param {string} [ksUat]
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
* @memberof UsersApiInterface
|
|
171
|
+
*/
|
|
172
|
+
updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* 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}.
|
|
176
|
+
* Update Onboarding Company Handler
|
|
177
|
+
*/
|
|
178
|
+
updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Creates request options for updateOnboardingProfile without sending the request
|
|
182
|
+
* @param {OnboardingProfileRequest} onboardingProfileRequest
|
|
183
|
+
* @param {string} [authorization]
|
|
184
|
+
* @param {string} [ksUat]
|
|
185
|
+
* @throws {RequiredError}
|
|
186
|
+
* @memberof UsersApiInterface
|
|
187
|
+
*/
|
|
188
|
+
updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts>;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* 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).
|
|
192
|
+
* @summary Update Onboarding Profile Handler
|
|
193
|
+
* @param {OnboardingProfileRequest} onboardingProfileRequest
|
|
194
|
+
* @param {string} [authorization]
|
|
195
|
+
* @param {string} [ksUat]
|
|
196
|
+
* @param {*} [options] Override http request option.
|
|
197
|
+
* @throws {RequiredError}
|
|
198
|
+
* @memberof UsersApiInterface
|
|
199
|
+
*/
|
|
200
|
+
updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* 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).
|
|
204
|
+
* Update Onboarding Profile Handler
|
|
205
|
+
*/
|
|
206
|
+
updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
207
|
+
|
|
103
208
|
}
|
|
104
209
|
|
|
105
210
|
/**
|
|
@@ -150,6 +255,49 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
|
|
|
150
255
|
return await response.value();
|
|
151
256
|
}
|
|
152
257
|
|
|
258
|
+
/**
|
|
259
|
+
* Creates request options for skipOnboarding without sending the request
|
|
260
|
+
*/
|
|
261
|
+
async skipOnboardingRequestOpts(requestParameters: SkipOnboardingRequest): Promise<runtime.RequestOpts> {
|
|
262
|
+
const queryParameters: any = {};
|
|
263
|
+
|
|
264
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
265
|
+
|
|
266
|
+
if (requestParameters['authorization'] != null) {
|
|
267
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
|
|
271
|
+
let urlPath = `/v1/users/me/onboarding/skip`;
|
|
272
|
+
|
|
273
|
+
return {
|
|
274
|
+
path: urlPath,
|
|
275
|
+
method: 'POST',
|
|
276
|
+
headers: headerParameters,
|
|
277
|
+
query: queryParameters,
|
|
278
|
+
};
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
/**
|
|
282
|
+
* 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).
|
|
283
|
+
* Skip Onboarding Handler
|
|
284
|
+
*/
|
|
285
|
+
async skipOnboardingRaw(requestParameters: SkipOnboardingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
|
|
286
|
+
const requestOptions = await this.skipOnboardingRequestOpts(requestParameters);
|
|
287
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
288
|
+
|
|
289
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* 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).
|
|
294
|
+
* Skip Onboarding Handler
|
|
295
|
+
*/
|
|
296
|
+
async skipOnboarding(requestParameters: SkipOnboardingRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
|
|
297
|
+
const response = await this.skipOnboardingRaw(requestParameters, initOverrides);
|
|
298
|
+
return await response.value();
|
|
299
|
+
}
|
|
300
|
+
|
|
153
301
|
/**
|
|
154
302
|
* Creates request options for updateMe without sending the request
|
|
155
303
|
*/
|
|
@@ -203,4 +351,110 @@ export class UsersApi extends runtime.BaseAPI implements UsersApiInterface {
|
|
|
203
351
|
return await response.value();
|
|
204
352
|
}
|
|
205
353
|
|
|
354
|
+
/**
|
|
355
|
+
* Creates request options for updateOnboardingCompany without sending the request
|
|
356
|
+
*/
|
|
357
|
+
async updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts> {
|
|
358
|
+
if (requestParameters['onboardingCompanyRequest'] == null) {
|
|
359
|
+
throw new runtime.RequiredError(
|
|
360
|
+
'onboardingCompanyRequest',
|
|
361
|
+
'Required parameter "onboardingCompanyRequest" was null or undefined when calling updateOnboardingCompany().'
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
const queryParameters: any = {};
|
|
366
|
+
|
|
367
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
368
|
+
|
|
369
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
370
|
+
|
|
371
|
+
if (requestParameters['authorization'] != null) {
|
|
372
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
let urlPath = `/v1/users/me/onboarding/company`;
|
|
377
|
+
|
|
378
|
+
return {
|
|
379
|
+
path: urlPath,
|
|
380
|
+
method: 'PATCH',
|
|
381
|
+
headers: headerParameters,
|
|
382
|
+
query: queryParameters,
|
|
383
|
+
body: OnboardingCompanyRequestToJSON(requestParameters['onboardingCompanyRequest']),
|
|
384
|
+
};
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
/**
|
|
388
|
+
* 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}.
|
|
389
|
+
* Update Onboarding Company Handler
|
|
390
|
+
*/
|
|
391
|
+
async updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
|
|
392
|
+
const requestOptions = await this.updateOnboardingCompanyRequestOpts(requestParameters);
|
|
393
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
394
|
+
|
|
395
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
/**
|
|
399
|
+
* 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}.
|
|
400
|
+
* Update Onboarding Company Handler
|
|
401
|
+
*/
|
|
402
|
+
async updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
|
|
403
|
+
const response = await this.updateOnboardingCompanyRaw(requestParameters, initOverrides);
|
|
404
|
+
return await response.value();
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
/**
|
|
408
|
+
* Creates request options for updateOnboardingProfile without sending the request
|
|
409
|
+
*/
|
|
410
|
+
async updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts> {
|
|
411
|
+
if (requestParameters['onboardingProfileRequest'] == null) {
|
|
412
|
+
throw new runtime.RequiredError(
|
|
413
|
+
'onboardingProfileRequest',
|
|
414
|
+
'Required parameter "onboardingProfileRequest" was null or undefined when calling updateOnboardingProfile().'
|
|
415
|
+
);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
const queryParameters: any = {};
|
|
419
|
+
|
|
420
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
421
|
+
|
|
422
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
423
|
+
|
|
424
|
+
if (requestParameters['authorization'] != null) {
|
|
425
|
+
headerParameters['authorization'] = String(requestParameters['authorization']);
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
let urlPath = `/v1/users/me/onboarding/profile`;
|
|
430
|
+
|
|
431
|
+
return {
|
|
432
|
+
path: urlPath,
|
|
433
|
+
method: 'PATCH',
|
|
434
|
+
headers: headerParameters,
|
|
435
|
+
query: queryParameters,
|
|
436
|
+
body: OnboardingProfileRequestToJSON(requestParameters['onboardingProfileRequest']),
|
|
437
|
+
};
|
|
438
|
+
}
|
|
439
|
+
|
|
440
|
+
/**
|
|
441
|
+
* 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).
|
|
442
|
+
* Update Onboarding Profile Handler
|
|
443
|
+
*/
|
|
444
|
+
async updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>> {
|
|
445
|
+
const requestOptions = await this.updateOnboardingProfileRequestOpts(requestParameters);
|
|
446
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
447
|
+
|
|
448
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
|
|
449
|
+
}
|
|
450
|
+
|
|
451
|
+
/**
|
|
452
|
+
* 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).
|
|
453
|
+
* Update Onboarding Profile Handler
|
|
454
|
+
*/
|
|
455
|
+
async updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse> {
|
|
456
|
+
const response = await this.updateOnboardingProfileRaw(requestParameters, initOverrides);
|
|
457
|
+
return await response.value();
|
|
458
|
+
}
|
|
459
|
+
|
|
206
460
|
}
|
|
@@ -150,6 +150,12 @@ export interface DocumentResponse {
|
|
|
150
150
|
* @memberof DocumentResponse
|
|
151
151
|
*/
|
|
152
152
|
tags?: Array<TagResponse> | null;
|
|
153
|
+
/**
|
|
154
|
+
* Whether the current caller has write access to this document. Only populated by endpoints that compute it (e.g. folder contents).
|
|
155
|
+
* @type {boolean}
|
|
156
|
+
* @memberof DocumentResponse
|
|
157
|
+
*/
|
|
158
|
+
canWrite?: boolean | null;
|
|
153
159
|
}
|
|
154
160
|
|
|
155
161
|
|
|
@@ -229,6 +235,7 @@ export function DocumentResponseFromJSONTyped(json: any, ignoreDiscriminator: bo
|
|
|
229
235
|
'createdAt': (new Date(json['created_at'])),
|
|
230
236
|
'updatedAt': (new Date(json['updated_at'])),
|
|
231
237
|
'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
|
|
238
|
+
'canWrite': json['can_write'] == null ? undefined : json['can_write'],
|
|
232
239
|
};
|
|
233
240
|
}
|
|
234
241
|
|
|
@@ -260,6 +267,7 @@ export function DocumentResponseToJSONTyped(value?: DocumentResponse | null, ign
|
|
|
260
267
|
'created_at': value['createdAt'].toISOString(),
|
|
261
268
|
'updated_at': value['updatedAt'].toISOString(),
|
|
262
269
|
'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
|
|
270
|
+
'can_write': value['canWrite'],
|
|
263
271
|
};
|
|
264
272
|
}
|
|
265
273
|
|
|
@@ -99,6 +99,12 @@ export interface FolderResponse {
|
|
|
99
99
|
* @memberof FolderResponse
|
|
100
100
|
*/
|
|
101
101
|
tags?: Array<TagResponse> | null;
|
|
102
|
+
/**
|
|
103
|
+
* Whether the current caller has write access to this folder. Only populated by endpoints that compute it (e.g. folder contents).
|
|
104
|
+
* @type {boolean}
|
|
105
|
+
* @memberof FolderResponse
|
|
106
|
+
*/
|
|
107
|
+
canWrite?: boolean | null;
|
|
102
108
|
}
|
|
103
109
|
|
|
104
110
|
|
|
@@ -168,6 +174,7 @@ export function FolderResponseFromJSONTyped(json: any, ignoreDiscriminator: bool
|
|
|
168
174
|
'createdAt': (new Date(json['created_at'])),
|
|
169
175
|
'updatedAt': (new Date(json['updated_at'])),
|
|
170
176
|
'tags': json['tags'] == null ? undefined : ((json['tags'] as Array<any>).map(TagResponseFromJSON)),
|
|
177
|
+
'canWrite': json['can_write'] == null ? undefined : json['can_write'],
|
|
171
178
|
};
|
|
172
179
|
}
|
|
173
180
|
|
|
@@ -194,6 +201,7 @@ export function FolderResponseToJSONTyped(value?: FolderResponse | null, ignoreD
|
|
|
194
201
|
'created_at': value['createdAt'].toISOString(),
|
|
195
202
|
'updated_at': value['updatedAt'].toISOString(),
|
|
196
203
|
'tags': value['tags'] == null ? undefined : ((value['tags'] as Array<any>).map(TagResponseToJSON)),
|
|
204
|
+
'can_write': value['canWrite'],
|
|
197
205
|
};
|
|
198
206
|
}
|
|
199
207
|
|
|
@@ -57,6 +57,12 @@ export interface MeteredQuotaStatus {
|
|
|
57
57
|
* @memberof MeteredQuotaStatus
|
|
58
58
|
*/
|
|
59
59
|
periodEnd: Date;
|
|
60
|
+
/**
|
|
61
|
+
* Persistent additional-quota balance for this metric. Unchanged by period rollover; decremented when included is exhausted, incremented on refund or top-up.
|
|
62
|
+
* @type {number}
|
|
63
|
+
* @memberof MeteredQuotaStatus
|
|
64
|
+
*/
|
|
65
|
+
additionalBalance?: number;
|
|
60
66
|
}
|
|
61
67
|
|
|
62
68
|
|
|
@@ -105,6 +111,7 @@ export function MeteredQuotaStatusFromJSONTyped(json: any, ignoreDiscriminator:
|
|
|
105
111
|
'limit': json['limit'],
|
|
106
112
|
'periodStart': (new Date(json['period_start'])),
|
|
107
113
|
'periodEnd': (new Date(json['period_end'])),
|
|
114
|
+
'additionalBalance': json['additional_balance'] == null ? undefined : json['additional_balance'],
|
|
108
115
|
};
|
|
109
116
|
}
|
|
110
117
|
|
|
@@ -124,6 +131,7 @@ export function MeteredQuotaStatusToJSONTyped(value?: MeteredQuotaStatus | null,
|
|
|
124
131
|
'limit': value['limit'],
|
|
125
132
|
'period_start': value['periodStart'].toISOString(),
|
|
126
133
|
'period_end': value['periodEnd'].toISOString(),
|
|
134
|
+
'additional_balance': value['additionalBalance'],
|
|
127
135
|
};
|
|
128
136
|
}
|
|
129
137
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Step 1 of onboarding — tenant-wide company info. OWNER/ADMIN only.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OnboardingCompanyRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface OnboardingCompanyRequest {
|
|
22
|
+
/**
|
|
23
|
+
* Brief company description (≤5000 chars)
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OnboardingCompanyRequest
|
|
26
|
+
*/
|
|
27
|
+
description?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Industry / company type (free text)
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OnboardingCompanyRequest
|
|
32
|
+
*/
|
|
33
|
+
industry?: string | null;
|
|
34
|
+
}
|
|
35
|
+
export const OnboardingCompanyRequestPropertyValidationAttributesMap: {
|
|
36
|
+
[property: string]: {
|
|
37
|
+
maxLength?: number,
|
|
38
|
+
minLength?: number,
|
|
39
|
+
pattern?: string,
|
|
40
|
+
maximum?: number,
|
|
41
|
+
exclusiveMaximum?: boolean,
|
|
42
|
+
minimum?: number,
|
|
43
|
+
exclusiveMinimum?: boolean,
|
|
44
|
+
multipleOf?: number,
|
|
45
|
+
maxItems?: number,
|
|
46
|
+
minItems?: number,
|
|
47
|
+
uniqueItems?: boolean
|
|
48
|
+
}
|
|
49
|
+
} = {
|
|
50
|
+
description: {
|
|
51
|
+
maxLength: 5000,
|
|
52
|
+
},
|
|
53
|
+
industry: {
|
|
54
|
+
maxLength: 120,
|
|
55
|
+
},
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
/**
|
|
60
|
+
* Check if a given object implements the OnboardingCompanyRequest interface.
|
|
61
|
+
*/
|
|
62
|
+
export function instanceOfOnboardingCompanyRequest(value: object): value is OnboardingCompanyRequest {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
export function OnboardingCompanyRequestFromJSON(json: any): OnboardingCompanyRequest {
|
|
67
|
+
return OnboardingCompanyRequestFromJSONTyped(json, false);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export function OnboardingCompanyRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingCompanyRequest {
|
|
71
|
+
if (json == null) {
|
|
72
|
+
return json;
|
|
73
|
+
}
|
|
74
|
+
return {
|
|
75
|
+
|
|
76
|
+
'description': json['description'] == null ? undefined : json['description'],
|
|
77
|
+
'industry': json['industry'] == null ? undefined : json['industry'],
|
|
78
|
+
};
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export function OnboardingCompanyRequestToJSON(json: any): OnboardingCompanyRequest {
|
|
82
|
+
return OnboardingCompanyRequestToJSONTyped(json, false);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function OnboardingCompanyRequestToJSONTyped(value?: OnboardingCompanyRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
86
|
+
if (value == null) {
|
|
87
|
+
return value;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
return {
|
|
91
|
+
|
|
92
|
+
'description': value['description'],
|
|
93
|
+
'industry': value['industry'],
|
|
94
|
+
};
|
|
95
|
+
}
|
|
96
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* Knowledge Stack API
|
|
5
|
+
* Knowledge Stack backend API for authentication and knowledge management
|
|
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
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
* Step 2 of onboarding — per-user info for the current tenant.
|
|
18
|
+
* @export
|
|
19
|
+
* @interface OnboardingProfileRequest
|
|
20
|
+
*/
|
|
21
|
+
export interface OnboardingProfileRequest {
|
|
22
|
+
/**
|
|
23
|
+
* User's first name
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof OnboardingProfileRequest
|
|
26
|
+
*/
|
|
27
|
+
firstName?: string | null;
|
|
28
|
+
/**
|
|
29
|
+
* User's last name
|
|
30
|
+
* @type {string}
|
|
31
|
+
* @memberof OnboardingProfileRequest
|
|
32
|
+
*/
|
|
33
|
+
lastName?: string | null;
|
|
34
|
+
/**
|
|
35
|
+
* What the user does at this tenant
|
|
36
|
+
* @type {string}
|
|
37
|
+
* @memberof OnboardingProfileRequest
|
|
38
|
+
*/
|
|
39
|
+
jobTitle?: string | null;
|
|
40
|
+
}
|
|
41
|
+
export const OnboardingProfileRequestPropertyValidationAttributesMap: {
|
|
42
|
+
[property: string]: {
|
|
43
|
+
maxLength?: number,
|
|
44
|
+
minLength?: number,
|
|
45
|
+
pattern?: string,
|
|
46
|
+
maximum?: number,
|
|
47
|
+
exclusiveMaximum?: boolean,
|
|
48
|
+
minimum?: number,
|
|
49
|
+
exclusiveMinimum?: boolean,
|
|
50
|
+
multipleOf?: number,
|
|
51
|
+
maxItems?: number,
|
|
52
|
+
minItems?: number,
|
|
53
|
+
uniqueItems?: boolean
|
|
54
|
+
}
|
|
55
|
+
} = {
|
|
56
|
+
jobTitle: {
|
|
57
|
+
maxLength: 120,
|
|
58
|
+
},
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* Check if a given object implements the OnboardingProfileRequest interface.
|
|
64
|
+
*/
|
|
65
|
+
export function instanceOfOnboardingProfileRequest(value: object): value is OnboardingProfileRequest {
|
|
66
|
+
return true;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export function OnboardingProfileRequestFromJSON(json: any): OnboardingProfileRequest {
|
|
70
|
+
return OnboardingProfileRequestFromJSONTyped(json, false);
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export function OnboardingProfileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingProfileRequest {
|
|
74
|
+
if (json == null) {
|
|
75
|
+
return json;
|
|
76
|
+
}
|
|
77
|
+
return {
|
|
78
|
+
|
|
79
|
+
'firstName': json['first_name'] == null ? undefined : json['first_name'],
|
|
80
|
+
'lastName': json['last_name'] == null ? undefined : json['last_name'],
|
|
81
|
+
'jobTitle': json['job_title'] == null ? undefined : json['job_title'],
|
|
82
|
+
};
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export function OnboardingProfileRequestToJSON(json: any): OnboardingProfileRequest {
|
|
86
|
+
return OnboardingProfileRequestToJSONTyped(json, false);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export function OnboardingProfileRequestToJSONTyped(value?: OnboardingProfileRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
90
|
+
if (value == null) {
|
|
91
|
+
return value;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
return {
|
|
95
|
+
|
|
96
|
+
'first_name': value['firstName'],
|
|
97
|
+
'last_name': value['lastName'],
|
|
98
|
+
'job_title': value['jobTitle'],
|
|
99
|
+
};
|
|
100
|
+
}
|
|
101
|
+
|