@resolveio/server-lib 20.2.4 → 20.2.5
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.
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Notifications=void 0;var index_1=require("../index"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},config:{type:Object,blackbox:!0,optional:!0}};function initializeCollection(){var e;index_1.ResolveIOServer&&index_1.ResolveIOServer.getMainDB()?(e=new mongo_manager_1.MongoManagerModel({collectionName:"notifications",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.Notifications=e.collection_main):setTimeout(function(){initializeCollection()},1)}exports.Notifications=null,
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Notifications=void 0;var index_1=require("../index"),mongo_manager_1=require("../managers/mongo.manager"),schema={_id:{type:String,optional:!0},__v:{type:Number,optional:!0},updatedAt:{type:Date,optional:!0},createdAt:{type:Date,optional:!0},name:{type:String},config:{type:Object,blackbox:!0,optional:!0}};function initializeCollection(){var e;index_1.ResolveIOServer&&index_1.ResolveIOServer.getMainDB()?(e=new mongo_manager_1.MongoManagerModel({collectionName:"notifications",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.Notifications=e.collection_main,exports.Notifications.createIndex({name:{unique:!0}})):setTimeout(function(){initializeCollection()},1)}exports.Notifications=null,initializeCollection();
|
|
2
2
|
//# sourceMappingURL=notification.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":["index_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","config","Object","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","Notifications","collection_main","
|
|
1
|
+
{"version":3,"sources":["../../src/collections/notification.collection.ts"],"names":["index_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","name","config","Object","blackbox","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","Notifications","collection_main","createIndex","unique","setTimeout"],"mappings":"iGAAA,IAAAA,QAAAC,QAAA,UAAA,EACAC,gBAAAD,QAAA,2BAAA,EAGIE,OAAc,CACjBC,IAAK,CACJC,KAAMC,OACNC,SAAU,CAAA,C,EAEXC,IAAK,CACJH,KAAMI,OACNF,SAAU,CAAA,C,EAEXG,UAAW,CACVL,KAAMM,KACNJ,SAAU,CAAA,C,EAEXK,UAAW,CACVP,KAAMM,KACNJ,SAAU,CAAA,C,EAEXM,KAAM,CACLR,KAAMC,M,EAEPQ,OAAQ,CACPT,KAAMU,OACNC,SAAU,CAAA,EACVT,SAAU,CAAA,C,GAQZ,SAASU,uBACR,IACOC,EADHlB,QAAAmB,iBAAmBnB,QAAAmB,gBAAgBC,UAAS,GACzCF,EAAQ,IAAIhB,gBAAAmB,kBAAqC,CACtDC,eAAgB,gBAChBnB,OAAQA,OACRoB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,cAAgBb,EAAMc,gBACtBF,QAAAC,cAAcE,YAAY,CAACpB,KAAM,CAACqB,OAAQ,CAAA,CAAI,CAAC,CAAC,GAGhDC,WAAW,WACVlB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CAzBWa,QAAAC,cAA2D,KAEtEd,qBAAoB","file":"notification.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { NotificationModel } from '../models/notification.model';\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\tname: {\n\t\ttype: String\n\t},\n\tconfig: {\n\t\ttype: Object,\n\t\tblackbox: true,\n\t\toptional: true\n\t}\n};\n\nexport let Notifications: MongoManagerCollection<NotificationModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<NotificationModel>({\n\t\t\tcollectionName: 'notifications',\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});\n\t\tNotifications = model.collection_main;\n\t\tNotifications.createIndex({name: {unique: true}});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|