import { gql } from 'apollo-angular';
import { Injectable } from '@angular/core';
import * as Apollo from 'apollo-angular';
export type Maybe<T> = T | null;
export type InputMaybe<T> = Maybe<T>;
export type Exact<T extends { [key: string]: unknown }> = { [K in keyof T]: T[K] };
export type MakeOptional<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]?: Maybe<T[SubKey]> };
export type MakeMaybe<T, K extends keyof T> = Omit<T, K> & { [SubKey in K]: Maybe<T[SubKey]> };
export type MakeEmpty<T extends { [key: string]: unknown }, K extends keyof T> = { [_ in K]?: never };
export type Incremental<T> = T | { [P in keyof T]?: P extends ' $fragmentName' | '__typename' ? T[P] : never };
/** All built-in and custom scalars, mapped to their actual values */
export type 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; }
  /** A date-time string at UTC, such as 2019-12-03T09:54:33Z, compliant with the date-time format. */
  DateTime: { input: any; output: any; }
};

export type AccountingFilterArgs = {
  deviation?: InputMaybe<Array<Scalars['String']['input']>>;
  missing?: InputMaybe<Array<Scalars['String']['input']>>;
};

export enum AccountingState {
  Billable = 'Billable',
  Billed = 'Billed',
  PreparedForBilling = 'PreparedForBilling'
}

export type Anomaly = {
  __typename?: 'Anomaly';
  createdAt: Scalars['DateTime']['output'];
  description: Scalars['String']['output'];
  groupDescription: Scalars['String']['output'];
  groupKey: Scalars['String']['output'];
  id: Scalars['String']['output'];
  manuallyResolved?: Maybe<Scalars['Boolean']['output']>;
  resolvedAt?: Maybe<Scalars['DateTime']['output']>;
  sleepSince?: Maybe<Scalars['DateTime']['output']>;
  sleepTimer: Scalars['Int']['output'];
  solution: Array<SolutionTarget>;
  type: Scalars['String']['output'];
  workedOnBy: Scalars['String']['output'];
};

export type AnomalyGroup = {
  __typename?: 'AnomalyGroup';
  anomalies: Array<Anomaly>;
  key: Scalars['String']['output'];
};

export type ApprovalInfo = {
  __typename?: 'ApprovalInfo';
  answeredFrom?: Maybe<Scalars['String']['output']>;
  isNeeded?: Maybe<Scalars['Boolean']['output']>;
  location?: Maybe<Scalars['String']['output']>;
  whoRequested?: Maybe<Scalars['String']['output']>;
};

export type ApprovalInfoArgs = {
  answeredFrom?: InputMaybe<Scalars['String']['input']>;
  isNeeded?: InputMaybe<Scalars['Boolean']['input']>;
  location?: InputMaybe<Scalars['String']['input']>;
  whoRequested?: InputMaybe<Scalars['String']['input']>;
};

export enum ApprovalState {
  Approved = 'APPROVED',
  Free = 'FREE',
  Requested = 'REQUESTED',
  Required = 'REQUIRED',
  Unknown = 'UNKNOWN'
}

export type AssociatedEntities = {
  __typename?: 'AssociatedEntities';
  attendanceRegistration?: Maybe<Array<AttendanceRegistration>>;
  employee?: Maybe<Array<Employee>>;
  plannedTime?: Maybe<Array<PlannedTime>>;
  tour?: Maybe<Array<Tour>>;
  workTime?: Maybe<Array<WorkTime>>;
};

export type AttendanceRegistration = {
  __typename?: 'AttendanceRegistration';
  attendanceRegistrationId: Scalars['Int']['output'];
  dateTime: Scalars['DateTime']['output'];
  employeeId: Scalars['Int']['output'];
  event: Scalars['String']['output'];
  personnelNumber: Scalars['String']['output'];
};

export type DocumentInfo = {
  __typename?: 'DocumentInfo';
  approval: ApprovalInfo;
  tdLocation?: Maybe<Scalars['String']['output']>;
};

export type Employee = {
  __typename?: 'Employee';
  id: Scalars['String']['output'];
  name: Scalars['String']['output'];
  occuptationalHealthExamination?: Maybe<Scalars['DateTime']['output']>;
  personTransportCertificate?: Maybe<Scalars['DateTime']['output']>;
  personnelNumber: Scalars['String']['output'];
  qualification?: Maybe<Scalars['String']['output']>;
  surname: Scalars['String']['output'];
};

export type HomeDashboardKpIs = {
  __typename?: 'HomeDashboardKPIs';
  anomalyCount: Scalars['Int']['output'];
  billableTourCount: Scalars['Int']['output'];
  billableTourRevenueSum: Scalars['Float']['output'];
  billedTourCount: Scalars['Int']['output'];
  billedTourNegativeRevenueDeviation: Scalars['Float']['output'];
  billedTourPositiveRevenueDeviation: Scalars['Float']['output'];
  employeesWithoutTourCount: Scalars['Int']['output'];
  revenueTrend: Array<RevenueTrend>;
  toursWithoutApprovalCount: Scalars['Int']['output'];
};

export type Interval = {
  __typename?: 'Interval';
  end: Scalars['DateTime']['output'];
  start: Scalars['DateTime']['output'];
};

export type Kpi = {
  __typename?: 'KPI';
  meta: KpiMetadata;
  value: Scalars['Float']['output'];
};

export type KpiByCar = {
  __typename?: 'KPIByCar';
  carName: Scalars['String']['output'];
  kpi: Kpi;
};

export type KpiMetadata = {
  __typename?: 'KPIMetadata';
  availableTime: Scalars['Float']['output'];
  baseValue: Scalars['Float']['output'];
  breakEven: Scalars['Float']['output'];
  tourAmount: Scalars['Float']['output'];
};

export type KpiInfo = {
  __typename?: 'KpiInfo';
  additional: Array<Metric>;
  main: Metric;
  secondary: Metric;
};

export type Metric = {
  __typename?: 'Metric';
  label: Scalars['String']['output'];
  value: Scalars['Float']['output'];
};

export type Mutation = {
  __typename?: 'Mutation';
  acceptAnomaly: Anomaly;
  setAnomalyToSleep: Anomaly;
  setDocumentInfo: Ticket;
};


export type MutationAcceptAnomalyArgs = {
  id: Scalars['String']['input'];
};


export type MutationSetAnomalyToSleepArgs = {
  id: Scalars['String']['input'];
};


export type MutationSetDocumentInfoArgs = {
  approval?: InputMaybe<ApprovalInfoArgs>;
  tdLocation?: InputMaybe<Scalars['String']['input']>;
  ticketId: Scalars['String']['input'];
};

export type PaginatedAnomaly = {
  __typename?: 'PaginatedAnomaly';
  endCursor: Scalars['String']['output'];
  hasNextPage: Scalars['Boolean']['output'];
  nodes: Array<Anomaly>;
  prevCursor: Scalars['String']['output'];
  totalCount: Scalars['Int']['output'];
};

export type PaginatedAnomalyGroup = {
  __typename?: 'PaginatedAnomalyGroup';
  endCursor: Scalars['String']['output'];
  hasNextPage: Scalars['Boolean']['output'];
  nodes: Array<AnomalyGroup>;
  prevCursor: Scalars['String']['output'];
  totalCount: Scalars['Int']['output'];
};

