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

    Variable routeCriteriaLedgerAccountViewConst

    routeCriteriaLedgerAccountView: PgViewWithSelection<
        {
            existing: true;
            isAlias: false;
            name: "route_criteria_ledger_account";
            schema: "b2b";
            selectedFields: {
                criteria: PgBuildColumn<
                    "route_criteria_ledger_account",
                    Set$Type<
                        SetNotNull<PgJsonbBuilder>,
                        Record<
                            "MANUAL"
                            | "VICTOR"
                            | "*"
                            | "BIVO"
                            | "ROUTE_FUSION"
                            | "ZENUS",
                            Pick<
                                Partial<
                                    {
                                        bankId: string;
                                        cashDepositRetailerId: string;
                                        countryCode: string;
                                        customerId: string;
                                        customerStatus: NonNullable<
                                            (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...),
                                        >;
                                        dayOfWeek: number;
                                        entityStatus: NonNullable<
                                            (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...),
                                        >;
                                        entityType: "IDENTITY" | "ORGANIZATION";
                                        hasIdentityDocument: boolean;
                                        identityId: string;
                                        ledgerAccountBalance: string;
                                        ledgerAccountId: string;
                                        organizationId: string;
                                        paymentInstrumentProviders: ((...) | (...))[];
                                        paymentInstrumentStatus: NonNullable<
                                            (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...),
                                        >;
                                        placement: true;
                                        productId: string;
                                        programIds: string[];
                                        regionCode: string;
                                        sourceAmount: string;
                                        sourceChain: string;
                                        sourceCurrency: string;
                                        sourceWalletType: SourceWalletType;
                                        speed: Speed;
                                        systemInitiated: boolean;
                                        targetAmount: string;
                                        targetCurrency: string;
                                        timeOfDay: string;
                                        usage24hCount: string;
                                        usage24hUsd: string;
                                        usage30dCount: string;
                                        usage30dUsd: string;
                                        usage7dCount: string;
                                        usage7dUsd: string;
                                        usageCalendarMonthCount: string;
                                        usageCalendarMonthUsd: string;
                                        vendorId: Vendor;
                                        verificationByo: boolean;
                                        virtualAccountId: string;
                                        virtualAccountNumber: string;
                                        virtualAccountProvider: string;
                                        virtualAccountStatus: "PENDING" | "ACTIVE" | "FAILED" | "INACTIVE";
                                    },
                                >,
                                | "virtualAccountId"
                                | "virtualAccountProvider"
                                | "virtualAccountNumber"
                                | "virtualAccountStatus"
                                | "sourceWalletType"
                                | "ledgerAccountBalance",
                            >,
                        >,
                    >,
                    {
                        data: TData;
                        dataType: "object json";
                        driverParam: unknown;
                        enumValues: undefined;
                        generated: undefined;
                        hasDefault: false;
                        hasRuntimeDefault: false;
                        identity: undefined;
                        isAutoincrement: false;
                        isPrimaryKey: false;
                        name: string;
                        notNull: true;
                        tableName: "route_criteria_ledger_account";
                    },
                >;
                customerId: PgBuildColumn<
                    "route_criteria_ledger_account",
                    SetNotNull<PgTextBuilder<[string, ...string[]]>>,
                    {
                        data: string;
                        dataType: "string";
                        driverParam: string;
                        enumValues: undefined;
                        generated: undefined;
                        hasDefault: false;
                        hasRuntimeDefault: false;
                        identity: undefined;
                        isAutoincrement: false;
                        isPrimaryKey: false;
                        name: string;
                        notNull: true;
                        tableName: "route_criteria_ledger_account";
                    },
                >;
                ledgerAccountId: PgBuildColumn<
                    "route_criteria_ledger_account",
                    SetNotNull<PgTextBuilder<[string, ...string[]]>>,
                    {
                        data: string;
                        dataType: "string";
                        driverParam: string;
                        enumValues: undefined;
                        generated: undefined;
                        hasDefault: false;
                        hasRuntimeDefault: false;
                        identity: undefined;
                        isAutoincrement: false;
                        isPrimaryKey: false;
                        name: string;
                        notNull: true;
                        tableName: "route_criteria_ledger_account";
                    },
                >;
            };
        },
    > = ...

    A ledger account's VA keyed by provider ("*" = best of any); every entry carries sourceWalletType, and ledgerAccountBalance when the account has indexed MOVEUSD history. A wallet-less RF VA (routefusion_wallet_id NULL) reads PENDING; SQL last in 20261017011916_promoted_columns_view_readers.