@tiledesk/tiledesk-server 2.4.102 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,18 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
+ # 2.5.0
9
+ - Added new pricing modules
10
+ - Added integrations route
11
+ - Added new kb route
12
+ - Added mqttTest module
13
+
14
+ # 2.4.103
15
+ - Added new pricing modules
16
+ - Added integrations route
17
+ - Added new kb route
18
+ - Added mqttTest module
19
+
8
20
  # 2.4.102
9
21
  - Updated whatsapp-connector to 0.1.63
10
22
  - Updated messenger-connector to 0.1.17
package/deploy.sh CHANGED
@@ -1,5 +1,5 @@
1
1
  git pull
2
- npm version patch
2
+ npm version minor
3
3
  version=`node -e 'console.log(require("./package.json").version)'`
4
4
  echo "version $version"
5
5
 
package/models/profile.js CHANGED
@@ -5,7 +5,7 @@ var winston = require('../config/winston');
5
5
  var ProfileSchema = new Schema({
6
6
  name: {
7
7
  type: String,
8
- default: 'free',
8
+ default: 'Sandbox',
9
9
  index: true
10
10
  },
11
11
  trialDays: {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@tiledesk/tiledesk-server",
3
3
  "description": "The Tiledesk server module",
4
- "version": "2.4.102",
4
+ "version": "2.5.0",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
@@ -45,10 +45,11 @@
45
45
  "@tiledesk/tiledesk-messenger-connector": "^0.1.17",
46
46
  "@tiledesk/tiledesk-rasa-connector": "^1.0.10",
47
47
  "@tiledesk/tiledesk-telegram-connector": "^0.1.10",
48
- "@tiledesk/tiledesk-tybot-connector": "^0.2.50",
48
+ "@tiledesk/tiledesk-tybot-connector": "^0.2.54",
49
49
  "@tiledesk/tiledesk-whatsapp-connector": "^0.1.63",
50
50
  "@tiledesk/tiledesk-whatsapp-jobworker": "^0.0.7",
51
51
  "@tiledesk/tiledesk-chatbot-templates": "^0.1.2",
52
+ "@tiledesk/tiledesk-client": "^0.10.10",
52
53
  "amqplib": "^0.5.5",
53
54
  "app-root-path": "^3.0.0",
54
55
  "bcrypt-nodejs": "0.0.3",
@@ -0,0 +1,7 @@
1
+ const listener = require("./listener");
2
+
3
+ const mqttTest = require("@tiledesk/tiledesk-client/mqtt-route");
4
+ const mqttTestRoute = mqttTest.router;
5
+
6
+
7
+ module.exports = { listener: listener, mqttTestRoute: mqttTestRoute }
@@ -0,0 +1,31 @@
1
+ const mqttTest = require("@tiledesk/tiledesk-client/mqtt-route");
2
+ var winston = require('../../config/winston');
3
+ var configGlobal = require('../../config/global');
4
+
5
+ const apiUrl = process.env.API_URL || configGlobal.apiUrl;
6
+ winston.info('MqttTest apiUrl: ' + apiUrl);
7
+
8
+ class Listener {
9
+
10
+ listen(config) {
11
+ winston.info("MqttTest Listener listen");
12
+
13
+ let log = process.env.MQTT_TEST_LOG || false;
14
+ winston.info("mqtt log: " + log);
15
+
16
+ mqttTest.startApp({
17
+ LOG_STATUS: log
18
+ }, (err) => {
19
+ if (!err) {
20
+ winston.info("Tiledesk mqtt-test succesfully started.");
21
+ } else {
22
+ winston.info("unable to start Tiledesk mqtt-test. " + err);
23
+ }
24
+ })
25
+
26
+ }
27
+ }
28
+
29
+ var listener = new Listener();
30
+
31
+ module.exports = listener;
@@ -33,6 +33,9 @@ class PubModulesManager {
33
33
  this.telegram = undefined;
34
34
  this.telegramRoute = undefined;
35
35
 
36
+ this.mqttTest = undefined;
37
+ this.mqttTestRoute = undefined;
38
+
36
39
  this.templates = undefined;
37
40
  this.templatesRoute = undefined;
38
41
 
@@ -88,6 +91,10 @@ class PubModulesManager {
88
91
  app.use('/modules/telegram', this.telegramRoute);
89
92
  winston.info("PubModulesManager telegramRoute controller loaded");
90
93
  }
94
+ if (this.mqttTestRoute) {
95
+ app.use('/modules/mqttTest', this.mqttTestRoute);
96
+ winston.info("PubModulesManager mqttTestRoute controller loaded");
97
+ }
91
98
  if (this.templatesRoute) {
92
99
  app.use('/modules/templates', this.templatesRoute);
93
100
  winston.info("PubModulesManager templatesRoute controller loaded");
@@ -324,6 +331,22 @@ class PubModulesManager {
324
331
  }
325
332
  }
326
333
 
334
+ try {
335
+ this.mqttTest = require('./mqttTest');
336
+ winston.info("this.mqttTest: " + this.mqttTest);
337
+ this.mqttTest.listener.listen(config);
338
+
339
+ this.mqttTestRoute = this.mqttTest.mqttTestRoute;
340
+
341
+ winston.info("PubModulesManager initialized apps (mqttTest).")
342
+ } catch(err) {
343
+ if (err.code == 'MODULE_NOT_FOUND') {
344
+ winston.info("PubModulesManager init apps module not found ", err);
345
+ } else {
346
+ winston.info("PubModulesManager error initializing init apps module", err);
347
+ }
348
+ }
349
+
327
350
  try {
328
351
  this.templates = require('./chatbotTemplates');
329
352
  winston.info("this.templates: " + this.templates);
@@ -1,2 +1,2 @@
1
- const _0x59ee=['exports'];(function(_0x207a31,_0x59ee2){const _0x4c8d1f=function(_0x580bf7){while(--_0x580bf7){_0x207a31['push'](_0x207a31['shift']());}};_0x4c8d1f(++_0x59ee2);}(_0x59ee,0xec));const _0x4c8d=function(_0x207a31,_0x59ee2){_0x207a31=_0x207a31-0x0;let _0x4c8d1f=_0x59ee[_0x207a31];return _0x4c8d1f;};const stripeRoute=require('./stripe/index');module[_0x4c8d('0x0')]={'stripeRoute':stripeRoute};
2
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBheW1lbnRzL2luZGV4LmpzIl0sIm5hbWVzIjpbInN0cmlwZVJvdXRlIiwicmVxdWlyZSIsIm1vZHVsZSJdLCJtYXBwaW5ncyI6IndUQUFBLE1BQU1BLFdBQUEsQ0FBY0MsT0FBQSxDLGdCQUFBLENBQXBCLENBQ0FDLE1BQUEsQyxjQUFBLEVBQWlCLEMsYUFBQyxDQUFZRixXQUFiLENBQWpCIiwic291cmNlc0NvbnRlbnQiOlsiY29uc3Qgc3RyaXBlUm91dGUgPSByZXF1aXJlKFwiLi9zdHJpcGUvaW5kZXhcIik7XG5tb2R1bGUuZXhwb3J0cyA9IHtzdHJpcGVSb3V0ZTpzdHJpcGVSb3V0ZX07XG5cbi8vIHYxNC4xOC4wIl0sImZpbGUiOiJwYXltZW50cy9pbmRleC5qcyJ9
1
+ const _0x16c4=['exports','./stripe/index'];(function(_0x586845,_0x16c4fe){const _0x425c71=function(_0x2d5d57){while(--_0x2d5d57){_0x586845['push'](_0x586845['shift']());}};_0x425c71(++_0x16c4fe);}(_0x16c4,0x1d7));const _0x425c=function(_0x586845,_0x16c4fe){_0x586845=_0x586845-0x0;let _0x425c71=_0x16c4[_0x586845];return _0x425c71;};const stripeRoute=require(_0x425c('0x0'));module[_0x425c('0x1')]={'stripeRoute':stripeRoute};
2
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBheW1lbnRzL2luZGV4LmpzIl0sIm5hbWVzIjpbInN0cmlwZVJvdXRlIiwicmVxdWlyZSIsIm1vZHVsZSJdLCJtYXBwaW5ncyI6IjZVQUFBLE1BQU1BLFdBQUEsQ0FBY0MsT0FBQSxDLGNBQUEsQ0FBcEIsQ0FDQUMsTUFBQSxDLGNBQUEsRUFBaUIsQyxhQUFDLENBQVlGLFdBQWIsQ0FBakIiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBzdHJpcGVSb3V0ZSA9IHJlcXVpcmUoXCIuL3N0cmlwZS9pbmRleFwiKTtcbm1vZHVsZS5leHBvcnRzID0ge3N0cmlwZVJvdXRlOnN0cmlwZVJvdXRlfTtcblxuLy8gdjE0LjE4LjAiXSwiZmlsZSI6InBheW1lbnRzL2luZGV4LmpzIn0=
@@ -1,2 +1,2 @@
1
- var _0x1947=['***\x20***\x20!!!!!!!!!!!!!!!!!!!!!!\x20checkout.session.completed\x20-\x20subscription\x20ID:\x20','***\x20***\x20»»»\x20»»»\x20customer.subscription.deleted\x20subscriptionPayment\x20','subscriptionid','subscription_create','stripe\x20client_reference_id','debug','PAYMENT_STRIPE_APIKEY','--\x20>\x20cancelsubscription\x20\x20err\x20','customer.subscription.deleted\x20event\x20','body-parser','unix','»»»\x20»»»\x20\x20paymentMethod\x20create\x20\x20error\x20','***\x20***\x20checkout.session.completed\x20-\x20getSubscritionById\x20***\x20start\x20***\x20:\x20','sessionid','***\x20***\x20checkout.session.completed\x20-\x20quantity\x20use\x20case\x20length\x20==\x201\x20:\x20','***\x20***\x20invoice.payment_succeeded\x20-\x20end:\x20','lines','detachPaymentFunct\x20>\x20paymentMethodid\x20','catch','get\x20PaymentMethods\x20list\x20>\x20paymentMethods\x20','del','list','object','end','--\x20>\x20checkoutSession\x20params.sessionid\x20','billing_reason','/cancelsubscription','!!!!!!!!\x20HI\x20!!!!!!!!\x20checkout.session.completed','***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20-\x20userId:\x20','plan_name','customerid','\x20!!!!!!!!\x20HI\x20!!!!!!!!!!!\x20customer.subscription.deleted','params','authenticate','detach','exec','/webhook','get\x20PaymentMethods\x20list\x20req.params','then','current_period_start','start','customers','***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20subsptn_payment\x20not\x20subsptn_payment','--\x20>\x20subscription\x20get\x20by\x20id\x20freq.params.subscriptionid\x20','project_id','/payment_methods/:customerid','info','--\x20>\x20updatesubscription\x20\x20project\x20','expiration_date_month','Error\x20saving\x20object.','checkout','stripe\x20plan_name:\x20','***\x20***\x20checkout.session.completed\x20-\x20quantity\x20use\x20case\x20length\x20>\x201\x20:\x20','previous_attributes','***\x20***\x20invoice.payment_succeeded\x20-\x20index:\x20','find','\x20!!!!!!!!\x20HI\x20!!!!!!!!!!!\x20customer.subscription.updated\x20\x20subscription_id','stripe\x20user_id:','***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20subsptn_payment:\x20','subscriptions','Types','error','put','credit_card_num','\x20!!!!!!!!\x20HI\x20!!!!!!!!!!!\x20customer.subscription.updated','/checkoutSession/:sessionid','subscriptionId','basic','customer.subscription.deleted\x20subscriptionPayment\x20user\x20id:\x20','rawBody','/customer/:projectid','»»»\x20»»»\x20updatesubscription\x20projectid','***\x20***\x20invoice.payment_succeeded\x20-\x20typeOf\x20index\x20:','»»»»\x20stripe\x20endpointSecret:\x20','--\x20>\x20get\x20customer\x20from\x20db\x20>\x20customer\x20+\x20paymentMethods\x20','free','--\x20>\x20get\x20customer\x20from\x20db\x20>\x20customer\x20from\x20stripe\x20API\x20','log','update','asc','»»»\x20»»»\x20\x20paymentMethod\x20attached\x20\x20error\x20','quantity','»»»\x20»»»\x20get\x20customer\x20from\x20db\x20-\x20projectid','»»»\x20»»»\x20get\x20customer\x20from\x20db\x20','mongoose','***\x20***\x20invoice.payment_succeeded\x20-\x20BILLING\x20REASON\x20','***\x20***\x20invoice.payment_succeeded\x20-\x20subscription\x20ID:\x20','create','---\x20>\x20ERROR\x20','customer','profile','current_period_end','***\x20***\x20invoice.payment_succeeded\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20-\x20plan_name:\x20','period','post','--\x20>\x20subscription\x20get\x20by\x20id\x20from\x20stripe\x20\x20err\x20','--\x20>\x20checkoutSession\x20get\x20by\x20id\x20from\x20stripe\x20\x20err\x20','credit_card_cvc','Router','--\x20>\x20GET\x20SUBSCRIPTION\x20PAYMENTS\x20ERRORt\x20','get','stripe\x20apiKey','/stripesubs/:subscriptionid','constructEvent','»»»»\x20stripe\x20apiKey:\x20','paymentMethods','expiration_date_year','***\x20***\x20invoice.payment_succeeded\x20-\x20linesNum:\x20','***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20-\x20projectId:\x20\x20','»»»\x20»»»\x20\x20paymentMethod\x20attached\x20','/updatesubscription','webhooks','type','data','get\x20PaymentMethods\x20list\x20>\x20paymentMethods\x20>\x20paymentMethods.data\x20','»»»\x20»»»\x20\x20update\x20customer\x20-\x20customerid\x20from\x20params\x20','express','ObjectId','moment','***\x20***\x20subscription\x20ID\x20','send','--\x20>\x20updatesubscription\x20Error\x20getting\x20project\x20','»»»\x20»»»\x20\x20update\x20customer\x20-\x20cc\x20from\x20body\x20','»»»\x20»»»\x20cancelsubscription\x20userid','user_id','***\x20***\x20checkout.session.completed\x20-\x20getSubscritionById\x20err\x20','***\x20***\x20checkout.session.completed\x20-\x20getSubscription\x20***\x20end\x20***\x20:\x20','invoice.payment_succeeded','stripe\x20sig:\x20','client_reference_id','split','YYYY-MM-DDTHH:mm:ss.SSS','--\x20>\x20checkoutSession\x20get\x20by\x20id\x20from\x20stripe\x20','total_count','get\x20PaymentMethods\x20list\x20>\x20paymentMethods\x20>\x20default_payment_method_id\x20','--\x20>\x20get\x20customer\x20from\x20db\x20-\x20Error\x20','passport','retrieve','updateProjectProfile\x20Error\x20','invoice_settings','stripe\x20project_id:\x20','get\x20PaymentMethods\x20list\x20req.params\x20>\x20customer_id\x20','PAYMENT_STRIPE_SECRET','»»»»»»»»»\x20updateProjectProfile\x20updatedProject\x20','stripe','/customers/:customerid','detachPaymentFunc\x20result\x20','card','stripe\x20event','json','stripe\x20endpointSecret','jwt','../../../config/winston','Webhook\x20Error:\x20','checkout.session.completed','--\x20>\x20cancelsubscription\x20Error\x20getting\x20project\x20','****\x20Stripe\x20error\x20constructEvent:\x20','--\x20>\x20subscription\x20get\x20by\x20id\x20from\x20stripe\x20','payment','status','format','customer.subscription.deleted\x20subscriptionPayment\x20project\x20id:\x20','subscription','length','***\x20***\x20checkout.session.completed\x20-\x20quantity\x20:\x20','PAYMENT_STRIPE_API_SECRET_KEY','../../../models/project','customer.subscription.deleted','env','stripe\x20checkout.session.completed','save','»»»\x20»»»\x20updatesubscription\x20userid','***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20-\x20err\x20','findOne','body','attach','\x20!!!!!!!!\x20HI\x20!!!!!!!!!!!\x20customer.subscription.updated\x20\x20subscription_qty\x20','\x20!!!!!!!!\x20HI\x20!!!!!!!!!!!\x20customer.subscription.updated\x20\x20subscription_previous_qty','projectid'];(function(_0x4eaf44,_0x194726){var _0x4e96f8=function(_0x23307a){while(--_0x23307a){_0x4eaf44['push'](_0x4eaf44['shift']());}};_0x4e96f8(++_0x194726);}(_0x1947,0x1ae));var _0x4e96=function(_0x4eaf44,_0x194726){_0x4eaf44=_0x4eaf44-0x0;var _0x4e96f8=_0x1947[_0x4eaf44];return _0x4e96f8;};var express=require(_0x4e96('0x2c'));var router=express[_0x4e96('0x1a')]();var winston=require(_0x4e96('0x50'));var Project=require(_0x4e96('0x5e'));var SubscriptionPayment=require('../models/subscription-payment');var moment=require(_0x4e96('0x2e'));var mongoose=require(_0x4e96('0xc'));var passport=require(_0x4e96('0x40'));require('../../../middleware/passport')(passport);var validtoken=require('../../../middleware/valid-token');const apiKey=process['env'][_0x4e96('0x71')];winston[_0x4e96('0x70')](_0x4e96('0x1d')+apiKey);const stripe=require(_0x4e96('0x48'))(apiKey);const endpointSecret=process[_0x4e96('0x60')][_0x4e96('0x46')];winston[_0x4e96('0x70')](_0x4e96('0x4e')+endpointSecret);const apiSecretKey=process['env'][_0x4e96('0x5d')];winston[_0x4e96('0x70')]('stripe\x20apiSecretKey'+apiSecretKey);const bodyParser=require(_0x4e96('0x74'));router[_0x4e96('0x16')](_0x4e96('0x8f'),bodyParser['raw']({'type':'application/json'}),function(_0x1ac966,_0x43ecfb){winston['debug'](_0x4e96('0x1')+endpointSecret);winston[_0x4e96('0x70')](_0x4e96('0x20')+apiKey);winston['debug']('stripe\x20apiSecretKey'+apiSecretKey);const _0x9010b5=_0x1ac966['headers']['stripe-signature'];winston[_0x4e96('0x70')](_0x4e96('0x38'),_0x9010b5);let _0x479b68;try{_0x479b68=stripe[_0x4e96('0x27')][_0x4e96('0x1f')](_0x1ac966[_0x4e96('0xb0')],_0x9010b5,endpointSecret);}catch(_0x3b400a){winston['error'](_0x4e96('0x54'),_0x3b400a['message']);return _0x43ecfb[_0x4e96('0x57')](0x190)['send'](_0x4e96('0x51')+_0x3b400a['message']);}winston[_0x4e96('0x99')](_0x4e96('0x4c'),_0x479b68);if(_0x479b68['type']===_0x4e96('0x52')){winston['debug'](_0x4e96('0x86'));const _0x2bc880=_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')];winston[_0x4e96('0x99')](_0x4e96('0x61'),_0x2bc880);var _0x536548=_0x2bc880[_0x4e96('0x39')];winston['info'](_0x4e96('0x6f'),_0x536548);var _0x2df397=_0x536548[_0x4e96('0x3a')]('_')[0x0];winston[_0x4e96('0x99')](_0x4e96('0xa4')+_0x2df397);var _0x2b9abf=_0x536548[_0x4e96('0x3a')]('_')[0x1];winston[_0x4e96('0x99')](_0x4e96('0x44')+_0x2b9abf);var _0x56cbeb=_0x536548['split']('_')[0x2];winston[_0x4e96('0x99')](_0x4e96('0x9e')+_0x56cbeb);var _0x2716eb=_0x479b68['data'][_0x4e96('0x81')][_0x4e96('0x5a')];winston[_0x4e96('0x99')](_0x4e96('0x6b'),_0x2716eb);getSubscritionById(_0x2716eb)[_0x4e96('0x91')](function(_0x1bbeea){var _0x2c49ac=_0x1bbeea[_0x4e96('0x81')];winston[_0x4e96('0x99')]('***\x20***\x20checkout.session.completed\x20-\x20getSubscritionById\x20subscr\x20object_type:\x20',_0x2c49ac);var _0x40f3e3=moment['unix'](_0x1bbeea[_0x4e96('0x92')])[_0x4e96('0x58')](_0x4e96('0x3b'));winston[_0x4e96('0x99')](_0x4e96('0x77'),_0x40f3e3);var _0x31dc33=moment['unix'](_0x1bbeea['current_period_end'])[_0x4e96('0x58')](_0x4e96('0x3b'));winston[_0x4e96('0x99')](_0x4e96('0x36'),_0x31dc33);var _0x266dcb=_0x1bbeea['quantity'];winston['info'](_0x4e96('0x5c'),_0x266dcb);var _0x4e4404={'profile':{'name':_0x56cbeb,'type':_0x4e96('0x56'),'subscription_creation_date':_0x40f3e3,'subStart':_0x40f3e3,'subEnd':_0x31dc33,'subscriptionId':_0x2716eb,'last_stripe_event':_0x479b68['type'],'agents':_0x266dcb}};updateProjectProfile(_0x2b9abf,_0x4e4404);saveOnDB(_0x2716eb,_0x2b9abf,_0x1bbeea,_0x2df397,_0x479b68[_0x4e96('0x28')],_0x56cbeb);})[_0x4e96('0x7d')](function(_0x355012){winston[_0x4e96('0xa8')](_0x4e96('0x35'),_0x355012);});}if(_0x479b68['type']===_0x4e96('0x37')){winston['info']('\x20!!!!!!!!\x20HI\x20!!!!!!!!\x20invoice.payment_succeeded');winston['info'](_0x4e96('0xd'),_0x479b68[_0x4e96('0x29')]['object'][_0x4e96('0x84')]);var _0x505436=_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')][_0x4e96('0x7b')][_0x4e96('0x3d')];console[_0x4e96('0x5')](_0x4e96('0x23'),_0x505436);var _0x157fce=_0x505436-0x1;console[_0x4e96('0x5')](_0x4e96('0xa1'),_0x157fce);console[_0x4e96('0x5')](_0x4e96('0x0'),typeof _0x157fce);var _0x57efbc=moment[_0x4e96('0x75')](_0x479b68[_0x4e96('0x29')]['object']['lines'][_0x4e96('0x29')][_0x157fce][_0x4e96('0x15')][_0x4e96('0x93')])['format'](_0x4e96('0x3b'));console[_0x4e96('0x5')]('***\x20***\x20invoice.payment_succeeded\x20-\x20start:\x20',_0x57efbc);var _0x2ca72e=moment[_0x4e96('0x75')](_0x479b68['data'][_0x4e96('0x81')]['lines'][_0x4e96('0x29')][_0x157fce][_0x4e96('0x15')][_0x4e96('0x82')])[_0x4e96('0x58')](_0x4e96('0x3b'));console['log'](_0x4e96('0x7a'),_0x2ca72e);var _0x2716eb=_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')]['subscription'];winston['info']('***\x20***\x20invoice.payment_succeeded\x20-\x20subscription\x20ID:\x20',_0x2716eb);if(_0x2716eb==null){_0x2716eb=_0x479b68['data']['object']['lines'][_0x4e96('0x29')][0x0]['subscription'];console[_0x4e96('0x5')](_0x4e96('0xe'),_0x2716eb);}var _0x12ad1a='';if(_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')]['lines'][_0x4e96('0x29')][_0x4e96('0x5b')]>0x1){var _0x12ad1a=_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')]['lines'][_0x4e96('0x29')][_0x479b68['data'][_0x4e96('0x81')][_0x4e96('0x7b')][_0x4e96('0x29')][_0x4e96('0x5b')]-0x1]['quantity'];console[_0x4e96('0x5')](_0x4e96('0x9f'),_0x12ad1a);}else if(_0x479b68['data'][_0x4e96('0x81')][_0x4e96('0x7b')][_0x4e96('0x29')]['length']===0x1){var _0x12ad1a=_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')][_0x4e96('0x7b')][_0x4e96('0x29')][0x0][_0x4e96('0x9')];console[_0x4e96('0x5')](_0x4e96('0x79'),_0x12ad1a);}if(_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')][_0x4e96('0x84')]!==_0x4e96('0x6e')){getSubscrpPaymentBySubscrpIdAndStripeEvent(_0x2716eb)[_0x4e96('0x91')](function(_0x37c018){winston[_0x4e96('0x99')](_0x4e96('0xa5'),_0x37c018);if(!_0x37c018){winston[_0x4e96('0x99')]('***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20subsptn_payment\x20not\x20subsptn_payment');return 0x0;}if(_0x37c018[_0x4e96('0x5b')]===0x0){winston[_0x4e96('0x99')](_0x4e96('0x95'));return 0x0;}var _0x312dcd=_0x37c018[0x0][_0x4e96('0x97')];var _0x5c8260=_0x37c018[0x0][_0x4e96('0x34')];var _0x22f38d=_0x37c018[0x0]['plan_name'];winston['info'](_0x4e96('0x24')+_0x312dcd);winston['info']('***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20-\x20userId:\x20'+_0x5c8260);winston[_0x4e96('0x99')](_0x4e96('0x14')+_0x22f38d);if(_0x312dcd){var _0x148353={'profile':{'name':_0x22f38d,'type':_0x4e96('0x56'),'subStart':_0x57efbc,'subEnd':_0x2ca72e,'subscriptionId':_0x2716eb,'last_stripe_event':_0x479b68[_0x4e96('0x28')],'agents':_0x12ad1a}};updateProjectProfile(_0x312dcd,_0x148353);saveOnDB(_0x2716eb,_0x312dcd,_0x479b68,_0x5c8260,_0x479b68[_0x4e96('0x28')],_0x22f38d);}})[_0x4e96('0x7d')](function(_0x5d0965){winston[_0x4e96('0xa8')](_0x4e96('0x64'),_0x5d0965);});}else{saveOnDB(_0x2716eb,null,_0x479b68,null,_0x479b68[_0x4e96('0x28')],null);}}if(_0x479b68[_0x4e96('0x28')]==='customer.subscription.updated'){winston[_0x4e96('0x99')](_0x4e96('0xab'));var _0x9d15f8=_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')][_0x4e96('0x9')];winston[_0x4e96('0x99')](_0x4e96('0x68'),_0x9d15f8);var _0x1e41b3=_0x479b68['data']['object']['id'];var _0x57efbc=moment[_0x4e96('0x75')](_0x479b68[_0x4e96('0x29')]['object']['current_period_start'])[_0x4e96('0x58')](_0x4e96('0x3b'));var _0x2ca72e=moment[_0x4e96('0x75')](_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')][_0x4e96('0x13')])[_0x4e96('0x58')](_0x4e96('0x3b'));winston[_0x4e96('0x99')](_0x4e96('0xa3'),_0x1e41b3);if(_0x479b68[_0x4e96('0x29')]['previous_attributes']&&_0x479b68[_0x4e96('0x29')]['previous_attributes']['quantity']!==undefined){var _0x592f9a=_0x479b68[_0x4e96('0x29')][_0x4e96('0xa0')]['quantity'];winston[_0x4e96('0x99')](_0x4e96('0x69'),_0x592f9a);if(_0x9d15f8!==_0x592f9a){getSubscrpPaymentBySubscrpIdAndStripeEvent(_0x1e41b3)[_0x4e96('0x91')](function(_0x261afa){winston['info'](_0x4e96('0xa5'),_0x261afa);var _0x200429=_0x261afa[0x0][_0x4e96('0x97')];var _0x45b385=_0x261afa[0x0][_0x4e96('0x34')];var _0xcd5781=_0x261afa[0x0][_0x4e96('0x88')];winston[_0x4e96('0x99')](_0x4e96('0x24'),_0x200429);winston[_0x4e96('0x99')](_0x4e96('0x87'),_0x45b385);winston[_0x4e96('0x99')]('***\x20***\x20customer.subscription.updated\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20-\x20userId:\x20',_0x45b385);if(_0x200429){var _0x216020={'profile':{'name':_0xcd5781,'type':_0x4e96('0x56'),'subStart':_0x57efbc,'subEnd':_0x2ca72e,'subscriptionId':_0x1e41b3,'last_stripe_event':_0x479b68[_0x4e96('0x28')],'agents':_0x9d15f8}};updateProjectProfile(_0x200429,_0x216020);saveOnDB(_0x1e41b3,_0x200429,_0x479b68,_0x45b385,_0x479b68[_0x4e96('0x28')],_0xcd5781);}})['catch'](function(_0x130287){winston[_0x4e96('0xa8')]('***\x20***\x20getSubscrpPaymentBySubscrpIdAndStripeEvent\x20-\x20err\x20',_0x130287);});}}}if(_0x479b68[_0x4e96('0x28')]===_0x4e96('0x5f')){winston['info'](_0x4e96('0x8a'));winston[_0x4e96('0x99')](_0x4e96('0x73'),_0x479b68);var _0x2716eb=_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')]['id'];winston['info'](_0x4e96('0x2f'),_0x2716eb);getSubscrpPaymentBySubscrpIdAndStripeEvent(_0x2716eb)['then'](function(_0x63725c){winston[_0x4e96('0x99')](_0x4e96('0x6c'),_0x63725c);var _0xf0eeeb=_0x63725c[0x0][_0x4e96('0x97')];var _0x2e6eee=_0x63725c[0x0][_0x4e96('0x34')];winston['info'](_0x4e96('0x59'),_0xf0eeeb);winston[_0x4e96('0x99')](_0x4e96('0xaf'),_0x2e6eee);const _0xb953a4=_0x4e96('0x3');var _0x47bab3={'profile':{'subscriptionId':_0x2716eb,'name':_0x4e96('0x3'),'type':_0x4e96('0x3'),'agents':0x3,'last_stripe_event':_0x479b68[_0x4e96('0x28')]}};updateProjectProfile(_0xf0eeeb,_0x47bab3);saveOnDB(_0x2716eb,_0xf0eeeb,_0x479b68[_0x4e96('0x29')][_0x4e96('0x81')],_0x2e6eee,_0x479b68[_0x4e96('0x28')],_0xb953a4);})[_0x4e96('0x7d')](function(_0x4c107d){winston['error']('***\x20***\x20customer.subscription.deleted\x20',_0x4c107d);});}_0x43ecfb[_0x4e96('0x4d')]({'received':!![]});});function getSubscrpPaymentBySubscrpIdAndStripeEvent(_0x530f90){return new Promise(function(_0x1fc08a,_0x221e12){SubscriptionPayment[_0x4e96('0xa2')]({'subscription_id':_0x530f90,'stripe_event':_0x4e96('0x52')},function(_0x288d0c,_0x113554){if(_0x288d0c)_0x221e12(_0x288d0c);var _0x2534a9=_0x113554;_0x1fc08a(_0x2534a9);});});};function getSubscritionById(_0x4dfffb){return new Promise(function(_0x437af6,_0x585136){const _0x42aa90=require(_0x4e96('0x48'))(apiSecretKey);_0x42aa90[_0x4e96('0xa6')][_0x4e96('0x41')](_0x4dfffb,function(_0x50553a,_0x9e2fb3){if(_0x50553a)_0x585136(_0x50553a);var _0x9e2fb3=_0x9e2fb3;_0x437af6(_0x9e2fb3);});});};function updateProjectProfile(_0x46de60,_0x25a96a){Project['findByIdAndUpdate'](_0x46de60,_0x25a96a,{'new':!![],'upsert':!![]},function(_0x454f6e,_0x3374f6){if(_0x454f6e){winston[_0x4e96('0xa8')](_0x4e96('0x42'),_0x454f6e);}winston[_0x4e96('0x99')](_0x4e96('0x47'),_0x3374f6);});}function saveOnDB(_0x1296c3,_0x1c851b,_0x4dbe74,_0x2e4975,_0x2aa1f8,_0x24e4dc){winston[_0x4e96('0x99')]('plan_name\x20',_0x24e4dc);var _0x55a1fc=new SubscriptionPayment({'_id':new mongoose[(_0x4e96('0xa7'))][(_0x4e96('0x2d'))](),'subscription_id':_0x1296c3,'project_id':_0x1c851b,'user_id':_0x2e4975,'stripe_event':_0x2aa1f8,'plan_name':_0x24e4dc,'object':_0x4dbe74});_0x55a1fc[_0x4e96('0x62')](function(_0x272dbc,_0x5c8156){if(_0x272dbc){winston[_0x4e96('0xa8')](_0x4e96('0x10'),_0x272dbc);return res['status'](0x1f4)[_0x4e96('0x30')]({'success':![],'msg':_0x4e96('0x9c')});}winston[_0x4e96('0x99')]('savedSubscriptionPayment\x20',_0x5c8156);});}router['put'](_0x4e96('0x85'),[passport['authenticate']([_0x4e96('0xae'),'jwt'],{'session':![]}),validtoken],function(_0x5d5748,_0x55189d){var _0x1b5fff=_0x5d5748[_0x4e96('0x66')][_0x4e96('0x6a')];var _0x1f7ff0=_0x5d5748[_0x4e96('0x66')]['userid'];winston['info']('»»»\x20»»»\x20cancelsubscription\x20projectid',_0x1b5fff);winston[_0x4e96('0x99')](_0x4e96('0x33'),_0x1f7ff0);Project[_0x4e96('0x65')]({'_id':_0x1b5fff},function(_0x2cb673,_0x63f5c2){if(_0x2cb673){winston[_0x4e96('0xa8')](_0x4e96('0x53'),_0x2cb673);return _0x2cb673;}if(_0x63f5c2){winston[_0x4e96('0x99')]('--\x20>\x20cancelsubscription\x20\x20project\x20',_0x63f5c2);var _0x57c1ff=_0x63f5c2['profile'][_0x4e96('0xad')];const _0x8f5a0b=require(_0x4e96('0x48'))(apiSecretKey);_0x8f5a0b[_0x4e96('0xa6')][_0x4e96('0x7f')](_0x57c1ff,function(_0x3b5304,_0x2160ed){if(_0x3b5304){winston['error'](_0x4e96('0x72'),_0x3b5304);return _0x55189d['status'](0x1f4)[_0x4e96('0x30')]({'success':![],'msg':_0x3b5304});}winston[_0x4e96('0x99')]('--\x20>\x20cancelsubscription\x20confirmation\x20',_0x2160ed);_0x55189d[_0x4e96('0x4d')](_0x2160ed);});}});});router[_0x4e96('0xa9')](_0x4e96('0x26'),[passport['authenticate']([_0x4e96('0xae'),'jwt'],{'session':![]}),validtoken],function(_0x328259,_0x44a28c){var _0x1d8e31=_0x328259[_0x4e96('0x66')]['projectid'];var _0x5bd8fb=_0x328259[_0x4e96('0x66')]['userid'];winston[_0x4e96('0x99')](_0x4e96('0xb2'),_0x1d8e31);winston['info'](_0x4e96('0x63'),_0x5bd8fb);const _0x241cce=require(_0x4e96('0x48'))(apiSecretKey);Project['findOne']({'_id':_0x1d8e31},function(_0x1bfc82,_0x53b831){if(_0x1bfc82){winston[_0x4e96('0xa8')](_0x4e96('0x31'),_0x1bfc82);return _0x1bfc82;}if(_0x53b831){winston[_0x4e96('0x99')](_0x4e96('0x9a'),_0x53b831);var _0x462bc3=_0x53b831[_0x4e96('0x12')][_0x4e96('0xad')];_0x241cce['subscriptions'][_0x4e96('0x6')](_0x462bc3);}});});router['get']('/:subscriptionid',[passport['authenticate']([_0x4e96('0xae'),_0x4e96('0x4f')],{'session':![]}),validtoken],function(_0x49d8b9,_0x4c4bae){SubscriptionPayment[_0x4e96('0xa2')]({'subscription_id':_0x49d8b9[_0x4e96('0x8b')][_0x4e96('0x6d')]})['sort']({'object.created':_0x4e96('0x7')})[_0x4e96('0x8e')](function(_0x409853,_0x2b0133){if(_0x409853){winston[_0x4e96('0xa8')](_0x4e96('0x1b'),project);return _0x4c4bae[_0x4e96('0x57')](0x1f4)[_0x4e96('0x30')]({'success':![],'msg':_0x409853});}_0x4c4bae[_0x4e96('0x4d')](_0x2b0133);});});router['get'](_0x4e96('0x1e'),[passport['authenticate']([_0x4e96('0xae'),_0x4e96('0x4f')],{'session':![]}),validtoken],function(_0x508fa0,_0x51ae3c){winston[_0x4e96('0x99')](_0x4e96('0x96'),_0x508fa0[_0x4e96('0x8b')][_0x4e96('0x6d')]);var _0xe18b5d=require(_0x4e96('0x48'))(apiSecretKey);_0xe18b5d[_0x4e96('0xa6')][_0x4e96('0x41')](_0x508fa0[_0x4e96('0x8b')][_0x4e96('0x6d')],function(_0x505610,_0x182a4a){if(_0x505610){winston[_0x4e96('0xa8')](_0x4e96('0x17'),_0x505610);return _0x51ae3c[_0x4e96('0x57')](0x1f4)[_0x4e96('0x30')]({'success':![],'msg':_0x505610});}winston[_0x4e96('0x99')](_0x4e96('0x55'),_0x182a4a);_0x51ae3c[_0x4e96('0x4d')](_0x182a4a);});});router[_0x4e96('0x1c')](_0x4e96('0xb1'),[passport[_0x4e96('0x8c')](['basic',_0x4e96('0x4f')],{'session':![]}),validtoken],function(_0xc0d11,_0x1b73d2){winston[_0x4e96('0x70')](_0x4e96('0xb'),_0xc0d11[_0x4e96('0x8b')]);var _0x262b53=_0xc0d11[_0x4e96('0x8b')][_0x4e96('0x6a')];winston[_0x4e96('0x70')](_0x4e96('0xa'),_0x262b53);SubscriptionPayment[_0x4e96('0xa2')]({'project_id':_0x262b53,'stripe_event':_0x4e96('0x52')},async function(_0x41d81b,_0x57aa4c){if(_0x41d81b){winston[_0x4e96('0x70')](_0x4e96('0x3f'),_0x41d81b);return _0x41d81b;}if(_0x57aa4c){_0x57aa4c[0x0][_0x4e96('0x81')][_0x4e96('0x11')];winston[_0x4e96('0x70')]('--\x20>\x20get\x20customer\x20from\x20db\x20-\x20subscription\x20>\x20customer\x20id\x20',_0x57aa4c[0x0]['object'][_0x4e96('0x11')]);const _0x1513ee=_0x57aa4c[0x0][_0x4e96('0x81')][_0x4e96('0x11')];const _0xed48af=require(_0x4e96('0x48'))(apiSecretKey);const _0x5280f7=await _0xed48af[_0x4e96('0x94')][_0x4e96('0x41')](_0x1513ee);winston['debug'](_0x4e96('0x4'),_0x5280f7);const _0x385d7b=await _0xed48af['paymentMethods'][_0x4e96('0x80')]({'customer':_0x1513ee,'type':'card'});_0x5280f7[_0x4e96('0x21')]=_0x385d7b;winston[_0x4e96('0x70')](_0x4e96('0x2'),_0x57aa4c);_0x1b73d2['json'](_0x5280f7);}});});router[_0x4e96('0x16')](_0x4e96('0x49'),[passport[_0x4e96('0x8c')]([_0x4e96('0xae'),_0x4e96('0x4f')],{'session':![]}),validtoken],async function(_0x163fa6,_0x439ca4){var _0x192505=_0x163fa6['params'][_0x4e96('0x89')];winston[_0x4e96('0x70')](_0x4e96('0x2b'),_0x192505);winston[_0x4e96('0x70')](_0x4e96('0x32'),_0x163fa6['body']);const _0x3ec4ad=require(_0x4e96('0x48'))(apiSecretKey);let _0x2ec01e;try{_0x2ec01e=await _0x3ec4ad['paymentMethods'][_0x4e96('0xf')]({'type':_0x4e96('0x4b'),'card':{'number':_0x163fa6[_0x4e96('0x66')][_0x4e96('0xaa')],'exp_month':_0x163fa6[_0x4e96('0x66')][_0x4e96('0x9b')],'exp_year':_0x163fa6[_0x4e96('0x66')][_0x4e96('0x22')],'cvc':_0x163fa6[_0x4e96('0x66')][_0x4e96('0x19')]}});}catch(_0x2910c3){winston[_0x4e96('0xa8')](_0x4e96('0x76'),_0x2910c3);return _0x439ca4[_0x4e96('0x57')](0x1f6)[_0x4e96('0x30')]({'success':![],'msg':_0x2910c3});}winston[_0x4e96('0x70')]('»»»\x20»»»\x20\x20paymentMethod',_0x2ec01e);try{const _0x10482b=await _0x3ec4ad[_0x4e96('0x21')][_0x4e96('0x67')](_0x2ec01e['id'],{'customer':_0x192505});winston['debug'](_0x4e96('0x25'),_0x10482b);}catch(_0x3a7c8f){winston[_0x4e96('0xa8')](_0x4e96('0x8'),_0x3a7c8f);return _0x439ca4['status'](0x1f5)[_0x4e96('0x30')]({'success':![],'msg':_0x3a7c8f});}const _0x36d92e=await _0x3ec4ad[_0x4e96('0x94')][_0x4e96('0x6')](_0x192505,{'invoice_settings':{'default_payment_method':_0x2ec01e['id']}});_0x439ca4[_0x4e96('0x4d')](_0x36d92e);});router[_0x4e96('0x1c')](_0x4e96('0x98'),[passport['authenticate'](['basic',_0x4e96('0x4f')],{'session':![]}),validtoken],async function(_0x35275d,_0x372315){console[_0x4e96('0x5')](_0x4e96('0x90'),_0x35275d['params']);var _0x4c99a1=_0x35275d[_0x4e96('0x8b')][_0x4e96('0x89')];winston[_0x4e96('0x70')](_0x4e96('0x45'),_0x4c99a1);const _0x4d89e2=require(_0x4e96('0x48'))(apiSecretKey);const _0x471ee6=await _0x4d89e2[_0x4e96('0x94')][_0x4e96('0x41')](_0x4c99a1);const _0x5cb18d=_0x471ee6[_0x4e96('0x43')]['default_payment_method'];let _0x513d62;try{_0x513d62=await _0x4d89e2['paymentMethods'][_0x4e96('0x80')]({'customer':_0x4c99a1,'type':'card'});winston[_0x4e96('0x70')](_0x4e96('0x7e'),_0x513d62);}catch(_0x37cb25){return _0x372315[_0x4e96('0x57')](0x1f5)[_0x4e96('0x30')]({'success':![],'msg':_0x37cb25});}winston[_0x4e96('0x70')](_0x4e96('0x3e'),_0x5cb18d);_0x513d62[_0x4e96('0x29')]['forEach'](_0x33bb97=>{if(_0x33bb97['id']!==_0x5cb18d){winston[_0x4e96('0x70')](_0x4e96('0x2a'),_0x33bb97['id']);detachPaymentFunc(_0x33bb97['id'],function(_0x23cbee){console['log'](_0x4e96('0x4a'),_0x23cbee);});}});_0x372315[_0x4e96('0x4d')](_0x513d62);});router['get'](_0x4e96('0xac'),[passport[_0x4e96('0x8c')]([_0x4e96('0xae'),_0x4e96('0x4f')],{'session':![]}),validtoken],function(_0x164d01,_0x3d729d){console[_0x4e96('0x5')](_0x4e96('0x83'),_0x164d01['params'][_0x4e96('0x78')]);var _0x3fc2ba=require(_0x4e96('0x48'))(apiSecretKey);_0x3fc2ba[_0x4e96('0x9d')]['sessions'][_0x4e96('0x41')](_0x164d01['params'][_0x4e96('0x78')],function(_0x1de106,_0x4edfae){if(_0x1de106){console[_0x4e96('0x5')](_0x4e96('0x18'),_0x1de106);return _0x3d729d[_0x4e96('0x57')](0x1f4)[_0x4e96('0x30')]({'success':![],'msg':_0x1de106});}console[_0x4e96('0x5')](_0x4e96('0x3c'),_0x4edfae);_0x3d729d[_0x4e96('0x4d')](_0x4edfae);});});async function detachPaymentFunc(_0x1c9e4e,_0xdd36f9){winston[_0x4e96('0x70')](_0x4e96('0x7c'),_0x1c9e4e);const _0x362292=require('stripe')(apiSecretKey);let _0x30aaaa;try{_0x30aaaa=await _0x362292[_0x4e96('0x21')][_0x4e96('0x8d')](_0x1c9e4e);_0xdd36f9(_0x30aaaa);}catch(_0xe0df0b){_0xdd36f9(_0xe0df0b);}}module['exports']=router;
2
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBheW1lbnRzL3N0cmlwZS9pbmRleC5qcyJdLCJuYW1lcyI6WyJleHByZXNzI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gICAgICAgKi9cbiAgICAgICAgaWYgKHByb2plY3RJZCkge1xuICAgICAgICAgIHZhciBib2R5ID0ge1xuICAgICAgICAgICAgcHJvZmlsZToge1xuICAgICAgICAgICAgICBuYW1lOiBwbGFuX25hbWUsXG4gICAgICAgICAgICAgIHR5cGU6ICdwYXltZW50JyxcbiAgICAgICAgICAgICAgc3ViU3RhcnQ6IHN1YnNjcmlwdGlvblN0YXJ0RGF0ZSxcbiAgICAgICAgICAgICAgc3ViRW5kOiBzdWJzY3JpcHRpb25FbmREYXRlLFxuICAgICAgICAgICAgICBzdWJzY3JpcHRpb25JZDogc3Vic2NyaXB0aW9uSWQsXG4gICAgICAgICAgICAgIGxhc3Rfc3RyaXBlX2V2ZW50OiBldmVudC50eXBlLFxuICAgICAgICAgICAgICBhZ2VudHM6IHF1YW50aXR5XG4gICAgICAgICAgICB9XG4gICAgICAgICAgfVxuXG4gICAgICAgICAgLyoqIDJCICovXG4gICAgICAgICAgdXBkYXRlUHJvamVjdFByb2ZpbGUocHJvamVjdElkLCBib2R5KTtcbiAgICAgICAgICAvKiogMkMgKi9cblxuICAgICAgICAgIHNhdmVPbkRCKHN1YnNjcmlwdGlvbklkLCBwcm9qZWN0SWQsIGV2ZW50LCB1c2VySWQsIGV2ZW50LnR5cGUsIHBsYW5fbmFtZSk7XG4gICAgICAgIH1cblxuICAgICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikge1xuICAgICAgICB3aW5zdG9uLmVycm9yKCcqKiogKioqIGdldFN1YnNjcnBQYXltZW50QnlTdWJzY3JwSWRBbmRTdHJpcGVFdmVudCAtIGVyciAnLCBlcnIpO1xuXG4gICAgICB9KTtcbiAgICAgIC8vIH0sIDUwMDApO1xuICAgIH0gZWxzZSB7XG5cbiAgICAgIC8vICAgdXBkYXRlU2F2ZWRTdWJzY3JpcHRpb25XaXRoSW52b2ljZShzdWJzY3JpcHRpb25JZCwgZXZlbnQuZGF0YS5vYmplY3QuaG9zdGVkX2ludm9pY2Vfd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ICAgICAgIHZhciBwbGFuX25hbWUgPSBzdWJzcHRuX3BheW1lbnRbMF0ucGxhbl9uYW1lXG5cbiAgICAgICAgICB3aW5zdG9uLmluZm8oJyoqKiAqKiogZ2V0U3Vic2NycFBheW1lbnRCeVN1YnNjcnBJZEFuZFN0cmlwZUV2ZW50IC0gcHJvamVjdElkOiAgJywgcHJvamVjdElkKTtcbiAgICAgICAgICB3aW5zdG9uLmluZm8oJyoqKiAqKiogZ2V0U3Vic2NycFBheW1lbnRCeVN1YnNjcnBJZEFuZFN0cmlwZUV2ZW50IC0gdXNlcklkOiAnLCB1c2VySWQpO1xuICAgICAgICAgIHdpbnN0b24uaW5mbygnKioqICoqKiBjdXN0b21lci5zdWJzY3JpcHRpb24udXBkYXRlZCBnZXRTdWJzY3JwUGF5bWVudEJ5U3Vic2NycElkQW5kU3RyaXBlRXZlbnQgLSB1c2VySWQ6ICcsIHVzZXJJZCk7XG5cbiAgICAgICAgICAvKipcbiAgICAgICAgICAgKiEgKioqIEJPRFkgKioqXG4gICAgICAgICAgICovXG4gICAgICAgICAgaWYgKHByb2plY3RJZCkge1xuICAgICAgICAgICAgdmFyIGJvZHkgPSB7XG4gICAgICAgICAgICAgIHByb2ZpbGU6XG4gICAgICAgICAgICAgIHtcbiAgICAgICAgICAgICAgICBuYW1lOiBwbGFuX25hbWUsXG4gICAgICAgICAgICAgICAgdHlwZTogJ3BheW1lbnQnLFxuICAgICAgICAgICAgICAgIHN1YlN0YXJ0OiBzdWJzY3JpcHRpb25TdGFydERhdGUsXG4gICAgICAgICAgICAgICAgc3ViRW5kOiBzdWJzY3JpcHRpb25FbmREYXRlLFxuICAgICAgICAgICAgICAgIHN1YnNjcmlwdGlvbklkOiBzdWJzY3JpcHRpb25faWQsXG4gICAgICAgICAgICAgICAgbGFzdF9zdHJpcGVfZXZlbnQ6IGV2ZW50LnR5cGUsXG4gICAgICAgICAgICAgICAgYWdlbnRzOiBzdWJzY3JpcHRpb25fbmV3X3F0eVxuICAgICA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gICAgICBicmVhaztcbi8vICAgICAgIC8vIC4uLiBoYW5kbGUgb3RoZXIgZXZlbnQgdHlwZXNcbi8vICAgICAgIGRlZmF1bHQ6XG4vLyAgICAgICAgIC8vIFVuZXhwZWN0ZWQgZXZlbnQgdHlwZVxuLy8gICAgICAgICByZXR1cm4gcmVzcG9uc2Uuc3RhdHVzKDQwMCkuZW5kKCk7XG4vLyAgICAgfVxuXG4vLyAgICAgLy8gUmV0dXJuIGEgcmVzcG9uc2UgdG8gYWNrbm93bGVkZ2UgcmVjZWlwdCBvZiB0aGUgZXZlbnRcbi8vICAgICByZXNwb25zZS5qc29uKHtyZWNlaXZlZDogdHJ1ZX0pO1xuLy8gfSk7XG5cblxuXG5cbm1vZHVsZS5leHBvcnRzID0gcm91dGVyOyJdLCJmaWxlIjoicGF5bWVudHMvc3RyaXBlL2luZGV4LmpzIn0=
1
+ var _0x3a1b=['stripe\x20sig:\x20','»»»\x20»»»\x20\x20update\x20customer\x20-\x20cc\x20from\x20body\x20','/stripesubs/:subscriptionid','»»»»\x20stripe\x20apiKey:\x20','***\x20***\x20customer.subscription.deleted\x20','findOne','split','/updatesubscription','type','log','***\x20***\x20invoice.payment_succeeded\x20-\x20linesNum:\x20','save','»»»\x20»»»\x20cancelsubscription\x20projectid','subscription_create','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20\x20find\x20Project\x20','--\x20>\x20subscription\x20get\x20by\x20id\x20from\x20stripe\x20','customer','subscription','stripe\x20client_reference_id','object','--\x20>\x20checkoutSession\x20get\x20by\x20id\x20from\x20stripe\x20','stripe\x20user_id:','--\x20>\x20updatesubscription\x20\x20project\x20','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20-\x20err\x20','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20\x20project\x20>\x20profile\x20>\x20name','get','client_reference_id','saveOnDB\x20plan_name','subscriptionId','***\x20***\x20invoice.payment_succeeded\x20-\x20BILLING\x20REASON\x20','paymentMethods','error','get\x20PaymentMethods\x20list\x20>\x20paymentMethods\x20>\x20paymentMethods.data\x20','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20\x20project\x20>\x20profile','rawBody','subscriptions','»»»\x20»»»\x20cancelsubscription\x20userid','express','ObjectId','current_period_start','expiration_date_year','***\x20***\x20invoice.payment_succeeded\x20-\x20index:\x20','--\x20>\x20cancelsubscription\x20\x20err\x20','stripe\x20apiKey','customer.subscription.deleted\x20subscriptionPayment\x20user\x20id:\x20','stripe\x20seats_numAsString:\x20','/payment_methods/:customerid','del','get\x20PaymentMethods\x20list\x20>\x20paymentMethods\x20','forEach','data','message','status','asc','list','---\x20>\x20ERROR\x20','exec','unix','basic','stripe\x20project_id:\x20','userid','projectid','!!!!!!!!\x20HI\x20!!!!!!!!\x20checkout.session.completed','total_count','stripe','find','subscriptionid','***\x20***\x20checkout.session.completed\x20-\x20getSubscription\x20***\x20end\x20***\x20:\x20','YYYY-MM-DDTHH:mm:ss.SSS','credit_card_cvc','env','then','saveFirstInvoicePaymentSucceeded\x20subscriptionid','default_payment_method','***\x20***\x20checkout.session.completed\x20-\x20getSubscritionById\x20***\x20start\x20***\x20:\x20','--\x20>\x20checkoutSession\x20params.sessionid\x20','jwt','***\x20***\x20checkout.session.completed\x20-\x20getSubscritionById\x20err\x20','Error\x20saving\x20object.','current_period_end','info','»»»\x20»»»\x20\x20paymentMethod\x20attached\x20','free','Sandbox','profile','Router','catch','sessionid','send','/webhook','***\x20***\x20!!!!!!!!!!!!!!!!!!!!!!\x20checkout.session.completed\x20-\x20subscription\x20ID:\x20','json','authenticate','customerid','debug','mongoose','--\x20>\x20subscription\x20get\x20by\x20id\x20from\x20stripe\x20\x20err\x20','--\x20>\x20get\x20customer\x20from\x20db\x20>\x20customer\x20+\x20paymentMethods\x20','../../../middleware/valid-token','put','moment','invoice.payment_succeeded','****\x20Stripe\x20error\x20constructEvent:\x20','Types','customer.subscription.deleted','saveOnDB\x20seats_num','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20\x20project\x20>\x20profile\x20>\x20agents\x20typeof','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20subsptn_payment:\x20','--\x20>\x20checkoutSession\x20get\x20by\x20id\x20from\x20stripe\x20\x20err\x20','params','»»»\x20»»»\x20get\x20customer\x20from\x20db\x20','»»»\x20»»»\x20\x20paymentMethod\x20create\x20\x20error\x20','constructEvent','../../../config/winston','exports','credit_card_num','body','savedSubscriptionPayment\x20','\x20!!!!!!!!\x20HI\x20!!!!!!!!!!!\x20customer.subscription.deleted','../models/subscription-payment','»»»\x20»»»\x20updatesubscription\x20projectid','--\x20>\x20cancelsubscription\x20Error\x20getting\x20project\x20','expiration_date_month','\x20!!!!!!!!\x20HI\x20!!!!!!!!\x20invoice.payment_succeeded','--\x20>\x20GET\x20SUBSCRIPTION\x20PAYMENTS\x20ERRORt\x20','savedSubscriptionPayment\x20>>\x20','create','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20subsptn_payment\x20>\x20project_id:\x20','webhooks','get\x20PaymentMethods\x20list\x20req.params\x20>\x20customer_id\x20','stripe\x20apiSecretKey','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20subsptn_payment\x20typeof\x20subsptn_payment:\x20','sessions','agents','attach','***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20\x20project\x20','/:subscriptionid','PAYMENT_STRIPE_API_SECRET_KEY','\x20typeof\x20','../../../middleware/passport','»»»»\x20stripe\x20endpointSecret:\x20','user_id','typeof\x20','update','stripe\x20checkout.session.completed','post','sort','format','raw','***\x20***\x20invoice.payment_succeeded\x20-\x20subscription\x20ID:\x20','customers','payment','checkout.session.completed','***\x20***\x20invoice.payment_succeeded\x20-\x20start:\x20','--\x20>\x20subscription\x20get\x20by\x20id\x20freq.params.subscriptionid\x20','***\x20***\x20subscription\x20ID\x20','PAYMENT_STRIPE_SECRET','body-parser','name','period'];(function(_0x335769,_0x3a1b3f){var _0x1d34d4=function(_0x31ddf7){while(--_0x31ddf7){_0x335769['push'](_0x335769['shift']());}};_0x1d34d4(++_0x3a1b3f);}(_0x3a1b,0x13b));var _0x1d34=function(_0x335769,_0x3a1b3f){_0x335769=_0x335769-0x0;var _0x1d34d4=_0x3a1b[_0x335769];return _0x1d34d4;};var express=require(_0x1d34('0x2a'));var router=express[_0x1d34('0x5a')]();var winston=require(_0x1d34('0x76'));var Project=require('../../../models/project');var SubscriptionPayment=require(_0x1d34('0x7c'));var moment=require(_0x1d34('0x69'));var mongoose=require(_0x1d34('0x64'));var passport=require('passport');require(_0x1d34('0x90'))(passport);var validtoken=require(_0x1d34('0x67'));const apiKey=process[_0x1d34('0x4b')]['PAYMENT_STRIPE_APIKEY'];winston[_0x1d34('0x63')](_0x1d34('0x30')+apiKey);const stripe=require('stripe')(apiKey);const endpointSecret=process['env'][_0x1d34('0x1')];winston[_0x1d34('0x63')]('stripe\x20endpointSecret'+endpointSecret);const apiSecretKey=process[_0x1d34('0x4b')][_0x1d34('0x8e')];winston['debug'](_0x1d34('0x87')+apiSecretKey);const bodyParser=require(_0x1d34('0x2'));router['post'](_0x1d34('0x5e'),bodyParser[_0x1d34('0x99')]({'type':'application/json'}),function(_0x228c69,_0x32c0cf){winston[_0x1d34('0x63')](_0x1d34('0x91')+endpointSecret);winston['debug'](_0x1d34('0x8')+apiKey);winston[_0x1d34('0x63')](_0x1d34('0x87')+apiSecretKey);const _0x9f503=_0x228c69['headers']['stripe-signature'];winston['debug'](_0x1d34('0x5'),_0x9f503);let _0x881450;try{_0x881450=stripe[_0x1d34('0x85')][_0x1d34('0x75')](_0x228c69[_0x1d34('0x27')],_0x9f503,endpointSecret);}catch(_0xbe4dfa){winston[_0x1d34('0x24')](_0x1d34('0x6b'),_0xbe4dfa[_0x1d34('0x38')]);return _0x32c0cf[_0x1d34('0x39')](0x190)[_0x1d34('0x5d')]('Webhook\x20Error:\x20'+_0xbe4dfa[_0x1d34('0x38')]);}if(_0x881450[_0x1d34('0xd')]===_0x1d34('0x9d')){winston[_0x1d34('0x63')](_0x1d34('0x43'));const _0x6bcc05=_0x881450['data'][_0x1d34('0x18')];winston[_0x1d34('0x55')](_0x1d34('0x95'),_0x6bcc05);var _0x6d6211=_0x6bcc05[_0x1d34('0x1f')];winston[_0x1d34('0x55')](_0x1d34('0x17'),_0x6d6211);var _0x1f16e9=_0x6d6211['split']('_')[0x0];winston[_0x1d34('0x55')](_0x1d34('0x1a')+_0x1f16e9);var _0x16fef1=_0x6d6211['split']('_')[0x1];winston['info'](_0x1d34('0x40')+_0x16fef1);var _0x4695f7=_0x6d6211['split']('_')[0x2];winston[_0x1d34('0x55')]('stripe\x20plan_name:\x20'+_0x4695f7);var _0x31188b=_0x6d6211[_0x1d34('0xb')]('_')[0x3];winston[_0x1d34('0x55')]('stripe\x20seats_num:\x20'+_0x31188b+_0x1d34('0x93'),typeof _0x31188b);var _0x1dc5aa=Number(_0x31188b);winston['info'](_0x1d34('0x32')+_0x1dc5aa+_0x1d34('0x8f'),typeof _0x1dc5aa);var _0x10f817=_0x881450[_0x1d34('0x37')][_0x1d34('0x18')][_0x1d34('0x16')];winston[_0x1d34('0x55')](_0x1d34('0x5f'),_0x10f817);getSubscritionById(_0x10f817)[_0x1d34('0x4c')](function(_0x11a9de){var _0x1d1af5=_0x11a9de['object'];winston[_0x1d34('0x55')]('***\x20***\x20checkout.session.completed\x20-\x20getSubscritionById\x20subscr\x20object_type:\x20',_0x1d1af5);var _0x4beb50=moment[_0x1d34('0x3e')](_0x11a9de[_0x1d34('0x2c')])['format']('YYYY-MM-DDTHH:mm:ss.SSS');winston[_0x1d34('0x55')](_0x1d34('0x4f'),_0x4beb50);var _0x1cb09a=moment['unix'](_0x11a9de[_0x1d34('0x54')])['format']('YYYY-MM-DDTHH:mm:ss.SSS');winston[_0x1d34('0x55')](_0x1d34('0x48'),_0x1cb09a);var _0x49714d={'profile':{'name':_0x4695f7,'type':_0x1d34('0x9c'),'subscription_creation_date':_0x4beb50,'subStart':_0x4beb50,'subEnd':_0x1cb09a,'subscriptionId':_0x10f817,'last_stripe_event':_0x881450[_0x1d34('0xd')],'agents':_0x1dc5aa}};updateProjectProfile(_0x16fef1,_0x49714d,_0x1d34('0x9d'));saveOnDB(_0x10f817,_0x16fef1,_0x11a9de,_0x1f16e9,_0x881450[_0x1d34('0xd')],_0x4695f7,_0x1dc5aa);})[_0x1d34('0x5b')](function(_0x3a2f63){winston[_0x1d34('0x24')](_0x1d34('0x52'),_0x3a2f63);});}if(_0x881450['type']==='invoice.payment_succeeded'){winston[_0x1d34('0x55')](_0x1d34('0x80'));winston[_0x1d34('0x55')](_0x1d34('0x22'),_0x881450[_0x1d34('0x37')][_0x1d34('0x18')]['billing_reason']);var _0x17e0e1=_0x881450[_0x1d34('0x37')][_0x1d34('0x18')]['lines'][_0x1d34('0x44')];winston[_0x1d34('0x55')](_0x1d34('0xf'),_0x17e0e1);var _0x4139f7=_0x17e0e1-0x1;winston[_0x1d34('0x55')](_0x1d34('0x2e'),_0x4139f7);var _0x349d0a=moment[_0x1d34('0x3e')](_0x881450[_0x1d34('0x37')][_0x1d34('0x18')]['lines'][_0x1d34('0x37')][_0x4139f7][_0x1d34('0x4')]['start'])[_0x1d34('0x98')](_0x1d34('0x49'));winston[_0x1d34('0x55')](_0x1d34('0x9e'),_0x349d0a);var _0x2923e5=moment[_0x1d34('0x3e')](_0x881450[_0x1d34('0x37')]['object']['lines']['data'][_0x4139f7][_0x1d34('0x4')]['end'])[_0x1d34('0x98')](_0x1d34('0x49'));winston[_0x1d34('0x55')]('***\x20***\x20invoice.payment_succeeded\x20-\x20end:\x20',_0x2923e5);var _0x10f817=_0x881450[_0x1d34('0x37')][_0x1d34('0x18')]['subscription'];winston['info']('***\x20***\x20invoice.payment_succeeded\x20-\x20subscription\x20ID:\x20',_0x10f817);if(_0x10f817==null){_0x10f817=_0x881450[_0x1d34('0x37')]['object']['lines'][_0x1d34('0x37')][0x0][_0x1d34('0x16')];winston[_0x1d34('0x55')](_0x1d34('0x9a'),_0x10f817);}if(_0x881450[_0x1d34('0x37')]['object']['billing_reason']!=='subscription_create'){getSubByIdAndCheckoutSessionCompletedEvnt(_0x10f817)[_0x1d34('0x4c')](function(_0x328248){winston[_0x1d34('0x55')](_0x1d34('0x70'),_0x328248);winston[_0x1d34('0x55')](_0x1d34('0x88'),typeof _0x328248);if(_0x328248){var _0x43a0a5=_0x328248['project_id'];winston['info'](_0x1d34('0x84'),_0x43a0a5);Project['findOne']({'_id':_0x43a0a5},function(_0x25f30e,_0x4a78cf){if(_0x25f30e){winston[_0x1d34('0x55')](_0x1d34('0x13'),_0x25f30e);return _0x25f30e;}if(_0x4a78cf){winston[_0x1d34('0x55')](_0x1d34('0x8c'),_0x4a78cf);winston[_0x1d34('0x55')](_0x1d34('0x26'),_0x4a78cf[_0x1d34('0x59')]);var _0x232cf9=_0x4a78cf['profile'][_0x1d34('0x8a')];winston[_0x1d34('0x55')]('***\x20***\x20getSubByIdAndCheckoutSessionCompletedEvnt\x20\x20project\x20>\x20profile\x20>\x20agents',_0x232cf9);var _0x3025d6=_0x4a78cf[_0x1d34('0x59')][_0x1d34('0x3')];winston['info'](_0x1d34('0x6f'),typeof _0x232cf9);var _0x34df62=_0x328248[_0x1d34('0x92')];winston[_0x1d34('0x55')](_0x1d34('0x1d'),_0x3025d6);var _0x100707={'profile':{'name':_0x3025d6,'type':'payment','subStart':_0x349d0a,'subEnd':_0x2923e5,'subscriptionId':_0x10f817,'last_stripe_event':_0x881450[_0x1d34('0xd')],'agents':_0x232cf9}};updateProjectProfile(_0x43a0a5,_0x100707,_0x1d34('0x6a'));saveOnDB(_0x10f817,_0x43a0a5,_0x881450,_0x34df62,_0x881450[_0x1d34('0xd')],_0x3025d6,_0x232cf9);}});}})[_0x1d34('0x5b')](function(_0x44b423){winston['error'](_0x1d34('0x1c'),_0x44b423);});}else if(_0x881450[_0x1d34('0x37')]['object']['billing_reason']===_0x1d34('0x12')){console[_0x1d34('0xe')]('USECASE\x20\x20invoice.payment_succeeded\x20\x20billing_reason\x20subscription_create\x20');saveFirstInvoicePaymentSucceeded(_0x10f817,_0x881450,_0x881450['type']);}}if(_0x881450[_0x1d34('0xd')]===_0x1d34('0x6d')){winston['info'](_0x1d34('0x7b'));winston[_0x1d34('0x55')]('customer.subscription.deleted\x20event\x20',_0x881450);var _0x10f817=_0x881450[_0x1d34('0x37')][_0x1d34('0x18')]['id'];winston[_0x1d34('0x55')](_0x1d34('0x0'),_0x10f817);getSubByIdAndCheckoutSessionCompletedEvnt(_0x10f817)['then'](function(_0x2f9727){winston['info']('***\x20***\x20»»»\x20»»»\x20customer.subscription.deleted\x20subscriptionPayment\x20',_0x2f9727);if(_0x2f9727){var _0x3632b4=_0x2f9727['project_id'];winston[_0x1d34('0x55')]('customer.subscription.deleted\x20subscriptionPayment\x20project\x20id:\x20',_0x3632b4);var _0x1aaef2=_0x2f9727[_0x1d34('0x92')];winston['info'](_0x1d34('0x31'),_0x1aaef2);}var _0xd9b0e8={'profile':{'subscriptionId':_0x10f817,'name':_0x1d34('0x58'),'type':_0x1d34('0x57'),'agents':0x1,'last_stripe_event':_0x881450[_0x1d34('0xd')]}};updateProjectProfile(_0x3632b4,_0xd9b0e8,'subscription.deleted');saveOnDB(_0x10f817,_0x3632b4,_0x881450[_0x1d34('0x37')][_0x1d34('0x18')],_0x1aaef2,_0x881450[_0x1d34('0xd')],_0x4695f7,0x1);})[_0x1d34('0x5b')](function(_0x52eab3){winston['error'](_0x1d34('0x9'),_0x52eab3);});}_0x32c0cf[_0x1d34('0x60')]({'received':!![]});});function getSubByIdAndCheckoutSessionCompletedEvnt(_0x254f0d){return new Promise(function(_0x25d18a,_0xbdf96a){SubscriptionPayment[_0x1d34('0xa')]({'subscription_id':_0x254f0d,'stripe_event':'checkout.session.completed'},function(_0x4c2784,_0x16cb92){if(_0x4c2784)_0xbdf96a(_0x4c2784);var _0x2c37ed=_0x16cb92;_0x25d18a(_0x2c37ed);});});};function getSubscritionById(_0x25f4e7){return new Promise(function(_0x11f853,_0x289408){const _0x5b4003=require(_0x1d34('0x45'))(apiSecretKey);_0x5b4003[_0x1d34('0x28')]['retrieve'](_0x25f4e7,function(_0x51749c,_0x2a29af){if(_0x51749c)_0x289408(_0x51749c);var _0x2a29af=_0x2a29af;_0x11f853(_0x2a29af);});});};function updateProjectProfile(_0x5e5793,_0x161921,_0x41ae89){Project['findByIdAndUpdate'](_0x5e5793,_0x161921,{'new':!![],'upsert':!![]},function(_0x5be7e3,_0x3c3cc6){if(_0x5be7e3){winston[_0x1d34('0x24')]('updateProjectProfile\x20Error\x20',_0x5be7e3);}else{winston['debug'](_0x3c3cc6);}});}function saveOnDB(_0x3dbc43,_0x3b64f7,_0x468017,_0x24be8c,_0x507043,_0x64e559,_0x55c91b){winston['info'](_0x1d34('0x20'),_0x64e559);winston[_0x1d34('0x55')](_0x1d34('0x6e'),_0x55c91b);var _0x3fbf6e=new SubscriptionPayment({'_id':new mongoose[(_0x1d34('0x6c'))][(_0x1d34('0x2b'))](),'subscription_id':_0x3dbc43,'project_id':_0x3b64f7,'user_id':_0x24be8c,'stripe_event':_0x507043,'plan_name':_0x64e559,'agents':_0x55c91b,'object':_0x468017});_0x3fbf6e[_0x1d34('0x10')](function(_0x4b178a,_0x5857ef){if(_0x4b178a){winston[_0x1d34('0x24')](_0x1d34('0x3c'),_0x4b178a);return res[_0x1d34('0x39')](0x1f4)['send']({'success':![],'msg':_0x1d34('0x53')});}winston[_0x1d34('0x55')](_0x1d34('0x7a'),_0x5857ef);});}function saveFirstInvoicePaymentSucceeded(_0x422e68,_0x330455,_0x149369){console[_0x1d34('0xe')](_0x1d34('0x4d'),_0x422e68);console['log']('saveFirstInvoicePaymentSucceeded\x20stripe_event',_0x149369);var _0x147e02=new SubscriptionPayment({'_id':new mongoose[(_0x1d34('0x6c'))][(_0x1d34('0x2b'))](),'subscription_id':_0x422e68,'stripe_event':_0x149369,'object':_0x330455});_0x147e02[_0x1d34('0x10')](function(_0x5d8b38,_0xe7648b){if(_0x5d8b38){winston[_0x1d34('0x24')](_0x1d34('0x3c'),_0x5d8b38);return res[_0x1d34('0x39')](0x1f4)['send']({'success':![],'msg':_0x1d34('0x53')});}console[_0x1d34('0xe')](_0x1d34('0x82'),_0xe7648b);});}router[_0x1d34('0x68')]('/cancelsubscription',[passport[_0x1d34('0x61')]([_0x1d34('0x3f'),_0x1d34('0x51')],{'session':![]}),validtoken],function(_0x355564,_0x23f28f){var _0xf0deb1=_0x355564['body'][_0x1d34('0x42')];var _0xc6a178=_0x355564[_0x1d34('0x79')][_0x1d34('0x41')];winston[_0x1d34('0x55')](_0x1d34('0x11'),_0xf0deb1);winston[_0x1d34('0x55')](_0x1d34('0x29'),_0xc6a178);Project[_0x1d34('0xa')]({'_id':_0xf0deb1},function(_0x16bcf3,_0x3188bf){if(_0x16bcf3){winston[_0x1d34('0x24')](_0x1d34('0x7e'),_0x16bcf3);return _0x16bcf3;}if(_0x3188bf){winston['info']('--\x20>\x20cancelsubscription\x20\x20project\x20',_0x3188bf);var _0x252950=_0x3188bf[_0x1d34('0x59')]['subscriptionId'];const _0x445966=require('stripe')(apiSecretKey);_0x445966[_0x1d34('0x28')][_0x1d34('0x34')](_0x252950,function(_0x539cba,_0x31dc30){if(_0x539cba){winston[_0x1d34('0x24')](_0x1d34('0x2f'),_0x539cba);return _0x23f28f[_0x1d34('0x39')](0x1f4)['send']({'success':![],'msg':_0x539cba});}winston['info']('--\x20>\x20cancelsubscription\x20confirmation\x20',_0x31dc30);_0x23f28f[_0x1d34('0x60')](_0x31dc30);});}});});router[_0x1d34('0x68')](_0x1d34('0xc'),[passport['authenticate']([_0x1d34('0x3f'),_0x1d34('0x51')],{'session':![]}),validtoken],function(_0x568682,_0x55b15d){var _0x405c9b=_0x568682[_0x1d34('0x79')][_0x1d34('0x42')];var _0x98bb63=_0x568682['body'][_0x1d34('0x41')];var _0x560c01=_0x568682[_0x1d34('0x79')]['price'];winston[_0x1d34('0x55')](_0x1d34('0x7d'),_0x405c9b);winston[_0x1d34('0x55')]('»»»\x20»»»\x20updatesubscription\x20userid',_0x98bb63);winston[_0x1d34('0x55')]('»»»\x20»»»\x20updatesubscription\x20price',_0x560c01);const _0xcc0791=require(_0x1d34('0x45'))(apiSecretKey);Project[_0x1d34('0xa')]({'_id':_0x405c9b},function(_0xead730,_0xdccd43){if(_0xead730){winston['error']('--\x20>\x20updatesubscription\x20Error\x20getting\x20project\x20',_0xead730);return _0xead730;}if(_0xdccd43){winston['info'](_0x1d34('0x1b'),_0xdccd43);var _0x39e747=_0xdccd43['profile'][_0x1d34('0x21')];_0xcc0791[_0x1d34('0x28')]['update'](_0x39e747);}});});router[_0x1d34('0x1e')](_0x1d34('0x8d'),[passport[_0x1d34('0x61')](['basic',_0x1d34('0x51')],{'session':![]}),validtoken],function(_0x1e9c90,_0x523fdc){SubscriptionPayment['find']({'subscription_id':_0x1e9c90[_0x1d34('0x72')]['subscriptionid']})[_0x1d34('0x97')]({'object.created':_0x1d34('0x3a')})[_0x1d34('0x3d')](function(_0x3c4003,_0x1b735a){if(_0x3c4003){winston[_0x1d34('0x24')](_0x1d34('0x81'),project);return _0x523fdc[_0x1d34('0x39')](0x1f4)[_0x1d34('0x5d')]({'success':![],'msg':_0x3c4003});}_0x523fdc[_0x1d34('0x60')](_0x1b735a);});});router[_0x1d34('0x1e')](_0x1d34('0x7'),[passport[_0x1d34('0x61')]([_0x1d34('0x3f'),_0x1d34('0x51')],{'session':![]}),validtoken],function(_0x3ff1c2,_0x56fca5){winston[_0x1d34('0x55')](_0x1d34('0x9f'),_0x3ff1c2[_0x1d34('0x72')][_0x1d34('0x47')]);var _0xa884a9=require('stripe')(apiSecretKey);_0xa884a9[_0x1d34('0x28')]['retrieve'](_0x3ff1c2['params']['subscriptionid'],function(_0x410d5b,_0x3250c9){if(_0x410d5b){winston[_0x1d34('0x24')](_0x1d34('0x65'),_0x410d5b);return _0x56fca5[_0x1d34('0x39')](0x1f4)[_0x1d34('0x5d')]({'success':![],'msg':_0x410d5b});}winston[_0x1d34('0x55')](_0x1d34('0x14'),_0x3250c9);_0x56fca5[_0x1d34('0x60')](_0x3250c9);});});router['get']('/checkoutSession/:sessionid',[passport[_0x1d34('0x61')]([_0x1d34('0x3f'),_0x1d34('0x51')],{'session':![]}),validtoken],function(_0xabd064,_0x577ded){winston[_0x1d34('0x55')](_0x1d34('0x50'),_0xabd064[_0x1d34('0x72')][_0x1d34('0x5c')]);var _0x145855=require(_0x1d34('0x45'))(apiSecretKey);_0x145855['checkout'][_0x1d34('0x89')]['retrieve'](_0xabd064[_0x1d34('0x72')]['sessionid'],function(_0x1cf4c6,_0x4aac59){if(_0x1cf4c6){winston[_0x1d34('0x55')](_0x1d34('0x71'),_0x1cf4c6);return _0x577ded['status'](0x1f4)[_0x1d34('0x5d')]({'success':![],'msg':_0x1cf4c6});}winston[_0x1d34('0x55')](_0x1d34('0x19'),_0x4aac59);_0x577ded[_0x1d34('0x60')](_0x4aac59);});});router['get']('/customer/:projectid',[passport[_0x1d34('0x61')]([_0x1d34('0x3f'),_0x1d34('0x51')],{'session':![]}),validtoken],function(_0x2d9a83,_0xbae95c){winston[_0x1d34('0x63')](_0x1d34('0x73'),_0x2d9a83['params']);var _0xd393d2=_0x2d9a83[_0x1d34('0x72')][_0x1d34('0x42')];winston[_0x1d34('0x63')]('»»»\x20»»»\x20get\x20customer\x20from\x20db\x20-\x20projectid',_0xd393d2);SubscriptionPayment[_0x1d34('0x46')]({'project_id':_0xd393d2,'stripe_event':'checkout.session.completed'},async function(_0x113de1,_0x536676){if(_0x113de1){winston[_0x1d34('0x63')]('--\x20>\x20get\x20customer\x20from\x20db\x20-\x20Error\x20',_0x113de1);return _0x113de1;}if(_0x536676){_0x536676[0x0][_0x1d34('0x18')][_0x1d34('0x15')];winston[_0x1d34('0x63')]('--\x20>\x20get\x20customer\x20from\x20db\x20-\x20subscription\x20>\x20customer\x20id\x20',_0x536676[0x0]['object'][_0x1d34('0x15')]);const _0x1fbe94=_0x536676[0x0][_0x1d34('0x18')][_0x1d34('0x15')];const _0x47c7fc=require(_0x1d34('0x45'))(apiSecretKey);const _0x2965cc=await _0x47c7fc[_0x1d34('0x9b')]['retrieve'](_0x1fbe94);winston['debug']('--\x20>\x20get\x20customer\x20from\x20db\x20>\x20customer\x20from\x20stripe\x20API\x20',_0x2965cc);const _0x55424e=await _0x47c7fc[_0x1d34('0x23')]['list']({'customer':_0x1fbe94,'type':'card'});_0x2965cc[_0x1d34('0x23')]=_0x55424e;winston['debug'](_0x1d34('0x66'),_0x536676);_0xbae95c[_0x1d34('0x60')](_0x2965cc);}});});router[_0x1d34('0x96')]('/customers/:customerid',[passport[_0x1d34('0x61')]([_0x1d34('0x3f'),_0x1d34('0x51')],{'session':![]}),validtoken],async function(_0x15c90b,_0x4a143b){var _0x26ec2b=_0x15c90b[_0x1d34('0x72')]['customerid'];winston[_0x1d34('0x63')]('»»»\x20»»»\x20\x20update\x20customer\x20-\x20customerid\x20from\x20params\x20',_0x26ec2b);winston['debug'](_0x1d34('0x6'),_0x15c90b[_0x1d34('0x79')]);const _0x58686d=require(_0x1d34('0x45'))(apiSecretKey);let _0x57d141;try{_0x57d141=await _0x58686d[_0x1d34('0x23')][_0x1d34('0x83')]({'type':'card','card':{'number':_0x15c90b[_0x1d34('0x79')][_0x1d34('0x78')],'exp_month':_0x15c90b[_0x1d34('0x79')][_0x1d34('0x7f')],'exp_year':_0x15c90b[_0x1d34('0x79')][_0x1d34('0x2d')],'cvc':_0x15c90b[_0x1d34('0x79')][_0x1d34('0x4a')]}});}catch(_0x5efdaf){winston[_0x1d34('0x24')](_0x1d34('0x74'),_0x5efdaf);return _0x4a143b['status'](0x1f6)['send']({'success':![],'msg':_0x5efdaf});}winston[_0x1d34('0x63')]('»»»\x20»»»\x20\x20paymentMethod',_0x57d141);try{const _0x37c410=await _0x58686d[_0x1d34('0x23')][_0x1d34('0x8b')](_0x57d141['id'],{'customer':_0x26ec2b});winston[_0x1d34('0x63')](_0x1d34('0x56'),_0x37c410);}catch(_0x33623d){winston[_0x1d34('0x24')]('»»»\x20»»»\x20\x20paymentMethod\x20attached\x20\x20error\x20',_0x33623d);return _0x4a143b[_0x1d34('0x39')](0x1f5)[_0x1d34('0x5d')]({'success':![],'msg':_0x33623d});}const _0x3309d3=await _0x58686d['customers'][_0x1d34('0x94')](_0x26ec2b,{'invoice_settings':{'default_payment_method':_0x57d141['id']}});_0x4a143b[_0x1d34('0x60')](_0x3309d3);});router[_0x1d34('0x1e')](_0x1d34('0x33'),[passport['authenticate']([_0x1d34('0x3f'),_0x1d34('0x51')],{'session':![]}),validtoken],async function(_0x544033,_0x19360b){winston['info']('get\x20PaymentMethods\x20list\x20req.params',_0x544033[_0x1d34('0x72')]);var _0x15bb22=_0x544033[_0x1d34('0x72')][_0x1d34('0x62')];winston['debug'](_0x1d34('0x86'),_0x15bb22);const _0xae629b=require(_0x1d34('0x45'))(apiSecretKey);const _0x58d9c1=await _0xae629b[_0x1d34('0x9b')]['retrieve'](_0x15bb22);const _0x36d3c3=_0x58d9c1['invoice_settings'][_0x1d34('0x4e')];let _0xf478a3;try{_0xf478a3=await _0xae629b[_0x1d34('0x23')][_0x1d34('0x3b')]({'customer':_0x15bb22,'type':'card'});winston['debug'](_0x1d34('0x35'),_0xf478a3);}catch(_0x250dca){return _0x19360b['status'](0x1f5)[_0x1d34('0x5d')]({'success':![],'msg':_0x250dca});}winston[_0x1d34('0x63')]('get\x20PaymentMethods\x20list\x20>\x20paymentMethods\x20>\x20default_payment_method_id\x20',_0x36d3c3);_0xf478a3['data'][_0x1d34('0x36')](_0x1eb5ef=>{if(_0x1eb5ef['id']!==_0x36d3c3){winston[_0x1d34('0x63')](_0x1d34('0x25'),_0x1eb5ef['id']);detachPaymentFunc(_0x1eb5ef['id'],function(_0x4fcf68){winston['info']('detachPaymentFunc\x20result\x20',_0x4fcf68);});}});_0x19360b[_0x1d34('0x60')](_0xf478a3);});async function detachPaymentFunc(_0xb34667,_0x610af0){winston[_0x1d34('0x63')]('detachPaymentFunct\x20>\x20paymentMethodid\x20',_0xb34667);const _0x1baf8f=require(_0x1d34('0x45'))(apiSecretKey);let _0x228feb;try{_0x228feb=await _0x1baf8f[_0x1d34('0x23')]['detach'](_0xb34667);_0x610af0(_0x228feb);}catch(_0x160e4a){_0x610af0(_0x160e4a);}}module[_0x1d34('0x77')]=router;
2
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBheW1lbnRzL3N0cmlwZS9pbmRleC5qcyJdLCJuYW1lcyI6WyJleHByZXNzIiwicmVxdWlyZSIsInJvdXRlciIsIndpbnN0b24iLCJQcm9qZWN0IiwiU3Vic2NyaXB0aW9uUGF5bWVudCIsIm1vbWVudCIsIm1vbmdvb3NlIiwicGFzc3BvcnQiLCJ2YWxpZHRva2VuIiwiYXBpS2V5IiwicHJvY2VzcyIsInN0cmlwZSIsImVuZHBvaW50U2VjcmV0IiwiYXBpU2VjcmV0S2V5IiwiYm9keVBhcnNlciIsIl8weDIyOGM2OSIsIl8weDMyYzBjZiIsIl8weDlmNTAzIiwiXzB4ODgxNDUwIiwiXzB4YmU0ZGZhIiwiXzB4NmJjYzA1IiwiXzB4NmQ2MjExIiwiXzB4MWYxNmU5IiwiXzB4MTZmZWYxIiwiXzB4NDY5NWY3IiwiXzB4MzExODhiIiwiXzB4MWRjNWFhIiwiTnVtYmVyIiwiXzB4MTBmODE3IiwiZ2V0U3Vic2NyaXRpb25CeUlkIiwiXzB4MTFhOWRlIiwiXzB4MWQxYWY1IiwiXzB4NGJlYjUwIiwiXzB4MWNiMDlhIiwiXzB4NDk3MTRkIiwidXBkYXRlUHJvamVjdFByb2ZpbGUiLCJzYXZlT25EQiIsIl8weDNhMmY2MyIsIl8weDE3ZTBlMSIsIl8weDQxMzlmNyIsIl8weDM0OWQwYSIsIl8weDI5MjNlNSIsImdldFN1YkJ5SWRBbmRDaGVja291dFNlc3Npb25Db21wbGV0ZWRFdm50Iiwi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AgfVxuICAgICAgICAgICAgaWYgKHByb2plY3QpIHtcbiAgICAgICAgICAgICAgd2luc3Rvbi5pbmZvKCcqKiogKioqIGdldFN1YkJ5SWRBbmRDaGVja291dFNlc3Npb25Db21wbGV0ZWRFdm50ICBwcm9qZWN0ICcsIHByb2plY3QpO1xuICAgICAgICAgICAgICB3aW5zdG9uLmluZm8oJyoqKiAqKiogZ2V0U3ViQnlJZEFuZENoZWNrb3V0U2Vzc2lvbkNvbXBsZXRlZEV2bnQgIHByb2plY3QgPiBwcm9maWxlJywgcHJvamVjdC5wcm9maWxlKTtcblxuICAgICAgICAgICAgICB2YXIgc2VhdHNfbnVtID0gcHJvamVjdC5wcm9maWxlLmFnZW50cztcbiAgICAgICAgICAgICAgd2luc3Rvbi5pbmZvKCcqKiogKioqIGdldFN1YkJ5SWRBbmRDaGVja291dFNlc3Npb25Db21wbGV0ZWRFdm50ICBwcm9qZWN0ID4gcHJvZmlsZSA+IGFnZW50cycsIHNlYXRzX251bSk7XG4gICAgICAgICAgICAgIFxuICAgICAgICAgICAgICB2YXIgcGxhbl9uYW1lID0gcHJvamVjdC5wcm9maWxlLm5hbWU7XG4gICAgICAgICAgICAgIHdpbnN0b24uaW5mbygnKioqICoqKiBnZXRTdWJCeUlkQW5kQ2hlY2tvdXRTZXNzaW9uQ29tcGxldGVkRXZudCAgcHJvamVjdCA+IHByb2ZpbGUgPiBhZ2VudHMgdHlwZW9mJywgdHlwZW9mIHNlYXRzX251bSk7XG4gICAgICAgICAgICAgIFxuICAgICAgICAgICAgICB2YXIgdXNlcklkID0gc3Vic3B0bl9wYXltZW50LnVzZXJfaWRcbiAgICAgICAgICAgICAgd2luc3Rvbi5pbmZvKCcqKiogKioqIGdldFN1YkJ5SWRBbmRDaGVja291dFNlc3Npb25Db21wbGV0ZWRFdm50ICBwcm9qZWN0ID4gcHJvZmlsZSA+IG5hbWUnLCBwbGFuX25hbWUpO1xuXG4gICAgICAgICAgICAgIC8vIC0tLS0tLS0tLS0tLS0tLS0tLS0tLS0tXG4gICAgICAgICAgICAgIC8vICBCT0RZIFxuICAgICAgICAgICAgICAvLyAtLS0tLS0tLS0tLS0tLS0tLS0tLS0tLVxuICAgICAgICAgICAgICB2YXIgYm9keSA9IHtcbiAgICAgICAgICAgICAgICBwcm9maWxlOiB7XG4gICAgICAgICAgICAgICAgICBuYW1lOiBwbGFuX25hbWUsXG4gICAgICAgICAgICAgICAgICB0eXBlOiAncGF5bWVudCcsXG4gICAgICAgICAgICAgICAgICBzdWJTdGFydDogc3Vic2NyaXB0aW9uU3RhcnREYXRlLFxuICAgICAgICAgICAgICAgICAgc3ViRW5kOiBzdWJzY3JpcHRpb25FbmREYXRlLFxuICAgICAgICAgICAgICAgICAgc3Vic2NyaXB0aW9uSWQ6IHN1YnNjcmlwdGlvbklkLFxuICAgICAgICAgICAgICAgICAgbGFzdF9zdHJpcGVfZXZlbnQ6IGV2ZW50LnR5cGUsXG4gICAgICAgICAgICAgICAgICBhZ2VudHM6IHNlYXRzX251bVxuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgIC8qKiAyQiAqL1xuICAgICAgICAgICAgICB1cGRhdGVQcm9qZWN0UHJvZmlsZShwcm9qZWN0SWQsIGJvZHksICdpbnZvaWNlLnBheW1lbnRfc3VjY2VlZGVkJyk7XG4gICAgICAgICAgICAgIFxuICAgICAgICAgICAgICAvKiogMkMgKi9cbiAgICAgICAgICAgICAgc2F2ZU9uREIoc3Vic2NyaXB0aW9uSWQsIHByb2plY3RJZCwgZXZlbnQsIHVzZXJJZCwgZXZlbnQudHlwZSwgcGxhbl9uYW1lLCBzZWF0c19udW0pO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgfSk7XG4gICAgICAgIH1cblxuICAgICAgfSkuY2F0Y2goZnVuY3Rpb24gKGVycikge1xuICAgICAgICB3aW5zdG9uLmVycm9yKCcqKiogKioqIGdldFN1YkJ5SWRBbmRDaGVja291dFNlc3Npb25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RfbWV0aG9kLmF0dGFjaGVkJzpcbi8vICAgICAgICAgY29uc3QgcGF5bWVudE1ldGhvZCA9IGV2ZW50LmRhdGEub2JqZWN0O1xuLy8gICAgICAgICBoYW5kbGVQYXltZW50TWV0aG9kQXR0YWNoZWQocGF5bWVudE1ldGhvZCk7XG4vLyAgICAgICAgIGJyZWFrO1xuLy8gICAgICAgLy8gLi4uIGhhbmRsZSBvdGhlciBldmVudCB0eXBlc1xuLy8gICAgICAgZGVmYXVsdDpcbi8vICAgICAgICAgLy8gVW5leHBlY3RlZCBldmVudCB0eXBlXG4vLyAgICAgICAgIHJldHVybiByZXNwb25zZS5zdGF0dXMoNDAwKS5lbmQoKTtcbi8vICAgICB9XG5cbi8vICAgICAvLyBSZXR1cm4gYSByZXNwb25zZSB0byBhY2tub3dsZWRnZSByZWNlaXB0IG9mIHRoZSBldmVudFxuLy8gICAgIHJlc3BvbnNlLmpzb24oe3JlY2VpdmVkOiB0cnVlfSk7XG4vLyB9KTtcblxuXG5cblxubW9kdWxlLmV4cG9ydHMgPSByb3V0ZXI7Il0sImZpbGUiOiJwYXltZW50cy9zdHJpcGUvaW5kZXguanMifQ==
@@ -147,8 +147,6 @@ class QuoteManager {
147
147
  */
148
148
  async checkQuote(project, object, type) {
149
149
 
150
- winston.info("checkQuote project ", project);
151
- winston.info("checkQuote object ", object);
152
150
  winston.info("checkQuote type " + type);
153
151
  if (quotes_enabled === false) {
154
152
  winston.info("QUOTES DISABLED - checkQuote for type " + type);
@@ -20,7 +20,7 @@ var assert = chai.assert;
20
20
 
21
21
  chai.use(chaiHttp);
22
22
 
23
- describe('FaqKBRoute', () => {
23
+ describe('OpenaiRoute', () => {
24
24
 
25
25
  describe('/create', () => {
26
26
 
@@ -102,30 +102,6 @@ describe('FaqKBRoute', () => {
102
102
  })
103
103
  }).timeout(20000)
104
104
 
105
- it('completions missing settings', (done) => {
106
-
107
- var email = "test-signup-" + Date.now() + "@email.com";
108
- var pwd = "pwd";
109
-
110
- userService.signup(email, pwd, "Test Firstname", "Test Lastname").then((savedUser) => {
111
- projectService.create("test-openai-create", savedUser._id).then((savedProject) => {
112
-
113
- chai.request(server)
114
- .post('/' + savedProject._id + '/openai')
115
- .auth(email, pwd)
116
- .send({ question: "Provide 3 names for a dog", context: "you are an awesome assistant", max_tokens: 100, temperature: 0, model: "gpt-3.5-turbo" })
117
- .end((err, res) => {
118
- if (log) {console.log("res.body: ", res.body);}
119
- res.should.have.status(400);
120
- res.body.should.be.a('object');
121
- expect(res.body.success).to.equal(false);
122
- expect(res.body.message).to.equal("Missing gptkey parameter (settings not exist)");
123
-
124
- done();
125
- })
126
- })
127
- })
128
- }).timeout(20000)
129
105
 
130
106
  });
131
107
 
@@ -128,8 +128,8 @@ describe('RequestService', function () {
128
128
 
129
129
  let quotes = await qm.getAllQuotes(savedProject, obj);
130
130
  console.log("quotes: ", quotes);
131
- quotes.requests.quote.should.be.a('string');
132
- expect(quotes.requests.quote).to.equal('1');
131
+ // quotes.requests.quote.should.be.a('string');
132
+ // expect(quotes.requests.quote).to.equal('1');
133
133
 
134
134
  done();
135
135
  }, 200);