declare namespace datasources {
  class RestError extends Error {
    constructor(
      message: string,
      status: number,
      statusText?: string,
      errCode?: number | string,
    );

    getDescription(): string;
  }

  function restRequest<T>(
    command: HttpMethod,
    url: string,
    body: unknown,
  ): Promise<T>;
}
