@resolveio/server-lib 22.3.91 → 22.3.93

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.
@@ -48,6 +48,13 @@ var schema = {
48
48
  type: Object,
49
49
  blackbox: true
50
50
  },
51
+ cc: {
52
+ type: Array,
53
+ optional: true
54
+ },
55
+ 'cc.$': {
56
+ type: String
57
+ },
51
58
  send_from: {
52
59
  type: String
53
60
  },
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/collections/email-history.collection.ts"],"names":[],"mappings":";;;AAAC,2DAAsF;AAEvF,gEAA0D;AAE1D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,IAAI,EAAE;QACL,IAAI,EAAE,IAAI;KACV;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,IAAI,EAAE;QACL,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,MAAM;KACZ;IACD,QAAQ,EAAE;QACT,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;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AAc,GAAG,KAAK,CAAC,eAAe,CAAC;QACvC,sBAAc,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QACxC,sBAAc,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;IACrF,CAAC;SACI,CAAC;QACL,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","file":"email-history.collection.js","sourcesContent":[" import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { EmailHistoryModel } from '../models/email-history.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\temail: {\n\t\ttype: String\n\t},\n\tsubject: {\n\t\ttype: String\n\t},\n\ttext: {\n\t\ttype: String\n\t},\n\thtml: {\n\t\ttype: String\n\t},\n\tattachments: {\n\t\ttype: Array\n\t},\n\t'attachments.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tsend_from: {\n\t\ttype: String\n\t},\n\treply_to: {\n\t\ttype: String\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\terror: {\n\t\ttype: String\n\t},\n\tprocessingAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcompletedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tforce_ses: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t},\n\theaders: {\n\t\ttype: Object,\n\t\toptional: true,\n\t\tblackbox: true\n\t},\n\tcorrelationId: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tmeta: {\n\t\ttype: Object,\n\t\toptional: true,\n\t\tblackbox: true\n\t},\n\toccurrences: {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'occurrences.$': {\n\t\ttype: Object,\n\t\toptional: true,\n\t\tblackbox: true\n\t}\n};\n\nexport let EmailHistories: MongoManagerCollection<EmailHistoryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<EmailHistoryModel>({\n\t\t\tcollectionName: 'email-histories',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null,\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tEmailHistories = model.collection_main;\n\t\tEmailHistories.createIndex({status: 1});\n\t\tEmailHistories.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 90});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}\n"]}
1
+ {"version":3,"sources":["../../src/collections/email-history.collection.ts"],"names":[],"mappings":";;;AAAC,2DAAsF;AAEvF,gEAA0D;AAE1D,IAAI,MAAM,GAAQ;IACjB,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,GAAG,EAAE;QACJ,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,IAAI;QACV,QAA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AE;QACZ,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,IAAI;KACd;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;QACd,QAAQ,EAAE,IAAI;KACd;CACD,CAAC;AAES,QAAA,cAAc,GAA8C,IAAI,CAAC;AAE5E,oBAAoB,EAAE,CAAC;AAEvB,SAAS,oBAAoB;IAC5B,IAAI,sCAAe,IAAI,sCAAe,CAAC,SAAS,EAAE,IAAI,iCAAiB,EAAE,CAAC;QACzE,IAAM,KAAK,GAAG,iCAAiB,CAAC,MAAM,CAAoB;YACzD,cAAc,EAAE,iBAAiB;YACjC,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,KAAK;YAC3B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;YAChB,UAAU,EAAE,KAAK;YACjB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;YACvB,SAAS,EAAE,IAAI;YACf,aAAa,EAAE,IAAI;SACnB,CAAC,CAAC;QACH,sBAAc,GAAG,KAAK,CAAC,eAAe,CAAC;QACvC,sBAAc,CAAC,WAAW,CAAC,EAAC,MAAM,EAAE,CAAC,EAAC,CAAC,CAAC;QACxC,sBAAc,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;IACrF,CAAC;SACI,CAAC;QACL,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACJ,CAAC;AACF,CAAC","file":"email-history.collection.js","sourcesContent":[" import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { EmailHistoryModel } from '../models/email-history.model';\nimport { ResolveIOServer } from '../resolveio-server-app';\n\nlet schema: any = {\n\t_id: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t__v: {\n\t\ttype: Number,\n\t\toptional: true\n\t},\n\tupdatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcreatedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\temail: {\n\t\ttype: String\n\t},\n\tsubject: {\n\t\ttype: String\n\t},\n\ttext: {\n\t\ttype: String\n\t},\n\thtml: {\n\t\ttype: String\n\t},\n\tattachments: {\n\t\ttype: Array\n\t},\n\t'attachments.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tcc: {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'cc.$': {\n\t\ttype: String\n\t},\n\tsend_from: {\n\t\ttype: String\n\t},\n\treply_to: {\n\t\ttype: String\n\t},\n\tstatus: {\n\t\ttype: String\n\t},\n\terror: {\n\t\ttype: String\n\t},\n\tprocessingAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tcompletedAt: {\n\t\ttype: Date,\n\t\toptional: true\n\t},\n\tforce_ses: {\n\t\ttype: Boolean,\n\t\toptional: true\n\t},\n\theaders: {\n\t\ttype: Object,\n\t\toptional: true,\n\t\tblackbox: true\n\t},\n\tcorrelationId: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tmeta: {\n\t\ttype: Object,\n\t\toptional: true,\n\t\tblackbox: true\n\t},\n\toccurrences: {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'occurrences.$': {\n\t\ttype: Object,\n\t\toptional: true,\n\t\tblackbox: true\n\t}\n};\n\nexport let EmailHistories: MongoManagerCollection<EmailHistoryModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<EmailHistoryModel>({\n\t\t\tcollectionName: 'email-histories',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: false,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: false,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null,\n\t\t\tskipCache: true,\n\t\t\tbypassSession: true\n\t\t});\n\t\tEmailHistories = model.collection_main;\n\t\tEmailHistories.createIndex({status: 1});\n\t\tEmailHistories.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 90});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}\n"]}
@@ -7,6 +7,7 @@ interface SendEmailOptions {
7
7
  correlationId?: string;
8
8
  meta?: Record<string, any>;
9
9
  headers?: Record<string, string>;
10
+ cc?: string | string[];
10
11
  waitForCompletion?: boolean;
11
12
  waitForCompletionTimeoutMs?: number;
12
13
  waitForCompletionPollMs?: number;
@@ -149,6 +149,22 @@ function appendCorrelationIdToSubject(subject, correlationId) {
149
149
  }
150
150
  return "".concat(subject, " ").concat(correlationTag).trim();
151
151
  }
