@knowledge-stack/ksapi 1.87.1 → 1.88.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 (92) hide show
  1. package/.openapi-generator/FILES +18 -0
  2. package/README.md +16 -2
  3. package/dist/apis/AuthApi.d.ts +218 -13
  4. package/dist/apis/AuthApi.js +224 -6
  5. package/dist/esm/apis/AuthApi.d.ts +218 -13
  6. package/dist/esm/apis/AuthApi.js +225 -7
  7. package/dist/esm/models/ChangePhoneNumberRequest.d.ts +53 -0
  8. package/dist/esm/models/ChangePhoneNumberRequest.js +48 -0
  9. package/dist/esm/models/CreatePhonePasswordUserRequest.d.ts +71 -0
  10. package/dist/esm/models/CreatePhonePasswordUserRequest.js +60 -0
  11. package/dist/esm/models/FeaturesResponse.d.ts +6 -0
  12. package/dist/esm/models/FeaturesResponse.js +4 -0
  13. package/dist/esm/models/PasswordResetTokenResponse.d.ts +47 -0
  14. package/dist/esm/models/PasswordResetTokenResponse.js +44 -0
  15. package/dist/esm/models/PasswordResetWithTokenRequest.d.ts +2 -2
  16. package/dist/esm/models/PasswordResetWithTokenRequest.js +3 -3
  17. package/dist/esm/models/PhoneValidationResponse.d.ts +47 -0
  18. package/dist/esm/models/PhoneValidationResponse.js +44 -0
  19. package/dist/esm/models/PhoneVerificationRequest.d.ts +47 -0
  20. package/dist/esm/models/PhoneVerificationRequest.js +44 -0
  21. package/dist/esm/models/RequestPhoneChangeRequest.d.ts +47 -0
  22. package/dist/esm/models/RequestPhoneChangeRequest.js +44 -0
  23. package/dist/esm/models/ResponseSendPwResetEmail.d.ts +53 -0
  24. package/dist/esm/models/ResponseSendPwResetEmail.js +48 -0
  25. package/dist/esm/models/SendPasswordResetRequest.d.ts +67 -0
  26. package/dist/esm/models/SendPasswordResetRequest.js +53 -0
  27. package/dist/esm/models/SignInRequest.d.ts +3 -3
  28. package/dist/esm/models/SignInRequest.js +3 -3
  29. package/dist/esm/models/UserResponse.d.ts +6 -0
  30. package/dist/esm/models/UserResponse.js +2 -0
  31. package/dist/esm/models/ValidateResetCodeRequest.d.ts +53 -0
  32. package/dist/esm/models/ValidateResetCodeRequest.js +48 -0
  33. package/dist/esm/models/index.d.ts +9 -0
  34. package/dist/esm/models/index.js +9 -0
  35. package/dist/models/ChangePhoneNumberRequest.d.ts +53 -0
  36. package/dist/models/ChangePhoneNumberRequest.js +56 -0
  37. package/dist/models/CreatePhonePasswordUserRequest.d.ts +71 -0
  38. package/dist/models/CreatePhonePasswordUserRequest.js +68 -0
  39. package/dist/models/FeaturesResponse.d.ts +6 -0
  40. package/dist/models/FeaturesResponse.js +4 -0
  41. package/dist/models/PasswordResetTokenResponse.d.ts +47 -0
  42. package/dist/models/PasswordResetTokenResponse.js +52 -0
  43. package/dist/models/PasswordResetWithTokenRequest.d.ts +2 -2
  44. package/dist/models/PasswordResetWithTokenRequest.js +3 -3
  45. package/dist/models/PhoneValidationResponse.d.ts +47 -0
  46. package/dist/models/PhoneValidationResponse.js +52 -0
  47. package/dist/models/PhoneVerificationRequest.d.ts +47 -0
  48. package/dist/models/PhoneVerificationRequest.js +52 -0
  49. package/dist/models/RequestPhoneChangeRequest.d.ts +47 -0
  50. package/dist/models/RequestPhoneChangeRequest.js +52 -0
  51. package/dist/models/ResponseSendPwResetEmail.d.ts +53 -0
  52. package/dist/models/ResponseSendPwResetEmail.js +56 -0
  53. package/dist/models/SendPasswordResetRequest.d.ts +67 -0
  54. package/dist/models/SendPasswordResetRequest.js +61 -0
  55. package/dist/models/SignInRequest.d.ts +3 -3
  56. package/dist/models/SignInRequest.js +3 -3
  57. package/dist/models/UserResponse.d.ts +6 -0
  58. package/dist/models/UserResponse.js +2 -0
  59. package/dist/models/ValidateResetCodeRequest.d.ts +53 -0
  60. package/dist/models/ValidateResetCodeRequest.js +56 -0
  61. package/dist/models/index.d.ts +9 -0
  62. package/dist/models/index.js +9 -0
  63. package/docs/AuthApi.md +365 -6
  64. package/docs/ChangePhoneNumberRequest.md +37 -0
  65. package/docs/CreatePhonePasswordUserRequest.md +43 -0
  66. package/docs/FeaturesResponse.md +2 -0
  67. package/docs/PasswordResetTokenResponse.md +34 -0
  68. package/docs/PasswordResetWithTokenRequest.md +2 -2
  69. package/docs/PhoneValidationResponse.md +34 -0
  70. package/docs/PhoneVerificationRequest.md +34 -0
  71. package/docs/RequestPhoneChangeRequest.md +34 -0
  72. package/docs/ResponseSendPwResetEmail.md +36 -0
  73. package/docs/SendPasswordResetRequest.md +38 -0
  74. package/docs/SignInRequest.md +3 -2
  75. package/docs/UserResponse.md +2 -0
  76. package/docs/ValidateResetCodeRequest.md +36 -0
  77. package/package.json +1 -1
  78. package/src/apis/AuthApi.ts +452 -17
  79. package/src/models/ChangePhoneNumberRequest.ts +92 -0
  80. package/src/models/CreatePhonePasswordUserRequest.ts +120 -0
  81. package/src/models/FeaturesResponse.ts +9 -0
  82. package/src/models/PasswordResetTokenResponse.ts +83 -0
  83. package/src/models/PasswordResetWithTokenRequest.ts +5 -5
  84. package/src/models/PhoneValidationResponse.ts +83 -0
  85. package/src/models/PhoneVerificationRequest.ts +83 -0
  86. package/src/models/RequestPhoneChangeRequest.ts +83 -0
  87. package/src/models/ResponseSendPwResetEmail.ts +107 -0
  88. package/src/models/SendPasswordResetRequest.ts +109 -0
  89. package/src/models/SignInRequest.ts +6 -6
  90. package/src/models/UserResponse.ts +8 -0
  91. package/src/models/ValidateResetCodeRequest.ts +92 -0
  92. package/src/models/index.ts +9 -0