export type PaginatedTicket = {
  __typename?: 'PaginatedTicket';
  endCursor: Scalars['String']['output'];
  hasNextPage: Scalars['Boolean']['output'];
  nodes: Array<Ticket>;
  prevCursor: Scalars['String']['output'];
  totalCount: Scalars['Int']['output'];
};

export type PaginatedTour = {
  __typename?: 'PaginatedTour';
  endCursor: Scalars['String']['output'];
  hasNextPage: Scalars['Boolean']['output'];
  nodes: Array<Tour>;
  prevCursor: Scalars['String']['output'];
  totalCount: Scalars['Int']['output'];
};

export type PlannedTime = {
  __typename?: 'PlannedTime';
  department: Scalars['String']['output'];
  duration: Scalars['Int']['output'];
  endDate: Scalars['DateTime']['output'];
  firstname: Scalars['String']['output'];
  id: Scalars['String']['output'];
  note?: Maybe<Scalars['String']['output']>;
  pause: Scalars['Int']['output'];
  startDate: Scalars['DateTime']['output'];
  surname: Scalars['String']['output'];
  userId: Scalars['String']['output'];
};

export type Query = {
  __typename?: 'Query';
  accountingStateMeta: TourStateMeta;
  accountingTours: PaginatedTour;
  anomalies: PaginatedAnomaly;
  anomaliesProto: Array<Anomaly>;
  anomaly: Anomaly;
  associatedEntities: AssociatedEntities;
  groupedAnomalies: PaginatedAnomalyGroup;
  homeDashboardKpis: HomeDashboardKpIs;
  managerKpi: KpiInfo;
  searchTickets: Array<Ticket>;
  ticket: Ticket;
  ticketStateKeyFigures: TicketStateKeyFigures;
  ticketStateKpi: KpiInfo;
  ticketStateMeta: TicketStateMeta;
  tickets: PaginatedTicket;
  timePerTourMetricForDay: Array<TimePerTourMetric>;
  timePerTourMetricForMonth: Array<TimePerTourMetric>;
  tourCostBreakdown: TourCostBreakdown;
  toursPerTimeKPI: Array<TimePerTourKpiSummary>;
  upcomingTours: Array<Tour>;
};


export type QueryAccountingStateMetaArgs = {
  state: AccountingState;
};


export type QueryAccountingToursArgs = {
  cursor?: InputMaybe<Scalars['String']['input']>;
  filters?: InputMaybe<AccountingFilterArgs>;
  state: AccountingState;
  take?: Scalars['Int']['input'];
};


export type QueryAnomaliesArgs = {
  cursor?: InputMaybe<Scalars['String']['input']>;
  take?: Scalars['Int']['input'];
};


export type QueryAnomalyArgs = {
  id: Scalars['String']['input'];
};


export type QueryAssociatedEntitiesArgs = {
  id: Scalars['String']['input'];
};


export type QueryGroupedAnomaliesArgs = {
  cursor?: InputMaybe<Scalars['String']['input']>;
  take?: Scalars['Int']['input'];
};


export type QueryManagerKpiArgs = {
  ordinanceType: Scalars['String']['input'];
};


export type QuerySearchTicketsArgs = {
  query: Scalars['String']['input'];
};


export type QueryTicketArgs = {
  id: Scalars['String']['input'];
};


export type QueryTicketStateKeyFiguresArgs = {
  state: TicketValidationState;
};


export type QueryTicketStateKpiArgs = {
  state: TicketValidationState;
};


export type QueryTicketStateMetaArgs = {
  state: TicketValidationState;
};


export type QueryTicketsArgs = {
  cursor?: InputMaybe<Scalars['String']['input']>;
  filters?: InputMaybe<TicketFilterArgs>;
  state: TicketValidationState;
  take?: Scalars['Int']['input'];
};


export type QueryTimePerTourMetricForDayArgs = {
  day: Scalars['DateTime']['input'];
  ordinanceType: Scalars['String']['input'];
};


export type QueryTimePerTourMetricForMonthArgs = {
  day: Scalars['DateTime']['input'];
  ordinanceType: Scalars['String']['input'];
};


export type QueryTourCostBreakdownArgs = {
  operationId: Scalars['String']['input'];
};


export type QueryToursPerTimeKpiArgs = {
  ordinanceTypes: Scalars['String']['input'];
};

export type RevenueTrend = {
  __typename?: 'RevenueTrend';
  date: Scalars['DateTime']['output'];
  ordinanceType: Scalars['String']['output'];
  revenueSum: Scalars['Float']['output'];
};

export type ServicePosition = {
  __typename?: 'ServicePosition';
  description: Scalars['String']['output'];
  value: Scalars['Float']['output'];
  variant: Scalars['String']['output'];
};

export type SolutionTarget = {
  __typename?: 'SolutionTarget';
  anomalyId: Scalars['String']['output'];
  id: Scalars['String']['output'];
  name: Scalars['String']['output'];
  steps: Array<SolutionTargetStep>;
};

export type SolutionTargetStep = {
  __typename?: 'SolutionTargetStep';
  description: Scalars['String']['output'];
  id: Scalars['String']['output'];
  solutionTargetId: Scalars['String']['output'];
};

export type Subscription = {
  __typename?: 'Subscription';
  ticketsUpdated: TicketsUpdated;
  timePerTourUpdated: TimePerTourUpdate;
};

export type Ticket = {
  __typename?: 'Ticket';
  approvalState?: Maybe<ApprovalState>;
  createdAt: Scalars['DateTime']['output'];
  currentState: TicketValidationState;
  documentInfo?: Maybe<DocumentInfo>;
  errors: Array<Scalars['String']['output']>;
  id: Scalars['String']['output'];
  isUrgent: Scalars['Boolean']['output'];
  notes: Array<Scalars['String']['output']>;
  tours: Array<Tour>;
  urgency: Scalars['DateTime']['output'];
};

export type TicketFilterArgs = {
  approvalStates?: InputMaybe<Array<ApprovalState>>;
  documentInfo?: InputMaybe<Array<Scalars['String']['input']>>;
  errors?: InputMaybe<Array<Scalars['String']['input']>>;
};

export type TicketStateKeyFigures = {
  __typename?: 'TicketStateKeyFigures';
  dwellTime: Scalars['Int']['output'];
};

export type TicketStateMeta = {
  __typename?: 'TicketStateMeta';
  approvalNotCompanyCount?: Maybe<Scalars['Int']['output']>;
  approvalRequiredCount?: Maybe<Scalars['Int']['output']>;
  approvalUnknownCount?: Maybe<Scalars['Int']['output']>;
  count: Scalars['Int']['output'];
  tdNotCompanyCount?: Maybe<Scalars['Int']['output']>;
};

export enum TicketValidationState {
  Archived = 'ARCHIVED',
  Created = 'CREATED',
  DocumentsMissing = 'DOCUMENTS_MISSING',
  TdUncertain = 'TD_UNCERTAIN',
  UserInteractionRequired = 'USER_INTERACTION_REQUIRED'
}

export type TicketsUpdated = {
  __typename?: 'TicketsUpdated';
  count: Scalars['Int']['output'];
};

export type TimePerTourKpiSummary = {
  __typename?: 'TimePerTourKPISummary';
  cars: Array<KpiByCar>;
  interval: Interval;
  kpi: Kpi;
};

