UNPKG

@ireceipt.pro/js

Version:

Create PDF files or images (JPG, PNG, WEBP) from your HTML template.

131 lines (130 loc) 4.5 kB
export declare class IReceiptPRO { /** * * @param apiKey - IReceipt PRO API KEY, you can get it on <https://dashboard.ireceipt.pro> */ constructor(apiKey: string); private apiKey; /** * * @param apiKey - IReceipt PRO API KEY, you can get it on <https://dashboard.ireceipt.pro> * @returns */ static useApiKey(apiKey: string): IReceiptPRO; /** * Create JPG Image from public template * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createJpgFromPublicTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; /** * Create PDF File from public template * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createPdfFromPublicTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; /** * Create PNG Image from public template * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createPngFromPublicTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; /** * Create WEBP Image from public template * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createWebpFromPublicTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; /** * Create JPG Image from private template, * you can manage it on <https://dashboard.ireceipt.pro> * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createJpgFromPrivateTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; /** * Create PDF File from private template, * you can manage it on <https://dashboard.ireceipt.pro> * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createPdfFromPrivateTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; /** * Create PNG Image from private template, * you can manage it on <https://dashboard.ireceipt.pro> * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createPngFromPrivateTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; /** * Create WEBP Image from private template, * you can manage it on <https://dashboard.ireceipt.pro> * * @param templateId - template id, you can find it on <https://dashboard.ireceipt.pro> * @param args - arguments for substitution in the template * @param size - the size of the file being created * @returns */ createWebpFromPrivateTemplate(templateId: string, args: { [key: string]: unknown; }, size?: { width: number; height: number; }): Promise<ArrayBuffer>; }