@bigbinary/neeto-playwright-commons 1.26.33 → 1.26.35

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/index.cjs.js CHANGED
@@ -496,6 +496,30 @@ class ThankYouApi {
496
496
  }
497
497
  }
498
498
 
499
+ const NEETO_TOWER_BASE_URL = "https://ops.neetotower.com/";
500
+ const DNS_RECORDS_BASE_URL = `${NEETO_TOWER_BASE_URL}api/v1/public/automation_tests/dns_records`;
501
+ class NeetoTowerApi {
502
+ constructor(neetoPlaywrightUtilities) {
503
+ this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
504
+ this.apiRequest = ({ method, dnsDomainId = "", body, }) => this.neetoPlaywrightUtilities.apiRequest({
505
+ url: `${DNS_RECORDS_BASE_URL}${dnsDomainId ? `/${dnsDomainId}` : ""}`,
506
+ headers: { "X-API-KEY": this.apiKey },
507
+ method,
508
+ body,
509
+ });
510
+ this.createRecord = ({ hostname, value }) => this.apiRequest({
511
+ method: "post",
512
+ body: { name: hostname, type: "TXT", content: value },
513
+ });
514
+ this.getRecords = () => this.apiRequest({ method: "get" });
515
+ this.deleteRecord = (dnsDomainId) => this.apiRequest({ method: "delete", dnsDomainId });
516
+ if (!process.env.NEETO_TOWER_API_KEY) {
517
+ throw new Error("NEETO_TOWER_API_KEY is not set");
518
+ }
519
+ this.apiKey = process.env.NEETO_TOWER_API_KEY;
520
+ }
521
+ }
522
+
499
523
  class SlackApi {
500
524
  constructor(neetoPlaywrightUtilities) {
501
525
  this.neetoPlaywrightUtilities = neetoPlaywrightUtilities;
@@ -119310,13 +119334,13 @@ class AuditLogsPage {
119310
119334
  this.messageBuilders = {
119311
119335
  [ACTIONS.inviteUsers]: (data) => `${this.admin} added ${data.emails.join(", ").toLowerCase()} to Neeto${this.product}.`,
119312
119336
  [ACTIONS.updatedUser]: (data) => `${this.admin} changed ${data.emails[1].toLowerCase()}'s email from ${data.emails[0].toLowerCase()} to ${data.emails[1]} on Neeto${this.product}.`,
119313
- [ACTIONS.removedUser]: (data) => `${this.admin} changed ${data.emails[0].toLowerCase()}'s active from true to false on Neeto${this.product}.`,
119337
+ [ACTIONS.removedUser]: (data) => `${this.admin} removed ${data.emails[0].toLowerCase()} from Neeto${this.product}.`,
119314
119338
  [ACTIONS.createdRole]: (data) => `${this.admin} created ${data.roleName} role on Neeto${this.product}.`,
119315
119339
  [ACTIONS.addedPermission]: (data) => `${this.admin} added ${data.permissions.join(", ").toLowerCase()} permission to ${data.roleName} role on Neeto${this.product}.`,
119316
119340
  [ACTIONS.removedPermission]: (data) => `${this.admin} removed ${data.permissions.join(", ")} permissions from ${data.roleName} role on Neeto${this.product}.`,
119317
119341
  [ACTIONS.updatedRole]: (data) => `${this.admin} updated ${data.roleName} role on Neeto${this.product}.`,
119318
119342
  [ACTIONS.deletedRole]: (data) => `${this.admin} deleted ${data.roleName} role on Neeto${this.product}.`,
119319
- [ACTIONS.updatedName]: (data) => `${this.admin} updated their first name: from ${data.name} to ${this.admin.split(" ")[0]} on Neeto${this.product}.`,
119343
+ [ACTIONS.updatedName]: (data) => `${this.admin} changed first name from ${data.name} to ${this.admin.split(" ")[0]} in Neeto${this.product}.`,
119320
119344
  };
119321
119345
  }
119322
119346
  }
@@ -125332,6 +125356,7 @@ exports.NEETO_IMAGE_UPLOADER_SELECTORS = NEETO_IMAGE_UPLOADER_SELECTORS;
125332
125356
  exports.NEETO_ROUTES = NEETO_ROUTES;
125333
125357
  exports.NEETO_SEO_SELECTORS = NEETO_SEO_SELECTORS;
125334
125358
  exports.NEETO_TEXT_MODIFIER_SELECTORS = NEETO_TEXT_MODIFIER_SELECTORS;
125359
+ exports.NeetoTowerApi = NeetoTowerApi;
125335
125360
  exports.ONBOARDING_SELECTORS = ONBOARDING_SELECTORS;
125336
125361
  exports.ORGANIZATION_TEXTS = ORGANIZATION_TEXTS;
125337
125362
  exports.OTP_EMAIL_PATTERN = OTP_EMAIL_PATTERN;