# OnAim Integration Pack

This folder contains everything needed to integrate your platform with **OnAim** (gamification-as-a-service). It is written so that an **AI coding assistant** (Claude, Copilot, etc.) can implement the client side of the integration end-to-end.

## How to use

1. Give this whole folder to your AI assistant / coding agent.
2. Use a prompt like:

   > Read `ONAIM_INTEGRATION.md` and implement the OnAim integration in our codebase. Follow the tasks in order. Produce our event metadata file according to `EVENT_METADATA_FILE.md` (see `examples/` and `schemas/`). Ask me only for the configuration values marked as "provided by OnAim" or business decisions.

3. Fill in the configuration values OnAim provides during onboarding (section "Configuration provided by OnAim" in `ONAIM_INTEGRATION.md`).
4. Send the deliverables listed in `ONAIM_INTEGRATION.md` → "Deliverables back to OnAim" to your OnAim contact.

## Contents

| File | Purpose |
|------|---------|
| `ONAIM_INTEGRATION.md` | The full integration specification — event delivery, player info endpoint, bonus endpoint, promotion page embedding. Implementation tasks with acceptance criteria. |
| `EVENT_METADATA_FILE.md` | Format of the **event metadata file** you must produce (event catalog + field values + computed-field rules). |
| `schemas/event-metadata.schema.json` | JSON Schema for validating your event metadata file. |
| `examples/example-events.json` | A complete example metadata file (real integration, anonymizable). |
| `examples/example-events.withRules.json` | Same example extended with computed-field rules (game-type lookup, currency conversion). |

## Support

Questions and configuration values (URLs, credentials, secrets) come from your OnAim integration contact during onboarding.
