/** @packageDocumentation * @module Core */ import { KeySet } from "./KeySet.js"; /** * Create a type with `T` properties excluding properties listed in `K`. * * Usage example: `Omit` * * @public */ export type Omit = Pick>; /** * Create a type with `T` properties excluding all properties in type `K`. * * Usage example: `Subtract` * * @public */ export type Subtract = Omit; /** * Create a type from given type `T` and make specified properties optional. * @public */ export type PartialBy = Omit & Partial>; /** * A dictionary data structure. * @public */ export interface ValuesDictionary { [key: string]: T; } /** * A structure for paged responses * @public */ export interface PagedResponse { /** Total number of items */ total: number; /** Items for the requested page */ items: T[]; } /** * Get total number of instances included in the supplied key set. The * count is calculated by adding all of the following: * - `keys.instanceKeysCount` * - number of `keys.nodeKeys` which are *ECInstance* keys * - for every grouping node key in `keys.nodeKeys`, number of grouped instances * * E.g. if `keys` contains one instance key, one *ECInstance* node key * and one grouping node key which groups 3 instances, the result is 5. * * @public */ export declare const getInstancesCount: (keys: Readonly) => number; /** * Default (recommended) keyset batch size for cases when it needs to be sent * over HTTP. Sending keys in batches helps avoid HTTP413 error. * * @public */ export declare const DEFAULT_KEYS_BATCH_SIZE = 5000; /** * Removes all `undefined` properties from given `obj` object and returns * the same (mutated) object. * * Example: `omitUndefined({ a: 1, b: undefined })` will return `{ a: 1 }` * * @internal */ export declare function omitUndefined(obj: T): T; /** @internal */ type NullToUndefined = T extends null ? undefined : T extends Array ? Array> : T extends object ? { [K in keyof T]: NullToUndefined; } : T; /** @internal */ export declare function deepReplaceNullsToUndefined(obj: T): NullToUndefined; /** @internal */ export declare function createCancellableTimeoutPromise(timeoutMs: number): { promise: Promise; cancel: () => void; }; export {}; //# sourceMappingURL=Utils.d.ts.map