import { DeviceCommunicationType } from '../model/model_enum_values.js'; import { StorageItemType } from '../model/model_enum_values.js'; import { DeviceStatus } from '../model/model_enum_values.js'; import { Permission } from '../model/model_enum_values.js'; import { GraphQLResolveInfo, GraphQLScalarType, GraphQLScalarTypeConfig } from 'graphql'; export type Maybe = T | null; export type InputMaybe = Maybe; export type Exact = { [K in keyof T]: T[K] }; export type MakeOptional = Omit & { [SubKey in K]?: Maybe }; export type MakeMaybe = Omit & { [SubKey in K]: Maybe }; export type MakeEmpty = { [_ in K]?: never }; export type Incremental = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never }; export type Omit = Pick>; export type EnumResolverSignature = { [key in keyof T]?: AllowedValues }; export type RequireFields = Omit & { [P in K]-?: NonNullable }; /** All built-in and custom scalars, mapped to their actual values */ export interface Scalars { ID: { input: string; output: string; } String: { input: string; output: string; } Boolean: { input: boolean; output: boolean; } Int: { input: number; output: number; } Float: { input: number; output: number; } DateTime: { input: any; output: any; } JSONObject: { input: any; output: any; } Time: { input: any; output: any; } } export interface ApiError extends Error { __typename?: 'ApiError'; args?: Maybe; code?: Maybe; data?: Maybe; message?: Maybe; path?: Maybe; } export interface CreateHost { deviceKey: Scalars['String']['input']; deviceType: Scalars['String']['input']; /** * groupNames is used to assign the created object * to a host group. It is mandatory but * can also be blank. This is usefull in case of * passing a groupid instead which is * the zabbix internal key for storing the group. * If a groupid is provided the passed groupName is ignored */ groupNames: Array; /** * Optionally the internal groupids can be passed - in this case the * groupName is ignored */ groupids?: InputMaybe>>; location?: InputMaybe; /** Optional display name of the device (must be unique if provided - default is to set display name to deviceKey) */ name?: InputMaybe; } export interface CreateHostGroup { /** Name of the host group */ groupName: Scalars['String']['input']; /** * Internally used unique id * (will be assigned by Zabbix if empty) */ uuid?: InputMaybe; } export interface CreateHostGroupResponse { __typename?: 'CreateHostGroupResponse'; error?: Maybe; groupName: Scalars['String']['output']; groupid?: Maybe; message?: Maybe; } export interface CreateHostResponse { __typename?: 'CreateHostResponse'; deviceKey: Scalars['String']['output']; error?: Maybe; hostid?: Maybe; message?: Maybe; } /** * (IoT / Edge - ) Devices are hosts having a state containing the "output" / the business data which is exposed * besides monitoring information. */ export interface Device { deviceType?: Maybe; /** Per convention a uuid is used as hostname to identify devices if they do not have a unique hostname */ host: Scalars['String']['output']; hostgroups?: Maybe>; hostid: Scalars['ID']['output']; name?: Maybe; state?: Maybe; tags?: Maybe; } export { DeviceCommunicationType }; export interface DeviceState { operational?: Maybe; } export { DeviceStatus }; export interface Error { code?: Maybe; data?: Maybe; message?: Maybe; } export interface ErrorPayload { __typename?: 'ErrorPayload'; additionalInfo?: Maybe; code: Scalars['Int']['output']; message?: Maybe; } /** Device represents generic IoT / Edge - devices providing their state as generic "state.current" - JSON Object */ export interface GenericDevice extends Device, Host { __typename?: 'GenericDevice'; deviceType?: Maybe; /** Per convention a uuid is used as hostname to identify devices if they do not have a unique hostname */ host: Scalars['String']['output']; hostgroups?: Maybe>; hostid: Scalars['ID']['output']; name?: Maybe; state?: Maybe; tags?: Maybe; } export interface GenericDeviceState extends DeviceState { __typename?: 'GenericDeviceState'; current?: Maybe; operational?: Maybe; } /** Hint: WGS84[dd.ddddd] coordinates are used */ export interface GpsPosition { latitude?: Maybe; longitude?: Maybe; } export interface HistoryExportResponse { __typename?: 'HistoryExportResponse'; error?: Maybe; result?: Maybe>; } export interface Host { deviceType?: Maybe; /** The host field contains the "hostname" in Zabbix */ host: Scalars['String']['output']; hostgroups?: Maybe>; hostid: Scalars['ID']['output']; name?: Maybe; tags?: Maybe; } export interface HostGroup { __typename?: 'HostGroup'; groupid: Scalars['ID']['output']; name?: Maybe; } export interface HostTypeMeta { __typename?: 'HostTypeMeta'; deviceType?: Maybe; deviceTypeDescription?: Maybe; } export interface ImportUserRightResult { __typename?: 'ImportUserRightResult'; errors?: Maybe>; id?: Maybe; message?: Maybe; name?: Maybe; } export interface ImportUserRightsResult { __typename?: 'ImportUserRightsResult'; userGroups?: Maybe>; userRoles?: Maybe>; } export interface Inventory { __typename?: 'Inventory'; location?: Maybe; } export interface Item { __typename?: 'Item'; attributeName?: Maybe; deviceType?: Maybe; hostid?: Maybe; hosts?: Maybe>>; itemid?: Maybe; key_?: Maybe; name: Scalars['String']['output']; status?: Maybe; topicType?: Maybe; type?: Maybe; } export interface Location extends GpsPosition { __typename?: 'Location'; latitude?: Maybe; longitude?: Maybe; name?: Maybe; } export interface LocationInput { location_lat?: InputMaybe; location_lon?: InputMaybe; name?: InputMaybe; } export interface Mutation { __typename?: 'Mutation'; /** Authentication: By zbx_session - cookie or zabbix-auth-token - header */ createHost?: Maybe; /** * (Mass) Import zabbix groups * and assign them to the corresponding hosts by groupid or groupName. * * Return value: If no error occurs a groupid be returned for each created group, * otherwise the return object will contain an error message * * Authentication: By zbx_session - cookie or zabbix-auth-token - header */ importHostGroups?: Maybe>; /** * (Mass) Import hosts and assign them to host groups by groupid or groupName. * * Return value: If no error occurs a hostid will be returned for each created host, * otherwise the return object will contain an error message. * * Authentication: By zbx_session - cookie or zabbix-auth-token - header */ importHosts?: Maybe>; importUserRights?: Maybe; } export interface MutationCreateHostArgs { host: Scalars['String']['input']; hostgroupids: Array; location?: InputMaybe; templateids: Array; } export interface MutationImportHostGroupsArgs { hostGroups: Array; } export interface MutationImportHostsArgs { hosts: Array; } export interface MutationImportUserRightsArgs { dryRun?: Scalars['Boolean']['input']; input: UserRightsInput; } export interface OperationalDeviceData { __typename?: 'OperationalDeviceData'; error?: Maybe>; location?: Maybe; signalstrength?: Maybe; temperature?: Maybe; timestamp?: Maybe; voltage?: Maybe; } export { Permission }; export interface PermissionRequest { /** * objectName maps to name / path suffix of the template group representing the permission in Zabbix: * Permissions/{objectName} */ objectName: Scalars['String']['input']; permission: Permission; } export interface Query { __typename?: 'Query'; /** * Get all host groups. * If with_hosts==true only groups with attached hosts are delivered. * * Authentication: By zbx_session - cookie or zabbix-auth-token - header */ allHostGroups?: Maybe>>; /** * Get all hosts + corresponding items. If with_items==true only hosts with attached items are delivered * name_pattern: If provided this will perform a LIKE "%…%" search on the name attribute within the database. * * Authentication: By zbx_session - cookie or zabbix-auth-token - header */ allHosts?: Maybe>>; /** Get api (build) version */ apiVersion: Scalars['String']['output']; /** * Export history from Zabbix items * * Authentication: By zbx_session - cookie or zabbix-auth-token - header */ exportHostValueHistory?: Maybe; /** * name_pattern: If provided this will perform a LIKE "%…%" search on the name attribute within the database. * exclude_groups_pattern: Regex allowing to exclude all matching hostgroups from group permissions */ exportUserRights?: Maybe; /** * Return true if and only if the current user (identified by token / cookie) * has all requested permissions (minimum - if READ is requested and the user has READ_WRITE * the response will be true) */ hasPermissions?: Maybe; /** * Get all locations used by hosts. * distinct_by_name=true means that the result is filtered for distinct names (default) * name_pattern: If provided this will perform a Regex search on the name attribute within the database. * * Authentication: By zbx_session - cookie or zabbix-auth-token - header */ locations?: Maybe>>; /** * Login to zabbix - provided for debugging and testing purpose. The result of the login operation is * authentication token returned may be passed as * header 'zabbix-auth-token' for authenticating future API requests. * As an alternative to the cookie 'zbx_session' may be set which is automatically set after login to * the cockpit - this is the standard way to authenticate api calls initiated by the cockpit frontend * because the frontend is always embedded into the Zabbix portal which is only accessible after logging in and * obtainind the zbx_session - cookie. */ login?: Maybe; /** * Logout from zabbix - provided for debugging and testing purpose. This invalidates the token received by the login * operation. Returns true on success */ logout?: Maybe; /** * Return all user permissions. If objectNames is provided return only the permissions related to the objects within * the objectNames - list */ userPermissions?: Maybe>; /** Get zabbix version */ zabbixVersion?: Maybe; } export interface QueryAllHostGroupsArgs { search_name?: InputMaybe; with_hosts?: InputMaybe; } export interface QueryAllHostsArgs { filter_host?: InputMaybe; groupids?: InputMaybe>; hostids?: InputMaybe; name_pattern?: InputMaybe; tag_deviceType?: InputMaybe>>; tag_hostType?: InputMaybe>; with_items?: InputMaybe; } export interface QueryExportHostValueHistoryArgs { host_filter?: InputMaybe>; itemKey_filter?: InputMaybe>; limit?: InputMaybe; sortOrder?: InputMaybe; time_from?: InputMaybe; time_until?: InputMaybe; type?: InputMaybe; } export interface QueryExportUserRightsArgs { exclude_hostgroups_pattern?: InputMaybe; name_pattern?: InputMaybe; } export interface QueryHasPermissionsArgs { permissions: Array; } export interface QueryLocationsArgs { distinct_by_name?: InputMaybe; name_pattern?: InputMaybe; templateids?: InputMaybe>>; } export interface QueryLoginArgs { password: Scalars['String']['input']; username: Scalars['String']['input']; } export interface QueryUserPermissionsArgs { objectNames?: InputMaybe>; } export enum SensorValueType { Character = 'CHARACTER', Log = 'LOG', Numeric = 'NUMERIC', NumericUnsigned = 'NUMERIC_UNSIGNED', Text = 'TEXT' } export enum SortOrder { /** Deliver values in ascending order */ Asc = 'asc', /** Deliver values in descending order */ Desc = 'desc' } export { StorageItemType }; export interface Template { __typename?: 'Template'; name?: Maybe; templateid: Scalars['String']['output']; } export interface UserGroup { __typename?: 'UserGroup'; gui_access?: Maybe; hostgroup_rights?: Maybe>; name: Scalars['String']['output']; templategroup_rights?: Maybe>; users_status?: Maybe; usrgrpid: Scalars['Int']['output']; } export interface UserGroupInput { gui_access?: InputMaybe; hostgroup_rights?: InputMaybe>; name: Scalars['String']['input']; templategroup_rights?: InputMaybe>; users_status?: InputMaybe; } export interface UserPermission { __typename?: 'UserPermission'; /** * objectName maps to name / path suffix of the template group representing the permission in Zabbix: * Permissions/{objectName} */ objectName: Scalars['String']['output']; permission: Permission; } export interface UserRights { __typename?: 'UserRights'; userGroups?: Maybe>; userRoles?: Maybe>; } export interface UserRightsInput { userGroups?: InputMaybe>; userRoles?: InputMaybe>; } export interface UserRole { __typename?: 'UserRole'; name?: Maybe; readonly?: Maybe; roleid: Scalars['Int']['output']; rules?: Maybe; type?: Maybe; } export interface UserRoleInput { name?: InputMaybe; readonly?: InputMaybe; rules?: InputMaybe; type?: InputMaybe; } export interface UserRoleModule { __typename?: 'UserRoleModule'; id?: Maybe; moduleid?: Maybe; relative_path?: Maybe; status?: Maybe; } export interface UserRoleModuleInput { id?: InputMaybe; moduleid?: InputMaybe; status?: InputMaybe; } export interface UserRoleRule { __typename?: 'UserRoleRule'; name?: Maybe; status?: Maybe; } export interface UserRoleRuleInput { name?: InputMaybe; status?: InputMaybe; } export interface UserRoleRules { __typename?: 'UserRoleRules'; actions?: Maybe>; actions_default_access?: Maybe; api?: Maybe>; api_access?: Maybe; api_mode?: Maybe; modules?: Maybe>; modules_default_access?: Maybe; ui?: Maybe>; ui_default_access?: Maybe; } export interface UserRoleRulesInput { actions?: InputMaybe>; actions_default_access?: InputMaybe; api?: InputMaybe>; api_access?: InputMaybe; api_mode?: InputMaybe; modules?: InputMaybe>; modules_default_access?: InputMaybe; ui?: InputMaybe>; ui_default_access?: InputMaybe; } export interface ZabbixCreateResponse { __typename?: 'ZabbixCreateResponse'; error?: Maybe; hostids?: Maybe>>; itemids?: Maybe>>; } export interface ZabbixGroupRight { __typename?: 'ZabbixGroupRight'; id: Scalars['Int']['output']; name?: Maybe; permission?: Maybe; uuid?: Maybe; } export interface ZabbixGroupRightInput { /** * name may optionally be specified for documentation purpose, * but the master for setting the user right is the uuid. * If a uuid is found and the corresponding group * has a deviating name this will be documented within a message * with errorcode = 0 (OK) but the permission will be set ( * the reason is that names for groups may deviate between several * instances of the control center although the semantic is the same - * while the semantic is identified by uuid. */ name?: InputMaybe; permission?: InputMaybe; uuid?: InputMaybe; } export interface ZabbixHost extends Host { __typename?: 'ZabbixHost'; deviceType?: Maybe; host: Scalars['String']['output']; hostgroups?: Maybe>; hostid: Scalars['ID']['output']; inventory?: Maybe; items?: Maybe>; name?: Maybe; parentTemplates?: Maybe>; tags?: Maybe; } export interface ZabbixItem { __typename?: 'ZabbixItem'; attributeName?: Maybe; deviceType?: Maybe; hostid?: Maybe; hosts?: Maybe>>; itemid: Scalars['Int']['output']; key_: Scalars['String']['output']; lastclock?: Maybe; lastvalue?: Maybe; name: Scalars['String']['output']; status?: Maybe; topicType?: Maybe; type?: Maybe; value_type: Scalars['Int']['output']; } export type ResolverTypeWrapper = Promise | T; export type ResolverWithResolve = { resolve: ResolverFn; }; export type Resolver = ResolverFn | ResolverWithResolve; export type ResolverFn = ( parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo ) => Promise | TResult; export type SubscriptionSubscribeFn = ( parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo ) => AsyncIterable | Promise>; export type SubscriptionResolveFn = ( parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo ) => TResult | Promise; export interface SubscriptionSubscriberObject { subscribe: SubscriptionSubscribeFn<{ [key in TKey]: TResult }, TParent, TContext, TArgs>; resolve?: SubscriptionResolveFn; } export interface SubscriptionResolverObject { subscribe: SubscriptionSubscribeFn; resolve: SubscriptionResolveFn; } export type SubscriptionObject = | SubscriptionSubscriberObject | SubscriptionResolverObject; export type SubscriptionResolver = | ((...args: any[]) => SubscriptionObject) | SubscriptionObject; export type TypeResolveFn = ( parent: TParent, context: TContext, info: GraphQLResolveInfo ) => Maybe | Promise>; export type IsTypeOfResolverFn = (obj: T, context: TContext, info: GraphQLResolveInfo) => boolean | Promise; export type NextResolverFn = () => Promise; export type DirectiveResolverFn = ( next: NextResolverFn, parent: TParent, args: TArgs, context: TContext, info: GraphQLResolveInfo ) => TResult | Promise; /** Mapping of interface types */ export type ResolversInterfaceTypes<_RefType extends Record> = { Device: ( GenericDevice ); DeviceState: ( GenericDeviceState ); Error: ( ApiError ); GpsPosition: ( Location ); Host: ( GenericDevice ) | ( Omit & { items?: Maybe> } ); }; /** Mapping between all available schema types and the resolvers types */ export type ResolversTypes = { ApiError: ResolverTypeWrapper; Boolean: ResolverTypeWrapper; CreateHost: CreateHost; CreateHostGroup: CreateHostGroup; CreateHostGroupResponse: ResolverTypeWrapper; CreateHostResponse: ResolverTypeWrapper; DateTime: ResolverTypeWrapper; Device: ResolverTypeWrapper['Device']>; DeviceCommunicationType: DeviceCommunicationType; DeviceState: ResolverTypeWrapper['DeviceState']>; DeviceStatus: DeviceStatus; Error: ResolverTypeWrapper['Error']>; ErrorPayload: ResolverTypeWrapper; Float: ResolverTypeWrapper; GenericDevice: ResolverTypeWrapper; GenericDeviceState: ResolverTypeWrapper; GpsPosition: ResolverTypeWrapper['GpsPosition']>; HistoryExportResponse: ResolverTypeWrapper; Host: ResolverTypeWrapper['Host']>; HostGroup: ResolverTypeWrapper; HostTypeMeta: ResolverTypeWrapper; ID: ResolverTypeWrapper; ImportUserRightResult: ResolverTypeWrapper; ImportUserRightsResult: ResolverTypeWrapper; Int: ResolverTypeWrapper; Inventory: ResolverTypeWrapper; Item: ResolverTypeWrapper & { hosts?: Maybe>> }>; JSONObject: ResolverTypeWrapper; Location: ResolverTypeWrapper; LocationInput: LocationInput; Mutation: ResolverTypeWrapper<{}>; OperationalDeviceData: ResolverTypeWrapper; Permission: Permission; PermissionRequest: PermissionRequest; Query: ResolverTypeWrapper<{}>; SensorValueType: SensorValueType; SortOrder: SortOrder; StorageItemType: StorageItemType; String: ResolverTypeWrapper; Template: ResolverTypeWrapper