UNPKG

azure-kusto-ingest

Version:
41 lines 1.59 kB
import { Readable } from "stream"; import IngestionProperties from "./ingestionProperties.js"; export declare enum CompressionType { ZIP = ".zip", GZIP = ".gz", None = "" } export declare const getSourceId: (sourceId: string | null) => string; export declare function shouldCompressFileByExtension(extension?: string): boolean; export declare abstract class AbstractDescriptor { sourceId: string | null; size: number | null; constructor(sourceId?: string | null, size?: number | null); } export declare class StreamDescriptor extends AbstractDescriptor { readonly stream: Readable | ArrayBuffer; compressionType: CompressionType; /** * Use Readable for Node.js and ArrayBuffer in browser */ constructor(stream: Readable | ArrayBuffer, sourceId?: string | null, compressionType?: CompressionType, size?: number | null); merge(other: StreamDescriptor): this; getCompressionSuffix(): string; } export declare class BlobDescriptor extends AbstractDescriptor { readonly path: string; constructor(path: string, size?: number | null, sourceId?: string | null); fillSize(): Promise<void>; } export interface FileDescriptorBase { size: number | null; zipped: boolean; compressionType: CompressionType; cleanupTmp?: () => Promise<void>; extension?: string; name?: string; sourceId: string | null; getCompressionSuffix: () => string; } export declare const generateBlobName: (desc: StreamDescriptor | FileDescriptorBase, props: IngestionProperties) => string; //# sourceMappingURL=descriptors.d.ts.map