@knowledge-stack/ksapi 3.10.2 → 3.12.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/.openapi-generator/FILES +26 -4
  2. package/README.md +18 -6
  3. package/dist/apis/AuthApi.d.ts +12 -9
  4. package/dist/apis/AuthApi.js +5 -2
  5. package/dist/apis/FeedbackApi.d.ts +10 -7
  6. package/dist/apis/FeedbackApi.js +5 -2
  7. package/dist/apis/InvitesApi.d.ts +39 -1
  8. package/dist/apis/InvitesApi.js +41 -0
  9. package/dist/apis/UsersApi.d.ts +51 -59
  10. package/dist/apis/UsersApi.js +50 -57
  11. package/dist/esm/apis/AuthApi.d.ts +12 -9
  12. package/dist/esm/apis/AuthApi.js +6 -3
  13. package/dist/esm/apis/FeedbackApi.d.ts +10 -7
  14. package/dist/esm/apis/FeedbackApi.js +5 -2
  15. package/dist/esm/apis/InvitesApi.d.ts +39 -1
  16. package/dist/esm/apis/InvitesApi.js +42 -1
  17. package/dist/esm/apis/UsersApi.d.ts +51 -59
  18. package/dist/esm/apis/UsersApi.js +51 -58
  19. package/dist/esm/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
  20. package/dist/esm/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +13 -20
  21. package/dist/esm/models/AddedBy.d.ts +25 -0
  22. package/dist/esm/models/AddedBy.js +43 -0
  23. package/dist/esm/models/CreatePasswordUserRequest.d.ts +6 -0
  24. package/dist/esm/models/CreatePasswordUserRequest.js +2 -0
  25. package/dist/esm/models/ErrorResponse.d.ts +2 -0
  26. package/dist/esm/models/ErrorResponse.js +2 -0
  27. package/dist/esm/models/FeaturesResponse.d.ts +7 -0
  28. package/dist/esm/models/FeaturesResponse.js +5 -0
  29. package/dist/esm/models/GuideModuleProgress.d.ts +66 -0
  30. package/dist/{models/OnboardingProfileRequest.js → esm/models/GuideModuleProgress.js} +31 -25
  31. package/dist/esm/models/GuideModuleStatus.d.ts +26 -0
  32. package/dist/esm/models/GuideModuleStatus.js +44 -0
  33. package/dist/esm/models/GuideModules.d.ts +126 -0
  34. package/dist/esm/models/GuideModules.js +69 -0
  35. package/dist/esm/models/InvitePreviewResponse.d.ts +80 -0
  36. package/dist/esm/models/InvitePreviewResponse.js +57 -0
  37. package/dist/esm/models/InvitePreviewState.d.ts +28 -0
  38. package/dist/esm/models/InvitePreviewState.js +46 -0
  39. package/dist/esm/models/InviteRejection.d.ts +30 -0
  40. package/dist/esm/models/InviteRejection.js +48 -0
  41. package/dist/esm/models/KbSummaryResponse.d.ts +8 -0
  42. package/dist/esm/models/KbSummaryResponse.js +4 -0
  43. package/dist/esm/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
  44. package/dist/esm/models/{OnboardingProfileRequest.js → OnboardingState.js} +17 -19
  45. package/dist/esm/models/OnboardingStateUpdate.d.ts +61 -0
  46. package/dist/esm/models/OnboardingStateUpdate.js +48 -0
  47. package/dist/esm/models/OnboardingStep.d.ts +27 -0
  48. package/dist/esm/models/OnboardingStep.js +45 -0
  49. package/dist/esm/models/SignUpResponse.d.ts +174 -0
  50. package/dist/esm/models/SignUpResponse.js +107 -0
  51. package/dist/esm/models/TenantResponse.d.ts +7 -0
  52. package/dist/esm/models/TenantResponse.js +5 -0
  53. package/dist/esm/models/TenantUserJoinMethod.d.ts +26 -0
  54. package/dist/esm/models/TenantUserJoinMethod.js +44 -0
  55. package/dist/esm/models/UserResponse.d.ts +40 -0
  56. package/dist/esm/models/UserResponse.js +18 -0
  57. package/dist/esm/models/index.d.ts +13 -2
  58. package/dist/esm/models/index.js +13 -2
  59. package/dist/models/{OnboardingProfileRequest.d.ts → AccessRequestResponse.d.ts} +14 -26
  60. package/dist/models/{OnboardingCompanyRequest.js → AccessRequestResponse.js} +19 -26
  61. package/dist/models/AddedBy.d.ts +25 -0
  62. package/dist/models/AddedBy.js +51 -0
  63. package/dist/models/CreatePasswordUserRequest.d.ts +6 -0
  64. package/dist/models/CreatePasswordUserRequest.js +2 -0
  65. package/dist/models/ErrorResponse.d.ts +2 -0
  66. package/dist/models/ErrorResponse.js +2 -0
  67. package/dist/models/FeaturesResponse.d.ts +7 -0
  68. package/dist/models/FeaturesResponse.js +5 -0
  69. package/dist/models/GuideModuleProgress.d.ts +66 -0
  70. package/dist/models/GuideModuleProgress.js +72 -0
  71. package/dist/models/GuideModuleStatus.d.ts +26 -0
  72. package/dist/models/GuideModuleStatus.js +52 -0
  73. package/dist/models/GuideModules.d.ts +126 -0
  74. package/dist/models/GuideModules.js +77 -0
  75. package/dist/models/InvitePreviewResponse.d.ts +80 -0
  76. package/dist/models/InvitePreviewResponse.js +65 -0
  77. package/dist/models/InvitePreviewState.d.ts +28 -0
  78. package/dist/models/InvitePreviewState.js +54 -0
  79. package/dist/models/InviteRejection.d.ts +30 -0
  80. package/dist/models/InviteRejection.js +56 -0
  81. package/dist/models/KbSummaryResponse.d.ts +8 -0
  82. package/dist/models/KbSummaryResponse.js +4 -0
  83. package/dist/models/{OnboardingCompanyRequest.d.ts → OnboardingState.d.ts} +26 -18
  84. package/dist/models/OnboardingState.js +56 -0
  85. package/dist/models/OnboardingStateUpdate.d.ts +61 -0
  86. package/dist/models/OnboardingStateUpdate.js +56 -0
  87. package/dist/models/OnboardingStep.d.ts +27 -0
  88. package/dist/models/OnboardingStep.js +53 -0
  89. package/dist/models/SignUpResponse.d.ts +174 -0
  90. package/dist/models/SignUpResponse.js +115 -0
  91. package/dist/models/TenantResponse.d.ts +7 -0
  92. package/dist/models/TenantResponse.js +5 -0
  93. package/dist/models/TenantUserJoinMethod.d.ts +26 -0
  94. package/dist/models/TenantUserJoinMethod.js +52 -0
  95. package/dist/models/UserResponse.d.ts +40 -0
  96. package/dist/models/UserResponse.js +18 -0
  97. package/dist/models/index.d.ts +13 -2
  98. package/dist/models/index.js +13 -2
  99. package/docs/{OnboardingCompanyRequest.md → AccessRequestResponse.md} +6 -9
  100. package/docs/{OnboardingProfileRequest.md → AddedBy.md} +4 -11
  101. package/docs/AuthApi.md +8 -5
  102. package/docs/CreatePasswordUserRequest.md +2 -0
  103. package/docs/FeaturesResponse.md +2 -0
  104. package/docs/FeedbackApi.md +8 -5
  105. package/docs/GuideModuleProgress.md +40 -0
  106. package/docs/GuideModuleStatus.md +32 -0
  107. package/docs/GuideModules.md +60 -0
  108. package/docs/InvitePreviewResponse.md +44 -0
  109. package/docs/InvitePreviewState.md +32 -0
  110. package/docs/InviteRejection.md +32 -0
  111. package/docs/InvitesApi.md +70 -0
  112. package/docs/KbSummaryResponse.md +2 -0
  113. package/docs/OnboardingState.md +39 -0
  114. package/docs/OnboardingStateUpdate.md +38 -0
  115. package/docs/OnboardingStep.md +32 -0
  116. package/docs/SignUpResponse.md +74 -0
  117. package/docs/TenantResponse.md +2 -0
  118. package/docs/TenantUserJoinMethod.md +32 -0
  119. package/docs/UserResponse.md +12 -0
  120. package/docs/UsersApi.md +36 -47
  121. package/package.json +1 -1
  122. package/src/apis/AuthApi.ts +20 -10
  123. package/src/apis/FeedbackApi.ts +14 -7
  124. package/src/apis/InvitesApi.ts +78 -0
  125. package/src/apis/UsersApi.ts +91 -110
  126. package/src/models/{OnboardingCompanyRequest.ts → AccessRequestResponse.ts} +19 -32
  127. package/src/models/AddedBy.ts +53 -0
  128. package/src/models/CreatePasswordUserRequest.ts +8 -0
  129. package/src/models/ErrorResponse.ts +2 -0
  130. package/src/models/FeaturesResponse.ts +16 -0
  131. package/src/models/GuideModuleProgress.ts +127 -0
  132. package/src/models/GuideModuleStatus.ts +54 -0
  133. package/src/models/GuideModules.ts +194 -0
  134. package/src/models/InvitePreviewResponse.ts +147 -0
  135. package/src/models/InvitePreviewState.ts +56 -0
  136. package/src/models/InviteRejection.ts +58 -0
  137. package/src/models/KbSummaryResponse.ts +9 -0
  138. package/src/models/{OnboardingProfileRequest.ts → OnboardingState.ts} +47 -33
  139. package/src/models/OnboardingStateUpdate.ts +115 -0
  140. package/src/models/OnboardingStep.ts +55 -0
  141. package/src/models/SignUpResponse.ts +303 -0
  142. package/src/models/TenantResponse.ts +16 -0
  143. package/src/models/TenantUserJoinMethod.ts +54 -0
  144. package/src/models/UserResponse.ts +77 -0
  145. package/src/models/index.ts +13 -2
