import { Asset, IAssetData } from './Asset'; import type { Claim } from './Claim'; import type { IError } from './lib/types'; /** * This is based on the [Schema.org `Review` type](https://schema.org/Review). */ export interface IReview { code: string; explanation: string; /** * If the ingredient asset has a claim, then it's dcterms:provenance (which is the reference to the ingredient's * claim signature) shall be copied into a ingredient's data with the same name and value. Prior to copying, it is * recommended that, if it is technically able to, the processor validate the hashes provided in the claim and * provide a review of them, based on the Review schema. The most important aspect will be the reviewRating which * is either 1 (did not validate) or 5 (successfully validated). At this time, no other values are permitted. */ value: number; } export interface IIngredientData extends IAssetData { /** * If this ingredient has a claim, this holds the reference to the claim info */ provenance: string | null | undefined; /** * `true` if this is a parent asset */ is_parent: boolean | null | undefined; /** * Reviews on the CAI data */ reviews: IReview[] | null | undefined; /** * Errors on this ingredient (from the toolkit) */ errors: IError[] | null | undefined; } export declare class Ingredient extends Asset { /** * A unique identifier for this ingredient */ readonly id: string; /** * The ingredient data from the toolkit */ readonly data: IIngredientData; constructor(parent: Claim, id: string, data: IIngredientData); get claim(): Claim | undefined; get asset(): this; get title(): string; /** * Any errors coming back from the toolkit */ get errors(): IError[]; } //# sourceMappingURL=Ingredient.d.ts.map