@kaikybrofc/omnizap-system 2.3.4 → 2.3.5
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/README.md +14 -14
- package/app/modules/stickerModule/stickerCommand.js +1 -6
- package/app/modules/stickerModule/stickerTextCommand.js +1 -6
- package/package.json +1 -1
- package/public/index.html +8 -8
- package/public/js/apps/homeApp.js +22 -18
- package/public/js/apps/loginApp.js +3 -1
- package/public/js/apps/userProfileApp.js +0 -9
- package/public/user/index.html +224 -120
- package/server/controllers/admin/adminBanService.js +138 -0
- package/server/controllers/admin/adminPanelHandlers.js +1965 -0
- package/server/controllers/{systemAdminController.js → admin/systemAdminController.js} +2 -2
- package/server/controllers/{stickerCatalogController.js → sticker/stickerCatalogController.js} +129 -2116
- package/server/controllers/userController.js +1 -1
- package/server/routes/admin/systemAdminRouter.js +1 -1
- package/server/routes/indexRouter.js +3 -3
- package/server/routes/{stickerCatalog → sticker}/stickerApiRouter.js +1 -1
- package/server/routes/{stickerCatalog → sticker}/stickerDataRouter.js +1 -1
- package/server/routes/{stickerCatalog → sticker}/stickerSiteRouter.js +1 -1
- /package/server/controllers/{stickerCatalog → sticker}/nonCatalogHandlers.js +0 -0
- /package/server/routes/{stickerCatalog → sticker}/catalogHandlers/catalogAdminHttp.js +0 -0
- /package/server/routes/{stickerCatalog → sticker}/catalogHandlers/catalogAuthHttp.js +0 -0
- /package/server/routes/{stickerCatalog → sticker}/catalogHandlers/catalogPublicHttp.js +0 -0
- /package/server/routes/{stickerCatalog → sticker}/catalogHandlers/catalogUploadHttp.js +0 -0
- /package/server/routes/{stickerCatalog → sticker}/catalogRouter.js +0 -0
package/README.md
CHANGED
|
@@ -78,27 +78,27 @@ Este bloco pode ser atualizado automaticamente pela API (`/api/sticker-packs/rea
|
|
|
78
78
|
<!-- README_SNAPSHOT:START -->
|
|
79
79
|
### Snapshot do Sistema
|
|
80
80
|
|
|
81
|
-
> Atualizado em `2026-03-
|
|
81
|
+
> Atualizado em `2026-03-02T03:59:47.711Z` | cache `1800s`
|
|
82
82
|
|
|
83
83
|
| Métrica | Valor |
|
|
84
84
|
| --- | ---: |
|
|
85
|
-
| Usuários (lid_map) | 5.
|
|
86
|
-
| Grupos |
|
|
87
|
-
| Packs |
|
|
88
|
-
| Stickers |
|
|
89
|
-
| Mensagens registradas |
|
|
85
|
+
| Usuários (lid_map) | 5.529 |
|
|
86
|
+
| Grupos | 118 |
|
|
87
|
+
| Packs | 318 |
|
|
88
|
+
| Stickers | 8.020 |
|
|
89
|
+
| Mensagens registradas | 453.847 |
|
|
90
90
|
|
|
91
91
|
#### Tipos de mensagem mais usados (amostra: 25.000)
|
|
92
92
|
| Tipo | Total |
|
|
93
93
|
| --- | ---: |
|
|
94
|
-
| `texto` |
|
|
95
|
-
| `figurinha` | 4.
|
|
96
|
-
| `reacao` | 1.
|
|
97
|
-
| `imagem` | 1.
|
|
98
|
-
| `outros` | 1.
|
|
99
|
-
| `video` |
|
|
100
|
-
| `audio` |
|
|
101
|
-
| `documento` |
|
|
94
|
+
| `texto` | 15.317 |
|
|
95
|
+
| `figurinha` | 4.895 |
|
|
96
|
+
| `reacao` | 1.810 |
|
|
97
|
+
| `imagem` | 1.511 |
|
|
98
|
+
| `outros` | 1.079 |
|
|
99
|
+
| `video` | 205 |
|
|
100
|
+
| `audio` | 178 |
|
|
101
|
+
| `documento` | 5 |
|
|
102
102
|
|
|
103
103
|
<details><summary>Comandos disponíveis (62)</summary>
|
|
104
104
|
|
|
@@ -223,12 +223,7 @@ function buildAutoPackNoticeText(result, commandPrefix = DEFAULT_COMMAND_PREFIX)
|
|
|
223
223
|
return duplicateLines.join('\n');
|
|
224
224
|
}
|
|
225
225
|
|
|
226
|
-
const savedLines = [
|
|
227
|
-
`✅ Figurinha adicionada ao pack *${packName}*${countLabel}.`,
|
|
228
|
-
'',
|
|
229
|
-
`📋 Gerencie seus packs com *${commandPrefix}pack list*.`,
|
|
230
|
-
`🚀 Envie agora com *${commandPrefix}pack send ${packCommandTarget}*.`,
|
|
231
|
-
];
|
|
226
|
+
const savedLines = [`✅ Figurinha adicionada ao pack *${packName}*${countLabel}.`, '', `📋 Gerencie seus packs com *${commandPrefix}pack list*.`, `🚀 Envie agora com *${commandPrefix}pack send ${packCommandTarget}*.`];
|
|
232
227
|
if (packWebUrl) {
|
|
233
228
|
savedLines.push(`🌐 Veja no site: ${packWebUrl}`);
|
|
234
229
|
} else {
|
|
@@ -150,12 +150,7 @@ function buildAutoPackNoticeText(result, commandPrefix = DEFAULT_COMMAND_PREFIX)
|
|
|
150
150
|
return duplicateLines.join('\n');
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
const savedLines = [
|
|
154
|
-
`✅ Figurinha adicionada ao pack *${packName}*${countLabel}.`,
|
|
155
|
-
'',
|
|
156
|
-
`📋 Gerencie seus packs com *${commandPrefix}pack list*.`,
|
|
157
|
-
`🚀 Envie agora com *${commandPrefix}pack send ${packCommandTarget}*.`,
|
|
158
|
-
];
|
|
153
|
+
const savedLines = [`✅ Figurinha adicionada ao pack *${packName}*${countLabel}.`, '', `📋 Gerencie seus packs com *${commandPrefix}pack list*.`, `🚀 Envie agora com *${commandPrefix}pack send ${packCommandTarget}*.`];
|
|
159
154
|
if (packWebUrl) {
|
|
160
155
|
savedLines.push(`🌐 Veja no site: ${packWebUrl}`);
|
|
161
156
|
} else {
|
package/package.json
CHANGED
package/public/index.html
CHANGED
|
@@ -880,20 +880,20 @@
|
|
|
880
880
|
|
|
881
881
|
<div class="proof-grid" aria-label="Prova social">
|
|
882
882
|
<article class="proof">
|
|
883
|
-
<strong id="proof-
|
|
884
|
-
<span>
|
|
883
|
+
<strong id="proof-users-total">--</strong>
|
|
884
|
+
<span>usuarios no sistema</span>
|
|
885
885
|
</article>
|
|
886
886
|
<article class="proof">
|
|
887
|
-
<strong id="proof-messages-
|
|
888
|
-
<span>mensagens
|
|
887
|
+
<strong id="proof-messages-total">--</strong>
|
|
888
|
+
<span>mensagens totais</span>
|
|
889
889
|
</article>
|
|
890
890
|
<article class="proof">
|
|
891
|
-
<strong id="proof-
|
|
892
|
-
<span>
|
|
891
|
+
<strong id="proof-commands-total">--</strong>
|
|
892
|
+
<span>comandos usados totais</span>
|
|
893
893
|
</article>
|
|
894
894
|
<article class="proof">
|
|
895
|
-
<strong id="proof-
|
|
896
|
-
<span>
|
|
895
|
+
<strong id="proof-system-latency">--</strong>
|
|
896
|
+
<span>latencia do sistema</span>
|
|
897
897
|
</article>
|
|
898
898
|
</div>
|
|
899
899
|
</div>
|
|
@@ -462,19 +462,19 @@ const initAddBotCtas = () => {
|
|
|
462
462
|
};
|
|
463
463
|
|
|
464
464
|
const initSocialProof = () => {
|
|
465
|
-
const
|
|
466
|
-
const
|
|
467
|
-
const
|
|
468
|
-
const
|
|
465
|
+
const usersTotalEl = document.getElementById('proof-users-total');
|
|
466
|
+
const messagesTotalEl = document.getElementById('proof-messages-total');
|
|
467
|
+
const commandsTotalEl = document.getElementById('proof-commands-total');
|
|
468
|
+
const latencyEl = document.getElementById('proof-system-latency');
|
|
469
469
|
const statusEl = document.getElementById('proof-status');
|
|
470
470
|
|
|
471
|
-
if (!
|
|
471
|
+
if (!usersTotalEl || !messagesTotalEl || !commandsTotalEl || !latencyEl) return null;
|
|
472
472
|
|
|
473
473
|
const setFallback = () => {
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
474
|
+
usersTotalEl.textContent = 'n/d';
|
|
475
|
+
messagesTotalEl.textContent = 'n/d';
|
|
476
|
+
commandsTotalEl.textContent = 'n/d';
|
|
477
|
+
latencyEl.textContent = 'n/d';
|
|
478
478
|
if (statusEl) statusEl.textContent = 'bot pronto';
|
|
479
479
|
};
|
|
480
480
|
|
|
@@ -504,20 +504,24 @@ const initSocialProof = () => {
|
|
|
504
504
|
animateCountUp(element, numeric);
|
|
505
505
|
};
|
|
506
506
|
|
|
507
|
+
const setLatencyMetric = (element, value) => {
|
|
508
|
+
const numeric = Number(value);
|
|
509
|
+
if (!Number.isFinite(numeric)) {
|
|
510
|
+
element.textContent = 'n/d';
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
element.textContent = `${Math.max(0, Math.round(numeric))} ms`;
|
|
514
|
+
};
|
|
515
|
+
|
|
507
516
|
const refreshMetrics = async ({ forceRefresh = false, animate = false } = {}) => {
|
|
508
517
|
const bootstrapData = await fetchHomeBootstrapPayload({ forceRefresh });
|
|
509
518
|
const summary = bootstrapData?.system_summary || {};
|
|
510
519
|
const realtime = bootstrapData?.home_realtime || {};
|
|
511
520
|
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
setNumericMetric(botsOnlineEl, botsOnline, { animate });
|
|
518
|
-
setNumericMetric(messagesTodayEl, messagesToday, { animate });
|
|
519
|
-
setNumericMetric(spamBlockedEl, spamBlockedToday, { animate });
|
|
520
|
-
uptimeEl.textContent = uptime;
|
|
521
|
+
setNumericMetric(usersTotalEl, realtime?.total_users, { animate });
|
|
522
|
+
setNumericMetric(messagesTotalEl, realtime?.total_messages, { animate });
|
|
523
|
+
setNumericMetric(commandsTotalEl, realtime?.total_commands, { animate });
|
|
524
|
+
setLatencyMetric(latencyEl, realtime?.system_latency_ms);
|
|
521
525
|
|
|
522
526
|
if (statusEl) {
|
|
523
527
|
statusEl.textContent = `bot ${normalizeStatus(summary?.system_status || summary?.bot?.connection_status)}`;
|
|
@@ -72,7 +72,9 @@ if (root) {
|
|
|
72
72
|
const isAuthenticatedGoogleSession = (sessionData) => {
|
|
73
73
|
if (!sessionData || typeof sessionData !== 'object') return false;
|
|
74
74
|
if (!isAuthenticatedFlagEnabled(sessionData.authenticated)) return false;
|
|
75
|
-
const provider = String(sessionData.provider || '')
|
|
75
|
+
const provider = String(sessionData.provider || '')
|
|
76
|
+
.trim()
|
|
77
|
+
.toLowerCase();
|
|
76
78
|
if (provider && provider !== 'google') return false;
|
|
77
79
|
const ownerJid = String(sessionData.owner_jid || '').trim();
|
|
78
80
|
const userSub = String(sessionData?.user?.sub || '').trim();
|
|
@@ -21,10 +21,6 @@ if (root) {
|
|
|
21
21
|
metricStickers: document.getElementById('metric-stickers'),
|
|
22
22
|
metricDownloads: document.getElementById('metric-downloads'),
|
|
23
23
|
metricLikes: document.getElementById('metric-likes'),
|
|
24
|
-
summary: document.getElementById('user-summary'),
|
|
25
|
-
ownerJid: document.getElementById('user-owner-jid'),
|
|
26
|
-
googleSub: document.getElementById('user-google-sub'),
|
|
27
|
-
expiresAt: document.getElementById('user-expires-at'),
|
|
28
24
|
actions: document.getElementById('user-actions'),
|
|
29
25
|
chatLink: document.getElementById('user-chat-link'),
|
|
30
26
|
logoutBtn: document.getElementById('user-logout-btn'),
|
|
@@ -150,12 +146,7 @@ if (root) {
|
|
|
150
146
|
};
|
|
151
147
|
}
|
|
152
148
|
|
|
153
|
-
setText(ui.ownerJid, ownerJid || 'n/d');
|
|
154
|
-
setText(ui.googleSub, String(user?.sub || '').trim() || 'n/d');
|
|
155
|
-
setText(ui.expiresAt, formatDateTime(sessionData?.expires_at));
|
|
156
|
-
|
|
157
149
|
if (ui.profile) ui.profile.hidden = false;
|
|
158
|
-
if (ui.summary) ui.summary.hidden = false;
|
|
159
150
|
if (ui.actions) ui.actions.hidden = false;
|
|
160
151
|
};
|
|
161
152
|
|