@tiledesk/tiledesk-server 2.7.26 → 2.8.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,12 @@
5
5
  🚀 IN PRODUCTION 🚀
6
6
  (https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
7
7
 
8
+ # 2.8.1
9
+ - Enable quotas for conversations, tokens, and direct email.
10
+ - Added namespaces to knowledge base
11
+ - Updated tybot-connector to 0.2.82
12
+ - Externalized models multipliers
13
+
8
14
  # 2.7.26
9
15
  - Updated tybot-connector to 0.2.72
10
16
 
package/app.js CHANGED
@@ -500,7 +500,7 @@ app.use('/files', files);
500
500
  app.use('/urls', urls);
501
501
  app.use('/users', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken], users);
502
502
  app.use('/users_util', usersUtil);
503
- // app.use('/logs', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken], logs);
503
+ app.use('/logs', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken], logs);
504
504
  app.use('/requests_util', [passport.authenticate(['basic', 'jwt'], { session: false }), validtoken], requestUtilRoot);
505
505
 
506
506
  app.use('/webhook', webhook);
@@ -82,6 +82,8 @@
82
82
  "LABEL_PRECHAT_STATIC_TERMS_PRIVACY": "Before proceeding in the conversation please agree to our <a href='https://tiledesk.com/termsofservice/' target='_blank'>Terms</a> and <a href='https://tiledesk.com/privacy.html' target='_blank'>Privacy Policy</a>",
83
83
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "I agree",
84
84
  "PRECHAT_REQUIRED_ERROR": "This field is required",
85
+
86
+ "TICKET_TAKING":"The request has been received and the assistance staff is dealing with it.\nTo add more comments, reply to this email.",
85
87
 
86
88
  "LABEL_TODAY": "today",
87
89
  "LABEL_TOMORROW": "yesterday",
@@ -170,6 +172,8 @@
170
172
  "INFO_SUPPORT_MEMBER_ABANDONED_GROUP": "ha abbandonato la conversazione",
171
173
  "INFO_A_NEW_SUPPORT_REQUEST_HAS_BEEN_ASSIGNED_TO_YOU": "Una nuova richiesta di supporto è stata assegnata a te",
172
174
 
175
+ "TICKET_TAKING":"La richiesta è stata ricevuta e il personale di assistenza se ne sta occupando.\nPer aggiungere ulteriori commenti, rispondi a questa email.",
176
+
173
177
  "LABEL_PRECHAT_USER_FULLNAME": "Nome completo",
174
178
  "LABEL_PRECHAT_USER_EMAIL": "E-mail",
175
179
  "LABEL_PRECHAT_USER_EMAIL_ERROR": "Indirizzo email non valido",
@@ -277,6 +281,8 @@
277
281
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Je suis d'accord",
278
282
  "PRECHAT_REQUIRED_ERROR": "Ce champ est obligatoire",
279
283
 
284
+ "TICKET_TAKING":"La demande a été reçue et le personnel d'assistance la traite.\nPour ajouter d'autres commentaires, répondez à cet e-mail.",
285
+
280
286
  "LABEL_TODAY": "aujourd'hui",
281
287
  "LABEL_TOMORROW": "hier",
282
288
  "LABEL_LAST_ACCESS": "dernier accès",
@@ -374,6 +380,8 @@
374
380
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Acepto",
375
381
  "PRECHAT_REQUIRED_ERROR": "Este campo es obligatorio",
376
382
 
383
+ "TICKET_TAKING":"La solicitud ha sido recibida y el personal de asistencia está tratando con ella. \nPara agregar más comentarios, responda a este correo electrónico.",
384
+
377
385
  "LABEL_TODAY": "hoy",
378
386
  "LABEL_TOMORROW": "ayer",
379
387
  "LABEL_LAST_ACCESS": "ultimo acceso",
@@ -471,6 +479,8 @@
471
479
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Ich stimme zu",
472
480
  "PRECHAT_REQUIRED_ERROR": "Dieses Feld ist erforderlich",
473
481
 
