UNPKG

enterprise-basics

Version:

A utility library for enterprise applications. It streamlines common business tasks by providing functions to process delimited and Excel files, generate professional PDFs, and handle email communications with attachments.

44 lines (43 loc) 1.46 kB
import { z } from 'zod'; declare const validationSchema: z.ZodObject<{ storageConnectionString: z.ZodString; containerName: z.ZodString; path: z.ZodString; file: z.ZodType<File, z.ZodTypeDef, File>; }, "strip", z.ZodTypeAny, { path: string; storageConnectionString: string; containerName: string; file: File; }, { path: string; storageConnectionString: string; containerName: string; file: File; }>; export type UploadParams = z.infer<typeof validationSchema>; /** * Uploads a file to Azure Blob Storage * * @param {string} storageConnectionString - Azure Storage connection string * @param {string} containerName - Name of the blob container * @param {string} path - Path where the blob will be stored in the container * @param {File} file - File object to upload * * @returns {Promise<void>} Resolves when upload is complete * * @throws {Error} * - If input validation fails * - If container is not found * - If upload fails * * @example * try { * await uploadBlob(connectionString, 'my-container', 'path/to/file.txt', fileObject); * console.log('Upload successful'); * } catch (error) { * console.error('Upload failed:', error.message); * } */ export declare function uploadBlob(storageConnectionString: UploadParams['storageConnectionString'], containerName: UploadParams['containerName'], path: UploadParams['path'], file: UploadParams['file']): Promise<void>; export {};