@@ -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 { OnboardingCompanyRequest, OnboardingProfileRequest, UpdateUserRequest, UserResponse } from '../models/index';
13
+ import type { AccessRequestResponse, OnboardingStateUpdate, UpdateUserRequest, UserResponse } from '../models/index';
14
14
  export interface UpdateMeRequest {
15
15
  updateUserRequest: UpdateUserRequest;
16
16
  }
17
- export interface UpdateOnboardingCompanyRequest {
18
- onboardingCompanyRequest: OnboardingCompanyRequest;
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 updateOnboardingCompany without sending the request
113
- * @param {OnboardingCompanyRequest} onboardingCompanyRequest
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
- updateOnboardingCompanyRequestOpts(requestParameters: UpdateOnboardingCompanyRequest): Promise<runtime.RequestOpts>;
133
+ updateOnboardingStateRequestOpts(requestParameters: UpdateOnboardingStateRequest): Promise<runtime.RequestOpts>;
118
134
  /**
119
- * 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}.
120
- * @summary Update Onboarding Company Handler
121
- * @param {OnboardingCompanyRequest} onboardingCompanyRequest
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
- updateOnboardingCompanyRaw(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
142
+ updateOnboardingStateRaw(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
127
143
  /**
128
- * 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}.
129
- * Update Onboarding Company Handler
144
+ * Update Onboarding State Handler
130
145
  */
131
- updateOnboardingCompany(requestParameters: UpdateOnboardingCompanyRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
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 updateOnboardingCompany without sending the request
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
- updateOnboardingProfileRequestOpts(requestParameters: UpdateOnboardingProfileRequest): Promise<runtime.RequestOpts>;
246
+ updateOnboardingStateRequestOpts(requestParameters: UpdateOnboardingStateRequest): Promise<runtime.RequestOpts>;
253
247
  /**
254
- * 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.
255
- * Update Onboarding Profile Handler
248
+ * Update Onboarding State Handler
256
249
  */
257
- updateOnboardingProfileRaw(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
250
+ updateOnboardingStateRaw(requestParameters: UpdateOnboardingStateRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<UserResponse>>;
258
251
  /**
259
- * 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.
260
- * Update Onboarding Profile Handler
252
+ * Update Onboarding State Handler
261
253
  */
262
- updateOnboardingProfile(requestParameters: UpdateOnboardingProfileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<UserResponse>;
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 { OnboardingCompanyRequestToJSON, OnboardingProfileRequestToJSON, UpdateUserRequestToJSON, UserResponseFromJSON, } from '../models/index';
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 skipOnboarding without sending the request
118
+ * Creates request options for requestAccess without sending the request
119
119
  */
120
- skipOnboardingRequestOpts() {
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/onboarding/skip`;
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
- * 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).
142
- * Skip Onboarding Handler
141
+ * Email the owner and admins for access; one request per member per day.
142
+ * Request Access Handler
143
143
  */
144
- skipOnboardingRaw(initOverrides) {
144
+ requestAccessRaw(initOverrides) {
145
145
  return __awaiter(this, void 0, void 0, function* () {
146
- const requestOptions = yield this.skipOnboardingRequestOpts();
146
+ const requestOptions = yield this.requestAccessRequestOpts();
147
147
  const response = yield this.request(requestOptions, initOverrides);
148
- return new runtime.JSONApiResponse(response, (jsonValue) => UserResponseFromJSON(jsonValue));
148
+ return new runtime.JSONApiResponse(response, (jsonValue) => AccessRequestResponseFromJSON(jsonValue));
149
149
  });
150
150
  }
151
151
  /**
152
- * 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).
153
- * Skip Onboarding Handler
152
+ * Email the owner and admins for access; one request per member per day.
153
+ * Request Access Handler
154
154
  */
155
- skipOnboarding(initOverrides) {
155
+ requestAccess(initOverrides) {
156
156
  return __awaiter(this, void 0, void 0, function* () {
157
- const response = yield this.skipOnboardingRaw(initOverrides);
157
+ const response = yield this.requestAccessRaw(initOverrides);
158
158
  return yield response.value();
159
159
  });
160
160
  }
161
161
  /**
162
- * Creates request options for updateMe without sending the request
162
+ * Creates request options for skipOnboarding without sending the request
163
163
  */
164
- updateMeRequestOpts(requestParameters) {
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: 'PATCH',
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
- * 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.
191
- * Update Me Handler
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
- updateMeRaw(requestParameters, initOverrides) {
188
+ skipOnboardingRaw(initOverrides) {
194
189
  return __awaiter(this, void 0, void 0, function* () {
195
- const requestOptions = yield this.updateMeRequestOpts(requestParameters);
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
- * 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.
202
- * Update Me Handler
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
- updateMe(requestParameters, initOverrides) {
199
+ skipOnboarding(initOverrides) {
205
200
  return __awaiter(this, void 0, void 0, function* () {
206
- const response = yield this.updateMeRaw(requestParameters, initOverrides);
201
+ const response = yield this.skipOnboardingRaw(initOverrides);
207
202
  return yield response.value();
208
203
  });
209
204
  }
210
205
  /**
211
- * Creates request options for updateOnboardingCompany without sending the request
206
+ * Creates request options for updateMe without sending the request
212
207
  */
213
- updateOnboardingCompanyRequestOpts(requestParameters) {
208
+ updateMeRequestOpts(requestParameters) {
214
209
  return __awaiter(this, void 0, void 0, function* () {
215
- if (requestParameters['onboardingCompanyRequest'] == null) {
216
- throw new runtime.RequiredError('onboardingCompanyRequest', 'Required parameter "onboardingCompanyRequest" was null or undefined when calling updateOnboardingCompany().');
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/me/onboarding/company`;
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: OnboardingCompanyRequestToJSON(requestParameters['onboardingCompanyRequest']),
229
+ body: UpdateUserRequestToJSON(requestParameters['updateUserRequest']),
235
230
  };
236
231
  });
237
232
  }
238
233
  /**
239
- * 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}.
240
- * Update Onboarding Company Handler
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
- updateOnboardingCompanyRaw(requestParameters, initOverrides) {
237
+ updateMeRaw(requestParameters, initOverrides) {
243
238
  return __awaiter(this, void 0, void 0, function* () {
244
- const requestOptions = yield this.updateOnboardingCompanyRequestOpts(requestParameters);
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
- * 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}.
251
- * Update Onboarding Company Handler
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
- updateOnboardingCompany(requestParameters, initOverrides) {
248
+ updateMe(requestParameters, initOverrides) {
254
249
  return __awaiter(this, void 0, void 0, function* () {
255
- const response = yield this.updateOnboardingCompanyRaw(requestParameters, initOverrides);
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 updateOnboardingProfile without sending the request
255
+ * Creates request options for updateOnboardingState without sending the request
261
256
  */
262
- updateOnboardingProfileRequestOpts(requestParameters) {
257
+ updateOnboardingStateRequestOpts(requestParameters) {
263
258
  return __awaiter(this, void 0, void 0, function* () {
264
- if (requestParameters['onboardingProfileRequest'] == null) {
265
- throw new runtime.RequiredError('onboardingProfileRequest', 'Required parameter "onboardingProfileRequest" was null or undefined when calling updateOnboardingProfile().');
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/profile`;
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: OnboardingProfileRequestToJSON(requestParameters['onboardingProfileRequest']),
278
+ body: OnboardingStateUpdateToJSON(requestParameters['onboardingStateUpdate']),
284
279
  };
285
280
  });
286
281
  }
287
282
  /**
288
- * 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.
289
- * Update Onboarding Profile Handler
283
+ * Update Onboarding State Handler
290
284
  */
291
- updateOnboardingProfileRaw(requestParameters, initOverrides) {
285
+ updateOnboardingStateRaw(requestParameters, initOverrides) {
292
286
  return __awaiter(this, void 0, void 0, function* () {
293
- const requestOptions = yield this.updateOnboardingProfileRequestOpts(requestParameters);
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
- * 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.
300
- * Update Onboarding Profile Handler
293
+ * Update Onboarding State Handler
301
294
  */
302
- updateOnboardingProfile(requestParameters, initOverrides) {
295
+ updateOnboardingState(requestParameters, initOverrides) {
303
296
  return __awaiter(this, void 0, void 0, function* () {
304
- const response = yield this.updateOnboardingProfileRaw(requestParameters, initOverrides);
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
- * Step 2 of onboarding — per-user info for the current tenant.
13
+ *
14
14
  * @export
15
- * @interface OnboardingProfileRequest
15
+ * @interface AccessRequestResponse
16
16
  */
17
- export interface OnboardingProfileRequest {
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
- * What the user does at this tenant
32
- * @type {string}
33
- * @memberof OnboardingProfileRequest
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
- jobTitle?: string | null;
23
+ requestedAt: Date;
36
24
  }
37
- export declare const OnboardingProfileRequestPropertyValidationAttributesMap: {
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 OnboardingProfileRequest interface.
41
+ * Check if a given object implements the AccessRequestResponse interface.
54
42
  */
55
- export declare function instanceOfOnboardingProfileRequest(value: object): value is OnboardingProfileRequest;
56
- export declare function OnboardingProfileRequestFromJSON(json: any): OnboardingProfileRequest;
57
- export declare function OnboardingProfileRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): OnboardingProfileRequest;
58
- export declare function OnboardingProfileRequestToJSON(json: any): OnboardingProfileRequest;
59
- export declare function OnboardingProfileRequestToJSONTyped(value?: OnboardingProfileRequest | null, ignoreDiscriminator?: boolean): any;
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 OnboardingCompanyRequestPropertyValidationAttributesMap = {
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 OnboardingCompanyRequest interface.
16
+ * Check if a given object implements the AccessRequestResponse interface.
24
17
  */
25
- export function instanceOfOnboardingCompanyRequest(value) {
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 OnboardingCompanyRequestFromJSON(json) {
29
- return OnboardingCompanyRequestFromJSONTyped(json, false);
23
+ export function AccessRequestResponseFromJSON(json) {
24
+ return AccessRequestResponseFromJSONTyped(json, false);
30
25
  }
31
- export function OnboardingCompanyRequestFromJSONTyped(json, ignoreDiscriminator) {
26
+ export function AccessRequestResponseFromJSONTyped(json, ignoreDiscriminator) {
32
27
  if (json == null) {
33
28
  return json;
34
29
  }
35
30
  return {
36
- 'description': json['description'] == null ? undefined : json['description'],
37
- 'industry': json['industry'] == null ? undefined : json['industry'],
31
+ 'requestedAt': (new Date(json['requested_at'])),
38
32
  };
39
33
  }
40
- export function OnboardingCompanyRequestToJSON(json) {
41
- return OnboardingCompanyRequestToJSONTyped(json, false);
34
+ export function AccessRequestResponseToJSON(json) {
35
+ return AccessRequestResponseToJSONTyped(json, false);
42
36
  }
43
- export function OnboardingCompanyRequestToJSONTyped(value, ignoreDiscriminator = false) {
37
+ export function AccessRequestResponseToJSONTyped(value, ignoreDiscriminator = false) {
44
38
  if (value == null) {
45
39
  return value;
46
40
  }
47
41
  return {
48
- 'description': value['description'],
49
- 'industry': value['industry'],
42
+ 'requested_at': value['requestedAt'].toISOString(),
50
43
  };
51
44
  }