/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. */ import { reportsCreate } from "../funcs/reportsCreate.js"; import { reportsGet } from "../funcs/reportsGet.js"; import { reportsList } from "../funcs/reportsList.js"; import { reportsPut } from "../funcs/reportsPut.js"; import { ClientSDK, RequestOptions } from "../lib/sdks.js"; import * as components from "../models/components/index.js"; import * as operations from "../models/operations/index.js"; import { unwrapAsync } from "../types/fp.js"; import { PageIterator, unwrapResultIterator } from "../types/operations.js"; import { Executions } from "./executions.js"; export class Reports extends ClientSDK { private _executions?: Executions; get executions(): Executions { return (this._executions ??= new Executions(this._options)); } /** * List configured reports * * @remarks * List all configured reports that can be generated. */ async list( request?: operations.ListReportsRequest | undefined, options?: RequestOptions, ): Promise> { return unwrapResultIterator(reportsList( this, request, options, )); } /** * Add a report * * @remarks * Create a new report. */ async create( reportCreate: components.ReportCreate, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(reportsCreate( this, reportCreate, merchantAccountId, options, )); } /** * Get a report * * @remarks * Fetches a report by its ID. */ async get( reportId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(reportsGet( this, reportId, merchantAccountId, options, )); } /** * Update a report * * @remarks * Updates the configuration of a report. */ async put( reportUpdate: components.ReportUpdate, reportId: string, merchantAccountId?: string | null | undefined, options?: RequestOptions, ): Promise { return unwrapAsync(reportsPut( this, reportUpdate, reportId, merchantAccountId, options, )); } }