Metadata-Version: 2.5
Name: hatchup-provider-exclusive-service-integration
Version: 0.3.0
Summary: The shared contract between Pathinnova and the exclusive services built for its providers.
Project-URL: Homepage, https://github.com/hatchup-io/hatchup-provider-exclusive-service-integration
Project-URL: Repository, https://github.com/hatchup-io/hatchup-provider-exclusive-service-integration
Project-URL: Issues, https://github.com/hatchup-io/hatchup-provider-exclusive-service-integration/issues
Author: Hatchup
License: MIT License
        
        Copyright (c) 2026 Hatchup
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Keywords: hatchup,integration,pathinnova,provider,sdk
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Typing :: Typed
Requires-Python: <4.0,>=3.12
Requires-Dist: httpx<0.29,>=0.27
Requires-Dist: pydantic<3.0,>=2.7
Provides-Extra: django
Requires-Dist: django>=4.2; extra == 'django'
Requires-Dist: djangorestframework>=3.14; extra == 'django'
Description-Content-Type: text/markdown

# Hatchup Provider Exclusive Service Integration

The shared contract between **Pathinnova** and the **exclusive services** Hatchup builds for its providers.

> **Status:** 0.3.x, alpha. Contract 1.1 ([`docs/CONTRACT.md`](docs/CONTRACT.md)): bookings follow the channel their lead came from, Pathinnova charges the fee on accept for both channels, and the Django fee outbox keeps an exclusive service working while Pathinnova is down. §1–§3 are live on Pathinnova; the endpoints for §4–§11 are being built. See [`docs/PLAN.html`](docs/PLAN.html).

## What this is

Pathinnova is the system of record for every provider's wallet and for every booking. A provider on the exclusive plan also runs its own stack, an exclusive service, where its staff work. This package is how the two talk:

- **Exclusive service → Pathinnova:** consultants and availability, booking creation and booking actions, wallet reads and top-ups. Authenticated with the provider's `ProviderKey`.
- **Pathinnova → exclusive service:** signed events (marketplace bookings, fees, wallet, subscription).

Both sides install the same package, so the message formats cannot drift. A fix released here reaches every exclusive service with a version bump.

The package carries the **contract and its transport only**. It holds no secrets, no hostnames, no provider names and no business rules: fee amounts and wallet maths stay in Pathinnova, and slot calculation stays with whichever side owns the booking.

## Install

```bash
pip install hatchup-provider-exclusive-service-integration
# with the Django integration
pip install "hatchup-provider-exclusive-service-integration[django]"
```

Requires Python 3.12+.

## Django

```python
INSTALLED_APPS = [
    # ...
    "hatchup_exclusive_provider.django",  # optional: validates settings at boot
]

EXCLUSIVE_PROVIDER = {
    "BASE_URL": "https://<pathinnova-api-host>/",  # required
    "PROVIDER_KEY": env("PATHINNOVA_PROVIDER_KEY"),  # required, "<key_id>.<secret>"
    "TIMEOUT": 10.0,  # optional
}
```

See [`docs/django.md`](docs/django.md).

## Development

```bash
uv sync        # install dev deps
just all       # format, lint-fix, verify, typecheck
just test      # tests (skips `live`)
just ci        # the CI gate: verify only, never rewrites files
just build     # sdist + wheel
```

## Releasing

1. Bump `[project].version` in `pyproject.toml` and add a matching `## [X.Y.Z]` entry to `CHANGELOG.md`.
2. Commit on `main`.
3. `git tag -a vX.Y.Z -m "release: vX.Y.Z" && git push origin vX.Y.Z`
4. `.github/workflows/release.yml` checks the tag against `pyproject.toml` and the changelog, runs the CI gate, builds, and publishes to PyPI with OIDC (no tokens). Publishing waits for approval in the `pypi` GitHub environment.

## License

MIT. See [LICENSE](LICENSE).
