open-index/open-npm huggingface dataset:
npm package: @batch.com/cordova-plugin
Description: Batch.com SDK Cordova/Ionic plugin for Android and iOS
Author: Batch.com
Latest version: 7.0.0

<img src="https://static.batch.com/documentation/Readmes/logo_batch_full_178@2x.png" srcset="https://static.batch.com/documentation/Readmes/logo_batch_full_178.png 1x" width="178" height="68" alt="Batch Logo" />

# Batch SDK Cordova Plugin

The Batch SDK allows you to build meaningful communication experience in your iOS/Android app through highly personalized push notifications & In-App messages.

Our [📕 setup documentation](https://doc.batch.com/cordova/prerequisites) details the steps to take for an easy and successful integration.

# Prerequisites
The Batch SDK Cordova Plugin requires Cordova 9.0 or higher. It also is compatible with Ionic Capacitor 2.4 or higher.

# Documentation
- [Setup guide](https://doc.batch.com/cordova/prerequisites): start your implementation here!
- [Help center](https://help.batch.com/en/): answers to most questions you may have during the integration
npm package: @batoanng/types
Description: [![npm version](https://img.shields.io/npm/v/@batoanng/types)](https://www.npmjs.com/package/@batoanng/types) [![install size](https://packagephobia.com/badge?p=@batoanng/types)](https://packagephobia.com/result?p=@batoanng/types)
Latest version: 0.3.0

# @batoanng/types

[![npm version](https://img.shields.io/npm/v/@batoanng/types)](https://www.npmjs.com/package/@batoanng/types)
[![install size](https://packagephobia.com/badge?p=@batoanng/types)](https://packagephobia.com/result?p=@batoanng/types)

A shared type definitions package to centralize domain models and common typings across a monorepo or multiple applications.

---

## ✨ Features

- ✅ Typed error handling interfaces
- 📦 Reusable payload and validation error types
- 🧱 Centralized definitions for consistent API contracts
- 🔄 Ideal for frontend-backend type sharing in fullstack apps
- 📁 Organized under `src/errors/` for separation of concerns

---

## 📦 Installation

```bash
npm install -D @batoanng/types
```

---

## 🧰 Usage

Import shared error types anywhere in your app:

```ts
import type { ApiError, NormalisedError } from '@batoanng/types/errors';
```

Or from the main entry:

```ts
import { NormalisedError } from '@batoanng/types';
```

> 📌 These types are pure and have no runtime cost.

---

## 📁 Structure

```
src/
├── errors/
│   ├── ApiError.ts             # Structured API error shape
│   ├── ErrorWithMessage.ts     # Generic JS Error wrapper
│   ├── NormalisableError.ts    # Union of all supported error shapes
│   ├── NormalisedError.ts      # Parsed + user-presentable error
│   ├── PayloadError.ts         # Error with custom payload
│   ├── ValidationError.ts      # Validation-aware error type
│   └── index.ts                # Barrel export for all error types
├── index.tsx                   # Top-level re-exports
```

---

## 🧪 Example

```ts
function handleError(error: NormalisableError): NormalisedError {
  // normalise and present error to user
}
```

---

## ✅ Recommended With

- `@batoanng/jest-config`: for asserting and testing typed error shapes
- `@batoanng/eslint-config`: for enforcing typing best practices

---

## 🧹 Linting

This package uses the shared flat ESLint base config via [`eslint.config.mjs`](./eslint.config.mjs):

```js
import base from '@batoanng/eslint-config/base';

export default [...base];
```