@instockng/api-client 1.0.24 → 1.0.26

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.
@@ -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
+ const API_URL = 'https://oms-api.instock.com.ng';
11
9
  /**
12
10
  * Fetch brand configuration by slug
13
11
  *
@@ -1,10 +1,7 @@
1
1
  /**
2
2
  * Cart fetcher functions
3
- *
4
3
  * These are the actual data-fetching functions used by hooks.
5
4
  * They can also be imported directly in Server Components.
6
- *
7
- * API URL is hardcoded to https://oms-api.instock.ng
8
5
  */
9
6
  /**
10
7
  * Fetch a cart by ID
@@ -5473,6 +5470,11 @@ export declare function fetchCartRecommendations(cartId: string, limit: number):
5473
5470
  flat?: boolean;
5474
5471
  };
5475
5472
  };
5473
+ createdAt: string;
5474
+ updatedAt: string;
5475
+ deletedAt: string;
5476
+ brandId: string;
5477
+ isActive: boolean;
5476
5478
  }[] | {
5477
5479
  error: {
5478
5480
  code: string;
@@ -1,13 +1,10 @@
1
1
  /**
2
2
  * Cart fetcher functions
3
- *
4
3
  * These are the actual data-fetching functions used by hooks.
5
4
  * They can also be imported directly in Server Components.
6
- *
7
- * API URL is hardcoded to https://oms-api.instock.ng
8
5
  */
9
6
  import { createRpcClients } from '../rpc-client';
10
- const API_URL = 'https://oms-api.instock.ng';
7
+ const API_URL = 'https://oms-api.instock.com.ng';
11
8
  /**
12
9
  * Fetch a cart by ID
13
10
  *
@@ -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 delivery zones
@@ -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
+ const API_URL = 'https://oms-api.instock.com.ng';
11
9
  /**
12
10
  * Fetch delivery zones
13
11
  *
@@ -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 an order by ID and token
@@ -1612,4 +1610,9 @@ export declare function fetchOrderRecommendations(orderId: string, token: string
1612
1610
  flat?: boolean;
1613
1611
  };
1614
1612
  };
1613
+ createdAt: string;
1614
+ updatedAt: string;
1615
+ deletedAt: string;
1616
+ brandId: string;
1617
+ isActive: boolean;
1615
1618
  }[]>;
@@ -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
+ const API_URL = 'https://oms-api.instock.com.ng';
11
9
  /**
12
10
  * Fetch an order by ID and token
13
11
  *
@@ -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 products by brand ID
@@ -484,6 +482,11 @@ export declare function fetchProductsByBrand(brandId: string): Promise<{
484
482
  flat?: boolean;
485
483
  };
486
484
  };
485
+ createdAt: string;
486
+ updatedAt: string;
487
+ deletedAt: string;
488
+ brandId: string;
489
+ isActive: boolean;
487
490
  }[]>;
488
491
  /**
489
492
  * Fetch a single product by slug
@@ -963,6 +966,11 @@ export declare function fetchProductBySlug(slug: string): Promise<{
963
966
  flat?: boolean;
964
967
  };
965
968
  };
969
+ createdAt: string;
970
+ updatedAt: string;
971
+ deletedAt: string;
972
+ brandId: string;
973
+ isActive: boolean;
966
974
  }>;
967
975
  /**
968
976
  * Fetch product add-ons
@@ -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
+ const API_URL = 'https://oms-api.instock.com.ng';
11
9
  /**
12
10
  * Fetch products by brand ID
13
11
  *
@@ -475,6 +475,11 @@ export declare function useListProducts(brandId?: string, options?: Omit<UseQuer
475
475
  flat?: boolean;
476
476
  };
477
477
  };
478
+ createdAt: string;
479
+ updatedAt: string;
480
+ deletedAt: string;
481
+ brandId: string;
482
+ isActive: boolean;
478
483
  }[], Error>;
479
484
  export declare function useGetProduct(productId: string, options?: Omit<UseQueryOptions<Awaited<ReturnType<Awaited<ReturnType<ReturnType<typeof createAdminRpcClients>['products'][':id']['$get']>>['json']>>, Error>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<{
480
485
  id: string;
@@ -948,6 +953,11 @@ export declare function useGetProduct(productId: string, options?: Omit<UseQuery
948
953
  flat?: boolean;
949
954
  };
950
955
  };
956
+ createdAt: string;
957
+ updatedAt: string;
958
+ deletedAt: string;
959
+ brandId: string;
960
+ isActive: boolean;
951
961
  }, Error>;
952
962
  export declare function useCreateProduct(options?: UseMutationOptions<any, Error, any>): import("@tanstack/react-query").UseMutationResult<any, Error, any, unknown>;
953
963
  export declare function useUpdateProduct(productId: string, options?: UseMutationOptions<any, Error, any>): import("@tanstack/react-query").UseMutationResult<any, Error, any, unknown>;
@@ -5553,4 +5553,9 @@ export declare function useGetCartRecommendations(cartId: string | null | undefi
5553
5553
  flat?: boolean;
5554
5554
  };
5555
5555
  };
5556
+ createdAt: string;
5557
+ updatedAt: string;
5558
+ deletedAt: string;
5559
+ brandId: string;
5560
+ isActive: boolean;
5556
5561
  }[], Error>;
@@ -1637,4 +1637,9 @@ export declare function useGetOrderRecommendations(orderId: string | null | unde
1637
1637
  flat?: boolean;
1638
1638
  };
1639
1639
  };
1640
+ createdAt: string;
1641
+ updatedAt: string;
1642
+ deletedAt: string;
1643
+ brandId: string;
1644
+ isActive: boolean;
1640
1645
  }[], Error>;
@@ -490,6 +490,11 @@ export declare function useGetProducts(brandId: string, options?: Omit<UseQueryO
490
490
  flat?: boolean;
491
491
  };
492
492
  };
493
+ createdAt: string;
494
+ updatedAt: string;
495
+ deletedAt: string;
496
+ brandId: string;
497
+ isActive: boolean;
493
498
  }[], Error>;
494
499
  /**
495
500
  * Hook to get a single product by slug using RPC
@@ -975,6 +980,11 @@ export declare function useGetProduct(slug: string, options?: Omit<UseQueryOptio
975
980
  flat?: boolean;
976
981
  };
977
982
  };
983
+ createdAt: string;
984
+ updatedAt: string;
985
+ deletedAt: string;
986
+ brandId: string;
987
+ isActive: boolean;
978
988
  }, Error>;
979
989
  /**
980
990
  * Hook to get product add-ons
package/dist/provider.js CHANGED
@@ -18,7 +18,7 @@ const ApiClientContext = createContext(null);
18
18
  * </ApiClientProvider>
19
19
  * ```
20
20
  */
