I have a custom validator
export const propertyAssetsValidator = v.array(
v.object({
property_id: schema.tables.property_assets.validator.fields.property_id,
asset_url: schema.tables.property_assets.validator.fields.asset_url,
asset_type: v.union(v.literal('document'), v.literal('image'), v.literal('video')),
is_primary: schema.tables.property_assets.validator.fields.is_primary,
display_order: schema.tables.property_assets.validator.fields.display_order,
asset_category: v.optional(
v.union(
v.literal('property_image'),
v.literal('floor_plan'),
v.literal('brochure'),
v.literal('other')
)
),
description: schema.tables.property_assets.validator.fields.description
})
);
I want to use it to type my function
import propertyAssetsValidator from '../convex/addPropertyAssets';
function generateItems(
propertyId: propertyAssetsValidator,
listingName: string,
documents: string[],
floorPlans: string[],
images: number
)