@clxmedia/emailhub-client 1.1.2 → 1.1.3

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/dist/client.d.ts CHANGED
@@ -3,6 +3,10 @@ export declare enum EmailHubPriorityLevel {
3
3
  NORMAL = "normal",
4
4
  BULK = "bulk"
5
5
  }
6
+ export declare enum EmailHubEnvironment {
7
+ emailhub = "emailhub",
8
+ localhost = "localhost"
9
+ }
6
10
  export interface EmailHubAttachment {
7
11
  ContentType: string;
8
12
  Filename: string;
@@ -61,6 +65,7 @@ export interface EmailHubSenderProfile {
61
65
  verified_at?: string;
62
66
  }
63
67
  export declare class EmailHubClient {
68
+ readonly environment: EmailHubEnvironment;
64
69
  private sender;
65
70
  private server;
66
71
  private pubsubClient;
package/dist/client.js CHANGED
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.EmailHubClient = exports.EmailHubPriorityLevel = void 0;
12
+ exports.EmailHubClient = exports.EmailHubEnvironment = exports.EmailHubPriorityLevel = void 0;
13
13
  const pubsub_1 = require("@google-cloud/pubsub");
14
14
  const uuid = require("uuid");
15
15
  const Pako = require("pako");
@@ -19,10 +19,16 @@ var EmailHubPriorityLevel;
19
19
  EmailHubPriorityLevel["NORMAL"] = "normal";
20
20
  EmailHubPriorityLevel["BULK"] = "bulk";
21
21
  })(EmailHubPriorityLevel = exports.EmailHubPriorityLevel || (exports.EmailHubPriorityLevel = {}));
22
+ var EmailHubEnvironment;
23
+ (function (EmailHubEnvironment) {
24
+ EmailHubEnvironment["emailhub"] = "emailhub";
25
+ EmailHubEnvironment["localhost"] = "localhost";
26
+ })(EmailHubEnvironment = exports.EmailHubEnvironment || (exports.EmailHubEnvironment = {}));
22
27
  const DEFAULT_EMAIL_HUB_URL = 'https://emailhub.clxp.us';
23
28
  const DEFAULT_EMAIL_REGEX = /^([a-z0-9])([a-z\.0-9_%\-\+\*'’!#`&\$/]*)@(.+)\.(.+)$/;
24
29
  class EmailHubClient {
25
30
  constructor(cfg) {
31
+ this.environment = EmailHubEnvironment.emailhub;
26
32
  this.sender = cfg.sender;
27
33
  this.server = cfg.server ? cfg.server : DEFAULT_EMAIL_HUB_URL;
28
34
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clxmedia/emailhub-client",
3
- "version": "1.1.2",
3
+ "version": "1.1.3",
4
4
  "description": "CLXperience EmailHub Client",
5
5
  "author": "Brandon Thompson <brandont@clxmedia.com>",
6
6
  "license": "MIT",