@knowledge-stack/ksapi 3.10.2 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +26 -4
- package/README.md +18 -6
- package/dist/apis/AuthApi.d.ts +12 -9
- package/dist/apis/AuthApi.js +5 -2
- package/dist/apis/FeedbackApi.d.ts +10 -7
- package/dist/apis/FeedbackApi.js +5 -2
- package/dist/apis/InvitesApi.d.ts +39 -1
- package/dist/apis/InvitesApi.js +41 -0
- package/dist/apis/UsersApi.d.ts +51 -59
- package/dist/apis/UsersApi.js +50 -57
- package/dist/esm/apis/AuthApi.d.ts +12 -9
- package/dist/esm/apis/AuthApi.js +6 -3
- package/dist/esm/apis/FeedbackApi.d.ts +10 -7
- package/dist/esm/apis/FeedbackApi.js +5 -2
- package/dist/esm/apis/InvitesApi.d.ts +39 -1
- package/dist/esm/apis/InvitesApi.js +42 -1
- package/dist/esm/apis/UsersApi.d.ts +51 -59
- package/dist/esm/apis/UsersApi.js +51 -58
- package/dist/esm/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
- package/dist/esm/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +13 -20
- package/dist/esm/models/AddedBy.d.ts +25 -0
- package/dist/esm/models/AddedBy.js +43 -0
- package/dist/esm/models/CreatePasswordUserRequest.d.ts +6 -0
- package/dist/esm/models/CreatePasswordUserRequest.js +2 -0
- package/dist/esm/models/ErrorResponse.d.ts +2 -0
- package/dist/esm/models/ErrorResponse.js +2 -0
- package/dist/esm/models/FeaturesResponse.d.ts +7 -0
- package/dist/esm/models/FeaturesResponse.js +5 -0
- package/dist/esm/models/GuideModuleProgress.d.ts +66 -0
- package/dist/{models/OnboardingProfileRequest.js → esm/models/GuideModuleProgress.js} +31 -25
- package/dist/esm/models/GuideModuleStatus.d.ts +26 -0
- package/dist/esm/models/GuideModuleStatus.js +44 -0
- package/dist/esm/models/GuideModules.d.ts +126 -0
- package/dist/esm/models/GuideModules.js +69 -0
- package/dist/esm/models/InvitePreviewResponse.d.ts +80 -0
- package/dist/esm/models/InvitePreviewResponse.js +57 -0
- package/dist/esm/models/InvitePreviewState.d.ts +28 -0
- package/dist/esm/models/InvitePreviewState.js +46 -0
- package/dist/esm/models/InviteRejection.d.ts +30 -0
- package/dist/esm/models/InviteRejection.js +48 -0
- package/dist/esm/models/KbSummaryResponse.d.ts +8 -0
- package/dist/esm/models/KbSummaryResponse.js +4 -0
- package/dist/esm/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
- package/dist/esm/models/{OnboardingProfileRequest.js → OnboardingState.js} +17 -19
- package/dist/esm/models/OnboardingStateUpdate.d.ts +61 -0
- package/dist/esm/models/OnboardingStateUpdate.js +48 -0
- package/dist/esm/models/OnboardingStep.d.ts +27 -0
- package/dist/esm/models/OnboardingStep.js +45 -0
- package/dist/esm/models/SignUpResponse.d.ts +174 -0
- package/dist/esm/models/SignUpResponse.js +107 -0
- package/dist/esm/models/TenantResponse.d.ts +7 -0
- package/dist/esm/models/TenantResponse.js +5 -0
- package/dist/esm/models/TenantUserJoinMethod.d.ts +26 -0
- package/dist/esm/models/TenantUserJoinMethod.js +44 -0
- package/dist/esm/models/UserResponse.d.ts +40 -0
- package/dist/esm/models/UserResponse.js +18 -0
- package/dist/esm/models/index.d.ts +13 -2
- package/dist/esm/models/index.js +13 -2
- package/dist/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
- package/dist/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +19 -26
- package/dist/models/AddedBy.d.ts +25 -0
- package/dist/models/AddedBy.js +51 -0
- package/dist/models/CreatePasswordUserRequest.d.ts +6 -0
- package/dist/models/CreatePasswordUserRequest.js +2 -0
- package/dist/models/ErrorResponse.d.ts +2 -0
- package/dist/models/ErrorResponse.js +2 -0
- package/dist/models/FeaturesResponse.d.ts +7 -0
- package/dist/models/FeaturesResponse.js +5 -0
- package/dist/models/GuideModuleProgress.d.ts +66 -0
- package/dist/models/GuideModuleProgress.js +72 -0
- package/dist/models/GuideModuleStatus.d.ts +26 -0
- package/dist/models/GuideModuleStatus.js +52 -0
- package/dist/models/GuideModules.d.ts +126 -0
- package/dist/models/GuideModules.js +77 -0
- package/dist/models/InvitePreviewResponse.d.ts +80 -0
- package/dist/models/InvitePreviewResponse.js +65 -0
- package/dist/models/InvitePreviewState.d.ts +28 -0
- package/dist/models/InvitePreviewState.js +54 -0
- package/dist/models/InviteRejection.d.ts +30 -0
- package/dist/models/InviteRejection.js +56 -0
- package/dist/models/KbSummaryResponse.d.ts +8 -0
- package/dist/models/KbSummaryResponse.js +4 -0
- package/dist/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
- package/dist/models/OnboardingState.js +56 -0
- package/dist/models/OnboardingStateUpdate.d.ts +61 -0
- package/dist/models/OnboardingStateUpdate.js +56 -0
- package/dist/models/OnboardingStep.d.ts +27 -0
- package/dist/models/OnboardingStep.js +53 -0
- package/dist/models/SignUpResponse.d.ts +174 -0
- package/dist/models/SignUpResponse.js +115 -0
- package/dist/models/TenantResponse.d.ts +7 -0
- package/dist/models/TenantResponse.js +5 -0
- package/dist/models/TenantUserJoinMethod.d.ts +26 -0
- package/dist/models/TenantUserJoinMethod.js +52 -0
- package/dist/models/UserResponse.d.ts +40 -0
- package/dist/models/UserResponse.js +18 -0
- package/dist/models/index.d.ts +13 -2
- package/dist/models/index.js +13 -2
- package/docs/{OnboardingCompanyRequest.md → AccessRequestResponse.md} +6 -9
- package/docs/{OnboardingProfileRequest.md → AddedBy.md} +4 -11
- package/docs/AuthApi.md +8 -5
- package/docs/CreatePasswordUserRequest.md +2 -0
- package/docs/FeaturesResponse.md +2 -0
- package/docs/FeedbackApi.md +8 -5
- package/docs/GuideModuleProgress.md +40 -0
- package/docs/GuideModuleStatus.md +32 -0
- package/docs/GuideModules.md +60 -0
- package/docs/InvitePreviewResponse.md +44 -0
- package/docs/InvitePreviewState.md +32 -0
- package/docs/InviteRejection.md +32 -0
- package/docs/InvitesApi.md +70 -0
- package/docs/KbSummaryResponse.md +2 -0
- package/docs/OnboardingState.md +39 -0
- package/docs/OnboardingStateUpdate.md +38 -0
- package/docs/OnboardingStep.md +32 -0
- package/docs/SignUpResponse.md +74 -0
- package/docs/TenantResponse.md +2 -0
- package/docs/TenantUserJoinMethod.md +32 -0
- package/docs/UserResponse.md +12 -0
- package/docs/UsersApi.md +36 -47
- package/package.json +1 -1
- package/src/apis/AuthApi.ts +20 -10
- package/src/apis/FeedbackApi.ts +14 -7
- package/src/apis/InvitesApi.ts +78 -0
- package/src/apis/UsersApi.ts +91 -110
- package/src/models/{OnboardingCompanyRequest.ts → AccessRequestResponse.ts} +19 -32
- package/src/models/AddedBy.ts +53 -0
- package/src/models/CreatePasswordUserRequest.ts +8 -0
- package/src/models/ErrorResponse.ts +2 -0
- package/src/models/FeaturesResponse.ts +16 -0
- package/src/models/GuideModuleProgress.ts +127 -0
- package/src/models/GuideModuleStatus.ts +54 -0
- package/src/models/GuideModules.ts +194 -0
- package/src/models/InvitePreviewResponse.ts +147 -0
- package/src/models/InvitePreviewState.ts +56 -0
- package/src/models/InviteRejection.ts +58 -0
- package/src/models/KbSummaryResponse.ts +9 -0
- package/src/models/{OnboardingProfileRequest.ts → OnboardingState.ts} +47 -33
- package/src/models/OnboardingStateUpdate.ts +115 -0
- package/src/models/OnboardingStep.ts +55 -0
- package/src/models/SignUpResponse.ts +303 -0
- package/src/models/TenantResponse.ts +16 -0
- package/src/models/TenantUserJoinMethod.ts +54 -0
- package/src/models/UserResponse.ts +77 -0
- package/src/models/index.ts +13 -2
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type { AcceptInviteResponse, InviteOrder, InviteResponse, InviteStatus, InviteUserRequest, PaginatedResponseInviteResponse, SortDirection, TenantUserRole, UpdateInviteRequest } from '../models/index';
|
|
13
|
+
import type { AcceptInviteResponse, InviteOrder, InvitePreviewResponse, InviteResponse, InviteStatus, InviteUserRequest, PaginatedResponseInviteResponse, SortDirection, TenantUserRole, UpdateInviteRequest } from '../models/index';
|
|
14
14
|
export interface AcceptInviteRequest {
|
|
15
15
|
inviteId: string;
|
|
16
16
|
}
|
|
@@ -34,6 +34,9 @@ export interface ListInvitesRequest {
|
|
|
34
34
|
updatedAfter?: Date | null;
|
|
35
35
|
updatedBefore?: Date | null;
|
|
36
36
|
}
|
|
37
|
+
export interface PreviewInviteRequest {
|
|
38
|
+
inviteId: string;
|
|
39
|
+
}
|
|
37
40
|
export interface UpdateInviteOperationRequest {
|
|
38
41
|
inviteId: string;
|
|
39
42
|
updateInviteRequest: UpdateInviteRequest;
|
|
@@ -151,6 +154,27 @@ export interface InvitesApiInterface {
|
|
|
151
154
|
* List Invites Handler
|
|
152
155
|
*/
|
|
153
156
|
listInvites(requestParameters: ListInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseInviteResponse>;
|
|
157
|
+
/**
|
|
158
|
+
* Creates request options for previewInvite without sending the request
|
|
159
|
+
* @param {string} inviteId
|
|
160
|
+
* @throws {RequiredError}
|
|
161
|
+
* @memberof InvitesApiInterface
|
|
162
|
+
*/
|
|
163
|
+
previewInviteRequestOpts(requestParameters: PreviewInviteRequest): Promise<runtime.RequestOpts>;
|
|
164
|
+
/**
|
|
165
|
+
* Unauthenticated; the invite id in the emailed link is the only credential.
|
|
166
|
+
* @summary Preview Invite Handler
|
|
167
|
+
* @param {string} inviteId
|
|
168
|
+
* @param {*} [options] Override http request option.
|
|
169
|
+
* @throws {RequiredError}
|
|
170
|
+
* @memberof InvitesApiInterface
|
|
171
|
+
*/
|
|
172
|
+
previewInviteRaw(requestParameters: PreviewInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitePreviewResponse>>;
|
|
173
|
+
/**
|
|
174
|
+
* Unauthenticated; the invite id in the emailed link is the only credential.
|
|
175
|
+
* Preview Invite Handler
|
|
176
|
+
*/
|
|
177
|
+
previewInvite(requestParameters: PreviewInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitePreviewResponse>;
|
|
154
178
|
/**
|
|
155
179
|
* Creates request options for updateInvite without sending the request
|
|
156
180
|
* @param {string} inviteId
|
|
@@ -235,6 +259,20 @@ export declare class InvitesApi extends runtime.BaseAPI implements InvitesApiInt
|
|
|
235
259
|
* List Invites Handler
|
|
236
260
|
*/
|
|
237
261
|
listInvites(requestParameters?: ListInvitesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PaginatedResponseInviteResponse>;
|
|
262
|
+
/**
|
|
263
|
+
* Creates request options for previewInvite without sending the request
|
|
264
|
+
*/
|
|
265
|
+
previewInviteRequestOpts(requestParameters: PreviewInviteRequest): Promise<runtime.RequestOpts>;
|
|
266
|
+
/**
|
|
267
|
+
* Unauthenticated; the invite id in the emailed link is the only credential.
|
|
268
|
+
* Preview Invite Handler
|
|
269
|
+
*/
|
|
270
|
+
previewInviteRaw(requestParameters: PreviewInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvitePreviewResponse>>;
|
|
271
|
+
/**
|
|
272
|
+
* Unauthenticated; the invite id in the emailed link is the only credential.
|
|
273
|
+
* Preview Invite Handler
|
|
274
|
+
*/
|
|
275
|
+
previewInvite(requestParameters: PreviewInviteRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvitePreviewResponse>;
|
|
238
276
|
/**
|
|
239
277
|
* Creates request options for updateInvite without sending the request
|
|
240
278
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import { AcceptInviteResponseFromJSON, InviteResponseFromJSON, InviteUserRequestToJSON, PaginatedResponseInviteResponseFromJSON, UpdateInviteRequestToJSON, } from '../models/index';
|
|
24
|
+
import { AcceptInviteResponseFromJSON, InvitePreviewResponseFromJSON, InviteResponseFromJSON, InviteUserRequestToJSON, PaginatedResponseInviteResponseFromJSON, UpdateInviteRequestToJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -250,6 +250,47 @@ export class InvitesApi extends runtime.BaseAPI {
|
|
|
250
250
|
return yield response.value();
|
|
251
251
|
});
|
|
252
252
|
}
|
|
253
|
+
/**
|
|
254
|
+
* Creates request options for previewInvite without sending the request
|
|
255
|
+
*/
|
|
256
|
+
previewInviteRequestOpts(requestParameters) {
|
|
257
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
258
|
+
if (requestParameters['inviteId'] == null) {
|
|
259
|
+
throw new runtime.RequiredError('inviteId', 'Required parameter "inviteId" was null or undefined when calling previewInvite().');
|
|
260
|
+
}
|
|
261
|
+
const queryParameters = {};
|
|
262
|
+
const headerParameters = {};
|
|
263
|
+
let urlPath = `/v1/invites/{invite_id}/preview`;
|
|
264
|
+
urlPath = urlPath.replace(`{${"invite_id"}}`, encodeURIComponent(String(requestParameters['inviteId'])));
|
|
265
|
+
return {
|
|
266
|
+
path: urlPath,
|
|
267
|
+
method: 'GET',
|
|
268
|
+
headers: headerParameters,
|
|
269
|
+
query: queryParameters,
|
|
270
|
+
};
|
|
271
|
+
});
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* Unauthenticated; the invite id in the emailed link is the only credential.
|
|
275
|
+
* Preview Invite Handler
|
|
276
|
+
*/
|
|
277
|
+
previewInviteRaw(requestParameters, initOverrides) {
|
|
278
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
279
|
+
const requestOptions = yield this.previewInviteRequestOpts(requestParameters);
|
|
280
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
281
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => InvitePreviewResponseFromJSON(jsonValue));
|
|
282
|
+
});
|
|
283
|
+
}
|
|
284
|
+
/**
|
|
285
|
+
* Unauthenticated; the invite id in the emailed link is the only credential.
|
|
286
|
+
* Preview Invite Handler
|
|
287
|
+
*/
|
|
288
|
+
previewInvite(requestParameters, initOverrides) {
|
|
289
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
290
|
+
const response = yield this.previewInviteRaw(requestParameters, initOverrides);
|
|
291
|
+
return yield response.value();
|
|
292
|
+
});
|
|
293
|
+
}
|
|
253
294
|
/**
|
|
254
295
|
* Creates request options for updateInvite without sending the request
|
|
255
296
|
*/
|
|
@@ -10,15 +10,12 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
import * as runtime from '../runtime';
|
|
13
|
-
import type {
|
|
13
|
+
import type { AccessRequestResponse, OnboardingStateUpdate, UpdateUserRequest, UserResponse } from '../models/index';
|
|
14
14
|
export interface UpdateMeRequest {
|
|
15
15
|
updateUserRequest: UpdateUserRequest;
|
|
16
16
|
}
|
|
17
|
-
export interface
|
|
18
|
-
|
|
19
|
-
}
|
|
20
|
-
export interface UpdateOnboardingProfileRequest {
|
|
21
|
-
onboardingProfileRequest: OnboardingProfileRequest;
|
|
17
|
+
export interface UpdateOnboardingStateRequest {
|
|
18
|
+
onboardingStateUpdate: OnboardingStateUpdate;
|
|
22
19
|
}
|
|
23
20
|
export interface UploadMyAvatarRequest {
|
|
24
21
|
file: Blob;
|
|
@@ -68,6 +65,25 @@ export interface UsersApiInterface {
|
|
|
68
65
|
* Get Me Handler
|
|
69
66
|
*/
|
|
70
67
|
getMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
68
|
+
/**
|
|
69
|
+
* Creates request options for requestAccess without sending the request
|
|
70
|
+
* @throws {RequiredError}
|
|
71
|
+
* @memberof UsersApiInterface
|
|
72
|
+
*/
|
|
73
|
+
requestAccessRequestOpts(): Promise<runtime.RequestOpts>;
|
|
74
|
+
/**
|
|
75
|
+
* Email the owner and admins for access; one request per member per day.
|
|
76
|
+
* @summary Request Access Handler
|
|
77
|
+
* @param {*} [options] Override http request option.
|
|
78
|
+
* @throws {RequiredError}
|
|
79
|
+
* @memberof UsersApiInterface
|
|
80
|
+
*/
|
|
81
|
+
requestAccessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessRequestResponse>>;
|
|
82
|
+
/**
|
|
83
|
+
* Email the owner and admins for access; one request per member per day.
|
|
84
|
+
* Request Access Handler
|
|
85
|
+
*/
|
|
86
|
+
requestAccess(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessRequestResponse>;
|
|
71
87
|
/**
|
|
72
88
|
* Creates request options for skipOnboarding without sending the request
|
|
73
89
|
* @throws {RequiredError}
|
|
@@ -109,47 +125,25 @@ export interface UsersApiInterface {
|
|
|
109
125
|
*/
|
|
110
126
|
updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
111
127
|
/**
|
|
112
|
-
* Creates request options for
|
|
113
|
-
* @param {
|
|
128
|
+
* Creates request options for updateOnboardingState without sending the request
|
|
129
|
+
* @param {OnboardingStateUpdate} onboardingStateUpdate
|
|
114
130
|
* @throws {RequiredError}
|
|
115
131
|
* @memberof UsersApiInterface
|
|
116
132
|
*/
|
|
117
|
-
|
|
133
|
+
updateOnboardingStateRequestOpts(requestParameters: UpdateOnboardingStateRequest): Promise<runtime.RequestOpts>;
|
|
118
134
|
/**
|
|
119
|
-
*
|
|
120
|
-
* @summary Update Onboarding
|
|
121
|
-
* @param {
|
|
135
|
+
*
|
|
136
|
+
* @summary Update Onboarding State Handler
|
|
137
|
+
* @param {OnboardingStateUpdate} onboardingStateUpdate
|
|
122
138
|
* @param {*} [options] Override http request option.
|
|
123
139
|
* @throws {RequiredError}
|
|
124
140
|
* @memberof UsersApiInterface
|
|
125
141
|
*/
|
|
126
|
-
|
|
142
|
+
updateOnboardingStateRaw(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
|
|
127
143
|
/**
|
|
128
|
-
*
|
|
129
|
-
* Update Onboarding Company Handler
|
|
144
|
+
* Update Onboarding State Handler
|
|
130
145
|
*/
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Creates request options for updateOnboardingProfile without sending the request
|
|
134
|
-
* @param {OnboardingProfileRequest} onboardingProfileRequest
|
|
135
|
-
* @throws {RequiredError}
|
|
136
|
-
* @memberof UsersApiInterface
|
|
137
|
-
*/
|
|
138
|
-
updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts>;
|
|
139
|
-
/**
|
|
140
|
-
* 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.
|
|
141
|
-
* @summary Update Onboarding Profile Handler
|
|
142
|
-
* @param {OnboardingProfileRequest} onboardingProfileRequest
|
|
143
|
-
* @param {*} [options] Override http request option.
|
|
144
|
-
* @throws {RequiredError}
|
|
145
|
-
* @memberof UsersApiInterface
|
|
146
|
-
*/
|
|
147
|
-
updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
|
|
148
|
-
/**
|
|
149
|
-
* 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.
|
|
150
|
-
* Update Onboarding Profile Handler
|
|
151
|
-
*/
|
|
152
|
-
updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
146
|
+
updateOnboardingState(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
153
147
|
/**
|
|
154
148
|
* Creates request options for uploadMyAvatar without sending the request
|
|
155
149
|
* @param {Blob} file
|
|
@@ -204,6 +198,20 @@ export declare class UsersApi extends runtime.BaseAPI implements UsersApiInterfa
|
|
|
204
198
|
* Get Me Handler
|
|
205
199
|
*/
|
|
206
200
|
getMe(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
201
|
+
/**
|
|
202
|
+
* Creates request options for requestAccess without sending the request
|
|
203
|
+
*/
|
|
204
|
+
requestAccessRequestOpts(): Promise<runtime.RequestOpts>;
|
|
205
|
+
/**
|
|
206
|
+
* Email the owner and admins for access; one request per member per day.
|
|
207
|
+
* Request Access Handler
|
|
208
|
+
*/
|
|
209
|
+
requestAccessRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AccessRequestResponse>>;
|
|
210
|
+
/**
|
|
211
|
+
* Email the owner and admins for access; one request per member per day.
|
|
212
|
+
* Request Access Handler
|
|
213
|
+
*/
|
|
214
|
+
requestAccess(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AccessRequestResponse>;
|
|
207
215
|
/**
|
|
208
216
|
* Creates request options for skipOnboarding without sending the request
|
|
209
217
|
*/
|
|
@@ -233,33 +241,17 @@ export declare class UsersApi extends runtime.BaseAPI implements UsersApiInterfa
|
|
|
233
241
|
*/
|
|
234
242
|
updateMe(requestParameters: UpdateMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
235
243
|
/**
|
|
236
|
-
* Creates request options for
|
|
237
|
-
*/
|
|
238
|
-
updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts>;
|
|
239
|
-
/**
|
|
240
|
-
* 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}.
|
|
241
|
-
* Update Onboarding Company Handler
|
|
242
|
-
*/
|
|
243
|
-
updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
|
|
244
|
-
/**
|
|
245
|
-
* 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}.
|
|
246
|
-
* Update Onboarding Company Handler
|
|
247
|
-
*/
|
|
248
|
-
updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
249
|
-
/**
|
|
250
|
-
* Creates request options for updateOnboardingProfile without sending the request
|
|
244
|
+
* Creates request options for updateOnboardingState without sending the request
|
|
251
245
|
*/
|
|
252
|
-
|
|
246
|
+
updateOnboardingStateRequestOpts(requestParameters: UpdateOnboardingStateRequest): Promise<runtime.RequestOpts>;
|
|
253
247
|
/**
|
|
254
|
-
*
|
|
255
|
-
* Update Onboarding Profile Handler
|
|
248
|
+
* Update Onboarding State Handler
|
|
256
249
|
*/
|
|
257
|
-
|
|
250
|
+
updateOnboardingStateRaw(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
|
|
258
251
|
/**
|
|
259
|
-
*
|
|
260
|
-
* Update Onboarding Profile Handler
|
|
252
|
+
* Update Onboarding State Handler
|
|
261
253
|
*/
|
|
262
|
-
|
|
254
|
+
updateOnboardingState(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
|
|
263
255
|
/**
|
|
264
256
|
* Creates request options for uploadMyAvatar without sending the request
|
|
265
257
|
*/
|
|
@@ -21,7 +21,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
-
import {
|
|
24
|
+
import { AccessRequestResponseFromJSON, OnboardingStateUpdateToJSON, UpdateUserRequestToJSON, UserResponseFromJSON, } from '../models/index';
|
|
25
25
|
/**
|
|
26
26
|
*
|
|
27
27
|
*/
|
|
@@ -115,9 +115,9 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
115
115
|
});
|
|
116
116
|
}
|
|
117
117
|
/**
|
|
118
|
-
* Creates request options for
|
|
118
|
+
* Creates request options for requestAccess without sending the request
|
|
119
119
|
*/
|
|
120
|
-
|
|
120
|
+
requestAccessRequestOpts() {
|
|
121
121
|
return __awaiter(this, void 0, void 0, function* () {
|
|
122
122
|
const queryParameters = {};
|
|
123
123
|
const headerParameters = {};
|
|
@@ -128,7 +128,7 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
128
128
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
|
-
let urlPath = `/v1/users/me/
|
|
131
|
+
let urlPath = `/v1/users/me/access_requests`;
|
|
132
132
|
return {
|
|
133
133
|
path: urlPath,
|
|
134
134
|
method: 'POST',
|
|
@@ -138,37 +138,33 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
138
138
|
});
|
|
139
139
|
}
|
|
140
140
|
/**
|
|
141
|
-
*
|
|
142
|
-
*
|
|
141
|
+
* Email the owner and admins for access; one request per member per day.
|
|
142
|
+
* Request Access Handler
|
|
143
143
|
*/
|
|
144
|
-
|
|
144
|
+
requestAccessRaw(initOverrides) {
|
|
145
145
|
return __awaiter(this, void 0, void 0, function* () {
|
|
146
|
-
const requestOptions = yield this.
|
|
146
|
+
const requestOptions = yield this.requestAccessRequestOpts();
|
|
147
147
|
const response = yield this.request(requestOptions, initOverrides);
|
|
148
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
148
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AccessRequestResponseFromJSON(jsonValue));
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
/**
|
|
152
|
-
*
|
|
153
|
-
*
|
|
152
|
+
* Email the owner and admins for access; one request per member per day.
|
|
153
|
+
* Request Access Handler
|
|
154
154
|
*/
|
|
155
|
-
|
|
155
|
+
requestAccess(initOverrides) {
|
|
156
156
|
return __awaiter(this, void 0, void 0, function* () {
|
|
157
|
-
const response = yield this.
|
|
157
|
+
const response = yield this.requestAccessRaw(initOverrides);
|
|
158
158
|
return yield response.value();
|
|
159
159
|
});
|
|
160
160
|
}
|
|
161
161
|
/**
|
|
162
|
-
* Creates request options for
|
|
162
|
+
* Creates request options for skipOnboarding without sending the request
|
|
163
163
|
*/
|
|
164
|
-
|
|
164
|
+
skipOnboardingRequestOpts() {
|
|
165
165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
166
|
-
if (requestParameters['updateUserRequest'] == null) {
|
|
167
|
-
throw new runtime.RequiredError('updateUserRequest', 'Required parameter "updateUserRequest" was null or undefined when calling updateMe().');
|
|
168
|
-
}
|
|
169
166
|
const queryParameters = {};
|
|
170
167
|
const headerParameters = {};
|
|
171
|
-
headerParameters['Content-Type'] = 'application/json';
|
|
172
168
|
if (this.configuration && this.configuration.accessToken) {
|
|
173
169
|
const token = this.configuration.accessToken;
|
|
174
170
|
const tokenString = yield token("bearerAuth", []);
|
|
@@ -176,44 +172,43 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
176
172
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
177
173
|
}
|
|
178
174
|
}
|
|
179
|
-
let urlPath = `/v1/users`;
|
|
175
|
+
let urlPath = `/v1/users/me/onboarding/skip`;
|
|
180
176
|
return {
|
|
181
177
|
path: urlPath,
|
|
182
|
-
method: '
|
|
178
|
+
method: 'POST',
|
|
183
179
|
headers: headerParameters,
|
|
184
180
|
query: queryParameters,
|
|
185
|
-
body: UpdateUserRequestToJSON(requestParameters['updateUserRequest']),
|
|
186
181
|
};
|
|
187
182
|
});
|
|
188
183
|
}
|
|
189
184
|
/**
|
|
190
|
-
*
|
|
191
|
-
*
|
|
185
|
+
* 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).
|
|
186
|
+
* Skip Onboarding Handler
|
|
192
187
|
*/
|
|
193
|
-
|
|
188
|
+
skipOnboardingRaw(initOverrides) {
|
|
194
189
|
return __awaiter(this, void 0, void 0, function* () {
|
|
195
|
-
const requestOptions = yield this.
|
|
190
|
+
const requestOptions = yield this.skipOnboardingRequestOpts();
|
|
196
191
|
const response = yield this.request(requestOptions, initOverrides);
|
|
197
192
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
|
|
198
193
|
});
|
|
199
194
|
}
|
|
200
195
|
/**
|
|
201
|
-
*
|
|
202
|
-
*
|
|
196
|
+
* 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).
|
|
197
|
+
* Skip Onboarding Handler
|
|
203
198
|
*/
|
|
204
|
-
|
|
199
|
+
skipOnboarding(initOverrides) {
|
|
205
200
|
return __awaiter(this, void 0, void 0, function* () {
|
|
206
|
-
const response = yield this.
|
|
201
|
+
const response = yield this.skipOnboardingRaw(initOverrides);
|
|
207
202
|
return yield response.value();
|
|
208
203
|
});
|
|
209
204
|
}
|
|
210
205
|
/**
|
|
211
|
-
* Creates request options for
|
|
206
|
+
* Creates request options for updateMe without sending the request
|
|
212
207
|
*/
|
|
213
|
-
|
|
208
|
+
updateMeRequestOpts(requestParameters) {
|
|
214
209
|
return __awaiter(this, void 0, void 0, function* () {
|
|
215
|
-
if (requestParameters['
|
|
216
|
-
throw new runtime.RequiredError('
|
|
210
|
+
if (requestParameters['updateUserRequest'] == null) {
|
|
211
|
+
throw new runtime.RequiredError('updateUserRequest', 'Required parameter "updateUserRequest" was null or undefined when calling updateMe().');
|
|
217
212
|
}
|
|
218
213
|
const queryParameters = {};
|
|
219
214
|
const headerParameters = {};
|
|
@@ -225,44 +220,44 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
225
220
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
226
221
|
}
|
|
227
222
|
}
|
|
228
|
-
let urlPath = `/v1/users
|
|
223
|
+
let urlPath = `/v1/users`;
|
|
229
224
|
return {
|
|
230
225
|
path: urlPath,
|
|
231
226
|
method: 'PATCH',
|
|
232
227
|
headers: headerParameters,
|
|
233
228
|
query: queryParameters,
|
|
234
|
-
body:
|
|
229
|
+
body: UpdateUserRequestToJSON(requestParameters['updateUserRequest']),
|
|
235
230
|
};
|
|
236
231
|
});
|
|
237
232
|
}
|
|
238
233
|
/**
|
|
239
|
-
*
|
|
240
|
-
* Update
|
|
234
|
+
* 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.
|
|
235
|
+
* Update Me Handler
|
|
241
236
|
*/
|
|
242
|
-
|
|
237
|
+
updateMeRaw(requestParameters, initOverrides) {
|
|
243
238
|
return __awaiter(this, void 0, void 0, function* () {
|
|
244
|
-
const requestOptions = yield this.
|
|
239
|
+
const requestOptions = yield this.updateMeRequestOpts(requestParameters);
|
|
245
240
|
const response = yield this.request(requestOptions, initOverrides);
|
|
246
241
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
|
|
247
242
|
});
|
|
248
243
|
}
|
|
249
244
|
/**
|
|
250
|
-
*
|
|
251
|
-
* Update
|
|
245
|
+
* 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.
|
|
246
|
+
* Update Me Handler
|
|
252
247
|
*/
|
|
253
|
-
|
|
248
|
+
updateMe(requestParameters, initOverrides) {
|
|
254
249
|
return __awaiter(this, void 0, void 0, function* () {
|
|
255
|
-
const response = yield this.
|
|
250
|
+
const response = yield this.updateMeRaw(requestParameters, initOverrides);
|
|
256
251
|
return yield response.value();
|
|
257
252
|
});
|
|
258
253
|
}
|
|
259
254
|
/**
|
|
260
|
-
* Creates request options for
|
|
255
|
+
* Creates request options for updateOnboardingState without sending the request
|
|
261
256
|
*/
|
|
262
|
-
|
|
257
|
+
updateOnboardingStateRequestOpts(requestParameters) {
|
|
263
258
|
return __awaiter(this, void 0, void 0, function* () {
|
|
264
|
-
if (requestParameters['
|
|
265
|
-
throw new runtime.RequiredError('
|
|
259
|
+
if (requestParameters['onboardingStateUpdate'] == null) {
|
|
260
|
+
throw new runtime.RequiredError('onboardingStateUpdate', 'Required parameter "onboardingStateUpdate" was null or undefined when calling updateOnboardingState().');
|
|
266
261
|
}
|
|
267
262
|
const queryParameters = {};
|
|
268
263
|
const headerParameters = {};
|
|
@@ -274,34 +269,32 @@ export class UsersApi extends runtime.BaseAPI {
|
|
|
274
269
|
headerParameters["Authorization"] = `Bearer ${tokenString}`;
|
|
275
270
|
}
|
|
276
271
|
}
|
|
277
|
-
let urlPath = `/v1/users/me/onboarding
|
|
272
|
+
let urlPath = `/v1/users/me/onboarding`;
|
|
278
273
|
return {
|
|
279
274
|
path: urlPath,
|
|
280
275
|
method: 'PATCH',
|
|
281
276
|
headers: headerParameters,
|
|
282
277
|
query: queryParameters,
|
|
283
|
-
body:
|
|
278
|
+
body: OnboardingStateUpdateToJSON(requestParameters['onboardingStateUpdate']),
|
|
284
279
|
};
|
|
285
280
|
});
|
|
286
281
|
}
|
|
287
282
|
/**
|
|
288
|
-
*
|
|
289
|
-
* Update Onboarding Profile Handler
|
|
283
|
+
* Update Onboarding State Handler
|
|
290
284
|
*/
|
|
291
|
-
|
|
285
|
+
updateOnboardingStateRaw(requestParameters, initOverrides) {
|
|
292
286
|
return __awaiter(this, void 0, void 0, function* () {
|
|
293
|
-
const requestOptions = yield this.
|
|
287
|
+
const requestOptions = yield this.updateOnboardingStateRequestOpts(requestParameters);
|
|
294
288
|
const response = yield this.request(requestOptions, initOverrides);
|
|
295
289
|
return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
|
|
296
290
|
});
|
|
297
291
|
}
|
|
298
292
|
/**
|
|
299
|
-
*
|
|
300
|
-
* Update Onboarding Profile Handler
|
|
293
|
+
* Update Onboarding State Handler
|
|
301
294
|
*/
|
|
302
|
-
|
|
295
|
+
updateOnboardingState(requestParameters, initOverrides) {
|
|
303
296
|
return __awaiter(this, void 0, void 0, function* () {
|
|
304
|
-
const response = yield this.
|
|
297
|
+
const response = yield this.updateOnboardingStateRaw(requestParameters, initOverrides);
|
|
305
298
|
return yield response.value();
|
|
306
299
|
});
|
|
307
300
|
}
|
|
@@ -10,31 +10,19 @@
|
|
|
10
10
|
* Do not edit the class manually.
|
|
11
11
|
*/
|
|
12
12
|
/**
|
|
13
|
-
*
|
|
13
|
+
*
|
|
14
14
|
* @export
|
|
15
|
-
* @interface
|
|
15
|
+
* @interface AccessRequestResponse
|
|
16
16
|
*/
|
|
17
|
-
export interface
|
|
18
|
-
/**
|
|
19
|
-
* User's first name
|
|
20
|
-
* @type {string}
|
|
21
|
-
* @memberof OnboardingProfileRequest
|
|
22
|
-
*/
|
|
23
|
-
firstName?: string | null;
|
|
24
|
-
/**
|
|
25
|
-
* User's last name
|
|
26
|
-
* @type {string}
|
|
27
|
-
* @memberof OnboardingProfileRequest
|
|
28
|
-
*/
|
|
29
|
-
lastName?: string | null;
|
|
17
|
+
export interface AccessRequestResponse {
|
|
30
18
|
/**
|
|
31
|
-
*
|
|
32
|
-
* @type {
|
|
33
|
-
* @memberof
|
|
19
|
+
* When this member's request was recorded. A repeat inside the daily window returns the original request and sends no second email.
|
|
20
|
+
* @type {Date}
|
|
21
|
+
* @memberof AccessRequestResponse
|
|
34
22
|
*/
|
|
35
|
-
|
|
23
|
+
requestedAt: Date;
|
|
36
24
|
}
|
|
37
|
-
export declare const
|
|
25
|
+
export declare const AccessRequestResponsePropertyValidationAttributesMap: {
|
|
38
26
|
[property: string]: {
|
|
39
27
|
maxLength?: number;
|
|
40
28
|
minLength?: number;
|
|
@@ -50,10 +38,10 @@ export declare const OnboardingProfileRequestPropertyValidationAttributesMap: {
|
|
|
50
38
|
};
|
|
51
39
|
};
|
|
52
40
|
/**
|
|
53
|
-
* Check if a given object implements the
|
|
41
|
+
* Check if a given object implements the AccessRequestResponse interface.
|
|
54
42
|
*/
|
|
55
|
-
export declare function
|
|
56
|
-
export declare function
|
|
57
|
-
export declare function
|
|
58
|
-
export declare function
|
|
59
|
-
export declare function
|
|
43
|
+
export declare function instanceOfAccessRequestResponse(value: object): value is AccessRequestResponse;
|
|
44
|
+
export declare function AccessRequestResponseFromJSON(json: any): AccessRequestResponse;
|
|
45
|
+
export declare function AccessRequestResponseFromJSONTyped(json: any, ignoreDiscriminator: boolean): AccessRequestResponse;
|
|
46
|
+
export declare function AccessRequestResponseToJSON(json: any): AccessRequestResponse;
|
|
47
|
+
export declare function AccessRequestResponseToJSONTyped(value?: AccessRequestResponse | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -11,41 +11,34 @@
|
|
|
11
11
|
* https://openapi-generator.tech
|
|
12
12
|
* Do not edit the class manually.
|
|
13
13
|
*/
|
|
14
|
-
export const
|
|
15
|
-
description: {
|
|
16
|
-
maxLength: 5000,
|
|
17
|
-
},
|
|
18
|
-
industry: {
|
|
19
|
-
maxLength: 120,
|
|
20
|
-
},
|
|
21
|
-
};
|
|
14
|
+
export const AccessRequestResponsePropertyValidationAttributesMap = {};
|
|
22
15
|
/**
|
|
23
|
-
* Check if a given object implements the
|
|
16
|
+
* Check if a given object implements the AccessRequestResponse interface.
|
|
24
17
|
*/
|
|
25
|
-
export function
|
|
18
|
+
export function instanceOfAccessRequestResponse(value) {
|
|
19
|
+
if (!('requestedAt' in value) || value['requestedAt'] === undefined)
|
|
20
|
+
return false;
|
|
26
21
|
return true;
|
|
27
22
|
}
|
|
28
|
-
export function
|
|
29
|
-
return
|
|
23
|
+
export function AccessRequestResponseFromJSON(json) {
|
|
24
|
+
return AccessRequestResponseFromJSONTyped(json, false);
|
|
30
25
|
}
|
|
31
|
-
export function
|
|
26
|
+
export function AccessRequestResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
32
27
|
if (json == null) {
|
|
33
28
|
return json;
|
|
34
29
|
}
|
|
35
30
|
return {
|
|
36
|
-
'
|
|
37
|
-
'industry': json['industry'] == null ? undefined : json['industry'],
|
|
31
|
+
'requestedAt': (new Date(json['requested_at'])),
|
|
38
32
|
};
|
|
39
33
|
}
|
|
40
|
-
export function
|
|
41
|
-
return
|
|
34
|
+
export function AccessRequestResponseToJSON(json) {
|
|
35
|
+
return AccessRequestResponseToJSONTyped(json, false);
|
|
42
36
|
}
|
|
43
|
-
export function
|
|
37
|
+
export function AccessRequestResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
44
38
|
if (value == null) {
|
|
45
39
|
return value;
|
|
46
40
|
}
|
|
47
41
|
return {
|
|
48
|
-
'
|
|
49
|
-
'industry': value['industry'],
|
|
42
|
+
'requested_at': value['requestedAt'].toISOString(),
|
|
50
43
|
};
|
|
51
44
|
}
|