/**
 * This file was auto-generated by openapi-typescript.
 * Do not make direct changes to the file.
 */

export interface paths {
  '/authors/{id}.json': {
    parameters: {
      query?: never
      header?: never
      path?: never
      cookie?: never
    }
    /**
     * Get author by ID
     * @description Gets author information.
     *
     */
    get: operations['getAuthor']
    put?: never
    post?: never
    delete?: never
    options?: never
    head?: never
    patch?: never
    trace?: never
  }
  '/books/{id}.json': {
    parameters: {
      query?: never
      header?: never
      path?: never
      cookie?: never
    }
    /**
     * Get Edition (Book) by ID
     * @description Gets edition information.
     *
     */
    get: operations['getEdition']
    put?: never
    post?: never
    delete?: never
    options?: never
    head?: never
    patch?: never
    trace?: never
  }
  '/works/{id}.json': {
    parameters: {
      query?: never
      header?: never
      path?: never
      cookie?: never
    }
    /**
     * Get Work by ID
     * @description Gets work information.
     *
     */
    get: operations['getWork']
    put?: never
    post?: never
    delete?: never
    options?: never
    head?: never
    patch?: never
    trace?: never
  }
  '/isbn/{isbn}.json': {
    parameters: {
      query?: never
      header?: never
      path?: never
      cookie?: never
    }
    /**
     * Get Edition (Book) by ISBN
     * @description Gets Edition information.
     *
     */
    get: operations['getEditionByISBN']
    put?: never
    post?: never
    delete?: never
    options?: never
    head?: never
    patch?: never
    trace?: never
  }
}
export type webhooks = Record<string, never>
export interface components {
  schemas: {
    /** @example /authors/OL27278A */
    AuthorKey: string
    TextBlock: {
      /** @enum {string} */
      type: '/type/text'
      value: string
    }
    Link: {
      url: string
      title: string
      type?: {
        /** @enum {unknown} */
        key: '/type/link'
      }
    }
    DateTimeObject: {
      /** @enum {string} */
      type: '/type/datetime'
      value: string
    }
    Author: {
      key: components['schemas']['AuthorKey']
      name: string
      type: {
        /** @enum {string} */
        key?: '/type/author'
      }
      alternate_names?: string[]
      bio?: components['schemas']['TextBlock']
      birth_date?: string
      death_date?: string
      /** @example England, U.K. */
      location?: string
      date?: string
      /** @enum {string} */
      entity_type?: 'person' | 'org' | 'event'
      fuller_name?: string
      personal_name?: string
      title?: string
      photos?: number[]
      links?: components['schemas']['Link'][]
      remote_ids?: {
        wikidata?: string
        viaf?: string
        [key: string]: unknown
      }
      /** @description DEPRECATED: Not many authors have this property. Should be moved to Links and/or remote_ids: wikidata. */
      wikipedia?: string
      revision: number
      latest_revision?: number
      created?: components['schemas']['DateTimeObject']
      last_modified: components['schemas']['DateTimeObject']
    }
    EditionKey: string
    AuthorKeyObject: {
      key: components['schemas']['AuthorKey']
    }
    WorkKey: string
    /** @description Book Identifier */
    ISBN10: string
    /** @description Book Identifier */
    ISBN13: string
    /** @description A type based on the list of MARC21 language codes. See https://www.loc.gov/marc/languages/ */
    LanguageObject: {
      /** @example /languages/ger */
      key: string
    }
    /**
     * @description The MARC21 country code. See https://www.loc.gov/marc/countries/cou_home.html
     * @example enk
     */
    PublishCountry: string
    /**
     * @description The Library of Congress Classification number. See https://www.loc.gov/catdir/cpso/lcc.html We include the imprint date as the last four digits.
     * @example BS571.5 .S68 1995
     */
    LcClassification: string
    /** @example {
     *       "identifiers": {
     *         "goodreads": [
     *           "839029"
     *         ],
     *         "librarything": [
     *           "52023"
     *         ]
     *       },
     *       "title": "Adventures of Stainless Steel Rat",
     *       "authors": [
     *         {
     *           "key": "/authors/OL27278A"
     *         }
     *       ],
     *       "publish_date": "April 15, 1986",
     *       "publishers": [
     *         "Berkley"
     *       ],
     *       "isbn_13": [
     *         "9780425095317"
     *       ],
     *       "isbn_10": [
     *         "0425095312"
     *       ],
     *       "type": {
     *         "key": "/type/edition"
     *       },
     *       "local_id": [
     *         "urn:bwbsku:O7-BHW-096"
     *       ],
     *       "source_records": [
     *         "promise:bwb_daily_pallets_2020-12-04",
     *         "bwb:9780425095317",
     *         "ia:isbn_0425095312"
     *       ],
     *       "ocaid": "isbn_0425095312",
     *       "key": "/books/OL7502572M",
     *       "works": [
     *         {
     *           "key": "/works/OL467275W"
     *         }
     *       ],
     *       "covers": [
     *         14480781
     *       ],
     *       "number_of_pages": 418,
     *       "latest_revision": 11,
     *       "revision": 11,
     *       "created": {
     *         "type": "/type/datetime",
     *         "value": "2008-04-29T13:35:46.876380"
     *       },
     *       "last_modified": {
     *         "type": "/type/datetime",
     *         "value": "2023-10-21T17:50:30.639115"
     *       }
     *     } */
    Edition: {
      key: components['schemas']['EditionKey']
      title: string
      subtitle?: string
      type: {
        /** @enum {string} */
        key?: '/type/edition'
      }
      authors?: components['schemas']['AuthorKeyObject'][]
      works: {
        key: components['schemas']['WorkKey']
      }[]
      identifiers?: {
        [key: string]: unknown
      }
      isbn_10?: components['schemas']['ISBN10'][]
      isbn_13?: components['schemas']['ISBN13'][]
      /**
       * Library of Congress Control Numbers
       * @description Library of Congress Control Numbers, linkable via https://lccn.loc.gov/<lccn>
       */
      lccn?: string[]
      /**
       * Internet Archive OCAID
       * @description Links to the Internet Archive record via https://archive.org/details/<ocaid>
       */
      ocaid?: string
      /** @description OCLC Online Computer Library Center / WorldCat id, linkable via https://www.worldcat.org/oclc/<oclc_number> */
      oclc_numbers?: string[]
      local_id?: string[]
      covers?: number[]
      links?: components['schemas']['Link'][]
      languages?: components['schemas']['LanguageObject'][]
      /** @description Translated from original language(s) */
      translated_from?: components['schemas']['LanguageObject'][]
      /**
       * @description The title of the original language work
       * @example Ai margini del caos
       */
      translation_of?: string
      by_statement?: string
      /** @example 300 grams */
      weight?: string
      /** @example 1st ed. */
      edition_name?: string
      number_of_pages?: number
      pagination?: string
      /** @example 5.4 x 4.7 x 0.2 inches */
      physical_dimensions?: string
      /** @example Paperback */
      physical_format?: string
      /** @example 1992 */
      copyright_date?: string
      publish_country?: components['schemas']['PublishCountry']
      /**
       * @description The publication date in Extended Date/Time Format (EDTF) -- https://www.loc.gov/standards/datetime/
       * @example 2017-07
       */
      publish_date?: string
      publish_places?: string[]
      publishers?: string[]
      contributions?: string[]
      dewey_decimal_class?: string[]
      genres?: string[]
      lc_classifications?: components['schemas']['LcClassification'][]
      other_titles?: string[]
      series?: string[]
      source_records?: string[]
      subjects?: string[]
      work_titles?: string[]
      table_of_contents?: unknown[]
      description?: components['schemas']['TextBlock']
      first_sentence?: components['schemas']['TextBlock']
      notes?: components['schemas']['TextBlock']
      revision: number
      latest_revision?: number
      created?: components['schemas']['DateTimeObject']
      last_modified: components['schemas']['DateTimeObject']
    }
    /** Open Library Work Schema */
    Work: {
      key: components['schemas']['WorkKey']
      title: string
      subtitle?: string
      type: {
        /** @enum {string} */
        key?: '/type/work'
      }
      authors?: {
        type: {
          /** @enum {unknown} */
          key: '/type/author_role'
        }
        author: components['schemas']['AuthorKeyObject']
        role?: string
        as?: string
      }[]
      covers?: number[]
      links?: components['schemas']['Link'][]
      /** @description Unsure what this is for, deprecate? */
      id?: number
      lc_classifications?: string[]
      subjects?: string[]
      first_publish_date?: string
      description?: components['schemas']['TextBlock']
      notes?: components['schemas']['TextBlock']
      revision: number
      latest_revision?: number
      created?: components['schemas']['DateTimeObject']
      last_modified: components['schemas']['DateTimeObject']
      [key: string]: unknown
    }
  }
  responses: never
  parameters: never
  requestBodies: never
  headers: never
  pathItems: never
}
export type $defs = Record<string, never>
export interface operations {
  getAuthor: {
    parameters: {
      query?: never
      header?: never
      path: {
        /**
         * @description The author's Open Library identifier
         * @example OL27278A
         */
        id: string
      }
      cookie?: never
    }
    requestBody?: never
    responses: {
      /** @description Success */
      200: {
        headers: {
          [name: string]: unknown
        }
        content: {
          'application/json': components['schemas']['Author']
        }
      }
    }
  }
  getEdition: {
    parameters: {
      query?: never
      header?: never
      path: {
        /**
         * @description The Edition's Open Library identifier
         * @example OL7502572M
         */
        id: string
      }
      cookie?: never
    }
    requestBody?: never
    responses: {
      /** @description Success */
      200: {
        headers: {
          [name: string]: unknown
        }
        content: {
          'application/json': components['schemas']['Edition']
        }
      }
      /** @description Not Found */
      404: {
        headers: {
          [name: string]: unknown
        }
        content: {
          'application/json': {
            error?: string
            key?: components['schemas']['EditionKey']
          }
        }
      }
    }
  }
  getWork: {
    parameters: {
      query?: never
      header?: never
      path: {
        /**
         * @description The work's Open Library identifier
         * @example OL467275W
         */
        id: string
      }
      cookie?: never
    }
    requestBody?: never
    responses: {
      /** @description Success */
      200: {
        headers: {
          [name: string]: unknown
        }
        content: {
          'application/json': components['schemas']['Work']
        }
      }
    }
  }
  getEditionByISBN: {
    parameters: {
      query?: never
      header?: never
      path: {
        /** @description ISBN (either IBSN13 or ISBN10) */
        isbn: string
      }
      cookie?: never
    }
    requestBody?: never
    responses: {
      /** @description Success */
      200: {
        headers: {
          [name: string]: unknown
        }
        content: {
          'application/json': components['schemas']['Edition']
        }
      }
      /** @description Not Found */
      404: {
        headers: {
          [name: string]: unknown
        }
        content: {
          'application/json': {
            error?: string
            key?: string
          }
        }
      }
    }
  }
}
