diff --git a/.github/actions/setup-for-scripts/action.yml b/.github/actions/setup-for-scripts/action.yml index 868c37b70dc233..575910c35770ee 100644 --- a/.github/actions/setup-for-scripts/action.yml +++ b/.github/actions/setup-for-scripts/action.yml @@ -4,7 +4,7 @@ description: Set up repo for running scripts runs: using: composite steps: - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '20' - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index fe0524b639d058..6e8c1d6481a7da 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -35,7 +35,7 @@ jobs: # Need this to be able to inquire about origin/master filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none. - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '20' @@ -67,7 +67,7 @@ jobs: # Need this to be able to inquire about origin/master filter: blob:none # https://github.blog/2020-12-21-get-up-to-speed-with-partial-clone-and-shallow-clone/ fetch-depth: 0 # Default is 1; need to set to 0 to get the benefits of blob:none. - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '20' diff --git a/.github/workflows/pnpm-cache.yml b/.github/workflows/pnpm-cache.yml index 38e77b464fe66b..6c03b8222c27c1 100644 --- a/.github/workflows/pnpm-cache.yml +++ b/.github/workflows/pnpm-cache.yml @@ -12,7 +12,7 @@ jobs: if: ${{ github.repository == 'DefinitelyTyped/DefinitelyTyped' }} steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - uses: actions/setup-node@cdca7365b2dadb8aad0a33bc7601856ffabcc48e # v4.3.0 + - uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0 with: node-version: '20' - uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 diff --git a/attw.json b/attw.json index a4104ed6810714..2e54a04ed24bca 100644 --- a/attw.json +++ b/attw.json @@ -291,7 +291,6 @@ "react-tag-input", "react-text-mask", "react-transition-group", - "react-type-animation", "react-typical", "react-typing-effect", "react-widgets-moment", diff --git a/notNeededPackages.json b/notNeededPackages.json index d560783ad06e85..5331264cd29a79 100644 --- a/notNeededPackages.json +++ b/notNeededPackages.json @@ -52,6 +52,10 @@ "libraryName": "@adobe/node-fetch-retry", "asOfVersion": "2.1.0" }, + "adobe__pdfservices-node-sdk": { + "libraryName": "@adobe/pdfservices-node-sdk", + "asOfVersion": "4.0.0" + }, "ads-client": { "libraryName": "ads-client", "asOfVersion": "2.0.0" @@ -2393,6 +2397,10 @@ "libraryName": "git-up", "asOfVersion": "8.1.0" }, + "git-url-parse": { + "libraryName": "git-url-parse", + "asOfVersion": "16.0.2" + }, "github": { "libraryName": "github", "asOfVersion": "7.1.0" @@ -4181,6 +4189,10 @@ "libraryName": "mini-css-extract-plugin", "asOfVersion": "2.5.0" }, + "mini-html-webpack-plugin": { + "libraryName": "mini-html-webpack-plugin", + "asOfVersion": "3.0.0" + }, "minimist-options": { "libraryName": "minimist-options", "asOfVersion": "4.0.1" @@ -5295,6 +5307,10 @@ "libraryName": "pusher-js", "asOfVersion": "5.1.0" }, + "pvutils": { + "libraryName": "pvutils", + "asOfVersion": "1.1.0" + }, "python-shell": { "libraryName": "python-shell", "asOfVersion": "1.0.2" @@ -6071,6 +6087,10 @@ "libraryName": "react-tooltip", "asOfVersion": "4.2.4" }, + "react-type-animation": { + "libraryName": "react-type-animation", + "asOfVersion": "2.0.0" + }, "react-vega": { "libraryName": "react-vega", "asOfVersion": "7.0.0" @@ -6527,6 +6547,10 @@ "libraryName": "signal-exit", "asOfVersion": "4.0.0" }, + "signalfx": { + "libraryName": "signalfx", + "asOfVersion": "8.0.0" + }, "signature_pad": { "libraryName": "signature_pad", "asOfVersion": "4.0.0" diff --git a/types/adobe__pdfservices-node-sdk/adobe__pdfservices-node-sdk-tests.ts b/types/adobe__pdfservices-node-sdk/adobe__pdfservices-node-sdk-tests.ts deleted file mode 100644 index 9382fa992110ff..00000000000000 --- a/types/adobe__pdfservices-node-sdk/adobe__pdfservices-node-sdk-tests.ts +++ /dev/null @@ -1,429 +0,0 @@ -import { - ClientConfig, - CombineFiles, - CompressPDF, - CreatePDF, - Credentials, - DeletePages, - DocumentMerge, - Error, - ExecutionContext, - ExportPDF, - ExportPDFToImages, - ExtractPDF, - FileRef, - InsertPages, - LinearizePDF, - OCR, - PageRanges, - PDFProperties, - ProtectPDF, - RemoveProtection, - ReorderPages, - ReplacePages, - RotatePages, - SplitPDF, -} from "@adobe/pdfservices-node-sdk"; -import { DocumentMergeOptions } from "@adobe/pdfservices-node-sdk/operation/option/documentmerge/document-merge-options"; - -function combineFiles() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const combineFilesOperation = CombineFiles.Operation.createNew(); - const input1 = FileRef.createFromLocalFile( - "test/resources/combinePagesInput1.pdf", - CombineFiles.SupportedSourceFormat.pdf, - ); - const input2 = FileRef.createFromLocalFile( - "test/resources/combinePagesInput1.pdf", - CombineFiles.SupportedSourceFormat.pdf, - ); - - combineFilesOperation.addInput(input1); - combineFilesOperation.addInput(input2); - - combineFilesOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/CombinedPDF.pdf")) - .catch(err => {}); -} -function compressPDF() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const compressPdfOperation = CompressPDF.Operation.createNew(); - const input = FileRef.createFromLocalFile( - "test/resources/compressInput.pdf", - CompressPDF.SupportedSourceFormat.pdf, - ); - - compressPdfOperation.setInput(input); - - compressPdfOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/compressOutput.pdf")) - .catch(err => {}); -} -function createPDF() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const createPDFOperation = CreatePDF.Operation.createNew(); - const input = FileRef.createFromLocalFile( - "test/resources/createPDFInput.docx", - CreatePDF.SupportedSourceFormat.docx, - ); - - createPDFOperation.setInput(input); - - createPDFOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/createPDF.pdf")) - .catch(err => { - if (err instanceof Error.ServiceApiError || err instanceof Error.ServiceUsageError) { - } else { - } - }); -} - -function deletePages() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const deletePagesOperation = DeletePages.Operation.createNew(); - const pageRanges = new PageRanges(); - - deletePagesOperation.setInput( - FileRef.createFromLocalFile("~/Documents/deletePagesOperationInput.pdf", DeletePages.SupportedSourceFormat.pdf), - ); - pageRanges.addSinglePage(1); - deletePagesOperation.setPageRanges(pageRanges); - - deletePagesOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/deletePagesOperationOutput.pdf")) - .catch(err => {}); -} - -function documentMerge() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const documentMergeOptions = DocumentMerge.options; - const jsonDataForMerge = JSON.parse("{\"customerName\": \"James\", \"customerVisits\": 100}"); - const options = new DocumentMergeOptions(jsonDataForMerge, documentMergeOptions.OutputFormat.PDF); - const documentMergeOperation = DocumentMerge.Operation.createNew(options); - const input = FileRef.createFromLocalFile( - "~/Documents/DocumentMergeOperationInput.docx", - DocumentMerge.SupportedSourceFormat.docx, - ); - - documentMergeOperation.setInput(input); - - documentMergeOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/DocumentMergeOperationOutput.pdf")) - .catch(err => {}); -} - -function exportPDF() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const exportPdfOperation = ExportPDF.Operation.createNew(ExportPDF.SupportedTargetFormats.DOCX); - const input = FileRef.createFromLocalFile("test/resources/PDF.pdf", ExportPDF.SupportedSourceFormat.pdf); - - exportPdfOperation.setInput(input); - - exportPdfOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/exportPdf.docx")) - .catch(err => {}); -} - -function exportPdfToImages() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const exportPDFToImages = ExportPDFToImages.Operation.createNew(ExportPDFToImages.SupportedTargetFormats.JPEG); - const input = FileRef.createFromLocalFile("test/resources/PDF.pdf", ExportPDFToImages.SupportedSourceFormat.pdf); - - exportPDFToImages.setInput(input); - - exportPDFToImages - .execute(executionContext) - .then(result => { - const saveFilesPromises = []; - for (let i = 0; i < result.length; i++) { - saveFilesPromises.push(result[i].saveAsFile(`output/exportPDFToJPEGOutput_${i}.jpeg`)); - } - return Promise.all(saveFilesPromises); - }) - .catch(err => {}); -} - -function extractPdf() { - try { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - - const clientConfig = ClientConfig.clientConfigBuilder().fromFile("pdfservices-api-client-config.json").build(); - - const clientContext = ExecutionContext.create(credentials, clientConfig); - - const options = new ExtractPDF.options.ExtractPdfOptions.Builder() - .addElementsToExtract(ExtractPDF.options.ExtractElementType.TEXT) - .addElementsToExtractRenditions(ExtractPDF.options.ExtractRenditionsElementType.TABLES) - .addCharInfo(true) - .addTableStructureFormat(ExtractPDF.options.TableStructureType.CSV) - .build(); - - const extractPDFOperation = ExtractPDF.Operation.createNew(); - const input = FileRef.createFromLocalFile( - "test/resources/extractPDFInput", - ExtractPDF.SupportedSourceFormat.pdf, - ); - - extractPDFOperation.setInput(input); - extractPDFOperation.setOptions(options); - - extractPDFOperation - .execute(clientContext) - .then(result => result.saveAsFile("output/extractPdf.zip")) - .catch(err => {}); - } catch (err) { - throw err; - } -} - -function insertPages() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const insertPagesOperation = InsertPages.Operation.createNew(); - - insertPagesOperation.setBaseInput( - FileRef.createFromLocalFile( - "~/Documents/insertPagesOperationBaseInput.pdf", - InsertPages.SupportedSourceFormat.pdf, - ), - ); - insertPagesOperation.addPagesToInsertAt( - 1, - FileRef.createFromLocalFile( - "~/Documents/insertPagesOperationFileToInsertInput.pdf", - InsertPages.SupportedSourceFormat.pdf, - ), - ); - - insertPagesOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/insertPagesOperationOutput.pdf")) - .catch(err => {}); -} - -function linearizePdf() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const linearizePdfOperation = LinearizePDF.Operation.createNew(); - const input = FileRef.createFromLocalFile( - "test/resources/linearizeInput.pdf", - LinearizePDF.SupportedSourceFormat.pdf, - ); - - linearizePdfOperation.setInput(input); - - linearizePdfOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/linearizeOutput.pdf")) - .catch(err => {}); -} -function ocr() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const ocrOperation = OCR.Operation.createNew(); - const input = FileRef.createFromLocalFile("test/resources/ocrInput.pdf", OCR.SupportedSourceFormat.pdf); - - ocrOperation.setInput(input); - - ocrOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/ocrOutput.pdf")) - .catch(err => {}); -} - -function pdfProperties() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const clientContext = ExecutionContext.create(credentials); - const pdfPropertiesOperation = PDFProperties.Operation.createNew(); - const input = FileRef.createFromLocalFile( - "test/resources/PDFPropertiesOperationInput.pdf", - PDFProperties.SupportedSourceFormat.pdf, - ); - - pdfPropertiesOperation.setInput(input); - - pdfPropertiesOperation - .execute(clientContext) - .then(result => {}) - .catch(err => {}); -} - -async function protectPDF() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const protectPDFOptions = ProtectPDF.options; - const permissions = protectPDFOptions.Permissions.createNew(); - - permissions.addPermission(protectPDFOptions.Permission.PRINT_LOW_QUALITY); - permissions.addPermission(protectPDFOptions.Permission.EDIT_DOCUMENT_ASSEMBLY); - permissions.addPermission(protectPDFOptions.Permission.COPY_CONTENT); - - const options = new protectPDFOptions.PasswordProtectOptions.Builder() - .setUserPassword("openpassword") - .setOwnerPassword("permissionspassword") - .setPermissions(permissions) - .setEncryptionAlgorithm(protectPDFOptions.EncryptionAlgorithm.AES_256) - .setContentEncryption(protectPDFOptions.ContentEncryption.ALL_CONTENT_EXCEPT_METADATA) - .build(); - const protectPDFOperation = ProtectPDF.Operation.createNew(options); - const input = FileRef.createFromLocalFile("~/Documents/protectPDFInput.pdf", ProtectPDF.SupportedSourceFormat.pdf); - - protectPDFOperation.setInput(input); - - protectPDFOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/protectPDFOutput.pdf")) - .catch(err => {}); -} - -function removeProtection() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const removeProtectionOperation = RemoveProtection.Operation.createNew(); - const input = FileRef.createFromLocalFile( - "~/Documents/removeProtectionInput.pdf", - RemoveProtection.SupportedSourceFormat.pdf, - ); - - removeProtectionOperation.setInput(input); - removeProtectionOperation.setPassword("password"); - - removeProtectionOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/removeProtectionOutput.pdf")) - .catch(err => {}); -} - -function reorderPage() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const reorderPagesOperation = ReorderPages.Operation.createNew(); - const pageRanges = new PageRanges(); - - reorderPagesOperation.setInput( - FileRef.createFromLocalFile( - "~/Documents/reorderPagesOperationInput.pdf", - ReorderPages.SupportedSourceFormat.pdf, - ), - ); - pageRanges.addSinglePage(3); - pageRanges.addPageRange(1, 2); - reorderPagesOperation.setPagesOrder(pageRanges); - - reorderPagesOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/reorderPagesOperationOutput.pdf")) - .catch(err => {}); -} - -function replacePages() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const replacePagesOperation = ReplacePages.Operation.createNew(); - - replacePagesOperation.setBaseInput( - FileRef.createFromLocalFile( - "~/Documents/replacePagesOperationBaseInput.pdf", - ReplacePages.SupportedSourceFormat.pdf, - ), - ); - replacePagesOperation.addPagesForReplace( - 1, - FileRef.createFromLocalFile( - "~/Documents/replacePagesOperationFileToBeReplacedWithInput.pdf", - ReplacePages.SupportedSourceFormat.pdf, - ), - ); - - replacePagesOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/replacePagesOperationOutput.pdf")) - .catch(err => {}); -} - -function rotatePages() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const rotatePagesOperation = RotatePages.Operation.createNew(); - - rotatePagesOperation.setInput( - FileRef.createFromLocalFile("~/Documents/rotatePagesOperationInput.pdf", RotatePages.SupportedSourceFormat.pdf), - ); - rotatePagesOperation.setAngleToRotatePagesBy(RotatePages.Angle._90); - - rotatePagesOperation - .execute(executionContext) - .then(result => result.saveAsFile("output/rotatePagesOperationOutput.pdf")) - .catch(err => {}); -} - -function spitPages() { - const credentials = Credentials.serviceAccountCredentialsBuilder() - .fromFile("pdfservices-api-credentials.json") - .build(); - const executionContext = ExecutionContext.create(credentials); - const splitPDFOperation = SplitPDF.Operation.createNew(); - - splitPDFOperation.setInput( - FileRef.createFromLocalFile("~/Documents/splitPDFInput.pdf", SplitPDF.SupportedSourceFormat.pdf), - ); - splitPDFOperation.setPageCount(2); - - splitPDFOperation - .execute(executionContext) - .then(result => { - const saveFilesPromises = []; - for (let i = 0; i < result.length; i++) { - saveFilesPromises.push(result[i].saveAsFile(`output/splitPDFOutput_${i}.pdf`)); - } - return Promise.all(saveFilesPromises); - }) - .catch(err => {}); -} diff --git a/types/adobe__pdfservices-node-sdk/auth/credentials.d.ts b/types/adobe__pdfservices-node-sdk/auth/credentials.d.ts deleted file mode 100644 index ace870a5727e0d..00000000000000 --- a/types/adobe__pdfservices-node-sdk/auth/credentials.d.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { ServiceAccountCredentialsBuilder } from "./service-account-credentials-builder"; -/** - * Marker base class for different types of credentials. Currently it supports only {@link ServiceAccountCredentials}. - * The factory methods within this class can be used to create instances of credentials classes. - */ - -/* tslint:disable-next-line:no-unnecessary-class */ -export class Credentials { - static serviceAccountCredentialsBuilder(): ServiceAccountCredentialsBuilder; -} diff --git a/types/adobe__pdfservices-node-sdk/auth/service-account-credentials-builder.d.ts b/types/adobe__pdfservices-node-sdk/auth/service-account-credentials-builder.d.ts deleted file mode 100644 index c6416c7a451c06..00000000000000 --- a/types/adobe__pdfservices-node-sdk/auth/service-account-credentials-builder.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ServiceAccountCredentials } from "./service-account-credentials"; -export class ServiceAccountCredentialsBuilder { - /** - * Set Client ID (API Key) - */ - withClientId(clientId: string): ServiceAccountCredentialsBuilder; - clientId: any; - /** - * Set Client Secret - */ - withClientSecret(clientSecret: string): ServiceAccountCredentialsBuilder; - clientSecret: any; - /** - * Set private key - */ - withPrivateKey(privateKey: string): ServiceAccountCredentialsBuilder; - privateKey: string; - /** - * Set Organization Id (format: org_ident@AdobeOrg) that has been configured for access to PDF Services API - */ - withOrganizationId(organizationId: string): ServiceAccountCredentialsBuilder; - organizationId: any; - /** - * Set Account Id (format: id@techacct.adobe.com) - */ - withAccountId(accountId: string): ServiceAccountCredentialsBuilder; - accountId: any; - /** - * Sets Service Account Credentials using the JSON credentials file path. All the keys in the JSON - * structure are optional. - *
- * JSON structure: - *
- * {
- * "client_credentials": {
- * "client_id": "CLIENT_ID",
- * "client_secret": "CLIENT_SECRET"
- * },
- * "service_account_credentials": {
- * "organization_id": "org_ident@AdobeOrg",
- * "account_id": "id@techacct.adobe.com",
- * "private_key_file": "private.key"
- * }
- * }
- *
- * private_key_file is the path of private key file. It will be looked up in the classpath and the
- * directory of JSON credentials file.
- */
- fromFile(credentialsFilePath: string): ServiceAccountCredentialsBuilder;
- imsBaseUri: any;
- claim: any;
- opsCreateUri: any;
- /**
- * Returns a new {@link ServiceAccountCredentials} instance built from the current state of this builder.
- */
- build(): ServiceAccountCredentials;
-}
diff --git a/types/adobe__pdfservices-node-sdk/auth/service-account-credentials.d.ts b/types/adobe__pdfservices-node-sdk/auth/service-account-credentials.d.ts
deleted file mode 100644
index efb30323b63913..00000000000000
--- a/types/adobe__pdfservices-node-sdk/auth/service-account-credentials.d.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-/**
- * Service Account credentials allow your application to call PDF Services API on behalf of the application itself,
- * or on behalf of an enterprise organization. For getting the credentials,
- * Click Here
- */
-export class ServiceAccountCredentials {
- constructor(client_id: any, client_secret: any, private_key: any, organization_id: any, account_id: any);
- clientId: any;
- clientSecret: any;
- privateKey: any;
- organizationId: any;
- accountId: any;
- /**
- * Client Id (API Key)
- */
- getClientId(): any;
- /**
- * Client Secret
- */
- getClientSecret(): any;
- /**
- * Content of the Private Key (PEM format)
- */
- getPrivateKey(): any;
- /**
- * Identifies the organization(format: org_ident@AdobeOrg) that has been configured for access to PDF Services API.
- */
- getOrganizationId(): any;
- /**
- * Account ID(format: id@techacct.adobe.com)
- */
- getAccountId(): any;
- validate(): void;
-}
diff --git a/types/adobe__pdfservices-node-sdk/client-config.d.ts b/types/adobe__pdfservices-node-sdk/client-config.d.ts
deleted file mode 100644
index 9e6103174cb851..00000000000000
--- a/types/adobe__pdfservices-node-sdk/client-config.d.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-/**
- * Encapsulates the API request configurations
- */
-/* tslint:disable-next-line:no-unnecessary-class */
-export class ClientConfig {
- static get Builder(): any;
- /**
- * Creates a new {@link ClientConfig} builder.
- */
- static clientConfigBuilder(): any;
-}
diff --git a/types/adobe__pdfservices-node-sdk/error/service-api-error.d.ts b/types/adobe__pdfservices-node-sdk/error/service-api-error.d.ts
deleted file mode 100644
index efdff0ad9599d2..00000000000000
--- a/types/adobe__pdfservices-node-sdk/error/service-api-error.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * ServiceApiError is thrown when an underlying service API call results in an error.
- */
-export class ServiceApiError extends Error {
- constructor(message: any, requestTrackingId: any, statusCode: any, errorCode: any);
- requestTrackingId: any;
- statusCode: any;
- errorCode: any;
- /**
- * Returns the HTTP Status code or {@link DEFAULT_STATUS_CODE} if the status code doesn't adequately represent the error.
- */
- getStatusCode(): number;
- /**
- * Returns the Error code or {@link DEFAULT_ERROR_CODE} if the error code doesn't adequately represent the error.
- */
- getErrorCode(): string;
- /**
- * Returns the detailed message of this error.
- */
- getMessage(): string;
- /**
- * Returns the Request ID (the value of the X-Request-ID header).
- */
- getRequestTrackingId(): string;
-}
diff --git a/types/adobe__pdfservices-node-sdk/error/service-usage-error.d.ts b/types/adobe__pdfservices-node-sdk/error/service-usage-error.d.ts
deleted file mode 100644
index 8a5dcd81134a30..00000000000000
--- a/types/adobe__pdfservices-node-sdk/error/service-usage-error.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * ServiceUsageError is thrown when either service usage limit has been reached or credentials quota has been exhausted.
- */
-export class ServiceUsageError extends Error {
- constructor(message: any, requestTrackingId: any, statusCode: any, errorCode: any);
- requestTrackingId: any;
- statusCode: any;
- errorCode: any;
- /**
- * Returns the HTTP Status code or {@link DEFAULT_STATUS_CODE} if the status code doesn't adequately represent the error.
- */
- getStatusCode(): number;
- /**
- * Returns the Error code or {@link DEFAULT_ERROR_CODE} if the error code doesn't adequately represent the error.
- */
- getErrorCode(): string;
- /**
- * Returns the detailed message of this error.
- */
- getMessage(): string;
- /**
- * Returns the Request ID (the value of the X-Request-ID header).
- */
- getRequestTrackingId(): string;
-}
diff --git a/types/adobe__pdfservices-node-sdk/execution-context.d.ts b/types/adobe__pdfservices-node-sdk/execution-context.d.ts
deleted file mode 100644
index 747bb8079f9eb7..00000000000000
--- a/types/adobe__pdfservices-node-sdk/execution-context.d.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import { Credentials } from "./auth/credentials";
-import { ClientConfig } from "./client-config";
-
-/**
- * Represents the execution context of an Operation. An execution context typically consists of the desired
- * authentication credentials and client configurations such as timeouts.
- * - * For each set of credentials, a ExecutionContext instance can be reused across operations. - * - * Sample Usage: - *
- *
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build();
- * const executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * createPDFOperation = PDFServicesSdk.CreatePDF.Operation.createNew(),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('files/resources/createPDFInput.docx');
- *
- * createPDFOperation.setInput(input);
- *
- * createPDFOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/createPDFFromZip.pdf'))
- * .catch(err => console.log(err));
- *
- *
- */
-/* tslint:disable-next-line:no-unnecessary-class */
-export class ExecutionContext {
- /**
- * Creates a context instance using the provided {@link Credentials} and {@link ClientConfig}.
- */
- static create(credentials: Credentials, clientConfig?: ClientConfig): ExecutionContext;
-}
diff --git a/types/adobe__pdfservices-node-sdk/index.d.ts b/types/adobe__pdfservices-node-sdk/index.d.ts
deleted file mode 100644
index efa1147071aafa..00000000000000
--- a/types/adobe__pdfservices-node-sdk/index.d.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-import * as PDFServicesSDK from "./pdfservices-sdk";
-export = PDFServicesSDK;
diff --git a/types/adobe__pdfservices-node-sdk/io/file-ref.d.ts b/types/adobe__pdfservices-node-sdk/io/file-ref.d.ts
deleted file mode 100644
index 130927ded27cd7..00000000000000
--- a/types/adobe__pdfservices-node-sdk/io/file-ref.d.ts
+++ /dev/null
@@ -1,42 +0,0 @@
-/**
- * This class represents a local file. It is typically used by an SDK Operation
- * which accepts or returns files.
- * - * When a FileRef instance is created by this SDK while referring to a temporary file location, calling any of the methods - * to save the fileRef (For example, {@link FileRef#writeToStream}, {@link FileRef#saveAsFile} etc.) will delete the - * temporary file. - */ -export class FileRef { - /** - * Creates a FileRef instance from a local file path. If no media type is provided, it will be inferred from the file - * extension. - *
- */ - static createFromLocalFile(filePath: string, mediaType?: string): FileRef; - /** - * Creates a FileRef instance from a readable stream using the specified media type. - *
- * The stream is not read by this method but by consumers of file content i.e. the execute method of
- * an operation such as {@link CreatePDFOperation#execute} .
- */
- static createFromStream(inputStream: any, mediaType: string): FileRef;
- /**
- * Creates a FileRef instance from the input URL and specified media type.
- */
- static createFromURL(url: string): FileRef;
- constructor(input: any);
- /**
- * Saves this file to the location specified by destinationFilePath.
- * If this FileRef instance refers to a temporary local file created by the SDK, that temporary file is deleted.
- *
- * The directories mentioned in the specified argument are created if they do not exist.
- */
- saveAsFile(destinationFilePath: string): Promise
- */
- addInput(sourceFileRef: FileRef, pageRanges?: PageRanges): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * The supported source media types are listed here. The object can be used to map file
- * extensions to their corresponding media types when creating FileRef instances for the source files.
- *
- * Special handling for HTML inputs:
- *
- * An HTML input can be provided either as a local zip archive or as a static HTML file with inline CSS. Alternatively, an HTML can also be specified via URL using {@link FileRef.createFromURL}.
- *
- * For the image target formats (JPEG and PNG), the resulting file is a ZIP archive containing one image per page of
- * the source PDF file. Each image file name ends with "_<unpadded_page_index>". For example, a PDF file with 15
- * pages will generate 15 image files. The first file's name ends with "_1" and the last file's name ends with "_15".
- *
- * Sample Usage:
- *
- * The result is a list of images. For example, a PDF file with 15
- * pages will generate 15 image files. The first file's name ends with "_0" and the last file's name ends with "_14".
- *
- * Sample Usage:
- *
- * For more complex use cases, refer the {@link CombineFilesOperation}
- *
- * Sample Usage:
- *
- * This method can be invoked multiple times with the same or different input PDF files.
- *
- * If
- * For more complex use cases, refer the {@link CombineFilesOperation}
- *
- * Sample Usage:
- *
- * This method can be invoked multiple times with the same or different input PDF files.
- *
- * If
- * Multiple invocation of this method on the same set of pages can result in rotating pages multiple times.
- * writableStream.
- * If this FileRef instance refers to a temporary local file created by the SDK, that temporary file is deleted.
- *
- * Note: This method does not close the writableStream.
- */
- writeToStream(writableStream: any): void;
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/combine-file-operation.d.ts b/types/adobe__pdfservices-node-sdk/operation/combine-file-operation.d.ts
deleted file mode 100644
index 80dd2258216001..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/combine-file-operation.d.ts
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Combines multiple PDF files into a single PDF file. Allows specifying which pages of the source files to combine.
- *
- * Sample Usage:
- *
- *
- */
-export class CombineFilesOperation {
- /**
- * Constructs a {@link CombineFilesOperation} instance.
- */
- static createNew(): CombineFilesOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- filesToCombine: any[];
- /**
- * Specifies particular pages of a PDF file (media type "application/pdf") to be combined with other files. The pages
- * will be added after the pages of any previously specified files. If the
- *
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * CombineFiles = PDFServicesSdk.CombineFiles,
- * combineFilesOperation = CombineFiles.Operation.createNew(),
- * input1 = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/combinePagesInput1.pdf', CombineFiles.SupportedSourceFormat.pdf),
- * input2 = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/combinePagesInput1.pdf', CombineFiles.SupportedSourceFormat.pdf);
- *
- * combineFilesOperation.addInput(input1);
- * combineFilesOperation.addInput(input2);
- *
- * combineFilesOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/CombinedPDF.pdf'))
- * .catch(err => console.log(err));
- *
- * pageRanges argument is not
- * provided, all pages of the PDF will be added in the combined PDF.
- *
- *
- */
-export class CompressPDFOperation {
- /**
- * Constructs a {@link CompressPDFOperation} instance.
- */
- static createNew(): CompressPDFOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- sourceFileRef: any;
- options: any;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets the options for this operation. See {@link CompressPDFOptions} for how to specify the
- * options for the different compression levels.
- */
- setOptions(options?: any): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * CompressPDF = PDFServicesSdk.CompressPDF,
- * compressPdfOperation = CompressPDF.Operation.createNew(),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/compressInput.pdf', CompressPDF.SupportedSourceFormat.pdf);
- *
- * compressPdfOperation.setInput(input);
- *
- * compressPdfOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/compressOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- *
- *
- *
- * While creating the corresponding FileRef instance, the media type must be:
- *
- *
- *
- * In case the input is a local zip archive, it must have the following structure:
- *
- *
- * Sample layout:
- *
- *   html_files.zip
- *   |__index.html
- *   |__referenced_file_1.css
- *   |__referenced_file_2.jpeg
- *   |__subfolder_1
- *   |_____referenced_file_3.jpeg
- *
- *
- * Sample Usage:
- *
- *
- */
-export class CreatePDFOperation {
- /**
- * Constructs a CreatePDFOperation instance.
- */
- static createNew(): CreatePDFOperation;
- static get SupportedMediaTypes(): {
- /**
- * Represents "image/bmp" media type
- */
- bmp: string;
- /**
- * Represents "application/msword" media type
- */
- doc: string;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type
- */
- docx: string;
- /**
- * Represents "image/gif" media type
- */
- gif: string;
- /**
- * Represents "text/html" media type
- */
- html: string;
- /**
- * Represents "image/jpeg" media type
- */
- jpeg: string;
- /**
- * Represents "image/jpeg" media type
- */
- jpg: string;
- /**
- * Represents "image/png" media type
- */
- png: string;
- /**
- * Represents "application/vnd.ms-powerpoint" media type
- */
- ppt: string;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.presentationml.presentation" media type
- */
- pptx: string;
- /**
- * Represents "text/rtf" media type
- */
- rtf: string;
- /**
- * Represents "image/tiff" media type
- */
- tif: string;
- /**
- * Represents "image/tiff" media type
- */
- tiff: string;
- /**
- * Represents "text/plain" media type
- */
- txt: string;
- /**
- * Represents "application/vnd.ms-excel" media type
- */
- xls: string;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" media type
- */
- xlsx: string;
- /**
- * Represents "application/zip" media type
- */
- zip: string;
- };
- static get SupportedSourceFormat(): {
- /**
- * Represents "image/bmp" media type
- */
- bmp: string;
- /**
- * Represents "application/msword" media type
- */
- doc: string;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type
- */
- docx: string;
- /**
- * Represents "image/gif" media type
- */
- gif: string;
- /**
- * Represents "text/html" media type
- */
- html: string;
- /**
- * Represents "image/jpeg" media type
- */
- jpeg: string;
- /**
- * Represents "image/jpeg" media type
- */
- jpg: string;
- /**
- * Represents "image/png" media type
- */
- png: string;
- /**
- * Represents "application/vnd.ms-powerpoint" media type
- */
- ppt: string;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.presentationml.presentation" media type
- */
- pptx: string;
- /**
- * Represents "text/rtf" media type
- */
- rtf: string;
- /**
- * Represents "image/tiff" media type
- */
- tif: string;
- /**
- * Represents "image/tiff" media type
- */
- tiff: string;
- /**
- * Represents "text/plain" media type
- */
- txt: string;
- /**
- * Represents "application/vnd.ms-excel" media type
- */
- xls: string;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" media type
- */
- xlsx: string;
- /**
- * Represents "application/zip" media type
- */
- zip: string;
- };
- sourceFileRef: any;
- options: any;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets the conversion parameters for this operation.
- * on the source format of the file which is being converted to PDF. For example, for HTML to PDF conversions,
- * the type will be {@link CreatePDFFromHtmlOptions}. For other supported options, refer the
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * CreatePDF = PDFServicesSdk.CreatePDF,
- * createPDFOperation = CreatePDF.Operation.createNew(),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/createPDFInput.docx', CreatePDF.SupportedSourceFormat.docx);
- *
- * createPDFOperation.setInput(input);
- *
- * createPDFOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/createPDF.pdf'))
- * .catch(err => console.log(err));
- *
- * options key.
- * in {@link module:PDFServicesSDK#CreatePDF}.
- */
- setOptions(
- options:
- | CreatePDFFromHtmlOptions
- | CreatePDFFromExcelOptions
- | CreatePDFFromPPTOptions
- | CreatePDFFromWordOptions,
- ): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- *
- */
-export class PageActions {
- pageActions: any[];
- withRotateAction(pageRanges: any, angle: any): PageActions;
- withDeleteAction(pageRanges: any): PageActions;
-}
-
-export class DeletePagesOperation {
- /**
- * Constructs a {@link DeletePagesOperation} instance.
- */
- static createNew(): DeletePagesOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- sourceFileRef: any;
- options: PageActions;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Specifies the pages to delete from the input PDF file.
- */
- setPageRanges(pageRanges: PageRanges): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * DeletePages = PDFServicesSdk.DeletePages,
- * deletePagesOperation = DeletePages.Operation.createNew(),
- * pageRanges = new PDFServicesSdk.PageRanges();
- *
- * deletePagesOperation.setInput( PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/deletePagesOperationInput.pdf',
- * DeletePages.SupportedSourceFormat.pdf));
- * pageRanges.addSinglePage(1);
- * deletePagesOperation.setPageRanges(pageRanges);
- *
- * deletePagesOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/deletePagesOperationOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- *
- */
-export class DocumentMergeOperation {
- /**
- * Constructs a {@link DocumentMergeOperation} instance.
- */
- static createNew(options: DocumentMergeOptions): DocumentMergeOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type
- */
- docx: string;
- };
- constructor(options: DocumentMergeOptions);
- documentTemplate: any;
- options: any;
- /**
- * Sets the input DOCX based document template.
- */
- setInput(documentTemplate: FileRef): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * DocumentMerge = PDFServicesSdk.DocumentMerge,
- * documentMergeOptions = DocumentMerge.options,
- * jsonDataForMerge = JSON.parse("{\"customerName\": \"James\", \"customerVisits\": 100}");
- * options = new documentMergeOptions.DocumentMergeOptions(jsonDataForMerge, documentMergeOptions.OutputFormat.PDF),
- * documentMergeOperation = DocumentMerge.Operation.createNew(options),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/DocumentMergeOperationInput.docx', DocumentMerge.SupportedSourceFormat.docx);
- *
- * documentMergeOperation.setInput(input);
- *
- * documentMergeOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/DocumentMergeOperationOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- *
- */
-export class ExportPDFOperation {
- static get SupportedExportFormats(): {
- /**
- * Represents "application/msword" media type.
- */
- DOC: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type
- */
- DOCX: any;
- /**
- * Represents "image/jpeg" media type.
- */
- JPEG: any;
- /**
- * Represents "image/png" media type.
- */
- PNG: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.presentationml.presentation" media type
- */
- PPTX: any;
- /**
- * Represents "text/rtf" media type.
- */
- RTF: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" media type
- */
- XLSX: any;
- };
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- /**
- * Constructs an {@link ExportPDFOperation} instance.
- */
- static createNew(targetFormat: {
- /**
- * Represents "application/msword" media type.
- */
- DOC: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type
- */
- DOCX: any;
- /**
- * Represents "image/jpeg" media type.
- */
- JPEG: any;
- /**
- * Represents "image/png" media type.
- */
- PNG: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.presentationml.presentation" media type
- */
- PPTX: any;
- /**
- * Represents "text/rtf" media type.
- */
- RTF: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" media type
- */
- XLSX: any;
- }): ExportPDFOperation;
- static getTargetFormats(): {
- /**
- * Represents "application/msword" media type.
- */
- DOC: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type
- */
- DOCX: any;
- /**
- * Represents "image/jpeg" media type.
- */
- JPEG: any;
- /**
- * Represents "image/png" media type.
- */
- PNG: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.presentationml.presentation" media type
- */
- PPTX: any;
- /**
- * Represents "text/rtf" media type.
- */
- RTF: any;
- /**
- * Represents "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" media type
- */
- XLSX: any;
- };
- constructor(targetFormat: any);
- targetFormat: any;
- sourceFileRef: any;
- /**
- * Sets an input PDF file (media type "application/pdf").
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * ExportPDF = PDFServicesSdk.ExportPDF,
- * exportPdfOperation = ExportPDF.Operation.createNew(ExportPDF.SupportedTargetFormats.DOCX),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/PDF.pdf', ExportPDF.SupportedSourceFormat.pdf);
- *
- * exportPdfOperation.setInput(input);
- *
- * exportPdfOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/exportPdf.docx'))
- * .catch(err => console.log(err));
- *
- *
- *
- *
- */
-export class ExportPDFToImagesOperation {
- static get SupportedExportFormats(): {
- /**
- * Represents "image/jpeg" media type.
- */
- JPEG: any;
- /**
- * Represents "image/png" media type.
- */
- PNG: any;
- };
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- /**
- * Constructs an {@link ExportPDFToImagesOperation} instance.
- */
- static createNew(targetFormat: {
- /**
- * Represents "image/jpeg" media type.
- */
- JPEG: any;
- /**
- * Represents "image/png" media type.
- */
- PNG: any;
- }): ExportPDFToImagesOperation;
- static getTargetFormats(): {
- /**
- * Represents "image/jpeg" media type.
- */
- JPEG: any;
- /**
- * Represents "image/png" media type.
- */
- PNG: any;
- };
- constructor(targetFormat: any);
- targetFormat: any;
- sourceFileRef: any;
- /**
- * Sets an input PDF file (media type "application/pdf").
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resultant files may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * ExportPDFToImages = PDFServicesSdk.ExportPDFToImages,
- * exportPDFToImages = ExportPDFToImages.Operation.createNew(ExportPDFToImages.SupportedTargetFormats.JPEG),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/PDF.pdf', ExportPDFToImages.SupportedSourceFormat.pdf);
- *
- * exportPDFToImages.setInput(input);
- *
- * exportPDFToImages.execute(executionContext)
- * .then(result => {
- * let saveFilesPromises = [];
- * for(let i = 0; i < result.length; i++){
- * saveFilesPromises.push(result[i].saveAsFile(`output/exportPDFToJPEGOutput_{i}.jpeg`));
- * }
- * return Promise.all(saveFilesPromises);
- * })
- * .catch(err => console.log(err));
- *
- *
- *
- */
-export class ExtractPdfOperation {
- /**
- * Constructs a {@link ExtractPdfOperation} instance.
- */
- static createNew(): ExtractPdfOperation;
- static get SupportedSourceFormat(): PdfFormat;
- sourceFileRef: any;
- isInvoked: boolean;
- options: ExtractPdfOptions;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets the options for Extract PDF operation
- */
- setOptions(options: ExtractPdfOptions): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * try {
- * const credentials = Credentials.serviceAccountCredentialsBuilder()
- * .fromFile('pdfservices-api-credentials.json')
- * .build();
- * const clientConfig = ClientConfig.clientConfigBuilder().fromFile('pdfservices-api-client-config.json').build();
- * const clientContext = ExecutionContext.create(credentials, clientConfig);
- * const options = new ExtractPDF.options.ExtractPdfOptions.Builder()
- * .addElementsToExtract(ExtractPDF.options.ExtractElementType.TEXT)
- * .addElementsToExtractRenditions(ExtractPDF.options.ExtractRenditionsElementType.TABLES)
- * .addCharInfo(true)
- * .addTableStructureFormat(ExtractPDF.options.TableStructureType.CSV)
- * .build();
- * const extractPDFOperation = ExtractPDF.Operation.createNew();
- * const input = FileRef.createFromLocalFile(
- * 'test/resources/extractPDFInput',
- * ExtractPDF.SupportedSourceFormat.pdf,
- * );
- * extractPDFOperation.setInput(input);
- * extractPDFOperation.setOptions(options);
- * extractPDFOperation
- * .execute(clientContext)
- * .then(result => result.saveAsFile('output/extractPdf.zip'))
- * .catch(err => {});
- * } catch (err) {
- * throw err;
- * }
- *
- *
- *
- */
-export class InsertPagesOperation {
- /**
- * Constructs a {@link InsertPagesOperation} instance.
- */
- static createNew(): InsertPagesOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- filesToInsert: {};
- baseSourceFileRef: any;
- /**
- * Sets a base input file.
- */
- setBaseInput(baseSourceFileRef: FileRef): void;
- /**
- * Adds the pages of the input PDF file to be inserted at the specified page of the base PDF file.
- *
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * InsertPages = PDFServicesSdk.InsertPages,
- * insertPagesOperation = InsertPages.Operation.createNew();
- *
- * insertPagesOperation.setBaseInput(PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/insertPagesOperationBaseInput.pdf',
- * InsertPages.SupportedSourceFormat.pdf));
- * insertPagesOperation.addPagesToInsertAt(1, PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/insertPagesOperationFileToInsertInput.pdf',
- * InsertPages.SupportedSourceFormat.pdf));
- *
- * insertPagesOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/insertPagesOperationOutput.pdf'))
- * .catch(err => console.log(err));
- *
- * pageRanges is not provided, all the pages of the input PDF file will be inserted at the specified
- * page of the base PDF file.
- */
- addPagesToInsertAt(basePage: number, inputFile: FileRef, pageRanges?: PageRanges): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- *
- */
-export class LinearizePDFOperation {
- /**
- * Constructs a {@link LinearizePDFOperation} instance.
- */
- static createNew(): LinearizePDFOperation;
- static get SupportedSourceFormat(): PdfFormat;
- sourceFileRef: any;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * LinearizePDF = PDFServicesSdk.LinearizePDF,
- * linearizePdfOperation = LinearizePDF.Operation.createNew(),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/linearizeInput.pdf', LinearizePDF.SupportedSourceFormat.pdf);
- *
- * linearizePdfOperation.setInput(input);
- *
- * linearizePdfOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/linearizeOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- *
- */
-export class OCROperation {
- /**
- * Constructs a {@link OCROperation} instance.
- */
- static createNew(): OCROperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- sourceFileRef: any;
- options: any;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets the options for this operation. See {@link OCROptions} for how to specify the options for the different locales and
- * ocr types.
- */
- setOptions(options?: any): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * OCR = PDFServicesSdk.OCR,
- * ocrOperation = OCR.Operation.createNew(),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/ocrInput.pdf', OCR.SupportedSourceFormat.pdf);
- *
- * ocrOperation.setInput(input);
- *
- * ocrOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/ocrOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- * Page size and orientation can also be set using paged media CSS which overrides the SDK Page Layout settings.
- */
- setPageSize(pageWidth: number, pageHeight: number): void;
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/documentmerge/document-merge-options.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/documentmerge/document-merge-options.d.ts
deleted file mode 100644
index 729e850d7e4cc3..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/documentmerge/document-merge-options.d.ts
+++ /dev/null
@@ -1,24 +0,0 @@
-/**
- * Parameters for specifying the input JSON data and the desired output format for {@link DocumentMergeOperation}.
- */
-export class DocumentMergeOptions {
- static get OutputFormat(): OutputFormat;
- /**
- * Creates a new {@link DocumentMergeOptions} instance
- */
- constructor(jsonDataForMerge: any, outputFormat: string, fragments?: any);
- outputFormat: string;
- jsonDataForMerge: any;
- fragments: any;
- validate(): any;
-}
-export interface OutputFormat {
- /**
- * Represents "application/vnd.openxmlformats-officedocument.wordprocessingml.document" media type
- */
- DOCX: "docx";
- /**
- * Represents "application/pdf" media type
- */
- PDF: "pdf";
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/documentmerge/fragments.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/documentmerge/fragments.d.ts
deleted file mode 100644
index 317517140f8130..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/documentmerge/fragments.d.ts
+++ /dev/null
@@ -1,19 +0,0 @@
-/**
- * Class for providing support for Fragments. To know more about fragments use-case in document generation and document templates,
- * please see the documentation
- */
-export class Fragments {
- fragmentsList: any[];
- /**
- * To add JsonObject into the fragmentsList.
- */
- addFragment(fragment: any): void;
- /**
- * To add List of JsonObject into the fragmentsList.
- */
- addFragments(fragments: any[]): void;
- /**
- * Gets the fragmentsList.
- */
- getFragmentsList(): any[];
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/extractpdf/extract-pdf-options.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/extractpdf/extract-pdf-options.d.ts
deleted file mode 100644
index 9bbaf452131feb..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/extractpdf/extract-pdf-options.d.ts
+++ /dev/null
@@ -1,84 +0,0 @@
-/**
- * Parameters for extract PDF file using {@link ExtractPdfOperation}.
- */
-export class ExtractPdfOptions {
- static get ExtractElementType(): ExtractElementType;
- static get TableStructureType(): TableStructureType;
- static get ExtractRenditionsElementType(): ExtractRenditionsElementType;
- /**
- * Returns a builder for {@link ExtractPdfOptions}.
- */
- static get Builder(): typeof ExtractPDFOptionsBuilder;
- constructor(builder: ExtractPdfOptions);
- renditionsToExtract: ExtractRenditionsElementType[];
- elementsToExtract: ExtractElementType[];
- getCharBounds: boolean;
- tableOutputFormat: TableStructureType;
- includeStyling: boolean;
- validate(): boolean;
-}
-export interface ExtractElementType {
- /**
- * Represents Text elements to extract in the JSON
- */
- TEXT: "text";
- /**
- * Represents Table elements to extract in the JSON.
- */
- TABLES: "tables";
-}
-
-/**
- * Supported Output formats for exporting Tables in {@link ExtractPdfOperation}
- */
-export interface TableStructureType {
- /**
- * Represents CSV format for exporting extracted Table Data
- */
- CSV: "csv";
- /**
- * Represents XLSX format for exporting extracted Table Data
- */
- XLSX: "xlsx";
-}
-export interface ExtractRenditionsElementType {
- /**
- * Represents png renditions of Tables to generate from the PDF
- */
- TABLES: "tables";
- /**
- * Represents png renditions of Figures to generate from the PDF
- */
- FIGURES: "figures";
-}
-export class ExtractPDFOptionsBuilder {
- /**
- * Sets the elements to extract - like text and/or tables.
- */
- addElementsToExtract(elements: ExtractElementType[]): ExtractPDFOptionsBuilder;
-
- /**
- * Sets the renditions to extract - like tables and/or figures.
- */
- addElementsToExtractRenditions(elements: ExtractElementType[]): ExtractPDFOptionsBuilder;
-
- /**
- * Boolean specifying whether to add character level bounding boxes to output json
- */
- addCharInfo(element: boolean): ExtractPDFOptionsBuilder;
-
- /**
- * Adds the table structure format (currently csv only) for extracting structured information.
- */
- addTableStructureFormat(element: TableStructureType): ExtractPDFOptionsBuilder;
-
- /**
- * Boolean specifying whether to get styling info of text
- */
- getStylingInfo(element: boolean): ExtractPDFOptionsBuilder;
-
- /**
- * Returns a new {@link ExtractPdfOptions} instance built from the current state of this builder.
- */
- build(): ExtractPdfOptions;
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/ocr/ocr-options.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/ocr/ocr-options.d.ts
deleted file mode 100644
index 32113f28d53fb0..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/ocr/ocr-options.d.ts
+++ /dev/null
@@ -1,179 +0,0 @@
-/**
- * Parameters for converting PDF to a searchable PDF using {@link OCROperation}.
- */
-export class OCROptions {
- static get OCRSupportedType(): {
- /**
- * Ensures that text is searchable and selectable. This option keeps the original image, deskews it as needed,
- * and places an invisible text layer over it.
- */
- SEARCHABLE_IMAGE: string;
- /**
- * Ensures that text is searchable and selectable. This option keeps the original image and places an invisible
- * text layer over it. Recommended for cases requiring maximum fidelity to the original image.
- */
- SEARCHABLE_IMAGE_EXACT: string;
- };
- static get OCRSupportedLocale(): {
- /**
- * Represents "Danish (Denmark)" locale
- */
- DA_DK: string;
- /**
- * Represents "Lithuanian (Lithuania)" locale
- */
- LT_LT: string;
- /**
- * Represents "Slovenian (Slovenia)" locale
- */
- SL_SI: string;
- /**
- * Represents "Greek (Greece)" locale
- */
- EL_GR: string;
- /**
- * Represents "Russian (Russia)" locale
- */
- RU_RU: string;
- /**
- * Represents "English (United States)" locale
- */
- EN_US: string;
- /**
- * Represents "Chinese (Hong Kong)" locale
- */
- ZH_HK: string;
- /**
- * Represents "Hungarian (Hungary)" locale
- */
- HU_HU: string;
- /**
- * Represents "Estonian (Estonia)" locale
- */
- ET_EE: string;
- /**
- * Represents "Portuguese (Brazil)" locale
- */
- PT_BR: string;
- /**
- * Represents "Ukrainian (Ukraine)" locale
- */
- UK_UA: string;
- /**
- * Represents "Norwegian (Norway)" locale
- */
- NB_NO: string;
- /**
- * Represents "Polish (Poland)" locale
- */
- PL_PL: string;
- /**
- * Represents "Latvian (Latvia)" locale
- */
- LV_LV: string;
- /**
- * Represents "Finnish (Finland)" locale
- */
- FI_FI: string;
- /**
- * Represents "Japanese (Japan)" locale
- */
- JA_JP: string;
- /**
- * Represents "Spanish (Spain)" locale
- */
- ES_ES: string;
- /**
- * Represents "Bulgarian (Bulgaria)" locale
- */
- BG_BG: string;
- /**
- * Represents "English (United Kingdom)" locale
- */
- EN_GB: string;
- /**
- * Represents "Czech (Czech Republic)" locale
- */
- CS_CZ: string;
- /**
- * Represents "Maltese (Malta)" locale
- */
- MT_MT: string;
- /**
- * Represents "German (Germany)" locale
- */
- DE_DE: string;
- /**
- * Represents "Croatian (Croatia)" locale
- */
- HR_HR: string;
- /**
- * Represents "Slovak (Slovakia)" locale
- */
- SK_SK: string;
- /**
- * Represents "Serbian (Serbia)" locale
- */
- SR_SR: string;
- /**
- * Represents "Catalan (Canada)" locale
- */
- CA_CA: string;
- /**
- * Represents "Macedonian (Macedonia)" locale
- */
- MK_MK: string;
- /**
- * Represents "Korean (Korea)" locale
- */
- KO_KR: string;
- /**
- * Represents "German (Switzerland)" locale
- */
- DE_CH: string;
- /**
- * Represents "Dutch (Netherlands)" locale
- */
- NL_NL: string;
- /**
- * Represents "Chinese (China)" locale
- */
- ZH_CN: string;
- /**
- * Represents "Swedish (Sweden)" locale
- */
- SV_SE: string;
- /**
- * Represents "Italian (Italy)" locale
- */
- IT_IT: string;
- /**
- * Represents "Norwegian (Norway)" locale
- */
- NO_NO: string;
- /**
- * Represents "Turkish (Turkey)" locale
- */
- TR_TR: string;
- /**
- * Represents "French (France)" locale
- */
- FR_FR: string;
- /**
- * Represents "Romanian (Romania)" locale
- */
- RO_RO: string;
- /**
- * Represents "Hebrew (Israel)" locale
- */
- IW_IL: string;
- };
- /**
- * Returns a builder for {@link OCROptions}.
- */
- static get Builder(): any;
- constructor(builder: any);
- ocrType: any;
- ocrLang: any;
- validate(): any;
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/page-ranges.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/page-ranges.d.ts
deleted file mode 100644
index c468664332f7ee..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/page-ranges.d.ts
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- * Page ranges of a file, inclusive of start and end page index, where page index starts from 1.
- */
-export class PageRanges {
- _ranges: any[];
- /**
- * Adds a single page. Page index starts from 1.
- */
- addSinglePage(page: number): void;
- /**
- * Adds a page range. Page indexes start from 1.
- */
- addPageRange(start: number, end: number): void;
- /**
- * Adds a page range from the specified start page index to the last page. Page index starts from 1.
- */
- addAllFrom(start: number): void;
- /**
- * Adds a page range representing all pages.
- */
- addAll(): void;
- toString(): string;
- getRanges(): any[];
- validate(): void;
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/pdfproperties/pdf-properties-options.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/pdfproperties/pdf-properties-options.d.ts
deleted file mode 100644
index f6bd3a3acd3b03..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/pdfproperties/pdf-properties-options.d.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-/**
- * Parameters for getting properties of a PDF using {@link PDFPropertiesOperation}.
- */
-export class PDFPropertiesOptions {
- /**
- * Returns a builder for {@link PDFPropertiesOptions}.
- */
- static get Builder(): any;
- constructor(builder: any);
- pageLevel: any;
- validate(): any;
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/protectpdf/password-protect-options.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/protectpdf/password-protect-options.d.ts
deleted file mode 100644
index 7712e49b4cf93e..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/protectpdf/password-protect-options.d.ts
+++ /dev/null
@@ -1,86 +0,0 @@
-import { Permissions } from "./permissions";
-
-/**
- * Parameters for securing PDF file with a password using {@link ProtectPDFOperation}.
- */
-export interface EncryptionAlgorithm {
- /**
- * Represents AES-128 encryption algorithm.
- */
- AES_128: "AES_128";
- /**
- * Represents AES-256 encryption algorithm.
- */
- AES_256: "AES_256";
-}
-export interface ContentEncryption {
- /**
- * Encrypts all the content of the PDF file.
- */
- ALL_CONTENT: "ALL_CONTENT";
-
- /**
- * Encrypts all the content except the metadata of the PDF file.
- */
- ALL_CONTENT_EXCEPT_METADATA: "ALL_CONTENT_EXCEPT_METADATA";
-}
-export interface Permission {
- /**
- * Enables low quality printing of the PDF document.
- */
- PRINT_LOW_QUALITY: "PRINT_LOW_QUALITY";
-
- /**
- * Enables high quality printing of the PDF document.
- */
- PRINT_HIGH_QUALITY: "PRINT_HIGH_QUALITY";
-
- /**
- * Enables all the editing permissions in the PDF document except commenting and page extraction.
- */
- EDIT_CONTENT: "EDIT_CONTENT";
-
- /**
- * Enables insertion, deletion and rotation of pages in a PDF document.
- */
- EDIT_DOCUMENT_ASSEMBLY: "EDIT_DOCUMENT_ASSEMBLY";
-
- /**
- * Enables additions of comments, digital signatures and filling in of forms in a PDF document.
- */
- EDIT_ANNOTATIONS: "EDIT_ANNOTATIONS";
-
- /**
- * Enables filling in of forms, digital signature and creation of template pages in a PDF document.
- */
- EDIT_FILL_AND_SIGN_FORM_FIELDS: "EDIT_FILL_AND_SIGN_FORM_FIELDS";
-
- /**
- * Enables copying of content from the PDF document.
- */
- COPY_CONTENT: "COPY_CONTENT";
-}
-export class PasswordProtectOptions {
- static get EncryptionAlgorithm(): EncryptionAlgorithm;
- static get ContentEncryption(): ContentEncryption;
- static get Permission(): Permission;
- /**
- * Returns a builder for {@link PasswordProtectOptions}.
- */
- static get Builder(): typeof PasswordProtectOptionsBuilder;
- constructor(builder: PasswordProtectOptions);
- userPassword: string;
- ownerPassword: string;
- encryptionAlgorithm: EncryptionAlgorithm;
- contentEncryption: ContentEncryption;
- permissions: Permission;
- validate(): boolean;
-}
-export class PasswordProtectOptionsBuilder {
- setUserPassword(userPassword: string): PasswordProtectOptionsBuilder;
- setOwnerPassword(ownerPassword: string): PasswordProtectOptionsBuilder;
- setEncryptionAlgorithm(encryptionAlgorithm: keyof EncryptionAlgorithm): PasswordProtectOptionsBuilder;
- setContentEncryption(contentEncryption: keyof ContentEncryption): PasswordProtectOptionsBuilder;
- setPermissions(permissions: Permissions): PasswordProtectOptionsBuilder;
- build(): PasswordProtectOptions;
-}
diff --git a/types/adobe__pdfservices-node-sdk/operation/option/protectpdf/permissions.d.ts b/types/adobe__pdfservices-node-sdk/operation/option/protectpdf/permissions.d.ts
deleted file mode 100644
index aac0eb14eb0b9f..00000000000000
--- a/types/adobe__pdfservices-node-sdk/operation/option/protectpdf/permissions.d.ts
+++ /dev/null
@@ -1,23 +0,0 @@
-import { PasswordProtectOptions } from "./password-protect-options";
-
-/**
- * Document Permissions for {@link ProtectPDFOperation}
- */
-export class Permissions {
- /**
- * Creates a new {@link Permissions} instance.
- *
- * @return a {@link Permissions} instance
- */
- static createNew(): Permissions;
- _permissionsSet: Set
- *
- */
-export class PDFPropertiesOperation {
- /**
- * Constructs a {@link PDFPropertiesOperation} instance.
- */
- static createNew(): PDFPropertiesOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- sourceFileRef: any;
- isInvoked: boolean;
- options: PDFPropertiesOptions;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets the options for this operation. See {@link PDFPropertiesOptions} for how to specify options for PDF Properties.
- */
- setOptions(options?: PDFPropertiesOptions): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- executeAndReturnFileRef(context: ExecutionContext): Promiseconst credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * clientContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * PDFProperties = PDFServicesSdk.PDFProperties,
- * pdfPropertiesOperation = PDFProperties.Operation.createNew(),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('test/resources/PDFPropertiesOperationInput.pdf',PDFProperties.SupportedSourceFormat.pdf);
- *
- * pdfPropertiesOperation.setInput(input);
- *
- * pdfPropertiesOperation.execute(clientContext)
- * .then(result => console.log(result))
- * .catch(err => console.log(err));
- *
- *
- *
- * For AES-128 encryption the password supports LATIN-I characters only.
- * For AES-256 encryption the password supports Unicode character set.
- *
- * Sample Usage:
- *
- *
- */
-export class ProtectPDFOperation {
- /**
- * Constructs a {@link ProtectPDFOperation} instance.
- */
- static createNew(options: PasswordProtectOptions): ProtectPDFOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- constructor(options: any);
- sourceFileRef: any;
- options: any;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * ProtectPDF = PDFServicesSdk.ProtectPDF,
- * protectPDFOptions = ProtectPDF.options,
- * permissions = protectPDFOptions.Permissions.createNew();
- *
- * permissions.addPermission(protectPDFOptions.Permission.PRINT_LOW_QUALITY);
- * permissions.addPermission(protectPDFOptions.Permission.EDIT_DOCUMENT_ASSEMBLY);
- * permissions.addPermission(protectPDFOptions.Permission.COPY_CONTENT);
- *
- * const options = new protectPDFOptions.PasswordProtectOptions.Builder()
- * .setUserPassword("openpassword")
- * .setOwnerPassword("permissionspassword")
- * .setPermissions(permissions)
- * .setEncryptionAlgorithm(protectPDFOptions.EncryptionAlgorithm.AES_256)
- * .setContentEncryption(protectPDFOptions.ContentEncryption.ALL_CONTENT_EXCEPT_METADATA)
- * .build(),
- * protectPDFOperation = ProtectPDF.Operation.createNew(options),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/protectPDFInput.pdf', ProtectPDF.SupportedSourceFormat.pdf);
- *
- * protectPDFOperation.setInput(input);
- *
- * protectPDFOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/protectPDFOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- *
- */
-export class RemoveProtectionOperation {
- /**
- * Constructs a {@link RemoveProtectionOperation} instance.
- */
- static createNew(): RemoveProtectionOperation;
- static get SupportedSourceFormat(): PdfFormat;
- constructor(password: any);
- sourceFileRef: any;
- password: any;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Specifies the intended password depending on the type of password security attached to the input PDF document.
- */
- setPassword(password: string): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * RemoveProtection = PDFServicesSdk.RemoveProtection,
- * removeProtectionOperation = RemoveProtection.Operation.createNew(),
- * input = PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/removeProtectionInput.pdf', RemoveProtection.SupportedSourceFormat.pdf);
- *
- * removeProtectionOperation.setInput(input);
- * removeProtectionOperation.setPassword("password");
- *
- * removeProtectionOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/removeProtectionOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- *
- */
-export class ReorderPagesOperation {
- /**
- * Constructs a {@link ReorderPagesOperation} instance.
- */
- static createNew(): ReorderPagesOperation;
- static get SupportedSourceFormat(): PdfFormat;
- sourceFileRef: any;
- pageRanges: PageRanges;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets the order of the pages.
- */
- setPagesOrder(pageRanges: PageRanges): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * ReorderPages = PDFServicesSdk.ReorderPages,
- * reorderPagesOperation = ReorderPages.Operation.createNew(),
- * pageRanges = new PDFServicesSdk.PageRanges();
- *
- * reorderPagesOperation.setInput(PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/reorderPagesOperationInput.pdf',
- * ReorderPages.SupportedSourceFormat.pdf));
- * pageRanges.addSinglePage(3);
- * pageRanges.addPageRange(1,2);
- * reorderPagesOperation.setPagesOrder(pageRanges);
- *
- * reorderPagesOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/reorderPagesOperationOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- *
- */
-export class ReplacePagesOperation {
- /**
- * Constructs a {@link ReplacePagesOperation} instance.
- */
- static createNew(): ReplacePagesOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- filesToReplace: {};
- baseSourceFileRef: any;
- /**
- * Sets a base input file.
- */
- setBaseInput(baseSourceFileRef: FileRef): void;
- /**
- * Adds the pages of the input PDF file for replacing the page of the base PDF file.
- *
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * ReplacePages = PDFServicesSdk.ReplacePages,
- * replacePagesOperation = ReplacePages.Operation.createNew();
- *
- * replacePagesOperation.setBaseInput(PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/replacePagesOperationBaseInput.pdf',
- * ReplacePages.SupportedSourceFormat.pdf));
- * replacePagesOperation.addPagesForReplace(1, PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/replacePagesOperationFileToBeReplacedWithInput.pdf',
- * ReplacePages.SupportedSourceFormat.pdf));
- *
- * replacePagesOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/replacePagesOperationOutput.pdf'))
- * .catch(err => console.log(err));
- *
- * pageRanges is not provided, the specified page of the base PDF file will be replaced
- * by all the pages of the input PDF file.
- */
- addPagesForReplace(basePageToReplace: number, inputFile: FileRef, pageRanges?: PageRanges): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- *
- */
-export class RotatePagesOperation {
- /**
- * Constructs a {@link RotatePagesOperation} instance.
- */
- static createNew(): RotatePagesOperation;
- static get SupportedSourceFormat(): {
- /**
- * Represents "application/pdf" media type
- */
- pdf: string;
- };
- static get Angle(): {
- /**
- * Represents 90 degrees clockwise rotation
- */
- _90: number;
- /**
- * Represents 180 degrees clockwise rotation
- */
- _180: number;
- /**
- * Represents 270 degrees clockwise rotation
- */
- _270: number;
- };
- sourceFileRef: any;
- pageActions: PageActions;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets angle (in clockwise direction) for rotating pages of the input PDF file; can be invoked
- * multiple times to set rotation angle for different set of pages.
- *
- *
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * RotatePages = PDFServicesSdk.RotatePages,
- * rotatePagesOperation = RotatePages.Operation.createNew();
- *
- * rotatePagesOperation.setInput(PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/rotatePagesOperationInput.pdf',
- * RotatePages.SupportedSourceFormat.pdf));
- * rotatePagesOperation.setAngleToRotatePagesBy(PDFServicesSdk.RotatePages.Angle._90);
- *
- * rotatePagesOperation.execute(executionContext)
- * .then(result => result.saveAsFile('output/rotatePagesOperationOutput.pdf'))
- * .catch(err => console.log(err));
- *
- *
- * For e.g.:
- * PageRanges pageRanges = new PDFServicesSdk.PageRanges();
- * pageRanges.addSinglePage(1);
- * rotatePagesOperation.setAngleToRotatePagesBy(PDFServicesSdk.RotatePages.Angle._90, pageRanges);
- * rotatePagesOperation.setAngleToRotatePagesBy(PDFServicesSdk.RotatePages.Angle._180, pageRanges);
- *
- * Above invocations will effectively rotate pages (as specified by the page ranges) by 270 degrees.
- *
- * If pageRanges is not provided, all pages of the input PDF are rotated by the specified angle.
- */
- setAngleToRotatePagesBy(
- angle: {
- /**
- * Represents 90 degrees clockwise rotation
- */
- _90: number;
- /**
- * Represents 180 degrees clockwise rotation
- */
- _180: number;
- /**
- * Represents 270 degrees clockwise rotation
- */
- _270: number;
- },
- pageRanges?: PageRanges,
- ): void;
- /**
- * Executes this operation using the supplied context and returns a Promise which resolves to the operation result.
- *
- * The resulting file may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- *
- */
-export class SplitPDFOperation {
- /**
- * Constructs a {@link SplitPDFOperation} instance.
- */
- static createNew(): SplitPDFOperation;
- static get SupportedSourceFormat(): PdfFormat;
- sourceFileRef: any;
- pageRanges: PageRanges;
- pageCount: number;
- fileCount: number;
- /**
- * Sets an input file.
- */
- setInput(sourceFileRef: FileRef): void;
- /**
- * Sets the page ranges on the basis of which to split the input PDF file.
- * Each page range corresponds to a single output file having the pages specified in the page range.
- */
- setPageRanges(pageRanges: PageRanges): void;
- /**
- * Sets the number of documents to split the input PDF.
- */
- setFileCount(fileCount: number): void;
- /**
- * Sets the maximum number of pages each of the output files can have.
- */
- setPageCount(pageCount: number): void;
- /**
- * Executes this operation synchronously using the supplied context and returns a new list of FileRef instances for the resultant PDF files.
- *
- * The resultant files may be stored in the system temporary directory (per the os.tempdir(), symlinks are resolved
- * to the actual path).
- * See {@link FileRef} for how temporary resources are cleaned up.
- */
- execute(context: ExecutionContext): Promise
- * const credentials = PDFServicesSdk.Credentials.serviceAccountCredentialsBuilder()
- * .fromFile("pdfservices-api-credentials.json")
- * .build(),
- * executionContext = PDFServicesSdk.ExecutionContext.create(credentials),
- * SplitPDF = PDFServicesSdk.SplitPDF,
- * splitPDFOperation = SplitPDF.Operation.createNew();
- *
- * splitPDFOperation.setInput(PDFServicesSdk.FileRef.createFromLocalFile('~/Documents/splitPDFInput.pdf',
- * SplitPDF.SupportedSourceFormat.pdf));
- * splitPDFOperation.setPageCount(2);
- *
- * splitPDFOperation.execute(executionContext)
- * .then(result => {
- * let saveFilesPromises = [];
- * for(let i = 0; i < result.length; i++){
- * saveFilesPromises.push(result[i].saveAsFile(`output/splitPDFOutput_{i}.pdf`));
- * }
- * return Promise.all(saveFilesPromises);
- * })
- * .catch(err => console.log(err));
- *
- *