owl-progiciel 1.0.2 → 1.0.3

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.
Files changed (72) hide show
  1. package/dist/api/routes/client.routes.d.ts +2 -0
  2. package/dist/api/routes/client.routes.js +1 -0
  3. package/dist/api/routes/item.routes.d.ts +2 -0
  4. package/dist/api/routes/item.routes.js +1 -0
  5. package/dist/api/routes/order.routes.d.ts +2 -0
  6. package/dist/api/routes/order.routes.js +1 -0
  7. package/dist/api/routes/preparation.routes.d.ts +2 -0
  8. package/dist/api/routes/preparation.routes.js +1 -0
  9. package/dist/api/routes/purchase.routes.d.ts +2 -0
  10. package/dist/api/routes/purchase.routes.js +1 -0
  11. package/dist/api/routes/reception.routes.d.ts +2 -0
  12. package/dist/api/routes/reception.routes.js +1 -0
  13. package/dist/api/routes/stock.routes.d.ts +2 -0
  14. package/dist/api/routes/stock.routes.js +1 -0
  15. package/dist/api/routes/supplier.routes.d.ts +2 -0
  16. package/dist/api/routes/supplier.routes.js +1 -0
  17. package/dist/api/routes/tax.routes.d.ts +2 -0
  18. package/dist/api/routes/tax.routes.js +1 -0
  19. package/dist/api/routes/user.routes.d.ts +2 -0
  20. package/dist/api/routes/user.routes.js +1 -0
  21. package/dist/api/server.d.ts +1 -0
  22. package/dist/api/server.js +1 -0
  23. package/dist/core/Entity.js +1 -1
  24. package/dist/core/EventBus.js +1 -1
  25. package/dist/core/{PrismaDatabase.d.ts → EventsDatabase.d.ts} +1 -3
  26. package/dist/core/EventsDatabase.js +1 -0
  27. package/dist/core/Manager.js +1 -1
  28. package/dist/core/events/ClientEvents.d.ts +1 -2
  29. package/dist/core/events/ClientEvents.js +1 -1
  30. package/dist/core/events/ItemEvents.d.ts +1 -2
  31. package/dist/core/events/ItemEvents.js +1 -1
  32. package/dist/core/events/OrderEvents.d.ts +1 -2
  33. package/dist/core/events/OrderEvents.js +1 -1
  34. package/dist/core/events/PreparationEvents.d.ts +1 -2
  35. package/dist/core/events/PreparationEvents.js +1 -1
  36. package/dist/core/events/PurchaseEvents.d.ts +1 -2
  37. package/dist/core/events/PurchaseEvents.js +1 -1
  38. package/dist/core/events/ReceptionEvents.d.ts +1 -2
  39. package/dist/core/events/ReceptionEvents.js +1 -1
  40. package/dist/core/events/StockEvents.d.ts +1 -2
  41. package/dist/core/events/StockEvents.js +1 -1
  42. package/dist/core/events/SupplierEvents.d.ts +1 -2
  43. package/dist/core/events/SupplierEvents.js +1 -1
  44. package/dist/core/events/TaxEvents.d.ts +1 -2
  45. package/dist/core/events/TaxEvents.js +1 -1
  46. package/dist/core/events/UserEvents.d.ts +1 -2
  47. package/dist/core/events/UserEvents.js +1 -1
  48. package/dist/entities/Client.js +1 -1
  49. package/dist/entities/Item.js +1 -1
  50. package/dist/entities/Order.js +1 -1
  51. package/dist/entities/Preparation.js +1 -1
  52. package/dist/entities/Purchase.js +1 -1
  53. package/dist/entities/Reception.js +1 -1
  54. package/dist/entities/Stock.js +1 -1
  55. package/dist/entities/Supplier.js +1 -1
  56. package/dist/entities/Tax.js +1 -1
  57. package/dist/entities/User.js +1 -1
  58. package/dist/index.js +1 -1
  59. package/dist/managers/ClientManager.js +1 -1
  60. package/dist/managers/ItemManager.js +1 -1
  61. package/dist/managers/OrderManager.js +1 -1
  62. package/dist/managers/PreparationManager.js +1 -1
  63. package/dist/managers/PurchaseManager.js +1 -1
  64. package/dist/managers/ReceptionManager.js +1 -1
  65. package/dist/managers/StockManager.js +1 -1
  66. package/dist/managers/SupplierManager.js +1 -1
  67. package/dist/managers/TaxManager.js +1 -1
  68. package/dist/managers/UserManager.js +1 -1
  69. package/dist/owl/OWLClient.d.ts +2 -2
  70. package/dist/owl/OWLClient.js +1 -1
  71. package/package.json +9 -3
  72. package/dist/core/PrismaDatabase.js +0 -1
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a0_0x33fb2f=a0_0x5ae4;(function(_0x301788,_0x32e9f9){const _0x5ef1fa=a0_0x5ae4,_0x87745=_0x301788();while(!![]){try{const _0x4dec55=-parseInt(_0x5ef1fa(0xa9))/0x1+-parseInt(_0x5ef1fa(0xb3))/0x2+parseInt(_0x5ef1fa(0xae))/0x3+-parseInt(_0x5ef1fa(0xb8))/0x4+parseInt(_0x5ef1fa(0xb1))/0x5*(-parseInt(_0x5ef1fa(0xbe))/0x6)+-parseInt(_0x5ef1fa(0xad))/0x7*(parseInt(_0x5ef1fa(0xb5))/0x8)+parseInt(_0x5ef1fa(0xb9))/0x9;if(_0x4dec55===_0x32e9f9)break;else _0x87745['push'](_0x87745['shift']());}catch(_0x3ab0ac){_0x87745['push'](_0x87745['shift']());}}}(a0_0x2c94,0x5e0c7));function a0_0x5ae4(_0x3e2b8f,_0x537d42){_0x3e2b8f=_0x3e2b8f-0xa8;const _0x2c946e=a0_0x2c94();let _0x5ae488=_0x2c946e[_0x3e2b8f];return _0x5ae488;}import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();router['post']('/',async(_0x4b4d31,_0x3c3c3e)=>{const _0x6780f9=a0_0x5ae4;try{const {taxes:_0xd084a6,..._0x11f106}=_0x4b4d31[_0x6780f9(0xaa)],_0x29d2e4=await prisma[_0x6780f9(0xb4)][_0x6780f9(0xb6)]({'data':{..._0x11f106,'taxes':{'create':_0xd084a6?.['map'](_0x3fd756=>({'tax':{'create':{..._0x3fd756}}}))||[]}},'include':{'taxes':{'include':{'tax':!![]}}}});_0x3c3c3e['json']({'id':_0x29d2e4['id']});}catch(_0x3d0b2e){_0x3c3c3e[_0x6780f9(0xbc)](0x1f4)['json']({'error':_0x3d0b2e[_0x6780f9(0xab)]});}}),router[a0_0x33fb2f(0xbb)](a0_0x33fb2f(0xb7),async(_0x1f7fda,_0x316cf6)=>{const _0x1fe293=a0_0x33fb2f;try{const {id:_0x30001e}=_0x1f7fda[_0x1fe293(0xb2)],_0x293370=await prisma[_0x1fe293(0xb4)]['findUnique']({'where':{'id':Number(_0x30001e)},'include':{'taxes':{'include':{'tax':!![]}}}});_0x316cf6[_0x1fe293(0xb0)](_0x293370);}catch(_0x1de8cf){_0x316cf6['status'](0x1f4)[_0x1fe293(0xb0)]({'error':_0x1de8cf[_0x1fe293(0xab)]});}}),router[a0_0x33fb2f(0xbb)]('/',async(_0x178401,_0x886534)=>{const _0x29dd40=a0_0x33fb2f;try{const _0x589ede=await prisma[_0x29dd40(0xb4)][_0x29dd40(0xac)]({'include':{'taxes':{'include':{'tax':!![]}}}});_0x886534[_0x29dd40(0xb0)](_0x589ede);}catch(_0xbe14c0){_0x886534[_0x29dd40(0xbc)](0x1f4)['json']({'error':_0xbe14c0[_0x29dd40(0xab)]});}}),router[a0_0x33fb2f(0xaf)](a0_0x33fb2f(0xbd),async(_0x14dc9a,_0x3c8d7b)=>{const _0x8e1267=a0_0x33fb2f;try{const _0x4e5c45=_0x14dc9a['body'],_0x517155=await prisma[_0x8e1267(0xb4)][_0x8e1267(0xac)]({'where':_0x4e5c45,'include':{'taxes':{'include':{'tax':!![]}}}});_0x3c8d7b[_0x8e1267(0xb0)](_0x517155);}catch(_0x14a1da){_0x3c8d7b['status'](0x1f4)[_0x8e1267(0xb0)]({'error':_0x14a1da[_0x8e1267(0xab)]});}}),router['put']('/:id',async(_0x4dc9cf,_0x533f9b)=>{const _0x103733=a0_0x33fb2f;try{const {id:_0x58db71}=_0x4dc9cf[_0x103733(0xb2)],_0x3bf95e=_0x4dc9cf[_0x103733(0xaa)],_0x32c923=await prisma[_0x103733(0xb4)]['update']({'where':{'id':Number(_0x58db71)},'data':_0x3bf95e});_0x533f9b[_0x103733(0xb0)](_0x32c923);}catch(_0xa5fc1d){_0x533f9b[_0x103733(0xbc)](0x1f4)[_0x103733(0xb0)]({'error':_0xa5fc1d[_0x103733(0xab)]});}}),router[a0_0x33fb2f(0xba)](a0_0x33fb2f(0xb7),async(_0x4ab3b1,_0x3c5f17)=>{const _0x18f35c=a0_0x33fb2f;try{const {id:_0x4b0b80}=_0x4ab3b1[_0x18f35c(0xb2)];await prisma['client']['delete']({'where':{'id':Number(_0x4b0b80)}}),_0x3c5f17[_0x18f35c(0xbc)](0xcc)[_0x18f35c(0xa8)]();}catch(_0x2ca52d){_0x3c5f17['status'](0x1f4)[_0x18f35c(0xb0)]({'error':_0x2ca52d[_0x18f35c(0xab)]});}});export default router;function a0_0x2c94(){const _0x342e3a=['878721piRgEi','post','json','47015oqQEcQ','params','127336Jwqblk','client','2936NIHnot','create','/:id','1112828nDKrtd','9922167hFlmFu','delete','get','status','/search','306WAaiCX','send','127430JAQfJq','body','message','findMany','1169PqdUyL'];a0_0x2c94=function(){return _0x342e3a;};return a0_0x2c94();}
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a1_0x3e57fb=a1_0x346d;(function(_0x28ea0a,_0x3845eb){const _0x30a1da=a1_0x346d,_0x523697=_0x28ea0a();while(!![]){try{const _0x40e8d0=-parseInt(_0x30a1da(0x1d8))/0x1+parseInt(_0x30a1da(0x1e1))/0x2*(parseInt(_0x30a1da(0x1db))/0x3)+-parseInt(_0x30a1da(0x1e5))/0x4+parseInt(_0x30a1da(0x1d9))/0x5*(-parseInt(_0x30a1da(0x1e6))/0x6)+parseInt(_0x30a1da(0x1de))/0x7+parseInt(_0x30a1da(0x1ec))/0x8+-parseInt(_0x30a1da(0x1e4))/0x9*(-parseInt(_0x30a1da(0x1e0))/0xa);if(_0x40e8d0===_0x3845eb)break;else _0x523697['push'](_0x523697['shift']());}catch(_0x3c27fc){_0x523697['push'](_0x523697['shift']());}}}(a1_0x45e0,0x6f340));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();router[a1_0x3e57fb(0x1ef)]('/',async(_0x138232,_0x53add8)=>{const _0x4fdddd=a1_0x3e57fb;try{const {taxes:_0x4e6cc6,..._0x2cc8e5}=_0x138232[_0x4fdddd(0x1da)],_0x5adc9b=await prisma[_0x4fdddd(0x1dc)]['create']({'data':{..._0x2cc8e5,'taxes':{'create':_0x4e6cc6?.[_0x4fdddd(0x1e2)](_0x5f3b66=>({'tax':{'create':{..._0x5f3b66}}}))||[]}},'include':{'taxes':{'include':{'tax':!![]}}}});_0x53add8[_0x4fdddd(0x1e3)]({'id':_0x5adc9b['id']});}catch(_0x5b7bc0){_0x53add8[_0x4fdddd(0x1ed)](0x1f4)[_0x4fdddd(0x1e3)]({'error':_0x5b7bc0[_0x4fdddd(0x1ea)]});}}),router[a1_0x3e57fb(0x1dd)](a1_0x3e57fb(0x1e7),async(_0x4296e9,_0x1c5d6c)=>{const _0x369200=a1_0x3e57fb;try{const {id:_0x219cf8}=_0x4296e9[_0x369200(0x1ee)],_0x23891f=await prisma[_0x369200(0x1dc)][_0x369200(0x1df)]({'where':{'id':Number(_0x219cf8)},'include':{'taxes':{'include':{'tax':!![]}}}});_0x1c5d6c[_0x369200(0x1e3)](_0x23891f);}catch(_0x347126){_0x1c5d6c[_0x369200(0x1ed)](0x1f4)[_0x369200(0x1e3)]({'error':_0x347126[_0x369200(0x1ea)]});}}),router[a1_0x3e57fb(0x1dd)]('/',async(_0x2ed877,_0x51a249)=>{const _0x47ba47=a1_0x3e57fb;try{const _0x3a0782=await prisma[_0x47ba47(0x1dc)][_0x47ba47(0x1d7)]({'include':{'taxes':{'include':{'tax':!![]}}}});_0x51a249['json'](_0x3a0782);}catch(_0x2ff687){_0x51a249['status'](0x1f4)[_0x47ba47(0x1e3)]({'error':_0x2ff687['message']});}}),router[a1_0x3e57fb(0x1ef)](a1_0x3e57fb(0x1e9),async(_0x7649a5,_0x35672e)=>{const _0x18afa6=a1_0x3e57fb;try{const _0x33f15a=_0x7649a5['body'],_0x146803=await prisma['item'][_0x18afa6(0x1d7)]({'where':_0x33f15a,'include':{'taxes':{'include':{'tax':!![]}}}});_0x35672e[_0x18afa6(0x1e3)](_0x146803);}catch(_0x40f2e6){_0x35672e['status'](0x1f4)['json']({'error':_0x40f2e6[_0x18afa6(0x1ea)]});}}),router['put'](a1_0x3e57fb(0x1e7),async(_0x115f6f,_0x36d330)=>{const _0x1cbdd5=a1_0x3e57fb;try{const {id:_0x24f048}=_0x115f6f[_0x1cbdd5(0x1ee)],_0x10e5f1=_0x115f6f['body'],_0xbe00bc=await prisma[_0x1cbdd5(0x1dc)]['update']({'where':{'id':Number(_0x24f048)},'data':_0x10e5f1});_0x36d330[_0x1cbdd5(0x1e3)](_0xbe00bc);}catch(_0x56ac50){_0x36d330[_0x1cbdd5(0x1ed)](0x1f4)[_0x1cbdd5(0x1e3)]({'error':_0x56ac50[_0x1cbdd5(0x1ea)]});}}),router[a1_0x3e57fb(0x1eb)](a1_0x3e57fb(0x1e7),async(_0x243394,_0x4598fa)=>{const _0x422073=a1_0x3e57fb;try{const {id:_0x5b7944}=_0x243394['params'];await prisma['item'][_0x422073(0x1eb)]({'where':{'id':Number(_0x5b7944)}}),_0x4598fa[_0x422073(0x1ed)](0xcc)[_0x422073(0x1e8)]();}catch(_0x1976f0){_0x4598fa[_0x422073(0x1ed)](0x1f4)[_0x422073(0x1e3)]({'error':_0x1976f0['message']});}});function a1_0x45e0(){const _0x4519eb=['5KkffaD','body','45LDvCmb','item','get','3720626PAvLQR','findUnique','3030cDOWWf','64786ZVZYdY','map','json','26217sFLtdy','3531952gtxuXd','414426RCLiTT','/:id','send','/search','message','delete','1834192GxEZeZ','status','params','post','findMany','721779RnlGUW'];a1_0x45e0=function(){return _0x4519eb;};return a1_0x45e0();}function a1_0x346d(_0x1ba5bb,_0x1408e1){_0x1ba5bb=_0x1ba5bb-0x1d7;const _0x45e0d9=a1_0x45e0();let _0x346d97=_0x45e0d9[_0x1ba5bb];return _0x346d97;}export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a2_0xb457e6=a2_0x1dad;(function(_0x1a0b57,_0x3a0702){const _0xc8ca69=a2_0x1dad,_0x1ee347=_0x1a0b57();while(!![]){try{const _0x2c7220=-parseInt(_0xc8ca69(0x124))/0x1+-parseInt(_0xc8ca69(0x12f))/0x2+parseInt(_0xc8ca69(0x11d))/0x3*(-parseInt(_0xc8ca69(0x127))/0x4)+-parseInt(_0xc8ca69(0x125))/0x5+-parseInt(_0xc8ca69(0x130))/0x6+-parseInt(_0xc8ca69(0x128))/0x7+parseInt(_0xc8ca69(0x129))/0x8;if(_0x2c7220===_0x3a0702)break;else _0x1ee347['push'](_0x1ee347['shift']());}catch(_0xe03017){_0x1ee347['push'](_0x1ee347['shift']());}}}(a2_0x4fb2,0x48a62));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a2_0x1dad(_0x5cc7ca,_0x2a11e7){_0x5cc7ca=_0x5cc7ca-0x11c;const _0x4fb2e2=a2_0x4fb2();let _0x1dadd9=_0x4fb2e2[_0x5cc7ca];return _0x1dadd9;}function a2_0x4fb2(){const _0x290d5e=['findMany','create','131640qBJmkv','2854290CQGOjE','/search','218068ywgHaL','1864009MVDxjP','18917976QVPFEh','post','send','params','get','put','499270CKjnZV','2802828DfbOLs','json','/:id','order','21ZzuOyu','delete','body','message','status'];a2_0x4fb2=function(){return _0x290d5e;};return a2_0x4fb2();}router[a2_0xb457e6(0x12a)]('/',async(_0x4dbc71,_0x22720b)=>{const _0x289c29=a2_0xb457e6;try{const _0x1c5691=await prisma[_0x289c29(0x11c)][_0x289c29(0x123)]({'data':_0x4dbc71[_0x289c29(0x11f)]});_0x22720b[_0x289c29(0x131)]({'id':_0x1c5691['id']});}catch(_0x4dc96e){_0x22720b[_0x289c29(0x121)](0x1f4)[_0x289c29(0x131)]({'error':_0x4dc96e[_0x289c29(0x120)]});}}),router[a2_0xb457e6(0x12d)](a2_0xb457e6(0x132),async(_0x3b60d4,_0x34e758)=>{const _0x4542f3=a2_0xb457e6;try{const {id:_0x5260e7}=_0x3b60d4[_0x4542f3(0x12c)],_0x4ea498=await prisma[_0x4542f3(0x11c)]['findUnique']({'where':{'id':Number(_0x5260e7)}});_0x34e758['json'](_0x4ea498);}catch(_0x474685){_0x34e758['status'](0x1f4)[_0x4542f3(0x131)]({'error':_0x474685[_0x4542f3(0x120)]});}}),router[a2_0xb457e6(0x12d)]('/',async(_0x54be0c,_0x549d3e)=>{const _0x1205cc=a2_0xb457e6;try{const _0x38a713=await prisma[_0x1205cc(0x11c)][_0x1205cc(0x122)]();_0x549d3e['json'](_0x38a713);}catch(_0x4dcffd){_0x549d3e['status'](0x1f4)['json']({'error':_0x4dcffd[_0x1205cc(0x120)]});}}),router[a2_0xb457e6(0x12a)](a2_0xb457e6(0x126),async(_0x38f3c4,_0x5632df)=>{const _0x3f5a25=a2_0xb457e6;try{const _0x3be3b9=_0x38f3c4[_0x3f5a25(0x11f)],_0x12e781=await prisma[_0x3f5a25(0x11c)][_0x3f5a25(0x122)]({'where':_0x3be3b9});_0x5632df[_0x3f5a25(0x131)](_0x12e781);}catch(_0x18e8c5){_0x5632df[_0x3f5a25(0x121)](0x1f4)[_0x3f5a25(0x131)]({'error':_0x18e8c5['message']});}}),router[a2_0xb457e6(0x12e)](a2_0xb457e6(0x132),async(_0x41b7a7,_0x3b01f5)=>{const _0x13162b=a2_0xb457e6;try{const {id:_0x370056}=_0x41b7a7[_0x13162b(0x12c)],_0x5de8b3=_0x41b7a7[_0x13162b(0x11f)],_0x40185e=await prisma[_0x13162b(0x11c)]['update']({'where':{'id':Number(_0x370056)},'data':_0x5de8b3});_0x3b01f5[_0x13162b(0x131)](_0x40185e);}catch(_0x258260){_0x3b01f5[_0x13162b(0x121)](0x1f4)[_0x13162b(0x131)]({'error':_0x258260[_0x13162b(0x120)]});}}),router['delete'](a2_0xb457e6(0x132),async(_0x4ac667,_0x552956)=>{const _0x1a6c30=a2_0xb457e6;try{const {id:_0x23a278}=_0x4ac667[_0x1a6c30(0x12c)];await prisma[_0x1a6c30(0x11c)][_0x1a6c30(0x11e)]({'where':{'id':Number(_0x23a278)}}),_0x552956[_0x1a6c30(0x121)](0xcc)[_0x1a6c30(0x12b)]();}catch(_0x4782c4){_0x552956[_0x1a6c30(0x121)](0x1f4)['json']({'error':_0x4782c4['message']});}});export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a3_0x3d966b=a3_0x6227;(function(_0x971a83,_0x187c3b){const _0x2bc85e=a3_0x6227,_0x4fa9e0=_0x971a83();while(!![]){try{const _0x20c529=parseInt(_0x2bc85e(0x15c))/0x1+parseInt(_0x2bc85e(0x159))/0x2*(-parseInt(_0x2bc85e(0x16d))/0x3)+-parseInt(_0x2bc85e(0x165))/0x4+-parseInt(_0x2bc85e(0x16e))/0x5*(-parseInt(_0x2bc85e(0x170))/0x6)+parseInt(_0x2bc85e(0x15b))/0x7+-parseInt(_0x2bc85e(0x157))/0x8*(parseInt(_0x2bc85e(0x16b))/0x9)+-parseInt(_0x2bc85e(0x16a))/0xa*(-parseInt(_0x2bc85e(0x168))/0xb);if(_0x20c529===_0x187c3b)break;else _0x4fa9e0['push'](_0x4fa9e0['shift']());}catch(_0x3841de){_0x4fa9e0['push'](_0x4fa9e0['shift']());}}}(a3_0x2de2,0x4f36b));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();router[a3_0x3d966b(0x16f)]('/',async(_0x597577,_0x543c03)=>{const _0x160b59=a3_0x3d966b;try{const _0x3cfc60=await prisma[_0x160b59(0x163)][_0x160b59(0x166)]({'data':_0x597577['body']});_0x543c03[_0x160b59(0x160)]({'id':_0x3cfc60['id']});}catch(_0x519460){_0x543c03[_0x160b59(0x158)](0x1f4)[_0x160b59(0x160)]({'error':_0x519460[_0x160b59(0x171)]});}}),router[a3_0x3d966b(0x167)](a3_0x3d966b(0x15f),async(_0x4cad28,_0x250a48)=>{const _0x4a7849=a3_0x3d966b;try{const {id:_0x4916af}=_0x4cad28['params'],_0x23719b=await prisma[_0x4a7849(0x163)][_0x4a7849(0x15e)]({'where':{'id':Number(_0x4916af)}});_0x250a48['json'](_0x23719b);}catch(_0x592ade){_0x250a48['status'](0x1f4)[_0x4a7849(0x160)]({'error':_0x592ade[_0x4a7849(0x171)]});}}),router[a3_0x3d966b(0x167)]('/',async(_0x230dc9,_0x5aadc5)=>{const _0x52faa5=a3_0x3d966b;try{const _0xdee15d=await prisma[_0x52faa5(0x163)][_0x52faa5(0x162)]();_0x5aadc5[_0x52faa5(0x160)](_0xdee15d);}catch(_0x3822e4){_0x5aadc5[_0x52faa5(0x158)](0x1f4)['json']({'error':_0x3822e4[_0x52faa5(0x171)]});}}),router[a3_0x3d966b(0x16f)](a3_0x3d966b(0x15d),async(_0x5de777,_0x42a2aa)=>{const _0x59262b=a3_0x3d966b;try{const _0x29500a=_0x5de777[_0x59262b(0x172)],_0x4db8b0=await prisma['preparation'][_0x59262b(0x162)]({'where':_0x29500a});_0x42a2aa[_0x59262b(0x160)](_0x4db8b0);}catch(_0x2fe330){_0x42a2aa[_0x59262b(0x158)](0x1f4)[_0x59262b(0x160)]({'error':_0x2fe330['message']});}}),router[a3_0x3d966b(0x169)](a3_0x3d966b(0x15f),async(_0x418cd8,_0x4b553e)=>{const _0x25979c=a3_0x3d966b;try{const {id:_0x309ed3}=_0x418cd8[_0x25979c(0x164)],_0x54d3b4=_0x418cd8[_0x25979c(0x172)],_0x59cf27=await prisma[_0x25979c(0x163)][_0x25979c(0x15a)]({'where':{'id':Number(_0x309ed3)},'data':_0x54d3b4});_0x4b553e[_0x25979c(0x160)](_0x59cf27);}catch(_0x131599){_0x4b553e[_0x25979c(0x158)](0x1f4)[_0x25979c(0x160)]({'error':_0x131599[_0x25979c(0x171)]});}}),router[a3_0x3d966b(0x161)]('/:id',async(_0x4156c3,_0x36637f)=>{const _0x291fdf=a3_0x3d966b;try{const {id:_0x1e7523}=_0x4156c3['params'];await prisma['preparation'][_0x291fdf(0x161)]({'where':{'id':Number(_0x1e7523)}}),_0x36637f[_0x291fdf(0x158)](0xcc)[_0x291fdf(0x16c)]();}catch(_0x123eca){_0x36637f[_0x291fdf(0x158)](0x1f4)[_0x291fdf(0x160)]({'error':_0x123eca['message']});}});function a3_0x2de2(){const _0x507bc5=['findMany','preparation','params','1521184FjIeqR','create','get','11CAYhOH','put','5008920QPRxnF','9SCqQgg','send','486InnfAh','75LWrLTY','post','229098TErViS','message','body','4879304CfvChL','status','6218HpIhYk','update','3280774TKLxqS','276007xQYjDb','/search','findUnique','/:id','json','delete'];a3_0x2de2=function(){return _0x507bc5;};return a3_0x2de2();}function a3_0x6227(_0x31d04f,_0x11a262){_0x31d04f=_0x31d04f-0x157;const _0x2de2c6=a3_0x2de2();let _0x62277a=_0x2de2c6[_0x31d04f];return _0x62277a;}export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a4_0x5ed8e2=a4_0x28da;(function(_0x3d9793,_0x202e0c){const _0x4a6d1d=a4_0x28da,_0x18bbe7=_0x3d9793();while(!![]){try{const _0x1c5488=parseInt(_0x4a6d1d(0xff))/0x1*(parseInt(_0x4a6d1d(0xf8))/0x2)+-parseInt(_0x4a6d1d(0x10c))/0x3*(-parseInt(_0x4a6d1d(0x113))/0x4)+-parseInt(_0x4a6d1d(0x105))/0x5*(parseInt(_0x4a6d1d(0x103))/0x6)+-parseInt(_0x4a6d1d(0x107))/0x7+parseInt(_0x4a6d1d(0x101))/0x8*(-parseInt(_0x4a6d1d(0xfd))/0x9)+-parseInt(_0x4a6d1d(0xfa))/0xa+parseInt(_0x4a6d1d(0xfc))/0xb;if(_0x1c5488===_0x202e0c)break;else _0x18bbe7['push'](_0x18bbe7['shift']());}catch(_0x4d77d6){_0x18bbe7['push'](_0x18bbe7['shift']());}}}(a4_0x1cb8,0x3ca7f));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a4_0x1cb8(){const _0x50e3ed=['4561550yMcZUe','json','13828716jyPXIl','296334bgtrqT','update','883WYcqCT','create','88WwjJsv','purchase','271518AtggUT','/search','50cpSsCh','body','1610532hGiXbN','params','get','send','post','153189xWHQyq','message','map','status','/:id','put','delete','36WlRwCH','74OPeOPG','findUnique'];a4_0x1cb8=function(){return _0x50e3ed;};return a4_0x1cb8();}router[a4_0x5ed8e2(0x10b)]('/',async(_0x2e9d71,_0x3017b3)=>{const _0x2fbfc9=a4_0x5ed8e2;try{const {Items:_0x5a01d4,..._0x20150c}=_0x2e9d71[_0x2fbfc9(0x106)],_0x57fd18=await prisma[_0x2fbfc9(0x102)][_0x2fbfc9(0x100)]({'data':{..._0x20150c,'Items':{'create':_0x5a01d4?.[_0x2fbfc9(0x10e)](_0x45bb07=>({'item':{'create':{..._0x45bb07}}}))||[]}},'include':{'items':{'include':{'item':!![]}}}});_0x3017b3[_0x2fbfc9(0xfb)]({'id':_0x57fd18['id']});}catch(_0x47851a){_0x3017b3['status'](0x1f4)[_0x2fbfc9(0xfb)]({'error':_0x47851a[_0x2fbfc9(0x10d)]});}}),router[a4_0x5ed8e2(0x109)]('/:id',async(_0x3d265f,_0x180892)=>{const _0x2ac034=a4_0x5ed8e2;try{const {id:_0x5718e8}=_0x3d265f['params'],_0xbfc982=await prisma[_0x2ac034(0x102)][_0x2ac034(0xf9)]({'where':{'id':Number(_0x5718e8)},'include':{'items':{'include':{'item':!![]}}}});_0x180892[_0x2ac034(0xfb)](_0xbfc982);}catch(_0x3bfa19){_0x180892[_0x2ac034(0x10f)](0x1f4)[_0x2ac034(0xfb)]({'error':_0x3bfa19[_0x2ac034(0x10d)]});}}),router[a4_0x5ed8e2(0x109)]('/',async(_0x1b8b6e,_0x404fbc)=>{const _0x517528=a4_0x5ed8e2;try{const _0x41e9a0=await prisma[_0x517528(0x102)]['findMany']({'include':{'items':{'include':{'item':!![]}}}});_0x404fbc['json'](_0x41e9a0);}catch(_0x1d15b7){_0x404fbc[_0x517528(0x10f)](0x1f4)['json']({'error':_0x1d15b7[_0x517528(0x10d)]});}}),router[a4_0x5ed8e2(0x10b)](a4_0x5ed8e2(0x104),async(_0x428deb,_0x5a2285)=>{const _0x50cc46=a4_0x5ed8e2;try{const _0x41a2f1=_0x428deb[_0x50cc46(0x106)],_0x346fd3=await prisma['purchase']['findMany']({'where':_0x41a2f1,'include':{'items':{'include':{'item':!![]}}}});_0x5a2285[_0x50cc46(0xfb)](_0x346fd3);}catch(_0x7b8358){_0x5a2285['status'](0x1f4)['json']({'error':_0x7b8358[_0x50cc46(0x10d)]});}}),router[a4_0x5ed8e2(0x111)]('/:id',async(_0x1b40e5,_0x27925e)=>{const _0x3f35d8=a4_0x5ed8e2;try{const {id:_0xde430b}=_0x1b40e5[_0x3f35d8(0x108)],_0x1fe004=_0x1b40e5[_0x3f35d8(0x106)],_0x11b604=await prisma[_0x3f35d8(0x102)][_0x3f35d8(0xfe)]({'where':{'id':Number(_0xde430b)},'data':_0x1fe004,'include':{'items':{'include':{'item':!![]}}}});_0x27925e[_0x3f35d8(0xfb)](_0x11b604);}catch(_0x1c1e42){_0x27925e[_0x3f35d8(0x10f)](0x1f4)[_0x3f35d8(0xfb)]({'error':_0x1c1e42[_0x3f35d8(0x10d)]});}}),router[a4_0x5ed8e2(0x112)](a4_0x5ed8e2(0x110),async(_0x512a78,_0x37527f)=>{const _0x16448c=a4_0x5ed8e2;try{const {id:_0x5c7c70}=_0x512a78[_0x16448c(0x108)];await prisma[_0x16448c(0x102)][_0x16448c(0x112)]({'where':{'id':Number(_0x5c7c70)}}),_0x37527f['status'](0xcc)[_0x16448c(0x10a)]();}catch(_0x2c7eda){_0x37527f[_0x16448c(0x10f)](0x1f4)[_0x16448c(0xfb)]({'error':_0x2c7eda['message']});}});function a4_0x28da(_0x154fa9,_0x1ccbcf){_0x154fa9=_0x154fa9-0xf8;const _0x1cb83d=a4_0x1cb8();let _0x28dafb=_0x1cb83d[_0x154fa9];return _0x28dafb;}export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ function a5_0x69f3(_0x1c4f8a,_0x43fd19){_0x1c4f8a=_0x1c4f8a-0x96;const _0x306b34=a5_0x306b();let _0x69f36c=_0x306b34[_0x1c4f8a];return _0x69f36c;}const a5_0x226a8c=a5_0x69f3;(function(_0x5eba9f,_0x38b91b){const _0x2a5ff1=a5_0x69f3,_0x1fa3c1=_0x5eba9f();while(!![]){try{const _0x46e8e4=parseInt(_0x2a5ff1(0xa8))/0x1+parseInt(_0x2a5ff1(0xad))/0x2*(parseInt(_0x2a5ff1(0xaf))/0x3)+-parseInt(_0x2a5ff1(0xac))/0x4*(parseInt(_0x2a5ff1(0xa9))/0x5)+-parseInt(_0x2a5ff1(0xa2))/0x6+parseInt(_0x2a5ff1(0xb0))/0x7+parseInt(_0x2a5ff1(0x9e))/0x8+-parseInt(_0x2a5ff1(0x98))/0x9*(parseInt(_0x2a5ff1(0x9f))/0xa);if(_0x46e8e4===_0x38b91b)break;else _0x1fa3c1['push'](_0x1fa3c1['shift']());}catch(_0x3aef8a){_0x1fa3c1['push'](_0x1fa3c1['shift']());}}}(a5_0x306b,0x79fe5));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a5_0x306b(){const _0xf2aafd=['params','status','8974737ruhruZ','findUnique','body','json','findMany','send','2362024LQsQdY','10nhLGEw','post','get','130338ekiyZv','/search','reception','message','/:id','put','188097gdxjyP','635fmYcpW','map','create','10012skaHUp','2402Kbsywg','update','1383UIbNou','5596297Srtxnk'];a5_0x306b=function(){return _0xf2aafd;};return a5_0x306b();}router[a5_0x226a8c(0xa0)]('/',async(_0x4aa1f3,_0x15fa22)=>{const _0x498137=a5_0x226a8c;try{const {items:_0x26e743,purchase:_0x294eda,..._0x475536}=_0x4aa1f3['body'],_0x11fe99=await prisma[_0x498137(0xa4)][_0x498137(0xab)]({'data':{..._0x475536,..._0x294eda?{'Purchase':{'create':{..._0x294eda}}}:{},'Items':{'create':_0x26e743?.[_0x498137(0xaa)](_0x4a299a=>({'item':{'create':{..._0x4a299a}}}))||[]}},'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x15fa22[_0x498137(0x9b)]({'id':_0x11fe99['id']});}catch(_0x4f238f){_0x15fa22['status'](0x1f4)[_0x498137(0x9b)]({'error':_0x4f238f['message']});}}),router['get'](a5_0x226a8c(0xa6),async(_0x59e8f5,_0x788af)=>{const _0x1a2c50=a5_0x226a8c;try{const {id:_0x3865e4}=_0x59e8f5[_0x1a2c50(0x96)],_0xcc56b9=await prisma[_0x1a2c50(0xa4)][_0x1a2c50(0x99)]({'where':{'id':Number(_0x3865e4)},'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x788af[_0x1a2c50(0x9b)](_0xcc56b9);}catch(_0x478c56){_0x788af[_0x1a2c50(0x97)](0x1f4)['json']({'error':_0x478c56[_0x1a2c50(0xa5)]});}}),router[a5_0x226a8c(0xa1)]('/',async(_0x3c2329,_0xb8d6c)=>{const _0x3783ea=a5_0x226a8c;try{const _0x4d481b=await prisma['reception'][_0x3783ea(0x9c)]({'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0xb8d6c[_0x3783ea(0x9b)](_0x4d481b);}catch(_0x1d5b77){_0xb8d6c['status'](0x1f4)[_0x3783ea(0x9b)]({'error':_0x1d5b77['message']});}}),router[a5_0x226a8c(0xa0)](a5_0x226a8c(0xa3),async(_0x4a930e,_0x561cb3)=>{const _0x38e35d=a5_0x226a8c;try{const _0x5c8d3d=_0x4a930e[_0x38e35d(0x9a)],_0x28fbcf=await prisma[_0x38e35d(0xa4)][_0x38e35d(0x9c)]({'where':_0x5c8d3d,'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x561cb3[_0x38e35d(0x9b)](_0x28fbcf);}catch(_0x51f617){_0x561cb3['status'](0x1f4)[_0x38e35d(0x9b)]({'error':_0x51f617[_0x38e35d(0xa5)]});}}),router[a5_0x226a8c(0xa7)](a5_0x226a8c(0xa6),async(_0x5d99d8,_0x22bedd)=>{const _0x4fc8eb=a5_0x226a8c;try{const {id:_0x5a1be8}=_0x5d99d8[_0x4fc8eb(0x96)],_0x455fe8=_0x5d99d8[_0x4fc8eb(0x9a)],_0x3c49e5=await prisma['reception'][_0x4fc8eb(0xae)]({'where':{'id':Number(_0x5a1be8)},'data':_0x455fe8,'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});_0x22bedd[_0x4fc8eb(0x9b)](_0x3c49e5);}catch(_0x29e040){_0x22bedd[_0x4fc8eb(0x97)](0x1f4)['json']({'error':_0x29e040[_0x4fc8eb(0xa5)]});}}),router['delete'](a5_0x226a8c(0xa6),async(_0x5e8741,_0x250048)=>{const _0x1deecd=a5_0x226a8c;try{const {id:_0x16bad9}=_0x5e8741['params'];await prisma[_0x1deecd(0xa4)]['delete']({'where':{'id':Number(_0x16bad9)}}),_0x250048[_0x1deecd(0x97)](0xcc)[_0x1deecd(0x9d)]();}catch(_0x2b0faa){_0x250048[_0x1deecd(0x97)](0x1f4)[_0x1deecd(0x9b)]({'error':_0x2b0faa[_0x1deecd(0xa5)]});}});export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a6_0x41dbd3=a6_0x3784;(function(_0x55ba51,_0x424ec8){const _0x568b8c=a6_0x3784,_0x54cfe6=_0x55ba51();while(!![]){try{const _0x39cbb3=parseInt(_0x568b8c(0xa4))/0x1*(parseInt(_0x568b8c(0xa5))/0x2)+parseInt(_0x568b8c(0xa3))/0x3+parseInt(_0x568b8c(0xae))/0x4+parseInt(_0x568b8c(0xab))/0x5+parseInt(_0x568b8c(0xb9))/0x6+-parseInt(_0x568b8c(0xb0))/0x7+-parseInt(_0x568b8c(0xb6))/0x8;if(_0x39cbb3===_0x424ec8)break;else _0x54cfe6['push'](_0x54cfe6['shift']());}catch(_0x18a260){_0x54cfe6['push'](_0x54cfe6['shift']());}}}(a6_0xd7b6,0xeef53));import{Router}from'express';import{PrismaClient}from'@prisma/client';function a6_0x3784(_0xd92537,_0x3b245f){_0xd92537=_0xd92537-0xa2;const _0xd7b6ce=a6_0xd7b6();let _0x37847a=_0xd7b6ce[_0xd92537];return _0x37847a;}const prisma=new PrismaClient(),router=Router();router[a6_0x41dbd3(0xaa)]('/',async(_0x87950,_0x62fc89)=>{const _0x11da97=a6_0x41dbd3;try{const {item:_0x3b057f,..._0xb46282}=_0x87950[_0x11da97(0xb5)],_0x3b0c88=await prisma[_0x11da97(0xb8)][_0x11da97(0xa6)]({'data':{..._0xb46282,..._0x3b057f?{'Item':{'create':{..._0x3b057f}}}:{}},'include':{'item':!![]}});_0x62fc89[_0x11da97(0xb4)]({'id':_0x3b0c88['id']});}catch(_0x5be589){_0x62fc89[_0x11da97(0xb1)](0x1f4)[_0x11da97(0xb4)]({'error':_0x5be589['message']});}}),router[a6_0x41dbd3(0xaf)](a6_0x41dbd3(0xa2),async(_0x40efd9,_0x669ee5)=>{const _0x17a1d7=a6_0x41dbd3;try{const {id:_0x4dcd86}=_0x40efd9[_0x17a1d7(0xb2)],_0x5ce2ba=await prisma['stock'][_0x17a1d7(0xac)]({'where':{'id':Number(_0x4dcd86)},'include':{'item':!![]}});_0x669ee5[_0x17a1d7(0xb4)](_0x5ce2ba);}catch(_0x4a5b43){_0x669ee5[_0x17a1d7(0xb1)](0x1f4)[_0x17a1d7(0xb4)]({'error':_0x4a5b43[_0x17a1d7(0xa7)]});}}),router[a6_0x41dbd3(0xaf)]('/',async(_0x231b44,_0x5dbf25)=>{const _0x45781d=a6_0x41dbd3;try{const _0x27c885=await prisma[_0x45781d(0xb8)][_0x45781d(0xad)]({'include':{'item':!![]}});_0x5dbf25['json'](_0x27c885);}catch(_0x4687b3){_0x5dbf25[_0x45781d(0xb1)](0x1f4)['json']({'error':_0x4687b3[_0x45781d(0xa7)]});}}),router[a6_0x41dbd3(0xaa)](a6_0x41dbd3(0xb3),async(_0x45f7bb,_0x5ee3a3)=>{const _0x661e98=a6_0x41dbd3;try{const _0x215277=_0x45f7bb[_0x661e98(0xb5)],_0x5ad36a=await prisma['stock']['findMany']({'where':_0x215277,'include':{'item':!![]}});_0x5ee3a3[_0x661e98(0xb4)](_0x5ad36a);}catch(_0x4c595f){_0x5ee3a3[_0x661e98(0xb1)](0x1f4)[_0x661e98(0xb4)]({'error':_0x4c595f[_0x661e98(0xa7)]});}}),router[a6_0x41dbd3(0xa9)](a6_0x41dbd3(0xa2),async(_0x162dd8,_0x251832)=>{const _0x5126ad=a6_0x41dbd3;try{const {id:_0x1a6b28}=_0x162dd8[_0x5126ad(0xb2)],_0x41f0d0=_0x162dd8[_0x5126ad(0xb5)],_0x4da4c3=await prisma['stock'][_0x5126ad(0xa8)]({'where':{'id':Number(_0x1a6b28)},'data':_0x41f0d0,'include':{'item':!![]}});_0x251832[_0x5126ad(0xb4)](_0x4da4c3);}catch(_0x129599){_0x251832['status'](0x1f4)['json']({'error':_0x129599[_0x5126ad(0xa7)]});}}),router['delete']('/:id',async(_0x2dabec,_0x284671)=>{const _0x467625=a6_0x41dbd3;try{const {id:_0x2ea442}=_0x2dabec[_0x467625(0xb2)];await prisma['stock'][_0x467625(0xb7)]({'where':{'id':Number(_0x2ea442)}}),_0x284671[_0x467625(0xb1)](0xcc)['send']();}catch(_0x2786e4){_0x284671[_0x467625(0xb1)](0x1f4)['json']({'error':_0x2786e4[_0x467625(0xa7)]});}});function a6_0xd7b6(){const _0x4339e9=['get','12949321ERVCwK','status','params','/search','json','body','6974752rcOePi','delete','stock','422238DCgcOa','/:id','5476956beuZen','13SjkheO','96056aUTIdX','create','message','update','put','post','5378340zFihmC','findUnique','findMany','417844TtHXSs'];a6_0xd7b6=function(){return _0x4339e9;};return a6_0xd7b6();}export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a7_0x884bc3=a7_0x458c;(function(_0x5b408b,_0x1b7c22){const _0xd2f91c=a7_0x458c,_0x96eb17=_0x5b408b();while(!![]){try{const _0x3d5540=parseInt(_0xd2f91c(0x1de))/0x1*(-parseInt(_0xd2f91c(0x1e8))/0x2)+-parseInt(_0xd2f91c(0x1eb))/0x3*(-parseInt(_0xd2f91c(0x1e5))/0x4)+parseInt(_0xd2f91c(0x1d9))/0x5+-parseInt(_0xd2f91c(0x1e6))/0x6+-parseInt(_0xd2f91c(0x1ea))/0x7*(parseInt(_0xd2f91c(0x1e3))/0x8)+-parseInt(_0xd2f91c(0x1d3))/0x9*(-parseInt(_0xd2f91c(0x1e2))/0xa)+-parseInt(_0xd2f91c(0x1e1))/0xb*(-parseInt(_0xd2f91c(0x1e9))/0xc);if(_0x3d5540===_0x1b7c22)break;else _0x96eb17['push'](_0x96eb17['shift']());}catch(_0x5f371e){_0x96eb17['push'](_0x96eb17['shift']());}}}(a7_0x1868,0x9484d));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a7_0x1868(){const _0x312a8c=['20muzeOo','32Lxopoq','findMany','420rQCKtY','2079618BQebsd','post','20pvYprg','13765560xsHAzL','1812286KDZhUV','11397SVSOOH','findUnique','create','1815579ccIeZn','body','params','map','update','message','5786605eQvxbb','supplier','get','/:id','delete','111628wXHeLO','json','status','11xfEsgW'];a7_0x1868=function(){return _0x312a8c;};return a7_0x1868();}function a7_0x458c(_0x11a2ef,_0x5f2c8c){_0x11a2ef=_0x11a2ef-0x1d1;const _0x1868db=a7_0x1868();let _0x458c63=_0x1868db[_0x11a2ef];return _0x458c63;}router[a7_0x884bc3(0x1e7)]('/',async(_0x5606d0,_0x3a1044)=>{const _0x4af268=a7_0x884bc3;try{const {taxes:_0x155113,..._0x4ccd2c}=_0x5606d0[_0x4af268(0x1d4)],_0x12516e=await prisma[_0x4af268(0x1da)][_0x4af268(0x1d2)]({'data':{..._0x4ccd2c,'taxes':{'create':_0x155113[_0x4af268(0x1d6)](_0x1561b2=>({'tax':{'create':{..._0x1561b2}}}))}},'include':{'taxes':{'include':{'tax':!![]}}}});_0x3a1044[_0x4af268(0x1df)]({'id':_0x12516e['id']});}catch(_0x15062a){_0x3a1044[_0x4af268(0x1e0)](0x1f4)['json']({'error':_0x15062a[_0x4af268(0x1d8)]});}}),router[a7_0x884bc3(0x1db)](a7_0x884bc3(0x1dc),async(_0x335824,_0x5f1ffa)=>{const _0x4adaa0=a7_0x884bc3;try{const {id:_0x1d0169}=_0x335824[_0x4adaa0(0x1d5)],_0x13a4e1=await prisma['supplier'][_0x4adaa0(0x1d1)]({'where':{'id':Number(_0x1d0169)},'include':{'taxes':{'include':{'tax':!![]}}}});_0x5f1ffa['json'](_0x13a4e1);}catch(_0x190d31){_0x5f1ffa[_0x4adaa0(0x1e0)](0x1f4)[_0x4adaa0(0x1df)]({'error':_0x190d31['message']});}}),router[a7_0x884bc3(0x1db)]('/',async(_0x23d8ef,_0x33f179)=>{const _0x2ab928=a7_0x884bc3;try{const _0x5485da=await prisma[_0x2ab928(0x1da)]['findMany']({'include':{'taxes':{'include':{'tax':!![]}}}});_0x33f179[_0x2ab928(0x1df)](_0x5485da);}catch(_0x4dc334){_0x33f179['status'](0x1f4)['json']({'error':_0x4dc334['message']});}}),router[a7_0x884bc3(0x1e7)]('/search',async(_0x24d2af,_0x1a6add)=>{const _0x17a837=a7_0x884bc3;try{const _0x277610=_0x24d2af[_0x17a837(0x1d4)],_0x348ef9=await prisma['supplier'][_0x17a837(0x1e4)]({'where':_0x277610,'include':{'taxes':{'include':{'tax':!![]}}}});_0x1a6add[_0x17a837(0x1df)](_0x348ef9);}catch(_0x478c20){_0x1a6add[_0x17a837(0x1e0)](0x1f4)['json']({'error':_0x478c20[_0x17a837(0x1d8)]});}}),router['put'](a7_0x884bc3(0x1dc),async(_0x449990,_0x1ee66c)=>{const _0x2130e1=a7_0x884bc3;try{const {id:_0x5d5a05}=_0x449990[_0x2130e1(0x1d5)],_0x3caa15=_0x449990[_0x2130e1(0x1d4)],_0x286ec5=await prisma[_0x2130e1(0x1da)][_0x2130e1(0x1d7)]({'where':{'id':Number(_0x5d5a05)},'data':_0x3caa15,'include':{'taxes':{'include':{'tax':!![]}}}});_0x1ee66c['json'](_0x286ec5);}catch(_0x5b403d){_0x1ee66c['status'](0x1f4)[_0x2130e1(0x1df)]({'error':_0x5b403d[_0x2130e1(0x1d8)]});}}),router[a7_0x884bc3(0x1dd)](a7_0x884bc3(0x1dc),async(_0x3f528c,_0x293111)=>{const _0x23ffb8=a7_0x884bc3;try{const {id:_0x4bf039}=_0x3f528c[_0x23ffb8(0x1d5)];await prisma['supplier'][_0x23ffb8(0x1dd)]({'where':{'id':Number(_0x4bf039)}}),_0x293111[_0x23ffb8(0x1e0)](0xcc)['send']();}catch(_0x2a9228){_0x293111[_0x23ffb8(0x1e0)](0x1f4)[_0x23ffb8(0x1df)]({'error':_0x2a9228[_0x23ffb8(0x1d8)]});}});export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ const a8_0x5cd04d=a8_0x8298;(function(_0x1a0d5a,_0x7134c8){const _0x2e75c8=a8_0x8298,_0x160592=_0x1a0d5a();while(!![]){try{const _0x8b7c41=parseInt(_0x2e75c8(0x1d2))/0x1*(-parseInt(_0x2e75c8(0x1d6))/0x2)+parseInt(_0x2e75c8(0x1e2))/0x3*(-parseInt(_0x2e75c8(0x1dc))/0x4)+-parseInt(_0x2e75c8(0x1e4))/0x5+parseInt(_0x2e75c8(0x1de))/0x6*(-parseInt(_0x2e75c8(0x1d1))/0x7)+parseInt(_0x2e75c8(0x1d5))/0x8+-parseInt(_0x2e75c8(0x1df))/0x9+parseInt(_0x2e75c8(0x1db))/0xa*(parseInt(_0x2e75c8(0x1d3))/0xb);if(_0x8b7c41===_0x7134c8)break;else _0x160592['push'](_0x160592['shift']());}catch(_0x4d471c){_0x160592['push'](_0x160592['shift']());}}}(a8_0x5452,0xe0044));function a8_0x8298(_0x1f08e9,_0x50fbb9){_0x1f08e9=_0x1f08e9-0x1ce;const _0x5452f4=a8_0x5452();let _0x82987=_0x5452f4[_0x1f08e9];return _0x82987;}function a8_0x5452(){const _0x21f67e=['39LfnSnP','tax','4236340rBWVsa','params','put','status','post','findMany','50687XXBfPE','201039TCRyep','44UXRrfm','/:id','4055528PdvTrT','2pbnZoq','body','send','delete','json','7255010DbUIpy','82100WfvFLK','message','60PbYxpd','9934479FIsVzh','update','get'];a8_0x5452=function(){return _0x21f67e;};return a8_0x5452();}import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();router[a8_0x5cd04d(0x1cf)]('/',async(_0x1dfdec,_0x3110da)=>{const _0x115f97=a8_0x5cd04d;try{const _0x4bbaaf=await prisma[_0x115f97(0x1e3)]['create']({'data':_0x1dfdec[_0x115f97(0x1d7)]});_0x3110da['json']({'id':_0x4bbaaf['id']});}catch(_0xeccd9d){_0x3110da[_0x115f97(0x1ce)](0x1f4)['json']({'error':_0xeccd9d[_0x115f97(0x1dd)]});}}),router['get']('/:id',async(_0x1130fa,_0xd3c0f)=>{const _0x3ab302=a8_0x5cd04d;try{const {id:_0xb478c5}=_0x1130fa[_0x3ab302(0x1e5)],_0x4ece73=await prisma[_0x3ab302(0x1e3)]['findUnique']({'where':{'id':Number(_0xb478c5)}});_0xd3c0f[_0x3ab302(0x1da)](_0x4ece73);}catch(_0x5f2b52){_0xd3c0f[_0x3ab302(0x1ce)](0x1f4)[_0x3ab302(0x1da)]({'error':_0x5f2b52['message']});}}),router[a8_0x5cd04d(0x1e1)]('/',async(_0x1abf4e,_0x3702b9)=>{const _0x40f9e0=a8_0x5cd04d;try{const _0x111131=await prisma[_0x40f9e0(0x1e3)][_0x40f9e0(0x1d0)]();_0x3702b9['json'](_0x111131);}catch(_0x4c96e8){_0x3702b9['status'](0x1f4)[_0x40f9e0(0x1da)]({'error':_0x4c96e8[_0x40f9e0(0x1dd)]});}}),router[a8_0x5cd04d(0x1cf)]('/search',async(_0x4c7af0,_0x2b0872)=>{const _0x1720c7=a8_0x5cd04d;try{const _0x5dca2d=_0x4c7af0['body'],_0x5bc485=await prisma[_0x1720c7(0x1e3)][_0x1720c7(0x1d0)]({'where':_0x5dca2d});_0x2b0872[_0x1720c7(0x1da)](_0x5bc485);}catch(_0x4291af){_0x2b0872['status'](0x1f4)[_0x1720c7(0x1da)]({'error':_0x4291af['message']});}}),router[a8_0x5cd04d(0x1e6)](a8_0x5cd04d(0x1d4),async(_0x5dafb0,_0x79e830)=>{const _0x17fc88=a8_0x5cd04d;try{const {id:_0x5ab9b6}=_0x5dafb0[_0x17fc88(0x1e5)],_0x4986c5=_0x5dafb0[_0x17fc88(0x1d7)],_0x3d56dd=await prisma['tax'][_0x17fc88(0x1e0)]({'where':{'id':Number(_0x5ab9b6)},'data':_0x4986c5});_0x79e830[_0x17fc88(0x1da)](_0x3d56dd);}catch(_0x299714){_0x79e830[_0x17fc88(0x1ce)](0x1f4)[_0x17fc88(0x1da)]({'error':_0x299714[_0x17fc88(0x1dd)]});}}),router['delete']('/:id',async(_0x26f992,_0x4d12be)=>{const _0x2fac1c=a8_0x5cd04d;try{const {id:_0x21ae52}=_0x26f992[_0x2fac1c(0x1e5)];await prisma[_0x2fac1c(0x1e3)][_0x2fac1c(0x1d9)]({'where':{'id':Number(_0x21ae52)}}),_0x4d12be[_0x2fac1c(0x1ce)](0xcc)[_0x2fac1c(0x1d8)]();}catch(_0x5e8028){_0x4d12be[_0x2fac1c(0x1ce)](0x1f4)[_0x2fac1c(0x1da)]({'error':_0x5e8028[_0x2fac1c(0x1dd)]});}});export default router;
@@ -0,0 +1,2 @@
1
+ declare const router: import("express-serve-static-core").Router;
2
+ export default router;
@@ -0,0 +1 @@
1
+ function a9_0x2a00(){const _0xe2f9da=['params','findMany','json','get','post','from','message','User\x20not\x20found.','50952GjgjXk','findUnique','put','8CsGrQc','delete','2706760tSvvBh','1486588AgwRzl','user','2889450ozgVgg','115554rMTxmn','status','1387169YFCBWc','body','2952XnqBBm','/search','40910llCzoF','/login','68xNCApz','send','/:id','password','Invalid\x20password.'];a9_0x2a00=function(){return _0xe2f9da;};return a9_0x2a00();}const a9_0x45754e=a9_0x2d31;(function(_0x556b1f,_0x13ec50){const _0x16e758=a9_0x2d31,_0x14d527=_0x556b1f();while(!![]){try{const _0x2f36a7=-parseInt(_0x16e758(0x144))/0x1+-parseInt(_0x16e758(0x14a))/0x2+parseInt(_0x16e758(0x14d))/0x3*(parseInt(_0x16e758(0x155))/0x4)+-parseInt(_0x16e758(0x149))/0x5+-parseInt(_0x16e758(0x14c))/0x6+parseInt(_0x16e758(0x14f))/0x7*(parseInt(_0x16e758(0x147))/0x8)+-parseInt(_0x16e758(0x151))/0x9*(-parseInt(_0x16e758(0x153))/0xa);if(_0x2f36a7===_0x13ec50)break;else _0x14d527['push'](_0x14d527['shift']());}catch(_0x4acef5){_0x14d527['push'](_0x14d527['shift']());}}}(a9_0x2a00,0x5c330));import{Router}from'express';import{PrismaClient}from'@prisma/client';const prisma=new PrismaClient(),router=Router();function a9_0x2d31(_0x3ae73e,_0x396626){_0x3ae73e=_0x3ae73e-0x142;const _0x2a0095=a9_0x2a00();let _0x2d3115=_0x2a0095[_0x3ae73e];return _0x2d3115;}router[a9_0x45754e(0x15e)](a9_0x45754e(0x154),async(_0x20f99d,_0x2fb60d)=>{const _0x58a33c=a9_0x45754e;try{const {email:_0x3110b3,password:_0x4d9b3e}=_0x20f99d[_0x58a33c(0x150)],_0x11bdb2=await prisma[_0x58a33c(0x14b)]['findUnique']({'where':{'email':_0x3110b3}});if(!_0x11bdb2)return _0x2fb60d[_0x58a33c(0x14e)](0x194)['json']({'error':_0x58a33c(0x143)});if(_0x11bdb2[_0x58a33c(0x158)]!==_0x4d9b3e)return _0x2fb60d[_0x58a33c(0x14e)](0x191)[_0x58a33c(0x15c)]({'error':_0x58a33c(0x159)});_0x2fb60d[_0x58a33c(0x15c)](_0x11bdb2);}catch(_0x5ec3fe){_0x2fb60d[_0x58a33c(0x14e)](0x1f4)[_0x58a33c(0x15c)]({'error':_0x5ec3fe[_0x58a33c(0x142)]});}}),router[a9_0x45754e(0x15e)]('/',async(_0x419785,_0x262bca)=>{const _0x4fde1c=a9_0x45754e;try{const {email:_0x1f0352,password:_0x4fba64,authorizations:_0x8356a8}=_0x419785[_0x4fde1c(0x150)],_0x1ea30a=await prisma['user']['create']({'data':{'email':_0x1f0352??null,'password':_0x4fba64??null,'authorizations':Array[_0x4fde1c(0x15f)](_0x8356a8??[])}});_0x262bca[_0x4fde1c(0x15c)]({'id':_0x1ea30a['id']});}catch(_0x5aadbe){_0x262bca['status'](0x1f4)[_0x4fde1c(0x15c)]({'error':_0x5aadbe[_0x4fde1c(0x142)]});}}),router['get']('/:id',async(_0x5736af,_0x5d248a)=>{const _0x510c26=a9_0x45754e;try{const {id:_0x521d0b}=_0x5736af['params'],_0x3886f6=await prisma[_0x510c26(0x14b)][_0x510c26(0x145)]({'where':{'id':Number(_0x521d0b)}});_0x5d248a[_0x510c26(0x15c)](_0x3886f6);}catch(_0x387447){_0x5d248a['status'](0x1f4)[_0x510c26(0x15c)]({'error':_0x387447[_0x510c26(0x142)]});}}),router[a9_0x45754e(0x15d)]('/',async(_0x32185a,_0x350d5)=>{const _0x272b7b=a9_0x45754e;try{const _0x63bbcf=await prisma[_0x272b7b(0x14b)]['findMany']();_0x350d5['json'](_0x63bbcf);}catch(_0x136d54){_0x350d5[_0x272b7b(0x14e)](0x1f4)[_0x272b7b(0x15c)]({'error':_0x136d54['message']});}}),router[a9_0x45754e(0x15e)](a9_0x45754e(0x152),async(_0x58f20b,_0x4ab521)=>{const _0x2d34d7=a9_0x45754e;try{const _0x3ce75d=_0x58f20b[_0x2d34d7(0x150)],_0x212249=await prisma[_0x2d34d7(0x14b)][_0x2d34d7(0x15b)]({'where':_0x3ce75d});_0x4ab521[_0x2d34d7(0x15c)](_0x212249);}catch(_0x24528a){_0x4ab521[_0x2d34d7(0x14e)](0x1f4)[_0x2d34d7(0x15c)]({'error':_0x24528a[_0x2d34d7(0x142)]});}}),router[a9_0x45754e(0x146)](a9_0x45754e(0x157),async(_0x4f631c,_0x166df4)=>{const _0x277d98=a9_0x45754e;try{const {id:_0x3dffec}=_0x4f631c['params'],_0x292236=_0x4f631c[_0x277d98(0x150)],_0x43c343=await prisma[_0x277d98(0x14b)]['update']({'where':{'id':Number(_0x3dffec)},'data':_0x292236});_0x166df4[_0x277d98(0x15c)](_0x43c343);}catch(_0x517254){_0x166df4[_0x277d98(0x14e)](0x1f4)[_0x277d98(0x15c)]({'error':_0x517254[_0x277d98(0x142)]});}}),router[a9_0x45754e(0x148)]('/:id',async(_0x517d77,_0x20d156)=>{const _0x145fda=a9_0x45754e;try{const {id:_0x13ffa3}=_0x517d77[_0x145fda(0x15a)];await prisma[_0x145fda(0x14b)][_0x145fda(0x148)]({'where':{'id':Number(_0x13ffa3)}}),_0x20d156[_0x145fda(0x14e)](0xcc)[_0x145fda(0x156)]();}catch(_0xbcd1cb){_0x20d156[_0x145fda(0x14e)](0x1f4)['json']({'error':_0xbcd1cb[_0x145fda(0x142)]});}});export default router;
@@ -0,0 +1 @@
1
+ export {};
@@ -0,0 +1 @@
1
+ const a10_0x1791ef=a10_0xd95c;(function(_0x1f7e48,_0x4d02dc){const _0x404aa7=a10_0xd95c,_0x26830d=_0x1f7e48();while(!![]){try{const _0xa30925=-parseInt(_0x404aa7(0x138))/0x1*(-parseInt(_0x404aa7(0x13b))/0x2)+parseInt(_0x404aa7(0x140))/0x3+-parseInt(_0x404aa7(0x133))/0x4*(parseInt(_0x404aa7(0x13f))/0x5)+-parseInt(_0x404aa7(0x137))/0x6+parseInt(_0x404aa7(0x13c))/0x7+-parseInt(_0x404aa7(0x139))/0x8*(-parseInt(_0x404aa7(0x143))/0x9)+-parseInt(_0x404aa7(0x136))/0xa;if(_0xa30925===_0x4d02dc)break;else _0x26830d['push'](_0x26830d['shift']());}catch(_0x4567ef){_0x26830d['push'](_0x26830d['shift']());}}}(a10_0x28fe,0x4e2a7));import a10_0x3a528f from'./routes/client.routes.js';import a10_0x38ab2e from'./routes/item.routes.js';import a10_0x288278 from'./routes/order.routes.js';import a10_0x3ec2bd from'./routes/preparation.routes.js';import a10_0x2c2edf from'./routes/purchase.routes.js';import a10_0x5e602a from'./routes/reception.routes.js';function a10_0x28fe(){const _0x389067=['1071932GrWSjH','/users','log','5344800eBAsVt','3168294AHOgZs','576747BEaFdw','165448WBWghg','/receptions','2qKqlKI','2512657FhQaMC','Server\x20running\x20on\x205001','use','5IXUFUV','345696LcGxuv','/clients','/purchases','261IWCDXL','listen','/suppliers','/preparations','/stocks'];a10_0x28fe=function(){return _0x389067;};return a10_0x28fe();}import a10_0x16759e from'./routes/stock.routes.js';import a10_0x2e345b from'./routes/supplier.routes.js';import a10_0x15790d from'./routes/tax.routes.js';import a10_0x43c3e4 from'./routes/user.routes.js';import a10_0x13ba84 from'express';import a10_0x3b1cf0 from'cors';function a10_0xd95c(_0x563b8b,_0x507d6f){_0x563b8b=_0x563b8b-0x131;const _0x28fe51=a10_0x28fe();let _0xd95ca4=_0x28fe51[_0x563b8b];return _0xd95ca4;}const app=a10_0x13ba84();app[a10_0x1791ef(0x13e)](a10_0x13ba84['json']()),app[a10_0x1791ef(0x13e)](a10_0x3b1cf0()),app[a10_0x1791ef(0x13e)](a10_0x1791ef(0x141),a10_0x3a528f),app['use']('/items',a10_0x38ab2e),app[a10_0x1791ef(0x13e)]('/orders',a10_0x288278),app['use'](a10_0x1791ef(0x131),a10_0x3ec2bd),app[a10_0x1791ef(0x13e)](a10_0x1791ef(0x142),a10_0x2c2edf),app['use'](a10_0x1791ef(0x13a),a10_0x5e602a),app['use'](a10_0x1791ef(0x132),a10_0x16759e),app[a10_0x1791ef(0x13e)](a10_0x1791ef(0x145),a10_0x2e345b),app[a10_0x1791ef(0x13e)]('/taxes',a10_0x15790d),app[a10_0x1791ef(0x13e)](a10_0x1791ef(0x134),a10_0x43c3e4),app[a10_0x1791ef(0x144)](0x1389,()=>{const _0x418068=a10_0x1791ef;console[_0x418068(0x135)](_0x418068(0x13d));});
@@ -1 +1 @@
1
- (function(_0x43b6b4,_0xefc8b){var _0x238e98=a2_0x4000,_0x53c9f4=_0x43b6b4();while(!![]){try{var _0x40168d=parseInt(_0x238e98(0x13c))/0x1+-parseInt(_0x238e98(0x13a))/0x2*(-parseInt(_0x238e98(0x13d))/0x3)+-parseInt(_0x238e98(0x139))/0x4*(parseInt(_0x238e98(0x140))/0x5)+-parseInt(_0x238e98(0x13e))/0x6+parseInt(_0x238e98(0x141))/0x7*(-parseInt(_0x238e98(0x142))/0x8)+-parseInt(_0x238e98(0x13b))/0x9+parseInt(_0x238e98(0x143))/0xa;if(_0x40168d===_0xefc8b)break;else _0x53c9f4['push'](_0x53c9f4['shift']());}catch(_0x5dfd32){_0x53c9f4['push'](_0x53c9f4['shift']());}}}(a2_0x57e6,0x7b23c));function a2_0x4000(_0x130db3,_0x117ba6){_0x130db3=_0x130db3-0x139;var _0x57e681=a2_0x57e6();var _0x4000ba=_0x57e681[_0x130db3];return _0x4000ba;}function a2_0x57e6(){var _0x4bbfb4=['21CFFgge','1252600bnyotM','11568970okEqxF','8sfmhph','132RfaEhS','6665733wsIELa','708561AFRbAP','36447nqNunN','5375340uxlCfM','owl','141650oNnrTR'];a2_0x57e6=function(){return _0x4bbfb4;};return a2_0x57e6();}export class Entity{constructor(_0x7fcc15){var _0x37e099=a2_0x4000;this[_0x37e099(0x13f)]=_0x7fcc15;}}
1
+ function a13_0x55ef(){var _0x23534a=['3ZiBEiB','704114noXyaN','385qaxWGL','575812MlIcvj','3269442TXbADj','45392XwExyC','10TjBZJj','3282399wxnZsG','871636kzxMqM','9542870vtsjMK'];a13_0x55ef=function(){return _0x23534a;};return a13_0x55ef();}(function(_0x85b19f,_0x16b8e1){var _0x52e1e4=a13_0x4306,_0x44cfad=_0x85b19f();while(!![]){try{var _0x484305=parseInt(_0x52e1e4(0x1ac))/0x1+-parseInt(_0x52e1e4(0x1ae))/0x2+-parseInt(_0x52e1e4(0x1b5))/0x3*(parseInt(_0x52e1e4(0x1b3))/0x4)+parseInt(_0x52e1e4(0x1b1))/0x5*(-parseInt(_0x52e1e4(0x1af))/0x6)+-parseInt(_0x52e1e4(0x1ad))/0x7*(-parseInt(_0x52e1e4(0x1b0))/0x8)+parseInt(_0x52e1e4(0x1b2))/0x9+parseInt(_0x52e1e4(0x1b4))/0xa;if(_0x484305===_0x16b8e1)break;else _0x44cfad['push'](_0x44cfad['shift']());}catch(_0x55fad2){_0x44cfad['push'](_0x44cfad['shift']());}}}(a13_0x55ef,0xb48e1));function a13_0x4306(_0x1ebdae,_0x228b33){_0x1ebdae=_0x1ebdae-0x1ac;var _0x55efa6=a13_0x55ef();var _0x4306df=_0x55efa6[_0x1ebdae];return _0x4306df;}export class Entity{constructor(_0x1db9ab){this['owl']=_0x1db9ab;}}
@@ -1 +1 @@
1
- function a3_0x2592(_0x5f2666,_0x213ee9){_0x5f2666=_0x5f2666-0x1c0;const _0x1f0a8c=a3_0x1f0a();let _0x2592a4=_0x1f0a8c[_0x5f2666];return _0x2592a4;}const a3_0x2aa0c3=a3_0x2592;function a3_0x1f0a(){const _0x27cf1b=['get','2184624aNGkCz','emit','off','once','push','1807158ApVvsD','985119lJHJbn','has','onRequest','2072854tziorX','listeners','8144082jrklck','103996JPdOwZ','requestListeners','15uowrxJ','filter','38363epQZJU','2wbdXxq','set'];a3_0x1f0a=function(){return _0x27cf1b;};return a3_0x1f0a();}(function(_0x978196,_0x38e670){const _0x1e58d1=a3_0x2592,_0x22de84=_0x978196();while(!![]){try{const _0x4cc841=-parseInt(_0x1e58d1(0x1ca))/0x1+parseInt(_0x1e58d1(0x1cb))/0x2*(parseInt(_0x1e58d1(0x1c0))/0x3)+parseInt(_0x1e58d1(0x1c6))/0x4*(-parseInt(_0x1e58d1(0x1c8))/0x5)+-parseInt(_0x1e58d1(0x1d3))/0x6+-parseInt(_0x1e58d1(0x1c3))/0x7+-parseInt(_0x1e58d1(0x1ce))/0x8+parseInt(_0x1e58d1(0x1c5))/0x9;if(_0x4cc841===_0x38e670)break;else _0x22de84['push'](_0x22de84['shift']());}catch(_0x1f11c4){_0x22de84['push'](_0x22de84['shift']());}}}(a3_0x1f0a,0x3c2f6));export class EventBus{constructor(){const _0x5ec25f=a3_0x2592;this[_0x5ec25f(0x1c4)]=new Map(),this['requestListeners']=new Map();}['on'](_0x1c0941,_0x2fac69){const _0x381496=a3_0x2592;!this[_0x381496(0x1c4)][_0x381496(0x1c1)](_0x1c0941)&&this[_0x381496(0x1c4)][_0x381496(0x1cc)](_0x1c0941,[]),this['listeners'][_0x381496(0x1cd)](_0x1c0941)[_0x381496(0x1d2)](_0x2fac69);}[a3_0x2aa0c3(0x1d1)](_0x56fb9d,_0xfcb41e){const _0x488d35=_0x2f00f5=>{const _0x12d7a3=a3_0x2592;_0xfcb41e(_0x2f00f5),this[_0x12d7a3(0x1d0)](_0x56fb9d,_0x488d35);};this['on'](_0x56fb9d,_0x488d35);}[a3_0x2aa0c3(0x1d0)](_0x480924,_0xa6184a){const _0x103ff3=a3_0x2aa0c3,_0x364402=this[_0x103ff3(0x1c4)]['get'](_0x480924);if(!_0x364402)return;this['listeners'][_0x103ff3(0x1cc)](_0x480924,_0x364402[_0x103ff3(0x1c9)](_0xcf7538=>_0xcf7538!==_0xa6184a));}[a3_0x2aa0c3(0x1cf)](_0x1bd655,_0x1fc29c){const _0x3e4c29=a3_0x2aa0c3,_0x18f7ea=this['listeners'][_0x3e4c29(0x1cd)](_0x1bd655)??[];_0x18f7ea['forEach'](_0x5c65c9=>_0x5c65c9(_0x1fc29c));}[a3_0x2aa0c3(0x1c2)](_0x40d0e8,_0x44b3c5){const _0x37a09d=a3_0x2aa0c3;this[_0x37a09d(0x1c7)]['set'](_0x40d0e8,_0x44b3c5);}async['request'](_0x497ed8,_0x22019b){const _0x5f33a0=a3_0x2aa0c3,_0x525877=this[_0x5f33a0(0x1c7)]['get'](_0x497ed8);if(!_0x525877)throw new Error('No\x20request\x20listener\x20for\x20event\x20\x22'+_0x497ed8+'\x22');return await _0x525877(_0x22019b);}}
1
+ function a14_0x2890(_0x515ee0,_0x513e8d){_0x515ee0=_0x515ee0-0xf8;const _0x47a2ab=a14_0x47a2();let _0x2890ac=_0x47a2ab[_0x515ee0];return _0x2890ac;}const a14_0x1fd281=a14_0x2890;(function(_0x3c8609,_0xa717a8){const _0x80a096=a14_0x2890,_0x57d148=_0x3c8609();while(!![]){try{const _0x249d89=-parseInt(_0x80a096(0xfa))/0x1*(parseInt(_0x80a096(0x101))/0x2)+-parseInt(_0x80a096(0x10c))/0x3+-parseInt(_0x80a096(0xf9))/0x4*(parseInt(_0x80a096(0x105))/0x5)+-parseInt(_0x80a096(0xff))/0x6+-parseInt(_0x80a096(0x102))/0x7+-parseInt(_0x80a096(0x103))/0x8+parseInt(_0x80a096(0x106))/0x9;if(_0x249d89===_0xa717a8)break;else _0x57d148['push'](_0x57d148['shift']());}catch(_0x35014c){_0x57d148['push'](_0x57d148['shift']());}}}(a14_0x47a2,0xe6349));export class EventBus{constructor(){const _0x22f241=a14_0x2890;this[_0x22f241(0xfd)]=new Map(),this[_0x22f241(0x10a)]=new Map();}['on'](_0x3c9f08,_0x56e237){const _0x70c895=a14_0x2890;!this[_0x70c895(0xfd)]['has'](_0x3c9f08)&&this[_0x70c895(0xfd)][_0x70c895(0x107)](_0x3c9f08,[]),this[_0x70c895(0xfd)][_0x70c895(0x108)](_0x3c9f08)[_0x70c895(0x104)](_0x56e237);}[a14_0x1fd281(0x100)](_0x237b71,_0x5f5159){const _0x128eed=_0x5ca2f6=>{const _0x3afb8d=a14_0x2890;_0x5f5159(_0x5ca2f6),this[_0x3afb8d(0x109)](_0x237b71,_0x128eed);};this['on'](_0x237b71,_0x128eed);}[a14_0x1fd281(0x109)](_0x1fd313,_0x9e49ef){const _0x24dcee=a14_0x1fd281,_0x5ee7d6=this[_0x24dcee(0xfd)][_0x24dcee(0x108)](_0x1fd313);if(!_0x5ee7d6)return;this[_0x24dcee(0xfd)]['set'](_0x1fd313,_0x5ee7d6[_0x24dcee(0xfe)](_0x15de37=>_0x15de37!==_0x9e49ef));}[a14_0x1fd281(0xf8)](_0x122d1d,_0x51cf81){const _0x28b820=a14_0x1fd281,_0x410129=this[_0x28b820(0xfd)][_0x28b820(0x108)](_0x122d1d)??[];_0x410129[_0x28b820(0xfc)](_0x57ae6b=>_0x57ae6b(_0x51cf81));}[a14_0x1fd281(0x10d)](_0x107622,_0x286a9a){const _0xf8a96d=a14_0x1fd281;this[_0xf8a96d(0x10a)][_0xf8a96d(0x107)](_0x107622,_0x286a9a);}async[a14_0x1fd281(0xfb)](_0x4b9eb4,_0x42c889){const _0x1329fa=a14_0x1fd281,_0x5a0d33=this[_0x1329fa(0x10a)][_0x1329fa(0x108)](_0x4b9eb4);if(!_0x5a0d33)throw new Error(_0x1329fa(0x10b)+_0x4b9eb4+'\x22');return await _0x5a0d33(_0x42c889);}}function a14_0x47a2(){const _0x315d86=['3520272EUbtHB','once','908204ChtaZb','3634141BpIEju','7036000VUFsnW','push','5SBTABD','33800922FCsqxv','set','get','off','requestListeners','No\x20request\x20listener\x20for\x20event\x20\x22','813093mOHGVt','onRequest','emit','408916KVnDDy','1Rcxofj','request','forEach','listeners','filter'];a14_0x47a2=function(){return _0x315d86;};return a14_0x47a2();}
@@ -1,8 +1,6 @@
1
1
  import type { OWLClient } from "../owl/OWLClient.js";
2
- export declare class PrismaDatabase {
2
+ export declare class EventsDatabase {
3
3
  private owl;
4
- private prisma;
5
4
  constructor(owl: OWLClient);
6
- connect(): Promise<void>;
7
5
  private bindEvents;
8
6
  }
@@ -0,0 +1 @@
1
+ var a25_0x219bce=a25_0x546b;(function(_0x191833,_0x13205b){var _0x25e596=a25_0x546b,_0x4582b5=_0x191833();while(!![]){try{var _0x111bf2=-parseInt(_0x25e596(0x116))/0x1*(-parseInt(_0x25e596(0x10d))/0x2)+-parseInt(_0x25e596(0x119))/0x3+parseInt(_0x25e596(0x10f))/0x4+-parseInt(_0x25e596(0x111))/0x5+parseInt(_0x25e596(0x10e))/0x6+-parseInt(_0x25e596(0x113))/0x7*(parseInt(_0x25e596(0x110))/0x8)+-parseInt(_0x25e596(0x114))/0x9*(-parseInt(_0x25e596(0x115))/0xa);if(_0x111bf2===_0x13205b)break;else _0x4582b5['push'](_0x4582b5['shift']());}catch(_0x4f303d){_0x4582b5['push'](_0x4582b5['shift']());}}}(a25_0x10ac,0x5c39a));import a25_0x2e5374 from'./events/UserEvents.js';import a25_0x4f97aa from'./events/ClientEvents.js';function a25_0x546b(_0x126d13,_0x38be22){_0x126d13=_0x126d13-0x10d;var _0x10acd9=a25_0x10ac();var _0x546b7e=_0x10acd9[_0x126d13];return _0x546b7e;}import a25_0x59a2a5 from'./events/SupplierEvents.js';import a25_0x4b90b5 from'./events/ItemEvents.js';import a25_0x1286de from'./events/TaxEvents.js';import a25_0x30e017 from'./events/OrderEvents.js';import a25_0x45e9c0 from'./events/PreparationEvents.js';function a25_0x10ac(){var _0x22dd7f=['1374LpfKiY','2723088RLULjV','2028936GLhLAc','8RHvUnT','3618875BJFeBk','owl','2840719ahSURK','32400DbrejU','1220NtRjWZ','297RMweJN','bindEvents','tokenIsValide','290925NeMpsN','000001:\x20Invalid\x20Token.'];a25_0x10ac=function(){return _0x22dd7f;};return a25_0x10ac();}import a25_0x59ab3a from'./events/PurchaseEvents.js';import a25_0xbc4b8c from'./events/ReceptionEvents.js';import a25_0x35a15c from'./events/StockEvents.js';export class EventsDatabase{constructor(_0x376bbe){this['owl']=_0x376bbe,this['bindEvents']();}[a25_0x219bce(0x117)](){var _0x4970d4=a25_0x219bce;if(!this[_0x4970d4(0x112)][_0x4970d4(0x118)]())throw new Error(_0x4970d4(0x11a));a25_0x2e5374(this[_0x4970d4(0x112)]),a25_0x4f97aa(this[_0x4970d4(0x112)]),a25_0x59a2a5(this[_0x4970d4(0x112)]),a25_0x4b90b5(this[_0x4970d4(0x112)]),a25_0x1286de(this[_0x4970d4(0x112)]),a25_0x30e017(this['owl']),a25_0x45e9c0(this['owl']),a25_0x59ab3a(this[_0x4970d4(0x112)]),a25_0xbc4b8c(this['owl']),a25_0x35a15c(this[_0x4970d4(0x112)]);}}
@@ -1 +1 @@
1
- function a14_0x3a74(_0x4220fa,_0x535fc4){_0x4220fa=_0x4220fa-0x142;var _0x326a79=a14_0x326a();var _0x3a7403=_0x326a79[_0x4220fa];return _0x3a7403;}function a14_0x326a(){var _0x3fcfdb=['741545CUvTLd','173627bcRDbt','4872Vakbmy','20LbqULO','6RatuVT','21747990jVPfOC','4988208ypfevq','32nHNCPd','61659AqSHQr','202479GJAGGs','owl'];a14_0x326a=function(){return _0x3fcfdb;};return a14_0x326a();}(function(_0x419848,_0x56c9a5){var _0x17544=a14_0x3a74,_0xd7f011=_0x419848();while(!![]){try{var _0x5d7ddc=parseInt(_0x17544(0x148))/0x1*(-parseInt(_0x17544(0x14b))/0x2)+-parseInt(_0x17544(0x145))/0x3*(parseInt(_0x17544(0x143))/0x4)+parseInt(_0x17544(0x14a))/0x5*(-parseInt(_0x17544(0x149))/0x6)+-parseInt(_0x17544(0x147))/0x7+-parseInt(_0x17544(0x142))/0x8+parseInt(_0x17544(0x144))/0x9+parseInt(_0x17544(0x14c))/0xa;if(_0x5d7ddc===_0x56c9a5)break;else _0xd7f011['push'](_0xd7f011['shift']());}catch(_0x5c7f28){_0xd7f011['push'](_0xd7f011['shift']());}}}(a14_0x326a,0x5ec14));export class Manager{constructor(_0x3ff8f4){var _0x44c94b=a14_0x3a74;this[_0x44c94b(0x146)]=_0x3ff8f4,this['cache']=new Map();}}
1
+ function a26_0x1c62(_0x105bbb,_0x109188){_0x105bbb=_0x105bbb-0x89;var _0x2113e8=a26_0x2113();var _0x1c626f=_0x2113e8[_0x105bbb];return _0x1c626f;}(function(_0x303cc9,_0x760303){var _0x20ade6=a26_0x1c62,_0x4959ca=_0x303cc9();while(!![]){try{var _0x4d1d04=parseInt(_0x20ade6(0x93))/0x1*(-parseInt(_0x20ade6(0x8c))/0x2)+parseInt(_0x20ade6(0x91))/0x3+-parseInt(_0x20ade6(0x89))/0x4*(parseInt(_0x20ade6(0x8b))/0x5)+parseInt(_0x20ade6(0x95))/0x6*(parseInt(_0x20ade6(0x8f))/0x7)+parseInt(_0x20ade6(0x97))/0x8*(parseInt(_0x20ade6(0x8d))/0x9)+parseInt(_0x20ade6(0x96))/0xa*(-parseInt(_0x20ade6(0x8e))/0xb)+parseInt(_0x20ade6(0x92))/0xc*(-parseInt(_0x20ade6(0x90))/0xd);if(_0x4d1d04===_0x760303)break;else _0x4959ca['push'](_0x4959ca['shift']());}catch(_0x5e947f){_0x4959ca['push'](_0x4959ca['shift']());}}}(a26_0x2113,0xb1a9e));export class Manager{constructor(_0x233469){var _0x26ae5f=a26_0x1c62;this[_0x26ae5f(0x8a)]=_0x233469,this[_0x26ae5f(0x94)]=new Map();}}function a26_0x2113(){var _0x219ec7=['9sIzpaV','2700885jAewQn','8827dzzjiI','2899rASCHz','161496GlCWhp','25932bOiZhQ','1yWKQmz','cache','6162EbrwIh','10AjvHZG','7636312QQuLgq','1608184hHqrmx','owl','5gdPIXK','892448RGydup'];a26_0x2113=function(){return _0x219ec7;};return a26_0x2113();}
@@ -1,3 +1,2 @@
1
- import { PrismaClient } from "@prisma/client";
2
1
  import { OWLClient } from "../../owl/OWLClient.js";
3
- export default function bindClientEvents(owl: OWLClient, prisma: PrismaClient): void;
2
+ export default function bindClientEvents(owl: OWLClient): void;
@@ -1 +1 @@
1
- function a4_0x5dbd(_0x2f4613,_0x4c079f){_0x2f4613=_0x2f4613-0xb8;const _0x306a14=a4_0x306a();let _0x5dbd44=_0x306a14[_0x2f4613];return _0x5dbd44;}function a4_0x306a(){const _0x5c6610=['222649UZIJIK','2270908vsDAYg','CLIENT_CREATED','ADMIN','18fANyRI','2893164wACgrP','client.updated','client','update','CLIENT_ALL','4119816pCVGFe','200002:\x20Action\x20not\x20allowed.','onRequest','client.read','client.deleted','findUnique','CLIENT_READ','190065zoHgsc','CLIENT_DELETED','200001:\x20Action\x20not\x20allowed.','hasPermission','5NMEwOA','420741nQMnBY','200002:Action\x20not\x20allowed.','client.created','200004:\x20Action\x20not\x20allowed.','client.read.some','200003:\x20Action\x20not\x20allowed.','getCurrentUser','8635113YPPvvY','events'];a4_0x306a=function(){return _0x5c6610;};return a4_0x306a();}(function(_0xdebbeb,_0x534d1b){const _0x3ee480=a4_0x5dbd,_0x3356f4=_0xdebbeb();while(!![]){try{const _0x5bb092=parseInt(_0x3ee480(0xbc))/0x1+parseInt(_0x3ee480(0xc9))/0x2*(parseInt(_0x3ee480(0xd6))/0x3)+parseInt(_0x3ee480(0xc6))/0x4*(-parseInt(_0x3ee480(0xbb))/0x5)+-parseInt(_0x3ee480(0xca))/0x6+-parseInt(_0x3ee480(0xc5))/0x7+-parseInt(_0x3ee480(0xcf))/0x8+parseInt(_0x3ee480(0xc3))/0x9;if(_0x5bb092===_0x534d1b)break;else _0x3356f4['push'](_0x3356f4['shift']());}catch(_0x430920){_0x3356f4['push'](_0x3356f4['shift']());}}}(a4_0x306a,0x56598));export default function bindClientEvents(_0x578109,_0x5abe0e){const _0x2bbe09=a4_0x5dbd;_0x578109[_0x2bbe09(0xc4)][_0x2bbe09(0xd1)](_0x2bbe09(0xbe),async _0x52fead=>{const _0x560f8d=_0x2bbe09;if(!_0x578109[_0x560f8d(0xc2)]()[_0x560f8d(0xba)](_0x560f8d(0xc8))&&!_0x578109[_0x560f8d(0xc2)]()[_0x560f8d(0xba)]('CLIENT_ALL')&&!_0x578109[_0x560f8d(0xc2)]()[_0x560f8d(0xba)](_0x560f8d(0xc7)))throw new Error(_0x560f8d(0xb9));const {taxes:_0x2cae78,..._0x3f9a1f}=_0x52fead[_0x560f8d(0xcc)],_0x1777b2=await _0x5abe0e[_0x560f8d(0xcc)]['create']({'data':{..._0x3f9a1f,'taxes':{'create':_0x2cae78['map'](_0x14bf46=>({'tax':{'create':{..._0x14bf46}}}))}},'include':{'taxes':{'include':{'tax':!![]}}}});return _0x1777b2['id'];}),_0x578109[_0x2bbe09(0xc4)][_0x2bbe09(0xd1)](_0x2bbe09(0xd2),async({id:_0x12bafd})=>{const _0x36c81c=_0x2bbe09;if(!_0x578109[_0x36c81c(0xc2)]()['hasPermission'](_0x36c81c(0xc8))&&!_0x578109['getCurrentUser']()[_0x36c81c(0xba)]('CLIENT_ALL')&&!_0x578109['getCurrentUser']()[_0x36c81c(0xba)]('CLIENT_READ'))throw new Error(_0x36c81c(0xbd));const _0x5b9e9a=await _0x5abe0e[_0x36c81c(0xcc)][_0x36c81c(0xd4)]({'where':{'id':_0x12bafd},'include':{'taxes':{'include':{'tax':!![]}}}});return _0x5b9e9a;}),_0x578109[_0x2bbe09(0xc4)]['onRequest']('client.read.all',async()=>{const _0x29bb82=_0x2bbe09;if(!_0x578109[_0x29bb82(0xc2)]()[_0x29bb82(0xba)](_0x29bb82(0xc8))&&!_0x578109['getCurrentUser']()[_0x29bb82(0xba)]('CLIENT_ALL')&&!_0x578109[_0x29bb82(0xc2)]()['hasPermission'](_0x29bb82(0xd5)))throw new Error(_0x29bb82(0xd0));const _0x5486f1=await _0x5abe0e['client']['findMany']({'include':{'taxes':{'include':{'tax':!![]}}}});return _0x5486f1;}),_0x578109[_0x2bbe09(0xc4)][_0x2bbe09(0xd1)](_0x2bbe09(0xc0),async _0x3a94ac=>{const _0x3247f4=_0x2bbe09;if(!_0x578109[_0x3247f4(0xc2)]()[_0x3247f4(0xba)]('ADMIN')&&!_0x578109[_0x3247f4(0xc2)]()[_0x3247f4(0xba)](_0x3247f4(0xce))&&!_0x578109[_0x3247f4(0xc2)]()['hasPermission'](_0x3247f4(0xd5)))throw new Error(_0x3247f4(0xd0));const _0x5d40a9=await _0x5abe0e[_0x3247f4(0xcc)]['findMany']({'where':_0x3a94ac,'include':{'taxes':{'include':{'tax':!![]}}}});return _0x5d40a9;}),_0x578109[_0x2bbe09(0xc4)][_0x2bbe09(0xd1)](_0x2bbe09(0xcb),async _0x3ec306=>{const _0x20ec65=_0x2bbe09;if(!_0x578109['getCurrentUser']()['hasPermission']('ADMIN')&&!_0x578109[_0x20ec65(0xc2)]()[_0x20ec65(0xba)](_0x20ec65(0xce))&&!_0x578109[_0x20ec65(0xc2)]()[_0x20ec65(0xba)]('CLIENT_UPDATED'))throw new Error(_0x20ec65(0xc1));const {where:_0x361188,..._0x70bd8c}=_0x3ec306;return await _0x5abe0e[_0x20ec65(0xcc)][_0x20ec65(0xcd)]({'where':_0x361188,'data':_0x70bd8c});}),_0x578109['events']['on'](_0x2bbe09(0xd3),async({id:_0x5955d6})=>{const _0x3d7f97=_0x2bbe09;if(!_0x578109[_0x3d7f97(0xc2)]()[_0x3d7f97(0xba)](_0x3d7f97(0xc8))&&!_0x578109[_0x3d7f97(0xc2)]()[_0x3d7f97(0xba)](_0x3d7f97(0xce))&&!_0x578109[_0x3d7f97(0xc2)]()[_0x3d7f97(0xba)](_0x3d7f97(0xb8)))throw new Error(_0x3d7f97(0xbf));await _0x5abe0e['client']['delete']({'where':{'id':_0x5955d6}});});}
1
+ const a15_0x5a8804=a15_0x2432;(function(_0x20786e,_0x3685e7){const _0x3b663d=a15_0x2432,_0x3a241a=_0x20786e();while(!![]){try{const _0x3a1944=parseInt(_0x3b663d(0x87))/0x1*(-parseInt(_0x3b663d(0x90))/0x2)+parseInt(_0x3b663d(0x7d))/0x3+parseInt(_0x3b663d(0x84))/0x4+-parseInt(_0x3b663d(0x76))/0x5+-parseInt(_0x3b663d(0x7c))/0x6+parseInt(_0x3b663d(0x89))/0x7+parseInt(_0x3b663d(0x92))/0x8;if(_0x3a1944===_0x3685e7)break;else _0x3a241a['push'](_0x3a241a['shift']());}catch(_0x3d57c3){_0x3a241a['push'](_0x3a241a['shift']());}}}(a15_0x35c7,0xdb46c));function a15_0x35c7(){const _0xb848d0=['2327984ceJoCz','client.read.some','client.deleted','46610WblFns','/search','5390693QiLhPp','application/json','200002:\x20Action\x20not\x20allowed.','CLIENT_DELETED','ADMIN','getCurrentUser','client.read.all','62xIPSxJ','statusText','16168456dBkfQH','stringify','hasPermission','200003:\x20Action\x20not\x20allowed.','POST','json','client.read','5928880chduUL','CLIENT_ALL','API\x20Error:\x20','onRequest','DELETE','CLIENT_READ','3956970PFXBtA','2445555bvXEen','client.created','events','200004:\x20Action\x20not\x20allowed.','http://localhost:5001/clients','client.updated','client'];a15_0x35c7=function(){return _0xb848d0;};return a15_0x35c7();}function a15_0x2432(_0x50e9c5,_0x271d34){_0x50e9c5=_0x50e9c5-0x71;const _0x35c7ea=a15_0x35c7();let _0x243289=_0x35c7ea[_0x50e9c5];return _0x243289;}const API_BASE=a15_0x5a8804(0x81);export default function bindClientEvents(_0x3a136c){const _0x7783ff=a15_0x5a8804;_0x3a136c[_0x7783ff(0x7f)][_0x7783ff(0x79)](_0x7783ff(0x7e),async _0x1deff3=>{const _0x4db756=_0x7783ff;if(!_0x3a136c[_0x4db756(0x8e)]()[_0x4db756(0x71)](_0x4db756(0x8d))&&!_0x3a136c[_0x4db756(0x8e)]()['hasPermission'](_0x4db756(0x77))&&!_0x3a136c[_0x4db756(0x8e)]()[_0x4db756(0x71)]('CLIENT_CREATED'))throw new Error('200001:\x20Action\x20not\x20allowed.');const _0x4e3a5a=await fetch(''+API_BASE,{'method':_0x4db756(0x73),'headers':{'Content-Type':'application/json'},'body':JSON[_0x4db756(0x93)](_0x1deff3[_0x4db756(0x83)])});if(!_0x4e3a5a['ok'])throw new Error(_0x4db756(0x78)+_0x4e3a5a[_0x4db756(0x91)]);const _0xaeabb4=await _0x4e3a5a['json']();return _0xaeabb4['id'];}),_0x3a136c[_0x7783ff(0x7f)][_0x7783ff(0x79)](_0x7783ff(0x75),async({id:_0x1de0ec})=>{const _0x8c4db1=_0x7783ff;if(!_0x3a136c[_0x8c4db1(0x8e)]()[_0x8c4db1(0x71)](_0x8c4db1(0x8d))&&!_0x3a136c['getCurrentUser']()[_0x8c4db1(0x71)](_0x8c4db1(0x77))&&!_0x3a136c[_0x8c4db1(0x8e)]()[_0x8c4db1(0x71)](_0x8c4db1(0x7b)))throw new Error('200002:\x20Action\x20not\x20allowed.');const _0x1d7f88=await fetch(API_BASE+'/'+_0x1de0ec);if(!_0x1d7f88['ok'])throw new Error(_0x8c4db1(0x78)+_0x1d7f88[_0x8c4db1(0x91)]);return await _0x1d7f88[_0x8c4db1(0x74)]();}),_0x3a136c[_0x7783ff(0x7f)][_0x7783ff(0x79)](_0x7783ff(0x8f),async()=>{const _0x19584d=_0x7783ff;if(!_0x3a136c['getCurrentUser']()[_0x19584d(0x71)](_0x19584d(0x8d))&&!_0x3a136c[_0x19584d(0x8e)]()[_0x19584d(0x71)](_0x19584d(0x77))&&!_0x3a136c[_0x19584d(0x8e)]()[_0x19584d(0x71)](_0x19584d(0x7b)))throw new Error(_0x19584d(0x8b));const _0x2d4c6e=await fetch(''+API_BASE);if(!_0x2d4c6e['ok'])throw new Error(_0x19584d(0x78)+_0x2d4c6e[_0x19584d(0x91)]);return await _0x2d4c6e[_0x19584d(0x74)]();}),_0x3a136c[_0x7783ff(0x7f)][_0x7783ff(0x79)](_0x7783ff(0x85),async _0x34c04c=>{const _0x340b6f=_0x7783ff;if(!_0x3a136c[_0x340b6f(0x8e)]()[_0x340b6f(0x71)](_0x340b6f(0x8d))&&!_0x3a136c['getCurrentUser']()[_0x340b6f(0x71)](_0x340b6f(0x77))&&!_0x3a136c['getCurrentUser']()[_0x340b6f(0x71)](_0x340b6f(0x7b)))throw new Error(_0x340b6f(0x8b));const _0xeff408=await fetch(API_BASE+_0x340b6f(0x88),{'method':'POST','headers':{'Content-Type':'application/json'},'body':JSON[_0x340b6f(0x93)](_0x34c04c)});if(!_0xeff408['ok'])throw new Error('API\x20Error:\x20'+_0xeff408[_0x340b6f(0x91)]);return await _0xeff408[_0x340b6f(0x74)]();}),_0x3a136c[_0x7783ff(0x7f)][_0x7783ff(0x79)](_0x7783ff(0x82),async _0x4e284a=>{const _0x176f34=_0x7783ff;if(!_0x3a136c['getCurrentUser']()[_0x176f34(0x71)]('ADMIN')&&!_0x3a136c['getCurrentUser']()['hasPermission'](_0x176f34(0x77))&&!_0x3a136c['getCurrentUser']()['hasPermission']('CLIENT_UPDATED'))throw new Error(_0x176f34(0x72));const {where:_0xe07a7a,..._0x38233d}=_0x4e284a,_0x4a7427=await fetch(API_BASE+'/'+_0xe07a7a['id'],{'method':'PUT','headers':{'Content-Type':_0x176f34(0x8a)},'body':JSON[_0x176f34(0x93)](_0x38233d)});if(!_0x4a7427['ok'])throw new Error('API\x20Error:\x20'+_0x4a7427[_0x176f34(0x91)]);return await _0x4a7427[_0x176f34(0x74)]();}),_0x3a136c[_0x7783ff(0x7f)]['on'](_0x7783ff(0x86),async({id:_0x1441af})=>{const _0xb7f80e=_0x7783ff;if(!_0x3a136c[_0xb7f80e(0x8e)]()['hasPermission'](_0xb7f80e(0x8d))&&!_0x3a136c[_0xb7f80e(0x8e)]()['hasPermission'](_0xb7f80e(0x77))&&!_0x3a136c[_0xb7f80e(0x8e)]()[_0xb7f80e(0x71)](_0xb7f80e(0x8c)))throw new Error(_0xb7f80e(0x80));const _0x31354b=await fetch(API_BASE+'/'+_0x1441af,{'method':_0xb7f80e(0x7a)});if(!_0x31354b['ok']&&_0x31354b['status']!==0xcc)throw new Error('API\x20Error:\x20'+_0x31354b[_0xb7f80e(0x91)]);});}
@@ -1,3 +1,2 @@
1
- import { PrismaClient } from "@prisma/client";
2
1
  import { OWLClient } from "../../owl/OWLClient.js";
3
- export default function bindItemEvents(owl: OWLClient, prisma: PrismaClient): void;
2
+ export default function bindItemEvents(owl: OWLClient): void;
@@ -1 +1 @@
1
- (function(_0x3d82c7,_0x54d0c3){const _0x14c3ef=a5_0x1c73,_0x27f5be=_0x3d82c7();while(!![]){try{const _0x3a412c=parseInt(_0x14c3ef(0x1dc))/0x1*(-parseInt(_0x14c3ef(0x1e2))/0x2)+parseInt(_0x14c3ef(0x1e0))/0x3+-parseInt(_0x14c3ef(0x1d4))/0x4*(-parseInt(_0x14c3ef(0x1da))/0x5)+-parseInt(_0x14c3ef(0x1d5))/0x6+-parseInt(_0x14c3ef(0x1cb))/0x7*(parseInt(_0x14c3ef(0x1d6))/0x8)+-parseInt(_0x14c3ef(0x1de))/0x9*(-parseInt(_0x14c3ef(0x1d9))/0xa)+-parseInt(_0x14c3ef(0x1ca))/0xb*(-parseInt(_0x14c3ef(0x1d1))/0xc);if(_0x3a412c===_0x54d0c3)break;else _0x27f5be['push'](_0x27f5be['shift']());}catch(_0x4b03a5){_0x27f5be['push'](_0x27f5be['shift']());}}}(a5_0x5aaa,0x33a86));function a5_0x5aaa(){const _0x5e3825=['getCurrentUser','245914PuSWJx','item.deleted','onRequest','findMany','400002:\x20Action\x20not\x20allowed.','ADMIN','item.read.all','item','item.created','400004:\x20Action\x20not\x20allowed.','400001:\x20Action\x20not\x20allowed.','114587QoPYxS','14iSfCDb','item.read.some','ITEM_ALL','delete','map','ITEM_READ','552FwECcC','ITEM_CREATED','update','8708ILYasR','2043354vhBPBX','242096VkMHDk','findUnique','events','70PmWSgJ','205OZXEBL','hasPermission','1EbXfiN','ITEM_DELETED','67329OKKUtP','ITEM_UPDATED','344472RyUHAj'];a5_0x5aaa=function(){return _0x5e3825;};return a5_0x5aaa();}function a5_0x1c73(_0x557e43,_0xa2f226){_0x557e43=_0x557e43-0x1c7;const _0x5aaaf9=a5_0x5aaa();let _0x1c73a0=_0x5aaaf9[_0x557e43];return _0x1c73a0;}export default function bindItemEvents(_0x847f8e,_0x42492f){const _0x291480=a5_0x1c73;_0x847f8e['events'][_0x291480(0x1e4)](_0x291480(0x1c7),async _0x32f187=>{const _0x553d84=_0x291480;if(!_0x847f8e[_0x553d84(0x1e1)]()['hasPermission'](_0x553d84(0x1e7))&&!_0x847f8e[_0x553d84(0x1e1)]()[_0x553d84(0x1db)](_0x553d84(0x1cd))&&!_0x847f8e[_0x553d84(0x1e1)]()['hasPermission'](_0x553d84(0x1d2)))throw new Error(_0x553d84(0x1c9));const {taxes:_0x1ab3b1,..._0x202ae9}=_0x32f187[_0x553d84(0x1e9)],_0x44bada=await _0x42492f[_0x553d84(0x1e9)]['create']({'data':{..._0x202ae9,'taxes':{'create':_0x1ab3b1[_0x553d84(0x1cf)](_0x4a043a=>({'tax':{'create':{..._0x4a043a}}}))}},'include':{'taxes':{'include':{'tax':!![]}}}});return _0x44bada['id'];}),_0x847f8e[_0x291480(0x1d8)]['onRequest']('item.read',async({id:_0x3ca2b4})=>{const _0x58da00=_0x291480;if(!_0x847f8e[_0x58da00(0x1e1)]()[_0x58da00(0x1db)](_0x58da00(0x1e7))&&!_0x847f8e[_0x58da00(0x1e1)]()[_0x58da00(0x1db)](_0x58da00(0x1cd))&&!_0x847f8e[_0x58da00(0x1e1)]()[_0x58da00(0x1db)](_0x58da00(0x1d0)))throw new Error(_0x58da00(0x1e6));const _0xe045ea=await _0x42492f[_0x58da00(0x1e9)][_0x58da00(0x1d7)]({'where':{'id':_0x3ca2b4},'include':{'taxes':{'include':{'tax':!![]}}}});return _0xe045ea;}),_0x847f8e[_0x291480(0x1d8)][_0x291480(0x1e4)](_0x291480(0x1e8),async()=>{const _0x5918b0=_0x291480;if(!_0x847f8e[_0x5918b0(0x1e1)]()[_0x5918b0(0x1db)](_0x5918b0(0x1e7))&&!_0x847f8e[_0x5918b0(0x1e1)]()['hasPermission'](_0x5918b0(0x1cd))&&!_0x847f8e[_0x5918b0(0x1e1)]()[_0x5918b0(0x1db)](_0x5918b0(0x1d0)))throw new Error(_0x5918b0(0x1e6));const _0x1c4b9f=await _0x42492f[_0x5918b0(0x1e9)][_0x5918b0(0x1e5)]({'include':{'taxes':{'include':{'tax':!![]}}}});return _0x1c4b9f;}),_0x847f8e['events'][_0x291480(0x1e4)](_0x291480(0x1cc),async _0x4eeb1=>{const _0x1adf08=_0x291480;if(!_0x847f8e[_0x1adf08(0x1e1)]()[_0x1adf08(0x1db)]('ADMIN')&&!_0x847f8e[_0x1adf08(0x1e1)]()[_0x1adf08(0x1db)](_0x1adf08(0x1cd))&&!_0x847f8e[_0x1adf08(0x1e1)]()[_0x1adf08(0x1db)]('ITEM_READ'))throw new Error('400002:\x20Action\x20not\x20allowed.');const _0x163f2e=await _0x42492f[_0x1adf08(0x1e9)][_0x1adf08(0x1e5)]({'where':_0x4eeb1,'include':{'taxes':{'include':{'tax':!![]}}}});return _0x163f2e;}),_0x847f8e['events'][_0x291480(0x1e4)]('item.updated',async _0x19f95f=>{const _0x25a5bd=_0x291480;if(!_0x847f8e[_0x25a5bd(0x1e1)]()[_0x25a5bd(0x1db)](_0x25a5bd(0x1e7))&&!_0x847f8e[_0x25a5bd(0x1e1)]()[_0x25a5bd(0x1db)](_0x25a5bd(0x1cd))&&!_0x847f8e['getCurrentUser']()['hasPermission'](_0x25a5bd(0x1df)))throw new Error('400003:\x20Action\x20not\x20allowed.');const {where:_0xd7e73,..._0x3d9599}=_0x19f95f;return await _0x42492f[_0x25a5bd(0x1e9)][_0x25a5bd(0x1d3)]({'where':_0xd7e73,'data':_0x3d9599});}),_0x847f8e[_0x291480(0x1d8)]['on'](_0x291480(0x1e3),async({id:_0x5617bd})=>{const _0x418d62=_0x291480;if(!_0x847f8e['getCurrentUser']()[_0x418d62(0x1db)](_0x418d62(0x1e7))&&!_0x847f8e[_0x418d62(0x1e1)]()[_0x418d62(0x1db)](_0x418d62(0x1cd))&&!_0x847f8e['getCurrentUser']()[_0x418d62(0x1db)](_0x418d62(0x1dd)))throw new Error(_0x418d62(0x1c8));await _0x42492f[_0x418d62(0x1e9)][_0x418d62(0x1ce)]({'where':{'id':_0x5617bd}});});}
1
+ const a16_0x4f3e18=a16_0x3e88;function a16_0x7599(){const _0x12b7d1=['ITEM_UPDATED','8SmyHXd','events','http://localhost:5001/items','ITEM_READ','584mVkpts','400004:\x20Action\x20not\x20allowed.','/search','400001:\x20Action\x20not\x20allowed.','ITEM_CREATED','statusText','hasPermission','11325rEgjtb','item.read.some','item.created','1450476VTDyvp','item.read.all','getCurrentUser','8361871DaCQzi','2284360qfMzrQ','POST','stringify','API\x20Error:\x20','400003:\x20Action\x20not\x20allowed.','application/json','status','item','item.updated','7991496PpOazL','onRequest','6221435AVqmPS','400002:\x20Action\x20not\x20allowed.','json','355726NFXYGy','ITEM_ALL','ADMIN','ITEM_DELETED','item.read'];a16_0x7599=function(){return _0x12b7d1;};return a16_0x7599();}function a16_0x3e88(_0x2cb643,_0x21352f){_0x2cb643=_0x2cb643-0xb6;const _0x75996b=a16_0x7599();let _0x3e8880=_0x75996b[_0x2cb643];return _0x3e8880;}(function(_0x13c68d,_0x72b702){const _0x57365d=a16_0x3e88,_0x48ee7a=_0x13c68d();while(!![]){try{const _0x414a31=-parseInt(_0x57365d(0xb8))/0x1+-parseInt(_0x57365d(0xc2))/0x2*(-parseInt(_0x57365d(0xc9))/0x3)+parseInt(_0x57365d(0xd0))/0x4+parseInt(_0x57365d(0xdb))/0x5+parseInt(_0x57365d(0xcc))/0x6+parseInt(_0x57365d(0xcf))/0x7*(-parseInt(_0x57365d(0xbe))/0x8)+-parseInt(_0x57365d(0xd9))/0x9;if(_0x414a31===_0x72b702)break;else _0x48ee7a['push'](_0x48ee7a['shift']());}catch(_0x20a658){_0x48ee7a['push'](_0x48ee7a['shift']());}}}(a16_0x7599,0xb0130));const API_BASE=a16_0x4f3e18(0xc0);export default function bindItemEvents(_0x4c4e3d){const _0x323ab6=a16_0x4f3e18;_0x4c4e3d[_0x323ab6(0xbf)][_0x323ab6(0xda)](_0x323ab6(0xcb),async _0x1c3493=>{const _0x31dd2d=_0x323ab6;if(!_0x4c4e3d['getCurrentUser']()[_0x31dd2d(0xc8)]('ADMIN')&&!_0x4c4e3d[_0x31dd2d(0xce)]()['hasPermission'](_0x31dd2d(0xb9))&&!_0x4c4e3d[_0x31dd2d(0xce)]()[_0x31dd2d(0xc8)](_0x31dd2d(0xc6)))throw new Error(_0x31dd2d(0xc5));const _0x8e4aad=await fetch(''+API_BASE,{'method':_0x31dd2d(0xd1),'headers':{'Content-Type':_0x31dd2d(0xd5)},'body':JSON[_0x31dd2d(0xd2)](_0x1c3493[_0x31dd2d(0xd7)])});if(!_0x8e4aad['ok'])throw new Error(_0x31dd2d(0xd3)+_0x8e4aad[_0x31dd2d(0xc7)]);const _0x5e2a6b=await _0x8e4aad[_0x31dd2d(0xb7)]();return _0x5e2a6b['id'];}),_0x4c4e3d[_0x323ab6(0xbf)][_0x323ab6(0xda)](_0x323ab6(0xbc),async({id:_0x33d6cf})=>{const _0x4412ce=_0x323ab6;if(!_0x4c4e3d[_0x4412ce(0xce)]()[_0x4412ce(0xc8)](_0x4412ce(0xba))&&!_0x4c4e3d[_0x4412ce(0xce)]()[_0x4412ce(0xc8)](_0x4412ce(0xb9))&&!_0x4c4e3d['getCurrentUser']()[_0x4412ce(0xc8)](_0x4412ce(0xc1)))throw new Error(_0x4412ce(0xb6));const _0x2f201c=await fetch(API_BASE+'/'+_0x33d6cf);if(!_0x2f201c['ok'])throw new Error(_0x4412ce(0xd3)+_0x2f201c[_0x4412ce(0xc7)]);return await _0x2f201c['json']();}),_0x4c4e3d['events'][_0x323ab6(0xda)](_0x323ab6(0xcd),async()=>{const _0x3aee59=_0x323ab6;if(!_0x4c4e3d[_0x3aee59(0xce)]()[_0x3aee59(0xc8)](_0x3aee59(0xba))&&!_0x4c4e3d[_0x3aee59(0xce)]()[_0x3aee59(0xc8)]('ITEM_ALL')&&!_0x4c4e3d[_0x3aee59(0xce)]()[_0x3aee59(0xc8)]('ITEM_READ'))throw new Error(_0x3aee59(0xb6));const _0x561253=await fetch(''+API_BASE);if(!_0x561253['ok'])throw new Error(_0x3aee59(0xd3)+_0x561253['statusText']);return await _0x561253[_0x3aee59(0xb7)]();}),_0x4c4e3d['events'][_0x323ab6(0xda)](_0x323ab6(0xca),async _0x2181e5=>{const _0x482028=_0x323ab6;if(!_0x4c4e3d[_0x482028(0xce)]()[_0x482028(0xc8)](_0x482028(0xba))&&!_0x4c4e3d['getCurrentUser']()[_0x482028(0xc8)](_0x482028(0xb9))&&!_0x4c4e3d['getCurrentUser']()[_0x482028(0xc8)](_0x482028(0xc1)))throw new Error(_0x482028(0xb6));const _0xdd10a1=await fetch(API_BASE+_0x482028(0xc4),{'method':_0x482028(0xd1),'headers':{'Content-Type':_0x482028(0xd5)},'body':JSON[_0x482028(0xd2)](_0x2181e5)});if(!_0xdd10a1['ok'])throw new Error(_0x482028(0xd3)+_0xdd10a1[_0x482028(0xc7)]);return await _0xdd10a1[_0x482028(0xb7)]();}),_0x4c4e3d[_0x323ab6(0xbf)][_0x323ab6(0xda)](_0x323ab6(0xd8),async _0x5ef1a9=>{const _0x40d02e=_0x323ab6;if(!_0x4c4e3d[_0x40d02e(0xce)]()[_0x40d02e(0xc8)](_0x40d02e(0xba))&&!_0x4c4e3d[_0x40d02e(0xce)]()[_0x40d02e(0xc8)](_0x40d02e(0xb9))&&!_0x4c4e3d[_0x40d02e(0xce)]()[_0x40d02e(0xc8)](_0x40d02e(0xbd)))throw new Error(_0x40d02e(0xd4));const {where:_0x197cfa,..._0x5529f1}=_0x5ef1a9,_0x1290d2=await fetch(API_BASE+'/'+_0x197cfa['id'],{'method':'PUT','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x5529f1)});if(!_0x1290d2['ok'])throw new Error('API\x20Error:\x20'+_0x1290d2[_0x40d02e(0xc7)]);return await _0x1290d2['json']();}),_0x4c4e3d['events']['on']('item.deleted',async({id:_0x452d5d})=>{const _0x5e7cb6=_0x323ab6;if(!_0x4c4e3d['getCurrentUser']()[_0x5e7cb6(0xc8)](_0x5e7cb6(0xba))&&!_0x4c4e3d[_0x5e7cb6(0xce)]()[_0x5e7cb6(0xc8)](_0x5e7cb6(0xb9))&&!_0x4c4e3d['getCurrentUser']()['hasPermission'](_0x5e7cb6(0xbb)))throw new Error(_0x5e7cb6(0xc3));const _0x1089bb=await fetch(API_BASE+'/'+_0x452d5d,{'method':'DELETE'});if(!_0x1089bb['ok']&&_0x1089bb[_0x5e7cb6(0xd6)]!==0xcc)throw new Error(_0x5e7cb6(0xd3)+_0x1089bb[_0x5e7cb6(0xc7)]);});}
@@ -1,3 +1,2 @@
1
- import { PrismaClient } from "@prisma/client";
2
1
  import { OWLClient } from "../../owl/OWLClient.js";
3
- export default function bindOrderEvents(owl: OWLClient, prisma: PrismaClient): void;
2
+ export default function bindOrderEvents(owl: OWLClient): void;
@@ -1 +1 @@
1
- function a6_0x1e6b(){const _0x343b53=['9407349yFdknY','379768xLrUVt','update','order.read.all','hasPermission','2930070ztsufb','getCurrentUser','order.read.some','order.deleted','ORDER_UPDATED','ORDER_CREATED','616796Dnmvrt','9mfAtWF','ORDER_READ','614487pzShgf','ADMIN','841806uTmNmO','210004:\x20Action\x20not\x20allowed.','order','findMany','210003:\x20Action\x20not\x20allowed.','onRequest','210002:\x20Action\x20not\x20allowed.','order.created','create','ORDER_ALL','delete','ORDER_DELETED','events','15750JBvOQr','order.read','91eToPfA','210001:\x20Action\x20not\x20allowed.'];a6_0x1e6b=function(){return _0x343b53;};return a6_0x1e6b();}(function(_0x54c6f2,_0x35294e){const _0x5bd361=a6_0x2e6a,_0x16bff2=_0x54c6f2();while(!![]){try{const _0x515a8d=parseInt(_0x5bd361(0xa2))/0x1+-parseInt(_0x5bd361(0xa4))/0x2*(parseInt(_0x5bd361(0xa0))/0x3)+parseInt(_0x5bd361(0x9f))/0x4+parseInt(_0x5bd361(0xb1))/0x5+-parseInt(_0x5bd361(0xba))/0x6+parseInt(_0x5bd361(0xb3))/0x7*(parseInt(_0x5bd361(0xb6))/0x8)+parseInt(_0x5bd361(0xb5))/0x9;if(_0x515a8d===_0x35294e)break;else _0x16bff2['push'](_0x16bff2['shift']());}catch(_0x42f91e){_0x16bff2['push'](_0x16bff2['shift']());}}}(a6_0x1e6b,0xa6c9e));function a6_0x2e6a(_0x3b1d92,_0x386253){_0x3b1d92=_0x3b1d92-0x9c;const _0x1e6b6e=a6_0x1e6b();let _0x2e6a9c=_0x1e6b6e[_0x3b1d92];return _0x2e6a9c;}export default function bindOrderEvents(_0x305b4b,_0x50061f){const _0x22a6a8=a6_0x2e6a;_0x305b4b[_0x22a6a8(0xb0)]['onRequest'](_0x22a6a8(0xab),async _0x537457=>{const _0x3d35ee=_0x22a6a8;if(!_0x305b4b[_0x3d35ee(0xbb)]()[_0x3d35ee(0xb9)]('ADMIN')&&!_0x305b4b['getCurrentUser']()[_0x3d35ee(0xb9)](_0x3d35ee(0xad))&&!_0x305b4b[_0x3d35ee(0xbb)]()['hasPermission'](_0x3d35ee(0x9e)))throw new Error(_0x3d35ee(0xb4));const _0x2c3ded=await _0x50061f[_0x3d35ee(0xa6)][_0x3d35ee(0xac)]({'data':_0x537457[_0x3d35ee(0xa6)]});return _0x2c3ded['id'];}),_0x305b4b['events'][_0x22a6a8(0xa9)](_0x22a6a8(0xb2),async({id:_0x231763})=>{const _0x2e58a1=_0x22a6a8;if(!_0x305b4b[_0x2e58a1(0xbb)]()[_0x2e58a1(0xb9)](_0x2e58a1(0xa3))&&!_0x305b4b[_0x2e58a1(0xbb)]()[_0x2e58a1(0xb9)]('ORDER_ALL')&&!_0x305b4b['getCurrentUser']()[_0x2e58a1(0xb9)](_0x2e58a1(0xa1)))throw new Error('210002:\x20Action\x20not\x20allowed.');const _0x4ba0f3=await _0x50061f[_0x2e58a1(0xa6)]['findUnique']({'where':{'id':_0x231763}});return _0x4ba0f3;}),_0x305b4b[_0x22a6a8(0xb0)][_0x22a6a8(0xa9)](_0x22a6a8(0xb8),async()=>{const _0x43eb97=_0x22a6a8;if(!_0x305b4b[_0x43eb97(0xbb)]()['hasPermission'](_0x43eb97(0xa3))&&!_0x305b4b[_0x43eb97(0xbb)]()[_0x43eb97(0xb9)](_0x43eb97(0xad))&&!_0x305b4b[_0x43eb97(0xbb)]()[_0x43eb97(0xb9)](_0x43eb97(0xa1)))throw new Error(_0x43eb97(0xaa));const _0x51f450=await _0x50061f[_0x43eb97(0xa6)]['findMany']();return _0x51f450;}),_0x305b4b[_0x22a6a8(0xb0)]['onRequest'](_0x22a6a8(0xbc),async _0x45d5f7=>{const _0x3b7ef4=_0x22a6a8;if(!_0x305b4b[_0x3b7ef4(0xbb)]()[_0x3b7ef4(0xb9)](_0x3b7ef4(0xa3))&&!_0x305b4b['getCurrentUser']()[_0x3b7ef4(0xb9)](_0x3b7ef4(0xad))&&!_0x305b4b[_0x3b7ef4(0xbb)]()[_0x3b7ef4(0xb9)](_0x3b7ef4(0xa1)))throw new Error(_0x3b7ef4(0xaa));const _0x4c96aa=await _0x50061f['order'][_0x3b7ef4(0xa7)]({'where':_0x45d5f7});return _0x4c96aa;}),_0x305b4b['events']['onRequest']('order.updated',async _0x566a3a=>{const _0x3a3f28=_0x22a6a8;if(!_0x305b4b['getCurrentUser']()[_0x3a3f28(0xb9)](_0x3a3f28(0xa3))&&!_0x305b4b['getCurrentUser']()[_0x3a3f28(0xb9)](_0x3a3f28(0xad))&&!_0x305b4b[_0x3a3f28(0xbb)]()['hasPermission'](_0x3a3f28(0x9d)))throw new Error(_0x3a3f28(0xa8));const {where:_0x89ca8e,..._0x5714c6}=_0x566a3a;return await _0x50061f[_0x3a3f28(0xa6)][_0x3a3f28(0xb7)]({'where':_0x89ca8e,'data':_0x5714c6});}),_0x305b4b[_0x22a6a8(0xb0)]['on'](_0x22a6a8(0x9c),async({id:_0x470978})=>{const _0x561037=_0x22a6a8;if(!_0x305b4b[_0x561037(0xbb)]()['hasPermission'](_0x561037(0xa3))&&!_0x305b4b[_0x561037(0xbb)]()[_0x561037(0xb9)]('ORDER_ALL')&&!_0x305b4b[_0x561037(0xbb)]()[_0x561037(0xb9)](_0x561037(0xaf)))throw new Error(_0x561037(0xa5));await _0x50061f[_0x561037(0xa6)][_0x561037(0xae)]({'where':{'id':_0x470978}});});}
1
+ function a17_0x31a2(){const _0x122eb8=['2exRPut','ORDER_CREATED','182orqxtZ','events','12492HEiPXE','ORDER_READ','order.deleted','application/json','onRequest','API\x20Error:\x20','5761096QtyQYO','stringify','22533104fubGJn','70GWNiSP','2256837LUVpwh','ADMIN','1343835GGxsIJ','order.updated','/search','http://localhost:5001/orders','POST','hasPermission','DELETE','946803HcOXxw','getCurrentUser','order.read.all','1675AyLHgv','210001:\x20Action\x20not\x20allowed.','statusText','210002:\x20Action\x20not\x20allowed.','json','ORDER_ALL','210003:\x20Action\x20not\x20allowed.','status','45288cblsca'];a17_0x31a2=function(){return _0x122eb8;};return a17_0x31a2();}const a17_0x10c255=a17_0xbdc3;(function(_0x39d548,_0x1bb1ac){const _0x3c7a8f=a17_0xbdc3,_0x3d002f=_0x39d548();while(!![]){try{const _0x5e1b01=-parseInt(_0x3c7a8f(0xd4))/0x1+parseInt(_0x3c7a8f(0xbd))/0x2*(-parseInt(_0x3c7a8f(0xcb))/0x3)+-parseInt(_0x3c7a8f(0xc7))/0x4+parseInt(_0x3c7a8f(0xd7))/0x5*(parseInt(_0x3c7a8f(0xc1))/0x6)+parseInt(_0x3c7a8f(0xbf))/0x7*(parseInt(_0x3c7a8f(0xbc))/0x8)+-parseInt(_0x3c7a8f(0xcd))/0x9*(-parseInt(_0x3c7a8f(0xca))/0xa)+parseInt(_0x3c7a8f(0xc9))/0xb;if(_0x5e1b01===_0x1bb1ac)break;else _0x3d002f['push'](_0x3d002f['shift']());}catch(_0x448a21){_0x3d002f['push'](_0x3d002f['shift']());}}}(a17_0x31a2,0xc30f9));const API_BASE=a17_0x10c255(0xd0);function a17_0xbdc3(_0x5846ee,_0x4d93bb){_0x5846ee=_0x5846ee-0xb9;const _0x31a2d3=a17_0x31a2();let _0xbdc3cd=_0x31a2d3[_0x5846ee];return _0xbdc3cd;}export default function bindOrderEvents(_0x33e5e7){const _0x5877c1=a17_0x10c255;_0x33e5e7[_0x5877c1(0xc0)]['onRequest']('order.created',async _0x364337=>{const _0x10eab9=_0x5877c1;if(!_0x33e5e7['getCurrentUser']()[_0x10eab9(0xd2)](_0x10eab9(0xcc))&&!_0x33e5e7[_0x10eab9(0xd5)]()[_0x10eab9(0xd2)]('ORDER_ALL')&&!_0x33e5e7[_0x10eab9(0xd5)]()[_0x10eab9(0xd2)](_0x10eab9(0xbe)))throw new Error(_0x10eab9(0xd8));const _0x596e58=await fetch(''+API_BASE,{'method':_0x10eab9(0xd1),'headers':{'Content-Type':'application/json'},'body':JSON[_0x10eab9(0xc8)](_0x364337['order'])});if(!_0x596e58['ok'])throw new Error(_0x10eab9(0xc6)+_0x596e58[_0x10eab9(0xd9)]);const _0x41de34=await _0x596e58[_0x10eab9(0xdb)]();return _0x41de34['id'];}),_0x33e5e7[_0x5877c1(0xc0)][_0x5877c1(0xc5)]('order.read',async({id:_0x13af9b})=>{const _0x53ddfc=_0x5877c1;if(!_0x33e5e7[_0x53ddfc(0xd5)]()['hasPermission']('ADMIN')&&!_0x33e5e7[_0x53ddfc(0xd5)]()[_0x53ddfc(0xd2)](_0x53ddfc(0xb9))&&!_0x33e5e7[_0x53ddfc(0xd5)]()[_0x53ddfc(0xd2)]('ORDER_READ'))throw new Error(_0x53ddfc(0xda));const _0x2b9464=await fetch(API_BASE+'/'+_0x13af9b);if(!_0x2b9464['ok'])throw new Error('API\x20Error:\x20'+_0x2b9464[_0x53ddfc(0xd9)]);return await _0x2b9464[_0x53ddfc(0xdb)]();}),_0x33e5e7[_0x5877c1(0xc0)][_0x5877c1(0xc5)](_0x5877c1(0xd6),async()=>{const _0x29fa52=_0x5877c1;if(!_0x33e5e7[_0x29fa52(0xd5)]()['hasPermission'](_0x29fa52(0xcc))&&!_0x33e5e7[_0x29fa52(0xd5)]()[_0x29fa52(0xd2)](_0x29fa52(0xb9))&&!_0x33e5e7[_0x29fa52(0xd5)]()[_0x29fa52(0xd2)](_0x29fa52(0xc2)))throw new Error('210002:\x20Action\x20not\x20allowed.');const _0x224369=await fetch(''+API_BASE);if(!_0x224369['ok'])throw new Error(_0x29fa52(0xc6)+_0x224369[_0x29fa52(0xd9)]);return await _0x224369[_0x29fa52(0xdb)]();}),_0x33e5e7[_0x5877c1(0xc0)][_0x5877c1(0xc5)]('order.read.some',async _0x517d07=>{const _0x327e9d=_0x5877c1;if(!_0x33e5e7[_0x327e9d(0xd5)]()['hasPermission']('ADMIN')&&!_0x33e5e7[_0x327e9d(0xd5)]()['hasPermission'](_0x327e9d(0xb9))&&!_0x33e5e7[_0x327e9d(0xd5)]()['hasPermission'](_0x327e9d(0xc2)))throw new Error(_0x327e9d(0xda));const _0x4d92fa=await fetch(API_BASE+_0x327e9d(0xcf),{'method':_0x327e9d(0xd1),'headers':{'Content-Type':'application/json'},'body':JSON[_0x327e9d(0xc8)](_0x517d07)});if(!_0x4d92fa['ok'])throw new Error(_0x327e9d(0xc6)+_0x4d92fa[_0x327e9d(0xd9)]);return await _0x4d92fa[_0x327e9d(0xdb)]();}),_0x33e5e7[_0x5877c1(0xc0)][_0x5877c1(0xc5)](_0x5877c1(0xce),async _0x14331e=>{const _0x52aa2b=_0x5877c1;if(!_0x33e5e7[_0x52aa2b(0xd5)]()['hasPermission'](_0x52aa2b(0xcc))&&!_0x33e5e7[_0x52aa2b(0xd5)]()['hasPermission'](_0x52aa2b(0xb9))&&!_0x33e5e7[_0x52aa2b(0xd5)]()['hasPermission']('ORDER_UPDATED'))throw new Error(_0x52aa2b(0xba));const {where:_0x34882e,..._0x32cbe9}=_0x14331e,_0x10b6a2=await fetch(API_BASE+'/'+_0x34882e['id'],{'method':'PUT','headers':{'Content-Type':_0x52aa2b(0xc4)},'body':JSON[_0x52aa2b(0xc8)](_0x32cbe9)});if(!_0x10b6a2['ok'])throw new Error(_0x52aa2b(0xc6)+_0x10b6a2[_0x52aa2b(0xd9)]);return await _0x10b6a2[_0x52aa2b(0xdb)]();}),_0x33e5e7['events']['on'](_0x5877c1(0xc3),async({id:_0x50c3a5})=>{const _0xff42d5=_0x5877c1;if(!_0x33e5e7[_0xff42d5(0xd5)]()['hasPermission'](_0xff42d5(0xcc))&&!_0x33e5e7[_0xff42d5(0xd5)]()[_0xff42d5(0xd2)](_0xff42d5(0xb9))&&!_0x33e5e7[_0xff42d5(0xd5)]()[_0xff42d5(0xd2)]('ORDER_DELETED'))throw new Error('210004:\x20Action\x20not\x20allowed.');const _0x12c6a8=await fetch(API_BASE+'/'+_0x50c3a5,{'method':_0xff42d5(0xd3)});if(!_0x12c6a8['ok']&&_0x12c6a8[_0xff42d5(0xbb)]!==0xcc)throw new Error(_0xff42d5(0xc6)+_0x12c6a8[_0xff42d5(0xd9)]);});}
@@ -1,3 +1,2 @@
1
- import { PrismaClient } from "@prisma/client";
2
1
  import { OWLClient } from "../../owl/OWLClient.js";
3
- export default function bindPreparationEvents(owl: OWLClient, prisma: PrismaClient): void;
2
+ export default function bindPreparationEvents(owl: OWLClient): void;
@@ -1 +1 @@
1
- function a7_0x32bd(_0x31c445,_0x3fc4d4){_0x31c445=_0x31c445-0x18a;const _0x2de9eb=a7_0x2de9();let _0x32bd9f=_0x2de9eb[_0x31c445];return _0x32bd9f;}function a7_0x2de9(){const _0x16431a=['1605072xxwfNj','ADMIN','220003:\x20Action\x20not\x20allowed.','365876dplhdh','events','4821102YnEiyQ','findMany','getCurrentUser','preparation.updated','1467702HtpPoX','PREPARATION_ALL','220002:\x20Action\x20not\x20allowed.','preparation.read.some','565748htBbea','10mAYNUT','PREPARATION_READ','preparation','PREPARATION_CREATED','update','create','onRequest','preparation.deleted','preparation.read','1561BmLWKL','220001:\x20Action\x20not\x20allowed.','220004:\x20Action\x20not\x20allowed.','preparation.read.all','hasPermission','7688JIFSsI','278954pGJmyR','PREPARATION_UPDATED'];a7_0x2de9=function(){return _0x16431a;};return a7_0x2de9();}(function(_0x4a72e8,_0x106e34){const _0xb46ecf=a7_0x32bd,_0x3b8721=_0x4a72e8();while(!![]){try{const _0x349a9c=parseInt(_0xb46ecf(0x19a))/0x1+parseInt(_0xb46ecf(0x19f))/0x2+-parseInt(_0xb46ecf(0x19c))/0x3+-parseInt(_0xb46ecf(0x18a))/0x4*(-parseInt(_0xb46ecf(0x18b))/0x5)+-parseInt(_0xb46ecf(0x1a5))/0x6+parseInt(_0xb46ecf(0x194))/0x7*(-parseInt(_0xb46ecf(0x199))/0x8)+parseInt(_0xb46ecf(0x1a1))/0x9;if(_0x349a9c===_0x106e34)break;else _0x3b8721['push'](_0x3b8721['shift']());}catch(_0x303c1f){_0x3b8721['push'](_0x3b8721['shift']());}}}(a7_0x2de9,0x45f24));export default function bindPreparationEvents(_0x45a2a8,_0x4578fb){const _0x412df6=a7_0x32bd;_0x45a2a8[_0x412df6(0x1a0)]['onRequest']('preparation.created',async _0x419894=>{const _0x5be26b=_0x412df6;if(!_0x45a2a8[_0x5be26b(0x1a3)]()[_0x5be26b(0x198)](_0x5be26b(0x19d))&&!_0x45a2a8[_0x5be26b(0x1a3)]()['hasPermission'](_0x5be26b(0x1a6))&&!_0x45a2a8['getCurrentUser']()[_0x5be26b(0x198)](_0x5be26b(0x18e)))throw new Error(_0x5be26b(0x195));const _0x34b63a=await _0x4578fb[_0x5be26b(0x18d)][_0x5be26b(0x190)]({'data':_0x419894['preparation']});return _0x34b63a['id'];}),_0x45a2a8[_0x412df6(0x1a0)][_0x412df6(0x191)](_0x412df6(0x193),async({id:_0x5847ba})=>{const _0x37e1e4=_0x412df6;if(!_0x45a2a8[_0x37e1e4(0x1a3)]()[_0x37e1e4(0x198)](_0x37e1e4(0x19d))&&!_0x45a2a8[_0x37e1e4(0x1a3)]()[_0x37e1e4(0x198)](_0x37e1e4(0x1a6))&&!_0x45a2a8[_0x37e1e4(0x1a3)]()['hasPermission'](_0x37e1e4(0x18c)))throw new Error(_0x37e1e4(0x1a7));const _0x2c09bf=await _0x4578fb[_0x37e1e4(0x18d)]['findUnique']({'where':{'id':_0x5847ba}});return _0x2c09bf;}),_0x45a2a8[_0x412df6(0x1a0)][_0x412df6(0x191)](_0x412df6(0x197),async()=>{const _0x1a9fa1=_0x412df6;if(!_0x45a2a8[_0x1a9fa1(0x1a3)]()[_0x1a9fa1(0x198)]('ADMIN')&&!_0x45a2a8[_0x1a9fa1(0x1a3)]()[_0x1a9fa1(0x198)](_0x1a9fa1(0x1a6))&&!_0x45a2a8[_0x1a9fa1(0x1a3)]()[_0x1a9fa1(0x198)](_0x1a9fa1(0x18c)))throw new Error(_0x1a9fa1(0x1a7));const _0x5e79e9=await _0x4578fb[_0x1a9fa1(0x18d)]['findMany']();return _0x5e79e9;}),_0x45a2a8[_0x412df6(0x1a0)][_0x412df6(0x191)](_0x412df6(0x1a8),async _0x4fcedd=>{const _0xedfa6=_0x412df6;if(!_0x45a2a8['getCurrentUser']()[_0xedfa6(0x198)](_0xedfa6(0x19d))&&!_0x45a2a8['getCurrentUser']()[_0xedfa6(0x198)](_0xedfa6(0x1a6))&&!_0x45a2a8['getCurrentUser']()[_0xedfa6(0x198)](_0xedfa6(0x18c)))throw new Error('220002:\x20Action\x20not\x20allowed.');const _0x4bfdca=await _0x4578fb[_0xedfa6(0x18d)][_0xedfa6(0x1a2)]({'where':_0x4fcedd});return _0x4bfdca;}),_0x45a2a8[_0x412df6(0x1a0)][_0x412df6(0x191)](_0x412df6(0x1a4),async _0x56c7e0=>{const _0x4e78c6=_0x412df6;if(!_0x45a2a8[_0x4e78c6(0x1a3)]()[_0x4e78c6(0x198)](_0x4e78c6(0x19d))&&!_0x45a2a8['getCurrentUser']()[_0x4e78c6(0x198)](_0x4e78c6(0x1a6))&&!_0x45a2a8[_0x4e78c6(0x1a3)]()['hasPermission'](_0x4e78c6(0x19b)))throw new Error(_0x4e78c6(0x19e));const {where:_0x5898e7,..._0x379f2a}=_0x56c7e0;return await _0x4578fb[_0x4e78c6(0x18d)][_0x4e78c6(0x18f)]({'where':_0x5898e7,'data':_0x379f2a});}),_0x45a2a8['events']['on'](_0x412df6(0x192),async({id:_0x107bdd})=>{const _0x375c86=_0x412df6;if(!_0x45a2a8[_0x375c86(0x1a3)]()[_0x375c86(0x198)](_0x375c86(0x19d))&&!_0x45a2a8[_0x375c86(0x1a3)]()[_0x375c86(0x198)](_0x375c86(0x1a6))&&!_0x45a2a8[_0x375c86(0x1a3)]()[_0x375c86(0x198)]('PREPARATION_DELETED'))throw new Error(_0x375c86(0x196));await _0x4578fb[_0x375c86(0x18d)]['delete']({'where':{'id':_0x107bdd}});});}
1
+ function a18_0xe022(){const _0x37b148=['PREPARATION_ALL','events','hasPermission','preparation.read.some','32068VOMtkc','9810000cbPTzK','721312oBzzvo','POST','preparation.created','status','ADMIN','43072kiwpnN','API\x20Error:\x20','220004:\x20Action\x20not\x20allowed.','PREPARATION_CREATED','preparation','json','PREPARATION_DELETED','http://localhost:5001/preparations','getCurrentUser','485OfYIsb','stringify','130szGYbl','application/json','220002:\x20Action\x20not\x20allowed.','219411MMaiIE','994122NgiIPQ','preparation.read.all','220003:\x20Action\x20not\x20allowed.','preparation.updated','16zFPBZZ','8749216gwvQhc','PREPARATION_READ','statusText','onRequest','PREPARATION_UPDATED'];a18_0xe022=function(){return _0x37b148;};return a18_0xe022();}const a18_0x2075cb=a18_0x51a7;(function(_0x3da149,_0x85b9ae){const _0x585cab=a18_0x51a7,_0x5d9bb2=_0x3da149();while(!![]){try{const _0x4a5671=-parseInt(_0x585cab(0x189))/0x1+parseInt(_0x585cab(0x178))/0x2*(parseInt(_0x585cab(0x173))/0x3)+-parseInt(_0x585cab(0x182))/0x4*(parseInt(_0x585cab(0x16e))/0x5)+-parseInt(_0x585cab(0x183))/0x6+parseInt(_0x585cab(0x179))/0x7+parseInt(_0x585cab(0x184))/0x8+parseInt(_0x585cab(0x174))/0x9*(parseInt(_0x585cab(0x170))/0xa);if(_0x4a5671===_0x85b9ae)break;else _0x5d9bb2['push'](_0x5d9bb2['shift']());}catch(_0x14e993){_0x5d9bb2['push'](_0x5d9bb2['shift']());}}}(a18_0xe022,0xdd0a5));function a18_0x51a7(_0x27e95e,_0x368f60){_0x27e95e=_0x27e95e-0x16e;const _0xe022a0=a18_0xe022();let _0x51a793=_0xe022a0[_0x27e95e];return _0x51a793;}const API_BASE=a18_0x2075cb(0x190);export default function bindPreparationEvents(_0x4eab50){const _0x460145=a18_0x2075cb;_0x4eab50[_0x460145(0x17f)]['onRequest'](_0x460145(0x186),async _0x39c393=>{const _0x428ea8=_0x460145;if(!_0x4eab50[_0x428ea8(0x191)]()[_0x428ea8(0x180)](_0x428ea8(0x188))&&!_0x4eab50['getCurrentUser']()[_0x428ea8(0x180)]('PREPARATION_ALL')&&!_0x4eab50['getCurrentUser']()[_0x428ea8(0x180)](_0x428ea8(0x18c)))throw new Error('220001:\x20Action\x20not\x20allowed.');const _0x47f224=await fetch(''+API_BASE,{'method':_0x428ea8(0x185),'headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x39c393[_0x428ea8(0x18d)])});if(!_0x47f224['ok'])throw new Error(_0x428ea8(0x18a)+_0x47f224['statusText']);const _0x18cdac=await _0x47f224[_0x428ea8(0x18e)]();return _0x18cdac['id'];}),_0x4eab50[_0x460145(0x17f)][_0x460145(0x17c)]('preparation.read',async({id:_0x4628ae})=>{const _0x1605e6=_0x460145;if(!_0x4eab50[_0x1605e6(0x191)]()[_0x1605e6(0x180)](_0x1605e6(0x188))&&!_0x4eab50[_0x1605e6(0x191)]()['hasPermission'](_0x1605e6(0x17e))&&!_0x4eab50[_0x1605e6(0x191)]()[_0x1605e6(0x180)]('PREPARATION_READ'))throw new Error('220002:\x20Action\x20not\x20allowed.');const _0x845dad=await fetch(API_BASE+'/'+_0x4628ae);if(!_0x845dad['ok'])throw new Error(_0x1605e6(0x18a)+_0x845dad[_0x1605e6(0x17b)]);return await _0x845dad[_0x1605e6(0x18e)]();}),_0x4eab50[_0x460145(0x17f)][_0x460145(0x17c)](_0x460145(0x175),async()=>{const _0x3e88d0=_0x460145;if(!_0x4eab50[_0x3e88d0(0x191)]()['hasPermission'](_0x3e88d0(0x188))&&!_0x4eab50[_0x3e88d0(0x191)]()[_0x3e88d0(0x180)](_0x3e88d0(0x17e))&&!_0x4eab50[_0x3e88d0(0x191)]()[_0x3e88d0(0x180)](_0x3e88d0(0x17a)))throw new Error(_0x3e88d0(0x172));const _0x2f4ffd=await fetch(''+API_BASE);if(!_0x2f4ffd['ok'])throw new Error('API\x20Error:\x20'+_0x2f4ffd[_0x3e88d0(0x17b)]);return await _0x2f4ffd[_0x3e88d0(0x18e)]();}),_0x4eab50['events'][_0x460145(0x17c)](_0x460145(0x181),async _0x971d03=>{const _0x567d75=_0x460145;if(!_0x4eab50[_0x567d75(0x191)]()[_0x567d75(0x180)](_0x567d75(0x188))&&!_0x4eab50[_0x567d75(0x191)]()[_0x567d75(0x180)](_0x567d75(0x17e))&&!_0x4eab50[_0x567d75(0x191)]()[_0x567d75(0x180)](_0x567d75(0x17a)))throw new Error(_0x567d75(0x172));const _0x1a218d=await fetch(API_BASE+'/search',{'method':'POST','headers':{'Content-Type':_0x567d75(0x171)},'body':JSON[_0x567d75(0x16f)](_0x971d03)});if(!_0x1a218d['ok'])throw new Error(_0x567d75(0x18a)+_0x1a218d[_0x567d75(0x17b)]);return await _0x1a218d[_0x567d75(0x18e)]();}),_0x4eab50[_0x460145(0x17f)][_0x460145(0x17c)](_0x460145(0x177),async _0x338d1e=>{const _0x1bb451=_0x460145;if(!_0x4eab50['getCurrentUser']()['hasPermission']('ADMIN')&&!_0x4eab50[_0x1bb451(0x191)]()[_0x1bb451(0x180)](_0x1bb451(0x17e))&&!_0x4eab50[_0x1bb451(0x191)]()[_0x1bb451(0x180)](_0x1bb451(0x17d)))throw new Error(_0x1bb451(0x176));const {where:_0x4b75cd,..._0x2568aa}=_0x338d1e,_0xfcec46=await fetch(API_BASE+'/'+_0x4b75cd['id'],{'method':'PUT','headers':{'Content-Type':_0x1bb451(0x171)},'body':JSON[_0x1bb451(0x16f)](_0x2568aa)});if(!_0xfcec46['ok'])throw new Error(_0x1bb451(0x18a)+_0xfcec46[_0x1bb451(0x17b)]);return await _0xfcec46[_0x1bb451(0x18e)]();}),_0x4eab50[_0x460145(0x17f)]['on']('preparation.deleted',async({id:_0x493f9c})=>{const _0x5a64cc=_0x460145;if(!_0x4eab50[_0x5a64cc(0x191)]()[_0x5a64cc(0x180)](_0x5a64cc(0x188))&&!_0x4eab50['getCurrentUser']()[_0x5a64cc(0x180)]('PREPARATION_ALL')&&!_0x4eab50[_0x5a64cc(0x191)]()[_0x5a64cc(0x180)](_0x5a64cc(0x18f)))throw new Error(_0x5a64cc(0x18b));const _0xdbf251=await fetch(API_BASE+'/'+_0x493f9c,{'method':'DELETE'});if(!_0xdbf251['ok']&&_0xdbf251[_0x5a64cc(0x187)]!==0xcc)throw new Error(_0x5a64cc(0x18a)+_0xdbf251[_0x5a64cc(0x17b)]);});}
@@ -1,3 +1,2 @@
1
- import { PrismaClient } from "@prisma/client";
2
1
  import { OWLClient } from "../../owl/OWLClient.js";
3
- export default function bindPurchaseEvents(owl: OWLClient, prisma: PrismaClient): void;
2
+ export default function bindPurchaseEvents(owl: OWLClient): void;
@@ -1 +1 @@
1
- function a8_0x5833(_0x3d1b1b,_0x3388f0){_0x3d1b1b=_0x3d1b1b-0x154;const _0x9660a4=a8_0x9660();let _0x583352=_0x9660a4[_0x3d1b1b];return _0x583352;}function a8_0x9660(){const _0x130205=['PURCHASE_UPDATED','940597ZTxJiZ','3114225dYevUm','3606200hjuRko','purchase.created','PURCHASE_ALL','hasPermission','delete','679266lJQXuF','1033957aOXBFm','findMany','purchase.read','PURCHASE_READ','ADMIN','purchase.read.some','310002:\x20Action\x20not\x20allowed.','onRequest','purchase','purchase.read.all','PURCHASE_CREATED','4wzJKGu','1565755hrwwdq','findUnique','12CEDiMZ','PURCHASE_DELETED','310004:\x20Action\x20not\x20allowed.','events','create','map','getCurrentUser','310001:\x20Action\x20not\x20allowed.','10965357DKANHM'];a8_0x9660=function(){return _0x130205;};return a8_0x9660();}(function(_0x27c085,_0x235a68){const _0x5b6a92=a8_0x5833,_0x20b316=_0x27c085();while(!![]){try{const _0x3e339c=-parseInt(_0x5b6a92(0x155))/0x1+parseInt(_0x5b6a92(0x154))/0x2+parseInt(_0x5b6a92(0x16e))/0x3*(parseInt(_0x5b6a92(0x160))/0x4)+-parseInt(_0x5b6a92(0x161))/0x5+parseInt(_0x5b6a92(0x163))/0x6*(-parseInt(_0x5b6a92(0x16d))/0x7)+-parseInt(_0x5b6a92(0x16f))/0x8+parseInt(_0x5b6a92(0x16b))/0x9;if(_0x3e339c===_0x235a68)break;else _0x20b316['push'](_0x20b316['shift']());}catch(_0x206b24){_0x20b316['push'](_0x20b316['shift']());}}}(a8_0x9660,0x81430));export default function bindPurchaseEvents(_0x5dd1c2,_0x300a7c){const _0x451e0d=a8_0x5833;_0x5dd1c2[_0x451e0d(0x166)]['onRequest'](_0x451e0d(0x170),async _0xfcdd29=>{const _0x2fec3c=_0x451e0d;if(!_0x5dd1c2[_0x2fec3c(0x169)]()['hasPermission'](_0x2fec3c(0x159))&&!_0x5dd1c2['getCurrentUser']()[_0x2fec3c(0x172)](_0x2fec3c(0x171))&&!_0x5dd1c2['getCurrentUser']()['hasPermission'](_0x2fec3c(0x15f)))throw new Error(_0x2fec3c(0x16a));const {Items:_0x3d8d30,..._0x5401b4}=_0xfcdd29[_0x2fec3c(0x15d)],_0x17b47d=await _0x300a7c[_0x2fec3c(0x15d)][_0x2fec3c(0x167)]({'data':{..._0x5401b4,'Items':{'create':_0x3d8d30[_0x2fec3c(0x168)](_0x487d97=>({'item':{'create':{..._0x487d97}}}))}},'include':{'items':{'include':{'item':!![]}}}});return _0x17b47d['id'];}),_0x5dd1c2['events'][_0x451e0d(0x15c)](_0x451e0d(0x157),async({id:_0x464a52})=>{const _0x2fab85=_0x451e0d;if(!_0x5dd1c2[_0x2fab85(0x169)]()[_0x2fab85(0x172)](_0x2fab85(0x159))&&!_0x5dd1c2['getCurrentUser']()[_0x2fab85(0x172)](_0x2fab85(0x171))&&!_0x5dd1c2[_0x2fab85(0x169)]()[_0x2fab85(0x172)](_0x2fab85(0x158)))throw new Error(_0x2fab85(0x15b));const _0x2f7fc6=await _0x300a7c[_0x2fab85(0x15d)][_0x2fab85(0x162)]({'where':{'id':_0x464a52}});return _0x2f7fc6;}),_0x5dd1c2[_0x451e0d(0x166)][_0x451e0d(0x15c)](_0x451e0d(0x15e),async()=>{const _0x10f2bf=_0x451e0d;if(!_0x5dd1c2['getCurrentUser']()[_0x10f2bf(0x172)](_0x10f2bf(0x159))&&!_0x5dd1c2[_0x10f2bf(0x169)]()[_0x10f2bf(0x172)](_0x10f2bf(0x171))&&!_0x5dd1c2['getCurrentUser']()[_0x10f2bf(0x172)](_0x10f2bf(0x158)))throw new Error(_0x10f2bf(0x15b));const _0x309a4f=await _0x300a7c[_0x10f2bf(0x15d)][_0x10f2bf(0x156)]();return _0x309a4f;}),_0x5dd1c2[_0x451e0d(0x166)]['onRequest'](_0x451e0d(0x15a),async _0x22b4db=>{const _0x13e862=_0x451e0d;if(!_0x5dd1c2['getCurrentUser']()[_0x13e862(0x172)](_0x13e862(0x159))&&!_0x5dd1c2[_0x13e862(0x169)]()['hasPermission']('PURCHASE_ALL')&&!_0x5dd1c2[_0x13e862(0x169)]()[_0x13e862(0x172)](_0x13e862(0x158)))throw new Error(_0x13e862(0x15b));const _0x301bcf=await _0x300a7c[_0x13e862(0x15d)][_0x13e862(0x156)]({'where':_0x22b4db});return _0x301bcf;}),_0x5dd1c2[_0x451e0d(0x166)]['onRequest']('purchase.updated',async _0x283dea=>{const _0x42eff1=_0x451e0d;if(!_0x5dd1c2[_0x42eff1(0x169)]()['hasPermission']('ADMIN')&&!_0x5dd1c2[_0x42eff1(0x169)]()['hasPermission'](_0x42eff1(0x171))&&!_0x5dd1c2[_0x42eff1(0x169)]()[_0x42eff1(0x172)](_0x42eff1(0x16c)))throw new Error('310003:\x20Action\x20not\x20allowed.');const {where:_0xd016bf,..._0x44b6fc}=_0x283dea;return await _0x300a7c[_0x42eff1(0x15d)]['update']({'where':_0xd016bf,'data':_0x44b6fc});}),_0x5dd1c2[_0x451e0d(0x166)]['on']('purchase.deleted',async({id:_0x3aae10})=>{const _0x5ccc63=_0x451e0d;if(!_0x5dd1c2['getCurrentUser']()[_0x5ccc63(0x172)](_0x5ccc63(0x159))&&!_0x5dd1c2[_0x5ccc63(0x169)]()[_0x5ccc63(0x172)](_0x5ccc63(0x171))&&!_0x5dd1c2[_0x5ccc63(0x169)]()['hasPermission'](_0x5ccc63(0x164)))throw new Error(_0x5ccc63(0x165));await _0x300a7c[_0x5ccc63(0x15d)][_0x5ccc63(0x173)]({'where':{'id':_0x3aae10}});});}
1
+ function a19_0x3039(){const _0x588f92=['35325JvRZLo','events','2385894XFUdYi','1469060idriqV','hasPermission','purchase.read.all','purchase.read.some','6150IFHcSZ','json','/search','purchase.read','DELETE','application/json','509bkJiQO','310001:\x20Action\x20not\x20allowed.','PURCHASE_UPDATED','310003:\x20Action\x20not\x20allowed.','126kXWyBh','310004:\x20Action\x20not\x20allowed.','status','PURCHASE_READ','ADMIN','310002:\x20Action\x20not\x20allowed.','4224520dyusrN','124952nqLspZ','PURCHASE_ALL','getCurrentUser','purchase.deleted','onRequest','624789CNvbPj','purchase','POST','API\x20Error:\x20','stringify','purchase.updated','statusText','PURCHASE_CREATED','730SCwWlN'];a19_0x3039=function(){return _0x588f92;};return a19_0x3039();}function a19_0x575f(_0x162e8f,_0xa0f800){_0x162e8f=_0x162e8f-0x152;const _0x3039c8=a19_0x3039();let _0x575f79=_0x3039c8[_0x162e8f];return _0x575f79;}(function(_0x291d0c,_0x3a68fe){const _0x3a0062=a19_0x575f,_0x211644=_0x291d0c();while(!![]){try{const _0x42c012=-parseInt(_0x3a0062(0x16f))/0x1*(-parseInt(_0x3a0062(0x161))/0x2)+parseInt(_0x3a0062(0x159))/0x3+-parseInt(_0x3a0062(0x153))/0x4+-parseInt(_0x3a0062(0x165))/0x5+-parseInt(_0x3a0062(0x164))/0x6+parseInt(_0x3a0062(0x173))/0x7*(-parseInt(_0x3a0062(0x154))/0x8)+parseInt(_0x3a0062(0x162))/0x9*(parseInt(_0x3a0062(0x169))/0xa);if(_0x42c012===_0x3a68fe)break;else _0x211644['push'](_0x211644['shift']());}catch(_0x3db125){_0x211644['push'](_0x211644['shift']());}}}(a19_0x3039,0xbe3b6));const API_BASE='http://localhost:5001/purchases';export default function bindPurchaseEvents(_0x320118){const _0x1f824b=a19_0x575f;_0x320118[_0x1f824b(0x163)][_0x1f824b(0x158)]('purchase.created',async _0x1fc8ba=>{const _0x2e44e7=_0x1f824b;if(!_0x320118['getCurrentUser']()[_0x2e44e7(0x166)](_0x2e44e7(0x177))&&!_0x320118[_0x2e44e7(0x156)]()[_0x2e44e7(0x166)](_0x2e44e7(0x155))&&!_0x320118[_0x2e44e7(0x156)]()['hasPermission'](_0x2e44e7(0x160)))throw new Error(_0x2e44e7(0x170));const _0x1a5302=await fetch(''+API_BASE,{'method':_0x2e44e7(0x15b),'headers':{'Content-Type':_0x2e44e7(0x16e)},'body':JSON[_0x2e44e7(0x15d)](_0x1fc8ba[_0x2e44e7(0x15a)])});if(!_0x1a5302['ok'])throw new Error('API\x20Error:\x20'+_0x1a5302[_0x2e44e7(0x15f)]);const _0x55f08f=await _0x1a5302[_0x2e44e7(0x16a)]();return _0x55f08f['id'];}),_0x320118[_0x1f824b(0x163)]['onRequest'](_0x1f824b(0x16c),async({id:_0x1179a6})=>{const _0x3c81e2=_0x1f824b;if(!_0x320118[_0x3c81e2(0x156)]()['hasPermission'](_0x3c81e2(0x177))&&!_0x320118[_0x3c81e2(0x156)]()[_0x3c81e2(0x166)]('PURCHASE_ALL')&&!_0x320118['getCurrentUser']()[_0x3c81e2(0x166)](_0x3c81e2(0x176)))throw new Error(_0x3c81e2(0x152));const _0x456733=await fetch(API_BASE+'/'+_0x1179a6);if(!_0x456733['ok'])throw new Error('API\x20Error:\x20'+_0x456733[_0x3c81e2(0x15f)]);return await _0x456733['json']();}),_0x320118[_0x1f824b(0x163)][_0x1f824b(0x158)](_0x1f824b(0x167),async()=>{const _0x327f32=_0x1f824b;if(!_0x320118[_0x327f32(0x156)]()[_0x327f32(0x166)](_0x327f32(0x177))&&!_0x320118[_0x327f32(0x156)]()[_0x327f32(0x166)](_0x327f32(0x155))&&!_0x320118['getCurrentUser']()[_0x327f32(0x166)](_0x327f32(0x176)))throw new Error(_0x327f32(0x152));const _0x2242e5=await fetch(''+API_BASE);if(!_0x2242e5['ok'])throw new Error('API\x20Error:\x20'+_0x2242e5[_0x327f32(0x15f)]);return await _0x2242e5['json']();}),_0x320118[_0x1f824b(0x163)][_0x1f824b(0x158)](_0x1f824b(0x168),async _0x3d91eb=>{const _0x307d98=_0x1f824b;if(!_0x320118['getCurrentUser']()[_0x307d98(0x166)](_0x307d98(0x177))&&!_0x320118[_0x307d98(0x156)]()[_0x307d98(0x166)]('PURCHASE_ALL')&&!_0x320118[_0x307d98(0x156)]()['hasPermission'](_0x307d98(0x176)))throw new Error(_0x307d98(0x152));const _0x2d2557=await fetch(API_BASE+_0x307d98(0x16b),{'method':'POST','headers':{'Content-Type':_0x307d98(0x16e)},'body':JSON[_0x307d98(0x15d)](_0x3d91eb)});if(!_0x2d2557['ok'])throw new Error('API\x20Error:\x20'+_0x2d2557[_0x307d98(0x15f)]);return await _0x2d2557[_0x307d98(0x16a)]();}),_0x320118['events'][_0x1f824b(0x158)](_0x1f824b(0x15e),async _0x1e17a6=>{const _0x3cf2fb=_0x1f824b;if(!_0x320118[_0x3cf2fb(0x156)]()['hasPermission']('ADMIN')&&!_0x320118[_0x3cf2fb(0x156)]()[_0x3cf2fb(0x166)]('PURCHASE_ALL')&&!_0x320118[_0x3cf2fb(0x156)]()[_0x3cf2fb(0x166)](_0x3cf2fb(0x171)))throw new Error(_0x3cf2fb(0x172));const {where:_0x2448ca,..._0x4d94df}=_0x1e17a6,_0x4bbb45=await fetch(API_BASE+'/'+_0x2448ca['id'],{'method':'PUT','headers':{'Content-Type':'application/json'},'body':JSON['stringify'](_0x4d94df)});if(!_0x4bbb45['ok'])throw new Error(_0x3cf2fb(0x15c)+_0x4bbb45[_0x3cf2fb(0x15f)]);return await _0x4bbb45[_0x3cf2fb(0x16a)]();}),_0x320118[_0x1f824b(0x163)]['on'](_0x1f824b(0x157),async({id:_0x1fa2d6})=>{const _0x1778ee=_0x1f824b;if(!_0x320118['getCurrentUser']()['hasPermission'](_0x1778ee(0x177))&&!_0x320118[_0x1778ee(0x156)]()[_0x1778ee(0x166)](_0x1778ee(0x155))&&!_0x320118[_0x1778ee(0x156)]()['hasPermission']('PURCHASE_DELETED'))throw new Error(_0x1778ee(0x174));const _0x418957=await fetch(API_BASE+'/'+_0x1fa2d6,{'method':_0x1778ee(0x16d)});if(!_0x418957['ok']&&_0x418957[_0x1778ee(0x175)]!==0xcc)throw new Error(_0x1778ee(0x15c)+_0x418957['statusText']);});}
@@ -1,3 +1,2 @@
1
- import { PrismaClient } from "@prisma/client";
2
1
  import { OWLClient } from "../../owl/OWLClient.js";
3
- export default function bindReceptionEvents(owl: OWLClient, prisma: PrismaClient): void;
2
+ export default function bindReceptionEvents(owl: OWLClient): void;
@@ -1 +1 @@
1
- function a9_0x4a08(){const _0x1c85b7=['onRequest','reception.created','624991KeSHTF','reception','delete','hasPermission','RECEPTION_READ','findMany','reception.read.all','10bmrmZc','11648560zVRvRk','2293192fGAgXx','30876VQsaoW','7127197LvPAaS','reception.read.some','3647052DMsyiY','ADMIN','320004:\x20Action\x20not\x20allowed.','RECEPTION_ALL','events','RECEPTION_CREATED','getCurrentUser','reception.read','RECEPTION_DELETED','320003:\x20Action\x20not\x20allowed.','findUnique','update','36318020ghMZax','327MdvBWM','320002:\x20Action\x20not\x20allowed.','9VfSodK','reception.deleted'];a9_0x4a08=function(){return _0x1c85b7;};return a9_0x4a08();}(function(_0x15674d,_0x212da9){const _0x148aca=a9_0x44ec,_0xe1ded=_0x15674d();while(!![]){try{const _0x22f8b0=parseInt(_0x148aca(0x1aa))/0x1+parseInt(_0x148aca(0x193))/0x2+-parseInt(_0x148aca(0x1a4))/0x3*(parseInt(_0x148aca(0x194))/0x4)+parseInt(_0x148aca(0x191))/0x5*(-parseInt(_0x148aca(0x197))/0x6)+-parseInt(_0x148aca(0x195))/0x7+-parseInt(_0x148aca(0x192))/0x8+-parseInt(_0x148aca(0x1a6))/0x9*(-parseInt(_0x148aca(0x1a3))/0xa);if(_0x22f8b0===_0x212da9)break;else _0xe1ded['push'](_0xe1ded['shift']());}catch(_0x35d3bd){_0xe1ded['push'](_0xe1ded['shift']());}}}(a9_0x4a08,0xd4e9d));function a9_0x44ec(_0x31c4d9,_0x1a5370){_0x31c4d9=_0x31c4d9-0x18d;const _0x4a08d5=a9_0x4a08();let _0x44ec65=_0x4a08d5[_0x31c4d9];return _0x44ec65;}export default function bindReceptionEvents(_0x1054af,_0x1f1023){const _0x4eaf57=a9_0x44ec;_0x1054af[_0x4eaf57(0x19b)][_0x4eaf57(0x1a8)](_0x4eaf57(0x1a9),async _0x43d140=>{const _0xd6b935=_0x4eaf57;if(!_0x1054af[_0xd6b935(0x19d)]()[_0xd6b935(0x18d)](_0xd6b935(0x198))&&!_0x1054af['getCurrentUser']()['hasPermission']('RECEPTION_ALL')&&!_0x1054af[_0xd6b935(0x19d)]()[_0xd6b935(0x18d)](_0xd6b935(0x19c)))throw new Error('320001:\x20Action\x20not\x20allowed.');const {items:_0x315a56,purchase:_0x3595af,..._0x237284}=_0x43d140[_0xd6b935(0x1ab)],_0xe7abb8=await _0x1f1023[_0xd6b935(0x1ab)]['create']({'data':{..._0x237284,..._0x3595af?{'Purchase':{'create':{..._0x3595af}}}:{},'Items':{'create':_0x315a56['map'](_0x424ff5=>({'item':{'create':{..._0x424ff5}}}))}},'include':{'items':{'include':{'item':!![]}},'purchase':!![]}});return _0xe7abb8['id'];}),_0x1054af[_0x4eaf57(0x19b)][_0x4eaf57(0x1a8)](_0x4eaf57(0x19e),async({id:_0x2661b2})=>{const _0x49adfb=_0x4eaf57;if(!_0x1054af[_0x49adfb(0x19d)]()[_0x49adfb(0x18d)](_0x49adfb(0x198))&&!_0x1054af['getCurrentUser']()[_0x49adfb(0x18d)](_0x49adfb(0x19a))&&!_0x1054af[_0x49adfb(0x19d)]()[_0x49adfb(0x18d)]('RECEPTION_READ'))throw new Error(_0x49adfb(0x1a5));const _0x497cbb=await _0x1f1023['reception'][_0x49adfb(0x1a1)]({'where':{'id':_0x2661b2}});return _0x497cbb;}),_0x1054af[_0x4eaf57(0x19b)][_0x4eaf57(0x1a8)](_0x4eaf57(0x190),async()=>{const _0x1662c5=_0x4eaf57;if(!_0x1054af[_0x1662c5(0x19d)]()[_0x1662c5(0x18d)](_0x1662c5(0x198))&&!_0x1054af['getCurrentUser']()[_0x1662c5(0x18d)](_0x1662c5(0x19a))&&!_0x1054af[_0x1662c5(0x19d)]()[_0x1662c5(0x18d)](_0x1662c5(0x18e)))throw new Error('320002:\x20Action\x20not\x20allowed.');const _0x27b12d=await _0x1f1023[_0x1662c5(0x1ab)][_0x1662c5(0x18f)]();return _0x27b12d;}),_0x1054af[_0x4eaf57(0x19b)][_0x4eaf57(0x1a8)](_0x4eaf57(0x196),async _0x401b7f=>{const _0x492bad=_0x4eaf57;if(!_0x1054af[_0x492bad(0x19d)]()['hasPermission'](_0x492bad(0x198))&&!_0x1054af[_0x492bad(0x19d)]()[_0x492bad(0x18d)](_0x492bad(0x19a))&&!_0x1054af[_0x492bad(0x19d)]()[_0x492bad(0x18d)](_0x492bad(0x18e)))throw new Error(_0x492bad(0x1a5));const _0x2db9e4=await _0x1f1023[_0x492bad(0x1ab)][_0x492bad(0x18f)]({'where':_0x401b7f});return _0x2db9e4;}),_0x1054af[_0x4eaf57(0x19b)][_0x4eaf57(0x1a8)]('reception.updated',async _0x43608e=>{const _0xa42531=_0x4eaf57;if(!_0x1054af[_0xa42531(0x19d)]()['hasPermission'](_0xa42531(0x198))&&!_0x1054af[_0xa42531(0x19d)]()['hasPermission'](_0xa42531(0x19a))&&!_0x1054af[_0xa42531(0x19d)]()[_0xa42531(0x18d)]('RECEPTION_UPDATED'))throw new Error(_0xa42531(0x1a0));const {where:_0x3a4741,..._0xa18491}=_0x43608e;return await _0x1f1023[_0xa42531(0x1ab)][_0xa42531(0x1a2)]({'where':_0x3a4741,'data':_0xa18491});}),_0x1054af[_0x4eaf57(0x19b)]['on'](_0x4eaf57(0x1a7),async({id:_0x36dab1})=>{const _0xa1a7f0=_0x4eaf57;if(!_0x1054af[_0xa1a7f0(0x19d)]()[_0xa1a7f0(0x18d)]('ADMIN')&&!_0x1054af['getCurrentUser']()[_0xa1a7f0(0x18d)](_0xa1a7f0(0x19a))&&!_0x1054af[_0xa1a7f0(0x19d)]()['hasPermission'](_0xa1a7f0(0x19f)))throw new Error(_0xa1a7f0(0x199));await _0x1f1023[_0xa1a7f0(0x1ab)][_0xa1a7f0(0x1ac)]({'where':{'id':_0x36dab1}});});}
1
+ function a20_0x22ac(_0x3c3879,_0x59805c){_0x3c3879=_0x3c3879-0x97;const _0x31a72d=a20_0x31a7();let _0x22ac8d=_0x31a72d[_0x3c3879];return _0x22ac8d;}function a20_0x31a7(){const _0x539e39=['ADMIN','stringify','320001:\x20Action\x20not\x20allowed.','reception','RECEPTION_READ','application/json','RECEPTION_UPDATED','POST','DELETE','RECEPTION_ALL','516VBSyQR','12514FCoSEU','statusText','API\x20Error:\x20','reception.created','173ogSEWn','onRequest','101535DJCoQc','63485WwBDNf','1274058QUwTmX','json','320004:\x20Action\x20not\x20allowed.','events','reception.updated','reception.read.some','6106950XrzqZw','RECEPTION_DELETED','PUT','320002:\x20Action\x20not\x20allowed.','hasPermission','320003:\x20Action\x20not\x20allowed.','2808084bCNhnT','6759JlDoxT','status','getCurrentUser','5336UrPmvs'];a20_0x31a7=function(){return _0x539e39;};return a20_0x31a7();}(function(_0x24b0f5,_0x2c7a7d){const _0x110bf8=a20_0x22ac,_0x2574fc=_0x24b0f5();while(!![]){try{const _0x19d7a8=parseInt(_0x110bf8(0xae))/0x1*(parseInt(_0x110bf8(0xaa))/0x2)+parseInt(_0x110bf8(0xb2))/0x3+-parseInt(_0x110bf8(0x9a))/0x4+-parseInt(_0x110bf8(0xb1))/0x5*(parseInt(_0x110bf8(0xa9))/0x6)+parseInt(_0x110bf8(0xb0))/0x7+-parseInt(_0x110bf8(0x9e))/0x8*(-parseInt(_0x110bf8(0x9b))/0x9)+parseInt(_0x110bf8(0xb8))/0xa;if(_0x19d7a8===_0x2c7a7d)break;else _0x2574fc['push'](_0x2574fc['shift']());}catch(_0x1c7571){_0x2574fc['push'](_0x2574fc['shift']());}}}(a20_0x31a7,0xcce85));const API_BASE='http://localhost:5001/receptions';export default function bindReceptionEvents(_0x126f2f){const _0x5f4aad=a20_0x22ac;_0x126f2f[_0x5f4aad(0xb5)][_0x5f4aad(0xaf)](_0x5f4aad(0xad),async _0x4b4853=>{const _0x512360=_0x5f4aad;if(!_0x126f2f['getCurrentUser']()[_0x512360(0x98)]('ADMIN')&&!_0x126f2f[_0x512360(0x9d)]()[_0x512360(0x98)]('RECEPTION_ALL')&&!_0x126f2f['getCurrentUser']()[_0x512360(0x98)]('RECEPTION_CREATED'))throw new Error(_0x512360(0xa1));const _0x50106b=await fetch(''+API_BASE,{'method':_0x512360(0xa6),'headers':{'Content-Type':_0x512360(0xa4)},'body':JSON[_0x512360(0xa0)](_0x4b4853[_0x512360(0xa2)])});if(!_0x50106b['ok'])throw new Error('API\x20Error:\x20'+_0x50106b[_0x512360(0xab)]);const _0x4be42a=await _0x50106b['json']();return _0x4be42a['id'];}),_0x126f2f['events'][_0x5f4aad(0xaf)]('reception.read',async({id:_0x131f90})=>{const _0x524b09=_0x5f4aad;if(!_0x126f2f['getCurrentUser']()[_0x524b09(0x98)](_0x524b09(0x9f))&&!_0x126f2f[_0x524b09(0x9d)]()[_0x524b09(0x98)](_0x524b09(0xa8))&&!_0x126f2f[_0x524b09(0x9d)]()['hasPermission'](_0x524b09(0xa3)))throw new Error(_0x524b09(0x97));const _0xa5be10=await fetch(API_BASE+'/'+_0x131f90);if(!_0xa5be10['ok'])throw new Error(_0x524b09(0xac)+_0xa5be10[_0x524b09(0xab)]);return await _0xa5be10['json']();}),_0x126f2f['events'][_0x5f4aad(0xaf)]('reception.read.all',async()=>{const _0x1eb995=_0x5f4aad;if(!_0x126f2f['getCurrentUser']()[_0x1eb995(0x98)](_0x1eb995(0x9f))&&!_0x126f2f[_0x1eb995(0x9d)]()['hasPermission'](_0x1eb995(0xa8))&&!_0x126f2f['getCurrentUser']()[_0x1eb995(0x98)](_0x1eb995(0xa3)))throw new Error(_0x1eb995(0x97));const _0x5eb54b=await fetch(''+API_BASE);if(!_0x5eb54b['ok'])throw new Error('API\x20Error:\x20'+_0x5eb54b[_0x1eb995(0xab)]);return await _0x5eb54b[_0x1eb995(0xb3)]();}),_0x126f2f['events'][_0x5f4aad(0xaf)](_0x5f4aad(0xb7),async _0x3b9dd5=>{const _0xc4d6c9=_0x5f4aad;if(!_0x126f2f['getCurrentUser']()[_0xc4d6c9(0x98)](_0xc4d6c9(0x9f))&&!_0x126f2f[_0xc4d6c9(0x9d)]()[_0xc4d6c9(0x98)](_0xc4d6c9(0xa8))&&!_0x126f2f[_0xc4d6c9(0x9d)]()[_0xc4d6c9(0x98)](_0xc4d6c9(0xa3)))throw new Error(_0xc4d6c9(0x97));const _0x159497=await fetch(API_BASE+'/search',{'method':_0xc4d6c9(0xa6),'headers':{'Content-Type':_0xc4d6c9(0xa4)},'body':JSON['stringify'](_0x3b9dd5)});if(!_0x159497['ok'])throw new Error('API\x20Error:\x20'+_0x159497[_0xc4d6c9(0xab)]);return await _0x159497[_0xc4d6c9(0xb3)]();}),_0x126f2f[_0x5f4aad(0xb5)][_0x5f4aad(0xaf)](_0x5f4aad(0xb6),async _0xeb7d25=>{const _0x507141=_0x5f4aad;if(!_0x126f2f['getCurrentUser']()[_0x507141(0x98)](_0x507141(0x9f))&&!_0x126f2f[_0x507141(0x9d)]()[_0x507141(0x98)](_0x507141(0xa8))&&!_0x126f2f[_0x507141(0x9d)]()['hasPermission'](_0x507141(0xa5)))throw new Error(_0x507141(0x99));const {where:_0xe58c2c,..._0x3fa428}=_0xeb7d25,_0x558701=await fetch(API_BASE+'/'+_0xe58c2c['id'],{'method':_0x507141(0xba),'headers':{'Content-Type':_0x507141(0xa4)},'body':JSON['stringify'](_0x3fa428)});if(!_0x558701['ok'])throw new Error(_0x507141(0xac)+_0x558701[_0x507141(0xab)]);return await _0x558701[_0x507141(0xb3)]();}),_0x126f2f[_0x5f4aad(0xb5)]['on']('reception.deleted',async({id:_0x581429})=>{const _0x5cb238=_0x5f4aad;if(!_0x126f2f[_0x5cb238(0x9d)]()[_0x5cb238(0x98)](_0x5cb238(0x9f))&&!_0x126f2f[_0x5cb238(0x9d)]()[_0x5cb238(0x98)](_0x5cb238(0xa8))&&!_0x126f2f[_0x5cb238(0x9d)]()[_0x5cb238(0x98)](_0x5cb238(0xb9)))throw new Error(_0x5cb238(0xb4));const _0x54596c=await fetch(API_BASE+'/'+_0x581429,{'method':_0x5cb238(0xa7)});if(!_0x54596c['ok']&&_0x54596c[_0x5cb238(0x9c)]!==0xcc)throw new Error(_0x5cb238(0xac)+_0x54596c[_0x5cb238(0xab)]);});}
@@ -1,3 +1,2 @@
1
- import { PrismaClient } from "@prisma/client";
2
1
  import { OWLClient } from "../../owl/OWLClient.js";
3
- export default function bindStockEvents(owl: OWLClient, prisma: PrismaClient): void;
2
+ export default function bindStockEvents(owl: OWLClient): void;