@cfxlabsinc/b2b-services
    Preparing search index...

    Activates a customer's rewards program: provisions the org-owned "Rewards" pool ledger account (idempotent — mirrors createOperatingLedgerAccount in packages/customer-services/src/customerActivities.ts) and links it via a reward_program row.

    Index
    instance: (...args: []) => RewardProgramService = ...

    The process default: built from each dependency's own instance().

    • Activate a customer's rewards program. Idempotent: a repeat call returns the existing program and reuses the existing "Rewards" ledger account rather than provisioning a second one.

      Parameters

      • __namedParameters: { customerId: string }

      Returns Promise<
          | { ok: true; value: { id: string; ledgerAccountId: string } }
          | {
              error: ServiceError<"CUSTOMER_NOT_FOUND"> | CreateLedgerAccountError;
              ok: false;
          },
      >