UNPKG

@di-zed/yandex-smart-home

Version:

The Yandex Smart Home skills for the different device types.

67 lines (66 loc) 1.67 kB
/// <reference types="node" /> /** * @author DiZed Team * @copyright Copyright (c) DiZed Team (https://github.com/di-zed/) */ import { RequestOptions } from 'http'; /** * Request Helper. */ declare class HttpProvider { /** * Make a Request. * * @param url * @param data * @param options * @returns Promise<RequestOutput> */ request(url: string, data?: RequestInput, options?: RequestOptions): Promise<RequestOutput>; /** * Make a POST Request. * * @param url * @param data * @param options * @returns Promise<RequestOutput> */ post(url: string, data: RequestInput, options?: RequestOptions): Promise<RequestOutput>; /** * Make a PUT Request. * * @param url * @param data * @param options * @returns Promise<RequestOutput> */ put(url: string, data: RequestInput, options?: RequestOptions): Promise<RequestOutput>; /** * Make a GET Request. * * @param url * @param data * @param options * @returns Promise<RequestOutput> */ get(url: string, data?: RequestInput, options?: RequestOptions): Promise<RequestOutput>; /** * Make a DELETE Request. * * @param url * @param data * @param options * @returns Promise<RequestOutput> */ delete(url: string, data: RequestInput, options?: RequestOptions): Promise<RequestOutput>; } /** * Request Input Type. */ export type RequestInput = Record<string, unknown>; /** * Request Output Type. */ export type RequestOutput = Record<string, unknown>; declare const _default: HttpProvider; export default _default;