export type TimePerTourMetric = {
  __typename?: 'TimePerTourMetric';
  availableTime: Scalars['Float']['output'];
  averageRevenue: Scalars['Float']['output'];
  breakEven: Scalars['Float']['output'];
  categoryAmounts: Array<TimePerTourMetricCategoryAmount>;
  consumptionCost: Scalars['Float']['output'];
  forecast: Scalars['Float']['output'];
  forecastRevenue: Scalars['Float']['output'];
  interval: Interval;
  personnelCost: Scalars['Float']['output'];
  revenue: Scalars['Float']['output'];
  tourAmount: Scalars['Float']['output'];
};

export type TimePerTourMetricCategoryAmount = {
  __typename?: 'TimePerTourMetricCategoryAmount';
  amount: Scalars['Int']['output'];
  category: Scalars['String']['output'];
};

export type TimePerTourUpdate = {
  __typename?: 'TimePerTourUpdate';
  job: Scalars['String']['output'];
};

export type Tour = {
  __typename?: 'Tour';
  billDate?: Maybe<Scalars['DateTime']['output']>;
  billNumber?: Maybe<Scalars['String']['output']>;
  carName?: Maybe<Scalars['String']['output']>;
  category?: Maybe<Scalars['String']['output']>;
  check: Scalars['Int']['output'];
  codriverId?: Maybe<Scalars['String']['output']>;
  codriverName?: Maybe<Scalars['String']['output']>;
  consumptionCosts: Scalars['Float']['output'];
  createdAt?: Maybe<Scalars['DateTime']['output']>;
  deletedAt?: Maybe<Scalars['DateTime']['output']>;
  direction: Scalars['String']['output'];
  done: Scalars['Boolean']['output'];
  driverId?: Maybe<Scalars['String']['output']>;
  driverName?: Maybe<Scalars['String']['output']>;
  empty?: Maybe<Scalars['String']['output']>;
  hasInfection?: Maybe<Scalars['Boolean']['output']>;
  healthInsurance?: Maybe<Scalars['String']['output']>;
  healthInsuranceNumber?: Maybe<Scalars['String']['output']>;
  id: Scalars['String']['output'];
  infectionName?: Maybe<Scalars['String']['output']>;
  occupiedKm: Scalars['Float']['output'];
  operationId: Scalars['String']['output'];
  ordinanceType?: Maybe<Scalars['String']['output']>;
  patientCity?: Maybe<Scalars['String']['output']>;
  patientId?: Maybe<Scalars['String']['output']>;
  patientName?: Maybe<Scalars['String']['output']>;
  patientStreet?: Maybe<Scalars['String']['output']>;
  patientSurname?: Maybe<Scalars['String']['output']>;
  patientZip?: Maybe<Scalars['String']['output']>;
  rangeEndDate?: Maybe<Scalars['DateTime']['output']>;
  revenue: Scalars['Float']['output'];
  revenueDeviation: Scalars['Float']['output'];
  revenueDispoLive: Scalars['Float']['output'];
  startBegin?: Maybe<Scalars['String']['output']>;
  startCity?: Maybe<Scalars['String']['output']>;
  startDate?: Maybe<Scalars['DateTime']['output']>;
  startEnd?: Maybe<Scalars['String']['output']>;
  startInstitution?: Maybe<Scalars['String']['output']>;
  startStreet?: Maybe<Scalars['String']['output']>;
  startZip?: Maybe<Scalars['String']['output']>;
  target?: Maybe<Scalars['String']['output']>;
  targetBegin?: Maybe<Scalars['String']['output']>;
  targetCity?: Maybe<Scalars['String']['output']>;
  targetInstitution?: Maybe<Scalars['String']['output']>;
  targetStreet?: Maybe<Scalars['String']['output']>;
  targetZip?: Maybe<Scalars['String']['output']>;
  ticket?: Maybe<Ticket>;
  ticketId?: Maybe<Scalars['String']['output']>;
  totalKm: Scalars['Float']['output'];
  transportType?: Maybe<Scalars['String']['output']>;
  type: Scalars['String']['output'];
};

export type TourCostBreakdown = {
  __typename?: 'TourCostBreakdown';
  servicePositions: Array<ServicePosition>;
  tariffDescription: Scalars['String']['output'];
  tariffValidityPeriod: Scalars['String']['output'];
};

export type TourStateMeta = {
  __typename?: 'TourStateMeta';
  count: Scalars['Int']['output'];
  negativeRevenueDeviation?: Maybe<Scalars['Float']['output']>;
  positiveRevenueDeviation?: Maybe<Scalars['Float']['output']>;
  revenueSum?: Maybe<Scalars['Float']['output']>;
};

export type WorkTime = {
  __typename?: 'WorkTime';
  department: Scalars['String']['output'];
  duration: Scalars['Int']['output'];
  endDate: Scalars['DateTime']['output'];
  firstname: Scalars['String']['output'];
  id: Scalars['String']['output'];
  pause: Scalars['Int']['output'];
  startDate: Scalars['DateTime']['output'];
  surname: Scalars['String']['output'];
  userId: Scalars['String']['output'];
};

export type AnomalyAllFragment = { __typename?: 'Anomaly', id: string, type: string, description: string, groupKey: string, groupDescription: string, sleepTimer: number, sleepSince?: any | null, workedOnBy: string, resolvedAt?: any | null, createdAt: any, solution: Array<{ __typename?: 'SolutionTarget', anomalyId: string, id: string, name: string, steps: Array<{ __typename?: 'SolutionTargetStep', description: string, id: string, solutionTargetId: string }> }> };

export type GetAnomalyQueryVariables = Exact<{
  id: Scalars['String']['input'];
}>;


export type GetAnomalyQuery = { __typename?: 'Query', anomaly: { __typename?: 'Anomaly', id: string, type: string, description: string, groupKey: string, groupDescription: string, sleepTimer: number, sleepSince?: any | null, workedOnBy: string, resolvedAt?: any | null, createdAt: any, solution: Array<{ __typename?: 'SolutionTarget', anomalyId: string, id: string, name: string, steps: Array<{ __typename?: 'SolutionTargetStep', description: string, id: string, solutionTargetId: string }> }> } };

export type GetAnomaliesQueryVariables = Exact<{
  cursor?: InputMaybe<Scalars['String']['input']>;
  take: Scalars['Int']['input'];
}>;


export type GetAnomaliesQuery = { __typename?: 'Query', anomalies: { __typename?: 'PaginatedAnomaly', prevCursor: string, endCursor: string, totalCount: number, hasNextPage: boolean, nodes: Array<{ __typename?: 'Anomaly', id: string, type: string, description: string, groupKey: string, groupDescription: string, sleepTimer: number, sleepSince?: any | null, workedOnBy: string, resolvedAt?: any | null, createdAt: any, solution: Array<{ __typename?: 'SolutionTarget', anomalyId: string, id: string, name: string, steps: Array<{ __typename?: 'SolutionTargetStep', description: string, id: string, solutionTargetId: string }> }> }> } };

export type GetGroupedAnomaliesQueryVariables = Exact<{
  cursor?: InputMaybe<Scalars['String']['input']>;
  take: Scalars['Int']['input'];
}>;


export type GetGroupedAnomaliesQuery = { __typename?: 'Query', groupedAnomalies: { __typename?: 'PaginatedAnomalyGroup', prevCursor: string, endCursor: string, totalCount: number, hasNextPage: boolean, nodes: Array<{ __typename?: 'AnomalyGroup', key: string, anomalies: Array<{ __typename?: 'Anomaly', id: string, type: string, description: string, groupKey: string, groupDescription: string, sleepTimer: number, sleepSince?: any | null, workedOnBy: string, resolvedAt?: any | null, createdAt: any, solution: Array<{ __typename?: 'SolutionTarget', anomalyId: string, id: string, name: string, steps: Array<{ __typename?: 'SolutionTargetStep', description: string, id: string, solutionTargetId: string }> }> }> }> } };

