UNPKG

@vepler/safety-types

Version:

TypeScript type definitions for Vepler Safety Service API

49 lines (48 loc) 1.25 kB
/** * Types for /api/catalog/get-catalog endpoint */ /** * Query parameters for data catalog requests */ export interface GetCatalogQueryParams { /** Country code to filter by */ countryCode?: string; /** Only return available data periods */ onlyAvailable?: boolean; } /** * Data catalog response for a country */ export interface GetCatalogResponse { /** Country code */ country: string; /** Available data periods */ periods: Array<{ /** Period identifier */ period: string; /** Period type (monthly, yearly, etc) */ periodType: string; /** Whether data is available */ isAvailable: boolean; /** Whether maps have been generated */ mapsGenerated: boolean; /** Processing date */ processedDate?: string; }>; } /** * Error response for catalog operations */ export interface CatalogErrorResponse { /** Whether the operation was successful */ success: false; /** Error message */ error: string; /** Detailed validation errors if applicable */ details?: Array<{ /** Field that failed validation */ field: string; /** Error message for this field */ message: string; }>; }