152
+ function isDevEmailRedirectEnvironment() {
153
+ var rootUrl = resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'];
154
+ return !!(rootUrl.match(/https:\/\/dev\./) ||
155
+ rootUrl.match(/https:\/\/www\.dev\./) ||
156
+ rootUrl === 'http://localhost:4200');
157
+ }
158
+ function normalizeEmailRecipients(recipients) {
159
+ if (!recipients) {
160
+ return [];
161
+ }
162
+ var list = Array.isArray(recipients) ? recipients : [recipients];
163
+ return list
164
+ .flatMap(function (recipient) { return String(recipient).split(/[;,]/); })
165
+ .map(function (recipient) { return recipient.trim(); })
166
+ .filter(Boolean);
167
+ }
152
168
  function createEmailOccurrence(subject, text, html, meta) {
153
169
  return {
154
170
  _id: (0, common_1.objectIdHexString)(),
@@ -1461,6 +1477,7 @@ var MethodManager = /** @class */ (function () {
1461
1477
  replyTo: emailHistory.reply_to || (resolveio_server_app_1.ResolveIOServer.getServerConfig()['MAIL_REPLY_TO'] || undefined),
1462
1478
  from: emailHistory.send_from || resolveio_server_app_1.ResolveIOServer.getServerConfig().MAIL_FROM,
1463
1479
  to: emailHistory.email,
1480
+ cc: emailHistory.cc && emailHistory.cc.length ? emailHistory.cc : undefined,
1464
1481
  subject: (resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'].match(/https:\/\/dev\./) ||
1465
1482
  resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'].match(/https:\/\/www\.dev\./)
1466
1483
  ? '(DEV SERVER) - '
@@ -1735,6 +1752,7 @@ var MethodManager = /** @class */ (function () {
1735
1752
  send_from: 1,
1736
1753
  reply_to: 1,
1737
1754
  force_ses: 1,
1755
+ cc: 1,
1738
1756
  headers: 1,
1739
1757
  correlationId: 1,
1740
1758
  meta: 1,
@@ -1767,17 +1785,18 @@ var MethodManager = /** @class */ (function () {
1767
1785
  };
1768
1786
  MethodManager.prototype.sendEmail = function (sendTo_1, subject_1, text_1, html_1, attachments_1, send_from_1, reply_to_1) {
1769
1787
  return __awaiter(this, arguments, void 0, function (sendTo, subject, text, html, attachments, send_from, reply_to, force_ses, local_override, options) {
1770
- var normalizedSubject, correlationId, finalSubject, groupByCorrelationId, normalizedText, normalizedHtml, occurrence, allowGrouping, normalizedAttachments, merged, emailHistory, _a, aggregatedText, aggregatedHtml, history_1, err_7;
1788
+ var isDevEmailEnvironment, cc, normalizedSubject, correlationId, finalSubject, groupByCorrelationId, normalizedText, normalizedHtml, occurrence, allowGrouping, normalizedAttachments, merged, emailHistory, _a, aggregatedText, aggregatedHtml, history_1, err_7;
1771
1789
  if (force_ses === void 0) { force_ses = false; }
1772
1790
  if (local_override === void 0) { local_override = false; }
1773
1791
  return __generator(this, function (_b) {
1774
1792
  switch (_b.label) {
1775
1793
  case 0:
1776
- // Modify sendTo in development environments
1777
- if ((resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'].match(/https:\/\/dev\./) ||
1778
- resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'].match(/https:\/\/www\.dev\./) ||
1779
- resolveio_server_app_1.ResolveIOServer.getServerConfig()['ROOT_URL'] === 'http://localhost:4200') &&
1780
- !sendTo.match(/\@resolveio\.com/)) {
1794
+ isDevEmailEnvironment = isDevEmailRedirectEnvironment();
1795
+ cc = normalizeEmailRecipients(options === null || options === void 0 ? void 0 : options.cc);
1796
+ if (isDevEmailEnvironment) {
1797
+ cc = cc.filter(function (email) { return email.match(/\@resolveio\.com/); });
1798
+ }
1799
+ if (isDevEmailEnvironment && !sendTo.match(/\@resolveio\.com/)) {
1781
1800
  sendTo = 'dev@resolveio.com';
1782
1801
  }
1783
1802
  normalizedSubject = subject || '';
@@ -1811,6 +1830,9 @@ var MethodManager = /** @class */ (function () {
1811
1830
  if (normalizedAttachments.length > 0) {
1812
1831
  allowGrouping = false;
1813
1832
  }
1833
+ if (cc.length > 0) {
1834
+ allowGrouping = false;
1835
+ }
1814
1836
  if (!(allowGrouping && occurrence && correlationId)) return [3 /*break*/, 2];
1815
1837
  return [4 /*yield*/, this.tryMergeEmailOccurrence(sendTo, finalSubject, correlationId, occurrence, options === null || options === void 0 ? void 0 : options.meta)];
1816
1838
  case 1:
@@ -1831,6 +1853,7 @@ var MethodManager = /** @class */ (function () {
1831
1853
  text: normalizedText,
1832
1854
  html: normalizedHtml,
1833
1855
  attachments: normalizedAttachments,
1856
+ cc: cc,
1834
1857
  send_from: send_from || '',
1835
1858
  reply_to: reply_to || '',
1836
1859
  status: 'pending',
@@ -1873,7 +1896,7 @@ var MethodManager = /** @class */ (function () {
1873
1896
  throw err_7;
1874
1897
  case 8: return [3 /*break*/, 10];
1875
1898
  case 9:
1876
- console.log('Send email', sendTo, finalSubject, normalizedText, normalizedHtml, attachments, send_from, force_ses, correlationId);
1899
+ console.log('Send email', sendTo, finalSubject, normalizedText, normalizedHtml, attachments, send_from, force_ses, correlationId, cc);
1877
1900
  return [2 /*return*/, true];
1878
1901
  case 10: return [3 /*break*/, 12];
1879
1902
  case 11: return [2 /*return*/, true];