import type { BaseObject, BaseSample, DeletedSample, SampleType, } from '@react-native-healthkit/core' import type { AnyMap } from 'react-native-nitro-modules' import type { KnownObjectMetadata, KnownSampleMetadata, } from '../generated/healthkit.generated' import type { CategoryTypeIdentifier, CategoryTypeIdentifierWriteable, } from './CategoryTypeIdentifier' import type { CharacteristicTypeIdentifier } from './Characteristics' import type { ActivitySummaryTypeIdentifier, AudiogramTypeIdentifier, ElectrocardiogramTypeIdentifier, HeartbeatSeriesTypeIdentifier, HKVisionPrescriptionTypeIdentifier, StateOfMindTypeIdentifier, UserAnnotatedMedicationTypeIdentifier, WorkoutRouteTypeIdentifier, WorkoutTypeIdentifier, } from './Constants' import type { CorrelationTypeIdentifier } from './CorrelationType' import type { QuantityTypeIdentifier, QuantityTypeIdentifierWriteable, } from './QuantityTypeIdentifier' export type { BaseObject, BaseSample, DeletedSample, SampleType } export type ObjectTypeIdentifier = | CharacteristicTypeIdentifier | SampleTypeIdentifier | typeof ActivitySummaryTypeIdentifier export type PerObjectTypeIdentifier = | typeof HKVisionPrescriptionTypeIdentifier | typeof UserAnnotatedMedicationTypeIdentifier export type SampleTypeIdentifier = | CategoryTypeIdentifier | CorrelationTypeIdentifier | QuantityTypeIdentifier | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier | typeof ElectrocardiogramTypeIdentifier export type SampleTypeIdentifierWriteable = | CategoryTypeIdentifierWriteable | CorrelationTypeIdentifier | QuantityTypeIdentifierWriteable | typeof StateOfMindTypeIdentifier | typeof AudiogramTypeIdentifier | typeof HeartbeatSeriesTypeIdentifier | typeof WorkoutRouteTypeIdentifier | typeof WorkoutTypeIdentifier export type MetadataWithUnknown = AnyMap & T export type GenericMetadata = AnyMap & KnownObjectMetadata export type WithTypedMetadata = Omit< T, 'metadata' > & { readonly metadata: AnyMap & TMetadata } export type WithOptionalTypedMetadata = Omit< T, 'metadata' > & { readonly metadata?: AnyMap & TMetadata } export type BaseObjectTyped = WithTypedMetadata export type BaseSampleTyped = WithTypedMetadata