21
- export function ApiClientProvider({ children, baseURL = 'https://oms-api.instock.ng', getAuthToken, onError, queryClient: externalQueryClient }) {
21
+ export function ApiClientProvider({ children, baseURL = 'https://oms-api.instock.com.ng', getAuthToken, onError, queryClient: externalQueryClient }) {
22
22
  // Initialize client synchronously on first render
23
23
  const config = {
24
24
  baseURL,
@@ -6379,6 +6379,11 @@ export declare function createRpcClients(baseURL: string): {
6379
6379
  flat?: boolean;
6380
6380
  };
6381
6381
  };
6382
+ createdAt: string;
6383
+ updatedAt: string;
6384
+ deletedAt: string;
6385
+ brandId: string;
6386
+ isActive: boolean;
6382
6387
  }[];
6383
6388
  outputFormat: "json";
6384
6389
  status: 200;
@@ -8112,6 +8117,11 @@ export declare function createRpcClients(baseURL: string): {
8112
8117
  flat?: boolean;
8113
8118
  };
8114
8119
  };
8120
+ createdAt: string;
8121
+ updatedAt: string;
8122
+ deletedAt: string;
8123
+ brandId: string;
8124
+ isActive: boolean;
8115
8125
  }[];
8116
8126
  outputFormat: "json";
8117
8127
  status: 200;
@@ -8631,6 +8641,11 @@ export declare function createRpcClients(baseURL: string): {
8631
8641
  flat?: boolean;
8632
8642
  };
8633
8643
  };
8644
+ createdAt: string;
8645
+ updatedAt: string;
8646
+ deletedAt: string;
8647
+ brandId: string;
8648
+ isActive: boolean;
8634
8649
  };
8635
8650
  outputFormat: "json";
8636
8651
  status: 200;
@@ -9131,6 +9146,11 @@ export declare function createRpcClients(baseURL: string): {
9131
9146
  flat?: boolean;
9132
9147
  };
9133
9148
  };
9149
+ createdAt: string;
9150
+ updatedAt: string;
9151
+ deletedAt: string;
9152
+ brandId: string;
9153
+ isActive: boolean;
9134
9154
  }[];
9135
9155
  outputFormat: "json";
9136
9156
  status: 200;
@@ -13823,6 +13843,11 @@ export declare function createAdminRpcClients(baseURL: string): {
13823
13843
  flat?: boolean;
13824
13844
  };
13825
13845
  };
13846
+ createdAt: string;
13847
+ updatedAt: string;
13848
+ deletedAt: string;
13849
+ brandId: string;
13850
+ isActive: boolean;
13826
13851
  }[];
13827
13852
  outputFormat: "json";
13828
13853
  status: import("hono/utils/http-status").ContentfulStatusCode;
@@ -14312,6 +14337,11 @@ export declare function createAdminRpcClients(baseURL: string): {
14312
14337
  flat?: boolean;
14313
14338
  };
14314
14339
  };
14340
+ createdAt: string;
14341
+ updatedAt: string;
14342
+ deletedAt: string;
14343
+ brandId: string;
14344
+ isActive: boolean;
14315
14345
  };
14316
14346
  outputFormat: "json";
14317
14347
  status: 201;
@@ -14822,6 +14852,11 @@ export declare function createAdminRpcClients(baseURL: string): {
14822
14852
  flat?: boolean;
14823
14853
  };
14824
14854
  };
14855
+ createdAt: string;
14856
+ updatedAt: string;
14857
+ deletedAt: string;
14858
+ brandId: string;
14859
+ isActive: boolean;
14825
14860
  };
14826
14861
  outputFormat: "json";
14827
14862
  status: import("hono/utils/http-status").ContentfulStatusCode;
@@ -15319,6 +15354,11 @@ export declare function createAdminRpcClients(baseURL: string): {
15319
15354
  flat?: boolean;
15320
15355
  };
15321
15356
  };
15357
+ createdAt: string;
15358
+ updatedAt: string;
15359
+ deletedAt: string;
15360
+ brandId: string;
15361
+ isActive: boolean;
15322
15362
  };
15323
15363
  outputFormat: "json";
15324
15364
  status: import("hono/utils/http-status").ContentfulStatusCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instockng/api-client",
3
- "version": "1.0.24",
3
+ "version": "1.0.26",
4
4
  "description": "React Query hooks for OMS API",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",