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

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    Methods

    Constructors

    Properties

    Methods

    • Parameters

      • args: {
            data?: Omit<
                { idempotencyKey?: string } & (
                    | {
                        merchantId?: string;
                        retailChain?: string;
                        retailerName?: string;
                        storeAddress1?: string;
                        storeAddress2?: string;
                        storeCity?: string;
                        storeCounty?: string;
                        storeLatitude?: string;
                        storeLongitude?: string;
                        storeName?: string;
                        storeNumber?: string;
                        storeState?: string;
                        storeTransactionDate?: string;
                        storeZipcode?: string;
                        type: "CASH";
                    }
                    | { type: "US_WIRE" }
                    | { type: "SWIFT_WIRE" }
                    | { type: "US_BANK_ACH" }
                    | { type: "RTP" }
                    | { type: "ACH_CREDIT" }
                ),
                "idempotencyKey",
            >;
            idempotencyKey: string;
            quoteId: string;
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
        }

      Returns Promise<Deposit>

    • Get a deposit by ID without customer restriction

      Parameters

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

      Returns Promise<{ ok: true; value: Deposit | null }>

    • Admin search for deposits without customer restriction

      Parameters

      • __namedParameters: {
            achBatchId?: string;
            createdAt?: DbTimestampCriteria;
            customerId?: string;
            entityIds?: string[];
            ids?: string[];
            includeHistory?: boolean;
            orderBy?: DbOrderByCriterion<
                Omit<
                    PgTableWithColumns<
                        {
                            columns: {
                                amount: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                createdAt: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                currency: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                customerId: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                data: PgBuildColumn<
                                    "deposit",
                                    Set$Type<SetNotNull<(...)>, (...) & (...)>,
                                    {
                                        data: (...) & (...);
                                        dataType: "object json";
                                        driverParam: unknown;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "deposit";
                                    },
                                >;
                                depositQuoteId: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                externalId: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                feeSweepTxId: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                feeSweepTxType: PgBuildColumn<
                                    "deposit",
                                    Set$Type<PgTextBuilder<(...)>, "SOLANA_TRANSACTION_SIGNATURE">,
                                    {
                                        data: "SOLANA_TRANSACTION_SIGNATURE";
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "deposit";
                                    },
                                >;
                                id: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                receiptId: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                                receiptType: PgBuildColumn<
                                    "deposit",
                                    Set$Type<PgTextBuilder<(...)>, (...) | (...)>,
                                    {
                                        data: (...) | (...);
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: false;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: false;
                                        tableName: "deposit";
                                    },
                                >;
                                status: PgBuildColumn<
                                    "deposit",
                                    SetHasDefault<SetNotNull<(...)>>,
                                    {
                                        data: (...) | (...) | (...) | (...);
                                        dataType: "string";
                                        driverParam: string;
                                        enumValues: undefined;
                                        generated: undefined;
                                        hasDefault: true;
                                        hasRuntimeDefault: false;
                                        identity: undefined;
                                        isAutoincrement: false;
                                        isPrimaryKey: false;
                                        name: string;
                                        notNull: true;
                                        tableName: "deposit";
                                    },
                                >;
                                updatedAt: PgBuildColumn<
                                    "deposit",
                                    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: "deposit";
                                    },
                                >;
                            };
                            dialect: "pg";
                            name: "deposit";
                            schema: "b2b";
                        },
                    >,
                    "enableRLS",
                >,
                "createdAt"
                | "updatedAt",
            >[];
            page?: number;
            pageSize?: number;
            statuses?: ("PENDING" | "PROCESSING" | "CANCELLED" | "DEPOSITED")[];
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
            types?: (
                | "RTP"
                | "US_WIRE"
                | "US_BANK_ACH"
                | "CASH"
                | "SWIFT_WIRE"
                | "ACH_CREDIT"
            )[];
            updatedAt?: DbTimestampCriteria;
        }

      Returns Promise<{ ok: true; value: { hasNext: boolean; items: Deposit[] } }>

    • Parameters

      • args: {
            data: {
                feeSweepTxId?: string | null;
                feeSweepTxType?: "SOLANA_TRANSACTION_SIGNATURE" | null;
                receiptId?: string | null;
                receiptType?: "SOLANA_TRANSACTION_SIGNATURE" | null;
                status?: "PENDING" | "PROCESSING" | "CANCELLED" | "DEPOSITED";
                storeData?: Partial<
                    Omit<
                        { idempotencyKey?: string } & {
                            merchantId?: string;
                            retailChain?: string;
                            retailerName?: string;
                            storeAddress1?: string;
                            storeAddress2?: string;
                            storeCity?: string;
                            storeCounty?: string;
                            storeLatitude?: string;
                            storeLongitude?: string;
                            storeName?: string;
                            storeNumber?: string;
                            storeState?: string;
                            storeTransactionDate?: string;
                            storeZipcode?: string;
                            type: "CASH";
                        },
                        "type"
                        | "idempotencyKey",
                    >,
                >;
            };
            id: string;
            reason?: string;
            tx?: PgAsyncTransaction<
                PostgresJsQueryResultHKT,
                __module,
                EmptyRelations,
                ExtractTablesWithRelations<__module>,
            >;
        }
        • data: {
              feeSweepTxId?: string | null;
              feeSweepTxType?: "SOLANA_TRANSACTION_SIGNATURE" | null;
              receiptId?: string | null;
              receiptType?: "SOLANA_TRANSACTION_SIGNATURE" | null;
              status?: "PENDING" | "PROCESSING" | "CANCELLED" | "DEPOSITED";
              storeData?: Partial<
                  Omit<
                      { idempotencyKey?: string } & {
                          merchantId?: string;
                          retailChain?: string;
                          retailerName?: string;
                          storeAddress1?: string;
                          storeAddress2?: string;
                          storeCity?: string;
                          storeCounty?: string;
                          storeLatitude?: string;
                          storeLongitude?: string;
                          storeName?: string;
                          storeNumber?: string;
                          storeState?: string;
                          storeTransactionDate?: string;
                          storeZipcode?: string;
                          type: "CASH";
                      },
                      "type"
                      | "idempotencyKey",
                  >,
              >;
          }
        • id: string
        • Optionalreason?: string

          Operator-entered reason, recorded on the status transition.

        • Optionaltx?: PgAsyncTransaction<
              PostgresJsQueryResultHKT,
              __module,
              EmptyRelations,
              ExtractTablesWithRelations<__module>,
          >

      Returns Promise<void>