docs: add TSDoc to core components

- Added detailed JSDoc documentation to all core datasource classes in src/datasources/

- Documented execution logic classes in src/execution/

- Added TSDoc to API utility functions and resolvers in src/api/

- Documented shared models and enums in src/model/
This commit is contained in:
Andreas Hilbig 2026-02-11 13:32:28 +01:00
parent 3c3cb7c753
commit 0acef818c6
27 changed files with 689 additions and 19 deletions

View file

@ -7,7 +7,19 @@ import {zabbixAPI} from "../datasources/zabbix-api.js";
import {ZabbixQueryHostsGenericRequest} from "../datasources/zabbix-hosts.js";
import {ParsedArgs} from "../datasources/zabbix-request.js";
/**
* Handles the execution of a complete smoketest in Zabbix.
*/
export class SmoketestExecutor {
/**
* Runs a smoketest by creating a template, host group, and host, verifying their creation and linkage, and then cleaning up.
* @param hostName - The technical name of the host to create during the test.
* @param templateName - The technical name of the template to create during the test.
* @param groupName - The technical name of the host group to create during the test.
* @param zabbixAuthToken - Optional Zabbix authentication token.
* @param cookie - Optional session cookie.
* @returns A promise that resolves to a smoketest response containing the success status and detailed steps.
*/
public static async runSmoketest(hostName: string, templateName: string, groupName: string, zabbixAuthToken?: string, cookie?: string): Promise<SmoketestResponse> {
const steps: SmoketestStep[] = [];
let success = true;