buymeua-api-fe 0.19.3 → 0.21.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 CHANGED
@@ -7,6 +7,38 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
7
7
 
8
8
  ## [Unreleased]
9
9
 
10
+ ## [0.21.0] - 2025-12-31
11
+
12
+ ### Added
13
+
14
+ - Add getPaginatedProducts endpoint for fetching products with standard pagination
15
+ - Add GetPaginatedProductsRequest type extending GetProductsRequest with page parameter
16
+
17
+ ## [0.20.0] - 2025-12-30
18
+
19
+ ### Added
20
+
21
+ - Add getOrders endpoint for fetching customer orders
22
+ - Add Order, OrderProduct, OrderProductOption types
23
+ - Add GetOrdersRequest and GetOrdersResponse types
24
+
25
+ ### Changed
26
+
27
+ - **BREAKING**: Update CreateOrderResponse types
28
+ - Change payment type from number to string | null
29
+ - Change ttn type from string to string | null
30
+ - Add payment_transaction_id field for online payments tracking
31
+ - Add url field for payment redirect
32
+ - Add order_id field for store orders
33
+ - Add products array with order items details
34
+ - Add address field with full delivery address
35
+ - Add estimate field with delivery timeframe
36
+ - Add total and total_formatted fields with order amount
37
+ - **BREAKING**: Update PaymentMethod type to include description field (changed from type alias to interface)
38
+ - Add JSDoc documentation with examples for order types
39
+ - Fix attribute_filter type in GetProductsRequest (remove template literal type)
40
+ - Fix filter_order_status_id field name in GetOrdersRequest (remove brackets from field name)
41
+
10
42
  ## [0.19.3] - 2025-12-22
11
43
 
12
44
  ### Changed
package/README.md CHANGED
@@ -156,6 +156,37 @@ const { data, fetchNextPage, hasNextPage } = useGetProductsInfiniteQuery({
156
156
  price_type?: string;
157
157
  });
158
158
 
159
+ // Get products with standard pagination
160
+ const { data } = useGetPaginatedProductsQuery({
161
+ page?: number;
162
+ per_page?: number;
163
+ core_filter?: string;
164
+ filter_has_special?: boolean | null;
165
+ order_by?: string | string[];
166
+ category_filter?: number[];
167
+ option_value_filter?: {
168
+ option_value_ids?: number[];
169
+ warehouse_ids?: number[];
170
+ };
171
+ attribute_filter?: {
172
+ attribute_ids: number[];
173
+ attribute_values: `${number}:$${number}`[];
174
+ };
175
+ filter_customer_id?: number;
176
+ filter_has_customer_id?: boolean;
177
+ filter_advertised?: boolean;
178
+ filter_product_ids?: number[];
179
+ filter_exclude_product_ids?: number[];
180
+ price_from?: number;
181
+ price_to?: number;
182
+ retail_price_from?: number;
183
+ retail_price_to?: number;
184
+ margin_from?: number;
185
+ margin_to?: number;
186
+ only_in_root_category?: boolean;
187
+ price_type?: string;
188
+ });
189
+
159
190
  // Get products by QR code
160
191
  const { data, fetchNextPage, hasNextPage } = useGetProductsByQrInfiniteQuery({
161
192
  'filter[barcode]'?: string;
@@ -647,6 +678,28 @@ const { data, fetchNextPage, hasNextPage } = useGetNovaposhtaWarehousesInfiniteQ
647
678
  ### Orders
648
679
 
649
680
  ```typescript
681
+ // Get orders list with infinite scroll
682
+ const { data, fetchNextPage, hasNextPage } = useGetOrdersInfiniteQuery({
683
+ search?: string;
684
+ filter_order_id?: number;
685
+ filter_customer_id?: number;
686
+ filter_is_ttn_custom?: boolean;
687
+ filter_drop_name?: string;
688
+ filter_date_added?: string;
689
+ filter_drop_email?: string;
690
+ filter_customer_telephone?: string;
691
+ filter_customer_name?: string;
692
+ filter_drop_telephone?: string;
693
+ filter_email?: string;
694
+ filter_old_novaposhta_cn_number?: string;
695
+ filter_novaposhta_cn_number?: string;
696
+ filter_order_status_id?: number[];
697
+ filter_products_model?: string;
698
+ filter_products_name?: string;
699
+ filter_with_store?: boolean;
700
+ filter_without_store?: boolean;
701
+ });
702
+
650
703
  // Check telephone number (blacklist, duplicates)
651
704
  const { data } = useCheckTelephoneQuery({
652
705
  telephone: string;
@@ -10,6 +10,7 @@ export declare const favoriteApi: import("@reduxjs/toolkit/query").Api<import("@
10
10
  toggleGiftPackage: import("@reduxjs/toolkit/query").MutationDefinition<import("../../cart").ToggleGiftPackageRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, never, import("../../cart").ToggleGiftPackageResponse, "buymeuaApi", unknown>;
11
11
  }, "CartCount" | "CartMerchant" | "CartMerchantItem", never> & {
12
12
  getProducts: import("@reduxjs/toolkit/query").InfiniteQueryDefinition<void | import("../../product").GetProductsRequest, number, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "CartCount" | "CartMerchant" | "CartMerchantItem", import("../../product").GetProductsResponse, "buymeuaApi", unknown>;
13
+ getPaginatedProducts: import("@reduxjs/toolkit/query").QueryDefinition<void | import("../../product").GetPaginatedProductsRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "CartCount" | "CartMerchant" | "CartMerchantItem", import("../../product").GetProductsResponse, "buymeuaApi", unknown>;
13
14
  getProductsByQr: import("@reduxjs/toolkit/query").InfiniteQueryDefinition<void | import("../../product").GetProductsByQrRequest, number, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "CartCount" | "CartMerchant" | "CartMerchantItem", import("../../product").GetProductsByQrResponse, "buymeuaApi", unknown>;
14
15
  getProduct: import("@reduxjs/toolkit/query").QueryDefinition<import("../../product").GetProductRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "CartCount" | "CartMerchant" | "CartMerchantItem", import("../../product").GetProductResponse, "buymeuaApi", unknown>;
15
16
  getProductStatistics: import("@reduxjs/toolkit/query").QueryDefinition<import("../../product").GetProductStatisticsRequest, import("@reduxjs/toolkit/query").BaseQueryFn<string | import("@reduxjs/toolkit/query").FetchArgs, unknown, import("@reduxjs/toolkit/query").FetchBaseQueryError>, "CartCount" | "CartMerchant" | "CartMerchantItem", import("../../product").GetProductStatisticsResponse, "buymeuaApi", unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"favoriteApi.d.ts","sourceRoot":"","sources":["../../../../src/entities/favorite/api/favoriteApi.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,8BAA8B,EAC9B,+BAA+B,EAG/B,wBAAwB,EACxB,+BAA+B,EAC/B,gCAAgC,EAChC,2BAA2B,EAC3B,4BAA4B,EAC7B,MAAM,gBAAgB,CAAC;AAGxB,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;mkBA6kBpB,CAAC;AAEL,eAAO,MACL,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GACxB,oCAAoC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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