/**
 * @file TypeScript typings for ImageVault
 *
 * The types in this file are based on the source maps of the downloaded
 * distribution at https://clientscript.imagevault.se/Installation/ImageVaultInsertMedia
 *
 * They have been clean up and amended to.
 */

import { z } from "zod"

import { imageVaultAssetSchema } from "@/server/routers/contentstack/schemas/imageVault"

import type { FocalPoint } from "./image"

export type ImageVaultAssetResponse = z.infer<typeof imageVaultAssetSchema>

export type ImageVaultAsset = {
  id: number
  title: string
  url: string
  dimensions: {
    width: number
    height: number
    aspectRatio: number
  }
  meta: { alt: string | undefined | null; caption: string | undefined | null }
  focalPoint: FocalPoint
}
