import { PDFServicesJob } from "./PDFServicesJob"; import { Asset } from "../../io/Asset"; import { DeletePagesParams } from "../params/deletepages/DeletePagesParams"; import { ExecutionContext } from "../../internal/ExecutionContext"; import { NotifierConfig } from "../../config/notifier/NotifierConfig"; /** * A job that deletes pages from a PDF file. * * @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 pageRangeForDeletion = new PageRanges().addSinglePage(1); * * const params = new DeletePagesParams({ * pageRanges: pageRangeForDeletion * }); * * const job = new DeletePagesJob({inputAsset, params}); * * const pollingURL = await pdfServices.submit({job}); * * const pdfServicesResponse = await pdfServices.getJobResult({ * pollingURL, * resultType: DeletePagesResult * }); * * const resultAsset = pdfServicesResponse.result.asset; * const streamAsset = await pdfServices.getContent({asset: resultAsset}); * ``` */ export declare class DeletePagesJob extends PDFServicesJob { private readonly _inputAsset; private readonly _deletePagesParams; private readonly _outputAsset?; /** * Constructs a new `DeletePagesJob` instance. * * @param params The parameters for constructing an instance of `DeletePagesJob`. * @param params.inputAsset The input asset for the job. Cannot be undefined. * @param params.params {@link DeletePagesParams} object containing the page ranges to be deleted. * 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: { inputAsset: Asset; params: DeletePagesParams; outputAsset?: Asset; }); /** * @hidden */ process(executionContext: ExecutionContext, notifierConfigList?: NotifierConfig[]): Promise; private generatePDFServicesAPIRequest; private getPageActionCommands; }