UNPKG

@sirenapp/js-sdk

Version:

JavaScript middleware designed to streamline interaction for managing and displaying in-app notifications seamlessly

9 lines (8 loc) 875 B
import { type HttpOptions, type ErrorLevel } from '../types'; import type { ErrorCallbackType, SirenErrorType } from '../types'; export declare function http(options: HttpOptions, data?: Record<string, string | boolean | number>): Promise<any>; export declare function handleFetchError(message: string, level: ErrorLevel, code: string, onError?: ErrorCallbackType): SirenErrorType | null; export declare function httpGet<T>(options: HttpOptions, data?: Record<string, string | boolean | number>): Promise<T>; export declare function httpPost<T>(options: HttpOptions, data?: Record<string, string | boolean | number>): Promise<T>; export declare function httpPatch<T>(options: HttpOptions, data?: Record<string, string | boolean | number>): Promise<T>; export declare function httpDelete<T>(options: HttpOptions, data?: Record<string, string | boolean | number>): Promise<T>;