UNPKG

@elastic.io/component-commons-library

Version:
19 lines (18 loc) 905 B
import { RetryOptions } from '@elastic.io/maester-client/dist/src/interfaces'; import { Readable } from 'stream'; export declare const STORAGE_TYPE_PARAMETER = "storage_type"; export declare const DEFAULT_STORAGE_TYPE = "steward"; export declare const MAESTER_OBJECT_ID_ENDPOINT = "/objects/"; export declare class AttachmentProcessor { private userAgent; private msgId; constructor(userAgent?: string, msgId?: string); getAttachment(url: string, responseType: string, retryOptions?: RetryOptions): Promise<any>; uploadAttachment(getAttachment: () => Promise<Readable>, retryOptions?: RetryOptions, contentType?: string): Promise<any>; getMaesterAttachmentUrlById(attachmentId: any): string; private getStewardAttachment; private getMaesterAttachment; private getStorageTypeByUrl; private getMaesterAttachmentIdByUrl; private addRetryCountInterceptorToAxios; }