Typings and functional interface for Nova Poshta (Нова Пошта) REST API
This package provides typing and functions to call Nova Poshta api methods.
Currently supporting NodeJS in ESM mode and Deno. From the same npm package
Official API references are here: https://developers.novaposhta.ua/documentation
Status
The package is in early stage and is not thoroughly tested. Bugs and inconsistencies may occur. Any contribution is appreciated.
Submodules
Import them like this:
import { getStatusDocuments } from 'novaposhtarest/TrackingDocument'
Submodules list:
✅ Address
✅ searchSettlements✅ searchSettlementStreets✅ save✅ delete✅ update✅ getSettlements✅ getCities✅ getAreas✅ getWarehouses✅ getWarehouseTypes✅ getStreet
✅ Counterparty
✅ save✅ delete✅ update✅ getCounterpartyAddresses✅ getCounterpartyOptions✅ getCounterpartyContactPersons✅ getCounterparties
✅ ContactPerson
✅ save✅ delete✅ update
✅ ScanSheet
✅ insertDocuments✅ getScanSheet✅ getScanSheetList✅ deleteScanSheet✅ removeDocuments
✅ Common
✅ getTimeIntervals✅ getCargoTypes✅ getBackwardDeliveryCargoTypes✅ getPalletsList✅ getTypesOfPayersForRedelivery✅ getPackList✅ getTiresWheelsList✅ getCargoDescriptionList✅ getMessageCodeText✅ getServiceTypes✅ getOwnershipFormsList
✅ AdditionalService
✅ CheckPossibilityCreateReturn✅ getReturnReasons✅ getReturnReasonsSubtypes✅ orderCargoReturn✅ getReturnOrdersList✅ deleteAdditionalService✅ CheckPossibilityChangeEW✅ getChangeEWOrdersList✅ checkPossibilityForRedirecting✅ getRedirectionOrdersList✅ getOwnershipFormsList
✅ InternetDocument
✅ getDocumentPrice✅ getDocumentDeliveryDate✅ save✅ update✅ delete✅ getDocumentList✅ generateReport
✅ TrackingDocument
✅ getStatusDocuments
Compatibility
You can use this single package with NodeJS, Deno and Cloudflare Workers (not a runtime, but in this case it matters).
If you're building for NodeJS 18 and newer or CF Wrokers, use the normal import:
import { getStatusDocuments } from 'novaposhtarest/TrackingDocument'
For older versions of Node that don't support the fetch API, use compat
branch (just add compat/
after the package name):
import { getStatusDocuments } from 'novaposhtarest/compat/TrackingDocument'
And for the cool bois who use Deno, do it like this:
import { getStatusDocuments } from './node_modules/novaposhtarest/dist/deno/models/TrackingDocument.ts'
Yeah, not very pretty but heeey
Examples
Before running any examples, compile the project by running tsc
or npm run build
in it's root directory