UNPKG

@iotize/ionic

Version:

Iotize specific building blocks on top of @ionic/angular.

40 lines (39 loc) 1.55 kB
import '@iotize/tap/service/impl/interface'; import { ServiceCallType, Tap, TapResponse } from '@iotize/tap'; import { Observable } from 'rxjs'; export declare const DEFAULT_TAP_REQUEST_MAX_SIZE_OPTIONS: { maxRequestByteSize: number; maxResponseByteSize: number; }; export interface FixedResponseBodySizeServiceCall<BodyType, ReturnType> { call: ServiceCallType<BodyType, ReturnType>; responseBodySize: number; } /** * Compute tap request call size for a multi request * @param chunk * @returns */ export declare const computeMultiTapRequestCallSize: (chunk: ServiceCallType) => number; /** * @deprecated use computeMultiTapRequestCallSize instead */ export declare const computeTapRequestCallSize: (chunk: ServiceCallType) => number; export declare function createSingleChunkMultiTapRequestCalls(calls: FixedResponseBodySizeServiceCall<unknown, unknown>[], index?: number, { maxResponseByteSize, maxRequestByteSize, }?: { maxResponseByteSize: number; maxRequestByteSize: number; }): { calls: ServiceCallType<any, any>[]; nextIndex: number; } | { nextIndex: undefined; calls: ServiceCallType<any, any>[]; }; export declare function chunkMultiTapRequestCalls(calls: FixedResponseBodySizeServiceCall<unknown, unknown>[], options?: { maxRequestByteSize: number; maxResponseByteSize: number; }): ServiceCallType[][]; export declare function createMultiTapRequestCallChuncksExecutor(tap: Tap, chunks: ServiceCallType[][]): Observable<{ index: number; responses: TapResponse<unknown>[]; }>;