/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 * @generated-id: ed13ba3617a1
 */
import * as z from "zod";
import { assetsListRawFiles } from "../../funcs/assetsListRawFiles.js";
import { DeliveryTypeAll$zodSchema } from "../../models/deliverytypeall.js";
import { DirectionEnum$zodSchema } from "../../models/directionenum.js";
import { Fields$zodSchema } from "../../models/fields.js";
import { formatResult } from "../tools.js";
import { appUri } from "../apps/uri.js";
const args = {
    type: DeliveryTypeAll$zodSchema.optional().describe(`The delivery type to filter by. When omitted, returns assets of all delivery types.`),
    prefix: z.string().describe("A public_id prefix. When specified, all assets with that prefix are returned.").optional(),
    public_ids: z.array(z.string()).describe("An array of public IDs to return.")
        .optional(),
    tags: z.boolean().default(false).describe("Whether to include the list of tag names assigned to each asset. Default is false."),
    next_cursor: z.string().describe("Cursor for pagination.").optional(),
    max_results: z.int().describe("Maximum number of results to return (1-500).")
        .optional(),
    direction: DirectionEnum$zodSchema.optional().describe(`The sort direction for the results. Default is "desc".`),
    start_at: z.iso.datetime({ offset: true }).describe("An ISO-8601 formatted timestamp. When specified, returns resources created since that timestamp. Supported only if neither `prefix` nor `public_ids` were passed.").optional(),
    fields: Fields$zodSchema.optional().describe(`Additional fields to include in the response. The fields public_id and asset_id are always included.`),
};
export const tool$assetsListRawFiles = {
    name: "list-files",
    description: `Get raw assets

Retrieves a list of raw assets. Results can be filtered by various criteria like tags, prefix, or specific public IDs.
`,
    scopes: ["librarian"],
    annotations: {
        "title": "List Files",
        "destructiveHint": false,
        "idempotentHint": true,
        "openWorldHint": false,
        "readOnlyHint": true,
    },
    _meta: {
        ui: { resourceUri: appUri("asset-gallery", "list-files") },
    },
    args,
    tool: async (client, args, ctx) => {
        const [result] = await assetsListRawFiles(client, args.type, args.prefix, args.public_ids, args.tags, args.next_cursor, args.max_results, args.direction, args.start_at, args.fields, { fetchOptions: { signal: ctx.signal } }).$inspect();
        if (!result.ok) {
            return {
                content: [{ type: "text", text: result.error.message }],
                isError: true,
            };
        }
        return formatResult(result.value);
    },
};
//# sourceMappingURL=assetsListRawFiles.js.map