/* * Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT. * @generated-id: b3d5a7a42328 */ import * as z from "zod"; import { ClosedEnum } from "../types/enums.js"; /** * The type of access control to apply to the asset. */ export const AccessType = { Token: "token", Anonymous: "anonymous", } as const; /** * The type of access control to apply to the asset. */ export type AccessType = ClosedEnum; export const AccessType$zodSchema = z.enum([ "token", "anonymous", ]).describe("The type of access control to apply to the asset."); /** * The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp. */ export type Start = string | number; export const Start$zodSchema: z.ZodType = z.union([ z.string(), z.int(), ]).describe( "The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp.", ); /** * The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp. */ export type End = string | number; export const End$zodSchema: z.ZodType = z.union([ z.string(), z.int(), ]).describe( "The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp.", ); /** * Access control rule that defines when and how the asset can be accessed. */ export type AccessControlItem = { access_type: AccessType; key?: string | undefined; start?: string | number | undefined; end?: string | number | undefined; }; export const AccessControlItem$zodSchema: z.ZodType = z .object({ access_type: AccessType$zodSchema.describe( "The type of access control to apply to the asset.", ), end: z.union([ z.string(), z.int(), ]).optional().describe( "The end date and time when anonymous access expires. Accepts ISO 8601 string or Unix timestamp.", ), key: z.string().optional().describe( "The authentication key identifier for token-based access. Default key is used if not specified or if set to 'default'.", ), start: z.union([ z.string(), z.int(), ]).optional().describe( "The start date and time when anonymous access becomes available. Accepts ISO 8601 string or Unix timestamp.", ), }).describe( "Access control rule that defines when and how the asset can be accessed.", );