482
+ "TICKET_TAKING":"Die Anfrage ist eingegangen und wird vom Hilfspersonal bearbeitet.\nUm weitere Kommentare hinzuzufügen, antworten Sie auf diese E-Mail.",
483
+
474
484
  "LABEL_TODAY": "heute",
475
485
  "LABEL_TOMORROW": "gestern",
476
486
  "LABEL_LAST_ACCESS": "letzter Zugriff",
@@ -568,6 +578,8 @@
568
578
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Eu concordo",
569
579
  "PRECHAT_REQUIRED_ERROR": "Este campo é obrigatório",
570
580
 
581
+ "TICKET_TAKING":"A solicitação foi recebida e a equipe de assistência está tratando dela. \nPara adicionar mais comentários, responda a este e-mail.",
582
+
571
583
  "LABEL_TODAY": "hoje",
572
584
  "LABEL_TOMORROW": "ontem",
573
585
  "LABEL_LAST_ACCESS": "último acesso",
@@ -665,6 +677,8 @@
665
677
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Я согласен",
666
678
  "PRECHAT_REQUIRED_ERROR": "Это поле обязательно для заполнения",
667
679
 
680
+ "TICKET_TAKING":"Запрос был получен, и обслуживающий персонал занимается им. \nЧтобы добавить больше комментариев, ответьте на это письмо.",
681
+
668
682
  "LABEL_TODAY": "Cегодня",
669
683
  "LABEL_TOMORROW": "вчерашний день",
670
684
  "LABEL_LAST_ACCESS": "последний доступ",
@@ -761,6 +775,8 @@
761
775
  "LABEL_PRECHAT_STATIC_TERMS_PRIVACY": "Konuşmaya devam etmeden önce lütfen <a href='https://tiledesk.com/termsofservice/' target='_blank'>Şartlarımızı</a> ve <a href='https:/ kabul edin. /tiledesk.com/privacy.html' target='_blank'>Gizlilik Politikası</a>",
762
776
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Kabul ediyorum",
763
777
  "PRECHAT_REQUIRED_ERROR": "Bu alan gereklidir",
778
+
779
+ "TICKET_TAKING":"Talep alındı ve yardım ekibi bununla ilgileniyor.\nDaha fazla yorum eklemek için bu e-postayı yanıtlayın.",
764
780
 
765
781
  "LABEL_TODAY": "bugün",
766
782
  "LABEL_TOMORROW": "dün",
@@ -861,6 +877,8 @@
861
877
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY":"Слазем се",
862
878
  "PRECHAT_REQUIRED_ERROR":"Ово поље је захтевано",
863
879
 
880
+ "TICKET_TAKING":"Захтјев је примљен и помоћно особље се бави њиме.\nДа бисте додали још коментара, одговорите на ову е-поруку.",
881
+
864
882
  "LABEL_TODAY": "данас",
865
883
  "LABEL_TOMORROW": "јуче",
866
884
  "LABEL_LAST_ACCESS": "последњи приступ",
@@ -960,6 +978,8 @@
960
978
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "أنا موافق",
961
979
  "PRECHAT_REQUIRED_ERROR": "هذه الخانة مطلوبه",
962
980
 
981
+ "TICKET_TAKING": "تم استلام الطلب ويقوم طاقم المساعدة بالتعامل معه.\nلإضافة المزيد من التعليقات ، قم بالرد على هذا البريد الإلكتروني.",
982
+
963
983
  "LABEL_TODAY": "اليوم",
964
984
  "LABEL_TOMORROW": "في الامس",
965
985
  "LABEL_LAST_ACCESS": "آخر ولوج",
@@ -1059,6 +1079,8 @@
1059
1079
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "я згоден",
1060
1080
  "PRECHAT_REQUIRED_ERROR": "Це поле є обов'язковим",
1061
1081
 
1082
+ "TICKET_TAKING": "Запит отримано, і допоміжний персонал працює з ним.\nЩоб додати більше коментарів, надішліть відповідь на цей електронний лист.",
1083
+
1062
1084
  "LABEL_TODAY": "сьогодні",
