import type { RecipesRecipe, RecipesIngredient, RecipesFoodItem, RecipesRecipeNutrition, RecipesTag, RecipesRecipeTag, RecipesRecipeFavorite, RecipesRecipeCollection, RecipesCollectionRecipe, RecipesEnrichmentJob, RecipesMealSchedule, RecipesScheduledMeal, RecipesNutritionSummary, RecipesShoppingList, RecipesShoppingListItem } from "../_internal/types.gen";
import type { RequestOptions } from "../base-client";
import { RequestBuilder } from "../request-builder";
/** Attributes accepted when creating a recipe. */
export interface CreateRecipeAttributes {
    workspace_id: string;
    contact_id?: string;
    application_id?: string;
    title: string;
    description?: string;
    instructions?: string;
    source_type?: "owned" | "external" | "imported";
    source_uri?: string;
    source_provider?: string;
    prep_time_minutes?: number;
    cook_time_minutes?: number;
    total_time_minutes?: number;
    servings?: number;
    difficulty?: "easy" | "medium" | "hard";
    cuisine_type?: string;
    image_url?: string;
    image_urls?: string[];
    metadata?: Record<string, unknown>;
}
/** Attributes accepted when importing an external recipe. */
export interface ImportRecipeAttributes {
    workspace_id: string;
    contact_id?: string;
    application_id?: string;
    title: string;
    description?: string;
    instructions?: string;
    source_uri?: string;
    source_url?: string;
    source_name?: string;
    source_provider?: string;
    /** Write-only — raw connector response stored server-side but never returned in API responses. */
    source_data?: Record<string, unknown>;
    prep_time_minutes?: number;
    cook_time_minutes?: number;
    total_time_minutes?: number;
    servings?: number;
    difficulty?: "easy" | "medium" | "hard";
    cuisine_type?: string;
    image_url?: string;
    image_urls?: string[];
    metadata?: Record<string, unknown>;
}
/** Error entry in a bulk import failure. */
export interface BulkImportError {
    index?: number;
    errors?: Array<{
        field?: string;
        message?: string;
        code?: string;
    }>;
}
/** Result of a bulk import operation. */
export interface BulkImportResult {
    imported: RecipesRecipe[];
    failed: BulkImportError[];
}
/** Attributes accepted when updating a recipe. */
export interface UpdateRecipeAttributes {
    title?: string;
    description?: string;
    instructions?: string;
    prep_time_minutes?: number;
    cook_time_minutes?: number;
    total_time_minutes?: number;
    servings?: number;
    difficulty?: "easy" | "medium" | "hard";
    cuisine_type?: string;
    image_url?: string;
    image_urls?: string[];
    metadata?: Record<string, unknown>;
}
/** Attributes accepted when creating an ingredient. */
export interface CreateIngredientAttributes {
    recipe_id: string;
    food_item_id?: string;
    name: string;
    quantity?: number;
    unit?: string;
    preparation_note?: string;
    sort_order?: number;
    food_group?: string;
}
/** Attributes accepted when updating an ingredient. */
export interface UpdateIngredientAttributes {
    food_item_id?: string;
    name?: string;
    quantity?: number;
    unit?: string;
    preparation_note?: string;
    sort_order?: number;
    food_group?: string;
}
/** Attributes accepted when creating a food item. */
export interface CreateFoodItemAttributes {
    application_id: string;
    name: string;
    external_id?: string;
    external_source?: string;
    nutrition_per_100g?: Record<string, unknown>;
    food_group?: string;
    allergens?: string[];
    default_unit?: string;
    unit_conversions?: Record<string, unknown>;
}
/** Attributes accepted when updating a food item. */
export interface UpdateFoodItemAttributes {
    name?: string;
    nutrition_per_100g?: Record<string, unknown>;
    food_group?: string;
    allergens?: string[];
    default_unit?: string;
    unit_conversions?: Record<string, unknown>;
}
/** Attributes accepted when creating recipe nutrition. */
export interface CreateRecipeNutritionAttributes {
    recipe_id: string;
    source?: "computed" | "external" | "manual";
    calories?: number;
    protein_g?: number;
    carbs_g?: number;
    fat_g?: number;
    fiber_g?: number;
    sugar_g?: number;
    sodium_mg?: number;
    full_nutrients?: Record<string, unknown>;
}
/** Attributes accepted when updating recipe nutrition. */
export interface UpdateRecipeNutritionAttributes {
    source?: "computed" | "external" | "manual";
    calories?: number;
    protein_g?: number;
    carbs_g?: number;
    fat_g?: number;
    fiber_g?: number;
    sugar_g?: number;
    sodium_mg?: number;
    full_nutrients?: Record<string, unknown>;
}
/** Attributes accepted when creating a tag. */
export interface CreateTagAttributes {
    application_id: string;
    category: "cuisine" | "diet" | "health" | "course" | "technique" | "custom";
    name: string;
    metadata?: Record<string, unknown>;
}
/** Attributes accepted when updating a tag. */
export interface UpdateTagAttributes {
    name?: string;
    category?: "cuisine" | "diet" | "health" | "course" | "technique" | "custom";
    metadata?: Record<string, unknown>;
}
/** Attributes accepted when creating a recipe-tag association. */
export interface CreateRecipeTagAttributes {
    recipe_id: string;
    tag_id: string;
}
/** Attributes accepted when creating a recipe favorite. */
export interface CreateRecipeFavoriteAttributes {
    workspace_id: string;
    contact_id?: string;
    recipe_id: string;
    notes?: string;
    meal_type?: string;
    /** Integer rating value. */
    rating?: number;
}
/** Attributes accepted when updating a recipe favorite. */
export interface UpdateRecipeFavoriteAttributes {
    notes?: string;
    meal_type?: string;
    /** Integer rating value. */
    rating?: number;
}
/** Attributes accepted when creating a recipe collection. */
export interface CreateRecipeCollectionAttributes {
    workspace_id: string;
    contact_id?: string;
    name: string;
    description?: string;
    scope?: "workspace" | "contact";
    metadata?: Record<string, unknown>;
}
/** Attributes accepted when updating a recipe collection. */
export interface UpdateRecipeCollectionAttributes {
    name?: string;
    description?: string;
    metadata?: Record<string, unknown>;
}
/** Attributes accepted when adding a recipe to a collection. */
export interface CreateCollectionRecipeAttributes {
    collection_id: string;
    recipe_id: string;
    sort_order?: number;
}
/** Attributes accepted when updating a collection recipe. */
export interface UpdateCollectionRecipeAttributes {
    sort_order?: number;
}
/** Attributes accepted when creating a meal schedule. */
export interface CreateMealScheduleAttributes {
    workspace_id: string;
    contact_id?: string;
    name: string;
    start_date?: string;
    end_date?: string;
    status?: "draft" | "active" | "completed";
}
/** Attributes accepted when updating a meal schedule. */
export interface UpdateMealScheduleAttributes {
    name?: string;
    start_date?: string;
    end_date?: string;
    status?: "draft" | "active" | "completed";
}
/** Attributes accepted when creating a scheduled meal. */
export interface CreateScheduledMealAttributes {
    meal_schedule_id: string;
    recipe_id: string;
    date: string;
    meal_type: "breakfast" | "lunch" | "dinner" | "snack";
    servings?: number;
}
/** Attributes accepted when updating a scheduled meal. */
export interface UpdateScheduledMealAttributes {
    date?: string;
    meal_type?: "breakfast" | "lunch" | "dinner" | "snack";
    servings?: number;
}
/** Attributes accepted when creating a shopping list. */
export interface CreateShoppingListAttributes {
    workspace_id: string;
    contact_id?: string;
    meal_schedule_id?: string;
    name: string;
    status?: "draft" | "active" | "completed";
}
/** Attributes accepted when updating a shopping list. */
export interface UpdateShoppingListAttributes {
    name?: string;
    status?: "draft" | "active" | "completed";
}
/** Attributes accepted when creating a shopping list item. */
export interface CreateShoppingListItemAttributes {
    shopping_list_id: string;
    name: string;
    total_quantity?: number;
    unit?: string;
    food_group?: string;
    checked?: boolean;
}
/** Attributes accepted when updating a shopping list item. */
export interface UpdateShoppingListItemAttributes {
    name?: string;
    total_quantity?: number;
    unit?: string;
    food_group?: string;
    checked?: boolean;
}
export type ListOptions = {
    page?: number;
    pageSize?: number;
} & RequestOptions;
/** Options for listing recipe collections. */
export interface CollectionListOptions extends ListOptions {
    /** Filter to a specific contact's collections. */
    contactId?: string;
    /** Filter by collection scope. */
    scope?: "workspace" | "contact";
    /** Sort field(s). Prefix with '-' for descending (e.g. '-inserted_at'). */
    sort?: string;
}
export type RecipesAPI = ReturnType<typeof createRecipesNamespace>;
export declare function createRecipesNamespace(rb: RequestBuilder): {
    /** Get a recipe by ID. */
    get(id: string, options?: RequestOptions): Promise<RecipesRecipe>;
    /** List recipes in a workspace (optional status filter, created_by filter). */
    list(workspaceId: string, options?: ListOptions & {
        filter?: {
            status?: string;
            created_by?: string;
        };
    }): Promise<RecipesRecipe[]>;
    /** List recipes for a contact in a workspace. */
    listByContact(workspaceId: string, contactId: string, options?: ListOptions): Promise<RecipesRecipe[]>;
    /** List published recipes for a workspace. */
    listPublished(workspaceId: string, options?: ListOptions): Promise<RecipesRecipe[]>;
    /** Create a recipe. */
    create(attrs: CreateRecipeAttributes, options?: RequestOptions): Promise<RecipesRecipe>;
    /** Import an external recipe. */
    import(attrs: ImportRecipeAttributes, options?: RequestOptions): Promise<RecipesRecipe>;
    /**
     * Bulk import recipes with dedup via source_uri.
     *
     * @param recipes - Array of recipe attribute maps
     * @param options - Request options
     * @returns Object with `imported` and `failed` arrays
     */
    bulkImport(recipes: ImportRecipeAttributes[], options?: RequestOptions): Promise<BulkImportResult>;
    /** Update a recipe. */
    update(id: string, attrs: UpdateRecipeAttributes, options?: RequestOptions): Promise<RecipesRecipe>;
    /**
     * Re-enqueue AI enrichment for a recipe.
     * Resets enrichment_status to pending and triggers the enrichment pipeline.
     *
     * @param id - Recipe ID
     * @param options - Request options
     * @returns The updated recipe
     */
    reEnrich(id: string, options?: RequestOptions): Promise<RecipesRecipe>;
    /** Archive a recipe. */
    archive(id: string, options?: RequestOptions): Promise<RecipesRecipe>;
    /** Restore an archived recipe. */
    restore(id: string, options?: RequestOptions): Promise<RecipesRecipe>;
    /** Delete a recipe. */
    delete(id: string, options?: RequestOptions): Promise<void>;
    ingredients: {
        /** Get an ingredient by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesIngredient>;
        /** List ingredients for a recipe. */
        list(recipeId: string, options?: ListOptions): Promise<RecipesIngredient[]>;
        /** Create an ingredient. */
        create(attrs: CreateIngredientAttributes, options?: RequestOptions): Promise<RecipesIngredient>;
        /** Update an ingredient. */
        update(id: string, attrs: UpdateIngredientAttributes, options?: RequestOptions): Promise<RecipesIngredient>;
        /** Delete an ingredient. */
        delete(id: string, options?: RequestOptions): Promise<void>;
    };
    foodItems: {
        /** Get a food item by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesFoodItem>;
        /** List food items for an application. */
        list(applicationId: string, options?: ListOptions): Promise<RecipesFoodItem[]>;
        /** Create a food item. */
        create(attrs: CreateFoodItemAttributes, options?: RequestOptions): Promise<RecipesFoodItem>;
        /** Update a food item. */
        update(id: string, attrs: UpdateFoodItemAttributes, options?: RequestOptions): Promise<RecipesFoodItem>;
        /** Delete a food item. */
        delete(id: string, options?: RequestOptions): Promise<void>;
    };
    nutrition: {
        /** Get recipe nutrition by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesRecipeNutrition>;
        /** Get nutrition data for a recipe by recipe ID. */
        getByRecipe(recipeId: string, options?: ListOptions): Promise<RecipesRecipeNutrition[]>;
        /** Create recipe nutrition. */
        create(attrs: CreateRecipeNutritionAttributes, options?: RequestOptions): Promise<RecipesRecipeNutrition>;
        /** Update recipe nutrition. */
        update(id: string, attrs: UpdateRecipeNutritionAttributes, options?: RequestOptions): Promise<RecipesRecipeNutrition>;
    };
    tags: {
        /** Get a tag by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesTag>;
        /** List tags for an application. */
        list(applicationId: string, options?: ListOptions): Promise<RecipesTag[]>;
        /** Create a tag. */
        create(attrs: CreateTagAttributes, options?: RequestOptions): Promise<RecipesTag>;
        /** Update a tag. */
        update(id: string, attrs: UpdateTagAttributes, options?: RequestOptions): Promise<RecipesTag>;
        /** Delete a tag. */
        delete(id: string, options?: RequestOptions): Promise<void>;
    };
    recipeTags: {
        /** Get a recipe-tag association by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesRecipeTag>;
        /** List recipe-tag associations for a recipe. */
        listByRecipe(recipeId: string, options?: ListOptions): Promise<RecipesRecipeTag[]>;
        /** Create a recipe-tag association (upsert). */
        create(attrs: CreateRecipeTagAttributes, options?: RequestOptions): Promise<RecipesRecipeTag>;
        /** Delete a recipe-tag association. */
        delete(id: string, options?: RequestOptions): Promise<void>;
    };
    favorites: {
        /** Get a favorite by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesRecipeFavorite>;
        /** List favorites for a workspace. */
        list(workspaceId: string, options?: ListOptions): Promise<RecipesRecipeFavorite[]>;
        /** List favorites for a recipe. */
        listByRecipe(recipeId: string, options?: ListOptions): Promise<RecipesRecipeFavorite[]>;
        /** Create a recipe favorite. */
        create(attrs: CreateRecipeFavoriteAttributes, options?: RequestOptions): Promise<RecipesRecipeFavorite>;
        /** Update a recipe favorite. */
        update(id: string, attrs: UpdateRecipeFavoriteAttributes, options?: RequestOptions): Promise<RecipesRecipeFavorite>;
        /** Delete a recipe favorite. */
        delete(id: string, options?: RequestOptions): Promise<void>;
    };
    collections: {
        /** Get a collection by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesRecipeCollection>;
        /** List collections for a workspace with optional filters. */
        list(workspaceId: string, options?: CollectionListOptions): Promise<RecipesRecipeCollection[]>;
        /** Create a recipe collection. */
        create(attrs: CreateRecipeCollectionAttributes, options?: RequestOptions): Promise<RecipesRecipeCollection>;
        /** Update a recipe collection. */
        update(id: string, attrs: UpdateRecipeCollectionAttributes, options?: RequestOptions): Promise<RecipesRecipeCollection>;
        /** Delete a recipe collection. */
        delete(id: string, options?: RequestOptions): Promise<void>;
        recipes: {
            /** Get a collection recipe entry by ID. */
            get(id: string, options?: RequestOptions): Promise<RecipesCollectionRecipe>;
            /** List recipes in a collection. */
            list(collectionId: string, options?: ListOptions): Promise<RecipesCollectionRecipe[]>;
            /** Add a recipe to a collection. */
            create(attrs: CreateCollectionRecipeAttributes, options?: RequestOptions): Promise<RecipesCollectionRecipe>;
            /** Update sort order of a collection recipe. */
            update(id: string, attrs: UpdateCollectionRecipeAttributes, options?: RequestOptions): Promise<RecipesCollectionRecipe>;
            /** Remove a recipe from a collection. */
            delete(id: string, options?: RequestOptions): Promise<void>;
        };
    };
    enrichmentJobs: {
        /** Get an enrichment job by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesEnrichmentJob>;
        /** List enrichment jobs for a recipe. */
        list(recipeId: string, options?: ListOptions): Promise<RecipesEnrichmentJob[]>;
    };
    mealSchedules: {
        /** Get a meal schedule by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesMealSchedule>;
        /** List meal schedules for a workspace. */
        list(workspaceId: string, options?: ListOptions): Promise<RecipesMealSchedule[]>;
        /** Create a meal schedule. */
        create(attrs: CreateMealScheduleAttributes, options?: RequestOptions): Promise<RecipesMealSchedule>;
        /** Update a meal schedule. */
        update(id: string, attrs: UpdateMealScheduleAttributes, options?: RequestOptions): Promise<RecipesMealSchedule>;
        /** Delete a meal schedule. */
        delete(id: string, options?: RequestOptions): Promise<void>;
        meals: {
            /** Get a scheduled meal by ID. */
            get(id: string, options?: RequestOptions): Promise<RecipesScheduledMeal>;
            /** List scheduled meals for a meal schedule. */
            list(mealScheduleId: string, options?: ListOptions): Promise<RecipesScheduledMeal[]>;
            /** Create a scheduled meal. */
            create(attrs: CreateScheduledMealAttributes, options?: RequestOptions): Promise<RecipesScheduledMeal>;
            /** Update a scheduled meal. */
            update(id: string, attrs: UpdateScheduledMealAttributes, options?: RequestOptions): Promise<RecipesScheduledMeal>;
            /** Delete a scheduled meal. */
            delete(id: string, options?: RequestOptions): Promise<void>;
        };
        nutritionSummaries: {
            /** Get a nutrition summary by ID. */
            get(id: string, options?: RequestOptions): Promise<RecipesNutritionSummary>;
            /** List nutrition summaries for a meal schedule. */
            list(mealScheduleId: string, options?: ListOptions): Promise<RecipesNutritionSummary[]>;
        };
    };
    shoppingLists: {
        /** Get a shopping list by ID. */
        get(id: string, options?: RequestOptions): Promise<RecipesShoppingList>;
        /** List shopping lists for a workspace. */
        list(workspaceId: string, options?: ListOptions): Promise<RecipesShoppingList[]>;
        /** Create a shopping list. */
        create(attrs: CreateShoppingListAttributes, options?: RequestOptions): Promise<RecipesShoppingList>;
        /** Update a shopping list. */
        update(id: string, attrs: UpdateShoppingListAttributes, options?: RequestOptions): Promise<RecipesShoppingList>;
        /** Delete a shopping list. */
        delete(id: string, options?: RequestOptions): Promise<void>;
        /**
         * Generate a shopping list from a meal schedule.
         * Aggregates all ingredients from scheduled meals.
         *
         * @param mealScheduleId - MealSchedule UUID
         * @param workspaceId - Workspace UUID
         * @param options - Request options
         * @returns Generated shopping list record
         */
        generate(mealScheduleId: string, workspaceId: string, options?: RequestOptions): Promise<RecipesShoppingList>;
        /**
         * Regenerate an existing shopping list from its linked meal schedule.
         * Deletes existing items and recreates from current scheduled meals.
         *
         * @param shoppingListId - ShoppingList UUID
         * @param workspaceId - Workspace UUID
         * @param options - Request options
         * @returns Regenerated shopping list record
         */
        regenerate(shoppingListId: string, workspaceId: string, options?: RequestOptions): Promise<RecipesShoppingList>;
        items: {
            /** Get a shopping list item by ID. */
            get(id: string, options?: RequestOptions): Promise<RecipesShoppingListItem>;
            /** List items in a shopping list. */
            list(shoppingListId: string, options?: ListOptions): Promise<RecipesShoppingListItem[]>;
            /** Create a shopping list item. */
            create(attrs: CreateShoppingListItemAttributes, options?: RequestOptions): Promise<RecipesShoppingListItem>;
            /** Update a shopping list item. */
            update(id: string, attrs: UpdateShoppingListItemAttributes, options?: RequestOptions): Promise<RecipesShoppingListItem>;
            /** Delete a shopping list item. */
            delete(id: string, options?: RequestOptions): Promise<void>;
        };
    };
};
//# sourceMappingURL=recipes.d.ts.map