Structure Migrations From SDK 3.X to SDK 2.X

Using SDK Migrations

To get the old API structure with V3 API then you have to just change import like @passiolife/nutritionai-react-native-sdk-v3/src/sdk/v2

Manually Migrations

Convert V3 New PassioFoodItem to V2 Old PassioIDAttributes

export interface PassioIDAttributes {
  passioID: PassioID
  name: string
  imageName: string
  entityType: PassioIDEntityType
  foodItem?: PassioFoodItem
  recipe?: PassioRecipe
  parents: PassioAlternative[]
  children: PassioAlternative[]
  siblings: PassioAlternative[]
  isOpenFood: boolean
}

Note: By utilizing the aforementioned method, alternatives such as parents, children, and siblings consistently remain unspecified.

Last updated