@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
|
@@ -13,30 +13,40 @@
|
|
|
13
13
|
*/
|
|
14
14
|
export declare function fetchOrder(orderId: string, token: string): Promise<{
|
|
15
15
|
canConfirm: boolean;
|
|
16
|
+
canConfirmDelivery: boolean;
|
|
17
|
+
canUpdateAddress: boolean;
|
|
16
18
|
confirmationMessage: string;
|
|
17
19
|
subtotal: number;
|
|
18
20
|
deliveryCharge: number;
|
|
19
21
|
totalPrice: number;
|
|
20
22
|
discountAmount: number;
|
|
23
|
+
amountPaid: number;
|
|
24
|
+
flutterwaveAccountBank: string;
|
|
25
|
+
flutterwaveAccountNumber: string;
|
|
26
|
+
flutterwaveAccountExpiry: string;
|
|
21
27
|
createdAt: string;
|
|
22
28
|
updatedAt: string;
|
|
23
29
|
deletedAt: string;
|
|
24
30
|
prospectSince: string;
|
|
25
31
|
lastRecoveryAttemptAt: string;
|
|
32
|
+
shippedAt: string;
|
|
33
|
+
deliveryConfirmationSentAt: string;
|
|
34
|
+
deliveryConfirmedAt: string;
|
|
35
|
+
deliveryConfirmationAttempts: number;
|
|
26
36
|
brand: {
|
|
27
|
-
createdAt: string;
|
|
28
|
-
updatedAt: string;
|
|
29
|
-
deletedAt: string;
|
|
30
37
|
id: string;
|
|
31
38
|
name: string;
|
|
32
39
|
slug: string;
|
|
33
|
-
logoUrl: string
|
|
40
|
+
logoUrl: string;
|
|
34
41
|
siteUrl: string;
|
|
35
42
|
domain: string;
|
|
36
|
-
metaPixelId: string
|
|
37
|
-
tiktokPixelId: string
|
|
38
|
-
paystackPublicKey: string
|
|
39
|
-
|
|
43
|
+
metaPixelId: string;
|
|
44
|
+
tiktokPixelId: string;
|
|
45
|
+
paystackPublicKey: string;
|
|
46
|
+
freeShippingThreshold: number;
|
|
47
|
+
createdAt: string;
|
|
48
|
+
updatedAt: string;
|
|
49
|
+
deletedAt: string;
|
|
40
50
|
};
|
|
41
51
|
deliveryZone: {
|
|
42
52
|
deliveryCost: number;
|
|
@@ -54,6 +64,7 @@ export declare function fetchOrder(orderId: string, token: string): Promise<{
|
|
|
54
64
|
};
|
|
55
65
|
id: string;
|
|
56
66
|
name: string;
|
|
67
|
+
isActive: boolean;
|
|
57
68
|
brandId: string | null;
|
|
58
69
|
stateId: string;
|
|
59
70
|
allowCOD: boolean;
|
|
@@ -62,7 +73,6 @@ export declare function fetchOrder(orderId: string, token: string): Promise<{
|
|
|
62
73
|
estimatedDays: number | null;
|
|
63
74
|
noteTitle: string | null;
|
|
64
75
|
noteContent: string | null;
|
|
65
|
-
isActive: boolean;
|
|
66
76
|
};
|
|
67
77
|
items: {
|
|
68
78
|
priceAtPurchase: number;
|
|
@@ -78,8 +88,8 @@ export declare function fetchOrder(orderId: string, token: string): Promise<{
|
|
|
78
88
|
id: string;
|
|
79
89
|
name: string;
|
|
80
90
|
slug: string;
|
|
81
|
-
brandId: string;
|
|
82
91
|
isActive: boolean;
|
|
92
|
+
brandId: string;
|
|
83
93
|
description: string | null;
|
|
84
94
|
thumbnailUrl: string | null;
|
|
85
95
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -522,8 +532,8 @@ export declare function fetchOrder(orderId: string, token: string): Promise<{
|
|
|
522
532
|
id: string;
|
|
523
533
|
name: string | null;
|
|
524
534
|
isActive: boolean;
|
|
525
|
-
thumbnailUrl: string | null;
|
|
526
535
|
productId: string;
|
|
536
|
+
thumbnailUrl: string | null;
|
|
527
537
|
sku: string;
|
|
528
538
|
compareAtPrice: string;
|
|
529
539
|
trackInventory: boolean;
|
|
@@ -535,16 +545,16 @@ export declare function fetchOrder(orderId: string, token: string): Promise<{
|
|
|
535
545
|
deletedAt: string;
|
|
536
546
|
id: string;
|
|
537
547
|
name: string;
|
|
548
|
+
state: string | null;
|
|
538
549
|
isActive: boolean;
|
|
539
550
|
address: string | null;
|
|
540
551
|
city: string | null;
|
|
541
|
-
state: string | null;
|
|
542
552
|
};
|
|
543
553
|
id: string;
|
|
544
|
-
orderId: string;
|
|
545
554
|
variantId: string;
|
|
546
|
-
warehouseId: string | null;
|
|
547
555
|
quantity: number;
|
|
556
|
+
orderId: string;
|
|
557
|
+
warehouseId: string | null;
|
|
548
558
|
}[];
|
|
549
559
|
email: string | null;
|
|
550
560
|
id: string;
|
|
@@ -565,8 +575,19 @@ export declare function fetchOrder(orderId: string, token: string): Promise<{
|
|
|
565
575
|
paystackReference: string | null;
|
|
566
576
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
567
577
|
cancellationReason: string | null;
|
|
578
|
+
shippingMethod: string | null;
|
|
579
|
+
dispatchRiderId: string | null;
|
|
580
|
+
fezTrackingNumber: string | null;
|
|
581
|
+
flutterwaveOrderRef: string | null;
|
|
582
|
+
flutterwaveCustomerId: string | null;
|
|
568
583
|
prospectReason: import("@prisma/client").$Enums.ProspectReason | null;
|
|
569
584
|
userActionToken: string;
|
|
585
|
+
labelPrintedAt: string;
|
|
586
|
+
dispatchRider?: {
|
|
587
|
+
id: string;
|
|
588
|
+
name: string;
|
|
589
|
+
phone: string;
|
|
590
|
+
};
|
|
570
591
|
}>;
|
|
571
592
|
/**
|
|
572
593
|
* Confirm a prospect order
|
|
@@ -580,25 +601,33 @@ export declare function confirmOrder(orderId: string, token: string): Promise<{
|
|
|
580
601
|
deliveryCharge: number;
|
|
581
602
|
totalPrice: number;
|
|
582
603
|
discountAmount: number;
|
|
604
|
+
amountPaid: number;
|
|
605
|
+
flutterwaveAccountBank: string;
|
|
606
|
+
flutterwaveAccountNumber: string;
|
|
607
|
+
flutterwaveAccountExpiry: string;
|
|
583
608
|
createdAt: string;
|
|
584
609
|
updatedAt: string;
|
|
585
610
|
deletedAt: string;
|
|
586
611
|
prospectSince: string;
|
|
587
612
|
lastRecoveryAttemptAt: string;
|
|
613
|
+
shippedAt: string;
|
|
614
|
+
deliveryConfirmationSentAt: string;
|
|
615
|
+
deliveryConfirmedAt: string;
|
|
616
|
+
deliveryConfirmationAttempts: number;
|
|
588
617
|
brand: {
|
|
589
|
-
createdAt: string;
|
|
590
|
-
updatedAt: string;
|
|
591
|
-
deletedAt: string;
|
|
592
618
|
id: string;
|
|
593
619
|
name: string;
|
|
594
620
|
slug: string;
|
|
595
|
-
logoUrl: string
|
|
621
|
+
logoUrl: string;
|
|
596
622
|
siteUrl: string;
|
|
597
623
|
domain: string;
|
|
598
|
-
metaPixelId: string
|
|
599
|
-
tiktokPixelId: string
|
|
600
|
-
paystackPublicKey: string
|
|
601
|
-
|
|
624
|
+
metaPixelId: string;
|
|
625
|
+
tiktokPixelId: string;
|
|
626
|
+
paystackPublicKey: string;
|
|
627
|
+
freeShippingThreshold: number;
|
|
628
|
+
createdAt: string;
|
|
629
|
+
updatedAt: string;
|
|
630
|
+
deletedAt: string;
|
|
602
631
|
};
|
|
603
632
|
deliveryZone: {
|
|
604
633
|
deliveryCost: number;
|
|
@@ -616,6 +645,7 @@ export declare function confirmOrder(orderId: string, token: string): Promise<{
|
|
|
616
645
|
};
|
|
617
646
|
id: string;
|
|
618
647
|
name: string;
|
|
648
|
+
isActive: boolean;
|
|
619
649
|
brandId: string | null;
|
|
620
650
|
stateId: string;
|
|
621
651
|
allowCOD: boolean;
|
|
@@ -624,7 +654,6 @@ export declare function confirmOrder(orderId: string, token: string): Promise<{
|
|
|
624
654
|
estimatedDays: number | null;
|
|
625
655
|
noteTitle: string | null;
|
|
626
656
|
noteContent: string | null;
|
|
627
|
-
isActive: boolean;
|
|
628
657
|
};
|
|
629
658
|
items: {
|
|
630
659
|
priceAtPurchase: number;
|
|
@@ -640,8 +669,8 @@ export declare function confirmOrder(orderId: string, token: string): Promise<{
|
|
|
640
669
|
id: string;
|
|
641
670
|
name: string;
|
|
642
671
|
slug: string;
|
|
643
|
-
brandId: string;
|
|
644
672
|
isActive: boolean;
|
|
673
|
+
brandId: string;
|
|
645
674
|
description: string | null;
|
|
646
675
|
thumbnailUrl: string | null;
|
|
647
676
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -1084,8 +1113,8 @@ export declare function confirmOrder(orderId: string, token: string): Promise<{
|
|
|
1084
1113
|
id: string;
|
|
1085
1114
|
name: string | null;
|
|
1086
1115
|
isActive: boolean;
|
|
1087
|
-
thumbnailUrl: string | null;
|
|
1088
1116
|
productId: string;
|
|
1117
|
+
thumbnailUrl: string | null;
|
|
1089
1118
|
sku: string;
|
|
1090
1119
|
compareAtPrice: string;
|
|
1091
1120
|
trackInventory: boolean;
|
|
@@ -1097,16 +1126,16 @@ export declare function confirmOrder(orderId: string, token: string): Promise<{
|
|
|
1097
1126
|
deletedAt: string;
|
|
1098
1127
|
id: string;
|
|
1099
1128
|
name: string;
|
|
1129
|
+
state: string | null;
|
|
1100
1130
|
isActive: boolean;
|
|
1101
1131
|
address: string | null;
|
|
1102
1132
|
city: string | null;
|
|
1103
|
-
state: string | null;
|
|
1104
1133
|
};
|
|
1105
1134
|
id: string;
|
|
1106
|
-
orderId: string;
|
|
1107
1135
|
variantId: string;
|
|
1108
|
-
warehouseId: string | null;
|
|
1109
1136
|
quantity: number;
|
|
1137
|
+
orderId: string;
|
|
1138
|
+
warehouseId: string | null;
|
|
1110
1139
|
}[];
|
|
1111
1140
|
email: string | null;
|
|
1112
1141
|
id: string;
|
|
@@ -1127,9 +1156,43 @@ export declare function confirmOrder(orderId: string, token: string): Promise<{
|
|
|
1127
1156
|
paystackReference: string | null;
|
|
1128
1157
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
1129
1158
|
cancellationReason: string | null;
|
|
1159
|
+
shippingMethod: string | null;
|
|
1160
|
+
dispatchRiderId: string | null;
|
|
1161
|
+
fezTrackingNumber: string | null;
|
|
1162
|
+
flutterwaveOrderRef: string | null;
|
|
1163
|
+
flutterwaveCustomerId: string | null;
|
|
1130
1164
|
prospectReason: import("@prisma/client").$Enums.ProspectReason | null;
|
|
1131
1165
|
userActionToken: string;
|
|
1166
|
+
labelPrintedAt: string;
|
|
1167
|
+
dispatchRider?: {
|
|
1168
|
+
id: string;
|
|
1169
|
+
name: string;
|
|
1170
|
+
phone: string;
|
|
1171
|
+
};
|
|
1132
1172
|
}>;
|
|
1173
|
+
/**
|
|
1174
|
+
* Confirm delivery details for an order
|
|
1175
|
+
*
|
|
1176
|
+
* @param orderId - Order UUID
|
|
1177
|
+
* @param token - User action token
|
|
1178
|
+
* @returns Updated order
|
|
1179
|
+
*/
|
|
1180
|
+
export declare function confirmDelivery(orderId: string, token: string): Promise<any>;
|
|
1181
|
+
/**
|
|
1182
|
+
* Update delivery address for an order
|
|
1183
|
+
*
|
|
1184
|
+
* @param orderId - Order UUID
|
|
1185
|
+
* @param token - User action token
|
|
1186
|
+
* @param address - Updated address
|
|
1187
|
+
* @param city - Updated city
|
|
1188
|
+
* @param phone - Updated phone
|
|
1189
|
+
* @returns Updated order
|
|
1190
|
+
*/
|
|
1191
|
+
export declare function updateDeliveryAddress(orderId: string, token: string, updates: {
|
|
1192
|
+
address?: string;
|
|
1193
|
+
city?: string;
|
|
1194
|
+
phone?: string;
|
|
1195
|
+
}): Promise<any>;
|
|
1133
1196
|
/**
|
|
1134
1197
|
* Fetch order recommendations for post-purchase upsell
|
|
1135
1198
|
*
|
|
@@ -1303,6 +1366,7 @@ export declare function fetchOrderRecommendations(orderId: string, token: string
|
|
|
1303
1366
|
metaPixelId: string;
|
|
1304
1367
|
tiktokPixelId: string;
|
|
1305
1368
|
paystackPublicKey: string;
|
|
1369
|
+
freeShippingThreshold: number;
|
|
1306
1370
|
createdAt: string;
|
|
1307
1371
|
updatedAt: string;
|
|
1308
1372
|
deletedAt: string;
|
|
@@ -1621,8 +1685,8 @@ export declare function fetchOrderRecommendations(orderId: string, token: string
|
|
|
1621
1685
|
createdAt: string;
|
|
1622
1686
|
updatedAt: string;
|
|
1623
1687
|
deletedAt: string;
|
|
1624
|
-
brandId: string;
|
|
1625
1688
|
isActive: boolean;
|
|
1689
|
+
brandId: string;
|
|
1626
1690
|
discountType: import("@prisma/client").$Enums.DiscountType;
|
|
1627
1691
|
discountValue: string;
|
|
1628
1692
|
startDate: string;
|
|
@@ -1636,6 +1700,6 @@ export declare function fetchOrderRecommendations(orderId: string, token: string
|
|
|
1636
1700
|
createdAt: string;
|
|
1637
1701
|
updatedAt: string;
|
|
1638
1702
|
deletedAt: string;
|
|
1639
|
-
brandId: string;
|
|
1640
1703
|
isActive: boolean;
|
|
1704
|
+
brandId: string;
|
|
1641
1705
|
}[]>;
|
package/dist/fetchers/orders.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 an order by ID and token
|
|
11
11
|
*
|
|
@@ -40,6 +40,43 @@ export async function confirmOrder(orderId, token) {
|
|
|
40
40
|
}
|
|
41
41
|
return res.json();
|
|
42
42
|
}
|
|
43
|
+
/**
|
|
44
|
+
* Confirm delivery details for an order
|
|
45
|
+
*
|
|
46
|
+
* @param orderId - Order UUID
|
|
47
|
+
* @param token - User action token
|
|
48
|
+
* @returns Updated order
|
|
49
|
+
*/
|
|
50
|
+
export async function confirmDelivery(orderId, token) {
|
|
51
|
+
const clients = createRpcClients(API_URL);
|
|
52
|
+
const res = await clients.orders['confirm-delivery'].$post({
|
|
53
|
+
json: { orderId, token },
|
|
54
|
+
});
|
|
55
|
+
if (!res.ok) {
|
|
56
|
+
throw new Error(`Failed to confirm delivery: ${res.statusText}`);
|
|
57
|
+
}
|
|
58
|
+
return res.json();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Update delivery address for an order
|
|
62
|
+
*
|
|
63
|
+
* @param orderId - Order UUID
|
|
64
|
+
* @param token - User action token
|
|
65
|
+
* @param address - Updated address
|
|
66
|
+
* @param city - Updated city
|
|
67
|
+
* @param phone - Updated phone
|
|
68
|
+
* @returns Updated order
|
|
69
|
+
*/
|
|
70
|
+
export async function updateDeliveryAddress(orderId, token, updates) {
|
|
71
|
+
const clients = createRpcClients(API_URL);
|
|
72
|
+
const res = await clients.orders['update-delivery-address'].$post({
|
|
73
|
+
json: { orderId, token, ...updates },
|
|
74
|
+
});
|
|
75
|
+
if (!res.ok) {
|
|
76
|
+
throw new Error(`Failed to update delivery address: ${res.statusText}`);
|
|
77
|
+
}
|
|
78
|
+
return res.json();
|
|
79
|
+
}
|
|
43
80
|
/**
|
|
44
81
|
* Fetch order recommendations for post-purchase upsell
|
|
45
82
|
*
|
|
@@ -13,19 +13,19 @@ export declare function useListAbandonedCarts(params?: {
|
|
|
13
13
|
carts: {
|
|
14
14
|
id: string;
|
|
15
15
|
brand: {
|
|
16
|
-
createdAt: string;
|
|
17
|
-
updatedAt: string;
|
|
18
|
-
deletedAt: string;
|
|
19
16
|
id: string;
|
|
20
17
|
name: string;
|
|
21
18
|
slug: string;
|
|
22
|
-
logoUrl: string
|
|
19
|
+
logoUrl: string;
|
|
23
20
|
siteUrl: string;
|
|
24
21
|
domain: string;
|
|
25
|
-
metaPixelId: string
|
|
26
|
-
tiktokPixelId: string
|
|
27
|
-
paystackPublicKey: string
|
|
28
|
-
|
|
22
|
+
metaPixelId: string;
|
|
23
|
+
tiktokPixelId: string;
|
|
24
|
+
paystackPublicKey: string;
|
|
25
|
+
freeShippingThreshold: number;
|
|
26
|
+
createdAt: string;
|
|
27
|
+
updatedAt: string;
|
|
28
|
+
deletedAt: string;
|
|
29
29
|
};
|
|
30
30
|
customerPhone: string;
|
|
31
31
|
customerEmail: string;
|
|
@@ -45,9 +45,10 @@ export declare function useListAbandonedCarts(params?: {
|
|
|
45
45
|
createdAt: string;
|
|
46
46
|
updatedAt: string;
|
|
47
47
|
deletedAt: string;
|
|
48
|
-
brandId: string | null;
|
|
49
|
-
isActive: boolean;
|
|
50
48
|
code: string;
|
|
49
|
+
isActive: boolean;
|
|
50
|
+
brandId: string | null;
|
|
51
|
+
description: string | null;
|
|
51
52
|
minPurchase: string;
|
|
52
53
|
maxDiscount: string;
|
|
53
54
|
usageLimit: number | null;
|
|
@@ -56,7 +57,6 @@ export declare function useListAbandonedCarts(params?: {
|
|
|
56
57
|
validFrom: string;
|
|
57
58
|
validUntil: string;
|
|
58
59
|
isAutoApply: boolean;
|
|
59
|
-
description: string | null;
|
|
60
60
|
category: string;
|
|
61
61
|
createdBy: string | null;
|
|
62
62
|
};
|
|
@@ -70,8 +70,8 @@ export declare function useListAbandonedCarts(params?: {
|
|
|
70
70
|
createdAt: string;
|
|
71
71
|
updatedAt: string;
|
|
72
72
|
deletedAt: string;
|
|
73
|
-
brandId: string;
|
|
74
73
|
isActive: boolean;
|
|
74
|
+
brandId: string;
|
|
75
75
|
description: string | null;
|
|
76
76
|
thumbnailUrl: string | null;
|
|
77
77
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -575,19 +575,19 @@ export declare function useGetAbandonedCartStats(params?: {
|
|
|
575
575
|
export declare function useGetAbandonedCart(cartId: string, options?: Omit<UseQueryOptions<Awaited<ReturnType<Awaited<ReturnType<ReturnType<typeof createAdminRpcClients>['abandonedCarts'][':id']['$get']>>['json']>>, Error>, 'queryKey' | 'queryFn'>): import("@tanstack/react-query").UseQueryResult<{
|
|
576
576
|
id: string;
|
|
577
577
|
brand: {
|
|
578
|
-
createdAt: string;
|
|
579
|
-
updatedAt: string;
|
|
580
|
-
deletedAt: string;
|
|
581
578
|
id: string;
|
|
582
579
|
name: string;
|
|
583
580
|
slug: string;
|
|
584
|
-
logoUrl: string
|
|
581
|
+
logoUrl: string;
|
|
585
582
|
siteUrl: string;
|
|
586
583
|
domain: string;
|
|
587
|
-
metaPixelId: string
|
|
588
|
-
tiktokPixelId: string
|
|
589
|
-
paystackPublicKey: string
|
|
590
|
-
|
|
584
|
+
metaPixelId: string;
|
|
585
|
+
tiktokPixelId: string;
|
|
586
|
+
paystackPublicKey: string;
|
|
587
|
+
freeShippingThreshold: number;
|
|
588
|
+
createdAt: string;
|
|
589
|
+
updatedAt: string;
|
|
590
|
+
deletedAt: string;
|
|
591
591
|
};
|
|
592
592
|
customerPhone: string;
|
|
593
593
|
customerEmail: string;
|
|
@@ -607,9 +607,10 @@ export declare function useGetAbandonedCart(cartId: string, options?: Omit<UseQu
|
|
|
607
607
|
createdAt: string;
|
|
608
608
|
updatedAt: string;
|
|
609
609
|
deletedAt: string;
|
|
610
|
-
brandId: string | null;
|
|
611
|
-
isActive: boolean;
|
|
612
610
|
code: string;
|
|
611
|
+
isActive: boolean;
|
|
612
|
+
brandId: string | null;
|
|
613
|
+
description: string | null;
|
|
613
614
|
minPurchase: string;
|
|
614
615
|
maxDiscount: string;
|
|
615
616
|
usageLimit: number | null;
|
|
@@ -618,7 +619,6 @@ export declare function useGetAbandonedCart(cartId: string, options?: Omit<UseQu
|
|
|
618
619
|
validFrom: string;
|
|
619
620
|
validUntil: string;
|
|
620
621
|
isAutoApply: boolean;
|
|
621
|
-
description: string | null;
|
|
622
622
|
category: string;
|
|
623
623
|
createdBy: string | null;
|
|
624
624
|
};
|
|
@@ -632,8 +632,8 @@ export declare function useGetAbandonedCart(cartId: string, options?: Omit<UseQu
|
|
|
632
632
|
createdAt: string;
|
|
633
633
|
updatedAt: string;
|
|
634
634
|
deletedAt: string;
|
|
635
|
-
brandId: string;
|
|
636
635
|
isActive: boolean;
|
|
636
|
+
brandId: string;
|
|
637
637
|
description: string | null;
|
|
638
638
|
thumbnailUrl: string | null;
|
|
639
639
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -17,6 +17,7 @@ export declare function useListBrands(options?: Omit<UseQueryOptions<Awaited<Ret
|
|
|
17
17
|
tiktokPixelId: string | null;
|
|
18
18
|
paystackPublicKey: string | null;
|
|
19
19
|
paystackSecretKey: string | null;
|
|
20
|
+
freeShippingThreshold: string;
|
|
20
21
|
createdAt: string;
|
|
21
22
|
updatedAt: string;
|
|
22
23
|
deletedAt: string;
|
|
@@ -35,6 +36,7 @@ export declare function useGetBrand(brandId: string, options?: Omit<UseQueryOpti
|
|
|
35
36
|
tiktokPixelId: string | null;
|
|
36
37
|
paystackPublicKey: string | null;
|
|
37
38
|
paystackSecretKey: string | null;
|
|
39
|
+
freeShippingThreshold: string;
|
|
38
40
|
createdAt: string;
|
|
39
41
|
updatedAt: string;
|
|
40
42
|
deletedAt: string;
|
|
@@ -53,6 +55,7 @@ export declare function useCreateBrand(options?: UseMutationOptions<Awaited<Retu
|
|
|
53
55
|
tiktokPixelId: string | null;
|
|
54
56
|
paystackPublicKey: string | null;
|
|
55
57
|
paystackSecretKey: string | null;
|
|
58
|
+
freeShippingThreshold: string;
|
|
56
59
|
createdAt: string;
|
|
57
60
|
updatedAt: string;
|
|
58
61
|
deletedAt: string;
|
|
@@ -76,6 +79,7 @@ export declare function useUpdateBrand(brandId: string, options?: UseMutationOpt
|
|
|
76
79
|
tiktokPixelId: string | null;
|
|
77
80
|
paystackPublicKey: string | null;
|
|
78
81
|
paystackSecretKey: string | null;
|
|
82
|
+
freeShippingThreshold: string;
|
|
79
83
|
createdAt: string;
|
|
80
84
|
updatedAt: string;
|
|
81
85
|
deletedAt: string;
|
|
@@ -22,25 +22,33 @@ export declare function useGetCustomerHistory(phone: string, options?: Omit<UseQ
|
|
|
22
22
|
deliveryCharge: number;
|
|
23
23
|
totalPrice: number;
|
|
24
24
|
discountAmount: number;
|
|
25
|
+
amountPaid: number;
|
|
26
|
+
flutterwaveAccountBank: string;
|
|
27
|
+
flutterwaveAccountNumber: string;
|
|
28
|
+
flutterwaveAccountExpiry: string;
|
|
25
29
|
createdAt: string;
|
|
26
30
|
updatedAt: string;
|
|
27
31
|
deletedAt: string;
|
|
28
32
|
prospectSince: string;
|
|
29
33
|
lastRecoveryAttemptAt: string;
|
|
34
|
+
shippedAt: string;
|
|
35
|
+
deliveryConfirmationSentAt: string;
|
|
36
|
+
deliveryConfirmedAt: string;
|
|
37
|
+
deliveryConfirmationAttempts: number;
|
|
30
38
|
brand: {
|
|
31
|
-
createdAt: string;
|
|
32
|
-
updatedAt: string;
|
|
33
|
-
deletedAt: string;
|
|
34
39
|
id: string;
|
|
35
40
|
name: string;
|
|
36
41
|
slug: string;
|
|
37
|
-
logoUrl: string
|
|
42
|
+
logoUrl: string;
|
|
38
43
|
siteUrl: string;
|
|
39
44
|
domain: string;
|
|
40
|
-
metaPixelId: string
|
|
41
|
-
tiktokPixelId: string
|
|
42
|
-
paystackPublicKey: string
|
|
43
|
-
|
|
45
|
+
metaPixelId: string;
|
|
46
|
+
tiktokPixelId: string;
|
|
47
|
+
paystackPublicKey: string;
|
|
48
|
+
freeShippingThreshold: number;
|
|
49
|
+
createdAt: string;
|
|
50
|
+
updatedAt: string;
|
|
51
|
+
deletedAt: string;
|
|
44
52
|
};
|
|
45
53
|
deliveryZone: {
|
|
46
54
|
deliveryCost: number;
|
|
@@ -58,6 +66,7 @@ export declare function useGetCustomerHistory(phone: string, options?: Omit<UseQ
|
|
|
58
66
|
};
|
|
59
67
|
id: string;
|
|
60
68
|
name: string;
|
|
69
|
+
isActive: boolean;
|
|
61
70
|
brandId: string | null;
|
|
62
71
|
stateId: string;
|
|
63
72
|
allowCOD: boolean;
|
|
@@ -66,7 +75,6 @@ export declare function useGetCustomerHistory(phone: string, options?: Omit<UseQ
|
|
|
66
75
|
estimatedDays: number | null;
|
|
67
76
|
noteTitle: string | null;
|
|
68
77
|
noteContent: string | null;
|
|
69
|
-
isActive: boolean;
|
|
70
78
|
};
|
|
71
79
|
items: {
|
|
72
80
|
priceAtPurchase: number;
|
|
@@ -82,8 +90,8 @@ export declare function useGetCustomerHistory(phone: string, options?: Omit<UseQ
|
|
|
82
90
|
id: string;
|
|
83
91
|
name: string;
|
|
84
92
|
slug: string;
|
|
85
|
-
brandId: string;
|
|
86
93
|
isActive: boolean;
|
|
94
|
+
brandId: string;
|
|
87
95
|
description: string | null;
|
|
88
96
|
thumbnailUrl: string | null;
|
|
89
97
|
quantityDiscounts: string | number | boolean | {
|
|
@@ -526,8 +534,8 @@ export declare function useGetCustomerHistory(phone: string, options?: Omit<UseQ
|
|
|
526
534
|
id: string;
|
|
527
535
|
name: string | null;
|
|
528
536
|
isActive: boolean;
|
|
529
|
-
thumbnailUrl: string | null;
|
|
530
537
|
productId: string;
|
|
538
|
+
thumbnailUrl: string | null;
|
|
531
539
|
sku: string;
|
|
532
540
|
compareAtPrice: string;
|
|
533
541
|
trackInventory: boolean;
|
|
@@ -539,16 +547,16 @@ export declare function useGetCustomerHistory(phone: string, options?: Omit<UseQ
|
|
|
539
547
|
deletedAt: string;
|
|
540
548
|
id: string;
|
|
541
549
|
name: string;
|
|
550
|
+
state: string | null;
|
|
542
551
|
isActive: boolean;
|
|
543
552
|
address: string | null;
|
|
544
553
|
city: string | null;
|
|
545
|
-
state: string | null;
|
|
546
554
|
};
|
|
547
555
|
id: string;
|
|
548
|
-
orderId: string;
|
|
549
556
|
variantId: string;
|
|
550
|
-
warehouseId: string | null;
|
|
551
557
|
quantity: number;
|
|
558
|
+
orderId: string;
|
|
559
|
+
warehouseId: string | null;
|
|
552
560
|
}[];
|
|
553
561
|
email: string | null;
|
|
554
562
|
id: string;
|
|
@@ -569,7 +577,18 @@ export declare function useGetCustomerHistory(phone: string, options?: Omit<UseQ
|
|
|
569
577
|
paystackReference: string | null;
|
|
570
578
|
status: import("@prisma/client").$Enums.OrderStatus;
|
|
571
579
|
cancellationReason: string | null;
|
|
580
|
+
shippingMethod: string | null;
|
|
581
|
+
dispatchRiderId: string | null;
|
|
582
|
+
fezTrackingNumber: string | null;
|
|
583
|
+
flutterwaveOrderRef: string | null;
|
|
584
|
+
flutterwaveCustomerId: string | null;
|
|
572
585
|
prospectReason: import("@prisma/client").$Enums.ProspectReason | null;
|
|
573
586
|
userActionToken: string;
|
|
587
|
+
labelPrintedAt: string;
|
|
588
|
+
dispatchRider?: {
|
|
589
|
+
id: string;
|
|
590
|
+
name: string;
|
|
591
|
+
phone: string;
|
|
592
|
+
};
|
|
574
593
|
}[];
|
|
575
594
|
}, Error>;
|