listrawfilesop.ts•2.75 kB
/*
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
*/
import * as z from "zod";
import { ApiError, ApiError$zodSchema } from "./apierror.js";
import { Direction, Direction$zodSchema } from "./direction.js";
import { FieldsSpec, FieldsSpec$zodSchema } from "./fieldsspec.js";
import { ListResponse, ListResponse$zodSchema } from "./listresponse.js";
import {
ListStorageType,
ListStorageType$zodSchema,
} from "./liststoragetype.js";
export type ListRawFilesGlobals = { cloud_name?: string | undefined };
export const ListRawFilesGlobals$zodSchema: z.ZodType<
ListRawFilesGlobals,
z.ZodTypeDef,
unknown
> = z.object({
cloud_name: z.string().describe("The cloud name of your product environment.")
.optional(),
});
export type ListRawFilesRequest = {
type?: ListStorageType | undefined;
prefix?: string | undefined;
public_ids?: Array<string> | undefined;
tags?: boolean | undefined;
next_cursor?: string | undefined;
max_results?: number | undefined;
direction?: Direction | undefined;
start_at?: string | undefined;
fields?: Array<FieldsSpec> | undefined;
};
export const ListRawFilesRequest$zodSchema: z.ZodType<
ListRawFilesRequest,
z.ZodTypeDef,
unknown
> = z.object({
direction: Direction$zodSchema.optional(),
fields: z.array(FieldsSpec$zodSchema).optional(),
max_results: z.number().int().describe(
"Maximum number of results to return (1-500).",
).optional(),
next_cursor: z.string().describe("Cursor for pagination.").optional(),
prefix: z.string().describe(
"A public_id prefix. When specified, all assets with that prefix are returned. When using this, the `type` parameter must also be specified.",
).optional(),
public_ids: z.array(z.string()).describe("An array of public IDs to return.")
.optional(),
start_at: z.string().datetime({ offset: true }).describe(
"An ISO-8601 formatted timestamp. When specified, assets created since that timestamp are returned. Supported only if neither `prefix` nor `public_ids` were passed.",
).optional(),
tags: z.boolean().describe(
"Whether to include the list of tag names assigned to each asset. Default: false",
).optional(),
type: ListStorageType$zodSchema.optional(),
});
export type ListRawFilesResponse = {
ContentType: string;
StatusCode: number;
RawResponse: Response;
list_response?: ListResponse | undefined;
api_error?: ApiError | undefined;
};
export const ListRawFilesResponse$zodSchema: z.ZodType<
ListRawFilesResponse,
z.ZodTypeDef,
unknown
> = z.object({
ContentType: z.string(),
RawResponse: z.instanceof(Response),
StatusCode: z.number().int(),
api_error: ApiError$zodSchema.optional(),
list_response: ListResponse$zodSchema.optional(),
});