@gamastudio/sendwave-provider 0.0.14 → 0.0.16
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.
- package/build/constants/html/home.d.ts +1 -1
- package/build/constants/html/home.js +0 -1
- package/build/core/interface/index.d.ts +3 -3
- package/build/core/interface/provider.interface.d.ts +2 -2
- package/build/index.d.ts +4 -3
- package/build/index.js +15 -0
- package/build/package.json +4 -4
- package/build/provider/core.d.ts +0 -2
- package/build/provider/core.js +5 -15
- package/build/provider/provider.d.ts +13 -14
- package/build/provider/provider.js +73 -78
- package/build/provider/sender.js +12 -4
- package/build/utils/queueFlow.js +3 -2
- package/package.json +4 -4
- package/build/constants/html/connect.d.ts +0 -1
- package/build/constants/html/connect.js +0 -37
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const htmlHome = "\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n <meta charset=\"UTF-8\" />\n <title>Sendwave Bot</title>\n \n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <script src=\"https://cdn.tailwindcss.com\"></script>\n</head>\n<body class=\"bg-white text-slate-800 flex items-center justify-center h-screen relative overflow-hidden\">\n\n <div class=\"text-center bg-white/20 backdrop-blur-sm p-8 rounded-2xl z-10 shadow-lg max-w-md w-full flex flex-col items-center z-10\">\n <h1 class=\"text-3xl font-bold text-cyan-700 mb-4 flex items-center justify-center gap-2 \"><svg width=\"32\" height=\"32\" viewBox=\"0 0 80 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_649_78)\"><circle cx=\"40\" cy=\"40\" r=\"40\" fill=\"url(#paint0_linear_649_78)\"></circle><circle cx=\"40\" cy=\"40\" r=\"32\" fill=\"white\"></circle><path d=\"M8.32007 44.16C9.20007 28 44.6401 14.7999 45.6801 32.9599C42.9601 36.0799 40.2667 28.8246 34.8001 31.2799C21.2692 37.3573 40.5601 65.52 66.2401 58.3999C46.8001 85.1999 11.1201 70.32 8.32007 44.16Z\" fill=\"url(#paint1_linear_649_78)\"></path><path d=\"M16.9602 48.5601L10.1602 51.8401C16.9429 70.014 38.3202 78.0001 54.1602 69.2001C36.1602 68.8801 20.9602 61.0401 16.9602 48.5601Z\" fill=\"#1E52CD\"></path><path d=\"M27.5201 15.92C17.52 18 2.40007 34.4 10.1601 51.84L16.9601 48.56C7.60006 19.76 49.2079 23.76 44.182 31.8014C43.782 32.4414 42.742 31.8014 41.382 31.8014C37.9571 31.8014 39.6119 38.1895 45.702 38.6013C61.062 38.6013 53.5997 10.4953 27.5201 15.92Z\" fill=\"#019DF9\"></path><path d=\"M51.28 23.6479C44.08 11.2694 18.48 10.56 10.24 31.84C17.92 17.92 52 10.72 52 36C54.4 33.12 54.8 28.96 51.28 23.6479Z\" fill=\"url(#paint2_linear_649_78)\"></path><path d=\"M68.56 54.4801C69.0879 53.4766 69.382 52.7921 69.92 51.3601L63.04 49.5129C53.3714 42.098 44.9762 42.1171 37.76 47.5129C41.36 54.8801 56 61.1201 68.56 54.4801Z\" fill=\"url(#paint3_linear_649_78)\"></path><path d=\"M71.12 47.36C54.0422 46.2732 46.9167 47.3149 40 50.64C43.1238 53.6518 46.16 55.2001 51.36 56.615C56.1255 54.3514 60.0087 53.2658 69.92 51.36C70.516 49.9742 70.7842 49.1058 71.12 47.36Z\" fill=\"url(#paint4_linear_649_78)\"></path></g><defs><linearGradient id=\"paint0_linear_649_78\" x1=\"40\" y1=\"0\" x2=\"40\" y2=\"80\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#019DF9\"></stop><stop offset=\"1\" stop-color=\"#12298B\"></stop></linearGradient><linearGradient id=\"paint1_linear_649_78\" x1=\"20.7201\" y1=\"23.9199\" x2=\"52.1601\" y2=\"70.9599\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0.00661977\" stop-color=\"#012A6B\"></stop><stop offset=\"1\" stop-color=\"#1E52CD\"></stop></linearGradient><linearGradient id=\"paint2_linear_649_78\" x1=\"51.68\" y1=\"23.5679\" x2=\"9.91999\" y2=\"29.6479\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#B7E8FF\"></stop><stop offset=\"0.526042\" stop-color=\"#97DEFF\"></stop><stop offset=\"1\" stop-color=\"#32B3FC\"></stop></linearGradient><linearGradient id=\"paint3_linear_649_78\" x1=\"40.32\" y1=\"44.8801\" x2=\"71.68\" y2=\"55.8401\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#12298B\"></stop><stop offset=\"1\" stop-color=\"#008CDC\"></stop></linearGradient><linearGradient id=\"paint4_linear_649_78\" x1=\"55.48\" y1=\"47.335\" x2=\"55.48\" y2=\"56.615\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#019DF9\"></stop><stop offset=\"1\" stop-color=\"#34B5FF\"></stop></linearGradient><clipPath id=\"clip0_649_78\"><rect width=\"80\" height=\"80\" fill=\"white\"></rect></clipPath></defs></svg> Sendwave Provider activo</h1>\n <p class=\"text-slate-500 text-lg\">Tu instancia est\u00E1 corriendo correctamente.</p>\n </div>\n\n <!-- Olas decorativas -->\n <div class=\"absolute bottom-0 left-0 w-full\">\n <svg width=\"100%\" height=\"100%\" id=\"svg\" viewBox=\"0 0 1440 390\" xmlns=\"http://www.w3.org/2000/svg\" class=\"transition duration-300 ease-in-out delay-150\"><style>\n .path-0{\n animation:pathAnim-0 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-0{\n 0%{\n d: path(\"M 0,400 L 0,60 C 71.35843151693669,59.23030191458027 142.71686303387338,58.460603829160526 206,60 C 269.2831369661266,61.539396170839474 324.49097938144325,65.38788659793815 375,61 C 425.50902061855675,56.61211340206185 471.31921944035344,43.987849779086886 537,36 C 602.6807805596466,28.012150220913114 688.232142857143,24.660714285714292 751,32 C 813.767857142857,39.33928571428571 853.7522091310749,57.36929307805596 898,62 C 942.2477908689251,66.63070692194404 990.7590206185569,57.86211340206186 1055,56 C 1119.2409793814431,54.13788659793814 1199.211708394698,59.18225331369662 1266,61 C 1332.788291605302,62.81774668630338 1386.394145802651,61.40887334315169 1440,60 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,60 C 62.18096465390279,54.449189985272454 124.36192930780558,48.898379970544916 187,56 C 249.63807069219442,63.101620029455084 312.73324742268045,82.85567010309279 366,88 C 419.26675257731955,93.14432989690721 462.70508100147276,83.67893961708396 523,76 C 583.2949189985272,68.32106038291604 660.4464285714287,62.428571428571416 723,51 C 785.5535714285713,39.571428571428584 833.509204712813,22.606774668630344 885,32 C 936.490795287187,41.393225331369656 991.5167525773193,77.1443298969072 1056,78 C 1120.4832474226807,78.8556701030928 1194.423784977909,44.8159057437408 1260,36 C 1325.576215022091,27.184094256259204 1382.7881075110454,43.5920471281296 1440,60 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,60 C 79.00460235640648,54.72717231222386 158.00920471281296,49.45434462444772 207,52 C 255.99079528718704,54.54565537555228 274.96778350515467,64.90979381443299 336,68 C 397.03221649484533,71.09020618556701 500.1196612665685,66.90648011782032 561,63 C 621.8803387334315,59.09351988217968 640.5535714285716,55.46428571428572 693,49 C 745.4464285714284,42.53571428571428 831.6660530191457,33.236377025036816 908,30 C 984.3339469808543,26.763622974963184 1050.7822164948454,29.590206185567013 1100,35 C 1149.2177835051546,40.40979381443299 1181.2050810014728,48.40279823269515 1235,53 C 1288.7949189985272,57.59720176730485 1364.3974594992637,58.798600883652426 1440,60 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,60 C 68.61487481590575,59.48784977908689 137.2297496318115,58.97569955817379 200,66 C 262.7702503681885,73.02430044182621 319.69587628865975,87.58505154639175 370,86 C 420.30412371134025,84.41494845360825 463.9867452135493,66.6840942562592 528,54 C 592.0132547864507,41.3159057437408 676.357142857143,33.67857142857143 746,43 C 815.642857142857,52.32142857142857 870.584683357879,78.60162002945508 921,81 C 971.415316642121,83.39837997054492 1017.3041237113403,61.914948453608254 1075,54 C 1132.6958762886597,46.085051546391746 1202.19882179676,51.738586156111936 1265,55 C 1327.80117820324,58.261413843888064 1383.90058910162,59.13070692194403 1440,60 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,60 C 71.35843151693669,59.23030191458027 142.71686303387338,58.460603829160526 206,60 C 269.2831369661266,61.539396170839474 324.49097938144325,65.38788659793815 375,61 C 425.50902061855675,56.61211340206185 471.31921944035344,43.987849779086886 537,36 C 602.6807805596466,28.012150220913114 688.232142857143,24.660714285714292 751,32 C 813.767857142857,39.33928571428571 853.7522091310749,57.36929307805596 898,62 C 942.2477908689251,66.63070692194404 990.7590206185569,57.86211340206186 1055,56 C 1119.2409793814431,54.13788659793814 1199.211708394698,59.18225331369662 1266,61 C 1332.788291605302,62.81774668630338 1386.394145802651,61.40887334315169 1440,60 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,60 C 71.35843151693669,59.23030191458027 142.71686303387338,58.460603829160526 206,60 C 269.2831369661266,61.539396170839474 324.49097938144325,65.38788659793815 375,61 C 425.50902061855675,56.61211340206185 471.31921944035344,43.987849779086886 537,36 C 602.6807805596466,28.012150220913114 688.232142857143,24.660714285714292 751,32 C 813.767857142857,39.33928571428571 853.7522091310749,57.36929307805596 898,62 C 942.2477908689251,66.63070692194404 990.7590206185569,57.86211340206186 1055,56 C 1119.2409793814431,54.13788659793814 1199.211708394698,59.18225331369662 1266,61 C 1332.788291605302,62.81774668630338 1386.394145802651,61.40887334315169 1440,60 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"0.265\" class=\"transition-all duration-300 ease-in-out delay-150 path-0\"></path><style>\n .path-1{\n animation:pathAnim-1 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-1{\n 0%{\n d: path(\"M 0,400 L 0,140 C 44.29988954344624,122.8668998527246 88.59977908689248,105.7337997054492 153,113 C 217.40022091310752,120.2662002945508 301.9007731958763,151.93170103092783 368,153 C 434.0992268041237,154.06829896907217 481.79712812960247,124.53939617083947 534,127 C 586.2028718703975,129.46060382916053 642.9107142857142,163.91071428571428 701,160 C 759.0892857142858,156.08928571428572 818.5600147275406,113.81774668630338 881,115 C 943.4399852724594,116.18225331369662 1008.8492268041236,160.81829896907217 1068,166 C 1127.1507731958764,171.18170103092783 1180.0430780559648,136.90905743740797 1241,126 C 1301.9569219440352,115.09094256259205 1370.9784609720177,127.54547128129602 1440,140 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,140 C 44.95968335787923,123.41991899852724 89.91936671575846,106.83983799705449 146,111 C 202.08063328424154,115.16016200294551 269.2822164948454,140.06056701030928 345,154 C 420.7177835051546,167.93943298969072 504.95176730486,170.9178939617084 562,167 C 619.04823269514,163.0821060382916 648.9107142857143,152.26785714285714 705,145 C 761.0892857142857,137.73214285714286 843.4053755522827,134.01067746686306 906,142 C 968.5946244477173,149.98932253313694 1011.4677835051546,169.68943298969072 1061,167 C 1110.5322164948454,164.31056701030928 1166.7234904270988,139.23159057437408 1231,131 C 1295.2765095729012,122.76840942562592 1367.6382547864505,131.38420471281296 1440,140 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,140 C 61.1502209131075,134.90150957290132 122.300441826215,129.80301914580264 175,123 C 227.699558173785,116.19698085419735 271.9484536082475,107.68943298969072 342,112 C 412.0515463917525,116.31056701030928 507.9057437407952,133.43924889543447 571,136 C 634.0942562592048,138.56075110456553 664.4285714285716,126.5535714285714 719,124 C 773.5714285714284,121.4464285714286 852.3799705449188,128.34646539027986 916,134 C 979.6200294550812,139.65353460972014 1028.0515463917527,144.06056701030928 1088,142 C 1147.9484536082473,139.93943298969072 1219.4138438880707,131.41126656848306 1280,130 C 1340.5861561119293,128.58873343151694 1390.2930780559645,134.29436671575849 1440,140 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,140 C 55.14764359351989,147.99815905743742 110.29528718703978,155.9963181148748 175,159 C 239.70471281296022,162.0036818851252 313.96649484536084,160.01288659793815 372,153 C 430.03350515463916,145.98711340206185 471.83873343151686,133.9521354933726 535,133 C 598.1612665684831,132.0478645066274 682.6785714285713,142.17857142857144 737,137 C 791.3214285714287,131.82142857142856 815.4469808541976,111.33357879234168 869,116 C 922.5530191458024,120.66642120765832 1005.533505154639,150.48711340206185 1076,154 C 1146.466494845361,157.51288659793815 1204.4189985272462,134.71796759941088 1263,128 C 1321.5810014727538,121.2820324005891 1380.790500736377,130.64101620029456 1440,140 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,140 C 44.29988954344624,122.8668998527246 88.59977908689248,105.7337997054492 153,113 C 217.40022091310752,120.2662002945508 301.9007731958763,151.93170103092783 368,153 C 434.0992268041237,154.06829896907217 481.79712812960247,124.53939617083947 534,127 C 586.2028718703975,129.46060382916053 642.9107142857142,163.91071428571428 701,160 C 759.0892857142858,156.08928571428572 818.5600147275406,113.81774668630338 881,115 C 943.4399852724594,116.18225331369662 1008.8492268041236,160.81829896907217 1068,166 C 1127.1507731958764,171.18170103092783 1180.0430780559648,136.90905743740797 1241,126 C 1301.9569219440352,115.09094256259205 1370.9784609720177,127.54547128129602 1440,140 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,140 C 44.29988954344624,122.8668998527246 88.59977908689248,105.7337997054492 153,113 C 217.40022091310752,120.2662002945508 301.9007731958763,151.93170103092783 368,153 C 434.0992268041237,154.06829896907217 481.79712812960247,124.53939617083947 534,127 C 586.2028718703975,129.46060382916053 642.9107142857142,163.91071428571428 701,160 C 759.0892857142858,156.08928571428572 818.5600147275406,113.81774668630338 881,115 C 943.4399852724594,116.18225331369662 1008.8492268041236,160.81829896907217 1068,166 C 1127.1507731958764,171.18170103092783 1180.0430780559648,136.90905743740797 1241,126 C 1301.9569219440352,115.09094256259205 1370.9784609720177,127.54547128129602 1440,140 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"0.4\" class=\"transition-all duration-300 ease-in-out delay-150 path-1\"></path><style>\n .path-2{\n animation:pathAnim-2 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-2{\n 0%{\n d: path(\"M 0,400 L 0,220 C 72.70416053019147,222.98030191458025 145.40832106038295,225.96060382916053 207,231 C 268.59167893961705,236.03939617083947 319.0708762886598,243.13788659793815 364,244 C 408.9291237113402,244.86211340206185 448.30817378497795,239.48784977908693 507,239 C 565.691826215022,238.51215022091307 643.6964285714286,242.91071428571425 707,238 C 770.3035714285714,233.08928571428575 818.9061119293077,218.869293078056 872,209 C 925.0938880706923,199.130706921944 982.6791237113403,193.61211340206185 1049,191 C 1115.3208762886597,188.38788659793815 1190.3773932253314,188.6822533136966 1257,194 C 1323.6226067746686,199.3177466863034 1381.8113033873342,209.6588733431517 1440,220 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,220 C 65.79270986745213,211.94164212076583 131.58541973490426,203.88328424153164 191,206 C 250.41458026509574,208.11671575846836 303.451030927835,220.40850515463922 363,220 C 422.548969072165,219.59149484536078 488.6104565537555,206.4826951399116 557,205 C 625.3895434462445,203.5173048600884 696.1071428571429,213.66071428571428 751,216 C 805.8928571428571,218.33928571428572 844.9609720176732,212.87444771723125 907,205 C 969.0390279823268,197.12555228276875 1054.048969072165,186.8414948453608 1108,198 C 1161.951030927835,209.1585051546392 1184.8431516936673,241.7595729013255 1235,249 C 1285.1568483063327,256.2404270986745 1362.5784241531665,238.12021354933725 1440,220 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,220 C 71.7255154639175,216.840206185567 143.451030927835,213.68041237113403 211,215 C 278.548969072165,216.31958762886597 341.92139175257734,222.11855670103088 391,218 C 440.07860824742266,213.88144329896912 474.8634020618556,199.84536082474227 533,206 C 591.1365979381444,212.15463917525773 672.625,238.5 726,243 C 779.375,247.5 804.6365979381443,230.15463917525773 870,219 C 935.3634020618557,207.84536082474227 1040.8286082474226,202.8814432989691 1105,203 C 1169.1713917525774,203.1185567010309 1192.048969072165,208.319587628866 1241,212 C 1289.951030927835,215.680412371134 1364.9755154639174,217.840206185567 1440,220 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,220 C 65.31940353460973,231.92765095729013 130.63880706921947,243.85530191458025 195,244 C 259.36119293078053,244.14469808541975 322.7641752577319,232.5064432989691 381,221 C 439.2358247422681,209.4935567010309 492.3044918998528,198.11892488954345 547,198 C 601.6955081001472,197.88107511045655 658.0178571428572,209.01785714285714 707,209 C 755.9821428571428,208.98214285714286 797.6240795287188,197.809646539028 867,201 C 936.3759204712812,204.190353460972 1033.4858247422678,221.7435567010309 1103,221 C 1172.5141752577322,220.2564432989691 1214.432621502209,201.21612665684833 1266,198 C 1317.567378497791,194.78387334315167 1378.7836892488954,207.39193667157582 1440,220 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,220 C 72.70416053019147,222.98030191458025 145.40832106038295,225.96060382916053 207,231 C 268.59167893961705,236.03939617083947 319.0708762886598,243.13788659793815 364,244 C 408.9291237113402,244.86211340206185 448.30817378497795,239.48784977908693 507,239 C 565.691826215022,238.51215022091307 643.6964285714286,242.91071428571425 707,238 C 770.3035714285714,233.08928571428575 818.9061119293077,218.869293078056 872,209 C 925.0938880706923,199.130706921944 982.6791237113403,193.61211340206185 1049,191 C 1115.3208762886597,188.38788659793815 1190.3773932253314,188.6822533136966 1257,194 C 1323.6226067746686,199.3177466863034 1381.8113033873342,209.6588733431517 1440,220 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,220 C 72.70416053019147,222.98030191458025 145.40832106038295,225.96060382916053 207,231 C 268.59167893961705,236.03939617083947 319.0708762886598,243.13788659793815 364,244 C 408.9291237113402,244.86211340206185 448.30817378497795,239.48784977908693 507,239 C 565.691826215022,238.51215022091307 643.6964285714286,242.91071428571425 707,238 C 770.3035714285714,233.08928571428575 818.9061119293077,218.869293078056 872,209 C 925.0938880706923,199.130706921944 982.6791237113403,193.61211340206185 1049,191 C 1115.3208762886597,188.38788659793815 1190.3773932253314,188.6822533136966 1257,194 C 1323.6226067746686,199.3177466863034 1381.8113033873342,209.6588733431517 1440,220 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"0.53\" class=\"transition-all duration-300 ease-in-out delay-150 path-2\"></path><style>\n .path-3{\n animation:pathAnim-3 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-3{\n 0%{\n d: path(\"M 0,400 L 0,300 C 48.40813696612666,306.5460235640648 96.81627393225332,313.0920471281296 166,316 C 235.18372606774668,318.9079528718704 325.1430412371134,318.1778350515464 385,306 C 444.8569587628866,293.8221649484536 474.611561119293,270.1966126656849 533,273 C 591.388438880707,275.8033873343151 678.4107142857142,305.0357142857143 740,306 C 801.5892857142858,306.9642857142857 837.74558173785,279.66053019145807 893,273 C 948.25441826215,266.33946980854193 1022.6069587628863,280.3221649484536 1085,281 C 1147.3930412371137,281.6778350515464 1197.826583210604,269.0508100147276 1255,270 C 1312.173416789396,270.9491899852724 1376.086708394698,285.4745949926362 1440,300 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,300 C 42.53424153166419,313.16402798232696 85.06848306332839,326.32805596465397 151,320 C 216.9315169366716,313.67194403534603 306.26030927835063,287.8518041237113 371,286 C 435.73969072164937,284.1481958762887 475.89027982326945,306.26472754050076 524,315 C 572.1097201767305,323.73527245949924 628.1785714285714,319.08928571428567 689,322 C 749.8214285714286,324.91071428571433 815.3954344624448,335.37812960235647 876,327 C 936.6045655375552,318.62187039764353 992.2396907216496,291.39819587628864 1051,287 C 1109.7603092783504,282.60180412371136 1171.6458026509574,301.029086892489 1237,307 C 1302.3541973490426,312.970913107511 1371.1770986745214,306.4854565537555 1440,300 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,300 C 71.48011782032401,293.10217231222384 142.96023564064802,286.20434462444774 206,280 C 269.039764359352,273.79565537555226 323.6391752577319,268.28479381443293 372,272 C 420.3608247422681,275.71520618556707 462.4830633284241,288.6564801178203 524,304 C 585.5169366715759,319.3435198821797 666.4285714285714,337.0892857142858 735,328 C 803.5714285714286,318.9107142857142 859.8026509572901,282.9863770250368 905,278 C 950.1973490427099,273.0136229749632 984.360824742268,298.965206185567 1052,301 C 1119.639175257732,303.034793814433 1220.754050073638,281.1527982326951 1291,277 C 1361.245949926362,272.8472017673049 1400.6229749631812,286.42360088365245 1440,300 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,300 C 70.41623711340208,306.8939617083947 140.83247422680415,313.7879234167894 197,314 C 253.16752577319585,314.2120765832106 295.0863402061855,307.7422680412371 357,306 C 418.9136597938145,304.2577319587629 500.82216494845363,307.2430044182622 561,306 C 621.1778350515464,304.7569955817378 659.6249999999999,299.28571428571433 719,303 C 778.3750000000001,306.71428571428567 858.6778350515466,319.6141384388807 930,323 C 1001.3221649484534,326.3858615611193 1063.6636597938143,320.25773195876286 1113,320 C 1162.3363402061857,319.74226804123714 1198.667525773196,325.35493372606777 1251,323 C 1303.332474226804,320.64506627393223 1371.666237113402,310.3225331369661 1440,300 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,300 C 48.40813696612666,306.5460235640648 96.81627393225332,313.0920471281296 166,316 C 235.18372606774668,318.9079528718704 325.1430412371134,318.1778350515464 385,306 C 444.8569587628866,293.8221649484536 474.611561119293,270.1966126656849 533,273 C 591.388438880707,275.8033873343151 678.4107142857142,305.0357142857143 740,306 C 801.5892857142858,306.9642857142857 837.74558173785,279.66053019145807 893,273 C 948.25441826215,266.33946980854193 1022.6069587628863,280.3221649484536 1085,281 C 1147.3930412371137,281.6778350515464 1197.826583210604,269.0508100147276 1255,270 C 1312.173416789396,270.9491899852724 1376.086708394698,285.4745949926362 1440,300 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,300 C 48.40813696612666,306.5460235640648 96.81627393225332,313.0920471281296 166,316 C 235.18372606774668,318.9079528718704 325.1430412371134,318.1778350515464 385,306 C 444.8569587628866,293.8221649484536 474.611561119293,270.1966126656849 533,273 C 591.388438880707,275.8033873343151 678.4107142857142,305.0357142857143 740,306 C 801.5892857142858,306.9642857142857 837.74558173785,279.66053019145807 893,273 C 948.25441826215,266.33946980854193 1022.6069587628863,280.3221649484536 1085,281 C 1147.3930412371137,281.6778350515464 1197.826583210604,269.0508100147276 1255,270 C 1312.173416789396,270.9491899852724 1376.086708394698,285.4745949926362 1440,300 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"1\" class=\"transition-all duration-300 ease-in-out delay-150 path-3\"></path></svg>\n </div>\n\n</body>\n</html>\n";
|
|
1
|
+
export declare const htmlHome = "\n<!DOCTYPE html>\n<html lang=\"es\">\n<head>\n <meta charset=\"UTF-8\" />\n <title>Sendwave Bot</title>\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\" />\n <script src=\"https://cdn.tailwindcss.com\"></script>\n</head>\n<body class=\"bg-white text-slate-800 flex items-center justify-center h-screen relative overflow-hidden\">\n\n <div class=\"text-center bg-white/20 backdrop-blur-sm p-8 rounded-2xl z-10 shadow-lg max-w-md w-full flex flex-col items-center z-10\">\n <h1 class=\"text-3xl font-bold text-cyan-700 mb-4 flex items-center justify-center gap-2 \"><svg width=\"32\" height=\"32\" viewBox=\"0 0 80 80\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\"><g clip-path=\"url(#clip0_649_78)\"><circle cx=\"40\" cy=\"40\" r=\"40\" fill=\"url(#paint0_linear_649_78)\"></circle><circle cx=\"40\" cy=\"40\" r=\"32\" fill=\"white\"></circle><path d=\"M8.32007 44.16C9.20007 28 44.6401 14.7999 45.6801 32.9599C42.9601 36.0799 40.2667 28.8246 34.8001 31.2799C21.2692 37.3573 40.5601 65.52 66.2401 58.3999C46.8001 85.1999 11.1201 70.32 8.32007 44.16Z\" fill=\"url(#paint1_linear_649_78)\"></path><path d=\"M16.9602 48.5601L10.1602 51.8401C16.9429 70.014 38.3202 78.0001 54.1602 69.2001C36.1602 68.8801 20.9602 61.0401 16.9602 48.5601Z\" fill=\"#1E52CD\"></path><path d=\"M27.5201 15.92C17.52 18 2.40007 34.4 10.1601 51.84L16.9601 48.56C7.60006 19.76 49.2079 23.76 44.182 31.8014C43.782 32.4414 42.742 31.8014 41.382 31.8014C37.9571 31.8014 39.6119 38.1895 45.702 38.6013C61.062 38.6013 53.5997 10.4953 27.5201 15.92Z\" fill=\"#019DF9\"></path><path d=\"M51.28 23.6479C44.08 11.2694 18.48 10.56 10.24 31.84C17.92 17.92 52 10.72 52 36C54.4 33.12 54.8 28.96 51.28 23.6479Z\" fill=\"url(#paint2_linear_649_78)\"></path><path d=\"M68.56 54.4801C69.0879 53.4766 69.382 52.7921 69.92 51.3601L63.04 49.5129C53.3714 42.098 44.9762 42.1171 37.76 47.5129C41.36 54.8801 56 61.1201 68.56 54.4801Z\" fill=\"url(#paint3_linear_649_78)\"></path><path d=\"M71.12 47.36C54.0422 46.2732 46.9167 47.3149 40 50.64C43.1238 53.6518 46.16 55.2001 51.36 56.615C56.1255 54.3514 60.0087 53.2658 69.92 51.36C70.516 49.9742 70.7842 49.1058 71.12 47.36Z\" fill=\"url(#paint4_linear_649_78)\"></path></g><defs><linearGradient id=\"paint0_linear_649_78\" x1=\"40\" y1=\"0\" x2=\"40\" y2=\"80\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#019DF9\"></stop><stop offset=\"1\" stop-color=\"#12298B\"></stop></linearGradient><linearGradient id=\"paint1_linear_649_78\" x1=\"20.7201\" y1=\"23.9199\" x2=\"52.1601\" y2=\"70.9599\" gradientUnits=\"userSpaceOnUse\"><stop offset=\"0.00661977\" stop-color=\"#012A6B\"></stop><stop offset=\"1\" stop-color=\"#1E52CD\"></stop></linearGradient><linearGradient id=\"paint2_linear_649_78\" x1=\"51.68\" y1=\"23.5679\" x2=\"9.91999\" y2=\"29.6479\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#B7E8FF\"></stop><stop offset=\"0.526042\" stop-color=\"#97DEFF\"></stop><stop offset=\"1\" stop-color=\"#32B3FC\"></stop></linearGradient><linearGradient id=\"paint3_linear_649_78\" x1=\"40.32\" y1=\"44.8801\" x2=\"71.68\" y2=\"55.8401\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#12298B\"></stop><stop offset=\"1\" stop-color=\"#008CDC\"></stop></linearGradient><linearGradient id=\"paint4_linear_649_78\" x1=\"55.48\" y1=\"47.335\" x2=\"55.48\" y2=\"56.615\" gradientUnits=\"userSpaceOnUse\"><stop stop-color=\"#019DF9\"></stop><stop offset=\"1\" stop-color=\"#34B5FF\"></stop></linearGradient><clipPath id=\"clip0_649_78\"><rect width=\"80\" height=\"80\" fill=\"white\"></rect></clipPath></defs></svg> Sendwave Provider activo</h1>\n <p class=\"text-slate-500 text-lg\">Tu instancia est\u00E1 corriendo correctamente.</p>\n </div>\n\n <!-- Olas decorativas -->\n <div class=\"absolute bottom-0 left-0 w-full\">\n <svg width=\"100%\" height=\"100%\" id=\"svg\" viewBox=\"0 0 1440 390\" xmlns=\"http://www.w3.org/2000/svg\" class=\"transition duration-300 ease-in-out delay-150\"><style>\n .path-0{\n animation:pathAnim-0 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-0{\n 0%{\n d: path(\"M 0,400 L 0,60 C 71.35843151693669,59.23030191458027 142.71686303387338,58.460603829160526 206,60 C 269.2831369661266,61.539396170839474 324.49097938144325,65.38788659793815 375,61 C 425.50902061855675,56.61211340206185 471.31921944035344,43.987849779086886 537,36 C 602.6807805596466,28.012150220913114 688.232142857143,24.660714285714292 751,32 C 813.767857142857,39.33928571428571 853.7522091310749,57.36929307805596 898,62 C 942.2477908689251,66.63070692194404 990.7590206185569,57.86211340206186 1055,56 C 1119.2409793814431,54.13788659793814 1199.211708394698,59.18225331369662 1266,61 C 1332.788291605302,62.81774668630338 1386.394145802651,61.40887334315169 1440,60 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,60 C 62.18096465390279,54.449189985272454 124.36192930780558,48.898379970544916 187,56 C 249.63807069219442,63.101620029455084 312.73324742268045,82.85567010309279 366,88 C 419.26675257731955,93.14432989690721 462.70508100147276,83.67893961708396 523,76 C 583.2949189985272,68.32106038291604 660.4464285714287,62.428571428571416 723,51 C 785.5535714285713,39.571428571428584 833.509204712813,22.606774668630344 885,32 C 936.490795287187,41.393225331369656 991.5167525773193,77.1443298969072 1056,78 C 1120.4832474226807,78.8556701030928 1194.423784977909,44.8159057437408 1260,36 C 1325.576215022091,27.184094256259204 1382.7881075110454,43.5920471281296 1440,60 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,60 C 79.00460235640648,54.72717231222386 158.00920471281296,49.45434462444772 207,52 C 255.99079528718704,54.54565537555228 274.96778350515467,64.90979381443299 336,68 C 397.03221649484533,71.09020618556701 500.1196612665685,66.90648011782032 561,63 C 621.8803387334315,59.09351988217968 640.5535714285716,55.46428571428572 693,49 C 745.4464285714284,42.53571428571428 831.6660530191457,33.236377025036816 908,30 C 984.3339469808543,26.763622974963184 1050.7822164948454,29.590206185567013 1100,35 C 1149.2177835051546,40.40979381443299 1181.2050810014728,48.40279823269515 1235,53 C 1288.7949189985272,57.59720176730485 1364.3974594992637,58.798600883652426 1440,60 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,60 C 68.61487481590575,59.48784977908689 137.2297496318115,58.97569955817379 200,66 C 262.7702503681885,73.02430044182621 319.69587628865975,87.58505154639175 370,86 C 420.30412371134025,84.41494845360825 463.9867452135493,66.6840942562592 528,54 C 592.0132547864507,41.3159057437408 676.357142857143,33.67857142857143 746,43 C 815.642857142857,52.32142857142857 870.584683357879,78.60162002945508 921,81 C 971.415316642121,83.39837997054492 1017.3041237113403,61.914948453608254 1075,54 C 1132.6958762886597,46.085051546391746 1202.19882179676,51.738586156111936 1265,55 C 1327.80117820324,58.261413843888064 1383.90058910162,59.13070692194403 1440,60 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,60 C 71.35843151693669,59.23030191458027 142.71686303387338,58.460603829160526 206,60 C 269.2831369661266,61.539396170839474 324.49097938144325,65.38788659793815 375,61 C 425.50902061855675,56.61211340206185 471.31921944035344,43.987849779086886 537,36 C 602.6807805596466,28.012150220913114 688.232142857143,24.660714285714292 751,32 C 813.767857142857,39.33928571428571 853.7522091310749,57.36929307805596 898,62 C 942.2477908689251,66.63070692194404 990.7590206185569,57.86211340206186 1055,56 C 1119.2409793814431,54.13788659793814 1199.211708394698,59.18225331369662 1266,61 C 1332.788291605302,62.81774668630338 1386.394145802651,61.40887334315169 1440,60 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,60 C 71.35843151693669,59.23030191458027 142.71686303387338,58.460603829160526 206,60 C 269.2831369661266,61.539396170839474 324.49097938144325,65.38788659793815 375,61 C 425.50902061855675,56.61211340206185 471.31921944035344,43.987849779086886 537,36 C 602.6807805596466,28.012150220913114 688.232142857143,24.660714285714292 751,32 C 813.767857142857,39.33928571428571 853.7522091310749,57.36929307805596 898,62 C 942.2477908689251,66.63070692194404 990.7590206185569,57.86211340206186 1055,56 C 1119.2409793814431,54.13788659793814 1199.211708394698,59.18225331369662 1266,61 C 1332.788291605302,62.81774668630338 1386.394145802651,61.40887334315169 1440,60 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"0.265\" class=\"transition-all duration-300 ease-in-out delay-150 path-0\"></path><style>\n .path-1{\n animation:pathAnim-1 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-1{\n 0%{\n d: path(\"M 0,400 L 0,140 C 44.29988954344624,122.8668998527246 88.59977908689248,105.7337997054492 153,113 C 217.40022091310752,120.2662002945508 301.9007731958763,151.93170103092783 368,153 C 434.0992268041237,154.06829896907217 481.79712812960247,124.53939617083947 534,127 C 586.2028718703975,129.46060382916053 642.9107142857142,163.91071428571428 701,160 C 759.0892857142858,156.08928571428572 818.5600147275406,113.81774668630338 881,115 C 943.4399852724594,116.18225331369662 1008.8492268041236,160.81829896907217 1068,166 C 1127.1507731958764,171.18170103092783 1180.0430780559648,136.90905743740797 1241,126 C 1301.9569219440352,115.09094256259205 1370.9784609720177,127.54547128129602 1440,140 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,140 C 44.95968335787923,123.41991899852724 89.91936671575846,106.83983799705449 146,111 C 202.08063328424154,115.16016200294551 269.2822164948454,140.06056701030928 345,154 C 420.7177835051546,167.93943298969072 504.95176730486,170.9178939617084 562,167 C 619.04823269514,163.0821060382916 648.9107142857143,152.26785714285714 705,145 C 761.0892857142857,137.73214285714286 843.4053755522827,134.01067746686306 906,142 C 968.5946244477173,149.98932253313694 1011.4677835051546,169.68943298969072 1061,167 C 1110.5322164948454,164.31056701030928 1166.7234904270988,139.23159057437408 1231,131 C 1295.2765095729012,122.76840942562592 1367.6382547864505,131.38420471281296 1440,140 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,140 C 61.1502209131075,134.90150957290132 122.300441826215,129.80301914580264 175,123 C 227.699558173785,116.19698085419735 271.9484536082475,107.68943298969072 342,112 C 412.0515463917525,116.31056701030928 507.9057437407952,133.43924889543447 571,136 C 634.0942562592048,138.56075110456553 664.4285714285716,126.5535714285714 719,124 C 773.5714285714284,121.4464285714286 852.3799705449188,128.34646539027986 916,134 C 979.6200294550812,139.65353460972014 1028.0515463917527,144.06056701030928 1088,142 C 1147.9484536082473,139.93943298969072 1219.4138438880707,131.41126656848306 1280,130 C 1340.5861561119293,128.58873343151694 1390.2930780559645,134.29436671575849 1440,140 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,140 C 55.14764359351989,147.99815905743742 110.29528718703978,155.9963181148748 175,159 C 239.70471281296022,162.0036818851252 313.96649484536084,160.01288659793815 372,153 C 430.03350515463916,145.98711340206185 471.83873343151686,133.9521354933726 535,133 C 598.1612665684831,132.0478645066274 682.6785714285713,142.17857142857144 737,137 C 791.3214285714287,131.82142857142856 815.4469808541976,111.33357879234168 869,116 C 922.5530191458024,120.66642120765832 1005.533505154639,150.48711340206185 1076,154 C 1146.466494845361,157.51288659793815 1204.4189985272462,134.71796759941088 1263,128 C 1321.5810014727538,121.2820324005891 1380.790500736377,130.64101620029456 1440,140 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,140 C 44.29988954344624,122.8668998527246 88.59977908689248,105.7337997054492 153,113 C 217.40022091310752,120.2662002945508 301.9007731958763,151.93170103092783 368,153 C 434.0992268041237,154.06829896907217 481.79712812960247,124.53939617083947 534,127 C 586.2028718703975,129.46060382916053 642.9107142857142,163.91071428571428 701,160 C 759.0892857142858,156.08928571428572 818.5600147275406,113.81774668630338 881,115 C 943.4399852724594,116.18225331369662 1008.8492268041236,160.81829896907217 1068,166 C 1127.1507731958764,171.18170103092783 1180.0430780559648,136.90905743740797 1241,126 C 1301.9569219440352,115.09094256259205 1370.9784609720177,127.54547128129602 1440,140 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,140 C 44.29988954344624,122.8668998527246 88.59977908689248,105.7337997054492 153,113 C 217.40022091310752,120.2662002945508 301.9007731958763,151.93170103092783 368,153 C 434.0992268041237,154.06829896907217 481.79712812960247,124.53939617083947 534,127 C 586.2028718703975,129.46060382916053 642.9107142857142,163.91071428571428 701,160 C 759.0892857142858,156.08928571428572 818.5600147275406,113.81774668630338 881,115 C 943.4399852724594,116.18225331369662 1008.8492268041236,160.81829896907217 1068,166 C 1127.1507731958764,171.18170103092783 1180.0430780559648,136.90905743740797 1241,126 C 1301.9569219440352,115.09094256259205 1370.9784609720177,127.54547128129602 1440,140 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"0.4\" class=\"transition-all duration-300 ease-in-out delay-150 path-1\"></path><style>\n .path-2{\n animation:pathAnim-2 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-2{\n 0%{\n d: path(\"M 0,400 L 0,220 C 72.70416053019147,222.98030191458025 145.40832106038295,225.96060382916053 207,231 C 268.59167893961705,236.03939617083947 319.0708762886598,243.13788659793815 364,244 C 408.9291237113402,244.86211340206185 448.30817378497795,239.48784977908693 507,239 C 565.691826215022,238.51215022091307 643.6964285714286,242.91071428571425 707,238 C 770.3035714285714,233.08928571428575 818.9061119293077,218.869293078056 872,209 C 925.0938880706923,199.130706921944 982.6791237113403,193.61211340206185 1049,191 C 1115.3208762886597,188.38788659793815 1190.3773932253314,188.6822533136966 1257,194 C 1323.6226067746686,199.3177466863034 1381.8113033873342,209.6588733431517 1440,220 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,220 C 65.79270986745213,211.94164212076583 131.58541973490426,203.88328424153164 191,206 C 250.41458026509574,208.11671575846836 303.451030927835,220.40850515463922 363,220 C 422.548969072165,219.59149484536078 488.6104565537555,206.4826951399116 557,205 C 625.3895434462445,203.5173048600884 696.1071428571429,213.66071428571428 751,216 C 805.8928571428571,218.33928571428572 844.9609720176732,212.87444771723125 907,205 C 969.0390279823268,197.12555228276875 1054.048969072165,186.8414948453608 1108,198 C 1161.951030927835,209.1585051546392 1184.8431516936673,241.7595729013255 1235,249 C 1285.1568483063327,256.2404270986745 1362.5784241531665,238.12021354933725 1440,220 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,220 C 71.7255154639175,216.840206185567 143.451030927835,213.68041237113403 211,215 C 278.548969072165,216.31958762886597 341.92139175257734,222.11855670103088 391,218 C 440.07860824742266,213.88144329896912 474.8634020618556,199.84536082474227 533,206 C 591.1365979381444,212.15463917525773 672.625,238.5 726,243 C 779.375,247.5 804.6365979381443,230.15463917525773 870,219 C 935.3634020618557,207.84536082474227 1040.8286082474226,202.8814432989691 1105,203 C 1169.1713917525774,203.1185567010309 1192.048969072165,208.319587628866 1241,212 C 1289.951030927835,215.680412371134 1364.9755154639174,217.840206185567 1440,220 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,220 C 65.31940353460973,231.92765095729013 130.63880706921947,243.85530191458025 195,244 C 259.36119293078053,244.14469808541975 322.7641752577319,232.5064432989691 381,221 C 439.2358247422681,209.4935567010309 492.3044918998528,198.11892488954345 547,198 C 601.6955081001472,197.88107511045655 658.0178571428572,209.01785714285714 707,209 C 755.9821428571428,208.98214285714286 797.6240795287188,197.809646539028 867,201 C 936.3759204712812,204.190353460972 1033.4858247422678,221.7435567010309 1103,221 C 1172.5141752577322,220.2564432989691 1214.432621502209,201.21612665684833 1266,198 C 1317.567378497791,194.78387334315167 1378.7836892488954,207.39193667157582 1440,220 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,220 C 72.70416053019147,222.98030191458025 145.40832106038295,225.96060382916053 207,231 C 268.59167893961705,236.03939617083947 319.0708762886598,243.13788659793815 364,244 C 408.9291237113402,244.86211340206185 448.30817378497795,239.48784977908693 507,239 C 565.691826215022,238.51215022091307 643.6964285714286,242.91071428571425 707,238 C 770.3035714285714,233.08928571428575 818.9061119293077,218.869293078056 872,209 C 925.0938880706923,199.130706921944 982.6791237113403,193.61211340206185 1049,191 C 1115.3208762886597,188.38788659793815 1190.3773932253314,188.6822533136966 1257,194 C 1323.6226067746686,199.3177466863034 1381.8113033873342,209.6588733431517 1440,220 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,220 C 72.70416053019147,222.98030191458025 145.40832106038295,225.96060382916053 207,231 C 268.59167893961705,236.03939617083947 319.0708762886598,243.13788659793815 364,244 C 408.9291237113402,244.86211340206185 448.30817378497795,239.48784977908693 507,239 C 565.691826215022,238.51215022091307 643.6964285714286,242.91071428571425 707,238 C 770.3035714285714,233.08928571428575 818.9061119293077,218.869293078056 872,209 C 925.0938880706923,199.130706921944 982.6791237113403,193.61211340206185 1049,191 C 1115.3208762886597,188.38788659793815 1190.3773932253314,188.6822533136966 1257,194 C 1323.6226067746686,199.3177466863034 1381.8113033873342,209.6588733431517 1440,220 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"0.53\" class=\"transition-all duration-300 ease-in-out delay-150 path-2\"></path><style>\n .path-3{\n animation:pathAnim-3 4s;\n animation-timing-function: linear;\n animation-iteration-count: infinite;\n }\n @keyframes pathAnim-3{\n 0%{\n d: path(\"M 0,400 L 0,300 C 48.40813696612666,306.5460235640648 96.81627393225332,313.0920471281296 166,316 C 235.18372606774668,318.9079528718704 325.1430412371134,318.1778350515464 385,306 C 444.8569587628866,293.8221649484536 474.611561119293,270.1966126656849 533,273 C 591.388438880707,275.8033873343151 678.4107142857142,305.0357142857143 740,306 C 801.5892857142858,306.9642857142857 837.74558173785,279.66053019145807 893,273 C 948.25441826215,266.33946980854193 1022.6069587628863,280.3221649484536 1085,281 C 1147.3930412371137,281.6778350515464 1197.826583210604,269.0508100147276 1255,270 C 1312.173416789396,270.9491899852724 1376.086708394698,285.4745949926362 1440,300 L 1440,400 L 0,400 Z\");\n }\n 25%{\n d: path(\"M 0,400 L 0,300 C 42.53424153166419,313.16402798232696 85.06848306332839,326.32805596465397 151,320 C 216.9315169366716,313.67194403534603 306.26030927835063,287.8518041237113 371,286 C 435.73969072164937,284.1481958762887 475.89027982326945,306.26472754050076 524,315 C 572.1097201767305,323.73527245949924 628.1785714285714,319.08928571428567 689,322 C 749.8214285714286,324.91071428571433 815.3954344624448,335.37812960235647 876,327 C 936.6045655375552,318.62187039764353 992.2396907216496,291.39819587628864 1051,287 C 1109.7603092783504,282.60180412371136 1171.6458026509574,301.029086892489 1237,307 C 1302.3541973490426,312.970913107511 1371.1770986745214,306.4854565537555 1440,300 L 1440,400 L 0,400 Z\");\n }\n 50%{\n d: path(\"M 0,400 L 0,300 C 71.48011782032401,293.10217231222384 142.96023564064802,286.20434462444774 206,280 C 269.039764359352,273.79565537555226 323.6391752577319,268.28479381443293 372,272 C 420.3608247422681,275.71520618556707 462.4830633284241,288.6564801178203 524,304 C 585.5169366715759,319.3435198821797 666.4285714285714,337.0892857142858 735,328 C 803.5714285714286,318.9107142857142 859.8026509572901,282.9863770250368 905,278 C 950.1973490427099,273.0136229749632 984.360824742268,298.965206185567 1052,301 C 1119.639175257732,303.034793814433 1220.754050073638,281.1527982326951 1291,277 C 1361.245949926362,272.8472017673049 1400.6229749631812,286.42360088365245 1440,300 L 1440,400 L 0,400 Z\");\n }\n 75%{\n d: path(\"M 0,400 L 0,300 C 70.41623711340208,306.8939617083947 140.83247422680415,313.7879234167894 197,314 C 253.16752577319585,314.2120765832106 295.0863402061855,307.7422680412371 357,306 C 418.9136597938145,304.2577319587629 500.82216494845363,307.2430044182622 561,306 C 621.1778350515464,304.7569955817378 659.6249999999999,299.28571428571433 719,303 C 778.3750000000001,306.71428571428567 858.6778350515466,319.6141384388807 930,323 C 1001.3221649484534,326.3858615611193 1063.6636597938143,320.25773195876286 1113,320 C 1162.3363402061857,319.74226804123714 1198.667525773196,325.35493372606777 1251,323 C 1303.332474226804,320.64506627393223 1371.666237113402,310.3225331369661 1440,300 L 1440,400 L 0,400 Z\");\n }\n 100%{\n d: path(\"M 0,400 L 0,300 C 48.40813696612666,306.5460235640648 96.81627393225332,313.0920471281296 166,316 C 235.18372606774668,318.9079528718704 325.1430412371134,318.1778350515464 385,306 C 444.8569587628866,293.8221649484536 474.611561119293,270.1966126656849 533,273 C 591.388438880707,275.8033873343151 678.4107142857142,305.0357142857143 740,306 C 801.5892857142858,306.9642857142857 837.74558173785,279.66053019145807 893,273 C 948.25441826215,266.33946980854193 1022.6069587628863,280.3221649484536 1085,281 C 1147.3930412371137,281.6778350515464 1197.826583210604,269.0508100147276 1255,270 C 1312.173416789396,270.9491899852724 1376.086708394698,285.4745949926362 1440,300 L 1440,400 L 0,400 Z\");\n }\n }</style><defs><linearGradient id=\"gradient\" x1=\"0%\" y1=\"50%\" x2=\"100%\" y2=\"50%\"><stop offset=\"5%\" stop-color=\"#0693e3\"></stop><stop offset=\"95%\" stop-color=\"#8ED1FC\"></stop></linearGradient></defs><path d=\"M 0,400 L 0,300 C 48.40813696612666,306.5460235640648 96.81627393225332,313.0920471281296 166,316 C 235.18372606774668,318.9079528718704 325.1430412371134,318.1778350515464 385,306 C 444.8569587628866,293.8221649484536 474.611561119293,270.1966126656849 533,273 C 591.388438880707,275.8033873343151 678.4107142857142,305.0357142857143 740,306 C 801.5892857142858,306.9642857142857 837.74558173785,279.66053019145807 893,273 C 948.25441826215,266.33946980854193 1022.6069587628863,280.3221649484536 1085,281 C 1147.3930412371137,281.6778350515464 1197.826583210604,269.0508100147276 1255,270 C 1312.173416789396,270.9491899852724 1376.086708394698,285.4745949926362 1440,300 L 1440,400 L 0,400 Z\" stroke=\"none\" stroke-width=\"0\" fill=\"url(#gradient)\" fill-opacity=\"1\" class=\"transition-all duration-300 ease-in-out delay-150 path-3\"></path></svg>\n </div>\n\n</body>\n</html>\n";
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from
|
|
2
|
-
export * from
|
|
3
|
-
export * from
|
|
1
|
+
export * from "./parser.interface";
|
|
2
|
+
export * from "./provider.interface";
|
|
3
|
+
export * from "./types";
|
|
@@ -8,8 +8,8 @@ export interface ProviderInterface {
|
|
|
8
8
|
sendVideo: (data: SendMedia) => Promise<any>;
|
|
9
9
|
sendContacts?: (to: string, contact: any[]) => Promise<any>;
|
|
10
10
|
sendFile: (data: SendMedia) => Promise<any>;
|
|
11
|
-
sendAudio: (data: SendMedia) =>
|
|
12
|
-
sendVoice: (data: SendMedia) =>
|
|
11
|
+
sendAudio: (data: SendMedia) => Promise<any>;
|
|
12
|
+
sendVoice: (data: SendMedia) => Promise<any>;
|
|
13
13
|
sendList: (data: SendList) => Promise<any>;
|
|
14
14
|
sendPresence: (data: SendPresence) => Promise<any>;
|
|
15
15
|
sendButton: (data: SendButton) => Promise<any>;
|
package/build/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import { GlobalVendorArgs } from
|
|
2
|
-
import { SendWaveProvider } from
|
|
1
|
+
import { GlobalVendorArgs } from "./core/interface/types";
|
|
2
|
+
import { SendWaveProvider } from "./provider/provider";
|
|
3
3
|
export declare function createSendWaveProvider(args: Partial<GlobalVendorArgs>): SendWaveProvider;
|
|
4
4
|
export { SendWaveProvider, GlobalVendorArgs };
|
|
5
|
-
export { queueFlow, QueueFlow, type QueueFlowConfig } from
|
|
5
|
+
export { queueFlow, QueueFlow, type QueueFlowConfig } from "./utils/queueFlow";
|
|
6
|
+
export * from "./core/interface";
|
package/build/index.js
CHANGED
|
@@ -1,4 +1,18 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
2
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
17
|
exports.QueueFlow = exports.queueFlow = exports.SendWaveProvider = void 0;
|
|
4
18
|
exports.createSendWaveProvider = createSendWaveProvider;
|
|
@@ -10,3 +24,4 @@ function createSendWaveProvider(args) {
|
|
|
10
24
|
var queueFlow_1 = require("./utils/queueFlow");
|
|
11
25
|
Object.defineProperty(exports, "queueFlow", { enumerable: true, get: function () { return queueFlow_1.queueFlow; } });
|
|
12
26
|
Object.defineProperty(exports, "QueueFlow", { enumerable: true, get: function () { return queueFlow_1.QueueFlow; } });
|
|
27
|
+
__exportStar(require("./core/interface"), exports);
|
package/build/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamastudio/sendwave-provider",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Librería para interactuar con Sendwave usando configuración dinámica.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@gamastudio/colorslog": "^0.1.8",
|
|
27
27
|
"@types/mime-types": "^3.0.1",
|
|
28
28
|
"axios": "^1.13.2",
|
|
29
|
-
"body-parser": "^2.2.
|
|
29
|
+
"body-parser": "^2.2.1",
|
|
30
30
|
"cors": "^2.8.5",
|
|
31
|
-
"file-type": "^21.1.
|
|
32
|
-
"mime-types": "^3.0.
|
|
31
|
+
"file-type": "^21.1.1",
|
|
32
|
+
"mime-types": "^3.0.2",
|
|
33
33
|
"queue-promise": "^2.2.1",
|
|
34
34
|
"sirv": "^3.0.2"
|
|
35
35
|
},
|
package/build/provider/core.d.ts
CHANGED
|
@@ -5,13 +5,11 @@ export declare class SendWaveCore extends EventEmitter {
|
|
|
5
5
|
port: number;
|
|
6
6
|
private messageQueue;
|
|
7
7
|
private globalVendorArgs;
|
|
8
|
-
private codeQR;
|
|
9
8
|
constructor(port: number, queue: Queue, globalVendorArgs: GlobalVendorArgs);
|
|
10
9
|
indexHome: (_: any, res: any) => void;
|
|
11
10
|
indexConnect: (_: any, res: any) => void;
|
|
12
11
|
indexError: (_: any, res: any) => void;
|
|
13
12
|
handlerLocalMedia: (_: any, res: any) => void;
|
|
14
|
-
emitQR: (qr: string) => void;
|
|
15
13
|
incomingMsg: (req: any, res: any) => any;
|
|
16
14
|
private processMessage;
|
|
17
15
|
private messageBuffers;
|
package/build/provider/core.js
CHANGED
|
@@ -4,20 +4,19 @@ exports.SendWaveCore = void 0;
|
|
|
4
4
|
const node_events_1 = require("node:events");
|
|
5
5
|
const parserMsg_1 = require("../utils/parserMsg");
|
|
6
6
|
const home_1 = require("../constants/html/home");
|
|
7
|
-
const connect_1 = require("../constants/html/connect");
|
|
8
7
|
const error_1 = require("../constants/html/error");
|
|
9
8
|
class SendWaveCore extends node_events_1.EventEmitter {
|
|
10
9
|
constructor(port, queue, globalVendorArgs) {
|
|
11
10
|
super();
|
|
12
|
-
this.codeQR = "";
|
|
13
11
|
this.indexHome = (_, res) => {
|
|
14
12
|
res.setHeader("Content-Type", "text/html");
|
|
15
13
|
res.end(home_1.htmlHome);
|
|
16
14
|
};
|
|
17
15
|
this.indexConnect = (_, res) => {
|
|
18
|
-
const
|
|
19
|
-
res.
|
|
20
|
-
res.
|
|
16
|
+
const url = `https://sendwave.gamastudio.co/app/instance/${this.globalVendorArgs.name}/settings`;
|
|
17
|
+
res.statusCode = 302;
|
|
18
|
+
res.setHeader("Location", url);
|
|
19
|
+
res.end();
|
|
21
20
|
};
|
|
22
21
|
this.indexError = (_, res) => {
|
|
23
22
|
res.setHeader("Content-Type", "text/html");
|
|
@@ -26,20 +25,11 @@ class SendWaveCore extends node_events_1.EventEmitter {
|
|
|
26
25
|
this.handlerLocalMedia = (_, res) => {
|
|
27
26
|
res.end("Media handler not implemented yet");
|
|
28
27
|
};
|
|
29
|
-
this.emitQR = (qr) => {
|
|
30
|
-
this.codeQR = qr;
|
|
31
|
-
};
|
|
32
28
|
this.incomingMsg = (req, res) => {
|
|
33
29
|
var _a;
|
|
34
30
|
try {
|
|
35
31
|
const { body } = req;
|
|
36
|
-
if (
|
|
37
|
-
if (body === null || body === void 0 ? void 0 : body.base64)
|
|
38
|
-
this.emitQR(body.base64);
|
|
39
|
-
this.emit("qr-update-request", { event: body.event });
|
|
40
|
-
return res.end("QR update processed");
|
|
41
|
-
}
|
|
42
|
-
if (!["messages.upsert", "send_message"].includes(body.event)) {
|
|
32
|
+
if (!["messages.upsert", "send.message"].includes(body.event)) {
|
|
43
33
|
return res.end("Message queued");
|
|
44
34
|
}
|
|
45
35
|
const data = (0, parserMsg_1.parseIncomingMsg)(body);
|
|
@@ -2,7 +2,7 @@ import { ProviderClass } from "@builderbot/bot";
|
|
|
2
2
|
import Queue from "queue-promise";
|
|
3
3
|
import { SendWaveCore } from "./core";
|
|
4
4
|
import { BotContext, BotCtxMiddlewareOptions } from "@builderbot/bot/dist/types";
|
|
5
|
-
import { GlobalVendorArgs } from "../core/interface/types";
|
|
5
|
+
import { GlobalVendorArgs, SendButton, SendList, SendLocation, SendMedia, SendMessage, SendPresence, SendReaction } from "../core/interface/types";
|
|
6
6
|
import { SenderMessage } from "./sender";
|
|
7
7
|
import { ParsedMessage } from "../core/interface";
|
|
8
8
|
export declare class SendWaveProvider extends ProviderClass<SendWaveCore> {
|
|
@@ -23,7 +23,6 @@ export declare class SendWaveProvider extends ProviderClass<SendWaveCore> {
|
|
|
23
23
|
private setupGlobalErrorHandlers;
|
|
24
24
|
protected initVendor(): Promise<any>;
|
|
25
25
|
protected beforeHttpServerInit: () => Promise<void>;
|
|
26
|
-
protected getApiQrConnect: () => Promise<void>;
|
|
27
26
|
protected afterHttpServerInit(): Promise<void>;
|
|
28
27
|
private startConnectionPolling;
|
|
29
28
|
private stopConnectionPolling;
|
|
@@ -47,18 +46,18 @@ export declare class SendWaveProvider extends ProviderClass<SendWaveCore> {
|
|
|
47
46
|
}): void;
|
|
48
47
|
initAll: (port: number, opts?: Pick<BotCtxMiddlewareOptions, "blacklist">) => void;
|
|
49
48
|
sendMessage(from: string, text: any, options?: any): Promise<any>;
|
|
50
|
-
sendText(
|
|
51
|
-
sendList(
|
|
52
|
-
sendImage(
|
|
53
|
-
sendVideo(
|
|
54
|
-
sendAudio(
|
|
55
|
-
sendFile(
|
|
56
|
-
sendPresence(
|
|
57
|
-
sendVoice(
|
|
58
|
-
sendButton(
|
|
59
|
-
sendReaction(
|
|
60
|
-
sendLocation(
|
|
61
|
-
sendMedia(
|
|
49
|
+
sendText(data: SendMessage): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
50
|
+
sendList(data: SendList): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
51
|
+
sendImage(data: SendMedia): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
52
|
+
sendVideo(data: SendMedia): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
53
|
+
sendAudio(data: SendMedia): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
54
|
+
sendFile(data: SendMedia): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
55
|
+
sendPresence(data: SendPresence): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
56
|
+
sendVoice(data: SendMedia): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
57
|
+
sendButton(data: SendButton): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
58
|
+
sendReaction(data: SendReaction): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
59
|
+
sendLocation(data: SendLocation): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
60
|
+
sendMedia(data: SendMedia): Promise<import("axios").AxiosResponse<any, any, {}> | undefined>;
|
|
62
61
|
/**
|
|
63
62
|
* Reset user timeout for queue flow system
|
|
64
63
|
*/
|
|
@@ -46,14 +46,14 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
46
46
|
warningMessage: "⏳ Parece que has estado inactivo. ¿Sigues ahí?",
|
|
47
47
|
},
|
|
48
48
|
payloadLimits: {
|
|
49
|
-
json:
|
|
50
|
-
urlencoded:
|
|
51
|
-
text:
|
|
49
|
+
json: "50mb",
|
|
50
|
+
urlencoded: "50mb",
|
|
51
|
+
text: "10mb",
|
|
52
52
|
media: {
|
|
53
|
-
image:
|
|
54
|
-
video:
|
|
55
|
-
audio:
|
|
56
|
-
document:
|
|
53
|
+
image: "10mb",
|
|
54
|
+
video: "100mb",
|
|
55
|
+
audio: "50mb",
|
|
56
|
+
document: "25mb",
|
|
57
57
|
},
|
|
58
58
|
},
|
|
59
59
|
};
|
|
@@ -62,20 +62,20 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
62
62
|
const payloadLimits = this.globalVendorArgs.payloadLimits || {};
|
|
63
63
|
this.server = this.server
|
|
64
64
|
.use(body_parser_1.default.json({
|
|
65
|
-
limit: payloadLimits.json ||
|
|
66
|
-
type:
|
|
65
|
+
limit: payloadLimits.json || "50mb",
|
|
66
|
+
type: "application/json",
|
|
67
67
|
}))
|
|
68
68
|
.use(body_parser_1.default.urlencoded({
|
|
69
|
-
limit: payloadLimits.urlencoded ||
|
|
70
|
-
extended: true
|
|
69
|
+
limit: payloadLimits.urlencoded || "50mb",
|
|
70
|
+
extended: true,
|
|
71
71
|
}))
|
|
72
72
|
.use(body_parser_1.default.text({
|
|
73
|
-
limit: payloadLimits.text ||
|
|
74
|
-
type:
|
|
73
|
+
limit: payloadLimits.text || "10mb",
|
|
74
|
+
type: "text/*",
|
|
75
75
|
}))
|
|
76
76
|
.use(body_parser_1.default.raw({
|
|
77
|
-
limit: payloadLimits.json ||
|
|
78
|
-
type:
|
|
77
|
+
limit: payloadLimits.json || "50mb",
|
|
78
|
+
type: "application/octet-stream",
|
|
79
79
|
}))
|
|
80
80
|
.use((req, _, next) => {
|
|
81
81
|
req["globalVendorArgs"] = this.globalVendorArgs;
|
|
@@ -85,7 +85,10 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
85
85
|
.use("/assets", assets)
|
|
86
86
|
.use((req, res, next) => {
|
|
87
87
|
var _a;
|
|
88
|
-
const ip = (req.ip ||
|
|
88
|
+
const ip = (req.ip ||
|
|
89
|
+
req.headers["x-forwarded-for"] ||
|
|
90
|
+
((_a = req.connection) === null || _a === void 0 ? void 0 : _a.remoteAddress) ||
|
|
91
|
+
"unknown").toString();
|
|
89
92
|
const now = Date.now();
|
|
90
93
|
const rec = this.rateLimits.get(ip) || { count: 0, windowStart: now };
|
|
91
94
|
if (now - rec.windowStart > this.rateLimitConfig.windowMs) {
|
|
@@ -96,8 +99,8 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
96
99
|
this.rateLimits.set(ip, rec);
|
|
97
100
|
if (rec.count > this.rateLimitConfig.max) {
|
|
98
101
|
res.statusCode = 429;
|
|
99
|
-
res.setHeader(
|
|
100
|
-
return res.end(JSON.stringify({ error:
|
|
102
|
+
res.setHeader("Content-Type", "application/json");
|
|
103
|
+
return res.end(JSON.stringify({ error: "Too Many Requests" }));
|
|
101
104
|
}
|
|
102
105
|
next();
|
|
103
106
|
})
|
|
@@ -108,7 +111,6 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
108
111
|
}
|
|
109
112
|
else if (!this.state && this.instanceConnected) {
|
|
110
113
|
await this.afterHttpServerInit();
|
|
111
|
-
this.getApiQrConnect();
|
|
112
114
|
return this.vendor.indexConnect(req, res);
|
|
113
115
|
}
|
|
114
116
|
else {
|
|
@@ -116,27 +118,16 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
116
118
|
return this.vendor.indexError(req, res);
|
|
117
119
|
})
|
|
118
120
|
.get("/health", async (_, res) => {
|
|
119
|
-
res.setHeader(
|
|
121
|
+
res.setHeader("Content-Type", "application/json");
|
|
120
122
|
res.end(JSON.stringify({
|
|
121
123
|
connected: this.instanceConnected,
|
|
122
124
|
state: this.state,
|
|
123
125
|
port: this.globalVendorArgs.port,
|
|
124
|
-
uptime: process.uptime()
|
|
126
|
+
uptime: process.uptime(),
|
|
125
127
|
}));
|
|
126
128
|
})
|
|
127
129
|
.post("/webhook", this.vendor.incomingMsg);
|
|
128
130
|
};
|
|
129
|
-
this.getApiQrConnect = async () => {
|
|
130
|
-
var _a;
|
|
131
|
-
try {
|
|
132
|
-
const { data } = await ((_a = this.sendwaveApi) === null || _a === void 0 ? void 0 : _a.get(`/instance/connect/${this.globalVendorArgs.name}`));
|
|
133
|
-
this.vendor.emitQR(data === null || data === void 0 ? void 0 : data.base64);
|
|
134
|
-
}
|
|
135
|
-
catch (error) {
|
|
136
|
-
console.log(error === null || error === void 0 ? void 0 : error.response.data);
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
};
|
|
140
131
|
this.busEvents = () => [
|
|
141
132
|
{
|
|
142
133
|
event: "auth_failure",
|
|
@@ -177,7 +168,6 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
177
168
|
{
|
|
178
169
|
event: "qr-update-request",
|
|
179
170
|
func: (_payload) => {
|
|
180
|
-
this.getApiQrConnect();
|
|
181
171
|
this.startConnectionPolling();
|
|
182
172
|
},
|
|
183
173
|
},
|
|
@@ -225,7 +215,7 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
225
215
|
})
|
|
226
216
|
.catch((error) => {
|
|
227
217
|
console.error("[Provider Error]:", error);
|
|
228
|
-
if (error.type ===
|
|
218
|
+
if (error.type === "entity.too.large") {
|
|
229
219
|
console.error("[Provider] PayloadTooLarge error caught at provider level");
|
|
230
220
|
}
|
|
231
221
|
});
|
|
@@ -265,21 +255,24 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
265
255
|
}
|
|
266
256
|
setupGlobalErrorHandlers() {
|
|
267
257
|
// Handle uncaught PayloadTooLarge errors
|
|
268
|
-
process.on(
|
|
269
|
-
if (error.name ===
|
|
270
|
-
|
|
258
|
+
process.on("uncaughtException", (error) => {
|
|
259
|
+
if (error.name === "PayloadTooLargeError" ||
|
|
260
|
+
error.type === "entity.too.large") {
|
|
261
|
+
console.error("[Global] PayloadTooLarge error intercepted:", error.message);
|
|
271
262
|
// Don't exit process for this type of error
|
|
272
263
|
return;
|
|
273
264
|
}
|
|
274
265
|
// For other uncaught exceptions, log and continue
|
|
275
|
-
console.error(
|
|
266
|
+
console.error("[Global] Uncaught exception:", error);
|
|
276
267
|
});
|
|
277
|
-
process.on(
|
|
278
|
-
if (reason &&
|
|
279
|
-
|
|
268
|
+
process.on("unhandledRejection", (reason) => {
|
|
269
|
+
if (reason &&
|
|
270
|
+
(reason.name === "PayloadTooLargeError" ||
|
|
271
|
+
reason.type === "entity.too.large")) {
|
|
272
|
+
console.error("[Global] PayloadTooLarge rejection intercepted:", reason.message);
|
|
280
273
|
return;
|
|
281
274
|
}
|
|
282
|
-
console.error(
|
|
275
|
+
console.error("[Global] Unhandled rejection:", reason);
|
|
283
276
|
});
|
|
284
277
|
}
|
|
285
278
|
initVendor() {
|
|
@@ -302,7 +295,6 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
302
295
|
else {
|
|
303
296
|
this.instanceConnected = true;
|
|
304
297
|
this.emit("ready", false);
|
|
305
|
-
this.getApiQrConnect();
|
|
306
298
|
this.state = false;
|
|
307
299
|
this.startConnectionPolling();
|
|
308
300
|
}
|
|
@@ -346,7 +338,7 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
346
338
|
? this.globalVendorArgs.url.trim()
|
|
347
339
|
: "https://sendwave-api.gamastudio.co";
|
|
348
340
|
const payloadLimits = this.globalVendorArgs.payloadLimits || {};
|
|
349
|
-
const maxContentLength = this.parseSize(payloadLimits.json ||
|
|
341
|
+
const maxContentLength = this.parseSize(payloadLimits.json || "50mb");
|
|
350
342
|
this.sendwaveApi = axios_1.default.create({
|
|
351
343
|
baseURL: url,
|
|
352
344
|
httpsAgent: new https_1.Agent({ rejectUnauthorized: false }),
|
|
@@ -360,7 +352,8 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
360
352
|
timeout: 300000, // 5 minutes timeout for large files
|
|
361
353
|
});
|
|
362
354
|
this.sendwaveApi.interceptors.request.use((config) => {
|
|
363
|
-
const contentLength = (config.headers && config.headers[
|
|
355
|
+
const contentLength = (config.headers && config.headers["content-length"]) ||
|
|
356
|
+
(config.data ? JSON.stringify(config.data).length : 0);
|
|
364
357
|
if (contentLength > 1024 * 1024) {
|
|
365
358
|
console.log(`[LargeRequest] Sending ${Math.round((contentLength / 1024 / 1024) * 100) / 100}MB to ${config.url}`);
|
|
366
359
|
}
|
|
@@ -369,7 +362,9 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
369
362
|
this.sendwaveApi.interceptors.response.use((response) => response, async (error) => {
|
|
370
363
|
const config = error.config || {};
|
|
371
364
|
config.__retryCount = config.__retryCount || 0;
|
|
372
|
-
const shouldRetry = error.code ===
|
|
365
|
+
const shouldRetry = error.code === "ECONNRESET" ||
|
|
366
|
+
error.code === "ETIMEDOUT" ||
|
|
367
|
+
(error.response && error.response.status >= 500);
|
|
373
368
|
if (shouldRetry && config.__retryCount < 3) {
|
|
374
369
|
config.__retryCount += 1;
|
|
375
370
|
const delay = Math.min(1000 * Math.pow(2, config.__retryCount), 8000);
|
|
@@ -381,16 +376,16 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
381
376
|
}
|
|
382
377
|
parseSize(size) {
|
|
383
378
|
const units = {
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
379
|
+
b: 1,
|
|
380
|
+
kb: 1024,
|
|
381
|
+
mb: 1024 * 1024,
|
|
382
|
+
gb: 1024 * 1024 * 1024,
|
|
388
383
|
};
|
|
389
384
|
const match = size.toLowerCase().match(/^(\d+(?:\.\d+)?)\s*(b|kb|mb|gb)?$/);
|
|
390
385
|
if (!match)
|
|
391
386
|
return 50 * 1024 * 1024; // Default 50MB
|
|
392
387
|
const value = parseFloat(match[1]);
|
|
393
|
-
const unit = match[2] ||
|
|
388
|
+
const unit = match[2] || "b";
|
|
394
389
|
return Math.floor(value * units[unit]);
|
|
395
390
|
}
|
|
396
391
|
async listenOnEvents(vendor) {
|
|
@@ -449,56 +444,56 @@ class SendWaveProvider extends bot_1.ProviderClass {
|
|
|
449
444
|
}
|
|
450
445
|
catch (error) {
|
|
451
446
|
// Enhanced error handling for large files
|
|
452
|
-
if (error.message && error.message.includes(
|
|
447
|
+
if (error.message && error.message.includes("exceeds limit")) {
|
|
453
448
|
console.error(`[SendMessage Error] File size validation failed: ${error.message}`);
|
|
454
449
|
throw new Error(`File too large: ${error.message}`);
|
|
455
450
|
}
|
|
456
|
-
else if (error.message && error.message.includes(
|
|
451
|
+
else if (error.message && error.message.includes("too large")) {
|
|
457
452
|
console.error(`[SendMessage Error] Large file error: ${error.message}`);
|
|
458
453
|
throw error;
|
|
459
454
|
}
|
|
460
455
|
else {
|
|
461
|
-
console.error(`[SendMessage Error] ${error.message ||
|
|
456
|
+
console.error(`[SendMessage Error] ${error.message || "Unknown error"}`);
|
|
462
457
|
throw error;
|
|
463
458
|
}
|
|
464
459
|
}
|
|
465
460
|
}
|
|
466
461
|
// Métodos de conveniencia para mantener la API limpia
|
|
467
|
-
sendText(
|
|
468
|
-
return this.sender.sendText(
|
|
462
|
+
sendText(data) {
|
|
463
|
+
return this.sender.sendText(data);
|
|
469
464
|
}
|
|
470
|
-
sendList(
|
|
471
|
-
return this.sender.sendList(
|
|
465
|
+
sendList(data) {
|
|
466
|
+
return this.sender.sendList(data);
|
|
472
467
|
}
|
|
473
|
-
sendImage(
|
|
474
|
-
return this.sender.sendImage(
|
|
468
|
+
sendImage(data) {
|
|
469
|
+
return this.sender.sendImage(data);
|
|
475
470
|
}
|
|
476
|
-
sendVideo(
|
|
477
|
-
return this.sender.sendVideo(
|
|
471
|
+
sendVideo(data) {
|
|
472
|
+
return this.sender.sendVideo(data);
|
|
478
473
|
}
|
|
479
|
-
sendAudio(
|
|
480
|
-
return this.sender.sendAudio(
|
|
474
|
+
sendAudio(data) {
|
|
475
|
+
return this.sender.sendAudio(data);
|
|
481
476
|
}
|
|
482
|
-
sendFile(
|
|
483
|
-
return this.sender.sendFile(
|
|
477
|
+
sendFile(data) {
|
|
478
|
+
return this.sender.sendFile(data);
|
|
484
479
|
}
|
|
485
|
-
sendPresence(
|
|
486
|
-
return this.sender.sendPresence(
|
|
480
|
+
sendPresence(data) {
|
|
481
|
+
return this.sender.sendPresence(data);
|
|
487
482
|
}
|
|
488
|
-
sendVoice(
|
|
489
|
-
return this.sender.sendVoice(
|
|
483
|
+
sendVoice(data) {
|
|
484
|
+
return this.sender.sendVoice(data);
|
|
490
485
|
}
|
|
491
|
-
sendButton(
|
|
492
|
-
return this.sender.sendButton(
|
|
486
|
+
sendButton(data) {
|
|
487
|
+
return this.sender.sendButton(data);
|
|
493
488
|
}
|
|
494
|
-
sendReaction(
|
|
495
|
-
return this.sender.sendReaction(
|
|
489
|
+
sendReaction(data) {
|
|
490
|
+
return this.sender.sendReaction(data);
|
|
496
491
|
}
|
|
497
|
-
sendLocation(
|
|
498
|
-
return this.sender.sendLocation(
|
|
492
|
+
sendLocation(data) {
|
|
493
|
+
return this.sender.sendLocation(data);
|
|
499
494
|
}
|
|
500
|
-
sendMedia(
|
|
501
|
-
return this.sender.sendMedia(
|
|
495
|
+
sendMedia(data) {
|
|
496
|
+
return this.sender.sendMedia(data);
|
|
502
497
|
}
|
|
503
498
|
// Queue Flow Management Methods
|
|
504
499
|
/**
|
package/build/provider/sender.js
CHANGED
|
@@ -27,7 +27,9 @@ class SenderMessage {
|
|
|
27
27
|
this.sendwaveApi.interceptors.response.use((response) => response, async (error) => {
|
|
28
28
|
const config = error.config || {};
|
|
29
29
|
config.__retryCount = config.__retryCount || 0;
|
|
30
|
-
const shouldRetry = error.code ===
|
|
30
|
+
const shouldRetry = error.code === "ECONNRESET" ||
|
|
31
|
+
error.code === "ETIMEDOUT" ||
|
|
32
|
+
(error.response && error.response.status >= 500);
|
|
31
33
|
if (shouldRetry && config.__retryCount < 3) {
|
|
32
34
|
config.__retryCount += 1;
|
|
33
35
|
const delay = Math.min(1000 * Math.pow(2, config.__retryCount), 8000);
|
|
@@ -327,7 +329,9 @@ class SenderMessage {
|
|
|
327
329
|
}));
|
|
328
330
|
}
|
|
329
331
|
catch (error) {
|
|
330
|
-
const msg = ((_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.response) === null || _e === void 0 ? void 0 : _e.message) ||
|
|
332
|
+
const msg = ((_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.response) === null || _e === void 0 ? void 0 : _e.message) ||
|
|
333
|
+
(error === null || error === void 0 ? void 0 : error.message) ||
|
|
334
|
+
"Unknown error";
|
|
331
335
|
console.error(`[sendButton Error] ${msg}`);
|
|
332
336
|
throw new Error(msg);
|
|
333
337
|
}
|
|
@@ -345,7 +349,9 @@ class SenderMessage {
|
|
|
345
349
|
}));
|
|
346
350
|
}
|
|
347
351
|
catch (error) {
|
|
348
|
-
const msg = ((_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.response) === null || _e === void 0 ? void 0 : _e.message) ||
|
|
352
|
+
const msg = ((_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.response) === null || _e === void 0 ? void 0 : _e.message) ||
|
|
353
|
+
(error === null || error === void 0 ? void 0 : error.message) ||
|
|
354
|
+
"Unknown error";
|
|
349
355
|
console.error(`[sendLocation Error] ${msg}`);
|
|
350
356
|
throw new Error(msg);
|
|
351
357
|
}
|
|
@@ -360,7 +366,9 @@ class SenderMessage {
|
|
|
360
366
|
}));
|
|
361
367
|
}
|
|
362
368
|
catch (error) {
|
|
363
|
-
const msg = ((_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.response) === null || _e === void 0 ? void 0 : _e.message) ||
|
|
369
|
+
const msg = ((_e = (_d = (_c = error === null || error === void 0 ? void 0 : error.response) === null || _c === void 0 ? void 0 : _c.data) === null || _d === void 0 ? void 0 : _d.response) === null || _e === void 0 ? void 0 : _e.message) ||
|
|
370
|
+
(error === null || error === void 0 ? void 0 : error.message) ||
|
|
371
|
+
"Unknown error";
|
|
364
372
|
console.error(`[sendReaction Error] ${msg}`);
|
|
365
373
|
throw new Error(msg);
|
|
366
374
|
}
|
package/build/utils/queueFlow.js
CHANGED
|
@@ -22,7 +22,7 @@ class QueueFlow extends events_1.EventEmitter {
|
|
|
22
22
|
// 1. Marcar como ignorado INMEDIATAMENTE
|
|
23
23
|
this.ignoredUsers.add(from);
|
|
24
24
|
// 2. Esperar un momento para que se registre el ignore
|
|
25
|
-
await new Promise(resolve => setTimeout(resolve, 100));
|
|
25
|
+
await new Promise((resolve) => setTimeout(resolve, 100));
|
|
26
26
|
// 3. Limpiar listeners
|
|
27
27
|
this.removeUserListeners(from);
|
|
28
28
|
// 4. Enviar flow para que ejecute endFlow correctamente
|
|
@@ -38,7 +38,8 @@ class QueueFlow extends events_1.EventEmitter {
|
|
|
38
38
|
this.config = {
|
|
39
39
|
warningTimeout: config.warningTimeout || 30 * 60 * 1000, // 30 minutes
|
|
40
40
|
endTimeout: config.endTimeout || 2 * 60 * 1000, // 2 minutes
|
|
41
|
-
warningMessage: config.warningMessage ||
|
|
41
|
+
warningMessage: config.warningMessage ||
|
|
42
|
+
"⏳ Parece que has estado inactivo. ¿Sigues ahí?",
|
|
42
43
|
};
|
|
43
44
|
}
|
|
44
45
|
static getInstance(config) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gamastudio/sendwave-provider",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.16",
|
|
4
4
|
"description": "Librería para interactuar con Sendwave usando configuración dinámica.",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"types": "build/index.d.ts",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"@gamastudio/colorslog": "^0.1.8",
|
|
27
27
|
"@types/mime-types": "^3.0.1",
|
|
28
28
|
"axios": "^1.13.2",
|
|
29
|
-
"body-parser": "^2.2.
|
|
29
|
+
"body-parser": "^2.2.1",
|
|
30
30
|
"cors": "^2.8.5",
|
|
31
|
-
"file-type": "^21.1.
|
|
32
|
-
"mime-types": "^3.0.
|
|
31
|
+
"file-type": "^21.1.1",
|
|
32
|
+
"mime-types": "^3.0.2",
|
|
33
33
|
"queue-promise": "^2.2.1",
|
|
34
34
|
"sirv": "^3.0.2"
|
|
35
35
|
},
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const htmlConnect: (img: any) => string;
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.htmlConnect = void 0;
|
|
4
|
-
const logo_1 = require("../../constants/svg/logo");
|
|
5
|
-
const wave_1 = require("../../constants/svg/wave");
|
|
6
|
-
const htmlConnect = (img) => `
|
|
7
|
-
<!DOCTYPE html>
|
|
8
|
-
<html lang="es">
|
|
9
|
-
<head>
|
|
10
|
-
<meta charset="UTF-8" />
|
|
11
|
-
<title>Sendwave Bot</title>
|
|
12
|
-
|
|
13
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
|
14
|
-
<script src="https://cdn.tailwindcss.com"></script>
|
|
15
|
-
</head>
|
|
16
|
-
<body class="w-dvw h-dvh bg-white text-slate-800 flex items-center justify-center h-screen relative overflow-hidden">
|
|
17
|
-
|
|
18
|
-
<div class="text-center bg-white/20 backdrop-blur-sm p-8 rounded-2xl z-10 shadow-lg max-w-md w-full flex flex-col items-center">
|
|
19
|
-
${logo_1.logosvg}
|
|
20
|
-
<h1 class="text-2xl font-bold text-cyan-700 my-2 leading-5">Proveedor activo, pero no vinculado</h1>
|
|
21
|
-
<p class="text-slate-500 my-4 leading-4 ">Tu instancia está funcionando correctamente,<br>pero aún no ha sido vinculada.</p>
|
|
22
|
-
<div class="bg-white p-2 mx-auto rounded-lg shadow-md border max-w-xs">
|
|
23
|
-
<img src="${img}" alt="Código QR para vincular" class="" />
|
|
24
|
-
</div>
|
|
25
|
-
|
|
26
|
-
<p class="py-2 text-slate-500 text-sm mb-4">Escanea el código QR para conectarla:</p>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
<!-- Olas decorativas -->
|
|
30
|
-
<div class="absolute bottom-0 left-0 w-full">
|
|
31
|
-
${wave_1.waveSvg}
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
</body>
|
|
35
|
-
</html>
|
|
36
|
-
`;
|
|
37
|
-
exports.htmlConnect = htmlConnect;
|