@auxcode/auxta 1.3.19 → 1.3.20
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.
|
@@ -20,7 +20,6 @@ const AuxTA_1 = require("../../AuxTA");
|
|
|
20
20
|
const extend_default_page_1 = require("./extend-default-page");
|
|
21
21
|
const puppeteer_2 = require("puppeteer");
|
|
22
22
|
const AuxGoogleAuth_1 = require("./AuxGoogleAuth");
|
|
23
|
-
const config_1 = require("../../auxta/configs/config");
|
|
24
23
|
class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
25
24
|
log(keyword, name, status) {
|
|
26
25
|
log_service_1.default.push(keyword, name, status);
|
|
@@ -193,7 +192,7 @@ class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
|
193
192
|
return __awaiter(this, void 0, void 0, function* () {
|
|
194
193
|
yield AuxGoogleAuth_1.AuxGoogleAuth.setup();
|
|
195
194
|
const res = yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.list({
|
|
196
|
-
userId:
|
|
195
|
+
userId: "me",
|
|
197
196
|
maxResults: 3
|
|
198
197
|
});
|
|
199
198
|
const messagesIds = res.data.messages;
|
|
@@ -205,7 +204,11 @@ class FunctionHelper extends extend_default_page_1.ExtendDefaultPage {
|
|
|
205
204
|
while (timeoutCount <= 60000) {
|
|
206
205
|
for (const messageId of messagesIds) {
|
|
207
206
|
if (messageId.id) {
|
|
208
|
-
const message = yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.get({
|
|
207
|
+
const message = yield AuxGoogleAuth_1.AuxGoogleAuth.gmailClient.users.messages.get({
|
|
208
|
+
userId: "me",
|
|
209
|
+
id: messageId.id.toString(),
|
|
210
|
+
format: 'FULL'
|
|
211
|
+
});
|
|
209
212
|
if (message.data.payload) {
|
|
210
213
|
const message_sender = this.getHeader('from', message.data.payload.headers);
|
|
211
214
|
const message_subject = this.getHeader('subject', message.data.payload.headers);
|
|
@@ -14,7 +14,6 @@ import { StepStatus } from "../../AuxTA";
|
|
|
14
14
|
import { ExtendDefaultPage } from "./extend-default-page";
|
|
15
15
|
import { KnownDevices } from "puppeteer";
|
|
16
16
|
import { AuxGoogleAuth } from "./AuxGoogleAuth";
|
|
17
|
-
import { config } from "../../auxta/configs/config";
|
|
18
17
|
export class FunctionHelper extends ExtendDefaultPage {
|
|
19
18
|
log(keyword, name, status) {
|
|
20
19
|
log.push(keyword, name, status);
|
|
@@ -187,7 +186,7 @@ export class FunctionHelper extends ExtendDefaultPage {
|
|
|
187
186
|
return __awaiter(this, void 0, void 0, function* () {
|
|
188
187
|
yield AuxGoogleAuth.setup();
|
|
189
188
|
const res = yield AuxGoogleAuth.gmailClient.users.messages.list({
|
|
190
|
-
userId:
|
|
189
|
+
userId: "me",
|
|
191
190
|
maxResults: 3
|
|
192
191
|
});
|
|
193
192
|
const messagesIds = res.data.messages;
|
|
@@ -199,7 +198,11 @@ export class FunctionHelper extends ExtendDefaultPage {
|
|
|
199
198
|
while (timeoutCount <= 60000) {
|
|
200
199
|
for (const messageId of messagesIds) {
|
|
201
200
|
if (messageId.id) {
|
|
202
|
-
const message = yield AuxGoogleAuth.gmailClient.users.messages.get({
|
|
201
|
+
const message = yield AuxGoogleAuth.gmailClient.users.messages.get({
|
|
202
|
+
userId: "me",
|
|
203
|
+
id: messageId.id.toString(),
|
|
204
|
+
format: 'FULL'
|
|
205
|
+
});
|
|
203
206
|
if (message.data.payload) {
|
|
204
207
|
const message_sender = this.getHeader('from', message.data.payload.headers);
|
|
205
208
|
const message_subject = this.getHeader('subject', message.data.payload.headers);
|