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

    Maintain a Mexican CLABE account for sending payments over SPEI.

    Hierarchy (View Summary)

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

    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 clabeNumber re-runs every create-time check and moves the providerId, so a blacklisted CLABE lands BLOCKED.

      Parameters

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

      Returns Promise<
          | {
              ok: true;
              value: {
                  account: string;
                  accountName: string;
                  bank?: string;
                  bankCode: string;
                  beneficiaryName: string
                  | null;
                  city?: string;
                  cityCode: string;
                  createdAt: Date;
                  deletedAt: Date | null;
                  id: 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;
                  tag?: string;
                  type: "MX_CLABE";
                  typeDescription: string;
                  updatedAt: Date;
              };
          }
          | { error: MxClabeAdminUpdateError; ok: false },
      >

    • Parameters

      • __namedParameters: Pick<
            {
                account: string;
                accountName: string;
                bank?: string;
                bankCode: string;
                beneficiaryName: string
                | null;
                city?: string;
                cityCode: string;
                createdAt: Date;
                deletedAt: Date | null;
                id: 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;
                tag?: string;
                type: "MX_CLABE";
                typeDescription: string;
                updatedAt: Date;
            },
            "referenceId"
            | "accountName",
        > & { clabeNumber: string; customerId: string; entityId: string }

      Returns Promise<
          | {
              ok: true;
              value: {
                  account: string;
                  accountName: string;
                  bank?: string;
                  bankCode: string;
                  beneficiaryName: string
                  | null;
                  city?: string;
                  cityCode: string;
                  createdAt: Date;
                  deletedAt: Date | null;
                  id: 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;
                  tag?: string;
                  type: "MX_CLABE";
                  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: an instrument cannot move between entities.

      Parameters

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

      Returns Promise<
          | {
              ok: true;
              value: {
                  account: string;
                  accountName: string;
                  bank?: string;
                  bankCode: string;
                  beneficiaryName: string
                  | null;
                  city?: string;
                  cityCode: string;
                  createdAt: Date;
                  deletedAt: Date | null;
                  id: 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;
                  tag?: string;
                  type: "MX_CLABE";
                  typeDescription: string;
                  updatedAt: Date;
              };
          }
          | { error: ServiceError; ok: false },
      >