UNPKG

836 BTypeScriptView Raw
1import type { Collection, CollectionProp, CursorPaginatedCollection, CursorPaginatedCollectionProp, MakeRequest } from './common-types';
2/**
3 * @private
4 */
5export declare const wrapCollection: <R, T, Rest extends any[]>(fn: (makeRequest: MakeRequest, entity: T, ...rest: Rest) => R) => (makeRequest: MakeRequest, data: CollectionProp<T>, ...rest: Rest) => Collection<R, T>;
6export declare const wrapCursorPaginatedCollection: <R, T, Rest extends any[]>(fn: (makeRequest: MakeRequest, entity: T, ...rest: Rest) => R) => (makeRequest: MakeRequest, data: CursorPaginatedCollectionProp<T>, ...rest: Rest) => CursorPaginatedCollection<R, T>;
7export declare function isSuccessful(statusCode: number): boolean;
8export declare function shouldRePoll(statusCode: number): boolean;
9export declare function waitFor(ms?: number): Promise<unknown>;