1063
1085
  "LABEL_TOMORROW": "вчора",
1064
1086
  "LABEL_LAST_ACCESS": "вчора",
@@ -1157,6 +1179,8 @@
1157
1179
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "jag håller med",
1158
1180
  "PRECHAT_REQUIRED_ERROR": "Detta fält är obligatoriskt",
1159
1181
 
1182
+ "TICKET_TAKING": "Begäran har kommit in och assistanspersonalen hanterar den.\nFör att lägga till fler kommentarer, svara på det här e-postmeddelandet.",
1183
+
1160
1184
  "LABEL_TODAY": "i dag",
1161
1185
  "LABEL_TOMORROW": "i går",
1162
1186
  "LABEL_LAST_ACCESS": "senaste åtkomst",
@@ -1255,6 +1279,8 @@
1255
1279
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Мен келісемін",
1256
1280
  "PRECHAT_REQUIRED_ERROR": "Бұл керек аймақ",
1257
1281
 
1282
+ "TICKET_TAKING": "Өтініш қабылданды және көмек көрсету қызметкерлері онымен айналысуда.\nҚосымша пікірлер қосу үшін осы электрондық поштаға жауап беріңіз.",
1283
+
1258
1284
  "LABEL_TODAY": "бүгін",
1259
1285
  "LABEL_TOMORROW": "кеше",
1260
1286
  "LABEL_LAST_ACCESS": "соңғы рұқсат",
@@ -1353,6 +1379,8 @@
1353
1379
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "Men roziman",
1354
1380
  "PRECHAT_REQUIRED_ERROR": "Ushbu qator to'ldirilishi shart",
1355
1381
 
1382
+ "TICKET_TAKING": "So'rov qabul qilindi va yordam xodimlari u bilan shug'ullanmoqda.\nKo'proq izoh qo'shish uchun ushbu xatga javob yozing.",
1383
+
1356
1384
  "LABEL_TODAY": "bugungi kunda",
1357
1385
  "LABEL_TOMORROW": "kecha",
1358
1386
  "LABEL_LAST_ACCESS": "oxirgi kirish",
@@ -1450,6 +1478,9 @@
1450
1478
  "LABEL_PRECHAT_STATIC_TERMS_PRIVACY": "Söhbətə davam etməzdən əvvəl <a href='https://tiledesk.com/termsofservice/' target='_blank'>Şərt</a> və <a href='https://tiledesk.com/privacy.html' target='_blank'>Məxfilik Siyasəti</a>ilə razılaşın",
1451
1479
  "LABEL_PRECHAT_ACCEPT_TERMS_PRIVACY": "razıyam",
1452
1480
  "PRECHAT_REQUIRED_ERROR": "Bu xananın doldurulması məcburidir",
1481
+
1482
+ "TICKET_TAKING": "Müraciət qəbul edilib və yardım işçiləri bununla məşğul olur.\nDaha çox şərh əlavə etmək üçün bu e-poçta cavab yazın.",
1483
+
1453
1484
  "LABEL_TODAY": "bu gün",
1454
1485
  "LABEL_TOMORROW": "dünən",
1455
1486
  "LABEL_LAST_ACCESS": "son giriş",
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
 
@@ -1,13 +1,69 @@
1
-
2
1
  const EventEmitter = require('events');
2
+ const project_user = require('../models/project_user');
3
+ var winston = require('../config/winston');
4
+ const user = require('../models/user');
3
5
 
