import {
  linkTypeMap,
  createClient as createClientOriginal,
  generateGraphqlOperation,
  assertSameVersion,
} from '@genql/runtime'
import types from './types.esm'
var typeMap = linkTypeMap(types)
export * from './guards.esm'

export var version = '2.10.0'
assertSameVersion(version)

export var createClient = function(options) {
  options = options || {}
  var optionsCopy = {
    url:
      'https://greenfield.cognitedata.com/api/v1/projects/platypus/schema/api/moviedm/1/graphql',
    queryRoot: typeMap.Query,
    mutationRoot: typeMap.Mutation,
    subscriptionRoot: typeMap.Subscription,
  }
  for (var name in options) {
    optionsCopy[name] = options[name]
  }
  return createClientOriginal(optionsCopy)
}

export const enumSortDirection = {
  ASC: 'ASC',
  DESC: 'DESC',
}

export const enumSearchActorFields = {
  name: 'name',
  age: 'age',
  externalId: 'externalId',
  spaceExternalId: 'spaceExternalId',
}

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

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

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

export var generateQueryOp = function(fields) {
  return generateGraphqlOperation('query', typeMap.Query, fields)
}
export var generateMutationOp = function(fields) {
  return generateGraphqlOperation('mutation', typeMap.Mutation, fields)
}
export var generateSubscriptionOp = function(fields) {
  return generateGraphqlOperation('subscription', typeMap.Subscription, fields)
}
export var everything = {
  __scalar: true,
}
