ProjectR Docs
Backend (Convex)

API — beauty

Generated catalog of Convex functions in convex/beauty/. Regenerated by `bun run docs:api`.

Auto-generated from source. Do not edit by hand — run bun run docs:api.

query (12)

FunctionDescriptionArgs
dashboardGetBeautyProfileStatsGet beauty profile statistics for dashboard{}
dashboardSearchBeautyProfilesSearch beauty profiles by criteria{ skinType: v.optional(v.string()), hasConcern: v.optional(v.string()), limit: v.optional(v.number()), offset: v.optional(v.number()), }
getAmRoutineStepsGet AM routine steps in order{}
getBeautyTagsGet all product beauty tags Dashboard view with filtering options{ activeOnly: v.optional(v.boolean()), routineStep: v.optional(v.string()), limit: v.optional(v.number()), offset: v.optional(v.number()), }
getPmRoutineStepsGet PM routine steps in order{}
getProductBeautyTagGet a single product beauty tag by ID{ tagId: v.id("productBeautyTags"), }
getProductBeautyTagsGet beauty tags for a specific product{ productId: v.optional(v.id("shopifyProducts")), shopifyProductId: v.optional(v.string()), }
getRoutineStepConfigGet a specific routine step config by step name{ stepName: v.string(), }
getRoutineStepConfigsGet all routine step configurations Used by dashboard to manage step settings{ activeOnly: v.optional(v.boolean()), }
mobileGetBeautyProfileGet current user's beauty profile Returns null if user has no beauty profile{}
mobileGetProductRecommendationsGet personalized product recommendations based on beauty profile Returns routine-based recommendations organized by AM/PM steps. Uses concern mapping for fuzzy matching when exact concerns don't match. Response structure: { amRoutine: [{ step, displayName, description, recommendations: [...] }], pmRoutine: [{ step, displayName, description, recommendations: [...] }] }{ limit: v.optional(v.number()), // Max products per step }
mobileIsBeautyProfileCompleteCheck if user has completed their beauty profile A profile is considered complete if skinType is set{}

mutation (18)

FunctionDescriptionArgs
bulkUpdateRoutineStepDisplayOrderBulk update display order for routine steps Used for drag-and-drop reordering in dashboard{ updates: v.array( v.object({ id: v.id("routineStepConfigs"), amDisplayOrder: v.optional(v.number()), pmDisplayOrder: v.optional(v.number()), }) ), }
createProductBeautyTagCreate a new product beauty tag{ productId: v.id("shopifyProducts"), shopifyProductId: v.string(), routineStep: routineStepValidator, skinTypes: v.array(productSkinTypeValidator), skinConc…
createRoutineStepConfigCreate a new routine step configuration{ stepName: routineStepValidator, displayName: v.string(), description: v.optional(v.string()), iconUrl: v.optional(v.string()), isRequired: v.boolean(), isA…
dashboardDeleteUserBeautyProfileDelete a user's beauty profile (admin action){ userId: v.string(), }
deleteProductBeautyTagDelete a product beauty tag{ id: v.id("productBeautyTags"), }
deleteRoutineStepConfigDelete a routine step configuration{ id: v.id("routineStepConfigs"), }
mobileDeleteBeautyProfileDelete user's beauty profile Clears all beauty-related data for the user{}
mobileUpdateCurrentRoutineUpdate current routine steps Convenience mutation for onboarding flow{ currentRoutineSteps: v.array(v.string()), }
mobileUpdateIngredientPreferencesUpdate ingredient preferences Sets preferred and avoided ingredients{ preferredIngredients: v.optional(v.array(v.string())), avoidedIngredients: v.optional(v.array(v.string())), }
mobileUpdatePregnancyStatusUpdate pregnancy status Convenience mutation for onboarding flow{ pregnancyStatus: v.optional(v.string()), }
mobileUpdateSkinConcernsUpdate only skin concerns (max 3) Convenience mutation for onboarding flow{ skinConcerns: v.array(v.string()), }
mobileUpdateSkinTypeUpdate only skin type Convenience mutation for onboarding flow Also auto-sets beautyProfileCompleted on userProfiles{ skinType: v.union( // New values v.literal("dry_normal"), v.literal("combination_dry"), v.literal("combination_oily"), v.literal("oily"), // Legacy values …
mobileUpsertBeautyProfileCreate or update user's beauty profile This is the primary mutation for updating beauty profile. Validates: - Max 3 skin concerns - Valid skin type enum value{ skinType: skinTypeValidator, skinConcerns: v.optional(v.array(v.string())), skinTone: v.optional(v.string()), preferredIngredients: v.optional(v.array(v.st…
toggleProductBeautyTagActiveToggle active status for a product beauty tag{ id: v.id("productBeautyTags"), }
toggleRoutineStepActiveToggle active status for a routine step{ id: v.id("routineStepConfigs"), }
updateProductBeautyTagUpdate an existing product beauty tag{ id: v.id("productBeautyTags"), routineStep: v.optional(routineStepValidator), skinTypes: v.optional(v.array(productSkinTypeValidator)), skinConcerns: v.opt…
updateProductBeautyTagsBulk update product beauty tags for a product Replaces all tags for a product with new set{ productId: v.id("shopifyProducts"), shopifyProductId: v.string(), tags: v.array( v.object({ routineStep: routineStepValidator, skinTypes: v.array(productSk…
updateRoutineStepConfigUpdate an existing routine step configuration{ id: v.id("routineStepConfigs"), displayName: v.optional(v.string()), description: v.optional(v.string()), iconUrl: v.optional(v.string()), isRequired: v.op…

On this page