import { PDFServicesJob } from "./PDFServicesJob"; import { ReorderPagesParams } from "../params/reorderpages/ReorderPagesParams"; import { Asset } from "../../io/Asset"; import { ExecutionContext } from "../../internal/ExecutionContext"; import { NotifierConfig } from "../../config/notifier/NotifierConfig"; /** * A job that allows to rearrange pages in a PDF file according to the specified order. * * @example * Sample Usage: * ```js * const readStream = fs.createReadStream(""); * * const credentials = new ServicePrincipalCredentials({ * clientId: process.env.PDF_SERVICES_CLIENT_ID, * clientSecret: process.env.PDF_SERVICES_CLIENT_SECRET * }); * * const pdfServices = new PDFServices({credentials}); * * const inputAsset = await pdfServices.upload({ * readStream, * mimeType: MimeType.PDF * }); * * const params = new ReorderPagesParams({ * asset: inputAsset, * pageRanges: new PageRanges().addSinglePage(3).addRange(1,2) * }); * * const job = new ReorderPagesJob({params}); * * const pollingURL = await pdfServices.submit({job}); * * const pdfServicesResponse = await pdfServices.getJobResult({ * pollingURL, * resultType: ReorderPagesResult * }); * * const resultAsset = pdfServicesResponse.result.asset; * const streamAsset = await pdfServices.getContent({asset: resultAsset}); * ``` */ export declare class ReorderPagesJob extends PDFServicesJob { private readonly _reorderPagesParams; private readonly _outputAsset?; /** * Constructs a new `ReorderPagesJob` instance. * * @param params The parameters for constructing an instance of `ReorderPagesJob`. * @param params.params {@link ReorderPagesParams} object containing the input file and the page numbers in * the order to be rearranged. Cannot be undefined. * @param [params.outputAsset] {@link Asset} object representing the output asset. * @remarks External assets can be set as output only when input is external asset as well. */ constructor(params: { params: ReorderPagesParams; outputAsset?: Asset; }); /** * @hidden */ process(executionContext: ExecutionContext, notifierConfigList?: NotifierConfig[]): Promise; private generatePDFServicesAPIRequest; }