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; - /** - * Writes the contents of this file to 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: - *

- * 
- *
- *  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));
- * 
- * 
- */ -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 pageRanges argument is not - * provided, all pages of the PDF will be added in the combined PDF. - *

- */ - 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; - validate(context: any): void; - getIncludeRanges(): any[]; - getSourceFileRefs(): any[]; -} -import { ExecutionContext, FileRef, PageRanges } from "../pdfservices-sdk"; diff --git a/types/adobe__pdfservices-node-sdk/operation/compress-pdf-operation.d.ts b/types/adobe__pdfservices-node-sdk/operation/compress-pdf-operation.d.ts deleted file mode 100644 index c2b49dfc02c4dd..00000000000000 --- a/types/adobe__pdfservices-node-sdk/operation/compress-pdf-operation.d.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { ExecutionContext, FileRef } from "../pdfservices-sdk"; -import { CompressPDFOptions } from "./option/compresspdf/compress-pdf-options"; - -/** - * An operation that reduces the size of a PDF file. - * - * Sample Usage: - *

- * 
- *  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));
- * 
- * 
- */ -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; - validate(context: any): void; -} diff --git a/types/adobe__pdfservices-node-sdk/operation/create-pdf-operation.d.ts b/types/adobe__pdfservices-node-sdk/operation/create-pdf-operation.d.ts deleted file mode 100644 index 483ff493889145..00000000000000 --- a/types/adobe__pdfservices-node-sdk/operation/create-pdf-operation.d.ts +++ /dev/null @@ -1,247 +0,0 @@ -import { ExecutionContext, FileRef } from "../pdfservices-sdk"; -import { CreatePDFFromExcelOptions } from "./option/createpdf/create-pdf-from-excel-options"; -import { CreatePDFFromHtmlOptions } from "./option/createpdf/create-pdf-from-html-options"; -import { CreatePDFFromPPTOptions } from "./option/createpdf/create-pdf-from-ppt-options"; -import { CreatePDFFromWordOptions } from "./option/createpdf/create-pdf-from-word-options"; - -/** - * An operation that converts a non-PDF file to a PDF file. Some source formats may have associated conversion parameters - * which can be set in the {@link CreatePDFOperation#setOptions} method. - *

- * 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}. - *
- * 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: - *