# Parcl Product SDK

TypeScript SDK for interacting with Parcl's product APIs.

<!-- Workflow test trigger -->

## Features

- 🏠 **Real Estate Data**: Access comprehensive real estate market data and analytics
- 📊 **Market Quotes**: Real-time and historical price data for real estate markets
- 💼 **Portfolio Management**: Track and manage your real estate trading positions
- 🎯 **Points & Rewards**: Integrate with Parcl's gamification and rewards system
- 🔐 **Authentication**: Secure user authentication and session management
- 📈 **Trading**: Execute trades and manage orders programmatically
- 🛠️ **TypeScript Support**: Full type safety and IntelliSense support

## Quick Start

TypeScript client library and SDK for interactions with the Parcl API.

See examples directory for usage.

## Installation

```bash
npm install @parcl-finance/product-sdk
```

or

```bash
yarn add @parcl-finance/product-sdk
```

or

```bash
pnpm add @parcl-finance/product-sdk
```

## Development

This package is part of the Parcl monorepo. To work with it locally:

```bash
# Install dependencies
pnpm install

# Build the package
pnpm product-sdk build

# Run tests
pnpm product-sdk test

# Run examples
pnpm product-sdk exec ts-node examples/collections.ts
```

## Examples

See the `examples/` directory for usage examples of various SDK features:

- Authentication and user management
- Market data and quotes
- Real estate data
- Trading and portfolio management
- Points and rewards systems

## Troubleshooting

### Common Issues

- **Build errors**: Ensure you're using Node.js 14+ and have run `pnpm install`
- **Type errors**: Make sure you're using TypeScript 4.0+ for full compatibility
- **API errors**: Check your authentication credentials and network connectivity

### Getting Help

- Check the [documentation](https://docs.parcl.co)
- Review the examples in the `examples/` directory
- Open an issue on GitHub for bug reports
- Join our Discord community for real-time support

## Publishing

This package is automatically published via GitHub Actions when changes are pushed to the main branch. Manual releases can be triggered via the GitHub Actions workflow dispatch.

The deployment pipeline includes:

- Automated testing
- Version bumping
- NPM publishing
- GitHub release creation
- Slack notifications

## API Documentation

For detailed API documentation, visit [docs.parcl.co](https://docs.parcl.co) or generate docs locally:

```bash
pnpm product-sdk doc
```

## SDK Versioning

This SDK follows semantic versioning (semver) with the following release process:

- **Development releases** (`x.x.x-dev.x`): Published from the `dev` branch for testing and integration
- **Stable releases** (`x.x.x`): Published from the `main` branch for production use
- **Automatic version conflict resolution**: The release system automatically handles version conflicts by incrementing to the next available version

### Release Channels

- **Dev Channel**: `npm install @parcl-finance/product-sdk@dev` - Latest development version
- **Stable Channel**: `npm install @parcl-finance/product-sdk` - Latest stable version

For more information about our release process, see our [GitHub Actions workflows](https://github.com/ParclFinance/parcl/tree/main/.github/workflows).
