@instockng/api-client 1.0.22 → 1.0.25

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.
@@ -7,4 +7,4 @@
7
7
  * These types provide end-to-end type safety between the backend API
8
8
  * and the frontend hooks/fetchers.
9
9
  */
10
- export type { CartsRPC, OrdersRPC, ProductsRPC, DeliveryZonesRPC, BrandsRPC, AdminOrdersRPC, AdminBrandsRPC, AdminProductsRPC, AdminVariantsRPC, AdminWarehousesRPC, AdminInventoryRPC, AdminCustomersRPC, AdminStatsRPC, AdminAbandonedCartsRPC, AdminDiscountCodesRPC, AdminDeliveryZonesRPC, ProductAddonsRPC, AdminProductAddonsRPC, } from '../../../apps/backend/src/http-app';
10
+ export type { CartsRPC, OrdersRPC, ProductsRPC, DeliveryZonesRPC, BrandsRPC, AdminOrdersRPC, AdminBrandsRPC, AdminProductsRPC, AdminVariantsRPC, AdminWarehousesRPC, AdminInventoryRPC, AdminCustomersRPC, AdminStatsRPC, AdminAbandonedCartsRPC, AdminDiscountCodesRPC, AdminDeliveryZonesRPC, ProductAddonsRPC, AdminProductAddonsRPC, AdminMediaRPC, } from '../../../apps/backend/src/http-app';
@@ -3,8 +3,6 @@
3
3
  *
4
4
  * These are the actual data-fetching functions used by hooks.
5
5
  * They can also be imported directly in Server Components.
6
- *
7
- * API URL is hardcoded to https://oms-api.instock.ng
8
6
  */
9
7
  /**
10
8
  * Fetch brand configuration by slug
@@ -3,11 +3,9 @@
3
3
  *
4
4
  * These are the actual data-fetching functions used by hooks.
5
5
  * They can also be imported directly in Server Components.
6
- *
7
- * API URL is hardcoded to https://oms-api.instock.ng
8
6
  */
9
7
  import { createRpcClients } from '../rpc-client';
10
- const API_URL = 'https://oms-api.instock.ng';
8
+ import { API_BASE_URL } from '../provider';
11
9
  /**
12
10
  * Fetch brand configuration by slug
13
11
  *
@@ -15,7 +13,7 @@ const API_URL = 'https://oms-api.instock.ng';
15
13
  * @returns Brand with metaPixelId and other configuration
16
14
  */
17
15
  export async function fetchBrandBySlug(slug) {
18
- const clients = createRpcClients(API_URL);
16
+ const clients = createRpcClients(API_BASE_URL);
19
17
  const res = await clients.brands[':slug'].$get({
20
18
  param: { slug },
21
19
  });