/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { usageGetUsage } from "../../funcs/usageGetUsage.js";
import { RFCDate } from "../../types/rfcdate.js";
import { formatResult } from "../tools.js";
const args = {
    date: z.string().transform(v => new RFCDate(v)).optional(),
};
export const tool$usageGetUsage = {
    name: "get-usage-details",
    description: `Retrieves comprehensive usage metrics and account statistics

A report on the status of product environment usage, including storage, credits, bandwidth, requests, number of resources, and add-on usage.`,
    scopes: ["admin"],
    args,
    tool: async (client, args, ctx) => {
        const [result, apiCall] = await usageGetUsage(client, args.date, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        const value = result.value;
        return formatResult(value, apiCall);
    },
};
//# sourceMappingURL=usageGetUsage.js.map