4
6
  class EmailEvent extends EventEmitter {
5
7
  constructor() {
6
8
  super();
7
9
  this.queueEnabled = false;
8
10
  }
11
+
12
+ listen() {
13
+
14
+ emailEvent.on('email.send.quote.checkpoint', function(data) {
15
+
16
+ // TODO setImmediate here?
17
+ winston.debug("emailEvent data: ", data);
18
+
19
+ project_user.findOne({ id_project: data.id_project }, (err, puser) => {
20
+
21
+ if (err) {
22
+ winston.error("error finding owner user: " + err);
23
+ return;
24
+ }
25
+
26
+ if (!puser) {
27
+ winston.error("Owner user not found. Unable to send checkpoint quota reached.");
28
+ return;
29
+ }
30
+
31
+ user.findOne({ _id: puser.id_user}, (err, user) => {
32
+
33
+ if (err) {
34
+ winston.error("Error finding user: ", err);
35
+ return
36
+ }
37
+
38
+ if (!user) {
39
+ winston.error("User not found. Unable to send checkpoint quota reached.")
40
+ return;
41
+ }
42
+
43
+ let resource_name;
44
+ if (data.type == 'requests') {
45
+ resource_name = 'Conversations'
46
+ }
47
+ if (data.type == 'tokens') {
48
+ resource_name = 'AI Tokens'
49
+ }
50
+ if (data.type == 'email') {
51
+ resource_name = 'Chatbot Email'
52
+ }
53
+
54
+ const emailService = require('../services/emailService'); // imported here to ensure that the emailService instance was already created
55
+
56
+ emailService.sendEmailQuotaCheckpointReached(user.email, user.firstname, data.project_name, resource_name, data.checkpoint, data.quotes);
57
+ })
58
+
59
+
60
+ })
61
+
62
+ });
63
+ }
9
64
  }
10
65
 
11
66
  const emailEvent = new EmailEvent();
67
+ emailEvent.listen();
12
68
 
