import gql from 'graphql-tag';

export const FIBERSERVICES = gql`
  query FiberServices($input: CustomerServicesInput!) {
    fiberServices(input: $input) {
      services {
        id
        ossId
        propertyDescription
        provider
        created
        type
        status
        nickname
        name
        allocatedFrom
        allocatedTo
        fiberOrderId
        user {
          id
          nationalId
          name
          nickname
        }
      }
      pageInfo {
        hasNextPage
        nextPage
        totalCount
      }
    }
  }
`;

export const CPE_STATUS = gql`
  query CpeStatus($id: String!) {
    cpeStatus(id: $id) {
      isBoxActive
      mac
      ports {
        isPortConnected
        portNumber
        portSpeed
        portMacAddress
      }
      uptime
    }
  }
`;

export const LEGACY_ROUTER = gql`
  query LegacyRouter($input: FiberEquipmentInput!) {
    fiberEquipment(input: $input) {
      connectedRouters {
        ip
        mac
        organizationName
        isNovaRouter
        connectionState {
          isActive
        }
      }
    }
  }
`;
