@matteoranzi/deliveroo-js-sdk
v1.3.11
Published
Fork of @unitn-asa/deliveroo-js-sdk adding generated TypeScript declarations (dist-types, built from the package's existing JSDoc).
Readme
@matteoranzi/deliveroo-js-sdk
Fork of @unitn-asa/deliveroo-js-sdk,
adding generated TypeScript declarations (dist-types/, built via npm run build:types
from the package's existing JSDoc annotations - the source was already thoroughly
JSDoc-typed with checkJs enabled for editor support, it just never emitted real
.d.ts files before). package.json's types field and exports map now point at
the generated declarations, so TypeScript consumers get real types automatically.
No behavioral changes - everything below still applies as-is; only the package name/ scope and the addition of shipped type declarations differ from upstream.
Shared SDK utilities and types for Deliveroo.js (client & server integration helpers).
This package exposes small helpers for interacting with the Deliveroo.js backend (HTTP API helpers, socket helpers and shared JSDoc typedefs) so frontend and other packages can import them from a single entry point.
Key features
- Small HTTP helper functions for the Deliveroo REST API (tokens, configs, agents, parcels).
- Socket-related helpers and types for
Deliveroojs. - JSDoc typedefs that can be used by editors/TypeScript for type hints.
Installation
This package is part of the monorepo and is consumed via file: references in the workspace. If you publish it standalone, install normally with npm/yarn.
From the monorepo root (already linked via workspace):
# frontend or other package: npm install ../packages/@unitn-asa/deliveroo-js-sdkUsage (ESM)
Import the functions and types you need from the package root:
import {
DeliveroojsRestClient,
DeliveroojsAsyncClient
} from '@unitn-asa/deliveroo-js-sdk';Types
The package contains JSDoc typedef files describing IOAgent, IOParcel, IOConfig, IOGameOptions and other structures used across the project. When authoring code that consumes this SDK you can import the types in JSDoc.
Example JSDoc import:
/** @typedef {import('@unitn-asa/deliveroo-js-sdk/types/IOAgent.js').IOAgent} IOAgent */License
ISC
Maintainer: Marco Robol [email protected]
