import { BooleanResponse, CoinSymbol, Nullable, PublicRecipe, Recipe, RecipeId, RecipeInterval, RecipeLogic, RecipePrivacy, RecipeRun, RecipeTimeRange, UserId } from '../..'; import { AuthRequest, OptionalAuthRequest } from '../common'; export declare type RecipeResponse = Recipe | PublicRecipe; /** * GetRecipeById */ export interface GetRecipeByIdRequest extends OptionalAuthRequest { recipeId: RecipeId; } export declare type GetRecipeByIdResponse = Nullable; export declare const GetRecipeById: import("../common").ProtocolFunction>; /** * GetRecipeBySlug */ export interface GetRecipeBySlugRequest extends OptionalAuthRequest { slug: string; } export declare type GetRecipeBySlugResponse = Nullable; export declare const GetRecipeBySlug: import("../common").ProtocolFunction>; /** * RecipeSearch */ export interface RecipeSearchRequest extends OptionalAuthRequest { query: string; } export declare type RecipeSearchResponse = RecipeResponse[]; /** * Searches for a recipe. * @param userToken The token of the user performing the search. * @param query The search string. * @returns A list of recipes found in the search. */ export declare const RecipeSearch: import("../common").ProtocolFunction; /** * RunRecipe */ export interface RunRecipeRequest extends OptionalAuthRequest { recipeId?: RecipeId; logic?: RecipeLogic; startingCash?: number; saveRecipe?: boolean; coin?: CoinSymbol; interval?: RecipeInterval; timeRange?: RecipeTimeRange; } export declare type RunRecipeResponse = Nullable; export declare const RunRecipe: import("../common").ProtocolFunction>; /** * FlagRecipe */ export interface FlagRecipeRequest extends AuthRequest { recipeId: RecipeId; } export declare type FlagRecipeResponse = BooleanResponse; /** * Attempts to flag the recipe. * @param userToken The token of the user flagging the recipe. * @param id The ID of the recipe. */ export declare const FlagRecipe: import("../common").ProtocolFunction; /** * GetSavedRecipes */ export interface GetSavedRecipesRequest extends OptionalAuthRequest { userId?: UserId; limit?: number; skip?: number; } export declare type GetSavedRecipesResponse = RecipeResponse[]; /** * Gets the saved recipes for the user with the given `id`. * @param userToken The token of the user performing the query. * @param userId The ID of the user for whom the saved recipes are being queried. * @param limit The number of recipes to return. * @param skip The number of recipes to skip in the query. * @returns A list of saved recipes. */ export declare const GetSavedRecipes: import("../common").ProtocolFunction; /** * GetCreatedRecipes */ export interface GetCreatedRecipesRequest extends OptionalAuthRequest { userId?: UserId; limit?: number; skip?: number; } export declare type GetCreatedRecipesResponse = RecipeResponse[]; /** * Gets the created recipes for the user with the given `id`. * @param userToken The token of the user performing the query. * @param userId The ID of the user for whom the created recipes are being queried. * @param limit The number of recipes to return. * @param skip The number of recipes to skip in the query. * @returns A list of created recipes. */ export declare const GetCreatedRecipes: import("../common").ProtocolFunction; /** * GetPopularRecipes */ export interface GetPopularRecipesRequest extends OptionalAuthRequest { limit?: number; skip?: number; } export declare type GetPopularRecipesResponse = RecipeResponse[]; /** * Gets currently popular recipes. * @param userToken The token of the user performing the query. * @param limit The number of recipes to return. * @param skip The number of recipes to skip in the query. * @returns A list of popular recipes. */ export declare const GetPopularRecipes: import("../common").ProtocolFunction; /** * GetNewRecipes */ export interface GetNewRecipesRequest extends OptionalAuthRequest { limit?: number; skip?: number; } export declare type GetNewRecipesResponse = RecipeResponse[]; /** * Gets newly created public recipes. * @param userToken The token of the user performing the query. * @param limit The number of recipes to return. * @param skip The number of recipes to skip in the query. * @returns A list of new recipes. */ export declare const GetNewRecipes: import("../common").ProtocolFunction; /** * CreateRecipe */ export interface CreateRecipeRequest extends AuthRequest { name: string; coin: CoinSymbol; emoji: string; privacy: RecipePrivacy; timeRange: RecipeTimeRange; logicFlow: RecipeLogic; clonedId?: RecipeId; interval?: RecipeInterval; } export declare type CreateRecipeResponse = Nullable<{ id: RecipeId; slug: string; }>; export declare const CreateRecipe: import("../common").ProtocolFunction>; /** * UpdateRecipe */ export interface UpdateRecipeRequest extends AuthRequest { recipeId: RecipeId; name?: string; coin?: CoinSymbol; emoji?: string; privacy?: RecipePrivacy; interval?: RecipeInterval; timeRange?: RecipeTimeRange; logicFlow?: RecipeLogic; updateSlug?: boolean; } export declare type UpdateRecipeResponse = BooleanResponse & { slug: string; run: Nullable; }; /** * Updates recipe information. * @param userToken The token of the user being updated. * @param recipeId The ID of the recipe. * @param name The name of the recipe. * @param coin The coin for the recipe. * @param emoji The emoji for the recipe. * @param privacy The recipe's privacy. * @param interval The recipe interval. * @param timeRange The recipe time range. * @param logic The recipe logic as an object. */ export declare const UpdateRecipe: import("../common").ProtocolFunction; /** * DeleteRecipe */ export interface DeleteRecipeRequest extends AuthRequest { recipeId: RecipeId; } export declare type DeleteRecipeResponse = BooleanResponse; /** * Marks a recipe as deleted. * @param userToken The token of the user. * @param recipeId The ID of the recipe. */ export declare const DeleteRecipe: import("../common").ProtocolFunction; /** * SaveRecipe */ export interface SaveRecipeRequest extends AuthRequest { recipeId: RecipeId; } export declare type SaveRecipeResponse = BooleanResponse; /** * Adds a recipe to the user's list. * @param userToken The token of the user. * @param recipeId The ID of the recipe. */ export declare const SaveRecipe: import("../common").ProtocolFunction; /** * UnsaveRecipe */ export interface UnsaveRecipeRequest extends AuthRequest { recipeId: RecipeId; } export declare type UnsaveRecipeResponse = BooleanResponse; /** * Removes a recipe from the user's list. * @param userToken The token of the user. * @param recipeId The ID of the recipe. */ export declare const UnsaveRecipe: import("../common").ProtocolFunction;