export type SetAnomalyToSleepMutationVariables = Exact<{
  id: Scalars['String']['input'];
}>;


export type SetAnomalyToSleepMutation = { __typename?: 'Mutation', setAnomalyToSleep: { __typename?: 'Anomaly', id: string, type: string, description: string, groupKey: string, groupDescription: string, sleepTimer: number, sleepSince?: any | null, workedOnBy: string, resolvedAt?: any | null, createdAt: any, solution: Array<{ __typename?: 'SolutionTarget', anomalyId: string, id: string, name: string, steps: Array<{ __typename?: 'SolutionTargetStep', description: string, id: string, solutionTargetId: string }> }> } };

export type AcceptAnomalyMutationVariables = Exact<{
  id: Scalars['String']['input'];
}>;


export type AcceptAnomalyMutation = { __typename?: 'Mutation', acceptAnomaly: { __typename?: 'Anomaly', id: string, type: string, description: string, groupKey: string, groupDescription: string, sleepTimer: number, sleepSince?: any | null, workedOnBy: string, resolvedAt?: any | null, createdAt: any, solution: Array<{ __typename?: 'SolutionTarget', anomalyId: string, id: string, name: string, steps: Array<{ __typename?: 'SolutionTargetStep', description: string, id: string, solutionTargetId: string }> }> } };

export type EmployeeAllFragment = { __typename?: 'Employee', name: string, id: string, surname: string, personnelNumber: string, qualification?: string | null, occuptationalHealthExamination?: any | null, personTransportCertificate?: any | null };

export type PlannedTimeAllFragment = { __typename?: 'PlannedTime', id: string, userId: string, firstname: string, surname: string, startDate: any, endDate: any, department: string, pause: number, duration: number, note?: string | null };

export type WorkTimeAllFragment = { __typename?: 'WorkTime', id: string, userId: string, firstname: string, surname: string, startDate: any, endDate: any, department: string, pause: number, duration: number };

export type AttendanceRegistrationAllFragment = { __typename?: 'AttendanceRegistration', personnelNumber: string, attendanceRegistrationId: number, employeeId: number, dateTime: any, event: string };

export type TourAllFragment = { __typename?: 'Tour', billDate?: any | null, billNumber?: string | null, carName?: string | null, category?: string | null, check: number, codriverId?: string | null, codriverName?: string | null, consumptionCosts: number, createdAt?: any | null, deletedAt?: any | null, direction: string, done: boolean, driverId?: string | null, driverName?: string | null, empty?: string | null, hasInfection?: boolean | null, healthInsurance?: string | null, healthInsuranceNumber?: string | null, id: string, infectionName?: string | null, occupiedKm: number, operationId: string, ordinanceType?: string | null, patientCity?: string | null, patientId?: string | null, patientName?: string | null, patientStreet?: string | null, patientSurname?: string | null, patientZip?: string | null, rangeEndDate?: any | null, revenue: number, revenueDeviation: number, revenueDispoLive: number, startBegin?: string | null, startCity?: string | null, startDate?: any | null, startEnd?: string | null, startInstitution?: string | null, startStreet?: string | null, startZip?: string | null, target?: string | null, targetBegin?: string | null, targetCity?: string | null, targetInstitution?: string | null, targetStreet?: string | null, targetZip?: string | null, ticketId?: string | null, totalKm: number, transportType?: string | null, type: string, ticket?: { __typename?: 'Ticket', currentState: TicketValidationState, approvalState?: ApprovalState | null, createdAt: any } | null };

export type GetAnomaliesAssociatedEntitiesQueryVariables = Exact<{
  id: Scalars['String']['input'];
}>;


export type GetAnomaliesAssociatedEntitiesQuery = { __typename?: 'Query', associatedEntities: { __typename?: 'AssociatedEntities', employee?: Array<{ __typename?: 'Employee', name: string, id: string, surname: string, personnelNumber: string, qualification?: string | null, occuptationalHealthExamination?: any | null, personTransportCertificate?: any | null }> | null, plannedTime?: Array<{ __typename?: 'PlannedTime', id: string, userId: string, firstname: string, surname: string, startDate: any, endDate: any, department: string, pause: number, duration: number, note?: string | null }> | null, workTime?: Array<{ __typename?: 'WorkTime', id: string, userId: string, firstname: string, surname: string, startDate: any, endDate: any, department: string, pause: number, duration: number }> | null, attendanceRegistration?: Array<{ __typename?: 'AttendanceRegistration', personnelNumber: string, attendanceRegistrationId: number, employeeId: number, dateTime: any, event: string }> | null, tour?: Array<{ __typename?: 'Tour', billDate?: any | null, billNumber?: string | null, carName?: string | null, category?: string | null, check: number, codriverId?: string | null, codriverName?: string | null, consumptionCosts: number, createdAt?: any | null, deletedAt?: any | null, direction: string, done: boolean, driverId?: string | null, driverName?: string | null, empty?: string | null, hasInfection?: boolean | null, healthInsurance?: string | null, healthInsuranceNumber?: string | null, id: string, infectionName?: string | null, occupiedKm: number, operationId: string, ordinanceType?: string | null, patientCity?: string | null, patientId?: string | null, patientName?: string | null, patientStreet?: string | null, patientSurname?: string | null, patientZip?: string | null, rangeEndDate?: any | null, revenue: number, revenueDeviation: number, revenueDispoLive: number, startBegin?: string | null, startCity?: string | null, startDate?: any | null, startEnd?: string | null, startInstitution?: string | null, startStreet?: string | null, startZip?: string | null, target?: string | null, targetBegin?: string | null, targetCity?: string | null, targetInstitution?: string | null, targetStreet?: string | null, targetZip?: string | null, ticketId?: string | null, totalKm: number, transportType?: string | null, type: string, ticket?: { __typename?: 'Ticket', currentState: TicketValidationState, approvalState?: ApprovalState | null, createdAt: any } | null }> | null } };

export type HomeDashboardQueryVariables = Exact<{ [key: string]: never; }>;


export type HomeDashboardQuery = { __typename?: 'Query', homeDashboardKpis: { __typename?: 'HomeDashboardKPIs', anomalyCount: number, employeesWithoutTourCount: number, toursWithoutApprovalCount: number, billableTourCount: number, billableTourRevenueSum: number, billedTourCount: number, billedTourPositiveRevenueDeviation: number, billedTourNegativeRevenueDeviation: number, revenueTrend: Array<{ __typename?: 'RevenueTrend', date: any, ordinanceType: string, revenueSum: number }> } };

export type TimePerTourUpdatedSubscriptionVariables = Exact<{ [key: string]: never; }>;


export type TimePerTourUpdatedSubscription = { __typename?: 'Subscription', timePerTourUpdated: { __typename?: 'TimePerTourUpdate', job: string } };

export type GetTourAmountPerTimeKpiQueryVariables = Exact<{
  ordinanceType: Scalars['String']['input'];
}>;


export type GetTourAmountPerTimeKpiQuery = { __typename?: 'Query', toursPerTimeKPI: Array<{ __typename?: 'TimePerTourKPISummary', kpi: { __typename?: 'KPI', value: number }, interval: { __typename?: 'Interval', start: any, end: any } }> };

