feat: Add TeleCart Pulse heartbeat telemetry

This commit is contained in:
2025-12-03 23:03:16 +03:00
parent 772efce242
commit b60c77e453
11 changed files with 202 additions and 5 deletions

View File

@@ -1,5 +1,5 @@
import {defineStore} from "pinia";
import {ingest, saveTelegramCustomer} from "@/utils/ftch.js";
import {ingest, saveTelegramCustomer, heartbeat} from "@/utils/ftch.js";
import {toRaw} from "vue";
import {deserializeStartParams} from "@/helpers.js";
@@ -46,5 +46,11 @@ export const usePulseStore = defineStore('pulse', {
.catch(() => console.warn('[Pulse] Failed to save Telegram customer data:', error));
}
},
heartbeat() {
heartbeat()
.then(() => console.debug('[Pulse] Heartbeat sent'))
.catch(err => console.warn('[Pulse] Heartbeat failed:', err));
}
},
});