@auxcode/auxta 1.3.104 → 1.3.105

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/build/AuxTA.d.ts CHANGED
@@ -24,6 +24,7 @@ declare class AuxTA extends FunctionHelper {
24
24
  password: string;
25
25
  };
26
26
  timezone: string;
27
+ emailProvider: string;
27
28
  };
28
29
  email: import("./macros/helpers/emailHelper").EmailHelper;
29
30
  private readonly uploadModel;
package/build/AuxTA.js CHANGED
@@ -115,6 +115,8 @@ class AuxTA extends code_helper_1.FunctionHelper {
115
115
  this.uploadModel.reportId = yield (0, report_service_1.createEmptyReport)(this.uploadModel);
116
116
  this.uploadModel.currentSuite = fileName;
117
117
  this.uploadModel.nextSuites = [];
118
+ yield (0, report_service_1.setTimeZone)();
119
+ yield (0, report_service_1.setEmailProvider)();
118
120
  }
119
121
  return this.puppeteer.run(event, callback, feature, scenario);
120
122
  });
@@ -17,6 +17,7 @@ export declare function setupConfig(jsonConfig: any): {
17
17
  password: string;
18
18
  };
19
19
  timezone: string;
20
+ emailProvider: string;
20
21
  };
21
22
  export declare function setupOverrideConfig(overrideConfig: any): {
22
23
  auxtaURL: string;
@@ -37,6 +38,7 @@ export declare function setupOverrideConfig(overrideConfig: any): {
37
38
  password: string;
38
39
  };
39
40
  timezone: string;
41
+ emailProvider: string;
40
42
  };
41
43
  export declare let config: {
42
44
  auxtaURL: string;
@@ -57,4 +59,5 @@ export declare let config: {
57
59
  password: string;
58
60
  };
59
61
  timezone: string;
62
+ emailProvider: string;
60
63
  };
@@ -8,9 +8,10 @@ function setupConfig(jsonConfig) {
8
8
  if (!jsonConfig.auxtaURL)
9
9
  throw new Error("auxtaURL missing");
10
10
  exports.config.auxtaURL = jsonConfig.auxtaURL;
11
- if (!jsonConfig.timezone)
12
- throw new Error("auxtaURL missing");
13
- exports.config.timezone = jsonConfig.timezone;
11
+ if (jsonConfig.emailProvider)
12
+ exports.config.emailProvider = jsonConfig.emailProvider;
13
+ if (jsonConfig.timezone)
14
+ exports.config.timezone = jsonConfig.timezone;
14
15
  if (!jsonConfig.digitalProduct)
15
16
  throw new Error("digitalProduct");
16
17
  exports.config.digitalProduct = jsonConfig.digitalProduct;
@@ -72,5 +73,6 @@ exports.config = {
72
73
  email: "",
73
74
  password: "",
74
75
  },
75
- timezone: ""
76
+ timezone: "Europe/Brussels",
77
+ emailProvider: "Mailgun"
76
78
  };
@@ -16,7 +16,8 @@ export interface Steps {
16
16
  suggestedSteps: number;
17
17
  performanceFailure: number;
18
18
  }
19
- export declare function setTimeZone(): Promise<string>;
19
+ export declare function setTimeZone(): Promise<any>;
20
+ export declare function setEmailProvider(): Promise<any>;
20
21
  export declare function createEmptyReport(body: any): Promise<string>;
21
22
  export declare function uploadStep(stepLog: Step[], scenarioName: string, screenshot?: Buffer, errMessage?: object): Promise<{
22
23
  stepRef: any;
@@ -12,7 +12,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
12
12
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
13
  };
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
- exports.getVerifyReceivedEmail = exports.postNotificationsOnFail = exports.postNotifications = exports.compareScreenshots = exports.getLastDayResults = exports.getReport = exports.updateReport = exports.uploadScenario = exports.uploadStep = exports.createEmptyReport = exports.setTimeZone = void 0;
15
+ exports.getVerifyReceivedEmail = exports.postNotificationsOnFail = exports.postNotifications = exports.compareScreenshots = exports.getLastDayResults = exports.getReport = exports.updateReport = exports.uploadScenario = exports.uploadStep = exports.createEmptyReport = exports.setEmailProvider = exports.setTimeZone = void 0;
16
16
  const axios_1 = __importDefault(require("axios"));
17
17
  const config_1 = require("../configs/config");
18
18
  function headers(token) {
@@ -55,12 +55,23 @@ function auth() {
55
55
  function setTimeZone() {
56
56
  return __awaiter(this, void 0, void 0, function* () {
57
57
  const token = yield auth();
58
- return (yield axios_1.default.post(config_1.config.auxtaURL + "set-timezone", {
59
- organization: config_1.config.organization
58
+ return (yield axios_1.default.post(config_1.config.auxtaURL + "set-timezone-organization", {
59
+ organization: config_1.config.organization,
60
+ timezone: config_1.config.timezone
60
61
  }, headers(token))).data;
61
62
  });
62
63
  }
63
64
  exports.setTimeZone = setTimeZone;
65
+ function setEmailProvider() {
66
+ return __awaiter(this, void 0, void 0, function* () {
67
+ const token = yield auth();
68
+ return (yield axios_1.default.post(config_1.config.auxtaURL + "set-email-provider-organization", {
69
+ organization: config_1.config.organization,
70
+ emailProvider: config_1.config.emailProvider
71
+ }, headers(token))).data;
72
+ });
73
+ }
74
+ exports.setEmailProvider = setEmailProvider;
64
75
  function createEmptyReport(body) {
65
76
  return __awaiter(this, void 0, void 0, function* () {
66
77
  const token = yield auth();
@@ -70,6 +81,7 @@ function createEmptyReport(body) {
70
81
  digitalProductToken: body.digitalProduct,
71
82
  bucket: body.bucket,
72
83
  start: moment().tz(config_1.config.timezone),
84
+ emailProvider: config_1.config.emailProvider,
73
85
  url: body.baseUrl
74
86
  }, headers(token))).data.reportId;
75
87
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@auxcode/auxta",
3
- "version": "1.3.104",
3
+ "version": "1.3.105",
4
4
  "description": "",
5
5
  "main": "./build/AuxTA.js",
6
6
  "types": "./build/AuxTA.d.ts",