buymeua-api-fe 0.13.0 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +8 -4
  3. package/dist/entities/category/api/categoryApi.d.ts +93 -744
  4. package/dist/entities/category/api/categoryApi.d.ts.map +1 -1
  5. package/dist/entities/category/api/categoryApi.js +7 -10
  6. package/dist/entities/category/api/categoryApi.js.map +1 -1
  7. package/dist/entities/category/index.d.ts +1 -0
  8. package/dist/entities/category/index.d.ts.map +1 -1
  9. package/dist/entities/category/index.js +1 -0
  10. package/dist/entities/category/index.js.map +1 -1
  11. package/dist/entities/category/model/types.d.ts +6 -7
  12. package/dist/entities/category/model/types.d.ts.map +1 -1
  13. package/dist/entities/category/model/useCategoryBreadcrumbs.d.ts +6 -0
  14. package/dist/entities/category/model/useCategoryBreadcrumbs.d.ts.map +1 -0
  15. package/dist/entities/category/model/useCategoryBreadcrumbs.js +35 -0
  16. package/dist/entities/category/model/useCategoryBreadcrumbs.js.map +1 -0
  17. package/dist/entities/chat/api/chatApi.d.ts +4 -4
  18. package/dist/entities/country/api/countryApi.d.ts +1 -1
  19. package/dist/entities/favorite/api/favoriteApi.d.ts +3 -25
  20. package/dist/entities/favorite/api/favoriteApi.d.ts.map +1 -1
  21. package/dist/entities/notification/api/notificationApi.d.ts +2 -2
  22. package/dist/entities/novaposhta/api/novaposhtaApi.d.ts +3 -3
  23. package/dist/entities/order/api/orderApi.d.ts +3 -3
  24. package/dist/entities/product/api/productApi.d.ts +71 -1391
  25. package/dist/entities/product/api/productApi.d.ts.map +1 -1
  26. package/dist/entities/product/model/types.d.ts +24 -37
  27. package/dist/entities/product/model/types.d.ts.map +1 -1
  28. package/dist/entities/referral/api/referralApi.d.ts +2 -2
  29. package/dist/entities/store/api/storeApi.d.ts +2 -2
  30. package/dist/entities/stories/api/storiesApi.d.ts +1 -1
  31. package/dist/entities/supplier/api/supplierApi.d.ts +5 -5
  32. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -7,6 +7,33 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.14.0] - 2025-12-04
11
+
12
+ ### Added
13
+
14
+ - Add useCategoryBreadcrumbs hook for building category breadcrumbs navigation
15
+ - Export useCategoryBreadcrumbs from category module
16
+
17
+ ### Changed
18
+
19
+ - **BREAKING**: Replace getCategories infinite query with regular query
20
+ - Changed from useGetCategoriesInfiniteQuery to useGetCategoriesQuery
21
+ - Update endpoint from v1 to v2 API with POST method
22
+ - Response no longer paginated, returns full category tree
23
+ - Migration: Replace useGetCategoriesInfiniteQuery() with useGetCategoriesQuery()
24
+ - **BREAKING**: Update GetCategoriesRequest interface
25
+ - Make search parameter optional
26
+ - Remove per_page parameter (no longer paginated)
27
+ - **BREAKING**: Update TreeCategory interface
28
+ - Make parent_id, icon, thumb fields non-nullable
29
+ - Add keepUnusedDataFor: Infinity to getCategories for persistent caching
30
+ - **BREAKING**: Remove attribute_ids field from GetProductsRequest.attribute_filter
31
+ - attribute_filter now only contains attribute_values field
32
+ - Migration: Remove attribute_ids from filter objects, use only attribute_values
33
+ - Refactor GetProductsRequest from Partial type alias to interface with optional properties
34
+ - Add type reuse: GetProductAttributesRequest, GetProductOptionsRequest, and GetSupplierProductsRequest now reuse GetProductsRequest types for option_value_filter and attribute_filter
35
+ - Fix GetProductAttributesResponse field naming (values → value) for consistency
36
+
10
37
  ## [0.13.0] - 2025-12-01
11
38
 
12
39
  ### Added
package/README.md CHANGED
@@ -326,14 +326,18 @@ await deleteAccount();
326
326
  ### Categories
327
327
 
328
328
  ```typescript
329
- // Get categories
330
- const { data, fetchNextPage, hasNextPage } = useGetCategoriesInfiniteQuery({
331
- search: string;
329
+ // Get categories tree (full hierarchy)
330
+ const { data } = useGetCategoriesQuery({
331
+ search?: string;
332
332
  filter_parent_id?: number;
333
333
  filter_with_products?: boolean;
334
- per_page?: number;
335
334
  });
336
335
 
336
+ // Build category breadcrumbs
337
+ import { useCategoryBreadcrumbs } from 'buymeua-api-fe';
338
+ const { breadcrumbs, isLoading } = useCategoryBreadcrumbs(categoryId);
339
+ // Returns array of categories from root to current
340
+
337
341
  // Get supplier categories
338
342
  const { data, fetchNextPage, hasNextPage } = useGetSupplierCategoriesInfiniteQuery({
339
343
  customer: number;