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

    Maintain an African mobile-money account reachable over a Yellowcard network.

    Hierarchy (View Summary)

    Index
    cache: ServiceCache<CachedSearchPage<PaymentInstrumentSearchItem>>
    instance: (...args: []) => YellowcardMobileMoneyPaymentInstrumentService = ...

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

    • An operator's edit, whoever owns the row: skips only the entity capability check. A new country or network is re-checked against Yellowcard, and a new number (or country) against the phone rules and the blacklist.

      Parameters

      • input: { data: YellowcardMobileMoneyAdminUpdateData; id: string }

      Returns Promise<
          | {
              ok: true;
              value: {
                  beneficiaryName: string
                  | null;
                  channels: string[];
                  country: string;
                  createdAt: Date;
                  deletedAt: Date | null;
                  firstName: string;
                  id: string;
                  lastName: string;
                  mobileNumber: string;
                  mobileProvider: string;
                  networkId: string;
                  provider:
                      | "MX_CLABE"
                      | `chn_${string}`
                      | "LEDGER_ACCOUNT"
                      | "WIRE_DEPOSIT"
                      | "ACH_PUSH_DEPOSIT"
                      | "YELLOWCARD"
                      | "QUILTT"
                      | "VICTOR"
                      | "CFX";
                  providerId: string;
                  referenceId?: string;
                  sendEnabled: boolean;
                  status: | "DELETED"
                  | "PENDING_VERIFICATION"
                  | "ACTION_REQUIRED"
                  | "APPROVED"
                  | "BLOCKED";
                  statusDescription: string;
                  type: "AF_MOMO";
                  typeDescription: string;
                  updatedAt: Date;
              };
          }
          | { error: YellowcardMobileMoneyAdminUpdateError; ok: false },
      >

    • Parameters

      • __namedParameters: Pick<
            {
                beneficiaryName: string
                | null;
                channels: string[];
                country: string;
                createdAt: Date;
                deletedAt: Date | null;
                firstName: string;
                id: string;
                lastName: string;
                mobileNumber: string;
                mobileProvider: string;
                networkId: string;
                provider:
                    | "MX_CLABE"
                    | `chn_${string}`
                    | "LEDGER_ACCOUNT"
                    | "WIRE_DEPOSIT"
                    | "ACH_PUSH_DEPOSIT"
                    | "YELLOWCARD"
                    | "QUILTT"
                    | "VICTOR"
                    | "CFX";
                providerId: string;
                referenceId?: string;
                sendEnabled: boolean;
                status: | "DELETED"
                | "PENDING_VERIFICATION"
                | "ACTION_REQUIRED"
                | "APPROVED"
                | "BLOCKED";
                statusDescription: string;
                type: "AF_MOMO";
                typeDescription: string;
                updatedAt: Date;
            },
            "referenceId",
        > & {
            country: string;
            customerId: string;
            entityId: string;
            firstName: string;
            lastName: string;
            mobileNumber: string;
            mobileProvider: string;
            networkId: string;
        }

      Returns Promise<
          | {
              ok: true;
              value: {
                  beneficiaryName: string
                  | null;
                  channels: string[];
                  country: string;
                  createdAt: Date;
                  deletedAt: Date | null;
                  firstName: string;
                  id: string;
                  lastName: string;
                  mobileNumber: string;
                  mobileProvider: string;
                  networkId: string;
                  provider:
                      | "MX_CLABE"
                      | `chn_${string}`
                      | "LEDGER_ACCOUNT"
                      | "WIRE_DEPOSIT"
                      | "ACH_PUSH_DEPOSIT"
                      | "YELLOWCARD"
                      | "QUILTT"
                      | "VICTOR"
                      | "CFX";
                  providerId: string;
                  referenceId?: string;
                  sendEnabled: boolean;
                  status: | "DELETED"
                  | "PENDING_VERIFICATION"
                  | "ACTION_REQUIRED"
                  | "APPROVED"
                  | "BLOCKED";
                  statusDescription: string;
                  type: "AF_MOMO";
                  typeDescription: string;
                  updatedAt: Date;
              };
          }
          | { error: ServiceError; ok: false },
      >

    • Also clears payment-instrument.text. Every writer busts by customer alone, which reaches no field tag, yet each write may change the text a cached transaction q page matched on.

      Parameters

      • args: {
            customerIds: readonly string[];
            keys?: readonly CacheKey[];
            records?: readonly string[];
        }

      Returns Promise<void>

    • Tags for a page: the scope its query searched (each customer's membership tag, else the collection tag), so an empty page is bustable too, plus the records it projects and the fields that chose or ordered its rows.

      Parameters

      • __namedParameters: {
            customerIds: readonly string[] | undefined;
            fields?: readonly string[];
            records?: readonly string[];
        }

      Returns string[]

    • Merge data into an existing instrument. Every field is optional — an absent key is left untouched. The owning entity is read off the row.

      Parameters

      • input: { customerId: string; data: YellowcardMobileMoneyUpdateData; id: string }

      Returns Promise<
          | { error: ServiceError; ok: false }
          | {
              ok: true;
              value: {
                  beneficiaryName: string | null;
                  channels: string[];
                  country: string;
                  createdAt: Date;
                  deletedAt: Date | null;
                  firstName: string;
                  id: string;
                  lastName: string;
                  mobileNumber: string;
                  mobileProvider: string;
                  networkId: string;
                  provider:
                      | "MX_CLABE"
                      | `chn_${string}`
                      | "LEDGER_ACCOUNT"
                      | "WIRE_DEPOSIT"
                      | "ACH_PUSH_DEPOSIT"
                      | "YELLOWCARD"
                      | "QUILTT"
                      | "VICTOR"
                      | "CFX";
                  providerId: string;
                  referenceId?: string;
                  sendEnabled: boolean;
                  status: | "DELETED"
                  | "PENDING_VERIFICATION"
                  | "ACTION_REQUIRED"
                  | "APPROVED"
                  | "BLOCKED";
                  statusDescription: string;
                  type: "AF_MOMO";
                  typeDescription: string;
                  updatedAt: Date;
              };
          },
      >