@insforge/sdk 1.1.0-dev.0 → 1.1.0-dev.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.mts CHANGED
@@ -255,12 +255,23 @@ declare class Auth {
255
255
  error: InsForgeError | null;
256
256
  }>;
257
257
  /**
258
- * Send email verification (code or link based on config)
258
+ * Resend email verification (code or link based on config)
259
259
  *
260
- * Send email verification using the method configured in auth settings (verifyEmailMethod).
260
+ * Resend email verification when the previous OTP has expired or was not received.
261
+ * Uses the method configured in auth settings (verifyEmailMethod).
261
262
  * When method is 'code', sends a 6-digit numeric code. When method is 'link', sends a magic link.
262
263
  * Prevents user enumeration by returning success even if email doesn't exist.
263
264
  */
265
+ resendVerificationEmail(request: SendVerificationEmailRequest): Promise<{
266
+ data: {
267
+ success: boolean;
268
+ message: string;
269
+ } | null;
270
+ error: InsForgeError | null;
271
+ }>;
272
+ /**
273
+ * @deprecated Use `resendVerificationEmail` instead. This method will be removed in a future version.
274
+ */
264
275
  sendVerificationEmail(request: SendVerificationEmailRequest): Promise<{
265
276
  data: {
266
277
  success: boolean;
package/dist/index.d.ts CHANGED
@@ -255,12 +255,23 @@ declare class Auth {
255
255
  error: InsForgeError | null;
256
256
  }>;
257
257
  /**
258
- * Send email verification (code or link based on config)
258
+ * Resend email verification (code or link based on config)
259
259
  *
260
- * Send email verification using the method configured in auth settings (verifyEmailMethod).
260
+ * Resend email verification when the previous OTP has expired or was not received.
261
+ * Uses the method configured in auth settings (verifyEmailMethod).
261
262
  * When method is 'code', sends a 6-digit numeric code. When method is 'link', sends a magic link.
262
263
  * Prevents user enumeration by returning success even if email doesn't exist.
263
264
  */
265
+ resendVerificationEmail(request: SendVerificationEmailRequest): Promise<{
266
+ data: {
267
+ success: boolean;
268
+ message: string;
269
+ } | null;
270
+ error: InsForgeError | null;
271
+ }>;
272
+ /**
273
+ * @deprecated Use `resendVerificationEmail` instead. This method will be removed in a future version.
274
+ */
264
275
  sendVerificationEmail(request: SendVerificationEmailRequest): Promise<{
265
276
  data: {
266
277
  success: boolean;
package/dist/index.js CHANGED
@@ -710,13 +710,14 @@ var Auth = class {
710
710
  }
711
711
  }
712
712
  /**
713
- * Send email verification (code or link based on config)
713
+ * Resend email verification (code or link based on config)
714
714
  *
715
- * Send email verification using the method configured in auth settings (verifyEmailMethod).
715
+ * Resend email verification when the previous OTP has expired or was not received.
716
+ * Uses the method configured in auth settings (verifyEmailMethod).
716
717
  * When method is 'code', sends a 6-digit numeric code. When method is 'link', sends a magic link.
717
718
  * Prevents user enumeration by returning success even if email doesn't exist.
718
719
  */
719
- async sendVerificationEmail(request) {
720
+ async resendVerificationEmail(request) {
720
721
  try {
721
722
  const response = await this.http.post(
722
723
  "/api/auth/email/send-verification",
@@ -740,6 +741,12 @@ var Auth = class {
740
741
  };
741
742
  }
742
743
  }
744
+ /**
745
+ * @deprecated Use `resendVerificationEmail` instead. This method will be removed in a future version.
746
+ */
747
+ async sendVerificationEmail(request) {
748
+ return this.resendVerificationEmail(request);
749
+ }
743
750
  /**
744
751
  * Send password reset (code or link based on config)
745
752
  *