@keystrokehq/pdf_co 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +17 -0
- package/dist/action.cjs +21 -0
- package/dist/action.cjs.map +1 -0
- package/dist/action.mjs +21 -0
- package/dist/action.mjs.map +1 -0
- package/dist/actions/account-balance-info.cjs +23 -0
- package/dist/actions/account-balance-info.cjs.map +1 -0
- package/dist/actions/account-balance-info.d.cts +9 -0
- package/dist/actions/account-balance-info.d.cts.map +1 -0
- package/dist/actions/account-balance-info.d.mts +9 -0
- package/dist/actions/account-balance-info.d.mts.map +1 -0
- package/dist/actions/account-balance-info.mjs +20 -0
- package/dist/actions/account-balance-info.mjs.map +1 -0
- package/dist/actions/convert-excel-to-csv.cjs +34 -0
- package/dist/actions/convert-excel-to-csv.cjs.map +1 -0
- package/dist/actions/convert-excel-to-csv.d.cts +9 -0
- package/dist/actions/convert-excel-to-csv.d.cts.map +1 -0
- package/dist/actions/convert-excel-to-csv.d.mts +9 -0
- package/dist/actions/convert-excel-to-csv.d.mts.map +1 -0
- package/dist/actions/convert-excel-to-csv.mjs +31 -0
- package/dist/actions/convert-excel-to-csv.mjs.map +1 -0
- package/dist/actions/convert-excel-to-html.cjs +29 -0
- package/dist/actions/convert-excel-to-html.cjs.map +1 -0
- package/dist/actions/convert-excel-to-html.d.cts +9 -0
- package/dist/actions/convert-excel-to-html.d.cts.map +1 -0
- package/dist/actions/convert-excel-to-html.d.mts +9 -0
- package/dist/actions/convert-excel-to-html.d.mts.map +1 -0
- package/dist/actions/convert-excel-to-html.mjs +26 -0
- package/dist/actions/convert-excel-to-html.mjs.map +1 -0
- package/dist/actions/convert-excel-to-json.cjs +27 -0
- package/dist/actions/convert-excel-to-json.cjs.map +1 -0
- package/dist/actions/convert-excel-to-json.d.cts +9 -0
- package/dist/actions/convert-excel-to-json.d.cts.map +1 -0
- package/dist/actions/convert-excel-to-json.d.mts +9 -0
- package/dist/actions/convert-excel-to-json.d.mts.map +1 -0
- package/dist/actions/convert-excel-to-json.mjs +24 -0
- package/dist/actions/convert-excel-to-json.mjs.map +1 -0
- package/dist/actions/convert-excel-to-text.cjs +32 -0
- package/dist/actions/convert-excel-to-text.cjs.map +1 -0
- package/dist/actions/convert-excel-to-text.d.cts +9 -0
- package/dist/actions/convert-excel-to-text.d.cts.map +1 -0
- package/dist/actions/convert-excel-to-text.d.mts +9 -0
- package/dist/actions/convert-excel-to-text.d.mts.map +1 -0
- package/dist/actions/convert-excel-to-text.mjs +29 -0
- package/dist/actions/convert-excel-to-text.mjs.map +1 -0
- package/dist/actions/convert-excel-to-xml.cjs +52 -0
- package/dist/actions/convert-excel-to-xml.cjs.map +1 -0
- package/dist/actions/convert-excel-to-xml.d.cts +9 -0
- package/dist/actions/convert-excel-to-xml.d.cts.map +1 -0
- package/dist/actions/convert-excel-to-xml.d.mts +9 -0
- package/dist/actions/convert-excel-to-xml.d.mts.map +1 -0
- package/dist/actions/convert-excel-to-xml.mjs +49 -0
- package/dist/actions/convert-excel-to-xml.mjs.map +1 -0
- package/dist/actions/document-parser.cjs +38 -0
- package/dist/actions/document-parser.cjs.map +1 -0
- package/dist/actions/document-parser.d.cts +9 -0
- package/dist/actions/document-parser.d.cts.map +1 -0
- package/dist/actions/document-parser.d.mts +9 -0
- package/dist/actions/document-parser.d.mts.map +1 -0
- package/dist/actions/document-parser.mjs +35 -0
- package/dist/actions/document-parser.mjs.map +1 -0
- package/dist/actions/file-upload.cjs +31 -0
- package/dist/actions/file-upload.cjs.map +1 -0
- package/dist/actions/file-upload.d.cts +9 -0
- package/dist/actions/file-upload.d.cts.map +1 -0
- package/dist/actions/file-upload.d.mts +9 -0
- package/dist/actions/file-upload.d.mts.map +1 -0
- package/dist/actions/file-upload.mjs +28 -0
- package/dist/actions/file-upload.mjs.map +1 -0
- package/dist/actions/index.cjs +69 -0
- package/dist/actions/index.d.cts +35 -0
- package/dist/actions/index.d.mts +35 -0
- package/dist/actions/index.mjs +35 -0
- package/dist/actions/job-check.cjs +38 -0
- package/dist/actions/job-check.cjs.map +1 -0
- package/dist/actions/job-check.d.cts +9 -0
- package/dist/actions/job-check.d.cts.map +1 -0
- package/dist/actions/job-check.d.mts +9 -0
- package/dist/actions/job-check.d.mts.map +1 -0
- package/dist/actions/job-check.mjs +35 -0
- package/dist/actions/job-check.mjs.map +1 -0
- package/dist/actions/pdf-add.cjs +33 -0
- package/dist/actions/pdf-add.cjs.map +1 -0
- package/dist/actions/pdf-add.d.cts +9 -0
- package/dist/actions/pdf-add.d.cts.map +1 -0
- package/dist/actions/pdf-add.d.mts +9 -0
- package/dist/actions/pdf-add.d.mts.map +1 -0
- package/dist/actions/pdf-add.mjs +30 -0
- package/dist/actions/pdf-add.mjs.map +1 -0
- package/dist/actions/pdf-change-text-searchable.cjs +30 -0
- package/dist/actions/pdf-change-text-searchable.cjs.map +1 -0
- package/dist/actions/pdf-change-text-searchable.d.cts +9 -0
- package/dist/actions/pdf-change-text-searchable.d.cts.map +1 -0
- package/dist/actions/pdf-change-text-searchable.d.mts +9 -0
- package/dist/actions/pdf-change-text-searchable.d.mts.map +1 -0
- package/dist/actions/pdf-change-text-searchable.mjs +27 -0
- package/dist/actions/pdf-change-text-searchable.mjs.map +1 -0
- package/dist/actions/pdf-delete-pages.cjs +29 -0
- package/dist/actions/pdf-delete-pages.cjs.map +1 -0
- package/dist/actions/pdf-delete-pages.d.cts +9 -0
- package/dist/actions/pdf-delete-pages.d.cts.map +1 -0
- package/dist/actions/pdf-delete-pages.d.mts +9 -0
- package/dist/actions/pdf-delete-pages.d.mts.map +1 -0
- package/dist/actions/pdf-delete-pages.mjs +26 -0
- package/dist/actions/pdf-delete-pages.mjs.map +1 -0
- package/dist/actions/pdf-extract-attachments.cjs +36 -0
- package/dist/actions/pdf-extract-attachments.cjs.map +1 -0
- package/dist/actions/pdf-extract-attachments.d.cts +9 -0
- package/dist/actions/pdf-extract-attachments.d.cts.map +1 -0
- package/dist/actions/pdf-extract-attachments.d.mts +9 -0
- package/dist/actions/pdf-extract-attachments.d.mts.map +1 -0
- package/dist/actions/pdf-extract-attachments.mjs +33 -0
- package/dist/actions/pdf-extract-attachments.mjs.map +1 -0
- package/dist/actions/pdf-find.cjs +38 -0
- package/dist/actions/pdf-find.cjs.map +1 -0
- package/dist/actions/pdf-find.d.cts +9 -0
- package/dist/actions/pdf-find.d.cts.map +1 -0
- package/dist/actions/pdf-find.d.mts +9 -0
- package/dist/actions/pdf-find.d.mts.map +1 -0
- package/dist/actions/pdf-find.mjs +37 -0
- package/dist/actions/pdf-find.mjs.map +1 -0
- package/dist/actions/pdf-forms-info-reader.cjs +49 -0
- package/dist/actions/pdf-forms-info-reader.cjs.map +1 -0
- package/dist/actions/pdf-forms-info-reader.d.cts +9 -0
- package/dist/actions/pdf-forms-info-reader.d.cts.map +1 -0
- package/dist/actions/pdf-forms-info-reader.d.mts +9 -0
- package/dist/actions/pdf-forms-info-reader.d.mts.map +1 -0
- package/dist/actions/pdf-forms-info-reader.mjs +48 -0
- package/dist/actions/pdf-forms-info-reader.mjs.map +1 -0
- package/dist/actions/pdf-from-document-txt.cjs +32 -0
- package/dist/actions/pdf-from-document-txt.cjs.map +1 -0
- package/dist/actions/pdf-from-document-txt.d.cts +9 -0
- package/dist/actions/pdf-from-document-txt.d.cts.map +1 -0
- package/dist/actions/pdf-from-document-txt.d.mts +9 -0
- package/dist/actions/pdf-from-document-txt.d.mts.map +1 -0
- package/dist/actions/pdf-from-document-txt.mjs +29 -0
- package/dist/actions/pdf-from-document-txt.mjs.map +1 -0
- package/dist/actions/pdf-from-email.cjs +31 -0
- package/dist/actions/pdf-from-email.cjs.map +1 -0
- package/dist/actions/pdf-from-email.d.cts +9 -0
- package/dist/actions/pdf-from-email.d.cts.map +1 -0
- package/dist/actions/pdf-from-email.d.mts +9 -0
- package/dist/actions/pdf-from-email.d.mts.map +1 -0
- package/dist/actions/pdf-from-email.mjs +28 -0
- package/dist/actions/pdf-from-email.mjs.map +1 -0
- package/dist/actions/pdf-from-html.cjs +40 -0
- package/dist/actions/pdf-from-html.cjs.map +1 -0
- package/dist/actions/pdf-from-html.d.cts +9 -0
- package/dist/actions/pdf-from-html.d.cts.map +1 -0
- package/dist/actions/pdf-from-html.d.mts +9 -0
- package/dist/actions/pdf-from-html.d.mts.map +1 -0
- package/dist/actions/pdf-from-html.mjs +37 -0
- package/dist/actions/pdf-from-html.mjs.map +1 -0
- package/dist/actions/pdf-info-reader.cjs +21 -0
- package/dist/actions/pdf-info-reader.cjs.map +1 -0
- package/dist/actions/pdf-info-reader.d.cts +9 -0
- package/dist/actions/pdf-info-reader.d.cts.map +1 -0
- package/dist/actions/pdf-info-reader.d.mts +9 -0
- package/dist/actions/pdf-info-reader.d.mts.map +1 -0
- package/dist/actions/pdf-info-reader.mjs +18 -0
- package/dist/actions/pdf-info-reader.mjs.map +1 -0
- package/dist/actions/pdf-merge.cjs +27 -0
- package/dist/actions/pdf-merge.cjs.map +1 -0
- package/dist/actions/pdf-merge.d.cts +9 -0
- package/dist/actions/pdf-merge.d.cts.map +1 -0
- package/dist/actions/pdf-merge.d.mts +9 -0
- package/dist/actions/pdf-merge.d.mts.map +1 -0
- package/dist/actions/pdf-merge.mjs +24 -0
- package/dist/actions/pdf-merge.mjs.map +1 -0
- package/dist/actions/pdf-rotate.cjs +33 -0
- package/dist/actions/pdf-rotate.cjs.map +1 -0
- package/dist/actions/pdf-rotate.d.cts +9 -0
- package/dist/actions/pdf-rotate.d.cts.map +1 -0
- package/dist/actions/pdf-rotate.d.mts +9 -0
- package/dist/actions/pdf-rotate.d.mts.map +1 -0
- package/dist/actions/pdf-rotate.mjs +30 -0
- package/dist/actions/pdf-rotate.mjs.map +1 -0
- package/dist/actions/pdf-search-and-delete-text.cjs +34 -0
- package/dist/actions/pdf-search-and-delete-text.cjs.map +1 -0
- package/dist/actions/pdf-search-and-delete-text.d.cts +9 -0
- package/dist/actions/pdf-search-and-delete-text.d.cts.map +1 -0
- package/dist/actions/pdf-search-and-delete-text.d.mts +9 -0
- package/dist/actions/pdf-search-and-delete-text.d.mts.map +1 -0
- package/dist/actions/pdf-search-and-delete-text.mjs +31 -0
- package/dist/actions/pdf-search-and-delete-text.mjs.map +1 -0
- package/dist/actions/pdf-search-and-replace-text.cjs +35 -0
- package/dist/actions/pdf-search-and-replace-text.cjs.map +1 -0
- package/dist/actions/pdf-search-and-replace-text.d.cts +9 -0
- package/dist/actions/pdf-search-and-replace-text.d.cts.map +1 -0
- package/dist/actions/pdf-search-and-replace-text.d.mts +9 -0
- package/dist/actions/pdf-search-and-replace-text.d.mts.map +1 -0
- package/dist/actions/pdf-search-and-replace-text.mjs +32 -0
- package/dist/actions/pdf-search-and-replace-text.mjs.map +1 -0
- package/dist/actions/pdf-split.cjs +44 -0
- package/dist/actions/pdf-split.cjs.map +1 -0
- package/dist/actions/pdf-split.d.cts +9 -0
- package/dist/actions/pdf-split.d.cts.map +1 -0
- package/dist/actions/pdf-split.d.mts +9 -0
- package/dist/actions/pdf-split.d.mts.map +1 -0
- package/dist/actions/pdf-split.mjs +41 -0
- package/dist/actions/pdf-split.mjs.map +1 -0
- package/dist/actions/pdf-to-csv.cjs +33 -0
- package/dist/actions/pdf-to-csv.cjs.map +1 -0
- package/dist/actions/pdf-to-csv.d.cts +9 -0
- package/dist/actions/pdf-to-csv.d.cts.map +1 -0
- package/dist/actions/pdf-to-csv.d.mts +9 -0
- package/dist/actions/pdf-to-csv.d.mts.map +1 -0
- package/dist/actions/pdf-to-csv.mjs +30 -0
- package/dist/actions/pdf-to-csv.mjs.map +1 -0
- package/dist/actions/pdf-to-html.cjs +36 -0
- package/dist/actions/pdf-to-html.cjs.map +1 -0
- package/dist/actions/pdf-to-html.d.cts +9 -0
- package/dist/actions/pdf-to-html.d.cts.map +1 -0
- package/dist/actions/pdf-to-html.d.mts +9 -0
- package/dist/actions/pdf-to-html.d.mts.map +1 -0
- package/dist/actions/pdf-to-html.mjs +33 -0
- package/dist/actions/pdf-to-html.mjs.map +1 -0
- package/dist/actions/pdf-to-image.cjs +34 -0
- package/dist/actions/pdf-to-image.cjs.map +1 -0
- package/dist/actions/pdf-to-image.d.cts +9 -0
- package/dist/actions/pdf-to-image.d.cts.map +1 -0
- package/dist/actions/pdf-to-image.d.mts +9 -0
- package/dist/actions/pdf-to-image.d.mts.map +1 -0
- package/dist/actions/pdf-to-image.mjs +31 -0
- package/dist/actions/pdf-to-image.mjs.map +1 -0
- package/dist/actions/pdf-to-json.cjs +63 -0
- package/dist/actions/pdf-to-json.cjs.map +1 -0
- package/dist/actions/pdf-to-json.d.cts +9 -0
- package/dist/actions/pdf-to-json.d.cts.map +1 -0
- package/dist/actions/pdf-to-json.d.mts +9 -0
- package/dist/actions/pdf-to-json.d.mts.map +1 -0
- package/dist/actions/pdf-to-json.mjs +62 -0
- package/dist/actions/pdf-to-json.mjs.map +1 -0
- package/dist/actions/pdf-to-text.cjs +41 -0
- package/dist/actions/pdf-to-text.cjs.map +1 -0
- package/dist/actions/pdf-to-text.d.cts +9 -0
- package/dist/actions/pdf-to-text.d.cts.map +1 -0
- package/dist/actions/pdf-to-text.d.mts +9 -0
- package/dist/actions/pdf-to-text.d.mts.map +1 -0
- package/dist/actions/pdf-to-text.mjs +38 -0
- package/dist/actions/pdf-to-text.mjs.map +1 -0
- package/dist/actions/pdf-to-xls.cjs +30 -0
- package/dist/actions/pdf-to-xls.cjs.map +1 -0
- package/dist/actions/pdf-to-xls.d.cts +9 -0
- package/dist/actions/pdf-to-xls.d.cts.map +1 -0
- package/dist/actions/pdf-to-xls.d.mts +9 -0
- package/dist/actions/pdf-to-xls.d.mts.map +1 -0
- package/dist/actions/pdf-to-xls.mjs +27 -0
- package/dist/actions/pdf-to-xls.mjs.map +1 -0
- package/dist/actions/pdf-to-xlsx.cjs +37 -0
- package/dist/actions/pdf-to-xlsx.cjs.map +1 -0
- package/dist/actions/pdf-to-xlsx.d.cts +9 -0
- package/dist/actions/pdf-to-xlsx.d.cts.map +1 -0
- package/dist/actions/pdf-to-xlsx.d.mts +9 -0
- package/dist/actions/pdf-to-xlsx.d.mts.map +1 -0
- package/dist/actions/pdf-to-xlsx.mjs +34 -0
- package/dist/actions/pdf-to-xlsx.mjs.map +1 -0
- package/dist/actions/pdf-to-xml.cjs +29 -0
- package/dist/actions/pdf-to-xml.cjs.map +1 -0
- package/dist/actions/pdf-to-xml.d.cts +9 -0
- package/dist/actions/pdf-to-xml.d.cts.map +1 -0
- package/dist/actions/pdf-to-xml.d.mts +9 -0
- package/dist/actions/pdf-to-xml.d.mts.map +1 -0
- package/dist/actions/pdf-to-xml.mjs +26 -0
- package/dist/actions/pdf-to-xml.mjs.map +1 -0
- package/dist/actions/pdfco-post-barcode-generate.cjs +92 -0
- package/dist/actions/pdfco-post-barcode-generate.cjs.map +1 -0
- package/dist/actions/pdfco-post-barcode-generate.d.cts +9 -0
- package/dist/actions/pdfco-post-barcode-generate.d.cts.map +1 -0
- package/dist/actions/pdfco-post-barcode-generate.d.mts +9 -0
- package/dist/actions/pdfco-post-barcode-generate.d.mts.map +1 -0
- package/dist/actions/pdfco-post-barcode-generate.mjs +89 -0
- package/dist/actions/pdfco-post-barcode-generate.mjs.map +1 -0
- package/dist/actions/pdfco-post-file-upload-base64.cjs +30 -0
- package/dist/actions/pdfco-post-file-upload-base64.cjs.map +1 -0
- package/dist/actions/pdfco-post-file-upload-base64.d.cts +9 -0
- package/dist/actions/pdfco-post-file-upload-base64.d.cts.map +1 -0
- package/dist/actions/pdfco-post-file-upload-base64.d.mts +9 -0
- package/dist/actions/pdfco-post-file-upload-base64.d.mts.map +1 -0
- package/dist/actions/pdfco-post-file-upload-base64.mjs +27 -0
- package/dist/actions/pdfco-post-file-upload-base64.mjs.map +1 -0
- package/dist/app.cjs +9 -0
- package/dist/app.cjs.map +1 -0
- package/dist/app.d.cts +5 -0
- package/dist/app.d.cts.map +1 -0
- package/dist/app.d.mts +5 -0
- package/dist/app.d.mts.map +1 -0
- package/dist/app.mjs +10 -0
- package/dist/app.mjs.map +1 -0
- package/dist/catalog.cjs +15 -0
- package/dist/catalog.cjs.map +1 -0
- package/dist/catalog.d.cts +14 -0
- package/dist/catalog.d.cts.map +1 -0
- package/dist/catalog.d.mts +14 -0
- package/dist/catalog.d.mts.map +1 -0
- package/dist/catalog.mjs +15 -0
- package/dist/catalog.mjs.map +1 -0
- package/dist/execute.cjs +18 -0
- package/dist/execute.cjs.map +1 -0
- package/dist/execute.mjs +18 -0
- package/dist/execute.mjs.map +1 -0
- package/dist/index.cjs +74 -0
- package/dist/index.d.cts +37 -0
- package/dist/index.d.mts +37 -0
- package/dist/index.mjs +38 -0
- package/package.json +49 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-image.mjs","names":[],"sources":["../../src/actions/pdf-to-image.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToImageInput: z.ZodTypeAny = z.object({\n dpi: z.number().int().describe(\"Resolution in DPI for the output images (1-300).\").optional(),\n url: z.string().describe(\"Link to the source PDF file.\"),\n async: z.boolean().default(false).describe(\"Run processing asynchronously. Returns jobId when true.\").optional(),\n pages: z.string().describe(\"Comma-separated list of page indices or ranges to convert. For example: '1,3-5' to convert pages 1, 3, 4, and 5.\").optional(),\n password: z.string().describe(\"Password for protected PDF files, if required.\").optional(),\n profiles: z.string().describe(\"Custom JSON profiles for advanced conversion options.\").optional(),\n imageFormat: z.enum([\"PNG\", \"JPG\", \"TIFF\"]).describe(\"Output image format: PNG (default), JPG, or TIFF.\").optional(),\n}).describe(\"Request model for converting PDF pages to images.\");\nexport const PdfCoPdfToImageOutput: z.ZodTypeAny = z.object({\n url: z.union([z.string(), z.array(z.string())]).nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred.\"),\n jobId: z.string().describe(\"Job ID for asynchronous processing.\").nullable().optional(),\n status: z.union([z.string(), z.number().int()]),\n message: z.string().describe(\"Detailed error or status message.\").nullable().optional(),\n}).describe(\"Response model for PDF to image conversion.\");\n\nexport const pdfCoPdfToImage = action(\"PDF_CO_PDF_TO_IMAGE\", {\n slug: \"pdf_co-pdf-to-image\",\n name: \"Convert PDF to Image\",\n description: \"Tool to convert PDF pages to images (PNG, JPG, TIFF). Use when you need image previews of PDF content.\",\n input: PdfCoPdfToImageInput,\n output: PdfCoPdfToImageOutput,\n});\n"],"mappings":";;AAqBA,MAAa,kBAAkB,OAAO,uBAAuB;CAC3D,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArBgD,EAAE,OAAO;EACzD,KAAK,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;EAC5F,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,8BAA8B;EACvD,OAAO,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,yDAAyD,CAAC,CAAC,SAAS;EAC/G,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,kHAAkH,CAAC,CAAC,SAAS;EACxJ,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EACzF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EAChG,aAAa,EAAE,KAAK;GAAC;GAAO;GAAO;EAAM,CAAC,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CACrH,CAAC,CAAC,CAAC,SAAS,mDAaH;CACP,QAbiD,EAAE,OAAO;EAC1D,KAAK,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACpE,OAAO,EAAE,QAAQ,CAAC,CAAC,SAAS,4BAA4B;EACxD,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,qCAAqC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACtF,QAAQ,EAAE,MAAM,CAAC,EAAE,OAAO,GAAG,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC;EAC9C,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CACxF,CAAC,CAAC,CAAC,SAAS,6CAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/pdf-to-json.ts
|
|
4
|
+
const PdfCoPdfToJsonInput = zod.z.object({
|
|
5
|
+
url: zod.z.string().describe("Link to the PDF file to be converted.").optional(),
|
|
6
|
+
file: zod.z.string().describe("Binary content of the PDF file to convert.").optional(),
|
|
7
|
+
name: zod.z.string().describe("Optional name for the output JSON file (should end with .json).").optional(),
|
|
8
|
+
async: zod.z.boolean().describe("If true, runs the job asynchronously; returns jobId for status checking.").optional(),
|
|
9
|
+
pages: zod.z.string().describe("Comma-separated page indices or ranges to convert (e.g., '1,3-5').").optional(),
|
|
10
|
+
inline: zod.z.boolean().describe("If true, returns JSON data inline; otherwise returns a URL.").optional(),
|
|
11
|
+
password: zod.z.string().describe("Password for protected PDF files, if required.").optional(),
|
|
12
|
+
profiles: zod.z.string().describe("Advanced conversion configuration in JSON format.").optional(),
|
|
13
|
+
searchString: zod.z.string().describe("Optional text to search for in the PDF before conversion.").optional()
|
|
14
|
+
}).describe("Request model for converting PDF documents to JSON. Provide either `url` or `file`.");
|
|
15
|
+
const PdfCoPdfToJson_PDFTextElementSchema = zod.z.object({
|
|
16
|
+
"@x": zod.z.string().describe("X coordinate").nullable().optional(),
|
|
17
|
+
"@y": zod.z.string().describe("Y coordinate").nullable().optional(),
|
|
18
|
+
"#text": zod.z.string().describe("Text content").nullable().optional(),
|
|
19
|
+
"@width": zod.z.string().describe("Width").nullable().optional(),
|
|
20
|
+
"@height": zod.z.string().describe("Height").nullable().optional(),
|
|
21
|
+
"@fontName": zod.z.string().describe("Font name").nullable().optional(),
|
|
22
|
+
"@fontSize": zod.z.string().describe("Font size").nullable().optional(),
|
|
23
|
+
"@fontStyle": zod.z.string().describe("Font style (e.g., Bold, Italic)").nullable().optional()
|
|
24
|
+
}).passthrough().describe("Represents a text element with positioning and formatting.");
|
|
25
|
+
const PdfCoPdfToJson_PDFColumnSchema = zod.z.object({ text: zod.z.union([PdfCoPdfToJson_PDFTextElementSchema, zod.z.array(PdfCoPdfToJson_PDFTextElementSchema)]).nullable().optional() }).passthrough().describe("Represents a column containing text elements.");
|
|
26
|
+
const PdfCoPdfToJson_PDFRowSchema = zod.z.object({ column: zod.z.union([PdfCoPdfToJson_PDFColumnSchema, zod.z.array(PdfCoPdfToJson_PDFColumnSchema)]).nullable().optional() }).passthrough().describe("Represents a row containing columns.");
|
|
27
|
+
const PdfCoPdfToJson_PDFPageSchema = zod.z.object({
|
|
28
|
+
row: zod.z.union([PdfCoPdfToJson_PDFRowSchema, zod.z.array(PdfCoPdfToJson_PDFRowSchema)]).nullable().optional(),
|
|
29
|
+
"@index": zod.z.string().describe("Page index").nullable().optional(),
|
|
30
|
+
"@width": zod.z.string().describe("Page width").nullable().optional(),
|
|
31
|
+
"@height": zod.z.string().describe("Page height").nullable().optional(),
|
|
32
|
+
"@OCRWasPerformed": zod.z.string().describe("Whether OCR was performed").nullable().optional()
|
|
33
|
+
}).passthrough().describe("Represents a page in the PDF document.");
|
|
34
|
+
const PdfCoPdfToJson_PDFDocumentSchema = zod.z.object({
|
|
35
|
+
page: zod.z.union([PdfCoPdfToJson_PDFPageSchema, zod.z.array(PdfCoPdfToJson_PDFPageSchema)]).nullable().optional(),
|
|
36
|
+
"@pageCount": zod.z.string().describe("Total number of pages").nullable().optional(),
|
|
37
|
+
"@pageCountWithOCRPerformed": zod.z.string().describe("Number of pages with OCR").nullable().optional()
|
|
38
|
+
}).passthrough().describe("Represents the PDF document structure.");
|
|
39
|
+
const PdfCoPdfToJson_PDFJsonBodySchema = zod.z.object({ document: PdfCoPdfToJson_PDFDocumentSchema.nullable().optional() }).passthrough().describe("Body structure for inline JSON response.");
|
|
40
|
+
const PdfCoPdfToJsonOutput = zod.z.object({
|
|
41
|
+
url: zod.z.string().describe("URL to the resulting JSON file (if inline=False).").nullable().optional(),
|
|
42
|
+
body: PdfCoPdfToJson_PDFJsonBodySchema.nullable().optional(),
|
|
43
|
+
name: zod.z.string().describe("Output filename.").nullable().optional(),
|
|
44
|
+
error: zod.z.boolean().describe("True if an error occurred during conversion."),
|
|
45
|
+
status: zod.z.number().int().describe("Status code returned by the API."),
|
|
46
|
+
credits: zod.z.number().int().describe("Credits consumed for this operation.").nullable().optional(),
|
|
47
|
+
message: zod.z.string().describe("Error or status message from the API.").nullable().optional(),
|
|
48
|
+
duration: zod.z.number().int().describe("Operation duration in milliseconds.").nullable().optional(),
|
|
49
|
+
pageCount: zod.z.number().int().describe("Total number of pages in the PDF.").nullable().optional(),
|
|
50
|
+
remainingCredits: zod.z.number().int().describe("Remaining account credits.").nullable().optional(),
|
|
51
|
+
outputLinkValidTill: zod.z.string().describe("Expiration timestamp for the output URL.").nullable().optional()
|
|
52
|
+
}).describe("Response model for PDF to JSON conversion.");
|
|
53
|
+
const pdfCoPdfToJson = require_action.action("PDF_CO_PDF_TO_JSON", {
|
|
54
|
+
slug: "pdf_co-pdf-to-json",
|
|
55
|
+
name: "Convert PDF to JSON",
|
|
56
|
+
description: "Tool to convert PDF or scanned images to JSON format. Use when you need a structured JSON representation of PDF content.",
|
|
57
|
+
input: PdfCoPdfToJsonInput,
|
|
58
|
+
output: PdfCoPdfToJsonOutput
|
|
59
|
+
});
|
|
60
|
+
//#endregion
|
|
61
|
+
exports.pdfCoPdfToJson = pdfCoPdfToJson;
|
|
62
|
+
|
|
63
|
+
//# sourceMappingURL=pdf-to-json.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-json.cjs","names":["z","action"],"sources":["../../src/actions/pdf-to-json.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToJsonInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Link to the PDF file to be converted.\").optional(),\n file: z.string().describe(\"Binary content of the PDF file to convert.\").optional(),\n name: z.string().describe(\"Optional name for the output JSON file (should end with .json).\").optional(),\n async: z.boolean().describe(\"If true, runs the job asynchronously; returns jobId for status checking.\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to convert (e.g., '1,3-5').\").optional(),\n inline: z.boolean().describe(\"If true, returns JSON data inline; otherwise returns a URL.\").optional(),\n password: z.string().describe(\"Password for protected PDF files, if required.\").optional(),\n profiles: z.string().describe(\"Advanced conversion configuration in JSON format.\").optional(),\n searchString: z.string().describe(\"Optional text to search for in the PDF before conversion.\").optional(),\n}).describe(\"Request model for converting PDF documents to JSON. Provide either `url` or `file`.\");\nconst PdfCoPdfToJson_PDFTextElementSchema: z.ZodTypeAny = z.object({\n \"@x\": z.string().describe(\"X coordinate\").nullable().optional(),\n \"@y\": z.string().describe(\"Y coordinate\").nullable().optional(),\n \"#text\": z.string().describe(\"Text content\").nullable().optional(),\n \"@width\": z.string().describe(\"Width\").nullable().optional(),\n \"@height\": z.string().describe(\"Height\").nullable().optional(),\n \"@fontName\": z.string().describe(\"Font name\").nullable().optional(),\n \"@fontSize\": z.string().describe(\"Font size\").nullable().optional(),\n \"@fontStyle\": z.string().describe(\"Font style (e.g., Bold, Italic)\").nullable().optional(),\n}).passthrough().describe(\"Represents a text element with positioning and formatting.\");\nconst PdfCoPdfToJson_PDFColumnSchema: z.ZodTypeAny = z.object({\n text: z.union([PdfCoPdfToJson_PDFTextElementSchema, z.array(PdfCoPdfToJson_PDFTextElementSchema)]).nullable().optional(),\n}).passthrough().describe(\"Represents a column containing text elements.\");\nconst PdfCoPdfToJson_PDFRowSchema: z.ZodTypeAny = z.object({\n column: z.union([PdfCoPdfToJson_PDFColumnSchema, z.array(PdfCoPdfToJson_PDFColumnSchema)]).nullable().optional(),\n}).passthrough().describe(\"Represents a row containing columns.\");\nconst PdfCoPdfToJson_PDFPageSchema: z.ZodTypeAny = z.object({\n row: z.union([PdfCoPdfToJson_PDFRowSchema, z.array(PdfCoPdfToJson_PDFRowSchema)]).nullable().optional(),\n \"@index\": z.string().describe(\"Page index\").nullable().optional(),\n \"@width\": z.string().describe(\"Page width\").nullable().optional(),\n \"@height\": z.string().describe(\"Page height\").nullable().optional(),\n \"@OCRWasPerformed\": z.string().describe(\"Whether OCR was performed\").nullable().optional(),\n}).passthrough().describe(\"Represents a page in the PDF document.\");\nconst PdfCoPdfToJson_PDFDocumentSchema: z.ZodTypeAny = z.object({\n page: z.union([PdfCoPdfToJson_PDFPageSchema, z.array(PdfCoPdfToJson_PDFPageSchema)]).nullable().optional(),\n \"@pageCount\": z.string().describe(\"Total number of pages\").nullable().optional(),\n \"@pageCountWithOCRPerformed\": z.string().describe(\"Number of pages with OCR\").nullable().optional(),\n}).passthrough().describe(\"Represents the PDF document structure.\");\nconst PdfCoPdfToJson_PDFJsonBodySchema: z.ZodTypeAny = z.object({\n document: PdfCoPdfToJson_PDFDocumentSchema.nullable().optional(),\n}).passthrough().describe(\"Body structure for inline JSON response.\");\nexport const PdfCoPdfToJsonOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting JSON file (if inline=False).\").nullable().optional(),\n body: PdfCoPdfToJson_PDFJsonBodySchema.nullable().optional(),\n name: z.string().describe(\"Output filename.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred during conversion.\"),\n status: z.number().int().describe(\"Status code returned by the API.\"),\n credits: z.number().int().describe(\"Credits consumed for this operation.\").nullable().optional(),\n message: z.string().describe(\"Error or status message from the API.\").nullable().optional(),\n duration: z.number().int().describe(\"Operation duration in milliseconds.\").nullable().optional(),\n pageCount: z.number().int().describe(\"Total number of pages in the PDF.\").nullable().optional(),\n remainingCredits: z.number().int().describe(\"Remaining account credits.\").nullable().optional(),\n outputLinkValidTill: z.string().describe(\"Expiration timestamp for the output URL.\").nullable().optional(),\n}).describe(\"Response model for PDF to JSON conversion.\");\n\nexport const pdfCoPdfToJson = action(\"PDF_CO_PDF_TO_JSON\", {\n slug: \"pdf_co-pdf-to-json\",\n name: \"Convert PDF to JSON\",\n description: \"Tool to convert PDF or scanned images to JSON format. Use when you need a structured JSON representation of PDF content.\",\n input: PdfCoPdfToJsonInput,\n output: PdfCoPdfToJsonOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sBAAoCA,IAAAA,EAAE,OAAO;CACxD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;CAC3E,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;CACjF,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CACtG,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,0EAA0E,CAAC,CAAC,SAAS;CACjH,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAC1G,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;CACrG,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACzF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mDAAmD,CAAC,CAAC,SAAS;CAC5F,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,2DAA2D,CAAC,CAAC,SAAS;AAC1G,CAAC,CAAC,CAAC,SAAS,qFAAqF;AACjG,MAAM,sCAAoDA,IAAAA,EAAE,OAAO;CACjE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC9D,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,c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dfCoPdfToJson: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToJson };
|
|
9
|
+
//# sourceMappingURL=pdf-to-json.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-json.d.cts","names":[],"sources":["../../src/actions/pdf-to-json.ts"],"mappings":";;;cAIa,mBAAA,EAAqB,CAAA,CAAE,UAU8D;AAAA,cAgCrF,oBAAA,EAAsB,CAAA,CAAE,UAYoB;AAAA,cAE5C,cAAA,gCAAc,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/pdf-to-json.d.ts
|
|
4
|
+
declare const PdfCoPdfToJsonInput: z.ZodTypeAny;
|
|
5
|
+
declare const PdfCoPdfToJsonOutput: z.ZodTypeAny;
|
|
6
|
+
declare const pdfCoPdfToJson: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToJson };
|
|
9
|
+
//# sourceMappingURL=pdf-to-json.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-json.d.mts","names":[],"sources":["../../src/actions/pdf-to-json.ts"],"mappings":";;;cAIa,mBAAA,EAAqB,CAAA,CAAE,UAU8D;AAAA,cAgCrF,oBAAA,EAAsB,CAAA,CAAE,UAYoB;AAAA,cAE5C,cAAA,gCAAc,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
//#region src/actions/pdf-to-json.ts
|
|
4
|
+
const PdfCoPdfToJsonInput = z.object({
|
|
5
|
+
url: z.string().describe("Link to the PDF file to be converted.").optional(),
|
|
6
|
+
file: z.string().describe("Binary content of the PDF file to convert.").optional(),
|
|
7
|
+
name: z.string().describe("Optional name for the output JSON file (should end with .json).").optional(),
|
|
8
|
+
async: z.boolean().describe("If true, runs the job asynchronously; returns jobId for status checking.").optional(),
|
|
9
|
+
pages: z.string().describe("Comma-separated page indices or ranges to convert (e.g., '1,3-5').").optional(),
|
|
10
|
+
inline: z.boolean().describe("If true, returns JSON data inline; otherwise returns a URL.").optional(),
|
|
11
|
+
password: z.string().describe("Password for protected PDF files, if required.").optional(),
|
|
12
|
+
profiles: z.string().describe("Advanced conversion configuration in JSON format.").optional(),
|
|
13
|
+
searchString: z.string().describe("Optional text to search for in the PDF before conversion.").optional()
|
|
14
|
+
}).describe("Request model for converting PDF documents to JSON. Provide either `url` or `file`.");
|
|
15
|
+
const PdfCoPdfToJson_PDFTextElementSchema = z.object({
|
|
16
|
+
"@x": z.string().describe("X coordinate").nullable().optional(),
|
|
17
|
+
"@y": z.string().describe("Y coordinate").nullable().optional(),
|
|
18
|
+
"#text": z.string().describe("Text content").nullable().optional(),
|
|
19
|
+
"@width": z.string().describe("Width").nullable().optional(),
|
|
20
|
+
"@height": z.string().describe("Height").nullable().optional(),
|
|
21
|
+
"@fontName": z.string().describe("Font name").nullable().optional(),
|
|
22
|
+
"@fontSize": z.string().describe("Font size").nullable().optional(),
|
|
23
|
+
"@fontStyle": z.string().describe("Font style (e.g., Bold, Italic)").nullable().optional()
|
|
24
|
+
}).passthrough().describe("Represents a text element with positioning and formatting.");
|
|
25
|
+
const PdfCoPdfToJson_PDFColumnSchema = z.object({ text: z.union([PdfCoPdfToJson_PDFTextElementSchema, z.array(PdfCoPdfToJson_PDFTextElementSchema)]).nullable().optional() }).passthrough().describe("Represents a column containing text elements.");
|
|
26
|
+
const PdfCoPdfToJson_PDFRowSchema = z.object({ column: z.union([PdfCoPdfToJson_PDFColumnSchema, z.array(PdfCoPdfToJson_PDFColumnSchema)]).nullable().optional() }).passthrough().describe("Represents a row containing columns.");
|
|
27
|
+
const PdfCoPdfToJson_PDFPageSchema = z.object({
|
|
28
|
+
row: z.union([PdfCoPdfToJson_PDFRowSchema, z.array(PdfCoPdfToJson_PDFRowSchema)]).nullable().optional(),
|
|
29
|
+
"@index": z.string().describe("Page index").nullable().optional(),
|
|
30
|
+
"@width": z.string().describe("Page width").nullable().optional(),
|
|
31
|
+
"@height": z.string().describe("Page height").nullable().optional(),
|
|
32
|
+
"@OCRWasPerformed": z.string().describe("Whether OCR was performed").nullable().optional()
|
|
33
|
+
}).passthrough().describe("Represents a page in the PDF document.");
|
|
34
|
+
const PdfCoPdfToJson_PDFDocumentSchema = z.object({
|
|
35
|
+
page: z.union([PdfCoPdfToJson_PDFPageSchema, z.array(PdfCoPdfToJson_PDFPageSchema)]).nullable().optional(),
|
|
36
|
+
"@pageCount": z.string().describe("Total number of pages").nullable().optional(),
|
|
37
|
+
"@pageCountWithOCRPerformed": z.string().describe("Number of pages with OCR").nullable().optional()
|
|
38
|
+
}).passthrough().describe("Represents the PDF document structure.");
|
|
39
|
+
const PdfCoPdfToJson_PDFJsonBodySchema = z.object({ document: PdfCoPdfToJson_PDFDocumentSchema.nullable().optional() }).passthrough().describe("Body structure for inline JSON response.");
|
|
40
|
+
const pdfCoPdfToJson = action("PDF_CO_PDF_TO_JSON", {
|
|
41
|
+
slug: "pdf_co-pdf-to-json",
|
|
42
|
+
name: "Convert PDF to JSON",
|
|
43
|
+
description: "Tool to convert PDF or scanned images to JSON format. Use when you need a structured JSON representation of PDF content.",
|
|
44
|
+
input: PdfCoPdfToJsonInput,
|
|
45
|
+
output: z.object({
|
|
46
|
+
url: z.string().describe("URL to the resulting JSON file (if inline=False).").nullable().optional(),
|
|
47
|
+
body: PdfCoPdfToJson_PDFJsonBodySchema.nullable().optional(),
|
|
48
|
+
name: z.string().describe("Output filename.").nullable().optional(),
|
|
49
|
+
error: z.boolean().describe("True if an error occurred during conversion."),
|
|
50
|
+
status: z.number().int().describe("Status code returned by the API."),
|
|
51
|
+
credits: z.number().int().describe("Credits consumed for this operation.").nullable().optional(),
|
|
52
|
+
message: z.string().describe("Error or status message from the API.").nullable().optional(),
|
|
53
|
+
duration: z.number().int().describe("Operation duration in milliseconds.").nullable().optional(),
|
|
54
|
+
pageCount: z.number().int().describe("Total number of pages in the PDF.").nullable().optional(),
|
|
55
|
+
remainingCredits: z.number().int().describe("Remaining account credits.").nullable().optional(),
|
|
56
|
+
outputLinkValidTill: z.string().describe("Expiration timestamp for the output URL.").nullable().optional()
|
|
57
|
+
}).describe("Response model for PDF to JSON conversion.")
|
|
58
|
+
});
|
|
59
|
+
//#endregion
|
|
60
|
+
export { pdfCoPdfToJson };
|
|
61
|
+
|
|
62
|
+
//# sourceMappingURL=pdf-to-json.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-json.mjs","names":[],"sources":["../../src/actions/pdf-to-json.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToJsonInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Link to the PDF file to be converted.\").optional(),\n file: z.string().describe(\"Binary content of the PDF file to convert.\").optional(),\n name: z.string().describe(\"Optional name for the output JSON file (should end with .json).\").optional(),\n async: z.boolean().describe(\"If true, runs the job asynchronously; returns jobId for status checking.\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to convert (e.g., '1,3-5').\").optional(),\n inline: z.boolean().describe(\"If true, returns JSON data inline; otherwise returns a URL.\").optional(),\n password: z.string().describe(\"Password for protected PDF files, if required.\").optional(),\n profiles: z.string().describe(\"Advanced conversion configuration in JSON format.\").optional(),\n searchString: z.string().describe(\"Optional text to search for in the PDF before conversion.\").optional(),\n}).describe(\"Request model for converting PDF documents to JSON. Provide either `url` or `file`.\");\nconst PdfCoPdfToJson_PDFTextElementSchema: z.ZodTypeAny = z.object({\n \"@x\": z.string().describe(\"X coordinate\").nullable().optional(),\n \"@y\": z.string().describe(\"Y coordinate\").nullable().optional(),\n \"#text\": z.string().describe(\"Text content\").nullable().optional(),\n \"@width\": z.string().describe(\"Width\").nullable().optional(),\n \"@height\": z.string().describe(\"Height\").nullable().optional(),\n \"@fontName\": z.string().describe(\"Font name\").nullable().optional(),\n \"@fontSize\": z.string().describe(\"Font size\").nullable().optional(),\n \"@fontStyle\": z.string().describe(\"Font style (e.g., Bold, Italic)\").nullable().optional(),\n}).passthrough().describe(\"Represents a text element with positioning and formatting.\");\nconst PdfCoPdfToJson_PDFColumnSchema: z.ZodTypeAny = z.object({\n text: z.union([PdfCoPdfToJson_PDFTextElementSchema, z.array(PdfCoPdfToJson_PDFTextElementSchema)]).nullable().optional(),\n}).passthrough().describe(\"Represents a column containing text elements.\");\nconst PdfCoPdfToJson_PDFRowSchema: z.ZodTypeAny = z.object({\n column: z.union([PdfCoPdfToJson_PDFColumnSchema, z.array(PdfCoPdfToJson_PDFColumnSchema)]).nullable().optional(),\n}).passthrough().describe(\"Represents a row containing columns.\");\nconst PdfCoPdfToJson_PDFPageSchema: z.ZodTypeAny = z.object({\n row: z.union([PdfCoPdfToJson_PDFRowSchema, z.array(PdfCoPdfToJson_PDFRowSchema)]).nullable().optional(),\n \"@index\": z.string().describe(\"Page index\").nullable().optional(),\n \"@width\": z.string().describe(\"Page width\").nullable().optional(),\n \"@height\": z.string().describe(\"Page height\").nullable().optional(),\n \"@OCRWasPerformed\": z.string().describe(\"Whether OCR was performed\").nullable().optional(),\n}).passthrough().describe(\"Represents a page in the PDF document.\");\nconst PdfCoPdfToJson_PDFDocumentSchema: z.ZodTypeAny = z.object({\n page: z.union([PdfCoPdfToJson_PDFPageSchema, z.array(PdfCoPdfToJson_PDFPageSchema)]).nullable().optional(),\n \"@pageCount\": z.string().describe(\"Total number of pages\").nullable().optional(),\n \"@pageCountWithOCRPerformed\": z.string().describe(\"Number of pages with OCR\").nullable().optional(),\n}).passthrough().describe(\"Represents the PDF document structure.\");\nconst PdfCoPdfToJson_PDFJsonBodySchema: z.ZodTypeAny = z.object({\n document: PdfCoPdfToJson_PDFDocumentSchema.nullable().optional(),\n}).passthrough().describe(\"Body structure for inline JSON response.\");\nexport const PdfCoPdfToJsonOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting JSON file (if inline=False).\").nullable().optional(),\n body: PdfCoPdfToJson_PDFJsonBodySchema.nullable().optional(),\n name: z.string().describe(\"Output filename.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred during conversion.\"),\n status: z.number().int().describe(\"Status code returned by the API.\"),\n credits: z.number().int().describe(\"Credits consumed for this operation.\").nullable().optional(),\n message: z.string().describe(\"Error or status message from the API.\").nullable().optional(),\n duration: z.number().int().describe(\"Operation duration in milliseconds.\").nullable().optional(),\n pageCount: z.number().int().describe(\"Total number of pages in the PDF.\").nullable().optional(),\n remainingCredits: z.number().int().describe(\"Remaining account credits.\").nullable().optional(),\n outputLinkValidTill: z.string().describe(\"Expiration timestamp for the output URL.\").nullable().optional(),\n}).describe(\"Response model for PDF to JSON conversion.\");\n\nexport const pdfCoPdfToJson = action(\"PDF_CO_PDF_TO_JSON\", {\n slug: \"pdf_co-pdf-to-json\",\n name: \"Convert PDF to JSON\",\n description: \"Tool to convert PDF or scanned images to JSON format. Use when you need a structured JSON representation of PDF content.\",\n input: PdfCoPdfToJsonInput,\n output: PdfCoPdfToJsonOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sBAAoC,EAAE,OAAO;CACxD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS;CAC3E,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,4CAA4C,CAAC,CAAC,SAAS;CACjF,MAAM,EAAE,OAAO,CA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OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAC3G,CAAC,CAAC,CAAC,SAAS,4CAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/pdf-to-text.ts
|
|
4
|
+
const PdfCoPdfToTextInput = zod.z.object({
|
|
5
|
+
url: zod.z.string().describe("URL to the source PDF or image file. Must be a publicly accessible HTTP/HTTPS URL (without authentication) or a file previously uploaded to PDF.co storage. Local file paths (file:// URLs) are not supported - use the PDF_CO_FILE_UPLOAD action first to upload local files to PDF.co, then use the returned URL here."),
|
|
6
|
+
lang: zod.z.string().default("eng").describe("OCR language(s) code, e.g. 'eng', or 'eng+deu'.").optional(),
|
|
7
|
+
name: zod.z.string().describe("Desired name for the output file (e.g. 'result.txt').").optional(),
|
|
8
|
+
rect: zod.z.string().describe("Extraction rectangle in format '{x} {y} {width} {height}'.").optional(),
|
|
9
|
+
pages: zod.z.string().describe("Comma-separated page indices or ranges to process (e.g. '0,2-4').").optional(),
|
|
10
|
+
inline: zod.z.boolean().default(false).describe("Return text inline in response instead of URL.").optional(),
|
|
11
|
+
unwrap: zod.z.boolean().default(false).describe("Unwrap lines into a single line within table cells (only when lineGrouping='1').").optional(),
|
|
12
|
+
callback: zod.z.string().describe("Webhook URL to receive callback when async=true.").optional(),
|
|
13
|
+
password: zod.z.string().describe("Password for protected PDF files.").optional(),
|
|
14
|
+
run_async: zod.z.boolean().default(false).describe("Run process asynchronously; returns jobId if true.").optional(),
|
|
15
|
+
expiration: zod.z.number().int().default(60).describe("Expiration time in minutes for the output file link.").optional(),
|
|
16
|
+
httppassword: zod.z.string().describe("HTTP auth password for source URL.").optional(),
|
|
17
|
+
httpusername: zod.z.string().describe("HTTP auth username for source URL.").optional(),
|
|
18
|
+
lineGrouping: zod.z.string().describe("Line grouping mode: '1', '2', or '3'.").optional()
|
|
19
|
+
}).describe("Request model for converting PDF documents or scanned images to plain text.");
|
|
20
|
+
const PdfCoPdfToTextOutput = zod.z.object({
|
|
21
|
+
url: zod.z.string().describe("URL to the resulting text file (present if inline=false).").nullable().optional(),
|
|
22
|
+
body: zod.z.string().describe("Extracted text (present if inline=true).").nullable().optional(),
|
|
23
|
+
name: zod.z.string().describe("Name of the generated file.").nullable().optional(),
|
|
24
|
+
error: zod.z.boolean().describe("True if an error occurred.").nullable().optional(),
|
|
25
|
+
status: zod.z.union([zod.z.number().int(), zod.z.string()]).nullable().optional(),
|
|
26
|
+
credits: zod.z.number().int().describe("API credits consumed by this call.").nullable().optional(),
|
|
27
|
+
message: zod.z.string().describe("Error or status message from the API.").nullable().optional(),
|
|
28
|
+
pageCount: zod.z.number().int().describe("Number of pages processed.").nullable().optional(),
|
|
29
|
+
remainingCredits: zod.z.number().int().describe("Remaining API credits after the call.").nullable().optional()
|
|
30
|
+
}).passthrough().describe("Response model for PDF to text conversion.");
|
|
31
|
+
const pdfCoPdfToText = require_action.action("PDF_CO_PDF_TO_TEXT", {
|
|
32
|
+
slug: "pdf_co-pdf-to-text",
|
|
33
|
+
name: "Convert PDF to Text",
|
|
34
|
+
description: "Tool to convert PDF or scanned images to plain text. Use when you need raw text output preserving layout.",
|
|
35
|
+
input: PdfCoPdfToTextInput,
|
|
36
|
+
output: PdfCoPdfToTextOutput
|
|
37
|
+
});
|
|
38
|
+
//#endregion
|
|
39
|
+
exports.pdfCoPdfToText = pdfCoPdfToText;
|
|
40
|
+
|
|
41
|
+
//# sourceMappingURL=pdf-to-text.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-text.cjs","names":["z","action"],"sources":["../../src/actions/pdf-to-text.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToTextInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the source PDF or image file. Must be a publicly accessible HTTP/HTTPS URL (without authentication) or a file previously uploaded to PDF.co storage. Local file paths (file:// URLs) are not supported - use the PDF_CO_FILE_UPLOAD action first to upload local files to PDF.co, then use the returned URL here.\"),\n lang: z.string().default(\"eng\").describe(\"OCR language(s) code, e.g. 'eng', or 'eng+deu'.\").optional(),\n name: z.string().describe(\"Desired name for the output file (e.g. 'result.txt').\").optional(),\n rect: z.string().describe(\"Extraction rectangle in format '{x} {y} {width} {height}'.\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to process (e.g. '0,2-4').\").optional(),\n inline: z.boolean().default(false).describe(\"Return text inline in response instead of URL.\").optional(),\n unwrap: z.boolean().default(false).describe(\"Unwrap lines into a single line within table cells (only when lineGrouping='1').\").optional(),\n callback: z.string().describe(\"Webhook URL to receive callback when async=true.\").optional(),\n password: z.string().describe(\"Password for protected PDF files.\").optional(),\n run_async: z.boolean().default(false).describe(\"Run process asynchronously; returns jobId if true.\").optional(),\n expiration: z.number().int().default(60).describe(\"Expiration time in minutes for the output file link.\").optional(),\n httppassword: z.string().describe(\"HTTP auth password for source URL.\").optional(),\n httpusername: z.string().describe(\"HTTP auth username for source URL.\").optional(),\n lineGrouping: z.string().describe(\"Line grouping mode: '1', '2', or '3'.\").optional(),\n}).describe(\"Request model for converting PDF documents or scanned images to plain text.\");\nexport const PdfCoPdfToTextOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting text file (present if inline=false).\").nullable().optional(),\n body: z.string().describe(\"Extracted text (present if inline=true).\").nullable().optional(),\n name: z.string().describe(\"Name of the generated file.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred.\").nullable().optional(),\n status: z.union([z.number().int(), z.string()]).nullable().optional(),\n credits: z.number().int().describe(\"API credits consumed by this call.\").nullable().optional(),\n message: z.string().describe(\"Error or status message from the API.\").nullable().optional(),\n pageCount: z.number().int().describe(\"Number of pages processed.\").nullable().optional(),\n remainingCredits: z.number().int().describe(\"Remaining API credits after the call.\").nullable().optional(),\n}).passthrough().describe(\"Response model for PDF to text conversion.\");\n\nexport const pdfCoPdfToText = action(\"PDF_CO_PDF_TO_TEXT\", {\n slug: \"pdf_co-pdf-to-text\",\n name: \"Convert PDF to Text\",\n description: \"Tool to convert PDF or scanned images to plain text. Use when you need raw text output preserving layout.\",\n input: PdfCoPdfToTextInput,\n output: PdfCoPdfToTextOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sBAAoCA,IAAAA,EAAE,OAAO;CACxD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,0TAA0T;CACnV,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;CACrG,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;CAC5F,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CACjG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;CACzG,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACvG,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;CACzI,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;CAC3F,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;CAC5E,WAAWA,IAAAA,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;CAC9G,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC,SAA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CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;AAC3G,CAAC,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,4CAA4C;AAEtE,MAAa,iBAAiBC,eAAAA,OAAO,sBAAsB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAAO;CACP,QAAQ;AACV,CAAC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/pdf-to-text.d.ts
|
|
4
|
+
declare const PdfCoPdfToTextInput: z.ZodTypeAny;
|
|
5
|
+
declare const PdfCoPdfToTextOutput: z.ZodTypeAny;
|
|
6
|
+
declare const pdfCoPdfToText: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToText };
|
|
9
|
+
//# sourceMappingURL=pdf-to-text.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-text.d.cts","names":[],"sources":["../../src/actions/pdf-to-text.ts"],"mappings":";;;cAIa,mBAAA,EAAqB,CAAA,CAAE,UAesD;AAAA,cAC7E,oBAAA,EAAsB,CAAA,CAAE,UAUkC;AAAA,cAE1D,cAAA,gCAAc,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/pdf-to-text.d.ts
|
|
4
|
+
declare const PdfCoPdfToTextInput: z.ZodTypeAny;
|
|
5
|
+
declare const PdfCoPdfToTextOutput: z.ZodTypeAny;
|
|
6
|
+
declare const pdfCoPdfToText: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToText };
|
|
9
|
+
//# sourceMappingURL=pdf-to-text.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-text.d.mts","names":[],"sources":["../../src/actions/pdf-to-text.ts"],"mappings":";;;cAIa,mBAAA,EAAqB,CAAA,CAAE,UAesD;AAAA,cAC7E,oBAAA,EAAsB,CAAA,CAAE,UAUkC;AAAA,cAE1D,cAAA,gCAAc,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const pdfCoPdfToText = action("PDF_CO_PDF_TO_TEXT", {
|
|
4
|
+
slug: "pdf_co-pdf-to-text",
|
|
5
|
+
name: "Convert PDF to Text",
|
|
6
|
+
description: "Tool to convert PDF or scanned images to plain text. Use when you need raw text output preserving layout.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
url: z.string().describe("URL to the source PDF or image file. Must be a publicly accessible HTTP/HTTPS URL (without authentication) or a file previously uploaded to PDF.co storage. Local file paths (file:// URLs) are not supported - use the PDF_CO_FILE_UPLOAD action first to upload local files to PDF.co, then use the returned URL here."),
|
|
9
|
+
lang: z.string().default("eng").describe("OCR language(s) code, e.g. 'eng', or 'eng+deu'.").optional(),
|
|
10
|
+
name: z.string().describe("Desired name for the output file (e.g. 'result.txt').").optional(),
|
|
11
|
+
rect: z.string().describe("Extraction rectangle in format '{x} {y} {width} {height}'.").optional(),
|
|
12
|
+
pages: z.string().describe("Comma-separated page indices or ranges to process (e.g. '0,2-4').").optional(),
|
|
13
|
+
inline: z.boolean().default(false).describe("Return text inline in response instead of URL.").optional(),
|
|
14
|
+
unwrap: z.boolean().default(false).describe("Unwrap lines into a single line within table cells (only when lineGrouping='1').").optional(),
|
|
15
|
+
callback: z.string().describe("Webhook URL to receive callback when async=true.").optional(),
|
|
16
|
+
password: z.string().describe("Password for protected PDF files.").optional(),
|
|
17
|
+
run_async: z.boolean().default(false).describe("Run process asynchronously; returns jobId if true.").optional(),
|
|
18
|
+
expiration: z.number().int().default(60).describe("Expiration time in minutes for the output file link.").optional(),
|
|
19
|
+
httppassword: z.string().describe("HTTP auth password for source URL.").optional(),
|
|
20
|
+
httpusername: z.string().describe("HTTP auth username for source URL.").optional(),
|
|
21
|
+
lineGrouping: z.string().describe("Line grouping mode: '1', '2', or '3'.").optional()
|
|
22
|
+
}).describe("Request model for converting PDF documents or scanned images to plain text."),
|
|
23
|
+
output: z.object({
|
|
24
|
+
url: z.string().describe("URL to the resulting text file (present if inline=false).").nullable().optional(),
|
|
25
|
+
body: z.string().describe("Extracted text (present if inline=true).").nullable().optional(),
|
|
26
|
+
name: z.string().describe("Name of the generated file.").nullable().optional(),
|
|
27
|
+
error: z.boolean().describe("True if an error occurred.").nullable().optional(),
|
|
28
|
+
status: z.union([z.number().int(), z.string()]).nullable().optional(),
|
|
29
|
+
credits: z.number().int().describe("API credits consumed by this call.").nullable().optional(),
|
|
30
|
+
message: z.string().describe("Error or status message from the API.").nullable().optional(),
|
|
31
|
+
pageCount: z.number().int().describe("Number of pages processed.").nullable().optional(),
|
|
32
|
+
remainingCredits: z.number().int().describe("Remaining API credits after the call.").nullable().optional()
|
|
33
|
+
}).passthrough().describe("Response model for PDF to text conversion.")
|
|
34
|
+
});
|
|
35
|
+
//#endregion
|
|
36
|
+
export { pdfCoPdfToText };
|
|
37
|
+
|
|
38
|
+
//# sourceMappingURL=pdf-to-text.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-text.mjs","names":[],"sources":["../../src/actions/pdf-to-text.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToTextInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the source PDF or image file. Must be a publicly accessible HTTP/HTTPS URL (without authentication) or a file previously uploaded to PDF.co storage. Local file paths (file:// URLs) are not supported - use the PDF_CO_FILE_UPLOAD action first to upload local files to PDF.co, then use the returned URL here.\"),\n lang: z.string().default(\"eng\").describe(\"OCR language(s) code, e.g. 'eng', or 'eng+deu'.\").optional(),\n name: z.string().describe(\"Desired name for the output file (e.g. 'result.txt').\").optional(),\n rect: z.string().describe(\"Extraction rectangle in format '{x} {y} {width} {height}'.\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to process (e.g. '0,2-4').\").optional(),\n inline: z.boolean().default(false).describe(\"Return text inline in response instead of URL.\").optional(),\n unwrap: z.boolean().default(false).describe(\"Unwrap lines into a single line within table cells (only when lineGrouping='1').\").optional(),\n callback: z.string().describe(\"Webhook URL to receive callback when async=true.\").optional(),\n password: z.string().describe(\"Password for protected PDF files.\").optional(),\n run_async: z.boolean().default(false).describe(\"Run process asynchronously; returns jobId if true.\").optional(),\n expiration: z.number().int().default(60).describe(\"Expiration time in minutes for the output file link.\").optional(),\n httppassword: z.string().describe(\"HTTP auth password for source URL.\").optional(),\n httpusername: z.string().describe(\"HTTP auth username for source URL.\").optional(),\n lineGrouping: z.string().describe(\"Line grouping mode: '1', '2', or '3'.\").optional(),\n}).describe(\"Request model for converting PDF documents or scanned images to plain text.\");\nexport const PdfCoPdfToTextOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting text file (present if inline=false).\").nullable().optional(),\n body: z.string().describe(\"Extracted text (present if inline=true).\").nullable().optional(),\n name: z.string().describe(\"Name of the generated file.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred.\").nullable().optional(),\n status: z.union([z.number().int(), z.string()]).nullable().optional(),\n credits: z.number().int().describe(\"API credits consumed by this call.\").nullable().optional(),\n message: z.string().describe(\"Error or status message from the API.\").nullable().optional(),\n pageCount: z.number().int().describe(\"Number of pages processed.\").nullable().optional(),\n remainingCredits: z.number().int().describe(\"Remaining API credits after the call.\").nullable().optional(),\n}).passthrough().describe(\"Response model for PDF to text conversion.\");\n\nexport const pdfCoPdfToText = action(\"PDF_CO_PDF_TO_TEXT\", {\n slug: \"pdf_co-pdf-to-text\",\n name: \"Convert PDF to Text\",\n description: \"Tool to convert PDF or scanned images to plain text. Use when you need raw text output preserving layout.\",\n input: PdfCoPdfToTextInput,\n output: PdfCoPdfToTextOutput,\n});\n"],"mappings":";;AAgCA,MAAa,iBAAiB,OAAO,sBAAsB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OAhC+C,EAAE,OAAO;EACxD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,0TAA0T;EACnV,MAAM,EAAE,OAAO,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,iDAAiD,CAAC,CAAC,SAAS;EACrG,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,uDAAuD,CAAC,CAAC,SAAS;EAC5F,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;EACjG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,mEAAmE,CAAC,CAAC,SAAS;EACzG,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EACvG,QAAQ,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,kFAAkF,CAAC,CAAC,SAAS;EACzI,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,kDAAkD,CAAC,CAAC,SAAS;EAC3F,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,mCAAmC,CAAC,CAAC,SAAS;EAC5E,WAAW,EAAE,QAAQ,CAAC,CAAC,QAAQ,KAAK,CAAC,CAAC,SAAS,oDAAoD,CAAC,CAAC,SAAS;EAC9G,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ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YAAY,CAAC,CAAC,SAAS,4CAOhB;AACV,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/pdf-to-xls.ts
|
|
4
|
+
const PdfCoPdfToXlsInput = zod.z.object({
|
|
5
|
+
url: zod.z.string().describe("Link to the PDF file to be converted."),
|
|
6
|
+
name: zod.z.string().describe("Optional name for the output XLS file (must end with .xls).").optional(),
|
|
7
|
+
pages: zod.z.string().describe("Comma-separated page indices or ranges to convert (e.g., '1,3-5').").optional(),
|
|
8
|
+
password: zod.z.string().describe("Password for protected PDF files, if required.").optional(),
|
|
9
|
+
profiles: zod.z.string().describe("Advanced conversion settings in JSON format.").optional(),
|
|
10
|
+
run_async: zod.z.boolean().describe("Run job asynchronously; returns jobId for status checking.").optional()
|
|
11
|
+
}).describe("Request model for converting PDF documents to XLS format.");
|
|
12
|
+
const PdfCoPdfToXlsOutput = zod.z.object({
|
|
13
|
+
url: zod.z.string().describe("URL to the resulting XLS file.").nullable().optional(),
|
|
14
|
+
error: zod.z.boolean().describe("True if an error occurred during conversion."),
|
|
15
|
+
status: zod.z.number().int().describe("HTTP status code returned by the API."),
|
|
16
|
+
message: zod.z.string().describe("Error or informational message from the API.").nullable().optional(),
|
|
17
|
+
remaining: zod.z.number().int().describe("Number of remaining credits after the call.").nullable().optional(),
|
|
18
|
+
expiration: zod.z.string().describe("Expiration date/time of the result file.").nullable().optional()
|
|
19
|
+
}).describe("Response model for PDF to XLS conversion.");
|
|
20
|
+
const pdfCoPdfToXls = require_action.action("PDF_CO_PDF_TO_XLS", {
|
|
21
|
+
slug: "pdf_co-pdf-to-xls",
|
|
22
|
+
name: "Convert PDF to XLS",
|
|
23
|
+
description: "Tool to convert PDF or scanned images to XLS format. Use when you need to extract tabular data into an Excel spreadsheet.",
|
|
24
|
+
input: PdfCoPdfToXlsInput,
|
|
25
|
+
output: PdfCoPdfToXlsOutput
|
|
26
|
+
});
|
|
27
|
+
//#endregion
|
|
28
|
+
exports.pdfCoPdfToXls = pdfCoPdfToXls;
|
|
29
|
+
|
|
30
|
+
//# sourceMappingURL=pdf-to-xls.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xls.cjs","names":["z","action"],"sources":["../../src/actions/pdf-to-xls.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToXlsInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Link to the PDF file to be converted.\"),\n name: z.string().describe(\"Optional name for the output XLS file (must end with .xls).\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to convert (e.g., '1,3-5').\").optional(),\n password: z.string().describe(\"Password for protected PDF files, if required.\").optional(),\n profiles: z.string().describe(\"Advanced conversion settings in JSON format.\").optional(),\n run_async: z.boolean().describe(\"Run job asynchronously; returns jobId for status checking.\").optional(),\n}).describe(\"Request model for converting PDF documents to XLS format.\");\nexport const PdfCoPdfToXlsOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting XLS file.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred during conversion.\"),\n status: z.number().int().describe(\"HTTP status code returned by the API.\"),\n message: z.string().describe(\"Error or informational message from the API.\").nullable().optional(),\n remaining: z.number().int().describe(\"Number of remaining credits after the call.\").nullable().optional(),\n expiration: z.string().describe(\"Expiration date/time of the result file.\").nullable().optional(),\n}).describe(\"Response model for PDF to XLS conversion.\");\n\nexport const pdfCoPdfToXls = action(\"PDF_CO_PDF_TO_XLS\", {\n slug: \"pdf_co-pdf-to-xls\",\n name: \"Convert PDF to XLS\",\n description: \"Tool to convert PDF or scanned images to XLS format. Use when you need to extract tabular data into an Excel spreadsheet.\",\n input: PdfCoPdfToXlsInput,\n output: PdfCoPdfToXlsOutput,\n});\n"],"mappings":";;;AAIA,MAAa,qBAAmCA,IAAAA,EAAE,OAAO;CACvD,KAAKA,IA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
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/pdf-to-xls.d.ts
|
|
4
|
+
declare const PdfCoPdfToXlsInput: z.ZodTypeAny;
|
|
5
|
+
declare const PdfCoPdfToXlsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const pdfCoPdfToXls: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToXls };
|
|
9
|
+
//# sourceMappingURL=pdf-to-xls.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xls.d.cts","names":[],"sources":["../../src/actions/pdf-to-xls.ts"],"mappings":";;;cAIa,kBAAA,EAAoB,CAAA,CAAE,UAOqC;AAAA,cAC3D,mBAAA,EAAqB,CAAA,CAAE,UAOoB;AAAA,cAE3C,aAAA,gCAAa,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/pdf-to-xls.d.ts
|
|
4
|
+
declare const PdfCoPdfToXlsInput: z.ZodTypeAny;
|
|
5
|
+
declare const PdfCoPdfToXlsOutput: z.ZodTypeAny;
|
|
6
|
+
declare const pdfCoPdfToXls: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToXls };
|
|
9
|
+
//# sourceMappingURL=pdf-to-xls.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xls.d.mts","names":[],"sources":["../../src/actions/pdf-to-xls.ts"],"mappings":";;;cAIa,kBAAA,EAAoB,CAAA,CAAE,UAOqC;AAAA,cAC3D,mBAAA,EAAqB,CAAA,CAAE,UAOoB;AAAA,cAE3C,aAAA,gCAAa,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const pdfCoPdfToXls = action("PDF_CO_PDF_TO_XLS", {
|
|
4
|
+
slug: "pdf_co-pdf-to-xls",
|
|
5
|
+
name: "Convert PDF to XLS",
|
|
6
|
+
description: "Tool to convert PDF or scanned images to XLS format. Use when you need to extract tabular data into an Excel spreadsheet.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
url: z.string().describe("Link to the PDF file to be converted."),
|
|
9
|
+
name: z.string().describe("Optional name for the output XLS file (must end with .xls).").optional(),
|
|
10
|
+
pages: z.string().describe("Comma-separated page indices or ranges to convert (e.g., '1,3-5').").optional(),
|
|
11
|
+
password: z.string().describe("Password for protected PDF files, if required.").optional(),
|
|
12
|
+
profiles: z.string().describe("Advanced conversion settings in JSON format.").optional(),
|
|
13
|
+
run_async: z.boolean().describe("Run job asynchronously; returns jobId for status checking.").optional()
|
|
14
|
+
}).describe("Request model for converting PDF documents to XLS format."),
|
|
15
|
+
output: z.object({
|
|
16
|
+
url: z.string().describe("URL to the resulting XLS file.").nullable().optional(),
|
|
17
|
+
error: z.boolean().describe("True if an error occurred during conversion."),
|
|
18
|
+
status: z.number().int().describe("HTTP status code returned by the API."),
|
|
19
|
+
message: z.string().describe("Error or informational message from the API.").nullable().optional(),
|
|
20
|
+
remaining: z.number().int().describe("Number of remaining credits after the call.").nullable().optional(),
|
|
21
|
+
expiration: z.string().describe("Expiration date/time of the result file.").nullable().optional()
|
|
22
|
+
}).describe("Response model for PDF to XLS conversion.")
|
|
23
|
+
});
|
|
24
|
+
//#endregion
|
|
25
|
+
export { pdfCoPdfToXls };
|
|
26
|
+
|
|
27
|
+
//# sourceMappingURL=pdf-to-xls.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xls.mjs","names":[],"sources":["../../src/actions/pdf-to-xls.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToXlsInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Link to the PDF file to be converted.\"),\n name: z.string().describe(\"Optional name for the output XLS file (must end with .xls).\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to convert (e.g., '1,3-5').\").optional(),\n password: z.string().describe(\"Password for protected PDF files, if required.\").optional(),\n profiles: z.string().describe(\"Advanced conversion settings in JSON format.\").optional(),\n run_async: z.boolean().describe(\"Run job asynchronously; returns jobId for status checking.\").optional(),\n}).describe(\"Request model for converting PDF documents to XLS format.\");\nexport const PdfCoPdfToXlsOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting XLS file.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred during conversion.\"),\n status: z.number().int().describe(\"HTTP status code returned by the API.\"),\n message: z.string().describe(\"Error or informational message from the API.\").nullable().optional(),\n remaining: z.number().int().describe(\"Number of remaining credits after the call.\").nullable().optional(),\n expiration: z.string().describe(\"Expiration date/time of the result file.\").nullable().optional(),\n}).describe(\"Response model for PDF to XLS conversion.\");\n\nexport const pdfCoPdfToXls = action(\"PDF_CO_PDF_TO_XLS\", {\n slug: \"pdf_co-pdf-to-xls\",\n name: \"Convert PDF to XLS\",\n description: \"Tool to convert PDF or scanned images to XLS format. Use when you need to extract tabular data into an Excel spreadsheet.\",\n input: PdfCoPdfToXlsInput,\n output: PdfCoPdfToXlsOutput,\n});\n"],"mappings":";;AAqBA,MAAa,gBAAgB,OAAO,qBAAqB;CACvD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OArB8C,EAAE,OAAO;EACvD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;EAChE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,6DAA6D,CAAC,CAAC,SAAS;EAClG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;EAC1G,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EACzF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;EACvF,WAAW,EAAE,QAAQ,CAAC,CAAC,SAAS,4DAA4D,CAAC,CAAC,SAAS;CACzG,CAAC,CAAC,CAAC,SAAS,2DAcH;CACP,QAd+C,EAAE,OAAO;EACxD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,gCAAgC,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EAC/E,OAAO,EAAE,QAAQ,CAAC,CAAC,SAAS,8CAA8C;EAC1E,QAAQ,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,uCAAuC;EACzE,SAAS,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACjG,WAAW,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,6CAA6C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;EACxG,YAAY,EAAE,OAAO,CAAC,CAAC,SAAS,0CAA0C,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS;CAClG,CAAC,CAAC,CAAC,SAAS,2CAOF;AACV,CAAC"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
const require_action = require("../action.cjs");
|
|
2
|
+
let zod = require("zod");
|
|
3
|
+
//#region src/actions/pdf-to-xlsx.ts
|
|
4
|
+
const PdfCoPdfToXlsxInput = zod.z.object({
|
|
5
|
+
url: zod.z.string().describe("Link to the PDF file to be converted."),
|
|
6
|
+
name: zod.z.string().describe("Optional name for the output XLSX file (must end with .xlsx).").optional(),
|
|
7
|
+
async: zod.z.boolean().describe("Run job asynchronously; returns processId for status checking.").optional(),
|
|
8
|
+
pages: zod.z.string().describe("Comma-separated page indices or ranges to convert (e.g., '1,3-5').").optional(),
|
|
9
|
+
inline: zod.z.boolean().describe("If true, returns XLSX data inline; otherwise returns a URL to the XLSX.").optional(),
|
|
10
|
+
encrypt: zod.z.boolean().describe("If true, encrypts the output XLSX file.").optional(),
|
|
11
|
+
password: zod.z.string().describe("Password for protected PDF files, if required.").optional(),
|
|
12
|
+
profiles: zod.z.string().describe("Advanced conversion settings in JSON format.").optional(),
|
|
13
|
+
expiration: zod.z.number().int().describe("Expiration time for the output link in minutes (default is 60).").optional(),
|
|
14
|
+
optimization: zod.z.string().describe("Optimization mode, e.g., 'ocr'.").optional(),
|
|
15
|
+
columns0Based: zod.z.boolean().describe("Set to true if column indices in profiles are zero-based.").optional()
|
|
16
|
+
}).describe("Request model for converting PDF documents to XLSX.");
|
|
17
|
+
const PdfCoPdfToXlsxOutput = zod.z.object({
|
|
18
|
+
url: zod.z.string().describe("URL to the resulting XLSX file.").nullable().optional(),
|
|
19
|
+
error: zod.z.boolean().describe("True if an error occurred during conversion."),
|
|
20
|
+
inline: zod.z.string().describe("Base64-encoded XLSX data if inline was requested.").nullable().optional(),
|
|
21
|
+
status: zod.z.number().int().describe("Status code returned by the API."),
|
|
22
|
+
message: zod.z.string().describe("Error or informational message from the API.").nullable().optional(),
|
|
23
|
+
pageCount: zod.z.number().int().describe("Number of pages processed.").nullable().optional(),
|
|
24
|
+
processId: zod.z.string().describe("ID of the async process (if async was requested).").nullable().optional(),
|
|
25
|
+
remaining: zod.z.number().int().describe("Number of remaining credits after the call.").nullable().optional()
|
|
26
|
+
}).describe("Response model for PDF to XLSX conversion.");
|
|
27
|
+
const pdfCoPdfToXlsx = require_action.action("PDF_CO_PDF_TO_XLSX", {
|
|
28
|
+
slug: "pdf_co-pdf-to-xlsx",
|
|
29
|
+
name: "Convert PDF to XLSX",
|
|
30
|
+
description: "Tool to convert PDF or scanned images to XLSX (Excel) format. Use when you need structured spreadsheet output from a PDF.",
|
|
31
|
+
input: PdfCoPdfToXlsxInput,
|
|
32
|
+
output: PdfCoPdfToXlsxOutput
|
|
33
|
+
});
|
|
34
|
+
//#endregion
|
|
35
|
+
exports.pdfCoPdfToXlsx = pdfCoPdfToXlsx;
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=pdf-to-xlsx.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xlsx.cjs","names":["z","action"],"sources":["../../src/actions/pdf-to-xlsx.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToXlsxInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Link to the PDF file to be converted.\"),\n name: z.string().describe(\"Optional name for the output XLSX file (must end with .xlsx).\").optional(),\n async: z.boolean().describe(\"Run job asynchronously; returns processId for status checking.\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to convert (e.g., '1,3-5').\").optional(),\n inline: z.boolean().describe(\"If true, returns XLSX data inline; otherwise returns a URL to the XLSX.\").optional(),\n encrypt: z.boolean().describe(\"If true, encrypts the output XLSX file.\").optional(),\n password: z.string().describe(\"Password for protected PDF files, if required.\").optional(),\n profiles: z.string().describe(\"Advanced conversion settings in JSON format.\").optional(),\n expiration: z.number().int().describe(\"Expiration time for the output link in minutes (default is 60).\").optional(),\n optimization: z.string().describe(\"Optimization mode, e.g., 'ocr'.\").optional(),\n columns0Based: z.boolean().describe(\"Set to true if column indices in profiles are zero-based.\").optional(),\n}).describe(\"Request model for converting PDF documents to XLSX.\");\nexport const PdfCoPdfToXlsxOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting XLSX file.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred during conversion.\"),\n inline: z.string().describe(\"Base64-encoded XLSX data if inline was requested.\").nullable().optional(),\n status: z.number().int().describe(\"Status code returned by the API.\"),\n message: z.string().describe(\"Error or informational message from the API.\").nullable().optional(),\n pageCount: z.number().int().describe(\"Number of pages processed.\").nullable().optional(),\n processId: z.string().describe(\"ID of the async process (if async was requested).\").nullable().optional(),\n remaining: z.number().int().describe(\"Number of remaining credits after the call.\").nullable().optional(),\n}).describe(\"Response model for PDF to XLSX conversion.\");\n\nexport const pdfCoPdfToXlsx = action(\"PDF_CO_PDF_TO_XLSX\", {\n slug: \"pdf_co-pdf-to-xlsx\",\n name: \"Convert PDF to XLSX\",\n description: \"Tool to convert PDF or scanned images to XLSX (Excel) format. Use when you need structured spreadsheet output from a PDF.\",\n input: PdfCoPdfToXlsxInput,\n output: PdfCoPdfToXlsxOutput,\n});\n"],"mappings":";;;AAIA,MAAa,sBAAoCA,IAAAA,EAAE,OAAO;CACxD,KAAKA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;CAChE,MAAMA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;CACpG,OAAOA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;CACvG,OAAOA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;CAC1G,QAAQA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS;CACjH,SAASA,IAAAA,EAAE,QAAQ,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;CAClF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;CACzF,UAAUA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;CACvF,YAAYA,IAAAA,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,iEAAiE,CAAC,CAAC,SAAS;CAClH,cAAcA,IAAAA,EAAE,OAAO,CAAC,CAAC,SAAS,iCAAiC,CAAC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+
declare const PdfCoPdfToXlsxOutput: z.ZodTypeAny;
|
|
6
|
+
declare const pdfCoPdfToXlsx: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToXlsx };
|
|
9
|
+
//# sourceMappingURL=pdf-to-xlsx.d.cts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xlsx.d.cts","names":[],"sources":["../../src/actions/pdf-to-xlsx.ts"],"mappings":";;;cAIa,mBAAA,EAAqB,CAAA,CAAE,UAY8B;AAAA,cACrD,oBAAA,EAAsB,CAAA,CAAE,UASoB;AAAA,cAE5C,cAAA,gCAAc,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region src/actions/pdf-to-xlsx.d.ts
|
|
4
|
+
declare const PdfCoPdfToXlsxInput: z.ZodTypeAny;
|
|
5
|
+
declare const PdfCoPdfToXlsxOutput: z.ZodTypeAny;
|
|
6
|
+
declare const pdfCoPdfToXlsx: import("@keystrokehq/action").WorkflowActionDefinition<unknown, unknown, import("@keystrokehq/shared").ResolvedCredentials<readonly [import("@keystrokehq/shared").Credential]>, readonly [import("@keystrokehq/shared").Credential]>;
|
|
7
|
+
//#endregion
|
|
8
|
+
export { pdfCoPdfToXlsx };
|
|
9
|
+
//# sourceMappingURL=pdf-to-xlsx.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xlsx.d.mts","names":[],"sources":["../../src/actions/pdf-to-xlsx.ts"],"mappings":";;;cAIa,mBAAA,EAAqB,CAAA,CAAE,UAY8B;AAAA,cACrD,oBAAA,EAAsB,CAAA,CAAE,UASoB;AAAA,cAE5C,cAAA,gCAAc,wBAAA,iDAAA,mBAAA,yCAAA,UAAA,4CAAA,UAAA"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { action } from "../action.mjs";
|
|
2
|
+
import { z } from "zod";
|
|
3
|
+
const pdfCoPdfToXlsx = action("PDF_CO_PDF_TO_XLSX", {
|
|
4
|
+
slug: "pdf_co-pdf-to-xlsx",
|
|
5
|
+
name: "Convert PDF to XLSX",
|
|
6
|
+
description: "Tool to convert PDF or scanned images to XLSX (Excel) format. Use when you need structured spreadsheet output from a PDF.",
|
|
7
|
+
input: z.object({
|
|
8
|
+
url: z.string().describe("Link to the PDF file to be converted."),
|
|
9
|
+
name: z.string().describe("Optional name for the output XLSX file (must end with .xlsx).").optional(),
|
|
10
|
+
async: z.boolean().describe("Run job asynchronously; returns processId for status checking.").optional(),
|
|
11
|
+
pages: z.string().describe("Comma-separated page indices or ranges to convert (e.g., '1,3-5').").optional(),
|
|
12
|
+
inline: z.boolean().describe("If true, returns XLSX data inline; otherwise returns a URL to the XLSX.").optional(),
|
|
13
|
+
encrypt: z.boolean().describe("If true, encrypts the output XLSX file.").optional(),
|
|
14
|
+
password: z.string().describe("Password for protected PDF files, if required.").optional(),
|
|
15
|
+
profiles: z.string().describe("Advanced conversion settings in JSON format.").optional(),
|
|
16
|
+
expiration: z.number().int().describe("Expiration time for the output link in minutes (default is 60).").optional(),
|
|
17
|
+
optimization: z.string().describe("Optimization mode, e.g., 'ocr'.").optional(),
|
|
18
|
+
columns0Based: z.boolean().describe("Set to true if column indices in profiles are zero-based.").optional()
|
|
19
|
+
}).describe("Request model for converting PDF documents to XLSX."),
|
|
20
|
+
output: z.object({
|
|
21
|
+
url: z.string().describe("URL to the resulting XLSX file.").nullable().optional(),
|
|
22
|
+
error: z.boolean().describe("True if an error occurred during conversion."),
|
|
23
|
+
inline: z.string().describe("Base64-encoded XLSX data if inline was requested.").nullable().optional(),
|
|
24
|
+
status: z.number().int().describe("Status code returned by the API."),
|
|
25
|
+
message: z.string().describe("Error or informational message from the API.").nullable().optional(),
|
|
26
|
+
pageCount: z.number().int().describe("Number of pages processed.").nullable().optional(),
|
|
27
|
+
processId: z.string().describe("ID of the async process (if async was requested).").nullable().optional(),
|
|
28
|
+
remaining: z.number().int().describe("Number of remaining credits after the call.").nullable().optional()
|
|
29
|
+
}).describe("Response model for PDF to XLSX conversion.")
|
|
30
|
+
});
|
|
31
|
+
//#endregion
|
|
32
|
+
export { pdfCoPdfToXlsx };
|
|
33
|
+
|
|
34
|
+
//# sourceMappingURL=pdf-to-xlsx.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"pdf-to-xlsx.mjs","names":[],"sources":["../../src/actions/pdf-to-xlsx.ts"],"sourcesContent":["import { z } from \"zod\";\n\nimport { action } from \"../action\";\n\nexport const PdfCoPdfToXlsxInput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"Link to the PDF file to be converted.\"),\n name: z.string().describe(\"Optional name for the output XLSX file (must end with .xlsx).\").optional(),\n async: z.boolean().describe(\"Run job asynchronously; returns processId for status checking.\").optional(),\n pages: z.string().describe(\"Comma-separated page indices or ranges to convert (e.g., '1,3-5').\").optional(),\n inline: z.boolean().describe(\"If true, returns XLSX data inline; otherwise returns a URL to the XLSX.\").optional(),\n encrypt: z.boolean().describe(\"If true, encrypts the output XLSX file.\").optional(),\n password: z.string().describe(\"Password for protected PDF files, if required.\").optional(),\n profiles: z.string().describe(\"Advanced conversion settings in JSON format.\").optional(),\n expiration: z.number().int().describe(\"Expiration time for the output link in minutes (default is 60).\").optional(),\n optimization: z.string().describe(\"Optimization mode, e.g., 'ocr'.\").optional(),\n columns0Based: z.boolean().describe(\"Set to true if column indices in profiles are zero-based.\").optional(),\n}).describe(\"Request model for converting PDF documents to XLSX.\");\nexport const PdfCoPdfToXlsxOutput: z.ZodTypeAny = z.object({\n url: z.string().describe(\"URL to the resulting XLSX file.\").nullable().optional(),\n error: z.boolean().describe(\"True if an error occurred during conversion.\"),\n inline: z.string().describe(\"Base64-encoded XLSX data if inline was requested.\").nullable().optional(),\n status: z.number().int().describe(\"Status code returned by the API.\"),\n message: z.string().describe(\"Error or informational message from the API.\").nullable().optional(),\n pageCount: z.number().int().describe(\"Number of pages processed.\").nullable().optional(),\n processId: z.string().describe(\"ID of the async process (if async was requested).\").nullable().optional(),\n remaining: z.number().int().describe(\"Number of remaining credits after the call.\").nullable().optional(),\n}).describe(\"Response model for PDF to XLSX conversion.\");\n\nexport const pdfCoPdfToXlsx = action(\"PDF_CO_PDF_TO_XLSX\", {\n slug: \"pdf_co-pdf-to-xlsx\",\n name: \"Convert PDF to XLSX\",\n description: \"Tool to convert PDF or scanned images to XLSX (Excel) format. Use when you need structured spreadsheet output from a PDF.\",\n input: PdfCoPdfToXlsxInput,\n output: PdfCoPdfToXlsxOutput,\n});\n"],"mappings":";;AA4BA,MAAa,iBAAiB,OAAO,sBAAsB;CACzD,MAAM;CACN,MAAM;CACN,aAAa;CACb,OA5B+C,EAAE,OAAO;EACxD,KAAK,EAAE,OAAO,CAAC,CAAC,SAAS,uCAAuC;EAChE,MAAM,EAAE,OAAO,CAAC,CAAC,SAAS,+DAA+D,CAAC,CAAC,SAAS;EACpG,OAAO,EAAE,QAAQ,CAAC,CAAC,SAAS,gEAAgE,CAAC,CAAC,SAAS;EACvG,OAAO,EAAE,OAAO,CAAC,CAAC,SAAS,oEAAoE,CAAC,CAAC,SAAS;EAC1G,QAAQ,EAAE,QAAQ,CAAC,CAAC,SAAS,yEAAyE,CAAC,CAAC,SAAS;EACjH,SAAS,EAAE,QAAQ,CAAC,CAAC,SAAS,yCAAyC,CAAC,CAAC,SAAS;EAClF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,gDAAgD,CAAC,CAAC,SAAS;EACzF,UAAU,EAAE,OAAO,CAAC,CAAC,SAAS,8CAA8C,CAAC,CAAC,SAAS;EACvF,YAAY,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,SAAS,i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