/*
 * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
 */
import * as z from "zod";
import { remap as remap$ } from "../../lib/primitives.js";
import { safeParse } from "../../lib/schemas.js";
import * as components from "../components/index.js";
/**
 * The delivery type. Necessary for prefix filtering.
 */
export const ListRawFilesType = {
    Upload: "upload",
    Private: "private",
    Authenticated: "authenticated",
    List: "list",
};
/** @internal */
export const ListRawFilesGlobals$inboundSchema = z.object({
    cloud_name: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        "cloud_name": "cloudName",
    });
});
/** @internal */
export const ListRawFilesGlobals$outboundSchema = z.object({
    cloudName: z.string().optional(),
}).transform((v) => {
    return remap$(v, {
        cloudName: "cloud_name",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListRawFilesGlobals$;
(function (ListRawFilesGlobals$) {
    /** @deprecated use `ListRawFilesGlobals$inboundSchema` instead. */
    ListRawFilesGlobals$.inboundSchema = ListRawFilesGlobals$inboundSchema;
    /** @deprecated use `ListRawFilesGlobals$outboundSchema` instead. */
    ListRawFilesGlobals$.outboundSchema = ListRawFilesGlobals$outboundSchema;
})(ListRawFilesGlobals$ || (ListRawFilesGlobals$ = {}));
export function listRawFilesGlobalsToJSON(listRawFilesGlobals) {
    return JSON.stringify(ListRawFilesGlobals$outboundSchema.parse(listRawFilesGlobals));
}
export function listRawFilesGlobalsFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListRawFilesGlobals$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListRawFilesGlobals' from JSON`);
}
/** @internal */
export const ListRawFilesType$inboundSchema = z.nativeEnum(ListRawFilesType);
/** @internal */
export const ListRawFilesType$outboundSchema = ListRawFilesType$inboundSchema;
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListRawFilesType$;
(function (ListRawFilesType$) {
    /** @deprecated use `ListRawFilesType$inboundSchema` instead. */
    ListRawFilesType$.inboundSchema = ListRawFilesType$inboundSchema;
    /** @deprecated use `ListRawFilesType$outboundSchema` instead. */
    ListRawFilesType$.outboundSchema = ListRawFilesType$outboundSchema;
})(ListRawFilesType$ || (ListRawFilesType$ = {}));
/** @internal */
export const ListRawFilesRequest$inboundSchema = z.object({
    type: ListRawFilesType$inboundSchema.optional(),
    prefix: z.string().optional(),
    public_ids: z.array(z.string()).optional(),
    tags: z.boolean().optional(),
    next_cursor: z.string().optional(),
    max_results: z.number().int().optional(),
    direction: components.Direction$inboundSchema.optional(),
    start_at: z.string().datetime({ offset: true }).transform(v => new Date(v))
        .optional(),
    fields: z.array(components.FieldsSpec$inboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        "public_ids": "publicIds",
        "next_cursor": "nextCursor",
        "max_results": "maxResults",
        "start_at": "startAt",
    });
});
/** @internal */
export const ListRawFilesRequest$outboundSchema = z.object({
    type: ListRawFilesType$outboundSchema.optional(),
    prefix: z.string().optional(),
    publicIds: z.array(z.string()).optional(),
    tags: z.boolean().optional(),
    nextCursor: z.string().optional(),
    maxResults: z.number().int().optional(),
    direction: components.Direction$outboundSchema.optional(),
    startAt: z.date().transform(v => v.toISOString()).optional(),
    fields: z.array(components.FieldsSpec$outboundSchema).optional(),
}).transform((v) => {
    return remap$(v, {
        publicIds: "public_ids",
        nextCursor: "next_cursor",
        maxResults: "max_results",
        startAt: "start_at",
    });
});
/**
 * @internal
 * @deprecated This namespace will be removed in future versions. Use schemas and types that are exported directly from this module.
 */
export var ListRawFilesRequest$;
(function (ListRawFilesRequest$) {
    /** @deprecated use `ListRawFilesRequest$inboundSchema` instead. */
    ListRawFilesRequest$.inboundSchema = ListRawFilesRequest$inboundSchema;
    /** @deprecated use `ListRawFilesRequest$outboundSchema` instead. */
    ListRawFilesRequest$.outboundSchema = ListRawFilesRequest$outboundSchema;
})(ListRawFilesRequest$ || (ListRawFilesRequest$ = {}));
export function listRawFilesRequestToJSON(listRawFilesRequest) {
    return JSON.stringify(ListRawFilesRequest$outboundSchema.parse(listRawFilesRequest));
}
export function listRawFilesRequestFromJSON(jsonString) {
    return safeParse(jsonString, (x) => ListRawFilesRequest$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'ListRawFilesRequest' from JSON`);
}
//# sourceMappingURL=listrawfiles.js.map