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

    Variable routeCriteriaEntityViewConst

    routeCriteriaEntityView: PgViewWithSelection<
        {
            existing: true;
            isAlias: false;
            name: "route_criteria_entity";
            schema: "b2b";
            selectedFields: {
                criteria: PgBuildColumn<
                    "route_criteria_entity",
                    Set$Type<
                        SetNotNull<PgJsonbBuilder>,
                        Pick<
                            Partial<
                                {
                                    bankId: string;
                                    cashDepositRetailerId: string;
                                    countryCode: string;
                                    customerId: string;
                                    customerStatus: NonNullable<
                                        | "DISABLED"
                                        | "DELETED"
                                        | "PENDING"
                                        | "ACTIVE"
                                        | "FAILED"
                                        | undefined,
                                    >;
                                    dayOfWeek: number;
                                    entityStatus: NonNullable<
                                        | "PENDING_VERIFICATION"
                                        | "ACTION_REQUIRED"
                                        | "APPROVED"
                                        | "REVIEW"
                                        | "DISABLED"
                                        | "BLOCKED"
                                        | "DELETED"
                                        | undefined,
                                    >;
                                    entityType: "IDENTITY"
                                    | "ORGANIZATION";
                                    hasIdentityDocument: boolean;
                                    identityId: string;
                                    ledgerAccountBalance: string;
                                    ledgerAccountId: string;
                                    organizationId: string;
                                    paymentInstrumentProviders: ("VICTOR" | "ROUTE_FUSION")[];
                                    paymentInstrumentStatus: NonNullable<
                                        | "PENDING_VERIFICATION"
                                        | "ACTION_REQUIRED"
                                        | "APPROVED"
                                        | "BLOCKED"
                                        | undefined,
                                    >;
                                    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";
                                },
                            >,
                            | "organizationId"
                            | "customerId"
                            | "identityId"
                            | "entityType"
                            | "countryCode"
                            | "hasIdentityDocument"
                            | "verificationByo"
                            | "entityStatus"
                            | "customerStatus",
                        >,
                    >,
                    {
                        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_entity";
                    },
                >;
                customerId: PgBuildColumn<
                    "route_criteria_entity",
                    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_entity";
                    },
                >;
                entityId: PgBuildColumn<
                    "route_criteria_entity",
                    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_entity";
                    },
                >;
                entityType: PgBuildColumn<
                    "route_criteria_entity",
                    Set$Type<
                        SetNotNull<PgTextBuilder<[string, ...string[]]>>,
                        NonNullable<"IDENTITY" | "ORGANIZATION" | undefined>,
                    >,
                    {
                        data: NonNullable;
                        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_entity";
                    },
                >;
            };
        },
    > = ...

    The entity-derived fields, one row per identity and per organization. Each kind emits only its own id key; every other key is always present.