Replace manually maintained types in src/lib/types.ts with auto-generated types from FastAPI's OpenAPI schema using @hey-api/openapi-ts. The bridge file re-exports generated types with renames, Require<> augmentations for fields that are optional in the schema but always present in responses, and manually added relationship fields excluded from OpenAPI. - Add openapi-ts.config.ts and generate:api npm script - Generate types into src/lib/api/generated/types.gen.ts - Rewrite src/lib/types.ts as bridge with re-exports and augmentations - Fix null vs undefined mismatches in consumer components - Remove unused manual type definitions from api.ts - Update AGENTS.md docs with type generation workflow
3 lines
12 KiB
TypeScript
3 lines
12 KiB
TypeScript
// This file is auto-generated by @hey-api/openapi-ts
|
|
|
|
export type { AbsorptionSpeed, ActiveIngredient, AddStepRoutinesRoutineIdStepsPostData, AddStepRoutinesRoutineIdStepsPostError, AddStepRoutinesRoutineIdStepsPostErrors, AddStepRoutinesRoutineIdStepsPostResponse, AddStepRoutinesRoutineIdStepsPostResponses, AiCallLog, AiCallLogPublic, AnalyzeSkinPhotosSkincareAnalyzePhotosPostData, AnalyzeSkinPhotosSkincareAnalyzePhotosPostError, AnalyzeSkinPhotosSkincareAnalyzePhotosPostErrors, AnalyzeSkinPhotosSkincareAnalyzePhotosPostResponse, AnalyzeSkinPhotosSkincareAnalyzePhotosPostResponses, BarrierState, BatchSuggestion, BodyAnalyzeSkinPhotosSkincareAnalyzePhotosPost, ClientOptions, CreateGroomingScheduleRoutinesGroomingSchedulePostData, CreateGroomingScheduleRoutinesGroomingSchedulePostError, CreateGroomingScheduleRoutinesGroomingSchedulePostErrors, CreateGroomingScheduleRoutinesGroomingSchedulePostResponse, CreateGroomingScheduleRoutinesGroomingSchedulePostResponses, CreateLabResultHealthLabResultsPostData, CreateLabResultHealthLabResultsPostError, CreateLabResultHealthLabResultsPostErrors, CreateLabResultHealthLabResultsPostResponse, CreateLabResultHealthLabResultsPostResponses, CreateMedicationHealthMedicationsPostData, CreateMedicationHealthMedicationsPostError, CreateMedicationHealthMedicationsPostErrors, CreateMedicationHealthMedicationsPostResponse, CreateMedicationHealthMedicationsPostResponses, CreateProductInventoryProductsProductIdInventoryPostData, CreateProductInventoryProductsProductIdInventoryPostError, CreateProductInventoryProductsProductIdInventoryPostErrors, CreateProductInventoryProductsProductIdInventoryPostResponse, CreateProductInventoryProductsProductIdInventoryPostResponses, CreateProductProductsPostData, CreateProductProductsPostError, CreateProductProductsPostErrors, CreateProductProductsPostResponse, CreateProductProductsPostResponses, CreateRoutineRoutinesPostData, CreateRoutineRoutinesPostError, CreateRoutineRoutinesPostErrors, CreateRoutineRoutinesPostResponse, CreateRoutineRoutinesPostResponses, CreateSnapshotSkincarePostData, CreateSnapshotSkincarePostError, CreateSnapshotSkincarePostErrors, CreateSnapshotSkincarePostResponse, CreateSnapshotSkincarePostResponses, CreateUsageHealthMedicationsMedicationIdUsagesPostData, CreateUsageHealthMedicationsMedicationIdUsagesPostError, CreateUsageHealthMedicationsMedicationIdUsagesPostErrors, CreateUsageHealthMedicationsMedicationIdUsagesPostResponse, CreateUsageHealthMedicationsMedicationIdUsagesPostResponses, DayPlan, DayTime, DeleteGroomingScheduleRoutinesGroomingScheduleEntryIdDeleteData, DeleteGroomingScheduleRoutinesGroomingScheduleEntryIdDeleteError, DeleteGroomingScheduleRoutinesGroomingScheduleEntryIdDeleteErrors, DeleteGroomingScheduleRoutinesGroomingScheduleEntryIdDeleteResponse, DeleteGroomingScheduleRoutinesGroomingScheduleEntryIdDeleteResponses, DeleteInventoryInventoryInventoryIdDeleteData, DeleteInventoryInventoryInventoryIdDeleteError, DeleteInventoryInventoryInventoryIdDeleteErrors, DeleteInventoryInventoryInventoryIdDeleteResponse, DeleteInventoryInventoryInventoryIdDeleteResponses, DeleteLabResultHealthLabResultsResultIdDeleteData, DeleteLabResultHealthLabResultsResultIdDeleteError, DeleteLabResultHealthLabResultsResultIdDeleteErrors, DeleteLabResultHealthLabResultsResultIdDeleteResponse, DeleteLabResultHealthLabResultsResultIdDeleteResponses, DeleteMedicationHealthMedicationsMedicationIdDeleteData, DeleteMedicationHealthMedicationsMedicationIdDeleteError, DeleteMedicationHealthMedicationsMedicationIdDeleteErrors, DeleteMedicationHealthMedicationsMedicationIdDeleteResponse, DeleteMedicationHealthMedicationsMedicationIdDeleteResponses, DeleteProductProductsProductIdDeleteData, DeleteProductProductsProductIdDeleteError, DeleteProductProductsProductIdDeleteErrors, DeleteProductProductsProductIdDeleteResponse, DeleteProductProductsProductIdDeleteResponses, DeleteRoutineRoutinesRoutineIdDeleteData, DeleteRoutineRoutinesRoutineIdDeleteError, DeleteRoutineRoutinesRoutineIdDeleteErrors, DeleteRoutineRoutinesRoutineIdDeleteResponse, DeleteRoutineRoutinesRoutineIdDeleteResponses, DeleteSnapshotSkincareSnapshotIdDeleteData, DeleteSnapshotSkincareSnapshotIdDeleteError, DeleteSnapshotSkincareSnapshotIdDeleteErrors, DeleteSnapshotSkincareSnapshotIdDeleteResponse, DeleteSnapshotSkincareSnapshotIdDeleteResponses, DeleteStepRoutinesStepsStepIdDeleteData, DeleteStepRoutinesStepsStepIdDeleteError, DeleteStepRoutinesStepsStepIdDeleteErrors, DeleteStepRoutinesStepsStepIdDeleteResponse, DeleteStepRoutinesStepsStepIdDeleteResponses, DeleteUsageHealthUsagesUsageIdDeleteData, DeleteUsageHealthUsagesUsageIdDeleteError, DeleteUsageHealthUsagesUsageIdDeleteErrors, DeleteUsageHealthUsagesUsageIdDeleteResponse, DeleteUsageHealthUsagesUsageIdDeleteResponses, GetAiLogAiLogsLogIdGetData, GetAiLogAiLogsLogIdGetError, GetAiLogAiLogsLogIdGetErrors, GetAiLogAiLogsLogIdGetResponse, GetAiLogAiLogsLogIdGetResponses, GetInventoryInventoryInventoryIdGetData, GetInventoryInventoryInventoryIdGetError, GetInventoryInventoryInventoryIdGetErrors, GetInventoryInventoryInventoryIdGetResponse, GetInventoryInventoryInventoryIdGetResponses, GetLabResultHealthLabResultsResultIdGetData, GetLabResultHealthLabResultsResultIdGetError, GetLabResultHealthLabResultsResultIdGetErrors, GetLabResultHealthLabResultsResultIdGetResponse, GetLabResultHealthLabResultsResultIdGetResponses, GetMedicationHealthMedicationsMedicationIdGetData, GetMedicationHealthMedicationsMedicationIdGetError, GetMedicationHealthMedicationsMedicationIdGetErrors, GetMedicationHealthMedicationsMedicationIdGetResponse, GetMedicationHealthMedicationsMedicationIdGetResponses, GetProductProductsProductIdGetData, GetProductProductsProductIdGetError, GetProductProductsProductIdGetErrors, GetProductProductsProductIdGetResponse, GetProductProductsProductIdGetResponses, GetProfileProfileGetData, GetProfileProfileGetResponse, GetProfileProfileGetResponses, GetRoutineRoutinesRoutineIdGetData, GetRoutineRoutinesRoutineIdGetError, GetRoutineRoutinesRoutineIdGetErrors, GetRoutineRoutinesRoutineIdGetResponses, GetSnapshotSkincareSnapshotIdGetData, GetSnapshotSkincareSnapshotIdGetError, GetSnapshotSkincareSnapshotIdGetErrors, GetSnapshotSkincareSnapshotIdGetResponse, GetSnapshotSkincareSnapshotIdGetResponses, GroomingAction, GroomingSchedule, GroomingScheduleCreate, GroomingScheduleUpdate, HealthCheckHealthCheckGetData, HealthCheckHealthCheckGetResponses, HttpValidationError, IngredientFunction, InventoryCreate, InventoryUpdate, LabResult, LabResultCreate, LabResultListResponse, LabResultUpdate, ListAiLogsAiLogsGetData, ListAiLogsAiLogsGetError, ListAiLogsAiLogsGetErrors, ListAiLogsAiLogsGetResponse, ListAiLogsAiLogsGetResponses, ListGroomingScheduleRoutinesGroomingScheduleGetData, ListGroomingScheduleRoutinesGroomingScheduleGetResponse, ListGroomingScheduleRoutinesGroomingScheduleGetResponses, ListLabResultsHealthLabResultsGetData, ListLabResultsHealthLabResultsGetError, ListLabResultsHealthLabResultsGetErrors, ListLabResultsHealthLabResultsGetResponse, ListLabResultsHealthLabResultsGetResponses, ListMedicationsHealthMedicationsGetData, ListMedicationsHealthMedicationsGetError, ListMedicationsHealthMedicationsGetErrors, ListMedicationsHealthMedicationsGetResponse, ListMedicationsHealthMedicationsGetResponses, ListProductInventoryProductsProductIdInventoryGetData, ListProductInventoryProductsProductIdInventoryGetError, ListProductInventoryProductsProductIdInventoryGetErrors, ListProductInventoryProductsProductIdInventoryGetResponse, ListProductInventoryProductsProductIdInventoryGetResponses, ListProductsProductsGetData, ListProductsProductsGetError, ListProductsProductsGetErrors, ListProductsProductsGetResponse, ListProductsProductsGetResponses, ListProductsSummaryProductsSummaryGetData, ListProductsSummaryProductsSummaryGetError, ListProductsSummaryProductsSummaryGetErrors, ListProductsSummaryProductsSummaryGetResponse, ListProductsSummaryProductsSummaryGetResponses, ListRoutinesRoutinesGetData, ListRoutinesRoutinesGetError, ListRoutinesRoutinesGetErrors, ListRoutinesRoutinesGetResponses, ListSnapshotsSkincareGetData, ListSnapshotsSkincareGetError, ListSnapshotsSkincareGetErrors, ListSnapshotsSkincareGetResponse, ListSnapshotsSkincareGetResponses, ListUsagesHealthMedicationsMedicationIdUsagesGetData, ListUsagesHealthMedicationsMedicationIdUsagesGetError, ListUsagesHealthMedicationsMedicationIdUsagesGetErrors, ListUsagesHealthMedicationsMedicationIdUsagesGetResponse, ListUsagesHealthMedicationsMedicationIdUsagesGetResponses, MedicationCreate, MedicationEntry, MedicationKind, MedicationUpdate, MedicationUsage, OverallSkinState, ParseProductTextProductsParseTextPostData, ParseProductTextProductsParseTextPostError, ParseProductTextProductsParseTextPostErrors, ParseProductTextProductsParseTextPostResponse, ParseProductTextProductsParseTextPostResponses, PartOfDay, PriceTier, ProductCategory, ProductContext, ProductCreate, ProductEffectProfile, ProductInventory, ProductListItem, ProductParseRequest, ProductParseResponse, ProductPublic, ProductSuggestion, ProductUpdate, ProductWithInventory, RemainingLevel, ResponseMetadata, ResultFlag, Routine, RoutineCreate, RoutineStep, RoutineStepCreate, RoutineStepUpdate, RoutineSuggestion, RoutineSuggestionSummary, RoutineUpdate, SexAtBirth, ShoppingSuggestionResponse, SkinConcern, SkinConditionSnapshotPublic, SkinPhotoAnalysisResponse, SkinTexture, SkinType, SnapshotCreate, SnapshotUpdate, StrengthLevel, SuggestBatchRequest, SuggestBatchRoutinesSuggestBatchPostData, SuggestBatchRoutinesSuggestBatchPostError, SuggestBatchRoutinesSuggestBatchPostErrors, SuggestBatchRoutinesSuggestBatchPostResponse, SuggestBatchRoutinesSuggestBatchPostResponses, SuggestedStep, SuggestRoutineRequest, SuggestRoutineRoutinesSuggestPostData, SuggestRoutineRoutinesSuggestPostError, SuggestRoutineRoutinesSuggestPostErrors, SuggestRoutineRoutinesSuggestPostResponse, SuggestRoutineRoutinesSuggestPostResponses, SuggestShoppingProductsSuggestPostData, SuggestShoppingProductsSuggestPostResponse, SuggestShoppingProductsSuggestPostResponses, TextureType, TokenMetrics, UpdateGroomingScheduleRoutinesGroomingScheduleEntryIdPatchData, UpdateGroomingScheduleRoutinesGroomingScheduleEntryIdPatchError, UpdateGroomingScheduleRoutinesGroomingScheduleEntryIdPatchErrors, UpdateGroomingScheduleRoutinesGroomingScheduleEntryIdPatchResponse, UpdateGroomingScheduleRoutinesGroomingScheduleEntryIdPatchResponses, UpdateInventoryInventoryInventoryIdPatchData, UpdateInventoryInventoryInventoryIdPatchError, UpdateInventoryInventoryInventoryIdPatchErrors, UpdateInventoryInventoryInventoryIdPatchResponse, UpdateInventoryInventoryInventoryIdPatchResponses, UpdateLabResultHealthLabResultsResultIdPatchData, UpdateLabResultHealthLabResultsResultIdPatchError, UpdateLabResultHealthLabResultsResultIdPatchErrors, UpdateLabResultHealthLabResultsResultIdPatchResponse, UpdateLabResultHealthLabResultsResultIdPatchResponses, UpdateMedicationHealthMedicationsMedicationIdPatchData, UpdateMedicationHealthMedicationsMedicationIdPatchError, UpdateMedicationHealthMedicationsMedicationIdPatchErrors, UpdateMedicationHealthMedicationsMedicationIdPatchResponse, UpdateMedicationHealthMedicationsMedicationIdPatchResponses, UpdateProductProductsProductIdPatchData, UpdateProductProductsProductIdPatchError, UpdateProductProductsProductIdPatchErrors, UpdateProductProductsProductIdPatchResponse, UpdateProductProductsProductIdPatchResponses, UpdateRoutineRoutinesRoutineIdPatchData, UpdateRoutineRoutinesRoutineIdPatchError, UpdateRoutineRoutinesRoutineIdPatchErrors, UpdateRoutineRoutinesRoutineIdPatchResponse, UpdateRoutineRoutinesRoutineIdPatchResponses, UpdateSnapshotSkincareSnapshotIdPatchData, UpdateSnapshotSkincareSnapshotIdPatchError, UpdateSnapshotSkincareSnapshotIdPatchErrors, UpdateSnapshotSkincareSnapshotIdPatchResponse, UpdateSnapshotSkincareSnapshotIdPatchResponses, UpdateStepRoutinesStepsStepIdPatchData, UpdateStepRoutinesStepsStepIdPatchError, UpdateStepRoutinesStepsStepIdPatchErrors, UpdateStepRoutinesStepsStepIdPatchResponse, UpdateStepRoutinesStepsStepIdPatchResponses, UpdateUsageHealthUsagesUsageIdPatchData, UpdateUsageHealthUsagesUsageIdPatchError, UpdateUsageHealthUsagesUsageIdPatchErrors, UpdateUsageHealthUsagesUsageIdPatchResponse, UpdateUsageHealthUsagesUsageIdPatchResponses, UpsertProfileProfilePatchData, UpsertProfileProfilePatchError, UpsertProfileProfilePatchErrors, UpsertProfileProfilePatchResponse, UpsertProfileProfilePatchResponses, UsageCreate, UsageUpdate, UserProfilePublic, UserProfileUpdate, ValidationError } from './types.gen';
|