@instockng/api-client 1.0.34 → 1.0.35
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/carts.d.ts +73 -41
- package/dist/fetchers/orders.d.ts +25 -1
- package/dist/hooks/admin/abandoned-carts.d.ts +12 -10
- package/dist/hooks/admin/index.d.ts +1 -0
- package/dist/hooks/admin/index.js +1 -0
- package/dist/hooks/admin/products.d.ts +50 -2
- package/dist/hooks/admin/sales.d.ts +46 -0
- package/dist/hooks/admin/sales.js +180 -0
- package/dist/hooks/admin/variants.d.ts +13 -6
- package/dist/hooks/admin/variants.js +6 -5
- package/dist/hooks/public/carts.d.ts +73 -41
- package/dist/hooks/public/orders.d.ts +25 -1
- package/dist/rpc-client.d.ts +793 -123
- package/dist/rpc-client.js +1 -0
- package/dist/rpc-types.d.ts +75 -3
- package/dist/utils/query-keys.d.ts +6 -0
- package/dist/utils/query-keys.js +6 -0
- package/package.json +1 -1
package/dist/rpc-client.js
CHANGED
package/dist/rpc-types.d.ts
CHANGED
|
@@ -79,6 +79,10 @@ declare const dummyClient: {
|
|
|
79
79
|
};
|
|
80
80
|
};
|
|
81
81
|
output: {
|
|
82
|
+
isOnSale: boolean;
|
|
83
|
+
saleId: string;
|
|
84
|
+
saleName: string;
|
|
85
|
+
saleEndsAt: string;
|
|
82
86
|
id: string;
|
|
83
87
|
name: string;
|
|
84
88
|
slug: string;
|
|
@@ -249,10 +253,11 @@ declare const dummyClient: {
|
|
|
249
253
|
price: number;
|
|
250
254
|
compareAtPrice: number;
|
|
251
255
|
deletedAt: string;
|
|
256
|
+
thumbnailUrl: string;
|
|
257
|
+
originalPrice: number;
|
|
252
258
|
id: string;
|
|
253
259
|
name: string | null;
|
|
254
260
|
isActive: boolean;
|
|
255
|
-
thumbnailUrl: string | null;
|
|
256
261
|
productId: string;
|
|
257
262
|
sku: string;
|
|
258
263
|
trackInventory: boolean;
|
|
@@ -549,6 +554,25 @@ declare const dummyClient: {
|
|
|
549
554
|
flat?: boolean;
|
|
550
555
|
};
|
|
551
556
|
};
|
|
557
|
+
sales: {
|
|
558
|
+
sale: {
|
|
559
|
+
id: string;
|
|
560
|
+
name: string;
|
|
561
|
+
createdAt: string;
|
|
562
|
+
updatedAt: string;
|
|
563
|
+
deletedAt: string;
|
|
564
|
+
brandId: string;
|
|
565
|
+
isActive: boolean;
|
|
566
|
+
discountType: import("@prisma/client").$Enums.DiscountType;
|
|
567
|
+
discountValue: string;
|
|
568
|
+
startDate: string;
|
|
569
|
+
endDate: string;
|
|
570
|
+
};
|
|
571
|
+
id: string;
|
|
572
|
+
createdAt: string;
|
|
573
|
+
productId: string;
|
|
574
|
+
saleId: string;
|
|
575
|
+
}[];
|
|
552
576
|
createdAt: string;
|
|
553
577
|
updatedAt: string;
|
|
554
578
|
deletedAt: string;
|
|
@@ -585,6 +609,10 @@ declare const dummyClient: {
|
|
|
585
609
|
};
|
|
586
610
|
};
|
|
587
611
|
output: {
|
|
612
|
+
isOnSale: boolean;
|
|
613
|
+
saleId: string;
|
|
614
|
+
saleName: string;
|
|
615
|
+
saleEndsAt: string;
|
|
588
616
|
id: string;
|
|
589
617
|
name: string;
|
|
590
618
|
slug: string;
|
|
@@ -755,10 +783,11 @@ declare const dummyClient: {
|
|
|
755
783
|
price: number;
|
|
756
784
|
compareAtPrice: number;
|
|
757
785
|
deletedAt: string;
|
|
786
|
+
thumbnailUrl: string;
|
|
787
|
+
originalPrice: number;
|
|
758
788
|
id: string;
|
|
759
789
|
name: string | null;
|
|
760
790
|
isActive: boolean;
|
|
761
|
-
thumbnailUrl: string | null;
|
|
762
791
|
productId: string;
|
|
763
792
|
sku: string;
|
|
764
793
|
trackInventory: boolean;
|
|
@@ -1055,6 +1084,25 @@ declare const dummyClient: {
|
|
|
1055
1084
|
flat?: boolean;
|
|
1056
1085
|
};
|
|
1057
1086
|
};
|
|
1087
|
+
sales: {
|
|
1088
|
+
sale: {
|
|
1089
|
+
id: string;
|
|
1090
|
+
name: string;
|
|
1091
|
+
createdAt: string;
|
|
1092
|
+
updatedAt: string;
|
|
1093
|
+
deletedAt: string;
|
|
1094
|
+
brandId: string;
|
|
1095
|
+
isActive: boolean;
|
|
1096
|
+
discountType: import("@prisma/client").$Enums.DiscountType;
|
|
1097
|
+
discountValue: string;
|
|
1098
|
+
startDate: string;
|
|
1099
|
+
endDate: string;
|
|
1100
|
+
};
|
|
1101
|
+
id: string;
|
|
1102
|
+
createdAt: string;
|
|
1103
|
+
productId: string;
|
|
1104
|
+
saleId: string;
|
|
1105
|
+
}[];
|
|
1058
1106
|
createdAt: string;
|
|
1059
1107
|
updatedAt: string;
|
|
1060
1108
|
deletedAt: string;
|
|
@@ -1104,6 +1152,10 @@ declare const dummyClient: {
|
|
|
1104
1152
|
};
|
|
1105
1153
|
};
|
|
1106
1154
|
output: {
|
|
1155
|
+
isOnSale: boolean;
|
|
1156
|
+
saleId: string;
|
|
1157
|
+
saleName: string;
|
|
1158
|
+
saleEndsAt: string;
|
|
1107
1159
|
id: string;
|
|
1108
1160
|
name: string;
|
|
1109
1161
|
slug: string;
|
|
@@ -1274,10 +1326,11 @@ declare const dummyClient: {
|
|
|
1274
1326
|
price: number;
|
|
1275
1327
|
compareAtPrice: number;
|
|
1276
1328
|
deletedAt: string;
|
|
1329
|
+
thumbnailUrl: string;
|
|
1330
|
+
originalPrice: number;
|
|
1277
1331
|
id: string;
|
|
1278
1332
|
name: string | null;
|
|
1279
1333
|
isActive: boolean;
|
|
1280
|
-
thumbnailUrl: string | null;
|
|
1281
1334
|
productId: string;
|
|
1282
1335
|
sku: string;
|
|
1283
1336
|
trackInventory: boolean;
|
|
@@ -1574,6 +1627,25 @@ declare const dummyClient: {
|
|
|
1574
1627
|
flat?: boolean;
|
|
1575
1628
|
};
|
|
1576
1629
|
};
|
|
1630
|
+
sales: {
|
|
1631
|
+
sale: {
|
|
1632
|
+
id: string;
|
|
1633
|
+
name: string;
|
|
1634
|
+
createdAt: string;
|
|
1635
|
+
updatedAt: string;
|
|
1636
|
+
deletedAt: string;
|
|
1637
|
+
brandId: string;
|
|
1638
|
+
isActive: boolean;
|
|
1639
|
+
discountType: import("@prisma/client").$Enums.DiscountType;
|
|
1640
|
+
discountValue: string;
|
|
1641
|
+
startDate: string;
|
|
1642
|
+
endDate: string;
|
|
1643
|
+
};
|
|
1644
|
+
id: string;
|
|
1645
|
+
createdAt: string;
|
|
1646
|
+
productId: string;
|
|
1647
|
+
saleId: string;
|
|
1648
|
+
}[];
|
|
1577
1649
|
createdAt: string;
|
|
1578
1650
|
updatedAt: string;
|
|
1579
1651
|
deletedAt: string;
|
|
@@ -111,5 +111,11 @@ export declare const queryKeys: {
|
|
|
111
111
|
all: readonly ["admin", "media"];
|
|
112
112
|
list: (type?: string) => readonly ["admin", "media", "list", string];
|
|
113
113
|
};
|
|
114
|
+
sales: {
|
|
115
|
+
all: readonly ["admin", "sales"];
|
|
116
|
+
list: (params?: any) => readonly ["admin", "sales", "list", any];
|
|
117
|
+
detail: (id: string) => readonly ["admin", "sales", string];
|
|
118
|
+
overviewStats: () => readonly ["admin", "sales", "stats", "overview"];
|
|
119
|
+
};
|
|
114
120
|
};
|
|
115
121
|
};
|
package/dist/utils/query-keys.js
CHANGED
|
@@ -119,5 +119,11 @@ export const queryKeys = {
|
|
|
119
119
|
all: ['admin', 'media'],
|
|
120
120
|
list: (type) => ['admin', 'media', 'list', type],
|
|
121
121
|
},
|
|
122
|
+
sales: {
|
|
123
|
+
all: ['admin', 'sales'],
|
|
124
|
+
list: (params) => ['admin', 'sales', 'list', params],
|
|
125
|
+
detail: (id) => ['admin', 'sales', id],
|
|
126
|
+
overviewStats: () => ['admin', 'sales', 'stats', 'overview'],
|
|
127
|
+
},
|
|
122
128
|
},
|
|
123
129
|
};
|