@bates-solutions/squareup API Reference - v3.2.0
    Preparing search index...

    Interface ExpressRequestLike

    Minimal structural stand-ins for the Express types this middleware touches.

    Express is only a peer/dev dependency, so it is deliberately kept out of the published type graph. Importing Request/Response/RequestHandler from express here would make the generated declaration file reach back into untranspiled TypeScript source in the JSR npm tarball, breaking every /server consumer — including ones that never touch Express (see #128). The sibling Next.js and Lambda middleware already declare their own local types for the same reason. These interfaces are structurally compatible with Express 4 and 5, so createExpressWebhookHandler(...) still drops straight into app.post(path, handler) with full type-checking.

    interface ExpressRequestLike {
        body?: unknown;
        headers: Record<string, string | string[] | undefined>;
        on(event: string, listener: (...args: unknown[]) => void): unknown;
    }

    Hierarchy (View Summary)

    Index
    body?: unknown

    Parsed or raw request body (Buffer, string, or parsed JSON).

    headers: Record<string, string | string[] | undefined>

    Request headers, keyed lowercase as Node/Express provide them.

    • Node stream event subscription, used to capture the raw body.

      Parameters

      • event: string
      • listener: (...args: unknown[]) => void

      Returns unknown