export type GetTourAmountPerTimeKpiManagerQueryVariables = Exact<{
  ordinanceType: Scalars['String']['input'];
}>;


export type GetTourAmountPerTimeKpiManagerQuery = { __typename?: 'Query', toursPerTimeKPI: Array<{ __typename?: 'TimePerTourKPISummary', kpi: { __typename?: 'KPI', value: number, meta: { __typename?: 'KPIMetadata', availableTime: number, baseValue: number, tourAmount: number, breakEven: number } }, interval: { __typename?: 'Interval', start: any, end: any }, cars: Array<{ __typename?: 'KPIByCar', carName: string, kpi: { __typename?: 'KPI', value: number, meta: { __typename?: 'KPIMetadata', availableTime: number, baseValue: number, tourAmount: number, breakEven: number } } }> }> };

export type GetTimePerTourMetricForDayQueryVariables = Exact<{
  day: Scalars['DateTime']['input'];
  ordinanceType: Scalars['String']['input'];
}>;


export type GetTimePerTourMetricForDayQuery = { __typename?: 'Query', timePerTourMetricForDay: Array<{ __typename?: 'TimePerTourMetric', availableTime: number, tourAmount: number, breakEven: number, revenue: number, averageRevenue: number, personnelCost: number, consumptionCost: number, forecast: number, forecastRevenue: number, interval: { __typename?: 'Interval', start: any, end: any }, categoryAmounts: Array<{ __typename?: 'TimePerTourMetricCategoryAmount', category: string, amount: number }> }> };

export type GetTimePerTourMetricForMonthQueryVariables = Exact<{
  day: Scalars['DateTime']['input'];
  ordinanceType: Scalars['String']['input'];
}>;


export type GetTimePerTourMetricForMonthQuery = { __typename?: 'Query', timePerTourMetricForMonth: Array<{ __typename?: 'TimePerTourMetric', availableTime: number, tourAmount: number, breakEven: number, revenue: number, averageRevenue: number, personnelCost: number, consumptionCost: number, forecast: number, forecastRevenue: number, interval: { __typename?: 'Interval', start: any, end: any }, categoryAmounts: Array<{ __typename?: 'TimePerTourMetricCategoryAmount', category: string, amount: number }> }> };

export type TicketStateKpiQueryVariables = Exact<{
  state: TicketValidationState;
}>;


export type TicketStateKpiQuery = { __typename?: 'Query', ticketStateKpi: { __typename?: 'KpiInfo', main: { __typename?: 'Metric', label: string, value: number }, secondary: { __typename?: 'Metric', label: string, value: number }, additional: Array<{ __typename?: 'Metric', label: string, value: number }> } };

export type ManagerKpiQueryVariables = Exact<{
  ordinanceType: Scalars['String']['input'];
}>;


export type ManagerKpiQuery = { __typename?: 'Query', managerKpi: { __typename?: 'KpiInfo', main: { __typename?: 'Metric', label: string, value: number }, secondary: { __typename?: 'Metric', label: string, value: number }, additional: Array<{ __typename?: 'Metric', label: string, value: number }> } };

export type TicketsUpdatedSubscriptionVariables = Exact<{ [key: string]: never; }>;


export type TicketsUpdatedSubscription = { __typename?: 'Subscription', ticketsUpdated: { __typename?: 'TicketsUpdated', count: number } };

export type GetTicketStateMetaQueryVariables = Exact<{
  state: TicketValidationState;
}>;


export type GetTicketStateMetaQuery = { __typename?: 'Query', ticketStateMeta: { __typename?: 'TicketStateMeta', count: number, approvalUnknownCount?: number | null, approvalRequiredCount?: number | null, tdNotCompanyCount?: number | null, approvalNotCompanyCount?: number | null } };

export type SearchTicketsQueryVariables = Exact<{
  query: Scalars['String']['input'];
}>;


export type SearchTicketsQuery = { __typename?: 'Query', searchTickets: Array<{ __typename?: 'Ticket', id: string, currentState: TicketValidationState, approvalState?: ApprovalState | null, errors: Array<string>, notes: Array<string>, isUrgent: boolean, urgency: any, createdAt: any, documentInfo?: { __typename?: 'DocumentInfo', tdLocation?: string | null, approval: { __typename?: 'ApprovalInfo', isNeeded?: boolean | null, whoRequested?: string | null, answeredFrom?: string | null, location?: string | null } } | null, tours: Array<{ __typename?: 'Tour', id: string, done: boolean, direction: string, carName?: string | null, operationId: string, driverName?: string | null, codriverName?: string | null, patientName?: string | null, patientSurname?: string | null, patientStreet?: string | null, patientZip?: string | null, patientCity?: string | null, healthInsurance?: string | null, category?: string | null, transportType?: string | null, ordinanceType?: string | null, startStreet?: string | null, startZip?: string | null, startCity?: string | null, targetStreet?: string | null, targetZip?: string | null, targetCity?: string | null, startDate?: any | null, check: number, occupiedKm: number, totalKm: number, type: string, rangeEndDate?: any | null, startBegin?: string | null, startEnd?: string | null, target?: string | null, targetBegin?: string | null, empty?: string | null, billDate?: any | null, billNumber?: string | null, consumptionCosts: number, revenue: number, revenueDispoLive: number, startInstitution?: string | null, targetInstitution?: string | null, ticketId?: string | null }> }> };

export type GetTicketsQueryVariables = Exact<{
  state: TicketValidationState;
  filters?: InputMaybe<TicketFilterArgs>;
  cursor?: InputMaybe<Scalars['String']['input']>;
  take?: InputMaybe<Scalars['Int']['input']>;
}>;


export type GetTicketsQuery = { __typename?: 'Query', tickets: { __typename?: 'PaginatedTicket', prevCursor: string, endCursor: string, hasNextPage: boolean, totalCount: number, nodes: Array<{ __typename?: 'Ticket', id: string, currentState: TicketValidationState, approvalState?: ApprovalState | null, errors: Array<string>, notes: Array<string>, isUrgent: boolean, urgency: any, createdAt: any, documentInfo?: { __typename?: 'DocumentInfo', tdLocation?: string | null, approval: { __typename?: 'ApprovalInfo', isNeeded?: boolean | null, whoRequested?: string | null, answeredFrom?: string | null, location?: string | null } } | null, tours: Array<{ __typename?: 'Tour', id: string, done: boolean, direction: string, carName?: string | null, operationId: string, driverName?: string | null, codriverName?: string | null, patientName?: string | null, patientSurname?: string | null, patientStreet?: string | null, patientZip?: string | null, patientCity?: string | null, healthInsurance?: string | null, category?: string | null, transportType?: string | null, ordinanceType?: string | null, startStreet?: string | null, startZip?: string | null, startCity?: string | null, targetStreet?: string | null, targetZip?: string | null, targetCity?: string | null, startDate?: any | null, check: number, occupiedKm: number, totalKm: number, type: string, rangeEndDate?: any | null, startBegin?: string | null, startEnd?: string | null, target?: string | null, targetBegin?: string | null, empty?: string | null, billDate?: any | null, billNumber?: string | null, consumptionCosts: number, revenue: number, revenueDispoLive: number, startInstitution?: string | null, targetInstitution?: string | null, ticketId?: string | null, ticket?: { __typename?: 'Ticket', currentState: TicketValidationState } | null }> }> } };

