@resolveio/server-lib 20.4.20 → 20.4.21
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.MethodResponses=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},id_user:{type:String},message_id:{type:Number},method:{type:String},response:{type:Object,blackbox:!0},date:{type:Date}};function initializeCollection(){var e;index_1.ResolveIOServer&&index_1.ResolveIOServer.getMainDB()?(e=new mongo_manager_1.MongoManagerModel({collectionName:"method-responses",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.MethodResponses=e.collection_main,exports.MethodResponses.createIndex({id_user:1,message_id:1
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.MethodResponses=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},id_user:{type:String},message_id:{type:Number},method:{type:String},response:{type:Object,blackbox:!0},date:{type:Date}};function initializeCollection(){var e;index_1.ResolveIOServer&&index_1.ResolveIOServer.getMainDB()?(e=new mongo_manager_1.MongoManagerModel({collectionName:"method-responses",schema:schema,useVersionCollection:!1,useReportBuilder:!1,reportBuilderLookupTables:[],timestamps:!0,createLogs:!1,checkSchema:!0,collectionOptions:null}),exports.MethodResponses=e.collection_main,exports.MethodResponses.createIndex({id_user:1,message_id:1}),exports.MethodResponses.createIndex({createdAt:1},{expireAfterSeconds:86400})):setTimeout(function(){initializeCollection()},1)}exports.MethodResponses=null,initializeCollection();
|
|
2
2
|
//# sourceMappingURL=method-response.collection.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":["index_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","id_user","message_id","method","response","Object","blackbox","date","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","MethodResponses","collection_main","createIndex","expireAfterSeconds","setTimeout"],"mappings":"mGAAA,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,QAAS,CACRR,KAAMC,M,EAEPQ,WAAY,CACXT,KAAMI,M,EAEPM,OAAQ,CACPV,KAAMC,M,EAEPU,SAAU,CACTX,KAAMY,OACNC,SAAU,CAAA,C,EAEXC,KAAM,CACLd,KAAMM,I,GAQR,SAASS,uBACR,IACOC,EADHrB,QAAAsB,iBAAmBtB,QAAAsB,gBAAgBC,UAAS,GACzCF,EAAQ,IAAInB,gBAAAsB,kBAAuC,CACxDC,eAAgB,mBAChBtB,OAAQA,OACRuB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,gBAAkBb,EAAMc,gBACxBF,QAAAC,gBAAgBE,YAAY,CAACvB,QAAS,EAAGC,WAAY,
|
|
1
|
+
{"version":3,"sources":["../../src/collections/method-response.collection.ts"],"names":["index_1","require","mongo_manager_1","schema","_id","type","String","optional","__v","Number","updatedAt","Date","createdAt","id_user","message_id","method","response","Object","blackbox","date","initializeCollection","model","ResolveIOServer","getMainDB","MongoManagerModel","collectionName","useVersionCollection","useReportBuilder","reportBuilderLookupTables","timestamps","createLogs","checkSchema","collectionOptions","exports","MethodResponses","collection_main","createIndex","expireAfterSeconds","setTimeout"],"mappings":"mGAAA,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,QAAS,CACRR,KAAMC,M,EAEPQ,WAAY,CACXT,KAAMI,M,EAEPM,OAAQ,CACPV,KAAMC,M,EAEPU,SAAU,CACTX,KAAMY,OACNC,SAAU,CAAA,C,EAEXC,KAAM,CACLd,KAAMM,I,GAQR,SAASS,uBACR,IACOC,EADHrB,QAAAsB,iBAAmBtB,QAAAsB,gBAAgBC,UAAS,GACzCF,EAAQ,IAAInB,gBAAAsB,kBAAuC,CACxDC,eAAgB,mBAChBtB,OAAQA,OACRuB,qBAAsB,CAAA,EACtBC,iBAAkB,CAAA,EAClBC,0BAA2B,GAC3BC,WAAY,CAAA,EACZC,WAAY,CAAA,EACZC,YAAa,CAAA,EACbC,kBAAmB,I,CACnB,EACDC,QAAAC,gBAAkBb,EAAMc,gBACxBF,QAAAC,gBAAgBE,YAAY,CAACvB,QAAS,EAAGC,WAAY,CAAC,CAAC,EACvDmB,QAAAC,gBAAgBE,YAAY,CAACxB,UAAW,CAAC,EAAG,CAACyB,mBAAoB,KAAK,CAAC,GAGvEC,WAAW,WACVlB,qBAAoB,CACrB,EAAG,CAAC,CAEN,CA1BWa,QAAAC,gBAA+D,KAE1Ed,qBAAoB","file":"method-response.collection.js","sourcesContent":["import { ResolveIOServer } from '../index';\nimport { MongoManagerCollection, MongoManagerModel } from '../managers/mongo.manager';\nimport { MethodResponseModel } from '../models/method-response.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\tid_user: {\n\t\ttype: String\n\t},\n\tmessage_id: {\n\t\ttype: Number\n\t},\n\tmethod: {\n\t\ttype: String\n\t},\n\tresponse: {\n\t\ttype: Object,\n\t\tblackbox: true\n\t},\n\tdate: {\n\t\ttype: Date\n\t}\n};\n\nexport let MethodResponses: MongoManagerCollection<MethodResponseModel> = null;\n\ninitializeCollection();\n\nfunction initializeCollection() {\n\tif (ResolveIOServer && ResolveIOServer.getMainDB()) {\n\t\tconst model = new MongoManagerModel<MethodResponseModel>({\n\t\t\tcollectionName: 'method-responses',\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\tMethodResponses = model.collection_main;\n\t\tMethodResponses.createIndex({id_user: 1, message_id: 1});\n\t\tMethodResponses.createIndex({createdAt: 1}, {expireAfterSeconds: 86400});\n\t}\n\telse {\n\t\tsetTimeout(() => {\n\t\t\tinitializeCollection();\n\t\t}, 1);\n\t}\n}"]}
|