@resolveio/server-lib 20.12.31 → 20.12.33

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.
@@ -23,6 +23,26 @@ var schema = {
23
23
  collection_root: {
24
24
  type: String
25
25
  },
26
+ collection_joins: {
27
+ type: Array,
28
+ optional: true
29
+ },
30
+ 'collection_joins.$': {
31
+ type: Object
32
+ },
33
+ 'collection_joins.$.collection': {
34
+ type: String
35
+ },
36
+ 'collection_joins.$.alias': {
37
+ type: String,
38
+ optional: true
39
+ },
40
+ 'collection_joins.$.local_key': {
41
+ type: String
42
+ },
43
+ 'collection_joins.$.foreign_key': {
44
+ type: String
45
+ },
26
46
  report_name: {
27
47
  type: String
28
48
  },
@@ -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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AAoB,GAAqD,IAAI,CAAC;AAC9E,QAAA,2BAA2B,GAAqD,IAAI,CAAC;AAEhG,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,CAA2B;YAChE,cAAc,EAAE,wBAAwB;YACxC,MAAM,EAAE,MAAM;YACd,oBAAoB,EAAE,IAAI;YAC1B,gBAAgB,EAAE,KAAK;YACvB,yBAAyB,EAAE,EAAE;YAC7B,UAAU,EAAE,IAAI;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;IACxD,CAAC;SACI,CAAC;QACL,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACJ,CAAC;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,gBAAgB,EAAE;QACjB,IAAI,EAAE,KAAK;QACX,QAAQ,EAAE,IAAI;KACd;IACD,oBAAoB,EAAE;QACrB,IAAI,EAAE,MAAM;KACZ;IACD,+BAA+B,EAAE;QAChC,IAAI,EAAE,MAAM;KACZ;IACD,0BAA0B,EAAE;QAC3B,IAAI,EAAE,MAAM;QAC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,mCAA2B,GAAG,KAAK,CAAC,kBAAkB,CAAC;IACxD,CAAC;SACI,CAAC;QACL,YAAY,CAAC;YACZ,oBAAoB,EAAE,CAAC;QACxB,CAAC,CAAC,CAAC;IACJ,CAAC;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\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\toptional: true\n\t},\n\t'collection_joins.$.local_key': {\n\t\ttype: String\n\t},\n\t'collection_joins.$.foreign_key': {\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}\n"]}
@@ -316,7 +316,7 @@ function loadCronJobMethods(methodManager) {
316
316
  _k.label = 2;
317
317
  case 2:
318
318
  _k.trys.push([2, 43, , 44]);
319
- return [4 /*yield*/, this.callMethod('reportBuilderBuildTree', report.collection_root)];
319
+ return [4 /*yield*/, this.callMethod('reportBuilderBuildTree', report.collection_root, report.collection_joins || [])];
320
320
  case 3:
321
321
  collectionTree = _k.sent();
322
322
  if (!collectionTree) return [3 /*break*/, 42];