@@ -10,6 +10,7 @@ export * from './AskRequest';
10
10
  export * from './AskResponse';
11
11
  export * from './BrandingLogoType';
12
12
  export * from './BulkTagRequest';
13
+ export * from './ChangePhoneNumberRequest';
13
14
  export * from './ChangeSubscriptionRequest';
14
15
  export * from './CheckpointDetails';
15
16
  export * from './ChunkBulkResponse';
@@ -34,6 +35,7 @@ export * from './CreateGroupPermissionRequest';
34
35
  export * from './CreateGroupRequest';
35
36
  export * from './CreatePasswordUserRequest';
36
37
  export * from './CreatePermissionRequest';
38
+ export * from './CreatePhonePasswordUserRequest';
37
39
  export * from './CreateSectionRequest';
38
40
  export * from './CreateTagRequest';
39
41
  export * from './CreateThreadMessageRequest';
@@ -122,6 +124,7 @@ export * from './PaginatedResponseWorkflowRunResponse';
122
124
  export * from './PaginatedResponseWorkflowSummaryResponse';
123
125
  export * from './PartType';
124
126
  export * from './PasswordResetRequest';
127
+ export * from './PasswordResetTokenResponse';
125
128
  export * from './PasswordResetWithTokenRequest';
126
129
  export * from './PathOrder';
127
130
  export * from './PathPartAncestorItem';
@@ -131,14 +134,18 @@ export * from './PathPartResponse';
131
134
  export * from './PathPartTagsResponse';
132
135
  export * from './PermissionCapability';
133
136
  export * from './PermissionResponse';
137
+ export * from './PhoneValidationResponse';
138
+ export * from './PhoneVerificationRequest';
134
139
  export * from './PipelineState';
135
140
  export * from './PipelineStatus';
136
141
  export * from './Polygon';
137
142
  export * from './PolygonReference';
138
143
  export * from './ReferenceType';
139
144
  export * from './RejectFileRequest';
145
+ export * from './RequestPhoneChangeRequest';
140
146
  export * from './ResolvedReferenceInput';
141
147
  export * from './ResolvedReferenceOutput';
148
+ export * from './ResponseSendPwResetEmail';
142
149
  export * from './RootResponse';
