import nodeFetch from "node-fetch" ; import { Client , createClient } from "../../generated/io-api/client" ; export function APIClient ( baseUrl , token , fetchApi = ( nodeFetch as unknown ) as typeof fetch ) { return createClient < "SubscriptionKey" > ( { basePath : "" , baseUrl , fetchApi , withDefaults : op => params => op ( { ... params , SubscriptionKey : token } ) } ) ; } export type APIClient = typeof APIClient ;