import { gql } from '@app/unraid-api/cli/generated/index.js';

export const SYSTEM_REPORT_QUERY = gql(`
    query SystemReport {
        info {
            id
            machineId
            system {
                manufacturer
                model
                version
                sku
                serial
                uuid
            }
            versions {
                core {
                    unraid
                    kernel
                }
                packages {
                    openssl
                }
            }
        }
        config {
            id
            valid
            error
        }
        server {
            id
            name
        }
    }
`);

export const CONNECT_STATUS_QUERY = gql(`
    query ConnectStatus {
        connect {
            id
            dynamicRemoteAccess {
                enabledType
                runningType
                error
            }
        }
    }
`);

export const SERVICES_QUERY = gql(`
    query Services {
        services {
            id
            name
            online
            uptime {
                timestamp
            }
            version
        }
    }
`);

// Types will be generated by GraphQL codegen
