@cpod/sdk - v0.2.7
    Preparing search index...

    Function getUserCategories

    • Get categories assigned to a specific user

      Parameters

      • userId: string

        The unique identifier of the user

      • Optionaloptions: ListCategoriesOptions

      Returns Promise<ListCategoriesResponse>

      Array of category objects assigned to the user

      401 - Not authenticated

      404 - User not found

      import { getUserCategories } from "@cpod/sdk";

      const userCategories = await getUserCategories("user-123");
      console.log(`User belongs to ${userCategories.length} categories`);
      userCategories.forEach(cat => console.log(cat.name));