@opensecret/react 1.0.0-beta.1 → 1.0.0-beta.2
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 +46 -0
- package/dist/opensecret-react.es.js +1936 -1913
- package/dist/opensecret-react.umd.js +21 -21
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -657,6 +657,33 @@ export declare type OpenSecretDeveloperContextType = {
|
|
|
657
657
|
* - Throws an error if authentication fails
|
|
658
658
|
*/
|
|
659
659
|
signIn: (email: string, password: string) => Promise<platformApi.PlatformLoginResponse>;
|
|
660
|
+
/**
|
|
661
|
+
* Verifies a platform user's email using the verification code
|
|
662
|
+
* @param code - The verification code sent to the user's email
|
|
663
|
+
* @returns A promise that resolves when verification is complete
|
|
664
|
+
* @throws {Error} If verification fails
|
|
665
|
+
*
|
|
666
|
+
* @description
|
|
667
|
+
* - Takes the verification code from the verification email link
|
|
668
|
+
* - Calls the verification API endpoint
|
|
669
|
+
* - Updates email_verified status if successful
|
|
670
|
+
*/
|
|
671
|
+
verifyEmail: typeof platformApi.verifyPlatformEmail;
|
|
672
|
+
/**
|
|
673
|
+
* Requests a new verification email for the current user
|
|
674
|
+
* @returns A promise that resolves to a success message
|
|
675
|
+
* @throws {Error} If the user is already verified or request fails
|
|
676
|
+
*
|
|
677
|
+
* @description
|
|
678
|
+
* - Used when the user needs a new verification email
|
|
679
|
+
* - Requires the user to be authenticated
|
|
680
|
+
* - Sends a new verification email to the user's registered email address
|
|
681
|
+
*/
|
|
682
|
+
requestNewVerificationCode: typeof platformApi.requestNewPlatformVerificationCode;
|
|
683
|
+
/**
|
|
684
|
+
* Alias for requestNewVerificationCode - for consistency with OpenSecretContext
|
|
685
|
+
*/
|
|
686
|
+
requestNewVerificationEmail: typeof platformApi.requestNewPlatformVerificationCode;
|
|
660
687
|
/**
|
|
661
688
|
* Registers a new developer account
|
|
662
689
|
* @param email - Developer's email address
|
|
@@ -1016,6 +1043,8 @@ declare namespace platformApi {
|
|
|
1016
1043
|
removeMember,
|
|
1017
1044
|
acceptInvite,
|
|
1018
1045
|
platformMe,
|
|
1046
|
+
verifyPlatformEmail,
|
|
1047
|
+
requestNewPlatformVerificationCode,
|
|
1019
1048
|
PlatformLoginResponse,
|
|
1020
1049
|
PlatformRefreshResponse,
|
|
1021
1050
|
PlatformOrg,
|
|
@@ -1137,6 +1166,15 @@ declare function refreshToken(): Promise<RefreshResponse>;
|
|
|
1137
1166
|
|
|
1138
1167
|
declare function removeMember(orgId: string, userId: string): Promise<void>;
|
|
1139
1168
|
|
|
1169
|
+
/**
|
|
1170
|
+
* Requests a new verification email for a platform user
|
|
1171
|
+
* @returns A promise that resolves to a success message
|
|
1172
|
+
* @throws {Error} If the user is already verified or request fails
|
|
1173
|
+
*/
|
|
1174
|
+
declare function requestNewPlatformVerificationCode(): Promise<{
|
|
1175
|
+
message: string;
|
|
1176
|
+
}>;
|
|
1177
|
+
|
|
1140
1178
|
declare function requestNewVerificationCode(): Promise<void>;
|
|
1141
1179
|
|
|
1142
1180
|
declare function requestPasswordReset(email: string, hashedSecret: string, client_id: string): Promise<void>;
|
|
@@ -1218,4 +1256,12 @@ export declare type UserResponse = {
|
|
|
1218
1256
|
|
|
1219
1257
|
declare function verifyEmail(code: string): Promise<void>;
|
|
1220
1258
|
|
|
1259
|
+
/**
|
|
1260
|
+
* Verifies a platform user's email using the verification code
|
|
1261
|
+
* @param code - The verification code sent to the user's email
|
|
1262
|
+
* @returns A promise that resolves when verification is complete
|
|
1263
|
+
* @throws {Error} If verification fails
|
|
1264
|
+
*/
|
|
1265
|
+
declare function verifyPlatformEmail(code: string): Promise<void>;
|
|
1266
|
+
|
|
1221
1267
|
export { }
|