143
150
  export * from './SSOInitiateResponse';
144
151
  export * from './ScoredChunkResponse';
@@ -152,6 +159,7 @@ export * from './SectionResponse';
152
159
  export * from './SectionSystemMetadata';
153
160
  export * from './SelfHostedRunnerConfig';
154
161
  export * from './SelfHostedRunnerConfigResponse';
162
+ export * from './SendPasswordResetRequest';
155
163
  export * from './SignInRequest';
156
164
  export * from './StepInput';
157
165
  export * from './StepKind';
@@ -196,6 +204,7 @@ export * from './UsageMetric';
196
204
  export * from './UserMessageRequest';
197
205
  export * from './UserMessageResponse';
198
206
  export * from './UserResponse';
207
+ export * from './ValidateResetCodeRequest';
199
208
  export * from './ValidationError';
200
209
  export * from './VersionChunkIdsResponse';
201
210
  export * from './WorkflowActionResponse';
@@ -28,6 +28,7 @@ __exportStar(require("./AskRequest"), exports);
28
28
  __exportStar(require("./AskResponse"), exports);
29
29
  __exportStar(require("./BrandingLogoType"), exports);
30
30
  __exportStar(require("./BulkTagRequest"), exports);
31
+ __exportStar(require("./ChangePhoneNumberRequest"), exports);
31
32
  __exportStar(require("./ChangeSubscriptionRequest"), exports);
32
33
  __exportStar(require("./CheckpointDetails"), exports);
33
34
  __exportStar(require("./ChunkBulkResponse"), exports);
@@ -52,6 +53,7 @@ __exportStar(require("./CreateGroupPermissionRequest"), exports);
52
53
  __exportStar(require("./CreateGroupRequest"), exports);
53
54
  __exportStar(require("./CreatePasswordUserRequest"), exports);
54
55
  __exportStar(require("./CreatePermissionRequest"), exports);
56
+ __exportStar(require("./CreatePhonePasswordUserRequest"), exports);
55
57
  __exportStar(require("./CreateSectionRequest"), exports);
56
58
  __exportStar(require("./CreateTagRequest"), exports);
57
59
  __exportStar(require("./CreateThreadMessageRequest"), exports);
@@ -140,6 +142,7 @@ __exportStar(require("./PaginatedResponseWorkflowRunResponse"), exports);
140
142
  __exportStar(require("./PaginatedResponseWorkflowSummaryResponse"), exports);
141
143
  __exportStar(require("./PartType"), exports);
142
144
  __exportStar(require("./PasswordResetRequest"), exports);
145
+ __exportStar(require("./PasswordResetTokenResponse"), exports);
143
146
  __exportStar(require("./PasswordResetWithTokenRequest"), exports);
144
147
  __exportStar(require("./PathOrder"), exports);
145
148
  __exportStar(require("./PathPartAncestorItem"), exports);
@@ -149,14 +152,18 @@ __exportStar(require("./PathPartResponse"), exports);
149
152
  __exportStar(require("./PathPartTagsResponse"), exports);
150
153
  __exportStar(require("./PermissionCapability"), exports);
151
154
  __exportStar(require("./PermissionResponse"), exports);
155
+ __exportStar(require("./PhoneValidationResponse"), exports);
156
+ __exportStar(require("./PhoneVerificationRequest"), exports);
152
157
  __exportStar(require("./PipelineState"), exports);
153
158
  __exportStar(require("./PipelineStatus"), exports);
154
159
  __exportStar(require("./Polygon"), exports);
155
160
  __exportStar(require("./PolygonReference"), exports);
156
161
  __exportStar(require("./ReferenceType"), exports);
157
162
  __exportStar(require("./RejectFileRequest"), exports);
163
+ __exportStar(require("./RequestPhoneChangeRequest"), exports);
158
164
  __exportStar(require("./ResolvedReferenceInput"), exports);
159
165
  __exportStar(require("./ResolvedReferenceOutput"), exports);
166
+ __exportStar(require("./ResponseSendPwResetEmail"), exports);
160
167
  __exportStar(require("./RootResponse"), exports);
161
168
  __exportStar(require("./SSOInitiateResponse"), exports);
162
169
  __exportStar(require("./ScoredChunkResponse"), exports);
@@ -170,6 +177,7 @@ __exportStar(require("./SectionResponse"), exports);
170
177
  __exportStar(require("./SectionSystemMetadata"), exports);
171
178
  __exportStar(require("./SelfHostedRunnerConfig"), exports);
172
179
  __exportStar(require("./SelfHostedRunnerConfigResponse"), exports);
