UNPKG

bam-ticketing-sdk

Version:

SDK for B.A.M Ticketing API

54 lines 2.64 kB
import { AxiosInstance } from 'axios'; import { HealthStatus, ListInfo } from '../common/types'; import { CreatePdfTemplate, ListPdfTemplatesQuery, PdfTemplate, RenderPdfWithCustomTemplateRequest, UpdatePdfTemplate } from './types'; import { OrganizerName, OrganizerSpecificId } from '../event'; export declare class PdfService { readonly client: AxiosInstance; readonly version: string; constructor(client: AxiosInstance, version: string); /** * Returns true if the service is reachable * * @returns Services' online status */ health(): Promise<HealthStatus>; /** * Create a PDF template for a specific organizer * Requires the `event.event.create` org level permission for the organizer * @param orgName.name The specified organizer * @param template The PDF template that should be created * @throws `ApiError` when the QR code image is missing */ createPdfTemplate(orgName: OrganizerName, template: CreatePdfTemplate): Promise<PdfTemplate>; /** * Update an existing PDF template * Requires the `event.event.create` org level permission for the organizer * @param id.id ID of the PDF template * @param id.organizerId Name of the organizer * @param template The updated PDF template * @throws `ApiError` when the QR code image is missing */ updatePdfTemplate(id: OrganizerSpecificId, template: UpdatePdfTemplate): Promise<PdfTemplate>; /** * Get a single PDF template by the ID * Requires the `event.event.create` org level permission for the organizer * @param id.id The PDF templates ID * @param id.organizerId Name of the organizer the PDF template is belonging to */ getSinglePdfTemplate(id: OrganizerSpecificId): Promise<PdfTemplate>; /** * Query the PDF template for a specific organizer * Requires the `event.event.create` org level permission for the organizer * @param orgName.name Name of the organizer the PDF templates are belonging to * @param query.name Query PDF templates by the `name` */ getListPdfTemplate(orgName: OrganizerName, query?: ListPdfTemplatesQuery): Promise<ListInfo<PdfTemplate>>; /** * Render a PDF with a custom template. Requires event permission for any organizer. * @param request.template The custom Scriban template created with our PDF template editor * @param request.pdfTicket Data that will be passed to the template * @returns Rendered PDF */ renderPdfWithCustomTemplate(request: RenderPdfWithCustomTemplateRequest): Promise<string>; } //# sourceMappingURL=service.d.ts.map