@instockng/api-client 1.0.7 → 1.0.9
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/apps/backend/src/http-app.js +28 -0
- package/dist/apps/backend/src/lib/brand-response.d.ts +1 -1
- package/dist/apps/backend/src/lib/cart-helpers.d.ts +13 -11
- package/dist/apps/backend/src/lib/cart-helpers.js +28 -0
- package/dist/apps/backend/src/lib/cart-response.d.ts +5 -5
- package/dist/apps/backend/src/lib/clerk.js +23 -0
- package/dist/apps/backend/src/lib/delivery-zone-response.d.ts +6 -4
- package/dist/apps/backend/src/lib/discount-code-response.d.ts +2 -2
- package/dist/apps/backend/src/lib/meta-capi.d.ts +5 -0
- package/dist/apps/backend/src/lib/meta-capi.js +33 -2
- package/dist/apps/backend/src/lib/order-recovery.d.ts +30 -24
- package/dist/apps/backend/src/lib/order-response.d.ts +9 -7
- package/dist/apps/backend/src/lib/product-response.d.ts +4 -4
- package/dist/apps/backend/src/lib/sentry.d.ts +48 -0
- package/dist/apps/backend/src/lib/sentry.js +180 -0
- package/dist/apps/backend/src/lib/utils.d.ts +1 -1
- package/dist/apps/backend/src/lib/utils.js +1 -1
- package/dist/apps/backend/src/notifications/producers/meta-capi-producer.js +18 -4
- package/dist/apps/backend/src/routes/admin/abandoned-carts.d.ts +18 -10
- package/dist/apps/backend/src/routes/admin/brands.d.ts +4 -4
- package/dist/apps/backend/src/routes/admin/customers.d.ts +13 -7
- package/dist/apps/backend/src/routes/admin/delivery-zones.d.ts +23 -15
- package/dist/apps/backend/src/routes/admin/discount-codes.d.ts +10 -10
- package/dist/apps/backend/src/routes/admin/inventory.d.ts +4 -0
- package/dist/apps/backend/src/routes/admin/inventory.js +10 -0
- package/dist/apps/backend/src/routes/admin/orders.d.ts +78 -42
- package/dist/apps/backend/src/routes/admin/orders.js +25 -0
- package/dist/apps/backend/src/routes/admin/products.d.ts +28 -12
- package/dist/apps/backend/src/routes/admin/products.js +34 -15
- package/dist/apps/backend/src/routes/admin/stats.d.ts +13 -7
- package/dist/apps/backend/src/routes/admin/variants.d.ts +5 -5
- package/dist/apps/backend/src/routes/admin/variants.js +42 -18
- package/dist/apps/backend/src/routes/admin/warehouses.d.ts +11 -7
- package/dist/apps/backend/src/routes/public/brands.d.ts +1 -1
- package/dist/apps/backend/src/routes/public/carts.d.ts +85 -47
- package/dist/apps/backend/src/routes/public/carts.js +148 -1
- package/dist/apps/backend/src/routes/public/delivery-zones.d.ts +2 -0
- package/dist/apps/backend/src/routes/public/delivery-zones.js +2 -0
- package/dist/apps/backend/src/routes/public/orders.d.ts +26 -14
- package/dist/apps/backend/src/routes/public/orders.js +24 -0
- package/dist/apps/backend/src/routes/public/products.d.ts +14 -6
- package/dist/apps/backend/src/types/index.d.ts +1 -0
- package/dist/apps/backend/src/validators/delivery-zone.d.ts +4 -0
- package/dist/apps/backend/src/validators/delivery-zone.js +4 -0
- package/dist/apps/backend/src/validators/discount-code.d.ts +3 -3
- package/dist/apps/backend/src/validators/order.d.ts +3 -1
- package/dist/apps/backend/src/validators/order.js +3 -1
- package/dist/packages/api-client/src/fetchers/brands.d.ts +1 -1
- package/dist/packages/api-client/src/fetchers/carts.d.ts +85 -47
- package/dist/packages/api-client/src/fetchers/delivery-zones.d.ts +2 -0
- package/dist/packages/api-client/src/fetchers/orders.d.ts +26 -14
- package/dist/packages/api-client/src/fetchers/products.d.ts +14 -6
- package/dist/packages/api-client/src/hooks/admin/abandoned-carts.d.ts +18 -10
- package/dist/packages/api-client/src/hooks/admin/brands.d.ts +4 -4
- package/dist/packages/api-client/src/hooks/admin/customers.d.ts +13 -7
- package/dist/packages/api-client/src/hooks/admin/delivery-zones.d.ts +23 -15
- package/dist/packages/api-client/src/hooks/admin/discount-codes.d.ts +10 -10
- package/dist/packages/api-client/src/hooks/admin/inventory.d.ts +4 -0
- package/dist/packages/api-client/src/hooks/admin/orders.d.ts +78 -42
- package/dist/packages/api-client/src/hooks/admin/products.d.ts +14 -6
- package/dist/packages/api-client/src/hooks/admin/stats.d.ts +13 -7
- package/dist/packages/api-client/src/hooks/admin/variants.d.ts +5 -5
- package/dist/packages/api-client/src/hooks/admin/warehouses.d.ts +11 -7
- package/dist/packages/api-client/src/hooks/public/brands.d.ts +1 -1
- package/dist/packages/api-client/src/hooks/public/carts.d.ts +85 -47
- package/dist/packages/api-client/src/hooks/public/delivery-zones.d.ts +2 -0
- package/dist/packages/api-client/src/hooks/public/orders.d.ts +26 -14
- package/dist/packages/api-client/src/hooks/public/products.d.ts +14 -6
- package/dist/packages/api-client/src/rpc-client.d.ts +335 -187
- package/package.json +1 -1
|
@@ -35,8 +35,8 @@ export declare function useGetOrder(orderId: string, token: string, options?: Om
|
|
|
35
35
|
createdAt: string;
|
|
36
36
|
updatedAt: string;
|
|
37
37
|
deletedAt: string;
|
|
38
|
-
name: string;
|
|
39
38
|
id: string;
|
|
39
|
+
name: string;
|
|
40
40
|
slug: string;
|
|
41
41
|
logoUrl: string | null;
|
|
42
42
|
siteUrl: string;
|
|
@@ -53,18 +53,20 @@ export declare function useGetOrder(orderId: string, token: string, options?: Om
|
|
|
53
53
|
createdAt: string;
|
|
54
54
|
updatedAt: string;
|
|
55
55
|
deletedAt: string;
|
|
56
|
-
name: string;
|
|
57
56
|
id: string;
|
|
57
|
+
name: string;
|
|
58
58
|
isActive: boolean;
|
|
59
59
|
};
|
|
60
|
-
name: string;
|
|
61
60
|
id: string;
|
|
61
|
+
name: string;
|
|
62
62
|
brandId: string | null;
|
|
63
63
|
stateId: string;
|
|
64
64
|
allowCOD: boolean;
|
|
65
65
|
allowOnline: boolean;
|
|
66
66
|
waybillOnly: boolean;
|
|
67
67
|
estimatedDays: number | null;
|
|
68
|
+
noteTitle: string | null;
|
|
69
|
+
noteContent: string | null;
|
|
68
70
|
isActive: boolean;
|
|
69
71
|
};
|
|
70
72
|
items: {
|
|
@@ -78,8 +80,8 @@ export declare function useGetOrder(orderId: string, token: string, options?: Om
|
|
|
78
80
|
createdAt: string;
|
|
79
81
|
updatedAt: string;
|
|
80
82
|
deletedAt: string;
|
|
81
|
-
name: string;
|
|
82
83
|
id: string;
|
|
84
|
+
name: string;
|
|
83
85
|
slug: string;
|
|
84
86
|
brandId: string;
|
|
85
87
|
isActive: boolean;
|
|
@@ -155,7 +157,9 @@ export declare function useGetOrder(orderId: string, token: string, options?: Om
|
|
|
155
157
|
includes?: boolean;
|
|
156
158
|
flatMap?: boolean;
|
|
157
159
|
flat?: boolean;
|
|
160
|
+
at?: boolean;
|
|
158
161
|
};
|
|
162
|
+
at: never;
|
|
159
163
|
};
|
|
160
164
|
} | {
|
|
161
165
|
[x: number]: string | number | boolean | {
|
|
@@ -228,11 +232,13 @@ export declare function useGetOrder(orderId: string, token: string, options?: Om
|
|
|
228
232
|
includes?: boolean;
|
|
229
233
|
flatMap?: boolean;
|
|
230
234
|
flat?: boolean;
|
|
235
|
+
at?: boolean;
|
|
231
236
|
};
|
|
237
|
+
at: never;
|
|
232
238
|
};
|
|
233
239
|
};
|
|
234
|
-
name: string | null;
|
|
235
240
|
id: string;
|
|
241
|
+
name: string | null;
|
|
236
242
|
isActive: boolean;
|
|
237
243
|
thumbnailUrl: string | null;
|
|
238
244
|
productId: string;
|
|
@@ -244,8 +250,8 @@ export declare function useGetOrder(orderId: string, token: string, options?: Om
|
|
|
244
250
|
createdAt: string;
|
|
245
251
|
updatedAt: string;
|
|
246
252
|
deletedAt: string;
|
|
247
|
-
name: string;
|
|
248
253
|
id: string;
|
|
254
|
+
name: string;
|
|
249
255
|
isActive: boolean;
|
|
250
256
|
address: string | null;
|
|
251
257
|
city: string | null;
|
|
@@ -257,8 +263,8 @@ export declare function useGetOrder(orderId: string, token: string, options?: Om
|
|
|
257
263
|
warehouseId: string | null;
|
|
258
264
|
quantity: number;
|
|
259
265
|
}[];
|
|
260
|
-
id: string;
|
|
261
266
|
email: string | null;
|
|
267
|
+
id: string;
|
|
262
268
|
brandId: string;
|
|
263
269
|
deliveryZoneId: string;
|
|
264
270
|
recoveryAttempts: number;
|
|
@@ -310,8 +316,8 @@ export declare function useConfirmOrder(options?: UseMutationOptions<Awaited<Ret
|
|
|
310
316
|
createdAt: string;
|
|
311
317
|
updatedAt: string;
|
|
312
318
|
deletedAt: string;
|
|
313
|
-
name: string;
|
|
314
319
|
id: string;
|
|
320
|
+
name: string;
|
|
315
321
|
slug: string;
|
|
316
322
|
logoUrl: string | null;
|
|
317
323
|
siteUrl: string;
|
|
@@ -328,18 +334,20 @@ export declare function useConfirmOrder(options?: UseMutationOptions<Awaited<Ret
|
|
|
328
334
|
createdAt: string;
|
|
329
335
|
updatedAt: string;
|
|
330
336
|
deletedAt: string;
|
|
331
|
-
name: string;
|
|
332
337
|
id: string;
|
|
338
|
+
name: string;
|
|
333
339
|
isActive: boolean;
|
|
334
340
|
};
|
|
335
|
-
name: string;
|
|
336
341
|
id: string;
|
|
342
|
+
name: string;
|
|
337
343
|
brandId: string | null;
|
|
338
344
|
stateId: string;
|
|
339
345
|
allowCOD: boolean;
|
|
340
346
|
allowOnline: boolean;
|
|
341
347
|
waybillOnly: boolean;
|
|
342
348
|
estimatedDays: number | null;
|
|
349
|
+
noteTitle: string | null;
|
|
350
|
+
noteContent: string | null;
|
|
343
351
|
isActive: boolean;
|
|
344
352
|
};
|
|
345
353
|
items: {
|
|
@@ -353,8 +361,8 @@ export declare function useConfirmOrder(options?: UseMutationOptions<Awaited<Ret
|
|
|
353
361
|
createdAt: string;
|
|
354
362
|
updatedAt: string;
|
|
355
363
|
deletedAt: string;
|
|
356
|
-
name: string;
|
|
357
364
|
id: string;
|
|
365
|
+
name: string;
|
|
358
366
|
slug: string;
|
|
359
367
|
brandId: string;
|
|
360
368
|
isActive: boolean;
|
|
@@ -430,7 +438,9 @@ export declare function useConfirmOrder(options?: UseMutationOptions<Awaited<Ret
|
|
|
430
438
|
includes?: boolean;
|
|
431
439
|
flatMap?: boolean;
|
|
432
440
|
flat?: boolean;
|
|
441
|
+
at?: boolean;
|
|
433
442
|
};
|
|
443
|
+
at: never;
|
|
434
444
|
};
|
|
435
445
|
} | {
|
|
436
446
|
[x: number]: string | number | boolean | {
|
|
@@ -503,11 +513,13 @@ export declare function useConfirmOrder(options?: UseMutationOptions<Awaited<Ret
|
|
|
503
513
|
includes?: boolean;
|
|
504
514
|
flatMap?: boolean;
|
|
505
515
|
flat?: boolean;
|
|
516
|
+
at?: boolean;
|
|
506
517
|
};
|
|
518
|
+
at: never;
|
|
507
519
|
};
|
|
508
520
|
};
|
|
509
|
-
name: string | null;
|
|
510
521
|
id: string;
|
|
522
|
+
name: string | null;
|
|
511
523
|
isActive: boolean;
|
|
512
524
|
thumbnailUrl: string | null;
|
|
513
525
|
productId: string;
|
|
@@ -519,8 +531,8 @@ export declare function useConfirmOrder(options?: UseMutationOptions<Awaited<Ret
|
|
|
519
531
|
createdAt: string;
|
|
520
532
|
updatedAt: string;
|
|
521
533
|
deletedAt: string;
|
|
522
|
-
name: string;
|
|
523
534
|
id: string;
|
|
535
|
+
name: string;
|
|
524
536
|
isActive: boolean;
|
|
525
537
|
address: string | null;
|
|
526
538
|
city: string | null;
|
|
@@ -532,8 +544,8 @@ export declare function useConfirmOrder(options?: UseMutationOptions<Awaited<Ret
|
|
|
532
544
|
warehouseId: string | null;
|
|
533
545
|
quantity: number;
|
|
534
546
|
}[];
|
|
535
|
-
id: string;
|
|
536
547
|
email: string | null;
|
|
548
|
+
id: string;
|
|
537
549
|
brandId: string;
|
|
538
550
|
deliveryZoneId: string;
|
|
539
551
|
recoveryAttempts: number;
|
|
@@ -23,8 +23,8 @@ export declare function useGetProducts(brandId: string, options?: Omit<UseQueryO
|
|
|
23
23
|
createdAt: string;
|
|
24
24
|
updatedAt: string;
|
|
25
25
|
deletedAt: string;
|
|
26
|
-
name: string;
|
|
27
26
|
id: string;
|
|
27
|
+
name: string;
|
|
28
28
|
slug: string;
|
|
29
29
|
logoUrl: string | null;
|
|
30
30
|
siteUrl: string;
|
|
@@ -36,8 +36,8 @@ export declare function useGetProducts(brandId: string, options?: Omit<UseQueryO
|
|
|
36
36
|
updatedAt: string;
|
|
37
37
|
price: number;
|
|
38
38
|
deletedAt: string;
|
|
39
|
-
name: string | null;
|
|
40
39
|
id: string;
|
|
40
|
+
name: string | null;
|
|
41
41
|
isActive: boolean;
|
|
42
42
|
thumbnailUrl: string | null;
|
|
43
43
|
productId: string;
|
|
@@ -45,8 +45,8 @@ export declare function useGetProducts(brandId: string, options?: Omit<UseQueryO
|
|
|
45
45
|
trackInventory: boolean;
|
|
46
46
|
lowStockThreshold: number | null;
|
|
47
47
|
}[];
|
|
48
|
-
name: string;
|
|
49
48
|
id: string;
|
|
49
|
+
name: string;
|
|
50
50
|
slug: string;
|
|
51
51
|
createdAt: string;
|
|
52
52
|
updatedAt: string;
|
|
@@ -125,7 +125,9 @@ export declare function useGetProducts(brandId: string, options?: Omit<UseQueryO
|
|
|
125
125
|
includes?: boolean;
|
|
126
126
|
flatMap?: boolean;
|
|
127
127
|
flat?: boolean;
|
|
128
|
+
at?: boolean;
|
|
128
129
|
};
|
|
130
|
+
at: never;
|
|
129
131
|
};
|
|
130
132
|
} | {
|
|
131
133
|
[x: number]: string | number | boolean | {
|
|
@@ -198,7 +200,9 @@ export declare function useGetProducts(brandId: string, options?: Omit<UseQueryO
|
|
|
198
200
|
includes?: boolean;
|
|
199
201
|
flatMap?: boolean;
|
|
200
202
|
flat?: boolean;
|
|
203
|
+
at?: boolean;
|
|
201
204
|
};
|
|
205
|
+
at: never;
|
|
202
206
|
};
|
|
203
207
|
}[], Error>;
|
|
204
208
|
/**
|
|
@@ -218,8 +222,8 @@ export declare function useGetProduct(slug: string, options?: Omit<UseQueryOptio
|
|
|
218
222
|
createdAt: string;
|
|
219
223
|
updatedAt: string;
|
|
220
224
|
deletedAt: string;
|
|
221
|
-
name: string;
|
|
222
225
|
id: string;
|
|
226
|
+
name: string;
|
|
223
227
|
slug: string;
|
|
224
228
|
logoUrl: string | null;
|
|
225
229
|
siteUrl: string;
|
|
@@ -231,8 +235,8 @@ export declare function useGetProduct(slug: string, options?: Omit<UseQueryOptio
|
|
|
231
235
|
updatedAt: string;
|
|
232
236
|
price: number;
|
|
233
237
|
deletedAt: string;
|
|
234
|
-
name: string | null;
|
|
235
238
|
id: string;
|
|
239
|
+
name: string | null;
|
|
236
240
|
isActive: boolean;
|
|
237
241
|
thumbnailUrl: string | null;
|
|
238
242
|
productId: string;
|
|
@@ -240,8 +244,8 @@ export declare function useGetProduct(slug: string, options?: Omit<UseQueryOptio
|
|
|
240
244
|
trackInventory: boolean;
|
|
241
245
|
lowStockThreshold: number | null;
|
|
242
246
|
}[];
|
|
243
|
-
name: string;
|
|
244
247
|
id: string;
|
|
248
|
+
name: string;
|
|
245
249
|
slug: string;
|
|
246
250
|
createdAt: string;
|
|
247
251
|
updatedAt: string;
|
|
@@ -320,7 +324,9 @@ export declare function useGetProduct(slug: string, options?: Omit<UseQueryOptio
|
|
|
320
324
|
includes?: boolean;
|
|
321
325
|
flatMap?: boolean;
|
|
322
326
|
flat?: boolean;
|
|
327
|
+
at?: boolean;
|
|
323
328
|
};
|
|
329
|
+
at: never;
|
|
324
330
|
};
|
|
325
331
|
} | {
|
|
326
332
|
[x: number]: string | number | boolean | {
|
|
@@ -393,6 +399,8 @@ export declare function useGetProduct(slug: string, options?: Omit<UseQueryOptio
|
|
|
393
399
|
includes?: boolean;
|
|
394
400
|
flatMap?: boolean;
|
|
395
401
|
flat?: boolean;
|
|
402
|
+
at?: boolean;
|
|
396
403
|
};
|
|
404
|
+
at: never;
|
|
397
405
|
};
|
|
398
406
|
}, Error>;
|