buymeua-api-fe 0.12.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.
- package/CHANGELOG.md +40 -0
- package/README.md +36 -4
- package/dist/entities/category/api/categoryApi.d.ts +93 -744
- package/dist/entities/category/api/categoryApi.d.ts.map +1 -1
- package/dist/entities/category/api/categoryApi.js +7 -10
- package/dist/entities/category/api/categoryApi.js.map +1 -1
- package/dist/entities/category/index.d.ts +1 -0
- package/dist/entities/category/index.d.ts.map +1 -1
- package/dist/entities/category/index.js +1 -0
- package/dist/entities/category/index.js.map +1 -1
- package/dist/entities/category/model/types.d.ts +6 -7
- package/dist/entities/category/model/types.d.ts.map +1 -1
- package/dist/entities/category/model/useCategoryBreadcrumbs.d.ts +6 -0
- package/dist/entities/category/model/useCategoryBreadcrumbs.d.ts.map +1 -0
- package/dist/entities/category/model/useCategoryBreadcrumbs.js +35 -0
- package/dist/entities/category/model/useCategoryBreadcrumbs.js.map +1 -0
- package/dist/entities/chat/api/chatApi.d.ts +4 -4
- package/dist/entities/country/api/countryApi.d.ts +1 -1
- package/dist/entities/favorite/api/favoriteApi.d.ts +6 -28
- package/dist/entities/favorite/api/favoriteApi.d.ts.map +1 -1
- package/dist/entities/notification/api/notificationApi.d.ts +2 -2
- package/dist/entities/novaposhta/api/novaposhtaApi.d.ts +3 -3
- package/dist/entities/order/api/orderApi.d.ts +166 -5
- package/dist/entities/order/api/orderApi.d.ts.map +1 -1
- package/dist/entities/order/api/orderApi.js +8 -8
- package/dist/entities/order/api/orderApi.js.map +1 -1
- package/dist/entities/order/model/types.d.ts +31 -0
- package/dist/entities/order/model/types.d.ts.map +1 -1
- package/dist/entities/order/model/types.js +0 -31
- package/dist/entities/order/model/types.js.map +1 -1
- package/dist/entities/product/api/productApi.d.ts +205 -1525
- package/dist/entities/product/api/productApi.d.ts.map +1 -1
- package/dist/entities/product/model/types.d.ts +24 -37
- package/dist/entities/product/model/types.d.ts.map +1 -1
- package/dist/entities/referral/api/referralApi.d.ts +2 -2
- package/dist/entities/store/api/storeApi.d.ts +2 -2
- package/dist/entities/stories/api/storiesApi.d.ts +1 -1
- package/dist/entities/supplier/api/supplierApi.d.ts +5 -5
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,46 @@ 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
|
+
|
|
37
|
+
## [0.13.0] - 2025-12-01
|
|
38
|
+
|
|
39
|
+
### Added
|
|
40
|
+
|
|
41
|
+
- Add createOrder mutation for creating orders
|
|
42
|
+
- Add CreateOrderRequest/Response types with full order creation support
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- Make request parameters optional (void) for queries without required params:
|
|
47
|
+
- getProducts, getProductsByQr, getBestSellers, getSupplierProducts
|
|
48
|
+
- Allows calling hooks without arguments: `useGetProductsInfiniteQuery()`
|
|
49
|
+
|
|
10
50
|
## [0.12.0] - 2025-11-28
|
|
11
51
|
|
|
12
52
|
### 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
|
|
331
|
-
search
|
|
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;
|
|
@@ -628,6 +632,34 @@ const { data } = useGetPaymentMethodsQuery({
|
|
|
628
632
|
custom_ttn?: string;
|
|
629
633
|
delivery_method_code?: string;
|
|
630
634
|
});
|
|
635
|
+
|
|
636
|
+
// Create order
|
|
637
|
+
const [createOrder] = useCreateOrderMutation();
|
|
638
|
+
await createOrder({
|
|
639
|
+
merchant_id: number;
|
|
640
|
+
payment_method_code: string;
|
|
641
|
+
delivery_method_code?: string;
|
|
642
|
+
custom_ttn?: string;
|
|
643
|
+
firstname?: string;
|
|
644
|
+
lastname?: string;
|
|
645
|
+
middlename?: string;
|
|
646
|
+
telephone?: string;
|
|
647
|
+
email?: string;
|
|
648
|
+
comment?: string;
|
|
649
|
+
city_ref?: string;
|
|
650
|
+
warehouse_ref?: string;
|
|
651
|
+
shipping_street_id?: number;
|
|
652
|
+
shipping_house?: string;
|
|
653
|
+
shipping_flat?: string;
|
|
654
|
+
country_id?: number;
|
|
655
|
+
city?: string;
|
|
656
|
+
address?: string;
|
|
657
|
+
total_pay?: number;
|
|
658
|
+
custom_customer_id?: number;
|
|
659
|
+
category_order_id?: number;
|
|
660
|
+
ad_platform_page_id?: number;
|
|
661
|
+
ad_new_client?: boolean;
|
|
662
|
+
});
|
|
631
663
|
```
|
|
632
664
|
|
|
633
665
|
### Referrals
|