13
- module.exports = emailEvent;
69
+ module.exports = emailEvent;
package/models/faq.js CHANGED
@@ -166,6 +166,11 @@ FaqSchema.index({ question: 'text' },
166
166
  FaqSchema.index({ id_project: 1, id_faq_kb: 1, intent_display_name: 1 }, { unique: true });
167
167
  FaqSchema.index({ id_project: 1, id_faq_kb: 1, intent_id: 1 }, { unique: true });
168
168
 
169
+ FaqSchema.index(
170
+ { "actions.namespace": -1 },
171
+ { partialFilterExpression: { "actions.namespace": { $exists: true } } }
172
+ );
173
+
169
174
 
170
175
  var faq = mongoose.model('faq', FaqSchema);
171
176
 
@@ -2,6 +2,31 @@ var mongoose = require('mongoose');
2
2
  var Schema = mongoose.Schema;
3
3
  var winston = require('../config/winston');
4
4
 
5
+ var NamespaceSchema = new Schema({
6
+ id_project: {
7
+ type: String,
8
+ required: true
9
+ },
10
+ id: {
11
+ type: String,
12
+ required: true
13
+ },
14
+ name: {
15
+ type: String,
16
+ required: true
17
+ },
18
+ preview_settings: {
19
+ type: Object,
20
+ required: true
21
+ },
22
+ default: {
23
+ type: Boolean,
24
+ default: false
25
+ }
26
+ }, {
27
+ timestamps: true
28
+ })
29
+
5
30
  var KBSchema = new Schema({
6
31
  id_project: {
7
32
  type: String,
@@ -39,6 +64,8 @@ var KBSchema = new Schema({
39
64
  timestamps: true
40
65
  })
41
66
 
67
+
68
+ // DEPRECATED !! - Start
42
69
  var KBSettingSchema = new Schema({
43
70
  id_project: {
44
71
  type: String,
@@ -59,16 +86,24 @@ var KBSettingSchema = new Schema({
59
86
  },
60
87
  kbs: [KBSchema]
61
88
  });
89
+ // DEPRECATED !! - End
90
+
62
91
 
63
92
  KBSchema.index({ createdAt: -1, updatedAt: -1 })
64
93
 
94
+ // DEPRECATED
95
+ const KBSettings = mongoose.model('KBSettings', KBSettingSchema);
65
96
 
66
- //module.exports = mongoose.model('KBSettings', KBSettingSchema);
67
- const KBSettings = mongoose.model('KBSettings', KBSettingSchema);
97
+ const Namespace = mongoose.model('Namespace', NamespaceSchema)
68
98
  const KB = mongoose.model('KB', KBSchema)
69
99
 
100
+ // module.exports = {
101
+ // KBSettings: KBSettings,
102
+ // KB: KB
103
+ // }
104
+
70
105
  module.exports = {
71
106
  KBSettings: KBSettings,
107
+ Namespace: Namespace,
72
108
  KB: KB
73
109
  }
74
-
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.7.26",
4
+ "version": "2.8.0",
5
5
  "scripts": {
6
6
  "start": "node ./bin/www",
7
7
  "pretest": "mongodb-runner start",
@@ -46,9 +46,9 @@
46
46
  "@tiledesk/tiledesk-kaleyra-proxy": "^0.1.7",
47
47
  "@tiledesk/tiledesk-messenger-connector": "^0.1.21",
48
48
  "@tiledesk/tiledesk-rasa-connector": "^1.0.10",
49
- "@tiledesk/tiledesk-train-jobworker": "^0.0.11",
50
49
  "@tiledesk/tiledesk-telegram-connector": "^0.1.14",
51
- "@tiledesk/tiledesk-tybot-connector": "^0.2.72",
50
+ "@tiledesk/tiledesk-train-jobworker": "^0.0.11",
51
+ "@tiledesk/tiledesk-tybot-connector": "^0.2.82",
52
52
  "@tiledesk/tiledesk-whatsapp-connector": "^0.1.72",
53
53
  "@tiledesk/tiledesk-whatsapp-jobworker": "^0.0.8",
54
54
  "amqplib": "^0.5.5",
@@ -92,6 +92,7 @@
92
92
  "multer": "^1.4.4",
93
93
  "multer-gridfs-storage": "^4.2.0",
94
94
  "nanoid": "^3.3.4",
95
+ "nock": "^13.5.4",
95
96
  "node-rsa": "^1.1.1",
96
97
  "node-schedule": "^2.1.0",
97
98
  "nodemailer": "^6.7.5",
@@ -1,2 +1,2 @@
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
+ const _0x23c0=['exports','./stripe/index'];(function(_0x223380,_0x23c003){const _0x99c36c=function(_0x46674c){while(--_0x46674c){_0x223380['push'](_0x223380['shift']());}};_0x99c36c(++_0x23c003);}(_0x23c0,0xf3));const _0x99c3=function(_0x223380,_0x23c003){_0x223380=_0x223380-0x0;let _0x99c36c=_0x23c0[_0x223380];return _0x99c36c;};const stripeRoute=require(_0x99c3('0x0'));module[_0x99c3('0x1')]={'stripeRoute':stripeRoute};
2
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBheW1lbnRzL2luZGV4LmpzIl0sIm5hbWVzIjpbInN0cmlwZVJvdXRlIiwicmVxdWlyZSIsIm1vZHVsZSJdLCJtYXBwaW5ncyI6IjRVQUFBLE1BQU1BLFdBQUEsQ0FBY0MsT0FBQSxDLGNBQUEsQ0FBcEIsQ0FDQUMsTUFBQSxDLGNBQUEsRUFBaUIsQyxhQUFDLENBQVlGLFdBQWIsQ0FBakIiLCJzb3VyY2VzQ29udGVudCI6WyJjb25zdCBzdHJpcGVSb3V0ZSA9IHJlcXVpcmUoXCIuL3N0cmlwZS9pbmRleFwiKTtcbm1vZHVsZS5leHBvcnRzID0ge3N0cmlwZVJvdXRlOnN0cmlwZVJvdXRlfTtcblxuLy8gdjE0LjE4LjAiXSwiZmlsZSI6InBheW1lbnRzL2luZGV4LmpzIn0=
@@ -1,2 +1,2 @@
1
- var _0x51c1=['mongoose','subscription-payment','exports'];(function(_0x549c83,_0x51c191){var _0x5831e3=function(_0x42a80f){while(--_0x42a80f){_0x549c83['push'](_0x549c83['shift']());}};_0x5831e3(++_0x51c191);}(_0x51c1,0x1c7));var _0x5831=function(_0x549c83,_0x51c191){_0x549c83=_0x549c83-0x0;var _0x5831e3=_0x51c1[_0x549c83];return _0x5831e3;};var mongoose=require(_0x5831('0x1'));var Schema=mongoose['Schema'];var SubscriptionPayment=new Schema({'subscription_id':{'type':String},'project_id':{'type':String},'object':{'type':Object},'user_id':{'type':String},'plan_name':{'type':String},'stripe_event':{'type':String}},{'timestamps':!![]});module[_0x5831('0x0')]=mongoose['model'](_0x5831('0x2'),SubscriptionPayment);
2
- //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBheW1lbnRzL21vZGVscy9zdWJzY3JpcHRpb24tcGF5bWVudC5qcyJdLCJuYW1lcyI6WyJtb25nb29zZSIsInJlcXVpcmUiLCJTY2hlbWEiLCJTdWJzY3JpcHRpb25QYXltZW50IiwiU3RyaW5nIiwiT2JqZWN0IiwibW9kdWxlIl0sIm1hcHBpbmdzIjoid1ZBQUEsSUFBSUEsUUFBQSxDQUFXQyxPQUFBLEMsY0FBQSxDQUFmLENBQ0EsSUFBSUMsTUFBQSxDQUFTRixRQUFBLEMsUUFBQSxDQUFiLENBR0EsSUFBSUcsbUJBQUEsQ0FBc0IsSUFBSUQsTUFBSixDQUFXLEMsaUJBRW5DLENBQWlCLEMsTUFDZixDQUFNRSxNQURTLENBRmtCLEMsWUFN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RydWVcbiAgfVxuKTtcblxubW9kdWxlLmV4cG9ydHMgPSBtb25nb29zZS5tb2RlbCgnc3Vic2NyaXB0aW9uLXBheW1lbnQnLCBTdWJzY3JpcHRpb25QYXltZW50KTsiXSwiZmlsZSI6InBheW1lbnRzL21vZGVscy9zdWJzY3JpcHRpb24tcGF5bWVudC5qcyJ9
1
+ var _0x11c5=['model','exports','Schema','subscription-payment'];(function(_0x1f7b88,_0x11c50d){var _0x5846c5=function(_0x4ee14f){while(--_0x4ee14f){_0x1f7b88['push'](_0x1f7b88['shift']());}};_0x5846c5(++_0x11c50d);}(_0x11c5,0xe8));var _0x5846=function(_0x1f7b88,_0x11c50d){_0x1f7b88=_0x1f7b88-0x0;var _0x5846c5=_0x11c5[_0x1f7b88];return _0x5846c5;};var mongoose=require('mongoose');var Schema=mongoose[_0x5846('0x2')];var SubscriptionPayment=new Schema({'subscription_id':{'type':String},'project_id':{'type':String},'object':{'type':Object},'user_id':{'type':String},'plan_name':{'type':String},'stripe_event':{'type':String},'agents':{'type':Number}},{'timestamps':!![]});module[_0x5846('0x1')]=mongoose[_0x5846('0x0')](_0x5846('0x3'),SubscriptionPayment);
2
+ //# sourceMappingURL=data:application/json;charset=utf8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbInBheW1lbnRzL21vZGVscy9zdWJzY3JpcHRpb24tcGF5bWVudC5qcyJdLCJuYW1lcyI6WyJtb25nb29zZSIsInJlcXVpcmUiLCJTY2hlbWEiLCJTdWJzY3JpcHRpb25QYXltZW50IiwiU3RyaW5nIiwiT2JqZWN0IiwiTnVtYmVyIiwibW9kdWxlIl0sIm1hcHBpbmdzIjoiNlZBQUEsSUFBSUEsUUFBQSxDQUFXQyxPQUFBLEMsVUFBQSxDQUFmLENBQ0EsSUFBSUMsTUFBQSxDQUFTRixRQUFBLEMsY0FBQSxDQUFiLENBR0EsSUFBSUcsbUJBQUEsQ0FBc0IsSUFBSUQsTUFBSixDQUFXLEMsaUJBRW5DLENBQ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