@resolveio/server-lib 20.10.1 → 20.10.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/collections/email-history.collection.js +18 -0
- package/collections/email-history.collection.js.map +1 -1
- package/collections/log.collection.js +4 -0
- package/collections/log.collection.js.map +1 -1
- package/collections/report-builder-report.collection.js +44 -0
- package/collections/report-builder-report.collection.js.map +1 -1
- package/managers/method.manager.d.ts +9 -1
- package/managers/method.manager.js +444 -178
- package/managers/method.manager.js.map +1 -1
- package/managers/subscription.manager.js +73 -29
- package/managers/subscription.manager.js.map +1 -1
- package/methods/logs.js +23 -4
- package/methods/logs.js.map +1 -1
- package/methods/report-builder.js +234 -2
- package/methods/report-builder.js.map +1 -1
- package/methods.ts +4 -4
- package/models/email-history.model.d.ts +11 -0
- package/models/email-history.model.js.map +1 -1
- package/models/log.model.d.ts +1 -0
- package/models/log.model.js.map +1 -1
- package/models/report-builder-report.model.d.ts +2 -0
- package/models/report-builder-report.model.js.map +1 -1
- package/models/report-builder.model.d.ts +14 -0
- package/models/report-builder.model.js.map +1 -1
- package/package.json +1 -1
- package/server-app.js +79 -36
- package/server-app.js.map +1 -1
- package/util/error-tracking.d.ts +13 -0
- package/util/error-tracking.js +121 -0
- package/util/error-tracking.js.map +1 -0
|
@@ -71,6 +71,24 @@ var schema = {
|
|
|
71
71
|
force_ses: {
|
|
72
72
|
type: Boolean,
|
|
73
73
|
optional: true
|
|
74
|
+
},
|
|
75
|
+
correlationId: {
|
|
76
|
+
type: String,
|
|
77
|
+
optional: true
|
|
78
|
+
},
|
|
79
|
+
meta: {
|
|
80
|
+
type: Object,
|
|
81
|
+
optional: true,
|
|
82
|
+
blackbox: true
|
|
83
|
+
},
|
|
84
|
+
occurrences: {
|
|
85
|
+
type: Array,
|
|
86
|
+
optional: true
|
|
87
|
+
},
|
|
88
|
+
'occurrences.$': {
|
|
89
|
+
type: Object,
|
|
90
|
+
optional: true,
|
|
91
|
+
blackbox: true
|
|
74
92
|
}
|
|
75
93
|
};
|
|
76
94
|
exports.EmailHistories = null;
|
|
@@ -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;QACP,IAAI,EAAE,MAAM;KACZ;IACD,KAAK,EAAE;QACN,IAAI,EAAE,MAAM;KACZ;IACD,YAAY,EAAE;QACb,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,IAAI;QACV,QAAQ,EAAE,IAAI;KACd;IACD,SAAS,EAAE;QACV,IAAI,EAAE,OAAO;QACb,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;QACxE,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;KACxC;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;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};\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}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\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,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,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;QACxE,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;KACxC;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;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\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}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;;AAAA,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7B,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,YAAI,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7B,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,EAAC,EAAE,EAAC,kBAAkB,EAAE,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,EAAE,EAAC,CAAC,CAAC;QAC1E,YAAI,CAAC,WAAW,CAAC,EAAC,SAAS,EAAE,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,WAAW,EAAE,CAAC,EAAC,CAAC,CAAC;KACtE;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"log.collection.js","sourcesContent":["import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { LogModel } from '../models/log.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\ttype: {\n\t\ttype: String\n\t},\n\tcollection: {\n\t\ttype: String\n\t},\n\tid_document: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\troute: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tinstance: {\n\t\ttype: String\n\t},\n\tinstance_index: {\n\t\ttype: String\n\t}\n};\n\nexport let Logs: MongoManagerCollection<LogModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<LogModel>({\n\t\t\tcollectionName: 'logs',\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\tLogs = model.collection_main;\n\t\tLogs.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 90});\n\t\tLogs.createIndex({createdAt: -1, client: 1, type: 1, id_document: 1});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/collections/log.collection.ts"],"names":[],"mappings":";;;AAAA,2DAAsF;AAEtF,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,MAAM;KACZ;IACD,UAAU,EAAE;QACX,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,OAAO,EAAE;QACR,IAAI,EAAE,MAAM;KACZ;IACD,MAAM,EAAE;QACP,IAAI,EAAE,MAAM;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AAC,CAAC,CAAC;KACtE;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"log.collection.js","sourcesContent":["import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { LogModel } from '../models/log.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\ttype: {\n\t\ttype: String\n\t},\n\tcollection: {\n\t\ttype: String\n\t},\n\tid_document: {\n\t\ttype: String\n\t},\n\tpayload: {\n\t\ttype: String\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tmessageId: {\n\t\ttype: Number\n\t},\n\troute: {\n\t\ttype: String\n\t},\n\tclient: {\n\t\ttype: String\n\t},\n\tinstance: {\n\t\ttype: String\n\t},\n\tinstance_index: {\n\t\ttype: String\n\t},\n\tcorrelationId: {\n\t\ttype: String,\n\t\toptional: true\n\t}\n};\n\nexport let Logs: MongoManagerCollection<LogModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<LogModel>({\n\t\t\tcollectionName: 'logs',\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\tLogs = model.collection_main;\n\t\tLogs.createIndex({createdAt: 1}, {expireAfterSeconds: 60 * 60 * 24 * 90});\n\t\tLogs.createIndex({createdAt: -1, client: 1, type: 1, id_document: 1});\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}\n"]}
|
|
@@ -115,6 +115,50 @@ var schema = {
|
|
|
115
115
|
date_interval: {
|
|
116
116
|
type: String,
|
|
117
117
|
optional: true
|
|
118
|
+
},
|
|
119
|
+
collection_joins: {
|
|
120
|
+
type: Array,
|
|
121
|
+
optional: true
|
|
122
|
+
},
|
|
123
|
+
'collection_joins.$': {
|
|
124
|
+
type: Object
|
|
125
|
+
},
|
|
126
|
+
'collection_joins.$.collection': {
|
|
127
|
+
type: String
|
|
128
|
+
},
|
|
129
|
+
'collection_joins.$.alias': {
|
|
130
|
+
type: String
|
|
131
|
+
},
|
|
132
|
+
'collection_joins.$.rootFieldPath': {
|
|
133
|
+
type: String
|
|
134
|
+
},
|
|
135
|
+
'collection_joins.$.foreignField': {
|
|
136
|
+
type: String
|
|
137
|
+
},
|
|
138
|
+
'collection_joins.$.aggregations': {
|
|
139
|
+
type: Array
|
|
140
|
+
},
|
|
141
|
+
'collection_joins.$.aggregations.$': {
|
|
142
|
+
type: Object
|
|
143
|
+
},
|
|
144
|
+
'collection_joins.$.aggregations.$.fieldPath': {
|
|
145
|
+
type: String,
|
|
146
|
+
optional: true
|
|
147
|
+
},
|
|
148
|
+
'collection_joins.$.aggregations.$.operator': {
|
|
149
|
+
type: String,
|
|
150
|
+
allowedValues: ['sum', 'avg', 'min', 'max', 'count']
|
|
151
|
+
},
|
|
152
|
+
'collection_joins.$.aggregations.$.alias': {
|
|
153
|
+
type: String
|
|
154
|
+
},
|
|
155
|
+
'collection_joins.$.matchFilters': {
|
|
156
|
+
type: Array,
|
|
157
|
+
optional: true
|
|
158
|
+
},
|
|
159
|
+
'collection_joins.$.matchFilters.$': {
|
|
160
|
+
type: Object,
|
|
161
|
+
blackbox: true
|
|
118
162
|
}
|
|
119
163
|
};
|
|
120
164
|
exports.ReportBuilderReports = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/report-builder-report.collection.ts"],"names":[],"mappings":";;;AAAA,2DAAsF;AAEtF,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,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,KAAK;KACX;IACD,iBAAiB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,aAAa,EAAE;QACd,IAAI,EAAE,KAAK;KACX;IACD,iBAAiB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,KAAK;KACX;IACD,mBAAmB,EAAE;QACpB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,YAAY,EAAE;QACb,IAAI,EAAE,KAAK;KACX;IACD,gBAAgB,EAAE;QACjB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;K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YAChB,UAAU,EAAE,IAAI;YAChB,WAAW,EAAE,IAAI;YACjB,iBAAiB,EAAE,IAAI;SACvB,CAAC,CAAC;QACH,4BAAoB,GAAG,KAAK,CAAC,eAAe,CAAC;QAC7C,4BAAoB,CAAC,WAAW,CAAC,EAAC,OAAO,EAAE,CAAC,EAAC,CAAC,CAAC;QAC/C,4BAAoB,CAAC,WAAW,CAAC,EAAC,YAAY,EAAE,CAAC,EAAC,CAAC,CAAC;QACpD,4BAAoB,CAAC,WAAW,CAAC,EAAC,WAAW,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAC,CAAC,CAAC;QACvE,mCAA2B,GAAG,KAAK,CAAC,kBAAkB,CAAC;KACvD;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"report-builder-report.collection.js","sourcesContent":["import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderReportModel } from '../models/report-builder-report.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\tcollection_root: {\n\t\ttype: String\n\t},\n\treport_name: {\n\t\ttype: String\n\t},\n\tfields_sort: {\n\t\ttype: Array\n\t},\n\t'fields_sort.$': {\n\t\ttype: Object\n\t},\n\t'fields_sort.$.field': {\n\t\ttype: String\n\t},\n\t'fields_sort.$.order': {\n\t\ttype: String\n\t},\n\tfields_filter: {\n\t\ttype: Array\n\t},\n\t'fields_filter.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_custom: {\n\t\ttype: Array\n\t},\n\t'fields_custom.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_selected: {\n\t\ttype: Array\n\t},\n\t'fields_selected.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_total: {\n\t\ttype: Array\n\t},\n\t'fields_total.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_link: {\n\t\ttype: Array\n\t},\n\t'fields_link.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate_created: {\n\t\ttype: Date\n\t},\n\tshared_users: {\n\t\ttype: Array\n\t},\n\t'shared_users.$': {\n\t\ttype: String\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tgroups_row: {\n\t\ttype: Array\n\t},\n\t'groups_row.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroups_column: {\n\t\ttype: Array\n\t},\n\t'groups_column.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroup_type: {\n\t\ttype: String\n\t},\n\tid_date_field: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdate_interval: {\n\t\ttype: String,\n\t\toptional: true\n\t}\n};\n\nexport let ReportBuilderReports: MongoManagerCollection<ReportBuilderReportModel> = null;\nexport let ReportBuilderReportVersions: MongoManagerCollection<ReportBuilderReportModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<ReportBuilderReportModel>({\n\t\t\tcollectionName: 'report-builder-reports',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderReports = model.collection_main;\n\t\tReportBuilderReports.createIndex({id_user: 1});\n\t\tReportBuilderReports.createIndex({shared_users: 1});\n\t\tReportBuilderReports.createIndex({report_name: 1, collection_root: 1});\n\t\tReportBuilderReportVersions = model.collection_version;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}"]}
|
|
1
|
+
{"version":3,"sources":["../../src/collections/report-builder-report.collection.ts"],"names":[],"mappings":";;;AAAA,2DAAsF;AAEtF,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,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,MAAM;KACZ;IACD,WAAW,EAAE;QACZ,IAAI,EAAE,KAAK;KACX;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;IACD,qBAAqB,EAAE;QACtB,IAAI,EAAE,MAAM;KACZ;IACD,aAAa,EAAE;QACd,IAAI,EAAE,KAAK;KACX;IACD,iBAAiB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,aAAa,EAAE;QACd,IAAI,EAAE,KAAK;KACX;IACD,iBAAiB,EAAE;QAClB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,eAAe,EAAE;QAChB,IAAI,EAAE,KAAK;KACX;IACD,mBAAmB,EAAE;QACpB,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACd;IACD,YAAY,EAAE;QACb,IAAI,EAAE,KA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,EAAE,CAAC,EAAE,eAAe,EAAE,CAAC,EAAC,CAAC,CAAC;QACvE,mCAA2B,GAAG,KAAK,CAAC,kBAAkB,CAAC;KACvD;SACI;QACJ,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;KACH;AACF,CAAC","file":"report-builder-report.collection.js","sourcesContent":["import { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { ReportBuilderReportModel } from '../models/report-builder-report.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\tcollection_root: {\n\t\ttype: String\n\t},\n\treport_name: {\n\t\ttype: String\n\t},\n\tfields_sort: {\n\t\ttype: Array\n\t},\n\t'fields_sort.$': {\n\t\ttype: Object\n\t},\n\t'fields_sort.$.field': {\n\t\ttype: String\n\t},\n\t'fields_sort.$.order': {\n\t\ttype: String\n\t},\n\tfields_filter: {\n\t\ttype: Array\n\t},\n\t'fields_filter.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_custom: {\n\t\ttype: Array\n\t},\n\t'fields_custom.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_selected: {\n\t\ttype: Array\n\t},\n\t'fields_selected.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_total: {\n\t\ttype: Array\n\t},\n\t'fields_total.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tfields_link: {\n\t\ttype: Array\n\t},\n\t'fields_link.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tid_user: {\n\t\ttype: String\n\t},\n\tuser: {\n\t\ttype: String\n\t},\n\tdate_created: {\n\t\ttype: Date\n\t},\n\tshared_users: {\n\t\ttype: Array\n\t},\n\t'shared_users.$': {\n\t\ttype: String\n\t},\n\ttype: {\n\t\ttype: String\n\t},\n\tgroups_row: {\n\t\ttype: Array\n\t},\n\t'groups_row.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroups_column: {\n\t\ttype: Array\n\t},\n\t'groups_column.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tgroup_type: {\n\t\ttype: String\n\t},\n\tid_date_field: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tdate_interval: {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\tcollection_joins: {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'collection_joins.$': {\n\t\ttype: Object\n\t},\n\t'collection_joins.$.collection': {\n\t\ttype: String\n\t},\n\t'collection_joins.$.alias': {\n\t\ttype: String\n\t},\n\t'collection_joins.$.rootFieldPath': {\n\t\ttype: String\n\t},\n\t'collection_joins.$.foreignField': {\n\t\ttype: String\n\t},\n\t'collection_joins.$.aggregations': {\n\t\ttype: Array\n\t},\n\t'collection_joins.$.aggregations.$': {\n\t\ttype: Object\n\t},\n\t'collection_joins.$.aggregations.$.fieldPath': {\n\t\ttype: String,\n\t\toptional: true\n\t},\n\t'collection_joins.$.aggregations.$.operator': {\n\t\ttype: String,\n\t\tallowedValues: ['sum', 'avg', 'min', 'max', 'count']\n\t},\n\t'collection_joins.$.aggregations.$.alias': {\n\t\ttype: String\n\t},\n\t'collection_joins.$.matchFilters': {\n\t\ttype: Array,\n\t\toptional: true\n\t},\n\t'collection_joins.$.matchFilters.$': {\n\t\ttype: Object,\n\t\tblackbox: true\n\t}\n};\n\nexport let ReportBuilderReports: MongoManagerCollection<ReportBuilderReportModel> = null;\nexport let ReportBuilderReportVersions: MongoManagerCollection<ReportBuilderReportModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB() && MongoManagerModel) {\n\t\tconst model = MongoManagerModel.create<ReportBuilderReportModel>({\n\t\t\tcollectionName: 'report-builder-reports',\n\t\t\tschema: schema,\n\t\t\tuseVersionCollection: true,\n\t\t\tuseReportBuilder: false,\n\t\t\treportBuilderLookupTables: [],\n\t\t\ttimestamps: true,\n\t\t\tcreateLogs: true,\n\t\t\tcheckSchema: true,\n\t\t\tcollectionOptions: null\n\t\t});\n\t\tReportBuilderReports = model.collection_main;\n\t\tReportBuilderReports.createIndex({id_user: 1});\n\t\tReportBuilderReports.createIndex({shared_users: 1});\n\t\tReportBuilderReports.createIndex({report_name: 1, collection_root: 1});\n\t\tReportBuilderReportVersions = model.collection_version;\n\t}\n\telse {\n\t\tsetImmediate(() => {\n\t\t\tinitializeCollection();\n\t\t});\n\t}\n}\n"]}
|
|
@@ -3,6 +3,10 @@ import { EmailHistoryModel } from '../models/email-history.model';
|
|
|
3
3
|
import { MethodAllModel, MethodModel } from '../models/method.model';
|
|
4
4
|
import { MonitorManagerFunction } from './monitor.manager';
|
|
5
5
|
import { WebSocketManager } from './websocket.manager';
|
|
6
|
+
interface SendEmailOptions {
|
|
7
|
+
correlationId?: string;
|
|
8
|
+
meta?: Record<string, any>;
|
|
9
|
+
}
|
|
6
10
|
export declare class AWS {
|
|
7
11
|
private _s3;
|
|
8
12
|
private _s3USEast1;
|
|
@@ -23,6 +27,7 @@ export declare class MethodManager {
|
|
|
23
27
|
private _isWorkerInstance;
|
|
24
28
|
private emailQueue;
|
|
25
29
|
private isEmailProcessing;
|
|
30
|
+
private readonly _emailProcessingDelayMs;
|
|
26
31
|
private _debugcallMethodHits;
|
|
27
32
|
private _debugCallMethodHits;
|
|
28
33
|
private _debugCallMethodCronJobHits;
|
|
@@ -37,14 +42,17 @@ export declare class MethodManager {
|
|
|
37
42
|
methods(method: MethodModel): void;
|
|
38
43
|
callMethodCron(method: string, ...methodData: any[]): Promise<any>;
|
|
39
44
|
callMethod(methodName: string, ...methodData: any[]): Promise<any>;
|
|
45
|
+
private callMethodInternal;
|
|
40
46
|
setupEmailWatcher(): void;
|
|
41
47
|
loadPendingEmails(): Promise<void>;
|
|
42
48
|
tryProcessEmail(): Promise<void>;
|
|
43
49
|
safeStringify(obj: any): string;
|
|
44
50
|
getCircularReplacer(): (key: any, value: any) => any;
|
|
45
|
-
|
|
51
|
+
private tryMergeEmailOccurrence;
|
|
52
|
+
sendEmail(sendTo: string, subject: string, text?: string | null, html?: string | null, attachments?: any[] | null, send_from?: string | null, reply_to?: string | null, force_ses?: boolean, local_override?: boolean, options?: SendEmailOptions): Promise<true | EmailHistoryModel>;
|
|
46
53
|
getAWS(): AWS;
|
|
47
54
|
readFile(fileName: any): string;
|
|
48
55
|
readImage(fileName: any): string;
|
|
49
56
|
getEnableDebug(): boolean;
|
|
50
57
|
}
|
|
58
|
+
export {};
|