// Copyright © 2022-2026 Partium, Inc. DBA Partium import { Observable } from 'rxjs'; import { HttpsClientService, RequestOptions } from '../../../services/http/https-client/https-client.service.interface'; /** * Implementation of the HttpsClientService for providing basic https calls * on browsers by using the fetch API. * * In an error case all the functions will return an SDK_ERROR_CODE. */ export declare class FetchAPIHttpsClientService extends HttpsClientService { private deviceStatusService; onCreate(): void; /** * Send GET request to the server with the given url and content. * * @param url the full server url * @param urlParams array of url parameters (as objects) which will be appended to the url ?p1=x&p2=y * @param headers object with the request headers * @param requestOptions options for the request * @returns Observable that resolves with the request result */ get(url: string, urlParams?: Array, headers?: Object, requestOptions?: RequestOptions): Observable; /** * Send POST request to the server with the given url and content. * * @param url the relative server url * @param data the data to be sent with the post request * @param urlParams array of url parameters (as objects) which will be appended to the url ?p1=x&p2=y * @param headers object with the request headers * @param requestOptions options for the request * @returns Observable that resolves with the request result */ post(url: string, data: Object, urlParams?: Array, headers?: Object, requestOptions?: RequestOptions): Observable; /** * Send PATCH request to the server with the given url and content. * * @param url the relative server url * @param data the data to be sent with the patch request * @param urlParams array of url parameters (as objects) which will be appended to the url ?p1=x&p2=y * @param headers object with the request headers * @param requestOptions options for the request * @returns Observable that resolves with the request result */ patch(url: string, data: Object, urlParams?: Array, headers?: Object, requestOptions?: RequestOptions): Observable; /** * Send DELETE request to the server with the given url and content. * * @param url the full server url * @param data the data to be sent with the patch request * @param urlParams array of url parameters (as objects) which will be appended to the url ?p1=x&p2=y * @param headers object with the request headers * @param requestOptions options for the request * @returns Observable that resolves with the request result */ delete(url: string, data?: Object, urlParams?: Array, headers?: Object, requestOptions?: RequestOptions): Observable; /** * Send put request to the server with the given url and content. * * @param url the full server url * @param data the data to be sent with the patch request * @param urlParams array of url parameters (as objects) which will be appended to the url ?p1=x&p2=y * @param headers object with the request headers * @param requestOptions options for the request * @returns Observable that resolves with the request result */ put(url: string, data: Object, urlParams?: Array, headers?: Object, requestOptions?: RequestOptions): Observable; /** * Wraps the requests with necessary rxjs operators for processing response * and errors. * * @param url the url to request * @param options options for request, like body or header * @returns Observable that resolves with the request result */ private requestAsObservable; /** * Process successful http-requests. * Might also throw an error if the response contains a server-side error. * * @param result the response of the request * @returns the requests response-data */ private processResponse; /** * Check if there is internet connection and throw a NO_INTERNET, if so. * Rethrow the original error otherwise. */ private checkInternetConnectivity; private createBody; }