Skip to content

armgit / spree

Public Imported from GitHub
0

Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.

1.4 KB
Raw Blame
// This file is auto-generated. Do not edit directly.
import { z } from 'zod';
import { CustomFieldSchema } from './CustomField';

export const MediaSchema = z.object({
  id: z.string(),
  product_id: z.string().nullable(),
  variant_ids: z.array(z.string()),
  position: z.number(),
  alt: z.string().nullable(),
  media_type: z.string(),
  external_video_url: z.string().nullable(),
  focal_point_x: z.number().nullable(),
  focal_point_y: z.number().nullable(),
  video_provider: z.string().nullable(),
  video_embed_url: z.string().nullable(),
  video_url: z.string().nullable(),
  poster_url: z.string().nullable(),
  original_url: z.string().nullable(),
  mini_url: z.string().nullable(),
  small_url: z.string().nullable(),
  medium_url: z.string().nullable(),
  large_url: z.string().nullable(),
  xlarge_url: z.string().nullable(),
  og_image_url: z.string().nullable(),
  custom_fields: z.array(CustomFieldSchema).optional(),
  external_references: z.record(z.string(), z.string()),
  created_at: z.string(),
  updated_at: z.string(),
  attached: z.boolean(),
  filename: z.string().nullable(),
  content_type: z.string().nullable(),
  byte_size: z.number().nullable(),
  embed_url: z.string().nullable(),
  signed_id: z.string().nullable(),
  viewable_id: z.string().nullable(),
  download_url: z.string().nullable(),
  metadata: z.record(z.string(), z.unknown()),
  viewable_type: z.string().nullable(),
});

export type Media = z.infer<typeof MediaSchema>;