• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
pro767

pro767

pdf

Public
Like
pdf
Home
Code
4
backend
3
frontend
4
shared
2
README.md
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
shared
/
README.md
Code
/
shared
/
README.md
Search
5/22/2025
README.md

Shared Types and Utilities

This directory contains TypeScript types and utilities shared between the frontend and backend.

types.ts

PDFOperation

Defines the structure for PDF tool operations:

  • type: Operation identifier
  • name: Display name
  • description: Tool description
  • icon: Emoji icon

FileUploadState

Manages file upload state:

  • files: Array of selected files
  • isUploading: Upload status
  • error: Error message if any

PDFInfo

PDF metadata structure:

  • pageCount: Number of pages
  • title, author, subject: PDF metadata
  • creationDate, modificationDate: Timestamps
  • isEncrypted: Encryption status
  • fileSize: File size in bytes

Operation Options

Type definitions for tool-specific options:

  • SplitOptions: Page selection modes
  • RotateOptions: Rotation angle and pages
  • ProtectOptions: Password and permissions
  • ConversionOptions: Image format and quality

ProcessingResult

Standard response format:

  • success: Operation success status
  • message: Status or error message
  • downloadUrl: File download URL
  • filename: Suggested filename
  • info: PDF information (for info operations)

Usage

These types ensure type safety across the frontend and backend, providing a consistent interface for PDF operations and data structures.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
Β© 2025 Val Town, Inc.