export type SetDocumentInfoMutationVariables = Exact<{
  ticketId: Scalars['String']['input'];
  approval?: InputMaybe<ApprovalInfoArgs>;
  tdLocation?: InputMaybe<Scalars['String']['input']>;
}>;


export type SetDocumentInfoMutation = { __typename?: 'Mutation', setDocumentInfo: { __typename?: 'Ticket', id: string, currentState: TicketValidationState, approvalState?: ApprovalState | null, errors: Array<string>, notes: Array<string>, isUrgent: boolean, urgency: any, createdAt: any, documentInfo?: { __typename?: 'DocumentInfo', tdLocation?: string | null, approval: { __typename?: 'ApprovalInfo', isNeeded?: boolean | null, whoRequested?: string | null, answeredFrom?: string | null, location?: string | null } } | null, tours: Array<{ __typename?: 'Tour', id: string, done: boolean, direction: string, carName?: string | null, operationId: string, driverName?: string | null, codriverName?: string | null, patientName?: string | null, patientSurname?: string | null, patientStreet?: string | null, patientZip?: string | null, patientCity?: string | null, healthInsurance?: string | null, category?: string | null, transportType?: string | null, ordinanceType?: string | null, startStreet?: string | null, startZip?: string | null, startCity?: string | null, targetStreet?: string | null, targetZip?: string | null, targetCity?: string | null, startDate?: any | null, check: number, occupiedKm: number, totalKm: number, type: string, rangeEndDate?: any | null, startBegin?: string | null, startEnd?: string | null, target?: string | null, targetBegin?: string | null, empty?: string | null }> } };

export type GetUpcomingToursQueryVariables = Exact<{ [key: string]: never; }>;


export type GetUpcomingToursQuery = { __typename?: 'Query', upcomingTours: Array<{ __typename?: 'Tour', id: string, operationId: string, carName?: string | null, driverName?: string | null, codriverName?: string | null, startDate?: any | null, patientName?: string | null, patientSurname?: string | null, patientStreet?: string | null, patientZip?: string | null, patientCity?: string | null, startInstitution?: string | null, startStreet?: string | null, startZip?: string | null, startCity?: string | null, targetInstitution?: string | null, targetStreet?: string | null, targetZip?: string | null, targetCity?: string | null, ordinanceType?: string | null, createdAt?: any | null }> };

export type GetAccountingStateMetaQueryVariables = Exact<{
  state: AccountingState;
}>;


export type GetAccountingStateMetaQuery = { __typename?: 'Query', accountingStateMeta: { __typename?: 'TourStateMeta', count: number, revenueSum?: number | null, positiveRevenueDeviation?: number | null, negativeRevenueDeviation?: number | null } };

export type GetAccountingToursQueryVariables = Exact<{
  state: AccountingState;
  filters?: InputMaybe<AccountingFilterArgs>;
  cursor?: InputMaybe<Scalars['String']['input']>;
  take?: InputMaybe<Scalars['Int']['input']>;
}>;


export type GetAccountingToursQuery = { __typename?: 'Query', accountingTours: { __typename?: 'PaginatedTour', prevCursor: string, endCursor: string, hasNextPage: boolean, totalCount: number, nodes: Array<{ __typename?: 'Tour', id: string, done: boolean, direction: string, carName?: string | null, operationId: string, driverName?: string | null, codriverName?: string | null, patientName?: string | null, patientSurname?: string | null, patientStreet?: string | null, patientZip?: string | null, patientCity?: string | null, healthInsurance?: string | null, category?: string | null, transportType?: string | null, ordinanceType?: string | null, startStreet?: string | null, startZip?: string | null, startCity?: string | null, targetStreet?: string | null, targetZip?: string | null, targetCity?: string | null, startDate?: any | null, check: number, occupiedKm: number, totalKm: number, type: string, rangeEndDate?: any | null, startBegin?: string | null, startEnd?: string | null, target?: string | null, targetBegin?: string | null, empty?: string | null, billDate?: any | null, billNumber?: string | null, consumptionCosts: number, revenue: number, revenueDispoLive: number, revenueDeviation: number, startInstitution?: string | null, targetInstitution?: string | null, ticketId?: string | null, createdAt?: any | null, ticket?: { __typename?: 'Ticket', id: string, currentState: TicketValidationState, approvalState?: ApprovalState | null, errors: Array<string>, notes: Array<string>, isUrgent: boolean, urgency: any, createdAt: any } | null }> } };

export type GetTourCostBreakdownQueryVariables = Exact<{
  operationId: Scalars['String']['input'];
}>;


export type GetTourCostBreakdownQuery = { __typename?: 'Query', tourCostBreakdown: { __typename?: 'TourCostBreakdown', tariffDescription: string, tariffValidityPeriod: string, servicePositions: Array<{ __typename?: 'ServicePosition', value: number, description: string, variant: string }> } };

export const AnomalyAllFragmentDoc = gql`
    fragment AnomalyAll on Anomaly {
  id
  type
  description
  groupKey
  groupDescription
  sleepTimer
  sleepSince
  solution {
    anomalyId
    id
    name
    steps {
      description
      id
      solutionTargetId
    }
  }
  workedOnBy
  resolvedAt
  createdAt
}
    `;
export const EmployeeAllFragmentDoc = gql`
    fragment EmployeeAll on Employee {
  name
  id
  surname
  personnelNumber
  qualification
  occuptationalHealthExamination
  personTransportCertificate
}
    `;
export const PlannedTimeAllFragmentDoc = gql`
    fragment PlannedTimeAll on PlannedTime {
  id
  userId
  firstname
  surname
  startDate
  endDate
  department
  pause
  duration
  note
}
    `;
export const WorkTimeAllFragmentDoc = gql`
    fragment WorkTimeAll on WorkTime {
  id
  userId
  firstname
  surname
  startDate
  endDate
  department
  pause
  duration
}
    `;
export const AttendanceRegistrationAllFragmentDoc = gql`
    fragment AttendanceRegistrationAll on AttendanceRegistration {
  personnelNumber
  attendanceRegistrationId
  employeeId
  dateTime
  event
}
    `;
export const TourAllFragmentDoc = gql`
    fragment TourAll on Tour {
  billDate
  billNumber
  carName
  category
  check
  codriverId
  codriverName
  consumptionCosts
  createdAt
  deletedAt
  direction
  done
  driverId
  driverName
  empty
  hasInfection
  healthInsurance
  healthInsuranceNumber
  id
  infectionName
  occupiedKm
  operationId
  ordinanceType
  patientCity
  patientId
  patientName
  patientStreet
  patientSurname
  patientZip
  rangeEndDate
  revenue
  revenueDeviation
  revenueDispoLive
  startBegin
  startCity
  startDate
  startEnd
  startInstitution
  startStreet
  startZip
  target
  targetBegin
  targetCity
  targetInstitution
  targetStreet
  targetZip
  ticketId
  ticket {
    currentState
    approvalState
    createdAt
  }
  totalKm
  transportType
  type
}
    `;
