smp-serverless-utils
Version:
Utilities for working with GCP Storage, file handling, and PDF/SVG conversions
18 lines (17 loc) • 1.23 kB
TypeScript
export declare const getFileName: (queryObject: any, options?: any) => string;
export declare const uploadToGCPBucket: (bucketName: string, localPath: string, { orgId, functionName, storyId, fileName, }: {
orgId?: string;
functionName: string;
storyId?: string;
fileName: string;
}) => Promise<string>;
export declare const saveSvgToFile: (svgData: string, tempDir: string, fileName: string) => string;
export declare function getUniqueFileName(name: string): string;
export declare const convertPixelToPts: (value: number) => string;
export declare const svgToPDF: (svgData: string, tempDir: string, fileName: string, pageHeight: number, pageWidth: number, browser?: any) => Promise<string>;
export declare const getStoryExporterPageURL: (storyId: string, organization: number, queryParams: URLSearchParams) => string;
export declare const getDynamicStoryExporterPageURL: (exportedItemId: string, queryParams: URLSearchParams) => string;
export declare const validateRequest: (body: any) => string;
export declare const fetchHead: (url: string) => Promise<Headers>;
export declare const fetchRedirectUrl: (url: string) => Promise<string>;
export declare const fetchMimeType: (url: string) => Promise<string>;