backbone-integrations 0.6.1

Integration registry: connectors, integration accounts and an idempotent inbound event lane, with one OAuth flow (HMAC-bound state, PKCE)
Documentation
# =============================================================================
# Domain: Integrations
# Entity: IntegrationConnector
# Description: A configured connection to an external system — a payment gateway (Midtrans/Xendit), a
# marketplace (Tokopedia/Shopee), a bank feed, a courier. A connector is an inbound/outbound ACL over the
# event bus + the modules' PUBLIC contracts; it never reaches into a module's internals. Promoted for the
# first named integration (tier5-deferred §7).
# =============================================================================

models:
  - name: IntegrationConnector
    collection: integration_connectors
    description: "A configured connection to an external system (payment gateway / marketplace / bank feed)"
    fields:
      id:
        type: uuid
        attributes: ["@id", "@default(uuid)"]
        description: "Unique connector id"
      provider:
        type: string
        attributes: ["@required", "@length(max=60)"]
        description: "The external provider (midtrans | xendit | tokopedia | shopee | bca_feed | …)"
      kind:
        type: ConnectorKind
        attributes: ["@required"]
        description: "What the connector does"
      direction:
        type: ConnectorDirection
        attributes: ["@required", "@default(inbound)"]
        description: "Which directions this connector handles"
      # replaces is_active (boolean flipped to lifecycle enum)
      status:
        type: ConnectorStatus
        attributes: ["@default(active)"]
        description: "Lifecycle (inactive connectors stop processing events; received events keep their connector reference)"
      metadata:
        type: Metadata
        attributes: ["@audit_metadata"]
        description: "Audit metadata"
    indexes:
      # No tenancy indexes (ADR-0029): the module is tenant-agnostic. The per-unit
      # provider unique — one connector per provider per org unit — is installed by
      # the composing service's tenancy decorator (org_unit_id-leading), not
      # declared here.

enums:
  - name: ConnectorKind
    description: "The kind of external integration"
    variants:
      - name: payment_gateway
        description: "A payment gateway (Midtrans/Xendit) — notifications map to payments"
        default: true
      - name: marketplace
        description: "A marketplace (Tokopedia/Shopee) — orders map to sales orders"
      - name: bank_feed
        description: "A bank statement feed — lines map to bank transactions"
      - name: courier
        description: "A courier/logistics provider — status updates map to deliveries"

  - name: ConnectorDirection
    description: "Directions handled by a connector"
    variants:
      - name: inbound
        description: "We only receive from the provider"
        default: true
      - name: outbound
        description: "We only send to the provider"
      - name: both
        description: "Inbound and outbound"

  - name: ConnectorStatus
    description: "Lifecycle of an integration connector"
    variants:
      - name: active
        description: "Events are processed through this connector"
        default: true
      - name: inactive
        description: "No new events; received events keep their connector reference"