@instockng/api-client 1.0.35 → 1.0.37
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/dist/backend-types.d.ts +1 -1
- package/dist/fetchers/brands.d.ts +1 -0
- package/dist/fetchers/brands.js +1 -1
- package/dist/fetchers/carts.d.ts +132 -112
- package/dist/fetchers/carts.js +1 -1
- package/dist/fetchers/delivery-zones.d.ts +0 -1
- package/dist/fetchers/delivery-zones.js +1 -1
- package/dist/fetchers/orders.d.ts +94 -30
- package/dist/fetchers/orders.js +38 -1
- package/dist/fetchers/products.js +1 -1
- package/dist/hooks/admin/abandoned-carts.d.ts +24 -24
- package/dist/hooks/admin/brands.d.ts +4 -0
- package/dist/hooks/admin/customers.d.ts +33 -14
- package/dist/hooks/admin/delivery-zones.d.ts +12 -8
- package/dist/hooks/admin/discount-codes.d.ts +20 -15
- package/dist/hooks/admin/dispatch-riders.d.ts +59 -0
- package/dist/hooks/admin/dispatch-riders.js +92 -0
- package/dist/hooks/admin/index.d.ts +1 -0
- package/dist/hooks/admin/index.js +1 -0
- package/dist/hooks/admin/orders.d.ts +215 -78
- package/dist/hooks/admin/orders.js +70 -0
- package/dist/hooks/admin/products.d.ts +6 -4
- package/dist/hooks/admin/stats.d.ts +40 -14
- package/dist/hooks/admin/stats.js +20 -0
- package/dist/hooks/admin/warehouses.d.ts +7 -6
- package/dist/hooks/public/brands.d.ts +1 -0
- package/dist/hooks/public/carts.d.ts +132 -112
- package/dist/hooks/public/delivery-zones.d.ts +0 -1
- package/dist/hooks/public/orders.d.ts +98 -31
- package/dist/hooks/public/orders.js +23 -1
- package/dist/provider.js +1 -1
- package/dist/rpc-client.d.ts +6684 -3768
- package/dist/rpc-client.js +1 -0
- package/dist/rpc-types.d.ts +9 -6
- package/dist/utils/query-keys.d.ts +5 -0
- package/dist/utils/query-keys.js +5 -0
- package/package.json +1 -1
package/dist/backend-types.d.ts
CHANGED
|
@@ -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, AdminMediaRPC, AdminSalesRPC, } 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, AdminSalesRPC, AdminDispatchRidersRPC, } from '../../../apps/backend/src/http-app';
|
package/dist/fetchers/brands.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* They can also be imported directly in Server Components.
|
|
6
6
|
*/
|
|
7
7
|
import { createRpcClients } from '../rpc-client';
|
|
8
|
-
const API_URL = 'https://oms-api.instock.
|
|
8
|
+
const API_URL = 'https://oms-api.instock.ng';
|
|
9
9
|
/**
|
|
10
10
|
* Fetch brand configuration by slug
|
|
11
11
|
*
|
package/dist/fetchers/carts.d.ts
CHANGED
|
@@ -12,19 +12,19 @@
|
|
|
12
12
|
export declare function fetchCart(cartId: string): Promise<{
|
|
13
13
|
id: string;
|
|
14
14
|
brand: {
|
|
15
|
-
createdAt: string;
|
|
16
|
-
updatedAt: string;
|
|
17
|
-
deletedAt: string;
|
|
18
15
|
id: string;
|
|
19
16
|
name: string;
|
|
20
17
|
slug: string;
|
|
21
|
-
logoUrl: string
|
|
18
|
+
logoUrl: string;
|
|
22
19
|
siteUrl: string;
|
|
23
20
|
domain: string;
|
|
24
|
-
metaPixelId: string
|
|
25
|
-
tiktokPixelId: string
|
|
26
|
-
paystackPublicKey: string
|
|
27
|
-
|
|
21
|
+
metaPixelId: string;
|
|
22
|
+
tiktokPixelId: string;
|
|
23
|
+
paystackPublicKey: string;
|
|
24
|
+
freeShippingThreshold: number;
|
|
25
|
+
createdAt: string;
|
|
26
|
+
updatedAt: string;
|
|
27
|
+
deletedAt: string;
|
|
28
28
|
};
|
|
29
29
|
customerPhone: string;
|
|
30
30
|
customerEmail: string;
|
|
@@ -44,9 +44,10 @@ export declare function fetchCart(cartId: string): Promise<{
|
|
|
44
44
|
createdAt: string;
|
|
45
45
|
updatedAt: string;
|
|
46
46
|
deletedAt: string;
|
|
47
|
-
brandId: string | null;
|
|
48
|
-
isActive: boolean;
|
|
49
47
|
code: string;
|
|
48
|
+
isActive: boolean;
|
|
49
|
+
brandId: string | null;
|
|
50
|
+
description: string | null;
|
|
50
51
|
minPurchase: string;
|
|
51
52
|
maxDiscount: string;
|
|
52
53
|
usageLimit: number | null;
|
|
@@ -55,7 +56,6 @@ export declare function fetchCart(cartId: string): Promise<{
|
|
|
55
56
|
validFrom: string;
|
|
56
57
|
validUntil: string;
|
|
57
58
|
isAutoApply: boolean;
|
|
58
|
-
description: string | null;
|
|
59
59
|
category: string;
|
|
60
60
|
createdBy: string | null;
|
|
61
61
|
};
|
|
@@ -69,8 +69,8 @@ export declare function fetchCart(cartId: string): Promise<{
|
|
|
69
69
|
createdAt: string;
|
|
70
70
|
updatedAt: string;
|
|
71
71
|
deletedAt: string;
|
|
72
|
-
brandId: string;
|
|
73
72
|
isActive: boolean;
|
|
73
|
+
brandId: string;
|
|
74
74
|
description: string | null;
|
|
75
75
|
thumbnailUrl: string | null;
|
|
76
76
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -564,19 +564,19 @@ export declare function fetchCart(cartId: string): Promise<{
|
|
|
564
564
|
export declare function createCart(brandSlug: string): Promise<{
|
|
565
565
|
id: string;
|
|
566
566
|
brand: {
|
|
567
|
-
createdAt: string;
|
|
568
|
-
updatedAt: string;
|
|
569
|
-
deletedAt: string;
|
|
570
567
|
id: string;
|
|
571
568
|
name: string;
|
|
572
569
|
slug: string;
|
|
573
|
-
logoUrl: string
|
|
570
|
+
logoUrl: string;
|
|
574
571
|
siteUrl: string;
|
|
575
572
|
domain: string;
|
|
576
|
-
metaPixelId: string
|
|
577
|
-
tiktokPixelId: string
|
|
578
|
-
paystackPublicKey: string
|
|
579
|
-
|
|
573
|
+
metaPixelId: string;
|
|
574
|
+
tiktokPixelId: string;
|
|
575
|
+
paystackPublicKey: string;
|
|
576
|
+
freeShippingThreshold: number;
|
|
577
|
+
createdAt: string;
|
|
578
|
+
updatedAt: string;
|
|
579
|
+
deletedAt: string;
|
|
580
580
|
};
|
|
581
581
|
customerPhone: string;
|
|
582
582
|
customerEmail: string;
|
|
@@ -596,9 +596,10 @@ export declare function createCart(brandSlug: string): Promise<{
|
|
|
596
596
|
createdAt: string;
|
|
597
597
|
updatedAt: string;
|
|
598
598
|
deletedAt: string;
|
|
599
|
-
brandId: string | null;
|
|
600
|
-
isActive: boolean;
|
|
601
599
|
code: string;
|
|
600
|
+
isActive: boolean;
|
|
601
|
+
brandId: string | null;
|
|
602
|
+
description: string | null;
|
|
602
603
|
minPurchase: string;
|
|
603
604
|
maxDiscount: string;
|
|
604
605
|
usageLimit: number | null;
|
|
@@ -607,7 +608,6 @@ export declare function createCart(brandSlug: string): Promise<{
|
|
|
607
608
|
validFrom: string;
|
|
608
609
|
validUntil: string;
|
|
609
610
|
isAutoApply: boolean;
|
|
610
|
-
description: string | null;
|
|
611
611
|
category: string;
|
|
612
612
|
createdBy: string | null;
|
|
613
613
|
};
|
|
@@ -621,8 +621,8 @@ export declare function createCart(brandSlug: string): Promise<{
|
|
|
621
621
|
createdAt: string;
|
|
622
622
|
updatedAt: string;
|
|
623
623
|
deletedAt: string;
|
|
624
|
-
brandId: string;
|
|
625
624
|
isActive: boolean;
|
|
625
|
+
brandId: string;
|
|
626
626
|
description: string | null;
|
|
627
627
|
thumbnailUrl: string | null;
|
|
628
628
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -1119,19 +1119,19 @@ export declare function updateCart(cartId: string, data: {
|
|
|
1119
1119
|
}): Promise<{
|
|
1120
1120
|
id: string;
|
|
1121
1121
|
brand: {
|
|
1122
|
-
createdAt: string;
|
|
1123
|
-
updatedAt: string;
|
|
1124
|
-
deletedAt: string;
|
|
1125
1122
|
id: string;
|
|
1126
1123
|
name: string;
|
|
1127
1124
|
slug: string;
|
|
1128
|
-
logoUrl: string
|
|
1125
|
+
logoUrl: string;
|
|
1129
1126
|
siteUrl: string;
|
|
1130
1127
|
domain: string;
|
|
1131
|
-
metaPixelId: string
|
|
1132
|
-
tiktokPixelId: string
|
|
1133
|
-
paystackPublicKey: string
|
|
1134
|
-
|
|
1128
|
+
metaPixelId: string;
|
|
1129
|
+
tiktokPixelId: string;
|
|
1130
|
+
paystackPublicKey: string;
|
|
1131
|
+
freeShippingThreshold: number;
|
|
1132
|
+
createdAt: string;
|
|
1133
|
+
updatedAt: string;
|
|
1134
|
+
deletedAt: string;
|
|
1135
1135
|
};
|
|
1136
1136
|
customerPhone: string;
|
|
1137
1137
|
customerEmail: string;
|
|
@@ -1151,9 +1151,10 @@ export declare function updateCart(cartId: string, data: {
|
|
|
1151
1151
|
createdAt: string;
|
|
1152
1152
|
updatedAt: string;
|
|
1153
1153
|
deletedAt: string;
|
|
1154
|
-
brandId: string | null;
|
|
1155
|
-
isActive: boolean;
|
|
1156
1154
|
code: string;
|
|
1155
|
+
isActive: boolean;
|
|
1156
|
+
brandId: string | null;
|
|
1157
|
+
description: string | null;
|
|
1157
1158
|
minPurchase: string;
|
|
1158
1159
|
maxDiscount: string;
|
|
1159
1160
|
usageLimit: number | null;
|
|
@@ -1162,7 +1163,6 @@ export declare function updateCart(cartId: string, data: {
|
|
|
1162
1163
|
validFrom: string;
|
|
1163
1164
|
validUntil: string;
|
|
1164
1165
|
isAutoApply: boolean;
|
|
1165
|
-
description: string | null;
|
|
1166
1166
|
category: string;
|
|
1167
1167
|
createdBy: string | null;
|
|
1168
1168
|
};
|
|
@@ -1176,8 +1176,8 @@ export declare function updateCart(cartId: string, data: {
|
|
|
1176
1176
|
createdAt: string;
|
|
1177
1177
|
updatedAt: string;
|
|
1178
1178
|
deletedAt: string;
|
|
1179
|
-
brandId: string;
|
|
1180
1179
|
isActive: boolean;
|
|
1180
|
+
brandId: string;
|
|
1181
1181
|
description: string | null;
|
|
1182
1182
|
thumbnailUrl: string | null;
|
|
1183
1183
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -1677,19 +1677,19 @@ export declare function updateCart(cartId: string, data: {
|
|
|
1677
1677
|
export declare function addCartItem(cartId: string, sku: string, quantity: number, fbc?: string, fbp?: string, ttp?: string, ttclid?: string): Promise<{
|
|
1678
1678
|
id: string;
|
|
1679
1679
|
brand: {
|
|
1680
|
-
createdAt: string;
|
|
1681
|
-
updatedAt: string;
|
|
1682
|
-
deletedAt: string;
|
|
1683
1680
|
id: string;
|
|
1684
1681
|
name: string;
|
|
1685
1682
|
slug: string;
|
|
1686
|
-
logoUrl: string
|
|
1683
|
+
logoUrl: string;
|
|
1687
1684
|
siteUrl: string;
|
|
1688
1685
|
domain: string;
|
|
1689
|
-
metaPixelId: string
|
|
1690
|
-
tiktokPixelId: string
|
|
1691
|
-
paystackPublicKey: string
|
|
1692
|
-
|
|
1686
|
+
metaPixelId: string;
|
|
1687
|
+
tiktokPixelId: string;
|
|
1688
|
+
paystackPublicKey: string;
|
|
1689
|
+
freeShippingThreshold: number;
|
|
1690
|
+
createdAt: string;
|
|
1691
|
+
updatedAt: string;
|
|
1692
|
+
deletedAt: string;
|
|
1693
1693
|
};
|
|
1694
1694
|
customerPhone: string;
|
|
1695
1695
|
customerEmail: string;
|
|
@@ -1709,9 +1709,10 @@ export declare function addCartItem(cartId: string, sku: string, quantity: numbe
|
|
|
1709
1709
|
createdAt: string;
|
|
1710
1710
|
updatedAt: string;
|
|
1711
1711
|
deletedAt: string;
|
|
1712
|
-
brandId: string | null;
|
|
1713
|
-
isActive: boolean;
|
|
1714
1712
|
code: string;
|
|
1713
|
+
isActive: boolean;
|
|
1714
|
+
brandId: string | null;
|
|
1715
|
+
description: string | null;
|
|
1715
1716
|
minPurchase: string;
|
|
1716
1717
|
maxDiscount: string;
|
|
1717
1718
|
usageLimit: number | null;
|
|
@@ -1720,7 +1721,6 @@ export declare function addCartItem(cartId: string, sku: string, quantity: numbe
|
|
|
1720
1721
|
validFrom: string;
|
|
1721
1722
|
validUntil: string;
|
|
1722
1723
|
isAutoApply: boolean;
|
|
1723
|
-
description: string | null;
|
|
1724
1724
|
category: string;
|
|
1725
1725
|
createdBy: string | null;
|
|
1726
1726
|
};
|
|
@@ -1734,8 +1734,8 @@ export declare function addCartItem(cartId: string, sku: string, quantity: numbe
|
|
|
1734
1734
|
createdAt: string;
|
|
1735
1735
|
updatedAt: string;
|
|
1736
1736
|
deletedAt: string;
|
|
1737
|
-
brandId: string;
|
|
1738
1737
|
isActive: boolean;
|
|
1738
|
+
brandId: string;
|
|
1739
1739
|
description: string | null;
|
|
1740
1740
|
thumbnailUrl: string | null;
|
|
1741
1741
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -2231,19 +2231,19 @@ export declare function addCartItem(cartId: string, sku: string, quantity: numbe
|
|
|
2231
2231
|
export declare function updateCartItem(cartId: string, itemId: string, quantity: number): Promise<{
|
|
2232
2232
|
id: string;
|
|
2233
2233
|
brand: {
|
|
2234
|
-
createdAt: string;
|
|
2235
|
-
updatedAt: string;
|
|
2236
|
-
deletedAt: string;
|
|
2237
2234
|
id: string;
|
|
2238
2235
|
name: string;
|
|
2239
2236
|
slug: string;
|
|
2240
|
-
logoUrl: string
|
|
2237
|
+
logoUrl: string;
|
|
2241
2238
|
siteUrl: string;
|
|
2242
2239
|
domain: string;
|
|
2243
|
-
metaPixelId: string
|
|
2244
|
-
tiktokPixelId: string
|
|
2245
|
-
paystackPublicKey: string
|
|
2246
|
-
|
|
2240
|
+
metaPixelId: string;
|
|
2241
|
+
tiktokPixelId: string;
|
|
2242
|
+
paystackPublicKey: string;
|
|
2243
|
+
freeShippingThreshold: number;
|
|
2244
|
+
createdAt: string;
|
|
2245
|
+
updatedAt: string;
|
|
2246
|
+
deletedAt: string;
|
|
2247
2247
|
};
|
|
2248
2248
|
customerPhone: string;
|
|
2249
2249
|
customerEmail: string;
|
|
@@ -2263,9 +2263,10 @@ export declare function updateCartItem(cartId: string, itemId: string, quantity:
|
|
|
2263
2263
|
createdAt: string;
|
|
2264
2264
|
updatedAt: string;
|
|
2265
2265
|
deletedAt: string;
|
|
2266
|
-
brandId: string | null;
|
|
2267
|
-
isActive: boolean;
|
|
2268
2266
|
code: string;
|
|
2267
|
+
isActive: boolean;
|
|
2268
|
+
brandId: string | null;
|
|
2269
|
+
description: string | null;
|
|
2269
2270
|
minPurchase: string;
|
|
2270
2271
|
maxDiscount: string;
|
|
2271
2272
|
usageLimit: number | null;
|
|
@@ -2274,7 +2275,6 @@ export declare function updateCartItem(cartId: string, itemId: string, quantity:
|
|
|
2274
2275
|
validFrom: string;
|
|
2275
2276
|
validUntil: string;
|
|
2276
2277
|
isAutoApply: boolean;
|
|
2277
|
-
description: string | null;
|
|
2278
2278
|
category: string;
|
|
2279
2279
|
createdBy: string | null;
|
|
2280
2280
|
};
|
|
@@ -2288,8 +2288,8 @@ export declare function updateCartItem(cartId: string, itemId: string, quantity:
|
|
|
2288
2288
|
createdAt: string;
|
|
2289
2289
|
updatedAt: string;
|
|
2290
2290
|
deletedAt: string;
|
|
2291
|
-
brandId: string;
|
|
2292
2291
|
isActive: boolean;
|
|
2292
|
+
brandId: string;
|
|
2293
2293
|
description: string | null;
|
|
2294
2294
|
thumbnailUrl: string | null;
|
|
2295
2295
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -2779,19 +2779,19 @@ export declare function updateCartItem(cartId: string, itemId: string, quantity:
|
|
|
2779
2779
|
export declare function removeCartItem(cartId: string, itemId: string): Promise<{
|
|
2780
2780
|
id: string;
|
|
2781
2781
|
brand: {
|
|
2782
|
-
createdAt: string;
|
|
2783
|
-
updatedAt: string;
|
|
2784
|
-
deletedAt: string;
|
|
2785
2782
|
id: string;
|
|
2786
2783
|
name: string;
|
|
2787
2784
|
slug: string;
|
|
2788
|
-
logoUrl: string
|
|
2785
|
+
logoUrl: string;
|
|
2789
2786
|
siteUrl: string;
|
|
2790
2787
|
domain: string;
|
|
2791
|
-
metaPixelId: string
|
|
2792
|
-
tiktokPixelId: string
|
|
2793
|
-
paystackPublicKey: string
|
|
2794
|
-
|
|
2788
|
+
metaPixelId: string;
|
|
2789
|
+
tiktokPixelId: string;
|
|
2790
|
+
paystackPublicKey: string;
|
|
2791
|
+
freeShippingThreshold: number;
|
|
2792
|
+
createdAt: string;
|
|
2793
|
+
updatedAt: string;
|
|
2794
|
+
deletedAt: string;
|
|
2795
2795
|
};
|
|
2796
2796
|
customerPhone: string;
|
|
2797
2797
|
customerEmail: string;
|
|
@@ -2811,9 +2811,10 @@ export declare function removeCartItem(cartId: string, itemId: string): Promise<
|
|
|
2811
2811
|
createdAt: string;
|
|
2812
2812
|
updatedAt: string;
|
|
2813
2813
|
deletedAt: string;
|
|
2814
|
-
brandId: string | null;
|
|
2815
|
-
isActive: boolean;
|
|
2816
2814
|
code: string;
|
|
2815
|
+
isActive: boolean;
|
|
2816
|
+
brandId: string | null;
|
|
2817
|
+
description: string | null;
|
|
2817
2818
|
minPurchase: string;
|
|
2818
2819
|
maxDiscount: string;
|
|
2819
2820
|
usageLimit: number | null;
|
|
@@ -2822,7 +2823,6 @@ export declare function removeCartItem(cartId: string, itemId: string): Promise<
|
|
|
2822
2823
|
validFrom: string;
|
|
2823
2824
|
validUntil: string;
|
|
2824
2825
|
isAutoApply: boolean;
|
|
2825
|
-
description: string | null;
|
|
2826
2826
|
category: string;
|
|
2827
2827
|
createdBy: string | null;
|
|
2828
2828
|
};
|
|
@@ -2836,8 +2836,8 @@ export declare function removeCartItem(cartId: string, itemId: string): Promise<
|
|
|
2836
2836
|
createdAt: string;
|
|
2837
2837
|
updatedAt: string;
|
|
2838
2838
|
deletedAt: string;
|
|
2839
|
-
brandId: string;
|
|
2840
2839
|
isActive: boolean;
|
|
2840
|
+
brandId: string;
|
|
2841
2841
|
description: string | null;
|
|
2842
2842
|
thumbnailUrl: string | null;
|
|
2843
2843
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -3327,19 +3327,19 @@ export declare function removeCartItem(cartId: string, itemId: string): Promise<
|
|
|
3327
3327
|
export declare function applyDiscount(cartId: string, code: string): Promise<{
|
|
3328
3328
|
id: string;
|
|
3329
3329
|
brand: {
|
|
3330
|
-
createdAt: string;
|
|
3331
|
-
updatedAt: string;
|
|
3332
|
-
deletedAt: string;
|
|
3333
3330
|
id: string;
|
|
3334
3331
|
name: string;
|
|
3335
3332
|
slug: string;
|
|
3336
|
-
logoUrl: string
|
|
3333
|
+
logoUrl: string;
|
|
3337
3334
|
siteUrl: string;
|
|
3338
3335
|
domain: string;
|
|
3339
|
-
metaPixelId: string
|
|
3340
|
-
tiktokPixelId: string
|
|
3341
|
-
paystackPublicKey: string
|
|
3342
|
-
|
|
3336
|
+
metaPixelId: string;
|
|
3337
|
+
tiktokPixelId: string;
|
|
3338
|
+
paystackPublicKey: string;
|
|
3339
|
+
freeShippingThreshold: number;
|
|
3340
|
+
createdAt: string;
|
|
3341
|
+
updatedAt: string;
|
|
3342
|
+
deletedAt: string;
|
|
3343
3343
|
};
|
|
3344
3344
|
customerPhone: string;
|
|
3345
3345
|
customerEmail: string;
|
|
@@ -3359,9 +3359,10 @@ export declare function applyDiscount(cartId: string, code: string): Promise<{
|
|
|
3359
3359
|
createdAt: string;
|
|
3360
3360
|
updatedAt: string;
|
|
3361
3361
|
deletedAt: string;
|
|
3362
|
-
brandId: string | null;
|
|
3363
|
-
isActive: boolean;
|
|
3364
3362
|
code: string;
|
|
3363
|
+
isActive: boolean;
|
|
3364
|
+
brandId: string | null;
|
|
3365
|
+
description: string | null;
|
|
3365
3366
|
minPurchase: string;
|
|
3366
3367
|
maxDiscount: string;
|
|
3367
3368
|
usageLimit: number | null;
|
|
@@ -3370,7 +3371,6 @@ export declare function applyDiscount(cartId: string, code: string): Promise<{
|
|
|
3370
3371
|
validFrom: string;
|
|
3371
3372
|
validUntil: string;
|
|
3372
3373
|
isAutoApply: boolean;
|
|
3373
|
-
description: string | null;
|
|
3374
3374
|
category: string;
|
|
3375
3375
|
createdBy: string | null;
|
|
3376
3376
|
};
|
|
@@ -3384,8 +3384,8 @@ export declare function applyDiscount(cartId: string, code: string): Promise<{
|
|
|
3384
3384
|
createdAt: string;
|
|
3385
3385
|
updatedAt: string;
|
|
3386
3386
|
deletedAt: string;
|
|
3387
|
-
brandId: string;
|
|
3388
3387
|
isActive: boolean;
|
|
3388
|
+
brandId: string;
|
|
3389
3389
|
description: string | null;
|
|
3390
3390
|
thumbnailUrl: string | null;
|
|
3391
3391
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -3879,19 +3879,19 @@ export declare function applyDiscount(cartId: string, code: string): Promise<{
|
|
|
3879
3879
|
export declare function removeDiscount(cartId: string): Promise<{
|
|
3880
3880
|
id: string;
|
|
3881
3881
|
brand: {
|
|
3882
|
-
createdAt: string;
|
|
3883
|
-
updatedAt: string;
|
|
3884
|
-
deletedAt: string;
|
|
3885
3882
|
id: string;
|
|
3886
3883
|
name: string;
|
|
3887
3884
|
slug: string;
|
|
3888
|
-
logoUrl: string
|
|
3885
|
+
logoUrl: string;
|
|
3889
3886
|
siteUrl: string;
|
|
3890
3887
|
domain: string;
|
|
3891
|
-
metaPixelId: string
|
|
3892
|
-
tiktokPixelId: string
|
|
3893
|
-
paystackPublicKey: string
|
|
3894
|
-
|
|
3888
|
+
metaPixelId: string;
|
|
3889
|
+
tiktokPixelId: string;
|
|
3890
|
+
paystackPublicKey: string;
|
|
3891
|
+
freeShippingThreshold: number;
|
|
3892
|
+
createdAt: string;
|
|
3893
|
+
updatedAt: string;
|
|
3894
|
+
deletedAt: string;
|
|
3895
3895
|
};
|
|
3896
3896
|
customerPhone: string;
|
|
3897
3897
|
customerEmail: string;
|
|
@@ -3911,9 +3911,10 @@ export declare function removeDiscount(cartId: string): Promise<{
|
|
|
3911
3911
|
createdAt: string;
|
|
3912
3912
|
updatedAt: string;
|
|
3913
3913
|
deletedAt: string;
|
|
3914
|
-
brandId: string | null;
|
|
3915
|
-
isActive: boolean;
|
|
3916
3914
|
code: string;
|
|
3915
|
+
isActive: boolean;
|
|
3916
|
+
brandId: string | null;
|
|
3917
|
+
description: string | null;
|
|
3917
3918
|
minPurchase: string;
|
|
3918
3919
|
maxDiscount: string;
|
|
3919
3920
|
usageLimit: number | null;
|
|
@@ -3922,7 +3923,6 @@ export declare function removeDiscount(cartId: string): Promise<{
|
|
|
3922
3923
|
validFrom: string;
|
|
3923
3924
|
validUntil: string;
|
|
3924
3925
|
isAutoApply: boolean;
|
|
3925
|
-
description: string | null;
|
|
3926
3926
|
category: string;
|
|
3927
3927
|
createdBy: string | null;
|
|
3928
3928
|
};
|
|
@@ -3936,8 +3936,8 @@ export declare function removeDiscount(cartId: string): Promise<{
|
|
|
3936
3936
|
createdAt: string;
|
|
3937
3937
|
updatedAt: string;
|
|
3938
3938
|
deletedAt: string;
|
|
3939
|
-
brandId: string;
|
|
3940
3939
|
isActive: boolean;
|
|
3940
|
+
brandId: string;
|
|
3941
3941
|
description: string | null;
|
|
3942
3942
|
thumbnailUrl: string | null;
|
|
3943
3943
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -4449,25 +4449,33 @@ export declare function checkoutCart(cartId: string, checkoutData: {
|
|
|
4449
4449
|
deliveryCharge: number;
|
|
4450
4450
|
totalPrice: number;
|
|
4451
4451
|
discountAmount: number;
|
|
4452
|
+
amountPaid: number;
|
|
4453
|
+
flutterwaveAccountBank: string;
|
|
4454
|
+
flutterwaveAccountNumber: string;
|
|
4455
|
+
flutterwaveAccountExpiry: string;
|
|
4452
4456
|
createdAt: string;
|
|
4453
4457
|
updatedAt: string;
|
|
4454
4458
|
deletedAt: string;
|
|
4455
4459
|
prospectSince: string;
|
|
4456
4460
|
lastRecoveryAttemptAt: string;
|
|
4461
|
+
shippedAt: string;
|
|
4462
|
+
deliveryConfirmationSentAt: string;
|
|
4463
|
+
deliveryConfirmedAt: string;
|
|
4464
|
+
deliveryConfirmationAttempts: number;
|
|
4457
4465
|
brand: {
|
|
4458
|
-
createdAt: string;
|
|
4459
|
-
updatedAt: string;
|
|
4460
|
-
deletedAt: string;
|
|
4461
4466
|
id: string;
|
|
4462
4467
|
name: string;
|
|
4463
4468
|
slug: string;
|
|
4464
|
-
logoUrl: string
|
|
4469
|
+
logoUrl: string;
|
|
4465
4470
|
siteUrl: string;
|
|
4466
4471
|
domain: string;
|
|
4467
|
-
metaPixelId: string
|
|
4468
|
-
tiktokPixelId: string
|
|
4469
|
-
paystackPublicKey: string
|
|
4470
|
-
|
|
4472
|
+
metaPixelId: string;
|
|
4473
|
+
tiktokPixelId: string;
|
|
4474
|
+
paystackPublicKey: string;
|
|
4475
|
+
freeShippingThreshold: number;
|
|
4476
|
+
createdAt: string;
|
|
4477
|
+
updatedAt: string;
|
|
4478
|
+
deletedAt: string;
|
|
4471
4479
|
};
|
|
4472
4480
|
deliveryZone: {
|
|
4473
4481
|
deliveryCost: number;
|
|
@@ -4485,6 +4493,7 @@ export declare function checkoutCart(cartId: string, checkoutData: {
|
|
|
4485
4493
|
};
|
|
4486
4494
|
id: string;
|
|
4487
4495
|
name: string;
|
|
4496
|
+
isActive: boolean;
|
|
4488
4497
|
brandId: string | null;
|
|
4489
4498
|
stateId: string;
|
|
4490
4499
|
allowCOD: boolean;
|
|
@@ -4493,7 +4502,6 @@ export declare function checkoutCart(cartId: string, checkoutData: {
|
|
|
4493
4502
|
estimatedDays: number | null;
|
|
4494
4503
|
noteTitle: string | null;
|
|
4495
4504
|
noteContent: string | null;
|
|
4496
|
-
isActive: boolean;
|
|
4497
4505
|
};
|
|
4498
4506
|
items: {
|
|
4499
4507
|
priceAtPurchase: number;
|
|
@@ -4509,8 +4517,8 @@ export declare function checkoutCart(cartId: string, checkoutData: {
|
|
|
4509
4517
|
id: string;
|
|
4510
4518
|
name: string;
|
|
4511
4519
|
slug: string;
|
|
4512
|
-
brandId: string;
|
|
4513
4520
|
isActive: boolean;
|
|
4521
|
+
brandId: string;
|
|
4514
4522
|
description: string | null;
|
|
4515
4523
|
thumbnailUrl: string | null;
|
|
4516
4524
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -4953,8 +4961,8 @@ export declare function checkoutCart(cartId: string, checkoutData: {
|
|
|
4953
4961
|
id: string;
|
|
4954
4962
|
name: string | null;
|
|
4955
4963
|
isActive: boolean;
|
|
4956
|
-
thumbnailUrl: string | null;
|
|
4957
4964
|
productId: string;
|
|
4965
|
+
thumbnailUrl: string | null;
|
|
4958
4966
|
sku: string;
|
|
4959
4967
|
compareAtPrice: string;
|
|
4960
4968
|
trackInventory: boolean;
|
|
@@ -4966,16 +4974,16 @@ export declare function checkoutCart(cartId: string, checkoutData: {
|
|
|
4966
4974
|
deletedAt: string;
|
|
4967
4975
|
id: string;
|
|
4968
4976
|
name: string;
|
|
4977
|
+
state: string | null;
|
|
4969
4978
|
isActive: boolean;
|
|
4970
4979
|
address: string | null;
|
|
4971
4980
|
city: string | null;
|
|
4972
|
-
state: string | null;
|
|
4973
4981
|
};
|
|
4974
4982
|
id: string;
|
|
4975
|
-
orderId: string;
|
|
4976
4983
|
variantId: string;
|
|
4977
|
-
warehouseId: string | null;
|
|
4978
4984
|
quantity: number;
|
|
4985
|
+
orderId: string;
|
|
4986
|
+
warehouseId: string | null;
|
|
4979
4987
|
}[];
|
|
4980
4988
|
email: string | null;
|
|
4981
4989
|
id: string;
|
|
@@ -4996,8 +5004,19 @@ export declare function checkoutCart(cartId: string, checkoutData: {
|
|
|
4996
5004
|
paystackReference: string | null;
|
|
4997
5005
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
4998
5006
|
cancellationReason: string | null;
|
|
5007
|
+
shippingMethod: string | null;
|
|
5008
|
+
dispatchRiderId: string | null;
|
|
5009
|
+
fezTrackingNumber: string | null;
|
|
5010
|
+
flutterwaveOrderRef: string | null;
|
|
5011
|
+
flutterwaveCustomerId: string | null;
|
|
4999
5012
|
prospectReason: import("@prisma/client").$Enums.ProspectReason | null;
|
|
5000
5013
|
userActionToken: string;
|
|
5014
|
+
labelPrintedAt: string;
|
|
5015
|
+
dispatchRider?: {
|
|
5016
|
+
id: string;
|
|
5017
|
+
name: string;
|
|
5018
|
+
phone: string;
|
|
5019
|
+
};
|
|
5001
5020
|
}>;
|
|
5002
5021
|
/**
|
|
5003
5022
|
* Initiate checkout tracking
|
|
@@ -5188,6 +5207,7 @@ export declare function fetchCartRecommendations(cartId: string, limit: number):
|
|
|
5188
5207
|
metaPixelId: string;
|
|
5189
5208
|
tiktokPixelId: string;
|
|
5190
5209
|
paystackPublicKey: string;
|
|
5210
|
+
freeShippingThreshold: number;
|
|
5191
5211
|
createdAt: string;
|
|
5192
5212
|
updatedAt: string;
|
|
5193
5213
|
deletedAt: string;
|
|
@@ -5506,8 +5526,8 @@ export declare function fetchCartRecommendations(cartId: string, limit: number):
|
|
|
5506
5526
|
createdAt: string;
|
|
5507
5527
|
updatedAt: string;
|
|
5508
5528
|
deletedAt: string;
|
|
5509
|
-
brandId: string;
|
|
5510
5529
|
isActive: boolean;
|
|
5530
|
+
brandId: string;
|
|
5511
5531
|
discountType: import("@prisma/client").$Enums.DiscountType;
|
|
5512
5532
|
discountValue: string;
|
|
5513
5533
|
startDate: string;
|
|
@@ -5521,8 +5541,8 @@ export declare function fetchCartRecommendations(cartId: string, limit: number):
|
|
|
5521
5541
|
createdAt: string;
|
|
5522
5542
|
updatedAt: string;
|
|
5523
5543
|
deletedAt: string;
|
|
5524
|
-
brandId: string;
|
|
5525
5544
|
isActive: boolean;
|
|
5545
|
+
brandId: string;
|
|
5526
5546
|
}[] | {
|
|
5527
5547
|
error: {
|
|
5528
5548
|
code: string;
|
package/dist/fetchers/carts.js
CHANGED