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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    • Parameters

      • args: {
            customerId: string;
            deviceIpAddress: string | null;
            deviceLocation: { lat: number; long: number; source: "ip" } | null;
            entityId: string;
            expiresAt: Date;
            fees: (
                {
                    amount: BigNumber;
                    receiver: "CUSTOMER"
                    | "CFX"
                    | "PROVIDER";
                    type: "FIXED" | "VARIABLE";
                } & { currency: "MOVEUSD"
                | "USDC" }
            )[];
            metadata: {
                brand?: string;
                marketing?: {
                    fbp?: string;
                    gclid?: string;
                    sub1?: string;
                    sub2?: string;
                    sub3?: string;
                    userAgent?: string;
                    utmCampaign?: string;
                    utmContent?: string;
                    utmMedium?: string;
                    utmSource?: string;
                };
            };
            methodData: | {
                achBatchId?: string;
                bankId?: string;
                sourceLedgerAccountId?: string;
                speed?: "same-day"
                | "next-day";
                type: "US_ACH";
            }
            | {
                achId: string;
                bankId?: string;
                sourceLedgerAccountId?: string;
                type: "ACH_PULL";
            }
            | {
                bankId?: string;
                beneficiaryReference?: string;
                purpose: WireWithdrawalPurpose;
                senderMessage?: string;
                sourceLedgerAccountId: string;
                type: "US_WIRE"
                | "SWIFT_WIRE";
                wireBatchId?: string;
            }
            | {
                country: string;
                type: "AF_WITHDRAWAL";
                withdrawalType: "bank"
                | "momo";
            }
            | { sourceLedgerAccountId: string; type: "BLOCKCHAIN" }
            | { bankId?: string; sourceLedgerAccountId?: string; type: "US_INSTANT" }
            | {
                bankId?: string;
                drawdownId: string;
                sourceAccountId: string;
                type: "US_WIRE_DRAWDOWN";
            }
            | null;
            methodId: | "US_WIRE"
            | "SWIFT_WIRE"
            | "US_ACH"
            | "US_INSTANT"
            | "MX_SPEI"
            | "US_WIRE_DRAWDOWN"
            | "AF_WITHDRAWAL"
            | "ACH_PULL"
            | "BLOCKCHAIN";
            paymentInstrumentId: string;
            productQuoteId: string;
            providerQuoteId: string
            | null;
            sourceAmount: BigNumber;
            sourceAmountAfterFees: BigNumber;
            sourceCurrency: string;
            targetAmount: BigNumber;
            targetAmountAfterFees: BigNumber;
            targetCurrency: string;
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
            unsignedWithdrawalTransaction: string;
            walletAddress: Address;
            walletBlockchain: string;
        }

      Returns Promise<
          {
              createdAt: Date;
              customerId: string;
              deviceIpAddress: string
              | null;
              deviceLocation: { lat: number; long: number; source: "ip" } | null;
              entityId: string;
              expiresAt: Date;
              fees: (
                  {
                      amount: BigNumber;
                      receiver: "CUSTOMER"
                      | "CFX"
                      | "PROVIDER";
                      type: "FIXED" | "VARIABLE";
                  } & { currency: "MOVEUSD"
                  | "USDC" }
              )[];
              id: string;
              metadata: {
                  brand?: string;
                  marketing?: {
                      fbp?: string;
                      gclid?: string;
                      sub1?: string;
                      sub2?: string;
                      sub3?: string;
                      userAgent?: string;
                      utmCampaign?: string;
                      utmContent?: string;
                      utmMedium?: string;
                      utmSource?: string;
                  };
              };
              methodData: | {
                  achBatchId?: string;
                  bankId?: string;
                  sourceLedgerAccountId?: string;
                  speed?: "same-day"
                  | "next-day";
                  type: "US_ACH";
              }
              | {
                  achId: string;
                  bankId?: string;
                  sourceLedgerAccountId?: string;
                  type: "ACH_PULL";
              }
              | {
                  bankId?: string;
                  beneficiaryReference?: string;
                  purpose: WireWithdrawalPurpose;
                  senderMessage?: string;
                  sourceLedgerAccountId: string;
                  type: "US_WIRE"
                  | "SWIFT_WIRE";
                  wireBatchId?: string;
              }
              | {
                  country: string;
                  type: "AF_WITHDRAWAL";
                  withdrawalType: "bank"
                  | "momo";
              }
              | { sourceLedgerAccountId: string; type: "BLOCKCHAIN" }
              | { bankId?: string; sourceLedgerAccountId?: string; type: "US_INSTANT" }
              | {
                  bankId?: string;
                  drawdownId: string;
                  sourceAccountId: string;
                  type: "US_WIRE_DRAWDOWN";
              }
              | null;
              methodId: | "US_WIRE"
              | "SWIFT_WIRE"
              | "US_ACH"
              | "US_INSTANT"
              | "MX_SPEI"
              | "US_WIRE_DRAWDOWN"
              | "AF_WITHDRAWAL"
              | "ACH_PULL"
              | "BLOCKCHAIN";
              paymentInstrumentId: string;
              productQuoteId: string;
              providerQuoteId: string
              | null;
              sourceAmount: BigNumber;
              sourceAmountAfterFees: BigNumber;
              sourceCurrency: string;
              status: "ACTIVE" | "ACCEPTED" | "EXPIRED" | "REJECTED";
              targetAmount: BigNumber;
              targetAmountAfterFees: BigNumber;
              targetCurrency: string;
              unsignedWithdrawalTransaction: string;
              updatedAt: Date;
              walletAddress: Address;
              walletBlockchain: string;
          },
      >

    • Get a withdrawal by ID without customer restriction

      Parameters

      • __namedParameters: {
            id: string;
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
        }

      Returns Promise<
          {
              ok: true;
              value: | {
                  createdAt: Date;
                  customerId: string;
                  deviceIpAddress: string
                  | null;
                  deviceLocation: { lat: number; long: number; source: "ip" } | null;
                  entityId: string;
                  expiresAt: Date;
                  fees: (
                      {
                          amount: BigNumber;
                          receiver: "CUSTOMER"
                          | "CFX"
                          | "PROVIDER";
                          type: "FIXED" | "VARIABLE";
                      } & { currency: "MOVEUSD"
                      | "USDC" }
                  )[];
                  id: string;
                  metadata: {
                      brand?: string;
                      marketing?: {
                          fbp?: string;
                          gclid?: string;
                          sub1?: string;
                          sub2?: string;
                          sub3?: string;
                          userAgent?: string;
                          utmCampaign?: string;
                          utmContent?: string;
                          utmMedium?: string;
                          utmSource?: string;
                      };
                  };
                  methodData: | {
                      achBatchId?: string;
                      bankId?: string;
                      sourceLedgerAccountId?: string;
                      speed?: "same-day"
                      | "next-day";
                      type: "US_ACH";
                  }
                  | {
                      achId: string;
                      bankId?: string;
                      sourceLedgerAccountId?: string;
                      type: "ACH_PULL";
                  }
                  | {
                      bankId?: string;
                      beneficiaryReference?: string;
                      purpose: WireWithdrawalPurpose;
                      senderMessage?: string;
                      sourceLedgerAccountId: string;
                      type: "US_WIRE"
                      | "SWIFT_WIRE";
                      wireBatchId?: string;
                  }
                  | {
                      country: string;
                      type: "AF_WITHDRAWAL";
                      withdrawalType: "bank"
                      | "momo";
                  }
                  | { sourceLedgerAccountId: string; type: "BLOCKCHAIN" }
                  | { bankId?: string; sourceLedgerAccountId?: string; type: "US_INSTANT" }
                  | {
                      bankId?: string;
                      drawdownId: string;
                      sourceAccountId: string;
                      type: "US_WIRE_DRAWDOWN";
                  }
                  | null;
                  methodId: | "US_WIRE"
                  | "SWIFT_WIRE"
                  | "US_ACH"
                  | "US_INSTANT"
                  | "MX_SPEI"
                  | "US_WIRE_DRAWDOWN"
                  | "AF_WITHDRAWAL"
                  | "ACH_PULL"
                  | "BLOCKCHAIN";
                  paymentInstrumentId: string;
                  productQuoteId: string;
                  providerQuoteId: string
                  | null;
                  sourceAmount: BigNumber;
                  sourceAmountAfterFees: BigNumber;
                  sourceCurrency: string;
                  status: "ACTIVE" | "ACCEPTED" | "EXPIRED" | "REJECTED";
                  targetAmount: BigNumber;
                  targetAmountAfterFees: BigNumber;
                  targetCurrency: string;
                  unsignedWithdrawalTransaction: string;
                  updatedAt: Date;
                  walletAddress: Address;
                  walletBlockchain: string;
              }
              | null;
          },
      >

    • Admin search for withdrawals without customer restriction

      Parameters

      • __namedParameters: {
            createdAt?: DbTimestampCriteria;
            entityId?: string;
            id?: string[];
            methodId?: (
                | "US_WIRE"
                | "SWIFT_WIRE"
                | "US_ACH"
                | "US_INSTANT"
                | "MX_SPEI"
                | "US_WIRE_DRAWDOWN"
                | "AF_WITHDRAWAL"
                | "ACH_PULL"
                | "BLOCKCHAIN"
            )[];
            orderBy?: DbOrderByCriterion<
                Omit<
                    PgTableWithColumns<
                        {
                            columns: {
                                createdAt: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetHasDefault<SetNotNull<(...)>>,
                                    {
                                        data: Date;
                                        dataType: "object date";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                customerId: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgIntegerBuilder>,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...) | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                deviceIpAddress: PgBuildColumn<
                                    "withdrawal_quote",
                                    PgTextBuilder<[(...), ...(...)[]]>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                deviceLocation: PgBuildColumn<
                                    "withdrawal_quote",
                                    Set$Type<PgJsonbBuilder, { lat: ...; long: ...; source: ... }>,
                                    {
                                        data: { lat: ...; long: ...; source: ... };
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                expiresAt: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgTimestampBuilder>,
                                    {
                                        data: Date;
                                        dataType: "object date";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                externalId: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetHasRuntimeDefault<SetNotNull<(...)>>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                fees: PgBuildColumn<
                                    "withdrawal_quote",
                                    Set$Type<SetHasDefault<(...)>, (...)[]>,
                                    {
                                        data: (...)[];
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                id: PgBuildColumn<
                                    "withdrawal_quote",
                                    HasIdentity<SetIsPrimaryKey<(...)>, "byDefault">,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...) | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: "byDefault";
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                identityId: PgBuildColumn<
                                    "withdrawal_quote",
                                    PgIntegerBuilder,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...)
                                        | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                metadata: PgBuildColumn<
                                    "withdrawal_quote",
                                    Set$Type<SetHasDefault<(...)>, { brand?: ...; marketing?: ... }>,
                                    {
                                        data: { brand?: ...; marketing?: ... };
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                methodData: PgBuildColumn<
                                    "withdrawal_quote",
                                    Set$Type<
                                        PgJsonbBuilder,
                                        (...)
                                        | (...)
                                        | (...)
                                        | (...)
                                        | (...)
                                        | (...)
                                        | (...),
                                    >,
                                    {
                                        data: (...) | (...) | (...) | (...) | (...) | (...) | (...);
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                methodId: PgBuildColumn<
                                    "withdrawal_quote",
                                    Set$Type<
                                        SetNotNull<(...)>,

                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...),
                                    >,
                                    {
                                        data:
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...)
                                            | (...);
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                organizationId: PgBuildColumn<
                                    "withdrawal_quote",
                                    PgIntegerBuilder,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...)
                                        | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                paymentInstrumentId: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgIntegerBuilder>,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...) | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                productQuoteId: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgIntegerBuilder>,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...) | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                providerQuoteId: PgBuildColumn<
                                    "withdrawal_quote",
                                    PgTextBuilder<[(...), ...(...)[]]>,
                                    {
                                        data: string;
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                sourceAmount: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgNumericBuilder>,
                                    {
                                        data: string;
                                        dataType: "string numeric";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                sourceAmountAfterFees: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgNumericBuilder>,
                                    {
                                        data: string;
                                        dataType: "string numeric";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                sourceCurrency: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgTextBuilder<(...)>>,
                                    {
                                        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: "withdrawal_quote";
                                    },
                                >;
                                status: PgBuildColumn<
                                    "withdrawal_quote",
                                    Set$Type<SetNotNull<(...)>, (...) | (...) | (...) | (...)>,
                                    {
                                        data: (...) | (...) | (...) | (...);
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                targetAmount: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgNumericBuilder>,
                                    {
                                        data: string;
                                        dataType: "string numeric";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                targetAmountAfterFees: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgNumericBuilder>,
                                    {
                                        data: string;
                                        dataType: "string numeric";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                targetCurrency: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgTextBuilder<(...)>>,
                                    {
                                        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: "withdrawal_quote";
                                    },
                                >;
                                unsignedWithdrawalTransaction: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgTextBuilder<(...)>>,
                                    {
                                        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: "withdrawal_quote";
                                    },
                                >;
                                updatedAt: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetHasDefault<SetHasDefault<(...)>>,
                                    {
                                        data: Date;
                                        dataType: "object date";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                                walletAddress: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgTextBuilder<(...)>>,
                                    {
                                        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: "withdrawal_quote";
                                    },
                                >;
                                walletChainId: PgBuildColumn<
                                    "withdrawal_quote",
                                    SetNotNull<PgIntegerBuilder>,
                                    {
                                        data: number;
                                        dataType: "number int32";
                                        driverParam: (...) | (...);
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "withdrawal_quote";
                                    },
                                >;
                            };
                            dialect: "pg";
                            name: "withdrawal_quote";
                            schema: "b2b";
                        },
                    >,
                    "enableRLS",
                >,
                "createdAt"
                | "updatedAt",
            >[];
            page?: number;
            pageSize?: number;
            providerQuoteId?: string[];
            status?: ("ACTIVE" | "ACCEPTED" | "EXPIRED" | "REJECTED")[];
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
            updatedAt?: DbTimestampCriteria;
        }

      Returns Promise<
          {
              ok: true;
              value: {
                  createdAt: Date;
                  customerId: string;
                  deviceIpAddress: string
                  | null;
                  deviceLocation: { lat: number; long: number; source: "ip" } | null;
                  entityId: string;
                  expiresAt: Date;
                  fees: (
                      {
                          amount: BigNumber;
                          receiver: "CUSTOMER"
                          | "CFX"
                          | "PROVIDER";
                          type: "FIXED" | "VARIABLE";
                      } & { currency: "MOVEUSD"
                      | "USDC" }
                  )[];
                  id: string;
                  metadata: {
                      brand?: string;
                      marketing?: {
                          fbp?: string;
                          gclid?: string;
                          sub1?: string;
                          sub2?: string;
                          sub3?: string;
                          userAgent?: string;
                          utmCampaign?: string;
                          utmContent?: string;
                          utmMedium?: string;
                          utmSource?: string;
                      };
                  };
                  methodData: | {
                      achBatchId?: string;
                      bankId?: string;
                      sourceLedgerAccountId?: string;
                      speed?: "same-day"
                      | "next-day";
                      type: "US_ACH";
                  }
                  | {
                      achId: string;
                      bankId?: string;
                      sourceLedgerAccountId?: string;
                      type: "ACH_PULL";
                  }
                  | {
                      bankId?: string;
                      beneficiaryReference?: string;
                      purpose: WireWithdrawalPurpose;
                      senderMessage?: string;
                      sourceLedgerAccountId: string;
                      type: "US_WIRE"
                      | "SWIFT_WIRE";
                      wireBatchId?: string;
                  }
                  | {
                      country: string;
                      type: "AF_WITHDRAWAL";
                      withdrawalType: "bank"
                      | "momo";
                  }
                  | { sourceLedgerAccountId: string; type: "BLOCKCHAIN" }
                  | { bankId?: string; sourceLedgerAccountId?: string; type: "US_INSTANT" }
                  | {
                      bankId?: string;
                      drawdownId: string;
                      sourceAccountId: string;
                      type: "US_WIRE_DRAWDOWN";
                  }
                  | null;
                  methodId: | "US_WIRE"
                  | "SWIFT_WIRE"
                  | "US_ACH"
                  | "US_INSTANT"
                  | "MX_SPEI"
                  | "US_WIRE_DRAWDOWN"
                  | "AF_WITHDRAWAL"
                  | "ACH_PULL"
                  | "BLOCKCHAIN";
                  paymentInstrumentId: string;
                  productQuoteId: string;
                  providerQuoteId: string
                  | null;
                  sourceAmount: BigNumber;
                  sourceAmountAfterFees: BigNumber;
                  sourceCurrency: string;
                  status: "ACTIVE" | "ACCEPTED" | "EXPIRED" | "REJECTED";
                  targetAmount: BigNumber;
                  targetAmountAfterFees: BigNumber;
                  targetCurrency: string;
                  unsignedWithdrawalTransaction: string;
                  updatedAt: Date;
                  walletAddress: Address;
                  walletBlockchain: string;
              }[];
          },
      >

    • Parameters

      • args: {
            data: Partial<
                Simplify<
                    Pick<WithdrawalQuote, "status"> & {
                        achBatchId?: Required<
                            PickDeep<WithdrawalQuote["methodData"], "achBatchId">,
                        >["achBatchId"];
                        providerQuoteId?: WithdrawalQuote["providerQuoteId"];
                        wireBatchId?: PickDeep<WithdrawalQuote["methodData"], "wireBatchId">["wireBatchId"];
                    },
                >,
            >;
            id: string[];
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
        }

      Returns Promise<
          {
              ok: true;
              value: {
                  createdAt: Date;
                  customerId: string;
                  deviceIpAddress: string
                  | null;
                  deviceLocation: { lat: number; long: number; source: "ip" } | null;
                  entityId: string;
                  expiresAt: Date;
                  fees: (
                      {
                          amount: BigNumber;
                          receiver: "CUSTOMER"
                          | "CFX"
                          | "PROVIDER";
                          type: "FIXED" | "VARIABLE";
                      } & { currency: "MOVEUSD"
                      | "USDC" }
                  )[];
                  id: string;
                  metadata: {
                      brand?: string;
                      marketing?: {
                          fbp?: string;
                          gclid?: string;
                          sub1?: string;
                          sub2?: string;
                          sub3?: string;
                          userAgent?: string;
                          utmCampaign?: string;
                          utmContent?: string;
                          utmMedium?: string;
                          utmSource?: string;
                      };
                  };
                  methodData: | {
                      achBatchId?: string;
                      bankId?: string;
                      sourceLedgerAccountId?: string;
                      speed?: "same-day"
                      | "next-day";
                      type: "US_ACH";
                  }
                  | {
                      achId: string;
                      bankId?: string;
                      sourceLedgerAccountId?: string;
                      type: "ACH_PULL";
                  }
                  | {
                      bankId?: string;
                      beneficiaryReference?: string;
                      purpose: WireWithdrawalPurpose;
                      senderMessage?: string;
                      sourceLedgerAccountId: string;
                      type: "US_WIRE"
                      | "SWIFT_WIRE";
                      wireBatchId?: string;
                  }
                  | {
                      country: string;
                      type: "AF_WITHDRAWAL";
                      withdrawalType: "bank"
                      | "momo";
                  }
                  | { sourceLedgerAccountId: string; type: "BLOCKCHAIN" }
                  | { bankId?: string; sourceLedgerAccountId?: string; type: "US_INSTANT" }
                  | {
                      bankId?: string;
                      drawdownId: string;
                      sourceAccountId: string;
                      type: "US_WIRE_DRAWDOWN";
                  }
                  | null;
                  methodId: | "US_WIRE"
                  | "SWIFT_WIRE"
                  | "US_ACH"
                  | "US_INSTANT"
                  | "MX_SPEI"
                  | "US_WIRE_DRAWDOWN"
                  | "AF_WITHDRAWAL"
                  | "ACH_PULL"
                  | "BLOCKCHAIN";
                  paymentInstrumentId: string;
                  productQuoteId: string;
                  providerQuoteId: string
                  | null;
                  sourceAmount: BigNumber;
                  sourceAmountAfterFees: BigNumber;
                  sourceCurrency: string;
                  status: "ACTIVE" | "ACCEPTED" | "EXPIRED" | "REJECTED";
                  targetAmount: BigNumber;
                  targetAmountAfterFees: BigNumber;
                  targetCurrency: string;
                  unsignedWithdrawalTransaction: string;
                  updatedAt: Date;
                  walletAddress: Address;
                  walletBlockchain: string;
              }[];
          },
      >