external-services-automation 1.0.31 → 1.0.33
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.
|
@@ -1,6 +1,8 @@
|
|
|
1
|
+
import { GuerrillaEmail } from "./GuerrillaMailService";
|
|
1
2
|
export declare class KindeAuthService {
|
|
2
3
|
private emailClient?;
|
|
3
4
|
constructor();
|
|
4
5
|
createGuerrillaMail(): Promise<string>;
|
|
5
6
|
getConfirmationCodeFromEmail(): Promise<string>;
|
|
7
|
+
readEmailBySubject(subject: RegExp): Promise<GuerrillaEmail>;
|
|
6
8
|
}
|
|
@@ -15,5 +15,10 @@ class KindeAuthService {
|
|
|
15
15
|
const codeMatch = emailData.mail_body?.match(/\b\d{6}\b/);
|
|
16
16
|
return codeMatch[0];
|
|
17
17
|
}
|
|
18
|
+
async readEmailBySubject(subject) {
|
|
19
|
+
const emailData = await this.emailClient.readMailBySubject(subject, 120000, // 2 minutes timeout
|
|
20
|
+
5000);
|
|
21
|
+
return emailData;
|
|
22
|
+
}
|
|
18
23
|
}
|
|
19
24
|
exports.KindeAuthService = KindeAuthService;
|