180
+ __exportStar(require("./SendPasswordResetRequest"), exports);
173
181
  __exportStar(require("./SignInRequest"), exports);
174
182
  __exportStar(require("./StepInput"), exports);
175
183
  __exportStar(require("./StepKind"), exports);
@@ -214,6 +222,7 @@ __exportStar(require("./UsageMetric"), exports);
214
222
  __exportStar(require("./UserMessageRequest"), exports);
215
223
  __exportStar(require("./UserMessageResponse"), exports);
216
224
  __exportStar(require("./UserResponse"), exports);
225
+ __exportStar(require("./ValidateResetCodeRequest"), exports);
217
226
  __exportStar(require("./ValidationError"), exports);
218
227
  __exportStar(require("./VersionChunkIdsResponse"), exports);
219
228
  __exportStar(require("./WorkflowActionResponse"), exports);
package/docs/AuthApi.md CHANGED
@@ -4,22 +4,101 @@ All URIs are relative to *http://localhost:8000*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**changePhoneNumber**](AuthApi.md#changephonenumberoperation) | **PUT** /v1/auth/pw/me/phone_number | Change Phone Number Handler |
7
8
  | [**createPasswordUser**](AuthApi.md#createpassworduseroperation) | **POST** /v1/auth/pw/user | Create Password User Handler |
9
+ | [**createPhonePasswordUser**](AuthApi.md#createphonepassworduseroperation) | **POST** /v1/auth/pw/phone_user | Create Phone Password User Handler |
8
10
  | [**fanweiDirectorySync**](AuthApi.md#fanweidirectorysync) | **POST** /v1/auth/sso/{tenant_id}/directory_sync | Directory Sync Handler |
9
11
  | [**fanweiDirectorySync_0**](AuthApi.md#fanweidirectorysync_0) | **POST** /v1/auth/sso/{tenant_id}/directory_sync | Directory Sync Handler |
10
12
  | [**initiateSso**](AuthApi.md#initiatesso) | **POST** /v1/auth/sso/initiate | Initiate Sso Handler |
11
13
  | [**oauth2Callback**](AuthApi.md#oauth2callback) | **GET** /v1/auth/sso/oauth2/callback | Oauth2 Callback Handler |
12
14
  | [**pwEmailVerification**](AuthApi.md#pwemailverification) | **POST** /v1/auth/pw/email_verification | Pw Email Verification Handler |
15
+ | [**pwPhoneVerification**](AuthApi.md#pwphoneverification) | **POST** /v1/auth/pw/phone_verification | Pw Phone Verification Handler |
13
16
  | [**pwSignin**](AuthApi.md#pwsignin) | **POST** /v1/auth/pw/signin | Signin Handler |
14
17
  | [**refreshUat**](AuthApi.md#refreshuat) | **POST** /v1/auth/uat | Refresh Uat Handler |
18
+ | [**requestPhoneChange**](AuthApi.md#requestphonechangeoperation) | **POST** /v1/auth/pw/me/phone_number/verify | Request Phone Change Handler |
15
19
  | [**resetPassword**](AuthApi.md#resetpassword) | **POST** /v1/auth/pw/reset | Reset Password Handler |
16
20
  | [**resetPasswordWithToken**](AuthApi.md#resetpasswordwithtoken) | **POST** /v1/auth/pw/reset_with_token | Reset Password With Token Handler |
17
21
  | [**sendPwResetEmail**](AuthApi.md#sendpwresetemail) | **POST** /v1/auth/pw/send_reset_email | Send Pw Reset Email Handler |
18
22
  | [**signout**](AuthApi.md#signout) | **POST** /v1/auth/signout | Signout Handler |
19
23
  | [**ssoSignin**](AuthApi.md#ssosignin) | **GET** /v1/auth/sso/{tenant_id}/signin | Sso Login Handler |
24
+ | [**validatePwResetCode**](AuthApi.md#validatepwresetcode) | **POST** /v1/auth/pw/validate_reset_code | Validate Reset Code Handler |
20
25
 
21
26
 
22
27
 
28
+ ## changePhoneNumber
29
+
30
+ > UserResponse changePhoneNumber(changePhoneNumberRequest, authorization, ksUat)
31
+
32
+ Change Phone Number Handler
33
+
34
+ Apply a verified phone-number change to the authenticated user. The new phone is read from the Redis validation record pinned by ``/me/phone_number/verify``.
35
+
36
+ ### Example
37
+
38
+ ```ts
39
+ import {
40
+ Configuration,
41
+ AuthApi,
42
+ } from '@knowledge-stack/ksapi';
43
+ import type { ChangePhoneNumberOperationRequest } from '@knowledge-stack/ksapi';
44
+
45
+ async function example() {
46
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
47
+ const api = new AuthApi();
48
+
49
+ const body = {
50
+ // ChangePhoneNumberRequest
51
+ changePhoneNumberRequest: ...,
52
+ // string (optional)
53
+ authorization: authorization_example,
54
+ // string (optional)
55
+ ksUat: ksUat_example,
56
+ } satisfies ChangePhoneNumberOperationRequest;
57
+
58
+ try {
59
+ const data = await api.changePhoneNumber(body);
60
+ console.log(data);
61
+ } catch (error) {
62
+ console.error(error);
63
+ }
64
+ }
65
+
66
+ // Run the test
67
+ example().catch(console.error);
68
+ ```
69
+
70
+ ### Parameters
71
+
72
+
73
+ | Name | Type | Description | Notes |
74
+ |------------- | ------------- | ------------- | -------------|
75
+ | **changePhoneNumberRequest** | [ChangePhoneNumberRequest](ChangePhoneNumberRequest.md) | | |
76
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
77
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
78
+
79
+ ### Return type
80
+
81
+ [**UserResponse**](UserResponse.md)
82
+
83
+ ### Authorization
84
+
85
+ No authorization required
86
+
87
+ ### HTTP request headers
88
+
89
+ - **Content-Type**: `application/json`
90
+ - **Accept**: `application/json`
91
+
92
+
93
+ ### HTTP response details
94
+ | Status code | Description | Response headers |
95
+ |-------------|-------------|------------------|
96
+ | **200** | Successful Response | - |
97
+ | **422** | Validation Error | - |
98
+
99
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
100
+
101
+
23
102
  ## createPasswordUser
24
103
 
25
104
  > UserResponse createPasswordUser(createPasswordUserRequest)
@@ -86,6 +165,74 @@ No authorization required
86
165
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
87
166
 
88
167
 
168
+ ## createPhonePasswordUser
169
+
170
+ > UserResponse createPhonePasswordUser(createPhonePasswordUserRequest)
171
+
172
+ Create Phone Password User Handler
173
+
174
+ Complete phone-based signup using a verified validation code. The phone number is read from the Redis validation record — it was pinned there by ``/phone_verification`` — so the client cannot submit a different phone here than the one it just proved ownership of.
175
+
176
+ ### Example
177
+
178
+ ```ts
179
+ import {
180
+ Configuration,
181
+ AuthApi,
182
+ } from '@knowledge-stack/ksapi';
183
+ import type { CreatePhonePasswordUserOperationRequest } from '@knowledge-stack/ksapi';
184
+
185
+ async function example() {
186
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
187
+ const api = new AuthApi();
188
+
189
+ const body = {
190
+ // CreatePhonePasswordUserRequest
191
+ createPhonePasswordUserRequest: ...,
192
+ } satisfies CreatePhonePasswordUserOperationRequest;
193
+
194
+ try {
195
+ const data = await api.createPhonePasswordUser(body);
196
+ console.log(data);
197
+ } catch (error) {
198
+ console.error(error);
199
+ }
200
+ }
201
+
202
+ // Run the test
203
+ example().catch(console.error);
204
+ ```
205
+
206
+ ### Parameters
207
+
208
+
209
+ | Name | Type | Description | Notes |
210
+ |------------- | ------------- | ------------- | -------------|
211
+ | **createPhonePasswordUserRequest** | [CreatePhonePasswordUserRequest](CreatePhonePasswordUserRequest.md) | | |
212
+
213
+ ### Return type
214
+
215
+ [**UserResponse**](UserResponse.md)
216
+
217
+ ### Authorization
218
+
219
+ No authorization required
220
+
221
+ ### HTTP request headers
222
+
223
+ - **Content-Type**: `application/json`
224
+ - **Accept**: `application/json`
225
+
226
+
227
+ ### HTTP response details
228
+ | Status code | Description | Response headers |
229
+ |-------------|-------------|------------------|
230
+ | **201** | Successful Response | - |
231
+ | **422** | Validation Error | - |
232
+
233
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
234
+
235
+
89
236
  ## fanweiDirectorySync
90
237
 
91
238
  > DirectorySyncResponse fanweiDirectorySync(tenantId, authorization, ksUat)
@@ -456,6 +603,74 @@ No authorization required
456
603
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
457
604
 
458
605
 
606
+ ## pwPhoneVerification
607
+
608
+ > PhoneValidationResponse pwPhoneVerification(phoneVerificationRequest)
609
+
610
+ Pw Phone Verification Handler
611
+
612
+ Send a 6-digit signup verification code to ``phone_number``. Rejects (409) if a user already exists for this phone — this leaks enumeration but matches the duplicate-signup UX of the email flow.
613
+
614
+ ### Example
615
+
616
+ ```ts
617
+ import {
618
+ Configuration,
619
+ AuthApi,
620
+ } from '@knowledge-stack/ksapi';
621
+ import type { PwPhoneVerificationRequest } from '@knowledge-stack/ksapi';
622
+
623
+ async function example() {
624
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
625
+ const api = new AuthApi();
626
+
627
+ const body = {
628
+ // PhoneVerificationRequest
629
+ phoneVerificationRequest: ...,
630
+ } satisfies PwPhoneVerificationRequest;
631
+
632
+ try {
633
+ const data = await api.pwPhoneVerification(body);
634
+ console.log(data);
635
+ } catch (error) {
636
+ console.error(error);
637
+ }
638
+ }
639
+
640
+ // Run the test
641
+ example().catch(console.error);
642
+ ```
643
+
644
+ ### Parameters
645
+
646
+
647
+ | Name | Type | Description | Notes |
648
+ |------------- | ------------- | ------------- | -------------|
649
+ | **phoneVerificationRequest** | [PhoneVerificationRequest](PhoneVerificationRequest.md) | | |
650
+
651
+ ### Return type
652
+
653
+ [**PhoneValidationResponse**](PhoneValidationResponse.md)
654
+
655
+ ### Authorization
656
+
657
+ No authorization required
658
+
659
+ ### HTTP request headers
660
+
661
+ - **Content-Type**: `application/json`
662
+ - **Accept**: `application/json`
663
+
664
+
665
+ ### HTTP response details
666
+ | Status code | Description | Response headers |
667
+ |-------------|-------------|------------------|
668
+ | **200** | Successful Response | - |
669
+ | **422** | Validation Error | - |
670
+
671
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
672
+
673
+
459
674
  ## pwSignin
460
675
 
461
676
  > UserResponse pwSignin(signInRequest)
@@ -598,6 +813,80 @@ No authorization required
598
813
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
599
814
 
600
815
 
816
+ ## requestPhoneChange
817
+
818
+ > PhoneValidationResponse requestPhoneChange(requestPhoneChangeRequest, authorization, ksUat)
819
+
820
+ Request Phone Change Handler
821
+
822
+ Dispatch an SMS code to authorize a phone-number change. Confirms the new phone isn\'t already taken by *another* user. The caller is identified by their UAT, so authentication is required.
823
+
824
+ ### Example
825
+
826
+ ```ts
827
+ import {
828
+ Configuration,
829
+ AuthApi,
830
+ } from '@knowledge-stack/ksapi';
831
+ import type { RequestPhoneChangeOperationRequest } from '@knowledge-stack/ksapi';
832
+
833
+ async function example() {
834
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
835
+ const api = new AuthApi();
836
+
837
+ const body = {
838
+ // RequestPhoneChangeRequest
839
+ requestPhoneChangeRequest: ...,
840
+ // string (optional)
841
+ authorization: authorization_example,
842
+ // string (optional)
843
+ ksUat: ksUat_example,
844
+ } satisfies RequestPhoneChangeOperationRequest;
845
+
846
+ try {
847
+ const data = await api.requestPhoneChange(body);
848
+ console.log(data);
849
+ } catch (error) {
850
+ console.error(error);
851
+ }
852
+ }
853
+
854
+ // Run the test
855
+ example().catch(console.error);
856
+ ```
857
+
858
+ ### Parameters
859
+
860
+
861
+ | Name | Type | Description | Notes |
862
+ |------------- | ------------- | ------------- | -------------|
863
+ | **requestPhoneChangeRequest** | [RequestPhoneChangeRequest](RequestPhoneChangeRequest.md) | | |
864
+ | **authorization** | `string` | | [Optional] [Defaults to `undefined`] |
865
+ | **ksUat** | `string` | | [Optional] [Defaults to `undefined`] |
866
+
867
+ ### Return type
868
+
869
+ [**PhoneValidationResponse**](PhoneValidationResponse.md)
870
+
871
+ ### Authorization
872
+
873
+ No authorization required
874
+
875
+ ### HTTP request headers
876
+
877
+ - **Content-Type**: `application/json`
878
+ - **Accept**: `application/json`
879
+
880
+
881
+ ### HTTP response details
882
+ | Status code | Description | Response headers |
883
+ |-------------|-------------|------------------|
884
+ | **200** | Successful Response | - |
885
+ | **422** | Validation Error | - |
886
+
887
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
888
+
889
+
601
890
  ## resetPassword
602
891
 
603
892
  > UserResponse resetPassword(passwordResetRequest, authorization, ksUat)
@@ -678,7 +967,7 @@ No authorization required
678
967
 
679
968
  Reset Password With Token Handler
680
969
 
681
- Reset password with email verification token
970
+ Reset password with a single-use PasswordResetToken JWT
682
971
 
683
972
  ### Example
684
973
 
@@ -742,10 +1031,12 @@ No authorization required
742
1031
 
743
1032
  ## sendPwResetEmail
744
1033
 
745
- > EmailSentResponse sendPwResetEmail(emailVerificationRequest)
1034
+ > ResponseSendPwResetEmail sendPwResetEmail(sendPasswordResetRequest)
746
1035
 
747
1036
  Send Pw Reset Email Handler
748
1037
 
1038
+ Initiate a password reset via the requested ``method``. ``method=EMAIL`` (default) mints a ``PasswordResetToken`` and sends the existing reset email. ``method=SMS`` looks up the user by phone, dispatches an SMS verification code, and the caller must follow up with ``/validate_reset_code``.
1039
+
749
1040
  ### Example
750
1041
 
751
1042
  ```ts
@@ -760,8 +1051,8 @@ async function example() {
760
1051
  const api = new AuthApi();
761
1052
 
762
1053
  const body = {
763
- // EmailVerificationRequest
764
- emailVerificationRequest: ...,
1054
+ // SendPasswordResetRequest
1055
+ sendPasswordResetRequest: ...,
765
1056
  } satisfies SendPwResetEmailRequest;
766
1057
 
767
1058
  try {
@@ -781,11 +1072,11 @@ example().catch(console.error);
781
1072
 
782
1073
  | Name | Type | Description | Notes |
783
1074
  |------------- | ------------- | ------------- | -------------|
784
- | **emailVerificationRequest** | [EmailVerificationRequest](EmailVerificationRequest.md) | | |
1075
+ | **sendPasswordResetRequest** | [SendPasswordResetRequest](SendPasswordResetRequest.md) | | |
785
1076
 
786
1077
  ### Return type
787
1078
 
788
- [**EmailSentResponse**](EmailSentResponse.md)
1079
+ [**ResponseSendPwResetEmail**](ResponseSendPwResetEmail.md)
789
1080
 
790
1081
  ### Authorization
791
1082
 
@@ -933,3 +1224,71 @@ No authorization required
933
1224
 
934
1225
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
935
1226
 
1227
+
1228
+ ## validatePwResetCode
1229
+
1230
+ > PasswordResetTokenResponse validatePwResetCode(validateResetCodeRequest)
1231
+
1232
+ Validate Reset Code Handler
1233
+
1234
+ Validate an SMS reset code and return a single-use reset JWT.
1235
+
1236
+ ### Example
1237
+
1238
+ ```ts
1239
+ import {
1240
+ Configuration,
1241
+ AuthApi,
1242
+ } from '@knowledge-stack/ksapi';
1243
+ import type { ValidatePwResetCodeRequest } from '@knowledge-stack/ksapi';
1244
+
1245
+ async function example() {
1246
+ console.log("🚀 Testing @knowledge-stack/ksapi SDK...");
1247
+ const api = new AuthApi();
1248
+
1249
+ const body = {
1250
+ // ValidateResetCodeRequest
1251
+ validateResetCodeRequest: ...,
1252
+ } satisfies ValidatePwResetCodeRequest;
1253
+
1254
+ try {
1255
+ const data = await api.validatePwResetCode(body);
1256
+ console.log(data);
1257
+ } catch (error) {
1258
+ console.error(error);
1259
+ }
1260
+ }
1261
+
1262
+ // Run the test
1263
+ example().catch(console.error);
1264
+ ```
1265
+
1266
+ ### Parameters
1267
+
1268
+
1269
+ | Name | Type | Description | Notes |
1270
+ |------------- | ------------- | ------------- | -------------|
1271
+ | **validateResetCodeRequest** | [ValidateResetCodeRequest](ValidateResetCodeRequest.md) | | |
1272
+
1273
+ ### Return type
1274
+
1275
+ [**PasswordResetTokenResponse**](PasswordResetTokenResponse.md)
1276
+
1277
+ ### Authorization
1278
+
1279
+ No authorization required
1280
+
1281
+ ### HTTP request headers
1282
+
1283
+ - **Content-Type**: `application/json`
1284
+ - **Accept**: `application/json`
1285
+
1286
+
1287
+ ### HTTP response details
1288
+ | Status code | Description | Response headers |
1289
+ |-------------|-------------|------------------|
1290
+ | **200** | Successful Response | - |
1291
+ | **422** | Validation Error | - |
1292
+
1293
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1294
+
@@ -0,0 +1,37 @@
1
+
2
+ # ChangePhoneNumberRequest
3
+
4
+ Phone change — the new phone is retrieved from the validation record.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `phoneValidationId` | string
11
+ `code` | string
12
+
13
+ ## Example
14
+
15
+ ```typescript
16
+ import type { ChangePhoneNumberRequest } from '@knowledge-stack/ksapi'
17
+
18
+ // TODO: Update the object below with actual values
19
+ const example = {
20
+ "phoneValidationId": null,
21
+ "code": null,
22
+ } satisfies ChangePhoneNumberRequest
23
+
24
+ console.log(example)
25
+
26
+ // Convert the instance to a JSON string
27
+ const exampleJSON: string = JSON.stringify(example)
28
+ console.log(exampleJSON)
29
+
30
+ // Parse the JSON string back to an object
31
+ const exampleParsed = JSON.parse(exampleJSON) as ChangePhoneNumberRequest
32
+ console.log(exampleParsed)
33
+ ```
34
+
35
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
36
+
37
+
@@ -0,0 +1,43 @@
1
+
2
+ # CreatePhonePasswordUserRequest
3
+
4
+ Phone signup — the phone is retrieved from the validation record.
5
+
6
+ ## Properties
7
+
8
+ Name | Type
9
+ ------------ | -------------
10
+ `password` | string
11
+ `code` | string
12
+ `phoneValidationId` | string
13
+ `firstName` | string
14
+ `lastName` | string
15
+
16
+ ## Example
17
+
18
+ ```typescript
19
+ import type { CreatePhonePasswordUserRequest } from '@knowledge-stack/ksapi'
20
+
21
+ // TODO: Update the object below with actual values
22
+ const example = {
23
+ "password": null,
24
+ "code": null,
25
+ "phoneValidationId": null,
26
+ "firstName": null,
27
+ "lastName": null,
28
+ } satisfies CreatePhonePasswordUserRequest
29
+
30
+ console.log(example)
31
+
32
+ // Convert the instance to a JSON string
33
+ const exampleJSON: string = JSON.stringify(example)
34
+ console.log(exampleJSON)
35
+
36
+ // Parse the JSON string back to an object
37
+ const exampleParsed = JSON.parse(exampleJSON) as CreatePhonePasswordUserRequest
38
+ console.log(exampleParsed)
39
+ ```
40
+
41
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
42
+
43
+
@@ -9,6 +9,7 @@ Name | Type
9
9
  `googleLoginEnabled` | boolean
10
10
  `microsoftLoginEnabled` | boolean
11
11
  `githubLoginEnabled` | boolean
12
+ `smsLoginEnabled` | boolean
12
13
  `defaultFrontendLanguage` | [SupportedLanguage](SupportedLanguage.md)
13
14
 
14
15
  ## Example
@@ -21,6 +22,7 @@ const example = {
21
22
  "googleLoginEnabled": null,
22
23
  "microsoftLoginEnabled": null,
23
24
  "githubLoginEnabled": null,
25
+ "smsLoginEnabled": null,
24
26
  "defaultFrontendLanguage": null,
25
27
  } satisfies FeaturesResponse
26
28
 
@@ -0,0 +1,34 @@
1
+
2
+ # PasswordResetTokenResponse
3
+
4
+
5
+ ## Properties
6
+
7
+ Name | Type
8
+ ------------ | -------------
9
+ `passwordResetToken` | string
10
+
11
+ ## Example
12
+
13
+ ```typescript
14
+ import type { PasswordResetTokenResponse } from '@knowledge-stack/ksapi'
15
+
16
+ // TODO: Update the object below with actual values
17
+ const example = {
18
+ "passwordResetToken": null,
19
+ } satisfies PasswordResetTokenResponse
20
+
21
+ console.log(example)
22
+
23
+ // Convert the instance to a JSON string
24
+ const exampleJSON: string = JSON.stringify(example)
25
+ console.log(exampleJSON)
26
+
27
+ // Parse the JSON string back to an object
28
+ const exampleParsed = JSON.parse(exampleJSON) as PasswordResetTokenResponse
29
+ console.log(exampleParsed)
30
+ ```
31
+
32
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
33
+
34
+