export const GetAnomalyDocument = gql`
    query GetAnomaly($id: String!) {
  anomaly(id: $id) {
    ...AnomalyAll
  }
}
    ${AnomalyAllFragmentDoc}`;

  @Injectable({
    providedIn: 'root'
  })
  export class GetAnomalyGQL extends Apollo.Query<GetAnomalyQuery, GetAnomalyQueryVariables> {
    override document = GetAnomalyDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetAnomaliesDocument = gql`
    query GetAnomalies($cursor: String, $take: Int!) {
  anomalies(cursor: $cursor, take: $take) {
    prevCursor
    endCursor
    totalCount
    hasNextPage
    nodes {
      ...AnomalyAll
    }
  }
}
    ${AnomalyAllFragmentDoc}`;

  @Injectable({
    providedIn: 'root'
  })
  export class GetAnomaliesGQL extends Apollo.Query<GetAnomaliesQuery, GetAnomaliesQueryVariables> {
    override document = GetAnomaliesDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetGroupedAnomaliesDocument = gql`
    query GetGroupedAnomalies($cursor: String, $take: Int!) {
  groupedAnomalies(cursor: $cursor, take: $take) {
    prevCursor
    endCursor
    totalCount
    hasNextPage
    nodes {
      key
      anomalies {
        ...AnomalyAll
      }
    }
  }
}
    ${AnomalyAllFragmentDoc}`;

  @Injectable({
    providedIn: 'root'
  })
  export class GetGroupedAnomaliesGQL extends Apollo.Query<GetGroupedAnomaliesQuery, GetGroupedAnomaliesQueryVariables> {
    override document = GetGroupedAnomaliesDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const SetAnomalyToSleepDocument = gql`
    mutation SetAnomalyToSleep($id: String!) {
  setAnomalyToSleep(id: $id) {
    ...AnomalyAll
  }
}
    ${AnomalyAllFragmentDoc}`;

  @Injectable({
    providedIn: 'root'
  })
  export class SetAnomalyToSleepGQL extends Apollo.Mutation<SetAnomalyToSleepMutation, SetAnomalyToSleepMutationVariables> {
    override document = SetAnomalyToSleepDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const AcceptAnomalyDocument = gql`
    mutation AcceptAnomaly($id: String!) {
  acceptAnomaly(id: $id) {
    ...AnomalyAll
  }
}
    ${AnomalyAllFragmentDoc}`;

  @Injectable({
    providedIn: 'root'
  })
  export class AcceptAnomalyGQL extends Apollo.Mutation<AcceptAnomalyMutation, AcceptAnomalyMutationVariables> {
    override document = AcceptAnomalyDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetAnomaliesAssociatedEntitiesDocument = gql`
    query GetAnomaliesAssociatedEntities($id: String!) {
  associatedEntities(id: $id) {
    employee {
      ...EmployeeAll
    }
    plannedTime {
      ...PlannedTimeAll
    }
    workTime {
      ...WorkTimeAll
    }
    attendanceRegistration {
      ...AttendanceRegistrationAll
    }
    tour {
      ...TourAll
    }
  }
}
    ${EmployeeAllFragmentDoc}
${PlannedTimeAllFragmentDoc}
${WorkTimeAllFragmentDoc}
${AttendanceRegistrationAllFragmentDoc}
${TourAllFragmentDoc}`;

  @Injectable({
    providedIn: 'root'
  })
  export class GetAnomaliesAssociatedEntitiesGQL extends Apollo.Query<GetAnomaliesAssociatedEntitiesQuery, GetAnomaliesAssociatedEntitiesQueryVariables> {
    override document = GetAnomaliesAssociatedEntitiesDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const HomeDashboardDocument = gql`
    query HomeDashboard {
  homeDashboardKpis {
    anomalyCount
    employeesWithoutTourCount
    toursWithoutApprovalCount
    billableTourCount
    billableTourRevenueSum
    billedTourCount
    billedTourPositiveRevenueDeviation
    billedTourNegativeRevenueDeviation
    revenueTrend {
      date
      ordinanceType
      revenueSum
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class HomeDashboardGQL extends Apollo.Query<HomeDashboardQuery, HomeDashboardQueryVariables> {
    override document = HomeDashboardDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const TimePerTourUpdatedDocument = gql`
    subscription TimePerTourUpdated {
  timePerTourUpdated {
    job
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class TimePerTourUpdatedGQL extends Apollo.Subscription<TimePerTourUpdatedSubscription, TimePerTourUpdatedSubscriptionVariables> {
    override document = TimePerTourUpdatedDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetTourAmountPerTimeKpiDocument = gql`
    query GetTourAmountPerTimeKPI($ordinanceType: String!) {
  toursPerTimeKPI(ordinanceTypes: $ordinanceType) {
    kpi {
      value
    }
    interval {
      start
      end
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetTourAmountPerTimeKpiGQL extends Apollo.Query<GetTourAmountPerTimeKpiQuery, GetTourAmountPerTimeKpiQueryVariables> {
    override document = GetTourAmountPerTimeKpiDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetTourAmountPerTimeKpiManagerDocument = gql`
    query GetTourAmountPerTimeKPIManager($ordinanceType: String!) {
  toursPerTimeKPI(ordinanceTypes: $ordinanceType) {
    kpi {
      value
      meta {
        availableTime
        baseValue
        tourAmount
        breakEven
      }
    }
    interval {
      start
      end
    }
    cars {
      carName
      kpi {
        value
        meta {
          availableTime
          baseValue
          tourAmount
          breakEven
        }
      }
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetTourAmountPerTimeKpiManagerGQL extends Apollo.Query<GetTourAmountPerTimeKpiManagerQuery, GetTourAmountPerTimeKpiManagerQueryVariables> {
    override document = GetTourAmountPerTimeKpiManagerDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetTimePerTourMetricForDayDocument = gql`
    query GetTimePerTourMetricForDay($day: DateTime!, $ordinanceType: String!) {
  timePerTourMetricForDay(day: $day, ordinanceType: $ordinanceType) {
    interval {
      start
      end
    }
    availableTime
    tourAmount
    breakEven
    revenue
    averageRevenue
    personnelCost
    consumptionCost
    forecast
    forecastRevenue
    categoryAmounts {
      category
      amount
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetTimePerTourMetricForDayGQL extends Apollo.Query<GetTimePerTourMetricForDayQuery, GetTimePerTourMetricForDayQueryVariables> {
    override document = GetTimePerTourMetricForDayDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetTimePerTourMetricForMonthDocument = gql`
    query GetTimePerTourMetricForMonth($day: DateTime!, $ordinanceType: String!) {
  timePerTourMetricForMonth(day: $day, ordinanceType: $ordinanceType) {
    interval {
      start
      end
    }
    availableTime
    tourAmount
    breakEven
    revenue
    averageRevenue
    personnelCost
    consumptionCost
    forecast
    forecastRevenue
    categoryAmounts {
      category
      amount
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetTimePerTourMetricForMonthGQL extends Apollo.Query<GetTimePerTourMetricForMonthQuery, GetTimePerTourMetricForMonthQueryVariables> {
    override document = GetTimePerTourMetricForMonthDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const TicketStateKpiDocument = gql`
    query TicketStateKpi($state: TicketValidationState!) {
  ticketStateKpi(state: $state) {
    main {
      label
      value
    }
    secondary {
      label
      value
    }
    additional {
      label
      value
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class TicketStateKpiGQL extends Apollo.Query<TicketStateKpiQuery, TicketStateKpiQueryVariables> {
    override document = TicketStateKpiDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const ManagerKpiDocument = gql`
    query ManagerKpi($ordinanceType: String!) {
  managerKpi(ordinanceType: $ordinanceType) {
    main {
      label
      value
    }
    secondary {
      label
      value
    }
    additional {
      label
      value
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class ManagerKpiGQL extends Apollo.Query<ManagerKpiQuery, ManagerKpiQueryVariables> {
    override document = ManagerKpiDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const TicketsUpdatedDocument = gql`
    subscription TicketsUpdated {
  ticketsUpdated {
    count
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class TicketsUpdatedGQL extends Apollo.Subscription<TicketsUpdatedSubscription, TicketsUpdatedSubscriptionVariables> {
    override document = TicketsUpdatedDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetTicketStateMetaDocument = gql`
    query GetTicketStateMeta($state: TicketValidationState!) {
  ticketStateMeta(state: $state) {
    count
    approvalUnknownCount
    approvalRequiredCount
    tdNotCompanyCount
    approvalNotCompanyCount
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetTicketStateMetaGQL extends Apollo.Query<GetTicketStateMetaQuery, GetTicketStateMetaQueryVariables> {
    override document = GetTicketStateMetaDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const SearchTicketsDocument = gql`
    query SearchTickets($query: String!) {
  searchTickets(query: $query) {
    id
    currentState
    approvalState
    errors
    notes
    isUrgent
    urgency
    documentInfo {
      tdLocation
      approval {
        isNeeded
        whoRequested
        answeredFrom
        location
      }
    }
    createdAt
    tours {
      id
      done
      direction
      carName
      operationId
      driverName
      codriverName
      patientName
      patientSurname
      patientStreet
      patientZip
      patientCity
      healthInsurance
      category
      transportType
      ordinanceType
      startStreet
      startZip
      startCity
      targetStreet
      targetZip
      targetCity
      startDate
      check
      occupiedKm
      totalKm
      type
      rangeEndDate
      startBegin
      startEnd
      target
      targetBegin
      empty
      billDate
      billNumber
      consumptionCosts
      revenue
      revenueDispoLive
      startInstitution
      targetInstitution
      ticketId
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class SearchTicketsGQL extends Apollo.Query<SearchTicketsQuery, SearchTicketsQueryVariables> {
    override document = SearchTicketsDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetTicketsDocument = gql`
    query GetTickets($state: TicketValidationState!, $filters: TicketFilterArgs, $cursor: String, $take: Int) {
  tickets(state: $state, filters: $filters, cursor: $cursor, take: $take) {
    prevCursor
    endCursor
    hasNextPage
    totalCount
    nodes {
      id
      currentState
      approvalState
      errors
      notes
      isUrgent
      urgency
      documentInfo {
        tdLocation
        approval {
          isNeeded
          whoRequested
          answeredFrom
          location
        }
      }
      createdAt
      tours {
        id
        done
        direction
        carName
        operationId
        driverName
        codriverName
        patientName
        patientSurname
        patientStreet
        patientZip
        patientCity
        healthInsurance
        category
        transportType
        ordinanceType
        startStreet
        startZip
        startCity
        targetStreet
        targetZip
        targetCity
        startDate
        check
        occupiedKm
        totalKm
        type
        rangeEndDate
        startBegin
        startEnd
        target
        targetBegin
        empty
        billDate
        billNumber
        consumptionCosts
        revenue
        revenueDispoLive
        startInstitution
        targetInstitution
        ticketId
        ticket {
          currentState
        }
      }
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetTicketsGQL extends Apollo.Query<GetTicketsQuery, GetTicketsQueryVariables> {
    override document = GetTicketsDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const SetDocumentInfoDocument = gql`
    mutation SetDocumentInfo($ticketId: String!, $approval: ApprovalInfoArgs, $tdLocation: String) {
  setDocumentInfo(
    ticketId: $ticketId
    approval: $approval
    tdLocation: $tdLocation
  ) {
    id
    currentState
    approvalState
    errors
    notes
    isUrgent
    urgency
    documentInfo {
      tdLocation
      approval {
        isNeeded
        whoRequested
        answeredFrom
        location
      }
    }
    createdAt
    tours {
      id
      done
      direction
      carName
      operationId
      driverName
      codriverName
      patientName
      patientSurname
      patientStreet
      patientZip
      patientCity
      healthInsurance
      category
      transportType
      ordinanceType
      startStreet
      startZip
      startCity
      targetStreet
      targetZip
      targetCity
      startDate
      check
      occupiedKm
      totalKm
      type
      rangeEndDate
      startBegin
      startEnd
      target
      targetBegin
      empty
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class SetDocumentInfoGQL extends Apollo.Mutation<SetDocumentInfoMutation, SetDocumentInfoMutationVariables> {
    override document = SetDocumentInfoDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetUpcomingToursDocument = gql`
    query GetUpcomingTours {
  upcomingTours {
    id
    operationId
    carName
    driverName
    codriverName
    startDate
    patientName
    patientSurname
    patientStreet
    patientZip
    patientCity
    startInstitution
    startStreet
    startZip
    startCity
    targetInstitution
    targetStreet
    targetZip
    targetCity
    ordinanceType
    createdAt
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetUpcomingToursGQL extends Apollo.Query<GetUpcomingToursQuery, GetUpcomingToursQueryVariables> {
    override document = GetUpcomingToursDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetAccountingStateMetaDocument = gql`
    query GetAccountingStateMeta($state: AccountingState!) {
  accountingStateMeta(state: $state) {
    count
    revenueSum
    positiveRevenueDeviation
    negativeRevenueDeviation
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetAccountingStateMetaGQL extends Apollo.Query<GetAccountingStateMetaQuery, GetAccountingStateMetaQueryVariables> {
    override document = GetAccountingStateMetaDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetAccountingToursDocument = gql`
    query GetAccountingTours($state: AccountingState!, $filters: AccountingFilterArgs, $cursor: String, $take: Int) {
  accountingTours(state: $state, filters: $filters, cursor: $cursor, take: $take) {
    prevCursor
    endCursor
    hasNextPage
    totalCount
    nodes {
      id
      done
      direction
      carName
      operationId
      driverName
      codriverName
      patientName
      patientSurname
      patientStreet
      patientZip
      patientCity
      healthInsurance
      category
      transportType
      ordinanceType
      startStreet
      startZip
      startCity
      targetStreet
      targetZip
      targetCity
      startDate
      check
      occupiedKm
      totalKm
      type
      rangeEndDate
      startBegin
      startEnd
      target
      targetBegin
      empty
      billDate
      billNumber
      consumptionCosts
      revenue
      revenueDispoLive
      revenueDeviation
      startInstitution
      targetInstitution
      ticketId
      createdAt
      ticket {
        id
        currentState
        approvalState
        errors
        notes
        isUrgent
        urgency
        createdAt
      }
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetAccountingToursGQL extends Apollo.Query<GetAccountingToursQuery, GetAccountingToursQueryVariables> {
    override document = GetAccountingToursDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }
export const GetTourCostBreakdownDocument = gql`
    query GetTourCostBreakdown($operationId: String!) {
  tourCostBreakdown(operationId: $operationId) {
    tariffDescription
    tariffValidityPeriod
    servicePositions {
      value
      description
      variant
    }
  }
}
    `;

  @Injectable({
    providedIn: 'root'
  })
  export class GetTourCostBreakdownGQL extends Apollo.Query<GetTourCostBreakdownQuery, GetTourCostBreakdownQueryVariables> {
    override document = GetTourCostBreakdownDocument;
    
    constructor(apollo: Apollo.Apollo) {
      super(apollo);
    }
  }