# Loyalty Platform service snapshot — regenerated after each Complete phase.
# Spec: docs/ai-framework/service-snapshot-policy.md

schema_version: 1
snapshot_version: 5

service_name: loyalty
commercial_product: Torbat Loyalty
current_version: "0.7.6.0"
current_phase: loyalty-7.6
last_completed_phase: loyalty-7.6
next_phase: loyalty-7.7

completed_phases:
  - loyalty-7.0
  - loyalty-7.1
  - loyalty-7.2
  - loyalty-7.3
  - loyalty-7.4
  - loyalty-7.5
  - loyalty-7.6
remaining_phases:
  - loyalty-7.7
  - loyalty-7.8
  - loyalty-7.9
  - loyalty-7.10

registered_modules:
  - programs
  - tiers
  - members
  - membership_lifecycle
  - point_accounts
  - point_ledger
  - rewards
  - reward_redemptions
  - campaigns
  - campaign_applications
  - referral_programs
  - referral_codes
  - referral_attributions
  - wallet_accounts
  - wallet_ledger
  - audit
  - outbox

enabled_capabilities:
  - foundation
  - membership_engine
  - point_engine
  - rewards_engine
  - campaign_engine
  - referral_engine
  - wallet_engine

enabled_bundles:
  - torbat_loyalty

public_apis:
  - { method: POST, path: /api/v1/wallets, permission: loyalty.wallets.create }
  - { method: GET, path: "/api/v1/wallets/{id}/balance", permission: loyalty.wallets.view }
  - { method: GET, path: "/api/v1/wallets/{id}/ledger", permission: loyalty.wallets.view }
  - { method: POST, path: "/api/v1/wallets/{id}/credit", permission: loyalty.wallets.credit }
  - { method: POST, path: "/api/v1/wallets/{id}/debit", permission: loyalty.wallets.debit }
  - { method: POST, path: "/api/v1/wallets/{id}/adjust", permission: loyalty.wallets.adjust }
  - { method: POST, path: "/api/v1/wallets/{id}/transfer", permission: loyalty.wallets.transfer }
  - { method: POST, path: "/api/v1/wallets/{id}/delete", permission: loyalty.wallets.delete }
  - { method: POST, path: "/api/v1/point-accounts/{id}/earn", permission: loyalty.points.earn }
  - { method: POST, path: "/api/v1/rewards/{id}/redeem", permission: loyalty.rewards.redeem }
  - { method: POST, path: "/api/v1/campaigns/{id}/apply", permission: loyalty.campaigns.apply }
  - { method: POST, path: /api/v1/referrals/attribute, permission: loyalty.referrals.attribute }

published_events:
  - { event_type: loyalty.wallet.opened, version: "1" }
  - { event_type: loyalty.wallet.credited, version: "1" }
  - { event_type: loyalty.wallet.debited, version: "1" }
  - { event_type: loyalty.wallet.adjusted, version: "1" }
  - { event_type: loyalty.wallet.transferred, version: "1" }
  - { event_type: loyalty.wallet.closed, version: "1" }
  - { event_type: loyalty.points.earned, version: "1" }
  - { event_type: loyalty.reward.redeemed, version: "1" }
  - { event_type: loyalty.campaign.applied, version: "1" }
  - { event_type: loyalty.referral.rewarded, version: "1" }

permission_prefix: loyalty.*

active_adrs:
  - ADR-001
  - ADR-003
  - ADR-006
  - ADR-011

integration_contracts:
  - NotificationProvider
  - AnalyticsProvider
  - Customer360Provider
  - AIProvider
  - ModuleIntegrationProvider
  - CrmReferenceProvider
  - CommunicationProvider
  - FileStorageProvider

known_limitations:
  - No payment-gateway settlement for wallet credits
  - Gift Card Platform not implemented (7.7)
  - No automatic expire/activate schedulers
  - Outbox flush still platform-bus maturity item

open_todos: []

last_handover_reference: docs/phase-handover/phase-7-6.md
last_updated: "2026-07-26"
