UNPKG

@medusajs/core-flows

Version:

Set of workflow definitions for Medusa

53 lines 1.57 kB
/** * The data to upload files. */ export type UploadFilesStepInput = { /** * The files to upload. */ files: { /** * The name of the file. */ filename: string; /** * The MIME type of the file. * * @example * img/jpg */ mimeType: string; /** * The content of the file. For images, for example, * use binary string. For CSV files, use the CSV content. */ content: string; /** * The access level of the file. Use `public` for the file that * can be accessed by anyone. For example, for images that are displayed * on the storefront. Use `private` for files that are only accessible * by authenticated users. For example, for CSV files used to * import data. */ access: "public" | "private"; }[]; }; export declare const uploadFilesStepId = "upload-files"; /** * This step uploads one or more files using the installed * [File Module Provider](https://docs.medusajs.com/resources/infrastructure-modules/file). * * @example * const data = uploadFilesStep({ * files: [ * { * filename: "test.jpg", * mimeType: "img/jpg", * content: "binary-string", * access: "public" * } * ] * }) */ export declare const uploadFilesStep: import("@medusajs/framework/workflows-sdk").StepFunction<UploadFilesStepInput, import("@medusajs/framework/types").FileDTO[]>; //# sourceMappingURL=upload-files.d.ts.map