/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { sweepsCreateConfig } from "../funcs/sweepsCreateConfig.js"; import { sweepsGet } from "../funcs/sweepsGet.js"; import { sweepsGetConfig } from "../funcs/sweepsGetConfig.js"; import { sweepsList } from "../funcs/sweepsList.js"; import { sweepsListConfigs } from "../funcs/sweepsListConfigs.js"; import { sweepsUpdateConfig } from "../funcs/sweepsUpdateConfig.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; export class Sweeps extends ClientSDK { /** * Create a sweep config for a wallet. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/wallets.write` scope. */ async createConfig( request: operations.CreateSweepConfigRequest, options?: RequestOptions, ): Promise { return unwrapAsync(sweepsCreateConfig( this, request, options, )); } /** * List sweep configs associated with an account. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/wallets.read` scope. */ async listConfigs( request: operations.ListSweepConfigsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(sweepsListConfigs( this, request, options, )); } /** * Get a sweep config associated with a wallet. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/wallets.read` scope. */ async getConfig( request: operations.GetSweepConfigRequest, options?: RequestOptions, ): Promise { return unwrapAsync(sweepsGetConfig( this, request, options, )); } /** * Update settings on a sweep config. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/wallets.write` scope. */ async updateConfig( request: operations.UpdateSweepConfigRequest, options?: RequestOptions, ): Promise { return unwrapAsync(sweepsUpdateConfig( this, request, options, )); } /** * List sweeps associated with a wallet. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/wallets.read` scope. */ async list( request: operations.ListSweepsRequest, options?: RequestOptions, ): Promise { return unwrapAsync(sweepsList( this, request, options, )); } /** * Get details on a specific sweep. * * To access this endpoint using an [access token](https://docs.moov.io/api/authentication/access-tokens/) * you'll need to specify the `/accounts/{accountID}/wallets.read` scope. */ async get( request: operations.GetSweepRequest, options?: RequestOptions, ): Promise { return unwrapAsync(sweepsGet( this, request, options, )); } }