Scan your whole stack
Are you using @serik_lav/api-fe?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.131.0
@serik_lav/api-fe was last scanned on 24 Nov 2026 at version 0.131.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.131.0 LATEST | 24 Nov 2026 | No rules fired |
| 0.130.0 | 24 Nov 2026 | No rules fired |
| 0.129.0 | 23 Nov 2026 | No rules fired |
| 0.128.0 | 23 Nov 2026 | Not shown |
| 0.127.0 | 23 Nov 2026 | Not shown |
Findings for v0.131.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.131.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
TypeScript/JavaScript client for BuyMeUA API with RTK Query integration.
npm install buymeua-api-fe @reduxjs/toolkit react-redux
# or
yarn add buymeua-api-fe @reduxjs/toolkit react-redux
# or
pnpm add buymeua-api-fe @reduxjs/toolkit react-redux
import { configureStore } from '@reduxjs/toolkit';
import { configureBuymeuaApi, Session } from 'buymeua-api-fe';
// Configure API before store setup
const buymeuaApi = configureBuymeuaApi({
baseUrl: 'https://api.buymeua.com/',
pusher: {
appKey: 'your-pusher-app-key',
cluster: 'eu',
},
prepareHeaders: (headers) => {
headers.set('Accept', 'application/json');
headers.set('Content-Type', 'application/json');
headers.set('X-SESSION', Session.Dropshipper);
const token = localStorage.getItem('auth-token');
if (token) {
headers.set('Authorization', `Bearer ${token}`);
}
},
onUnauthorized: (args, api, extraOptions) => {
// Handle 401 errors with full request context
console.log('Unauthorized request:', args);
localStorage.removeItem('auth-token');
window.location.href = '/login';
},
});
// Setup Redux store
export const store = configureStore({
reducer: {
[buymeuaApi.reducerPath]: buymeuaApi.reducer,
},
middleware: (getDefaultMiddleware) =>
getDefaultMiddleware().concat(buymeuaApi.middleware),
});
import React from 'react';
import { productApi } from 'buymeua-api-fe';
function ProductList() {
const { data, isLoading, error, fetchNextPage, hasNextPage } = productApi.useGetProductsInfiniteQuery({
per_page: 20,
core_filter: 'phone'
});
if (isLoading) return <div>Loading...</div>;
if (error) return <div>Error loading products</div>;
return (
<div>
{data?.pages.map((page, pageIndex) => (
<div key={pageIndex}>
{page.data.map((product) => (
<div key={product.id}>{product.name}</div>
))}
</div>
))}
{hasNextPage && (
<button onClick={() => fetchNextPage()}>Load More</button>
)}
</div>
);
}
configureBuymeuaApi(config: ApiConfig)Configures the global API client.
getPusher(): Promise<Pusher>Returns a shared Pusher instance for real-time subscriptions. Uses lazy initialization and automatically handles authentication for private channels.
import { getPusher } from 'buymeua-api-fe';
// Subscribe to a channel
const pusher = await getPusher();
const channel = pusher.subscribe('my-channel');
channel.bind('my-event', (data) => {
console.log('Received:', data);
});
Parameters:
config.baseUrl - Base API URLconfig.prepareHeaders - Function to prepare headers (receives Headers object and API context)config.onUnauthorized - Optional callback for handling 401 errors (receives args, api, extraOptions for context)Returns: Configured API instance ready for Redux store setup
import { productApi } from 'buymeua-api-fe';
// Get products list with infinite scroll
const { data, fetchNextPage, hasNextPage } = productApi.useGetProductsInfiniteQuery({
per_page?: number;
core_filter?: string;
filter_has_special?: boolean | null;
order_by?: string | string[];
category_filter?: number[];
option_value_filter?: {
option_value_ids: number[];
warehouse_ids: number[];
};
attribute_filter?: {
attribute_ids: number[];
attribute_values: `${number}:$${number}`[];
};
filter_customer_id?: number;
filter_has_customer_id?: boolean;
filter_advertised?: boolean;
filter_product_ids?: number[];
filter_exclude_product_ids?: number[];
filter_bestseller?: boolean;
price_from?: number;
price_to?: number;
retail_price_from?: number;
retail_price_to?: number;
margin_from?: number;
margin_to?: number;
only_in_root_category?: boolean;
price_type?: string;
});
// Get products with standard pagination
const { data } = productApi.useGetPaginatedProductsQuery({
page?: number;
per_page?: number;
core_filter?: string;
filter_has_special?: boolean | null;
order_by?: string | string[];
category_filter?: number[];
option_value_filter?: {
option_value_ids?: number[];
warehouse_ids?: number[];
};
attribute_filter?: {
attribute_ids: number[];
attribute_values: `${number}:$${number}`[];
};
filter_customer_id?: number;
filter_has_customer_id?: boolean;
filter_advertised?: boolean;
filter_product_ids?: number[];
filter_exclude_product_ids?: number[];
filter_bestseller?: boolean;
price_from?: number;
price_to?: number;
retail_price_from?: number;
retail_price_to?: number;
margin_from?: number;
margin_to?: number;
only_in_root_category?: boolean;
price_type?: string;
});
// Get products by QR code
const { data, fetchNextPage, hasNextPage } = productApi.useGetProductsByQrInfiniteQuery({
'filter[barcode]'?: string;
'filter[product_id]'?: number;
warehouse_id?: number;
show_sizes?: boolean;
per_page?: number;
});
// Get single product by ID
const { data } = productApi.useGetProductQuery({ product: number });
// Get product statistics
const { data } = productApi.useGetProductStatisticsQuery({ product: number });
// Get product details
const { data } = productApi.useGetProductDetailsQuery({ product: number });
// Get product attributes for filtering
const { data } = productApi.useGetProductAttributesQuery({
search?: string;
product_id?: number;
category_id?: number;
attribute_ids?: number[];
option_value_filter?: {
option_value_ids?: number[];
warehouse_ids?: number[];
};
attribute_filter?: {
attribute_ids?: number[];
attribute_values?: `${number}:${string}`[];
};
});
// Get product options for filtering
const { data } = productApi.useGetProductOptionsQuery({
search?: string;
product_id?: number;
category_id?: number;
option_id?: number;
option_value_ids?: number[];
warehouse_ids?: number[];
attribute_filter?: {
attribute_ids?: number[];
attribute_values?: `${number}:${string}`[];
};
});
// Get supplier products with infinite scroll
const { data, fetchNextPage, hasNextPage } = productApi.useGetSupplierProductsInfiniteQuery({
core_filter?: string;
category_filter?: number[];
buyme_category_filter?: number[];
filter_buyme_category_set_main_category?: boolean;
filter_customer_id?: number;
filter_exclude_supplier_ids?: number[];
filter_advertised?: boolean;
only_in_root_category?: boolean;
option_value_filter?: {
option_value_ids?: number[];
warehouse_ids?: number[];
};
price_from?: number;
price_to?: number;
per_page?: number;
price_type?: 'price' | 'price_drop';
});
// Get supplier products with standard pagination
const { data } = productApi.useGetPaginatedSupplierProductsQuery({
page?: number;
core_filter?: string;
category_filter?: number[];
buyme_category_filter?: number[];
filter_buyme_category_set_main_category?: boolean;
filter_customer_id?: number;
filter_exclude_supplier_ids?: number[];
filter_advertised?: boolean;
only_in_root_category?: boolean;
option_value_filter?: {
option_value_ids?: number[];
warehouse_ids?: number[];
};
price_from?: number;
price_to?: number;
per_page?: number;
price_type?: 'price' | 'price_drop';
});
// Get supplier product details
const { data } = productApi.useGetSupplierProductDetailsQuery({ id: number });
// Generate product description using AI
const { data } = productApi.useGenerateProductDescriptionQuery({ product: number });
// data.description - AI-generated product description
// Get storefront products with infinite scroll (context: X-BSTORE-ID header)
const { data, fetchNextPage, hasNextPage } = productApi.useGetStoreProductsInfiniteQuery({
filter_category_ids?: number[];
filter_product_ids?: number[];
filter_search?: string;
filter_option_value_ids?: number[];
filter_attribute_values?: string[]; // format: "attr_id:value_id"
filter_price_from?: number;
filter_price_to?: number;
filter_has_special?: boolean;
order_by?: 'price_asc' | 'price_desc' | 'newest' | 'discount';
per_page?: number;
});
import { cartApi } from 'buymeua-api-fe';
// Get cart count
const { data } = cartApi.useGetCartCountQuery();
// Get cart merchants
const { data, fetchNextPage, hasNextPage } = cartApi.useGetCartMerchantsInfiniteQuery({
per_page?: number;
});
// Get cart merchant items
const { data, fetchNextPage, hasNextPage } = cartApi.useGetCartMerchantItemsInfiniteQuery({
merchant_id: number;
per_page?: number;
});
// Add item to cart
const [addToCart] = cartApi.useAddToCartMutation();
await addToCart({
product_type: 'buyme' | 'supplier';
product_id: number;
product_option_value_id: number;
quantity: number;
warehouse_id: number | null; // only for buyme products
});
// Remove item from cart
const [removeFromCart] = cartApi.useRemoveItemFromCartMutation();
await removeFromCart({
cart_item_id: number;
merchantId: number;
quantity: number;
});
// Remove entire merchant from cart
const [removeMerchant] = cartApi.useRemoveMerchantFromCartMutation();
await removeMerchant({ merchant_id: number });
// Update cart item quantity
const [updateQuantity] = cartApi.useUpdateCartItemQuantityMutation();
await updateQuantity({
cart_item_option_value_id: number;
quantity: number;
type: 'increase' | 'decrease';
merchantId: number;
optionIndex: number;
});
// Toggle gift package
const [toggleGift] = cartApi.useToggleGiftPackageMutation();
await toggleGift({
gift_package: boolean;
});
import { authApi } from 'buymeua-api-fe';
// Sign in with phone number
const [signIn] = authApi.useSignInMutation();
await signIn({
telephone: string;
});
// Confirm verification code
const [confirmCode] = authApi.useConfirmCodeMutation();
await confirmCode({
telephone: string;
code: string;
});
// Sign up
const [signUp] = authApi.useSignUpMutation();
await signUp({
telephone: string;
firstname: string;
lastname: string;
term: true;
platform: 'web' | 'ios' | 'android';
ad_platform: 'instagram' | 'tiktok' | 'facebook' | 'youtube' | 'web_organic' | 'google' | 'telegram' | 'referral_program' | 'other';
referral_id?: number;
});
// Register as guest
const [registerGuest] = authApi.useRegisterGuestMutation();
const { data } = await registerGuest(); // Returns Customer with token
// Logout
const [logout] = authApi.useLogoutMutation();
await logout();
import { customerApi } from 'buymeua-api-fe';
// Save customer settings
const [saveSettings] = customerApi.useSaveCustomerSettingsMutation();
await saveSettings({
customer_group_id?: number;
firstname?: string;
lastname?: string;
middlename?: string;
email?: string;
iban?: string;
card_fio?: string;
ederpou?: string;
avatar?: File; // jpeg, png, jpg, gif, max: 2048kb
});
// Delete customer account
const [deleteAccount] = customerApi.useDeleteCustomerAccountMutation();
await deleteAccount();
import { categoryApi, useCategoryBreadcrumbs } from 'buymeua-api-fe';
// Get categories tree (full hierarchy)
const { data } = categoryApi.useGetCategoriesQuery({
search?: string;
filter_parent_id?: number;
filter_with_products?: boolean;
filter_with_supplier_products?: boolean;
filter_prepared_for_site?: boolean;
filter_has_products_with_special?: boolean;
});
// Build category breadcrumbs
// For regular categories
const { breadcrumbs, isLoading } = useCategoryBreadcrumbs(categoryId);
// For regular categories with filter params
const { breadcrumbs, isLoading } = useCategoryBreadcrumbs(categoryId, undefined, {
filter_with_products: true
});
// For supplier categories
const { breadcrumbs, isLoading } = useCategoryBreadcrumbs(categoryId, supplierId);
// For supplier categories with filter params
const { breadcrumbs, isLoading } = useCategoryBreadcrumbs(categoryId, supplierId, {
search: 'electronics'
});
// Returns array of categories from root to current
// Get storefront category tree
const { data } = categoryApi.useGetStoreCategoriesQuery();
// Get supplier categories
const { data } = categoryApi.useGetSupplierCategoriesQuery({
search?: string;
filter_parent_id?: number;
filter_customer_id?: number;
filter_has_products?: boolean;
filter_status?: boolean;
});
import { favoriteApi } from 'buymeua-api-fe';
// Get favorite count
const { data } = favoriteApi.useGetFavoriteCountQuery();
// Get favorite merchants
const { data, fetchNextPage, hasNextPage } = favoriteApi.useGetFavoriteMerchantsInfiniteQuery({
per_page?: number;
});
// Get favorite merchant items
const { data, fetchNextPage, hasNextPage } = favoriteApi.useGetFavoriteMerchantItemsInfiniteQuery({
merchant_id: number;
});
// Add to favorites
const [addToFavorite] = favoriteApi.useAddFavoriteMerchantItemMutation();
await addToFavorite({
product_type: 'buyme' | 'supplier';
product_id: number;
optimisticUpdate?: {
product: BaseProduct; // For optimistic UI updates
};
});
// Remove from favorites
const [removeFromFavorite] = favoriteApi.useDeleteFavoriteMerchantItemMutation();
await removeFromFavorite({
product_type: 'buyme' | 'supplier';
product_id: number;
optimisticUpdate?: {
product: BaseProduct; // For optimistic UI updates
};
});
import { chatApi } from 'buymeua-api-fe';
// Get chat list
const { data, fetchNextPage, hasNextPage } = chatApi.useGetChatsInfiniteQuery({
per_page?: number;
});
// Get chat messages
const { data, fetchNextPage, hasNextPage } = chatApi.useGetChatInfiniteQuery({
customerChatThreadId: number;
per_page?: number;
});
// Create chat
const [createChat] = chatApi.useCreateChatMutation();
await createChat({
customer_id: number;
supplier_id?: number; // Required if admin_id not provided
admin_id?: number; // Required if supplier_id not provided
});
// Send message
const [sendMessage] = chatApi.useSendChatMessageMutation();
await sendMessage({
customerChatThreadId: number;
message: string;
supplier_story_id?: number; // ID of supplier story being replied to
medias?: File[];
});
// Update message
const [updateMessage] = chatApi.useUpdateChatMessageMutation();
await updateMessage({
customerChatThreadId: number;
customerChatId: number;
message: string;
medias?: File[];
});
// Mark messages as read
const [markAsRead] = chatApi.useMarkChatMessagesAsReadMutation();
await markAsRead({
customerChatThreadId: number;
chats: number[]; // Message IDs
});
// Mark all messages as read
const [markAllAsRead] = chatApi.useMarkAllChatMessagesAsReadMutation();
await markAllAsRead({
customerChatThreadId: number;
});
// Resend message
const [resendMessage] = chatApi.useResendChatMessageMutation();
await resendMessage({
customerChatThreadId: number;
customerChatId: number;
message: string;
medias?: File[];
});
// Get chat warnings
const { data } = chatApi.useGetChatWarningsQuery({
customerChatThread: number;
});
// Real-time updates are automatically enabled via Pusher WebSocket
// Acknowledge chat warning
const [acknowledgeWarning] = chatApi.useAcknowledgeChatWarningMutation();
await acknowledgeWarning({
customerChatThread: number;
warning: number;
});
// Get total unread messages count
const { data } = chatApi.useGetNewChatMessagesCountQuery();
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.