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

@ -17,8 +17,18 @@ import {
import {isZabbixErrorResult, ParsedArgs, ZabbixErrorResult} from "../datasources/zabbix-request.js";
import {zabbixAPI} from "../datasources/zabbix-api.js";
/**
* Handles importing templates and template groups into Zabbix.
*/
export class TemplateImporter {
/**
* Imports template groups into Zabbix.
* @param templateGroups - The list of template groups to import.
* @param zabbixAuthToken - Optional Zabbix authentication token.
* @param cookie - Optional session cookie.
* @returns A promise that resolves to an array of import responses.
*/
public static async importTemplateGroups(templateGroups: InputMaybe<Array<CreateTemplateGroup>> | undefined, zabbixAuthToken?: string, cookie?: string) {
if (!templateGroups) {
return null
@ -79,6 +89,13 @@ export class TemplateImporter {
return result
}
/**
* Imports templates into Zabbix, including their items and linked templates.
* @param templates - The list of templates to import.
* @param zabbixAuthToken - Optional Zabbix authentication token.
* @param cookie - Optional session cookie.
* @returns A promise that resolves to an array of import responses.
*/
public static async importTemplates(templates: InputMaybe<Array<CreateTemplate>> | undefined, zabbixAuthToken?: string, cookie?: string) {
if (!templates) {
return null