@auxcode/auxta 1.3.29 → 1.3.30
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.
|
@@ -22,16 +22,16 @@ class EmailHelper {
|
|
|
22
22
|
verifyEmail(from_name, from_email, subject, body, link = false) {
|
|
23
23
|
return __awaiter(this, void 0, void 0, function* () {
|
|
24
24
|
yield AuxGoogleAuth_1.AuxGoogleAuth.setup();
|
|
25
|
-
const res = yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.list({
|
|
26
|
-
userId: "me",
|
|
27
|
-
maxResults: 3
|
|
28
|
-
});
|
|
29
|
-
const messagesIds = res.data.messages;
|
|
30
|
-
if (!messagesIds || messagesIds.length === 0) {
|
|
31
|
-
throw new Error('No messagesIds found.');
|
|
32
|
-
}
|
|
33
25
|
let timeoutCount = 12000;
|
|
34
26
|
while (timeoutCount <= 60000) {
|
|
27
|
+
const res = yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.list({
|
|
28
|
+
userId: "me",
|
|
29
|
+
maxResults: 1
|
|
30
|
+
});
|
|
31
|
+
const messagesIds = res.data.messages;
|
|
32
|
+
if (!messagesIds || messagesIds.length === 0) {
|
|
33
|
+
throw new Error('No messagesIds found.');
|
|
34
|
+
}
|
|
35
35
|
for (const messageId of messagesIds) {
|
|
36
36
|
if (messageId.id) {
|
|
37
37
|
const gmailResponse = yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.get({
|
|
@@ -16,16 +16,16 @@ export class EmailHelper {
|
|
|
16
16
|
verifyEmail(from_name, from_email, subject, body, link = false) {
|
|
17
17
|
return __awaiter(this, void 0, void 0, function* () {
|
|
18
18
|
yield AuxGoogleAuth.setup();
|
|
19
|
-
const res = yield AuxGoogleAuth.gmailClient.users.messages.list({
|
|
20
|
-
userId: "me",
|
|
21
|
-
maxResults: 3
|
|
22
|
-
});
|
|
23
|
-
const messagesIds = res.data.messages;
|
|
24
|
-
if (!messagesIds || messagesIds.length === 0) {
|
|
25
|
-
throw new Error('No messagesIds found.');
|
|
26
|
-
}
|
|
27
19
|
let timeoutCount = 12000;
|
|
28
20
|
while (timeoutCount <= 60000) {
|
|
21
|
+
const res = yield AuxGoogleAuth.gmailClient.users.messages.list({
|
|
22
|
+
userId: "me",
|
|
23
|
+
maxResults: 1
|
|
24
|
+
});
|
|
25
|
+
const messagesIds = res.data.messages;
|
|
26
|
+
if (!messagesIds || messagesIds.length === 0) {
|
|
27
|
+
throw new Error('No messagesIds found.');
|
|
28
|
+
}
|
|
29
29
|
for (const messageId of messagesIds) {
|
|
30
30
|
if (messageId.id) {
|
|
31
31
|
const gmailResponse = yield AuxGoogleAuth.gmailClient.users.messages.get({
|