@opensecret/react 1.0.0-beta.2 → 1.0.0-beta.3
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/dist/index.d.ts +99 -0
- package/dist/opensecret-react.es.js +723 -677
- package/dist/opensecret-react.umd.js +19 -19
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -146,8 +146,45 @@ declare const AWS_ROOT_CERT_DER: Uint8Array;
|
|
|
146
146
|
|
|
147
147
|
declare function changePassword(currentPassword: string, newPassword: string): Promise<void>;
|
|
148
148
|
|
|
149
|
+
/**
|
|
150
|
+
* Changes password for a platform developer account
|
|
151
|
+
* @param currentPassword - Current password for verification
|
|
152
|
+
* @param newPassword - New password to set
|
|
153
|
+
* @returns A promise that resolves when the password is successfully changed
|
|
154
|
+
* @throws {Error} If current password is incorrect or the request fails
|
|
155
|
+
*
|
|
156
|
+
* @description
|
|
157
|
+
* This function:
|
|
158
|
+
* 1. Requires the user to be authenticated
|
|
159
|
+
* 2. Verifies the current password before allowing the change
|
|
160
|
+
* 3. Updates to the new password if verification succeeds
|
|
161
|
+
*/
|
|
162
|
+
declare function changePlatformPassword(currentPassword: string, newPassword: string): Promise<{
|
|
163
|
+
message: string;
|
|
164
|
+
}>;
|
|
165
|
+
|
|
149
166
|
declare function confirmPasswordReset(email: string, alphanumericCode: string, plaintextSecret: string, newPassword: string, client_id: string): Promise<void>;
|
|
150
167
|
|
|
168
|
+
/**
|
|
169
|
+
* Completes the password reset process for a platform developer account
|
|
170
|
+
* @param email - Developer's email address
|
|
171
|
+
* @param alphanumericCode - Code received via email
|
|
172
|
+
* @param plaintextSecret - The plaintext secret that corresponds to the hashed_secret sent in the request
|
|
173
|
+
* @param newPassword - New password to set
|
|
174
|
+
* @returns A promise that resolves when the password is successfully reset
|
|
175
|
+
* @throws {Error} If the verification fails or the request is invalid
|
|
176
|
+
*
|
|
177
|
+
* @description
|
|
178
|
+
* This function:
|
|
179
|
+
* 1. Completes the password reset process using the code from the email
|
|
180
|
+
* 2. Requires the plaintext_secret that matches the previously sent hashed_secret
|
|
181
|
+
* 3. Sets the new password if all verification succeeds
|
|
182
|
+
* 4. The user can then log in with the new password
|
|
183
|
+
*/
|
|
184
|
+
declare function confirmPlatformPasswordReset(email: string, alphanumericCode: string, plaintextSecret: string, newPassword: string): Promise<{
|
|
185
|
+
message: string;
|
|
186
|
+
}>;
|
|
187
|
+
|
|
151
188
|
declare function convertGuestToEmailAccount(email: string, password: string, name?: string | null): Promise<void>;
|
|
152
189
|
|
|
153
190
|
declare function createOrganization(name: string): Promise<Organization>;
|
|
@@ -684,6 +721,49 @@ export declare type OpenSecretDeveloperContextType = {
|
|
|
684
721
|
* Alias for requestNewVerificationCode - for consistency with OpenSecretContext
|
|
685
722
|
*/
|
|
686
723
|
requestNewVerificationEmail: typeof platformApi.requestNewPlatformVerificationCode;
|
|
724
|
+
/**
|
|
725
|
+
* Initiates the password reset process for a platform developer account
|
|
726
|
+
* @param email - Developer's email address
|
|
727
|
+
* @param hashedSecret - Hashed secret used for additional security verification
|
|
728
|
+
* @returns A promise that resolves when the reset request is successfully processed
|
|
729
|
+
* @throws {Error} If the request fails or the email doesn't exist
|
|
730
|
+
*
|
|
731
|
+
* @description
|
|
732
|
+
* - Sends a password reset request for a platform developer
|
|
733
|
+
* - The server will send an email with an alphanumeric code
|
|
734
|
+
* - The email and hashed_secret are paired for the reset process
|
|
735
|
+
* - Use confirmPasswordReset to complete the process
|
|
736
|
+
*/
|
|
737
|
+
requestPasswordReset: typeof platformApi.requestPlatformPasswordReset;
|
|
738
|
+
/**
|
|
739
|
+
* Completes the password reset process for a platform developer account
|
|
740
|
+
* @param email - Developer's email address
|
|
741
|
+
* @param alphanumericCode - Code received via email
|
|
742
|
+
* @param plaintextSecret - The plaintext secret that corresponds to the hashed_secret sent in the request
|
|
743
|
+
* @param newPassword - New password to set
|
|
744
|
+
* @returns A promise that resolves when the password is successfully reset
|
|
745
|
+
* @throws {Error} If the verification fails or the request is invalid
|
|
746
|
+
*
|
|
747
|
+
* @description
|
|
748
|
+
* - Completes the password reset process using the code from the email
|
|
749
|
+
* - Requires the plaintext_secret that matches the previously sent hashed_secret
|
|
750
|
+
* - Sets the new password if all verification succeeds
|
|
751
|
+
* - The user can then log in with the new password
|
|
752
|
+
*/
|
|
753
|
+
confirmPasswordReset: typeof platformApi.confirmPlatformPasswordReset;
|
|
754
|
+
/**
|
|
755
|
+
* Changes password for a platform developer account
|
|
756
|
+
* @param currentPassword - Current password for verification
|
|
757
|
+
* @param newPassword - New password to set
|
|
758
|
+
* @returns A promise that resolves when the password is successfully changed
|
|
759
|
+
* @throws {Error} If current password is incorrect or the request fails
|
|
760
|
+
*
|
|
761
|
+
* @description
|
|
762
|
+
* - Requires the user to be authenticated
|
|
763
|
+
* - Verifies the current password before allowing the change
|
|
764
|
+
* - Updates to the new password if verification succeeds
|
|
765
|
+
*/
|
|
766
|
+
changePassword: typeof platformApi.changePlatformPassword;
|
|
687
767
|
/**
|
|
688
768
|
* Registers a new developer account
|
|
689
769
|
* @param email - Developer's email address
|
|
@@ -1045,6 +1125,9 @@ declare namespace platformApi {
|
|
|
1045
1125
|
platformMe,
|
|
1046
1126
|
verifyPlatformEmail,
|
|
1047
1127
|
requestNewPlatformVerificationCode,
|
|
1128
|
+
requestPlatformPasswordReset,
|
|
1129
|
+
confirmPlatformPasswordReset,
|
|
1130
|
+
changePlatformPassword,
|
|
1048
1131
|
PlatformLoginResponse,
|
|
1049
1132
|
PlatformRefreshResponse,
|
|
1050
1133
|
PlatformOrg,
|
|
@@ -1179,6 +1262,22 @@ declare function requestNewVerificationCode(): Promise<void>;
|
|
|
1179
1262
|
|
|
1180
1263
|
declare function requestPasswordReset(email: string, hashedSecret: string, client_id: string): Promise<void>;
|
|
1181
1264
|
|
|
1265
|
+
/**
|
|
1266
|
+
* Initiates the password reset process for a platform developer account
|
|
1267
|
+
* @param email - Developer's email address
|
|
1268
|
+
* @param hashedSecret - Hashed secret used for additional security verification
|
|
1269
|
+
* @returns A promise that resolves when the reset request is successfully processed
|
|
1270
|
+
* @throws {Error} If the request fails or the email doesn't exist
|
|
1271
|
+
*
|
|
1272
|
+
* @description
|
|
1273
|
+
* This function:
|
|
1274
|
+
* 1. Sends a password reset request for a platform developer
|
|
1275
|
+
* 2. The server will send an email with an alphanumeric code
|
|
1276
|
+
* 3. The email and hashed_secret are paired for the reset process
|
|
1277
|
+
* 4. Use confirmPlatformPasswordReset to complete the process
|
|
1278
|
+
*/
|
|
1279
|
+
declare function requestPlatformPasswordReset(email: string, hashedSecret: string): Promise<void>;
|
|
1280
|
+
|
|
1182
1281
|
declare function setApiUrl(url: string): void;
|
|
1183
1282
|
|
|
1184
1283
|
declare function setPlatformApiUrl(url: string): void;
|