import {
  FieldsSelection,
  GraphqlOperation,
  ClientOptions,
  Observable,
} from '@genql/runtime'
import { SubscriptionClient } from 'subscriptions-transport-ws'
export * from './schema'
import { QueryRequest, QueryPromiseChain, Query } from './schema'
export declare const createClient: (options?: ClientOptions) => Client
export declare const everything: { __scalar: boolean }
export declare const version: string

export interface Client {
  wsClient?: SubscriptionClient

  query<R extends QueryRequest>(
    request: R & { __name?: string },
  ): Promise<FieldsSelection<Query, R>>

  chain: {
    query: QueryPromiseChain
  }
}

export type QueryResult<fields extends QueryRequest> = FieldsSelection<
  Query,
  fields
>

export declare const generateQueryOp: (
  fields: QueryRequest & { __name?: string },
) => GraphqlOperation

export declare const enumSortDirection: {
  readonly ASC: 'ASC'
  readonly DESC: 'DESC'
}

export declare const enumSearchActorFields: {
  readonly name: 'name'
  readonly age: 'age'
  readonly externalId: 'externalId'
  readonly spaceExternalId: 'spaceExternalId'
}

export declare const enumSearchMachinePump2Fields: {
  readonly name: 'name'
  readonly description: 'description'
  readonly state: 'state'
  readonly weight: 'weight'
  readonly isActive: 'isActive'
  readonly production_ts: 'production_ts'
  readonly pressure_ts: 'pressure_ts'
  readonly location_3dmr: 'location_3dmr'
  readonly location_3dn: 'location_3dn'
  readonly pnid_file: 'pnid_file'
  readonly externalId: 'externalId'
  readonly spaceExternalId: 'spaceExternalId'
}

export declare const enumSearchMachinePumpFields: {
  readonly name: 'name'
  readonly description: 'description'
  readonly state: 'state'
  readonly weight: 'weight'
  readonly isActive: 'isActive'
  readonly production_ts: 'production_ts'
  readonly pressure_ts: 'pressure_ts'
  readonly location_3dmr: 'location_3dmr'
  readonly location_3dn: 'location_3dn'
  readonly pnid_file: 'pnid_file'
  readonly externalId: 'externalId'
  readonly spaceExternalId: 'spaceExternalId'
}

export declare const enumSearchMovieFields: {
  readonly name: 'name'
  readonly description: 'description'
  readonly watchedIt: 'watchedIt'
  readonly imdbRating: 'imdbRating'
  readonly releasedYear: 'releasedYear'
  readonly gross: 'gross'
  readonly runTime: 'runTime'
  readonly externalId: 'externalId'
  readonly spaceExternalId: 'spaceExternalId'
}
