@devlider001/washlab-backend 1.1.3 → 1.1.5
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/convex/_generated/api.d.ts +4 -0
- package/convex/actions.d.ts +4 -4
- package/convex/admin.d.ts +100 -4
- package/convex/customers.d.ts +5 -2
- package/convex/inventory.d.ts +131 -0
- package/convex/loyalty.d.ts +0 -4
- package/convex/orders.d.ts +11 -6
- package/convex/payments.d.ts +8 -6
- package/convex/schema.d.ts +113 -9
- package/convex/services.d.ts +32 -0
- package/convex/stations.d.ts +64 -4
- package/package.json +1 -1
|
@@ -17,6 +17,7 @@ import type * as branches from "../branches.js";
|
|
|
17
17
|
import type * as clerk from "../clerk.js";
|
|
18
18
|
import type * as customers from "../customers.js";
|
|
19
19
|
import type * as http from "../http.js";
|
|
20
|
+
import type * as inventory from "../inventory.js";
|
|
20
21
|
import type * as lib_attendance from "../lib/attendance.js";
|
|
21
22
|
import type * as lib_audit from "../lib/audit.js";
|
|
22
23
|
import type * as lib_auth from "../lib/auth.js";
|
|
@@ -30,6 +31,7 @@ import type * as notifications from "../notifications.js";
|
|
|
30
31
|
import type * as orders from "../orders.js";
|
|
31
32
|
import type * as payments from "../payments.js";
|
|
32
33
|
import type * as resources from "../resources.js";
|
|
34
|
+
import type * as services from "../services.js";
|
|
33
35
|
import type * as stations from "../stations.js";
|
|
34
36
|
import type * as vouchers from "../vouchers.js";
|
|
35
37
|
|
|
@@ -49,6 +51,7 @@ declare const fullApi: ApiFromModules<{
|
|
|
49
51
|
clerk: typeof clerk;
|
|
50
52
|
customers: typeof customers;
|
|
51
53
|
http: typeof http;
|
|
54
|
+
inventory: typeof inventory;
|
|
52
55
|
"lib/attendance": typeof lib_attendance;
|
|
53
56
|
"lib/audit": typeof lib_audit;
|
|
54
57
|
"lib/auth": typeof lib_auth;
|
|
@@ -62,6 +65,7 @@ declare const fullApi: ApiFromModules<{
|
|
|
62
65
|
orders: typeof orders;
|
|
63
66
|
payments: typeof payments;
|
|
64
67
|
resources: typeof resources;
|
|
68
|
+
services: typeof services;
|
|
65
69
|
stations: typeof stations;
|
|
66
70
|
vouchers: typeof vouchers;
|
|
67
71
|
}>;
|
package/convex/actions.d.ts
CHANGED
|
@@ -50,7 +50,7 @@ export declare const getActionsByAttendance: import("convex/server").RegisteredQ
|
|
|
50
50
|
attendantId: import("convex/values").GenericId<"attendants">;
|
|
51
51
|
attendanceId: import("convex/values").GenericId<"attendanceLogs">;
|
|
52
52
|
actionType: string;
|
|
53
|
-
actionStatus: "
|
|
53
|
+
actionStatus: "completed" | "cancelled" | "pending" | "failed";
|
|
54
54
|
}[]>>;
|
|
55
55
|
/**
|
|
56
56
|
* Get actions by attendant (with pagination)
|
|
@@ -81,7 +81,7 @@ export declare const getActionsByAttendant: import("convex/server").RegisteredQu
|
|
|
81
81
|
attendantId: import("convex/values").GenericId<"attendants">;
|
|
82
82
|
attendanceId: import("convex/values").GenericId<"attendanceLogs">;
|
|
83
83
|
actionType: string;
|
|
84
|
-
actionStatus: "
|
|
84
|
+
actionStatus: "completed" | "cancelled" | "pending" | "failed";
|
|
85
85
|
}>>>;
|
|
86
86
|
/**
|
|
87
87
|
* Get actions by branch (with pagination)
|
|
@@ -115,7 +115,7 @@ export declare const getActionsByBranch: import("convex/server").RegisteredQuery
|
|
|
115
115
|
attendantId: import("convex/values").GenericId<"attendants">;
|
|
116
116
|
attendanceId: import("convex/values").GenericId<"attendanceLogs">;
|
|
117
117
|
actionType: string;
|
|
118
|
-
actionStatus: "
|
|
118
|
+
actionStatus: "completed" | "cancelled" | "pending" | "failed";
|
|
119
119
|
}>>>;
|
|
120
120
|
/**
|
|
121
121
|
* Get actions by entity (e.g., all actions on a specific order)
|
|
@@ -141,7 +141,7 @@ export declare const getActionsByEntity: import("convex/server").RegisteredQuery
|
|
|
141
141
|
attendantId: import("convex/values").GenericId<"attendants">;
|
|
142
142
|
attendanceId: import("convex/values").GenericId<"attendanceLogs">;
|
|
143
143
|
actionType: string;
|
|
144
|
-
actionStatus: "
|
|
144
|
+
actionStatus: "completed" | "cancelled" | "pending" | "failed";
|
|
145
145
|
}[]>>;
|
|
146
146
|
/**
|
|
147
147
|
* Get action statistics for an attendance session
|
package/convex/admin.d.ts
CHANGED
|
@@ -211,7 +211,7 @@ export declare const getAttendants: import("convex/server").RegisteredQuery<"pub
|
|
|
211
211
|
* Supports usePaginatedQuery for infinite scroll
|
|
212
212
|
*/
|
|
213
213
|
export declare const getOrders: import("convex/server").RegisteredQuery<"public", {
|
|
214
|
-
status?: "
|
|
214
|
+
status?: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered" | undefined;
|
|
215
215
|
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
216
216
|
startDate?: number | undefined;
|
|
217
217
|
endDate?: number | undefined;
|
|
@@ -242,8 +242,9 @@ export declare const getOrders: import("convex/server").RegisteredQuery<"public"
|
|
|
242
242
|
deliveryRoom?: string | undefined;
|
|
243
243
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
244
244
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
245
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
245
246
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
246
|
-
status: "
|
|
247
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
247
248
|
createdAt: number;
|
|
248
249
|
isDeleted: boolean;
|
|
249
250
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -543,7 +544,7 @@ export declare const createFirstSuperAdmin: import("convex/server").RegisteredMu
|
|
|
543
544
|
export declare const updateOrderStatus: import("convex/server").RegisteredMutation<"public", {
|
|
544
545
|
notes?: string | undefined;
|
|
545
546
|
orderId: import("convex/values").GenericId<"orders">;
|
|
546
|
-
newStatus: "
|
|
547
|
+
newStatus: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
547
548
|
}, Promise<import("convex/values").GenericId<"orders">>>;
|
|
548
549
|
/**
|
|
549
550
|
* Admin: Delete order (soft delete)
|
|
@@ -587,8 +588,9 @@ export declare const getOrderDetails: import("convex/server").RegisteredQuery<"p
|
|
|
587
588
|
deliveryRoom?: string | undefined;
|
|
588
589
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
589
590
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
591
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
590
592
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
591
|
-
status: "
|
|
593
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
592
594
|
createdAt: number;
|
|
593
595
|
isDeleted: boolean;
|
|
594
596
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -658,4 +660,98 @@ export declare const resendEnrollmentLink: import("convex/server").RegisteredMut
|
|
|
658
660
|
enrollmentLink: string;
|
|
659
661
|
expiresAt: number;
|
|
660
662
|
}>>;
|
|
663
|
+
/**
|
|
664
|
+
* Get system settings
|
|
665
|
+
*/
|
|
666
|
+
export declare const getSystemSettings: import("convex/server").RegisteredQuery<"public", {}, Promise<{
|
|
667
|
+
businessName: string;
|
|
668
|
+
contactPhone: string;
|
|
669
|
+
contactEmail: string;
|
|
670
|
+
notifyNewOrders: boolean;
|
|
671
|
+
notifyCompletedOrders: boolean;
|
|
672
|
+
requireBiometricPayment: boolean;
|
|
673
|
+
autoLogoutMinutes: number;
|
|
674
|
+
}>>;
|
|
675
|
+
/**
|
|
676
|
+
* Update system settings
|
|
677
|
+
*/
|
|
678
|
+
export declare const updateSystemSettings: import("convex/server").RegisteredMutation<"public", {
|
|
679
|
+
businessName: string;
|
|
680
|
+
contactPhone: string;
|
|
681
|
+
contactEmail: string;
|
|
682
|
+
notifyNewOrders: boolean;
|
|
683
|
+
notifyCompletedOrders: boolean;
|
|
684
|
+
requireBiometricPayment: boolean;
|
|
685
|
+
autoLogoutMinutes: number;
|
|
686
|
+
}, Promise<{
|
|
687
|
+
success: boolean;
|
|
688
|
+
}>>;
|
|
689
|
+
/**
|
|
690
|
+
* Get all services
|
|
691
|
+
*/
|
|
692
|
+
export declare const getServices: import("convex/server").RegisteredQuery<"public", {}, Promise<{
|
|
693
|
+
_id: import("convex/values").GenericId<"services">;
|
|
694
|
+
_creationTime: number;
|
|
695
|
+
description?: string | undefined;
|
|
696
|
+
updatedBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
697
|
+
imageStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
698
|
+
imageUrl?: string | undefined;
|
|
699
|
+
name: string;
|
|
700
|
+
createdAt: number;
|
|
701
|
+
isDeleted: boolean;
|
|
702
|
+
isActive: boolean;
|
|
703
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
704
|
+
code: string;
|
|
705
|
+
basePrice: number;
|
|
706
|
+
updatedAt: number;
|
|
707
|
+
pricingType: "per_kg" | "per_load";
|
|
708
|
+
}[]>>;
|
|
709
|
+
/**
|
|
710
|
+
* Create a new service
|
|
711
|
+
*/
|
|
712
|
+
export declare const createService: import("convex/server").RegisteredMutation<"public", {
|
|
713
|
+
description?: string | undefined;
|
|
714
|
+
imageStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
715
|
+
imageUrl?: string | undefined;
|
|
716
|
+
name: string;
|
|
717
|
+
code: string;
|
|
718
|
+
basePrice: number;
|
|
719
|
+
pricingType: "per_kg" | "per_load";
|
|
720
|
+
}, Promise<{
|
|
721
|
+
success: boolean;
|
|
722
|
+
serviceId: import("convex/values").GenericId<"services">;
|
|
723
|
+
}>>;
|
|
724
|
+
/**
|
|
725
|
+
* Update a service
|
|
726
|
+
*/
|
|
727
|
+
export declare const updateService: import("convex/server").RegisteredMutation<"public", {
|
|
728
|
+
name?: string | undefined;
|
|
729
|
+
isActive?: boolean | undefined;
|
|
730
|
+
basePrice?: number | undefined;
|
|
731
|
+
description?: string | undefined;
|
|
732
|
+
imageStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
733
|
+
imageUrl?: string | undefined;
|
|
734
|
+
pricingType?: "per_kg" | "per_load" | undefined;
|
|
735
|
+
serviceId: import("convex/values").GenericId<"services">;
|
|
736
|
+
}, Promise<{
|
|
737
|
+
success: boolean;
|
|
738
|
+
}>>;
|
|
739
|
+
/**
|
|
740
|
+
* Delete a service (soft delete)
|
|
741
|
+
*/
|
|
742
|
+
export declare const deleteService: import("convex/server").RegisteredMutation<"public", {
|
|
743
|
+
serviceId: import("convex/values").GenericId<"services">;
|
|
744
|
+
}, Promise<{
|
|
745
|
+
success: boolean;
|
|
746
|
+
}>>;
|
|
747
|
+
/**
|
|
748
|
+
* Generate upload URL for service images
|
|
749
|
+
*/
|
|
750
|
+
export declare const generateServiceImageUploadUrl: import("convex/server").RegisteredMutation<"public", {}, Promise<string>>;
|
|
751
|
+
/**
|
|
752
|
+
* Get service image URL from storage ID
|
|
753
|
+
*/
|
|
754
|
+
export declare const getServiceImageUrl: import("convex/server").RegisteredQuery<"public", {
|
|
755
|
+
storageId: import("convex/values").GenericId<"_storage">;
|
|
756
|
+
}, Promise<string | null>>;
|
|
661
757
|
//# sourceMappingURL=admin.d.ts.map
|
package/convex/customers.d.ts
CHANGED
|
@@ -92,8 +92,9 @@ export declare const getOrders: import("convex/server").RegisteredQuery<"public"
|
|
|
92
92
|
deliveryRoom?: string | undefined;
|
|
93
93
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
94
94
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
95
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
95
96
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
96
|
-
status: "
|
|
97
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
97
98
|
createdAt: number;
|
|
98
99
|
isDeleted: boolean;
|
|
99
100
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -142,8 +143,9 @@ export declare const getActiveOrders: import("convex/server").RegisteredQuery<"p
|
|
|
142
143
|
deliveryRoom?: string | undefined;
|
|
143
144
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
144
145
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
146
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
145
147
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
146
|
-
status: "
|
|
148
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
147
149
|
createdAt: number;
|
|
148
150
|
isDeleted: boolean;
|
|
149
151
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -190,6 +192,7 @@ export declare const getLoyaltyPoints: import("convex/server").RegisteredQuery<"
|
|
|
190
192
|
*/
|
|
191
193
|
export declare const createGuest: import("convex/server").RegisteredMutation<"public", {
|
|
192
194
|
phoneNumber: string;
|
|
195
|
+
email: string;
|
|
193
196
|
name: string;
|
|
194
197
|
}, Promise<import("convex/values").GenericId<"users">>>;
|
|
195
198
|
/**
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Get inventory items for a branch
|
|
3
|
+
*/
|
|
4
|
+
export declare const getByBranch: import("convex/server").RegisteredQuery<"public", {
|
|
5
|
+
status?: "low" | "critical" | "ok" | "ordered" | undefined;
|
|
6
|
+
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
7
|
+
category?: "cleaning_supplies" | "add_ons" | "facility" | "retail" | "operational" | undefined;
|
|
8
|
+
}, Promise<{
|
|
9
|
+
status: "low" | "critical" | "ok" | "ordered";
|
|
10
|
+
_id: import("convex/values").GenericId<"inventoryItems">;
|
|
11
|
+
_creationTime: number;
|
|
12
|
+
createdBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
13
|
+
description?: string | undefined;
|
|
14
|
+
updatedBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
15
|
+
orderedAt?: number | undefined;
|
|
16
|
+
expectedArrivalDate?: number | undefined;
|
|
17
|
+
arrivalDate?: number | undefined;
|
|
18
|
+
orderQuantity?: number | undefined;
|
|
19
|
+
lastRestockedAt?: number | undefined;
|
|
20
|
+
name: string;
|
|
21
|
+
createdAt: number;
|
|
22
|
+
isDeleted: boolean;
|
|
23
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
24
|
+
updatedAt: number;
|
|
25
|
+
category: "cleaning_supplies" | "add_ons" | "facility" | "retail" | "operational";
|
|
26
|
+
unit: string;
|
|
27
|
+
currentStock: number;
|
|
28
|
+
maxStock: number;
|
|
29
|
+
minStock: number;
|
|
30
|
+
reorderPoint: number;
|
|
31
|
+
}[]>>;
|
|
32
|
+
/**
|
|
33
|
+
* Get inventory items for station (attendant view)
|
|
34
|
+
*/
|
|
35
|
+
export declare const getStationInventory: import("convex/server").RegisteredQuery<"public", {
|
|
36
|
+
stationToken: string;
|
|
37
|
+
}, Promise<{
|
|
38
|
+
status: "low" | "critical" | "ok" | "ordered";
|
|
39
|
+
_id: import("convex/values").GenericId<"inventoryItems">;
|
|
40
|
+
_creationTime: number;
|
|
41
|
+
createdBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
42
|
+
description?: string | undefined;
|
|
43
|
+
updatedBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
44
|
+
orderedAt?: number | undefined;
|
|
45
|
+
expectedArrivalDate?: number | undefined;
|
|
46
|
+
arrivalDate?: number | undefined;
|
|
47
|
+
orderQuantity?: number | undefined;
|
|
48
|
+
lastRestockedAt?: number | undefined;
|
|
49
|
+
name: string;
|
|
50
|
+
createdAt: number;
|
|
51
|
+
isDeleted: boolean;
|
|
52
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
53
|
+
updatedAt: number;
|
|
54
|
+
category: "cleaning_supplies" | "add_ons" | "facility" | "retail" | "operational";
|
|
55
|
+
unit: string;
|
|
56
|
+
currentStock: number;
|
|
57
|
+
maxStock: number;
|
|
58
|
+
minStock: number;
|
|
59
|
+
reorderPoint: number;
|
|
60
|
+
}[]>>;
|
|
61
|
+
/**
|
|
62
|
+
* Create new inventory item (admin or attendant)
|
|
63
|
+
*/
|
|
64
|
+
export declare const create: import("convex/server").RegisteredMutation<"public", {
|
|
65
|
+
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
66
|
+
description?: string | undefined;
|
|
67
|
+
verificationId?: import("convex/values").GenericId<"biometricVerifications"> | undefined;
|
|
68
|
+
stationToken?: string | undefined;
|
|
69
|
+
name: string;
|
|
70
|
+
category: "cleaning_supplies" | "add_ons" | "facility" | "retail" | "operational";
|
|
71
|
+
unit: string;
|
|
72
|
+
currentStock: number;
|
|
73
|
+
maxStock: number;
|
|
74
|
+
minStock: number;
|
|
75
|
+
reorderPoint: number;
|
|
76
|
+
}, Promise<import("convex/values").GenericId<"inventoryItems">>>;
|
|
77
|
+
/**
|
|
78
|
+
* Update inventory stock level
|
|
79
|
+
*/
|
|
80
|
+
export declare const updateStock: import("convex/server").RegisteredMutation<"public", {
|
|
81
|
+
stationToken?: string | undefined;
|
|
82
|
+
currentStock: number;
|
|
83
|
+
itemId: import("convex/values").GenericId<"inventoryItems">;
|
|
84
|
+
}, Promise<{
|
|
85
|
+
success: boolean;
|
|
86
|
+
}>>;
|
|
87
|
+
/**
|
|
88
|
+
* Place order for inventory item
|
|
89
|
+
*/
|
|
90
|
+
export declare const placeOrder: import("convex/server").RegisteredMutation<"public", {
|
|
91
|
+
expectedArrivalDate?: number | undefined;
|
|
92
|
+
stationToken?: string | undefined;
|
|
93
|
+
orderQuantity: number;
|
|
94
|
+
itemId: import("convex/values").GenericId<"inventoryItems">;
|
|
95
|
+
}, Promise<{
|
|
96
|
+
success: boolean;
|
|
97
|
+
}>>;
|
|
98
|
+
/**
|
|
99
|
+
* Mark order as received (restock)
|
|
100
|
+
*/
|
|
101
|
+
export declare const receiveOrder: import("convex/server").RegisteredMutation<"public", {
|
|
102
|
+
stationToken?: string | undefined;
|
|
103
|
+
receivedQuantity?: number | undefined;
|
|
104
|
+
itemId: import("convex/values").GenericId<"inventoryItems">;
|
|
105
|
+
}, Promise<{
|
|
106
|
+
success: boolean;
|
|
107
|
+
}>>;
|
|
108
|
+
/**
|
|
109
|
+
* Update inventory item details (admin only)
|
|
110
|
+
*/
|
|
111
|
+
export declare const update: import("convex/server").RegisteredMutation<"public", {
|
|
112
|
+
name?: string | undefined;
|
|
113
|
+
description?: string | undefined;
|
|
114
|
+
category?: "cleaning_supplies" | "add_ons" | "facility" | "retail" | "operational" | undefined;
|
|
115
|
+
unit?: string | undefined;
|
|
116
|
+
maxStock?: number | undefined;
|
|
117
|
+
minStock?: number | undefined;
|
|
118
|
+
reorderPoint?: number | undefined;
|
|
119
|
+
itemId: import("convex/values").GenericId<"inventoryItems">;
|
|
120
|
+
}, Promise<{
|
|
121
|
+
success: boolean;
|
|
122
|
+
}>>;
|
|
123
|
+
/**
|
|
124
|
+
* Delete inventory item (soft delete, admin only)
|
|
125
|
+
*/
|
|
126
|
+
export declare const deleteItem: import("convex/server").RegisteredMutation<"public", {
|
|
127
|
+
itemId: import("convex/values").GenericId<"inventoryItems">;
|
|
128
|
+
}, Promise<{
|
|
129
|
+
success: boolean;
|
|
130
|
+
}>>;
|
|
131
|
+
//# sourceMappingURL=inventory.d.ts.map
|
package/convex/loyalty.d.ts
CHANGED
|
@@ -58,10 +58,6 @@ export declare const getAllLoyaltyPoints: import("convex/server").RegisteredQuer
|
|
|
58
58
|
cursor: string | null;
|
|
59
59
|
};
|
|
60
60
|
}, Promise<{
|
|
61
|
-
page: never[];
|
|
62
|
-
isDone: boolean;
|
|
63
|
-
continueCursor: null;
|
|
64
|
-
} | {
|
|
65
61
|
page: {
|
|
66
62
|
customer: {
|
|
67
63
|
_id: import("convex/values").GenericId<"users">;
|
package/convex/orders.d.ts
CHANGED
|
@@ -130,8 +130,9 @@ export declare const getPending: import("convex/server").RegisteredQuery<"public
|
|
|
130
130
|
deliveryRoom?: string | undefined;
|
|
131
131
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
132
132
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
133
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
133
134
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
134
|
-
status: "
|
|
135
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
135
136
|
createdAt: number;
|
|
136
137
|
isDeleted: boolean;
|
|
137
138
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -214,8 +215,9 @@ export declare const getAttendants: import("convex/server").RegisteredQuery<"pub
|
|
|
214
215
|
* Supports usePaginatedQuery for infinite scroll
|
|
215
216
|
*/
|
|
216
217
|
export declare const getOrders: import("convex/server").RegisteredQuery<"public", {
|
|
217
|
-
status?: "
|
|
218
|
+
status?: "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered" | undefined;
|
|
218
219
|
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
220
|
+
orderType?: "walk_in" | "online" | undefined;
|
|
219
221
|
startDate?: number | undefined;
|
|
220
222
|
endDate?: number | undefined;
|
|
221
223
|
paginationOpts: {
|
|
@@ -245,8 +247,9 @@ export declare const getOrders: import("convex/server").RegisteredQuery<"public"
|
|
|
245
247
|
deliveryRoom?: string | undefined;
|
|
246
248
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
247
249
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
250
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
248
251
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
249
|
-
status: "
|
|
252
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
250
253
|
createdAt: number;
|
|
251
254
|
isDeleted: boolean;
|
|
252
255
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -479,7 +482,7 @@ export declare const createFirstSuperAdmin: import("convex/server").RegisteredMu
|
|
|
479
482
|
export declare const updateOrderStatus: import("convex/server").RegisteredMutation<"public", {
|
|
480
483
|
notes?: string | undefined;
|
|
481
484
|
orderId: import("convex/values").GenericId<"orders">;
|
|
482
|
-
newStatus: "
|
|
485
|
+
newStatus: "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
483
486
|
}, Promise<import("convex/values").GenericId<"orders">>>;
|
|
484
487
|
/**
|
|
485
488
|
* Admin: Delete order (soft delete)
|
|
@@ -523,8 +526,9 @@ export declare const getOrderDetails: import("convex/server").RegisteredQuery<"p
|
|
|
523
526
|
deliveryRoom?: string | undefined;
|
|
524
527
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
525
528
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
529
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
526
530
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
527
|
-
status: "
|
|
531
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
528
532
|
createdAt: number;
|
|
529
533
|
isDeleted: boolean;
|
|
530
534
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -572,8 +576,9 @@ export declare const getByOrderNumber: import("convex/server").RegisteredQuery<"
|
|
|
572
576
|
deliveryRoom?: string | undefined;
|
|
573
577
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
574
578
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
579
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
575
580
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
576
|
-
status: "
|
|
581
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
577
582
|
createdAt: number;
|
|
578
583
|
isDeleted: boolean;
|
|
579
584
|
branchId: import("convex/values").GenericId<"branches">;
|
package/convex/payments.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ export declare const getByOrder: import("convex/server").RegisteredQuery<"public
|
|
|
15
15
|
gatewayResponse?: string | undefined;
|
|
16
16
|
completedAt?: number | undefined;
|
|
17
17
|
processedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
18
|
-
status: "
|
|
18
|
+
status: "completed" | "pending" | "failed" | "refunded" | "processing";
|
|
19
19
|
createdAt: number;
|
|
20
20
|
isDeleted: boolean;
|
|
21
21
|
customerId: import("convex/values").GenericId<"users">;
|
|
@@ -57,8 +57,9 @@ export declare const getByCustomer: import("convex/server").RegisteredQuery<"pub
|
|
|
57
57
|
deliveryRoom?: string | undefined;
|
|
58
58
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
59
59
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
60
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
60
61
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
61
|
-
status: "
|
|
62
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
62
63
|
createdAt: number;
|
|
63
64
|
isDeleted: boolean;
|
|
64
65
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -88,7 +89,7 @@ export declare const getByCustomer: import("convex/server").RegisteredQuery<"pub
|
|
|
88
89
|
gatewayResponse?: string | undefined;
|
|
89
90
|
completedAt?: number | undefined;
|
|
90
91
|
processedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
91
|
-
status: "
|
|
92
|
+
status: "completed" | "pending" | "failed" | "refunded" | "processing";
|
|
92
93
|
createdAt: number;
|
|
93
94
|
isDeleted: boolean;
|
|
94
95
|
customerId: import("convex/values").GenericId<"users">;
|
|
@@ -146,7 +147,7 @@ export declare const refund: import("convex/server").RegisteredMutation<"public"
|
|
|
146
147
|
* Supports usePaginatedQuery for infinite scroll
|
|
147
148
|
*/
|
|
148
149
|
export declare const getTransactionHistory: import("convex/server").RegisteredQuery<"public", {
|
|
149
|
-
status?: "
|
|
150
|
+
status?: "completed" | "pending" | "failed" | "refunded" | "processing" | undefined;
|
|
150
151
|
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
151
152
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
152
153
|
startDate?: number | undefined;
|
|
@@ -179,8 +180,9 @@ export declare const getTransactionHistory: import("convex/server").RegisteredQu
|
|
|
179
180
|
deliveryRoom?: string | undefined;
|
|
180
181
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
181
182
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
183
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
182
184
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
183
|
-
status: "
|
|
185
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
184
186
|
createdAt: number;
|
|
185
187
|
isDeleted: boolean;
|
|
186
188
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -248,7 +250,7 @@ export declare const getTransactionHistory: import("convex/server").RegisteredQu
|
|
|
248
250
|
gatewayResponse?: string | undefined;
|
|
249
251
|
completedAt?: number | undefined;
|
|
250
252
|
processedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
251
|
-
status: "
|
|
253
|
+
status: "completed" | "pending" | "failed" | "refunded" | "processing";
|
|
252
254
|
createdAt: number;
|
|
253
255
|
isDeleted: boolean;
|
|
254
256
|
customerId: import("convex/values").GenericId<"users">;
|
package/convex/schema.d.ts
CHANGED
|
@@ -196,8 +196,9 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
196
196
|
deliveryRoom?: string | undefined;
|
|
197
197
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
198
198
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
199
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
199
200
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
200
|
-
status: "
|
|
201
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
201
202
|
createdAt: number;
|
|
202
203
|
isDeleted: boolean;
|
|
203
204
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -244,13 +245,14 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
244
245
|
deliveryFee: import("convex/values").VFloat64<number, "required">;
|
|
245
246
|
totalPrice: import("convex/values").VFloat64<number, "required">;
|
|
246
247
|
finalPrice: import("convex/values").VFloat64<number, "required">;
|
|
247
|
-
status: import("convex/values").VUnion<"
|
|
248
|
+
status: import("convex/values").VUnion<"pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered", [import("convex/values").VLiteral<"pending_dropoff", "required">, import("convex/values").VLiteral<"checked_in", "required">, import("convex/values").VLiteral<"sorting", "required">, import("convex/values").VLiteral<"washing", "required">, import("convex/values").VLiteral<"drying", "required">, import("convex/values").VLiteral<"folding", "required">, import("convex/values").VLiteral<"ready", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"cancelled", "required">, import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"ready_for_pickup", "required">, import("convex/values").VLiteral<"delivered", "required">], "required", never>;
|
|
248
249
|
paymentStatus: import("convex/values").VUnion<"pending" | "paid" | "failed" | "refunded", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"paid", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"refunded", "required">], "required", never>;
|
|
249
250
|
paymentMethod: import("convex/values").VUnion<"mobile_money" | "card" | "cash" | undefined, [import("convex/values").VLiteral<"mobile_money", "required">, import("convex/values").VLiteral<"card", "required">, import("convex/values").VLiteral<"cash", "required">], "optional", never>;
|
|
250
251
|
paymentId: import("convex/values").VId<import("convex/values").GenericId<"payments"> | undefined, "optional">;
|
|
251
252
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
252
253
|
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
253
254
|
createdBy: import("convex/values").VId<import("convex/values").GenericId<"attendants"> | undefined, "optional">;
|
|
255
|
+
assignedTo: import("convex/values").VId<import("convex/values").GenericId<"attendants"> | undefined, "optional">;
|
|
254
256
|
fulfilledBy: import("convex/values").VId<import("convex/values").GenericId<"attendants"> | undefined, "optional">;
|
|
255
257
|
statusHistory: import("convex/values").VArray<{
|
|
256
258
|
notes?: string | undefined;
|
|
@@ -272,7 +274,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
272
274
|
notes: import("convex/values").VString<string | undefined, "optional">;
|
|
273
275
|
}, "required", "status" | "notes" | "changedAt" | "changedBy" | "changedByAdmin">, "required">;
|
|
274
276
|
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
275
|
-
}, "required", "status" | "createdAt" | "isDeleted" | "branchId" | "createdBy" | "deliveryFee" | "customerId" | "customerPhoneNumber" | "customerEmail" | "orderNumber" | "orderType" | "serviceType" | "estimatedWeight" | "actualWeight" | "itemCount" | "estimatedLoads" | "whitesSeparate" | "bagCardNumber" | "notes" | "isDelivery" | "deliveryAddress" | "deliveryPhoneNumber" | "deliveryHall" | "deliveryRoom" | "basePrice" | "totalPrice" | "finalPrice" | "paymentStatus" | "paymentMethod" | "paymentId" | "updatedAt" | "fulfilledBy" | "statusHistory">, {
|
|
277
|
+
}, "required", "status" | "createdAt" | "isDeleted" | "branchId" | "createdBy" | "deliveryFee" | "customerId" | "customerPhoneNumber" | "customerEmail" | "orderNumber" | "orderType" | "serviceType" | "estimatedWeight" | "actualWeight" | "itemCount" | "estimatedLoads" | "whitesSeparate" | "bagCardNumber" | "notes" | "isDelivery" | "deliveryAddress" | "deliveryPhoneNumber" | "deliveryHall" | "deliveryRoom" | "basePrice" | "totalPrice" | "finalPrice" | "paymentStatus" | "paymentMethod" | "paymentId" | "updatedAt" | "assignedTo" | "fulfilledBy" | "statusHistory">, {
|
|
276
278
|
by_customer: ["customerId", "_creationTime"];
|
|
277
279
|
by_branch: ["branchId", "_creationTime"];
|
|
278
280
|
by_status: ["status", "_creationTime"];
|
|
@@ -287,7 +289,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
287
289
|
gatewayResponse?: string | undefined;
|
|
288
290
|
completedAt?: number | undefined;
|
|
289
291
|
processedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
290
|
-
status: "
|
|
292
|
+
status: "completed" | "pending" | "failed" | "refunded" | "processing";
|
|
291
293
|
createdAt: number;
|
|
292
294
|
isDeleted: boolean;
|
|
293
295
|
customerId: import("convex/values").GenericId<"users">;
|
|
@@ -301,7 +303,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
301
303
|
amount: import("convex/values").VFloat64<number, "required">;
|
|
302
304
|
currency: import("convex/values").VString<string, "required">;
|
|
303
305
|
paymentMethod: import("convex/values").VUnion<"mobile_money" | "card" | "cash", [import("convex/values").VLiteral<"mobile_money", "required">, import("convex/values").VLiteral<"card", "required">, import("convex/values").VLiteral<"cash", "required">], "required", never>;
|
|
304
|
-
status: import("convex/values").VUnion<"
|
|
306
|
+
status: import("convex/values").VUnion<"completed" | "pending" | "failed" | "refunded" | "processing", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"processing", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"refunded", "required">], "required", never>;
|
|
305
307
|
gatewayTransactionId: import("convex/values").VString<string | undefined, "optional">;
|
|
306
308
|
gatewayResponse: import("convex/values").VString<string | undefined, "optional">;
|
|
307
309
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
@@ -774,7 +776,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
774
776
|
biometricEnrollments: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
775
777
|
enrolledAt?: number | undefined;
|
|
776
778
|
deviceInfo?: string | undefined;
|
|
777
|
-
status: "
|
|
779
|
+
status: "completed" | "pending" | "in_progress" | "failed" | "expired";
|
|
778
780
|
isDeleted: boolean;
|
|
779
781
|
branchId: import("convex/values").GenericId<"branches">;
|
|
780
782
|
enrollmentTokenHash: string;
|
|
@@ -793,7 +795,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
793
795
|
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
794
796
|
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
795
797
|
enrollmentTokenHash: import("convex/values").VString<string, "required">;
|
|
796
|
-
status: import("convex/values").VUnion<"
|
|
798
|
+
status: import("convex/values").VUnion<"completed" | "pending" | "in_progress" | "failed" | "expired", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"in_progress", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"expired", "required">, import("convex/values").VLiteral<"failed", "required">], "required", never>;
|
|
797
799
|
tokenCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
798
800
|
tokenExpiresAt: import("convex/values").VFloat64<number, "required">;
|
|
799
801
|
enrolledAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
@@ -903,13 +905,13 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
903
905
|
attendantId: import("convex/values").GenericId<"attendants">;
|
|
904
906
|
attendanceId: import("convex/values").GenericId<"attendanceLogs">;
|
|
905
907
|
actionType: string;
|
|
906
|
-
actionStatus: "
|
|
908
|
+
actionStatus: "completed" | "cancelled" | "pending" | "failed";
|
|
907
909
|
}, {
|
|
908
910
|
attendanceId: import("convex/values").VId<import("convex/values").GenericId<"attendanceLogs">, "required">;
|
|
909
911
|
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
910
912
|
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
911
913
|
actionType: import("convex/values").VString<string, "required">;
|
|
912
|
-
actionStatus: import("convex/values").VUnion<"
|
|
914
|
+
actionStatus: import("convex/values").VUnion<"completed" | "cancelled" | "pending" | "failed", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"completed", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"cancelled", "required">], "required", never>;
|
|
913
915
|
entityType: import("convex/values").VString<string | undefined, "optional">;
|
|
914
916
|
entityId: import("convex/values").VId<import("convex/values").GenericId<"orders"> | undefined, "optional">;
|
|
915
917
|
actionData: import("convex/values").VString<string | undefined, "optional">;
|
|
@@ -928,6 +930,108 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
928
930
|
by_created_at: ["createdAt", "_creationTime"];
|
|
929
931
|
by_attendance_created: ["attendanceId", "createdAt", "_creationTime"];
|
|
930
932
|
}, {}, {}>;
|
|
933
|
+
systemSettings: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
934
|
+
isDeleted: boolean;
|
|
935
|
+
updatedAt: number;
|
|
936
|
+
businessName: string;
|
|
937
|
+
contactPhone: string;
|
|
938
|
+
contactEmail: string;
|
|
939
|
+
notifyNewOrders: boolean;
|
|
940
|
+
notifyCompletedOrders: boolean;
|
|
941
|
+
requireBiometricPayment: boolean;
|
|
942
|
+
autoLogoutMinutes: number;
|
|
943
|
+
updatedBy: import("convex/values").GenericId<"admins">;
|
|
944
|
+
}, {
|
|
945
|
+
businessName: import("convex/values").VString<string, "required">;
|
|
946
|
+
contactPhone: import("convex/values").VString<string, "required">;
|
|
947
|
+
contactEmail: import("convex/values").VString<string, "required">;
|
|
948
|
+
notifyNewOrders: import("convex/values").VBoolean<boolean, "required">;
|
|
949
|
+
notifyCompletedOrders: import("convex/values").VBoolean<boolean, "required">;
|
|
950
|
+
requireBiometricPayment: import("convex/values").VBoolean<boolean, "required">;
|
|
951
|
+
autoLogoutMinutes: import("convex/values").VFloat64<number, "required">;
|
|
952
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
953
|
+
updatedBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
|
|
954
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
955
|
+
}, "required", "isDeleted" | "updatedAt" | "businessName" | "contactPhone" | "contactEmail" | "notifyNewOrders" | "notifyCompletedOrders" | "requireBiometricPayment" | "autoLogoutMinutes" | "updatedBy">, {}, {}, {}>;
|
|
956
|
+
services: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
957
|
+
description?: string | undefined;
|
|
958
|
+
updatedBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
959
|
+
imageStorageId?: import("convex/values").GenericId<"_storage"> | undefined;
|
|
960
|
+
imageUrl?: string | undefined;
|
|
961
|
+
name: string;
|
|
962
|
+
createdAt: number;
|
|
963
|
+
isDeleted: boolean;
|
|
964
|
+
isActive: boolean;
|
|
965
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
966
|
+
code: string;
|
|
967
|
+
basePrice: number;
|
|
968
|
+
updatedAt: number;
|
|
969
|
+
pricingType: "per_kg" | "per_load";
|
|
970
|
+
}, {
|
|
971
|
+
name: import("convex/values").VString<string, "required">;
|
|
972
|
+
code: import("convex/values").VString<string, "required">;
|
|
973
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
974
|
+
imageStorageId: import("convex/values").VId<import("convex/values").GenericId<"_storage"> | undefined, "optional">;
|
|
975
|
+
imageUrl: import("convex/values").VString<string | undefined, "optional">;
|
|
976
|
+
basePrice: import("convex/values").VFloat64<number, "required">;
|
|
977
|
+
pricingType: import("convex/values").VUnion<"per_kg" | "per_load", [import("convex/values").VLiteral<"per_kg", "required">, import("convex/values").VLiteral<"per_load", "required">], "required", never>;
|
|
978
|
+
isActive: import("convex/values").VBoolean<boolean, "required">;
|
|
979
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
980
|
+
createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
|
|
981
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
982
|
+
updatedBy: import("convex/values").VId<import("convex/values").GenericId<"admins"> | undefined, "optional">;
|
|
983
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
984
|
+
}, "required", "name" | "createdAt" | "isDeleted" | "isActive" | "createdBy" | "code" | "basePrice" | "updatedAt" | "description" | "updatedBy" | "imageStorageId" | "imageUrl" | "pricingType">, {
|
|
985
|
+
by_code: ["code", "_creationTime"];
|
|
986
|
+
by_active: ["isActive", "_creationTime"];
|
|
987
|
+
}, {}, {}>;
|
|
988
|
+
inventoryItems: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
989
|
+
createdBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
990
|
+
description?: string | undefined;
|
|
991
|
+
updatedBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
992
|
+
orderedAt?: number | undefined;
|
|
993
|
+
expectedArrivalDate?: number | undefined;
|
|
994
|
+
arrivalDate?: number | undefined;
|
|
995
|
+
orderQuantity?: number | undefined;
|
|
996
|
+
lastRestockedAt?: number | undefined;
|
|
997
|
+
name: string;
|
|
998
|
+
status: "low" | "critical" | "ok" | "ordered";
|
|
999
|
+
createdAt: number;
|
|
1000
|
+
isDeleted: boolean;
|
|
1001
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
1002
|
+
updatedAt: number;
|
|
1003
|
+
category: "cleaning_supplies" | "add_ons" | "facility" | "retail" | "operational";
|
|
1004
|
+
unit: string;
|
|
1005
|
+
currentStock: number;
|
|
1006
|
+
maxStock: number;
|
|
1007
|
+
minStock: number;
|
|
1008
|
+
reorderPoint: number;
|
|
1009
|
+
}, {
|
|
1010
|
+
name: import("convex/values").VString<string, "required">;
|
|
1011
|
+
category: import("convex/values").VUnion<"cleaning_supplies" | "add_ons" | "facility" | "retail" | "operational", [import("convex/values").VLiteral<"cleaning_supplies", "required">, import("convex/values").VLiteral<"add_ons", "required">, import("convex/values").VLiteral<"facility", "required">, import("convex/values").VLiteral<"retail", "required">, import("convex/values").VLiteral<"operational", "required">], "required", never>;
|
|
1012
|
+
unit: import("convex/values").VString<string, "required">;
|
|
1013
|
+
description: import("convex/values").VString<string | undefined, "optional">;
|
|
1014
|
+
currentStock: import("convex/values").VFloat64<number, "required">;
|
|
1015
|
+
maxStock: import("convex/values").VFloat64<number, "required">;
|
|
1016
|
+
minStock: import("convex/values").VFloat64<number, "required">;
|
|
1017
|
+
reorderPoint: import("convex/values").VFloat64<number, "required">;
|
|
1018
|
+
status: import("convex/values").VUnion<"low" | "critical" | "ok" | "ordered", [import("convex/values").VLiteral<"critical", "required">, import("convex/values").VLiteral<"low", "required">, import("convex/values").VLiteral<"ok", "required">, import("convex/values").VLiteral<"ordered", "required">], "required", never>;
|
|
1019
|
+
orderedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1020
|
+
expectedArrivalDate: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1021
|
+
arrivalDate: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1022
|
+
orderQuantity: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1023
|
+
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
1024
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
1025
|
+
createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins"> | undefined, "optional">;
|
|
1026
|
+
updatedAt: import("convex/values").VFloat64<number, "required">;
|
|
1027
|
+
updatedBy: import("convex/values").VId<import("convex/values").GenericId<"admins"> | undefined, "optional">;
|
|
1028
|
+
lastRestockedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
1029
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
1030
|
+
}, "required", "name" | "status" | "createdAt" | "isDeleted" | "branchId" | "createdBy" | "updatedAt" | "description" | "updatedBy" | "category" | "unit" | "currentStock" | "maxStock" | "minStock" | "reorderPoint" | "orderedAt" | "expectedArrivalDate" | "arrivalDate" | "orderQuantity" | "lastRestockedAt">, {
|
|
1031
|
+
by_branch: ["branchId", "_creationTime"];
|
|
1032
|
+
by_branch_status: ["branchId", "status", "_creationTime"];
|
|
1033
|
+
by_branch_category: ["branchId", "category", "_creationTime"];
|
|
1034
|
+
}, {}, {}>;
|
|
931
1035
|
}, true>;
|
|
932
1036
|
export default _default;
|
|
933
1037
|
//# sourceMappingURL=schema.d.ts.map
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Services Functions
|
|
3
|
+
*
|
|
4
|
+
* Handles service information queries for public access (customers, attendants).
|
|
5
|
+
* Admin functions are in admin.ts
|
|
6
|
+
*/
|
|
7
|
+
/**
|
|
8
|
+
* Get all active services
|
|
9
|
+
* Public query - can be used by customers, attendants, and guests
|
|
10
|
+
*/
|
|
11
|
+
export declare const getActive: import("convex/server").RegisteredQuery<"public", {}, Promise<{
|
|
12
|
+
_id: import("convex/values").GenericId<"services">;
|
|
13
|
+
name: string;
|
|
14
|
+
code: string;
|
|
15
|
+
description: string | undefined;
|
|
16
|
+
imageUrl: string | undefined;
|
|
17
|
+
basePrice: number;
|
|
18
|
+
pricingType: "per_kg" | "per_load";
|
|
19
|
+
isActive: boolean;
|
|
20
|
+
}[]>>;
|
|
21
|
+
/**
|
|
22
|
+
* Seed default services
|
|
23
|
+
* Public mutation - can be called without authentication to initialize services
|
|
24
|
+
* Idempotent - won't create duplicates if services already exist
|
|
25
|
+
*/
|
|
26
|
+
export declare const seedDefaultServices: import("convex/server").RegisteredMutation<"public", {}, Promise<{
|
|
27
|
+
success: boolean;
|
|
28
|
+
created: string[];
|
|
29
|
+
skipped: string[];
|
|
30
|
+
message: string;
|
|
31
|
+
}>>;
|
|
32
|
+
//# sourceMappingURL=services.d.ts.map
|
package/convex/stations.d.ts
CHANGED
|
@@ -118,7 +118,8 @@ export declare const getActiveStationSession: import("convex/server").Registered
|
|
|
118
118
|
* Get station orders with pagination and filtering
|
|
119
119
|
*/
|
|
120
120
|
export declare const getStationOrders: import("convex/server").RegisteredQuery<"public", {
|
|
121
|
-
status?: "
|
|
121
|
+
status?: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered" | undefined;
|
|
122
|
+
orderType?: "walk_in" | "online" | undefined;
|
|
122
123
|
paginationOpts: {
|
|
123
124
|
id?: number;
|
|
124
125
|
endCursor?: string | null;
|
|
@@ -136,6 +137,11 @@ export declare const getStationOrders: import("convex/server").RegisteredQuery<"
|
|
|
136
137
|
phoneNumber: string;
|
|
137
138
|
email: string | undefined;
|
|
138
139
|
} | null;
|
|
140
|
+
assignedAttendant: {
|
|
141
|
+
_id: any;
|
|
142
|
+
name: any;
|
|
143
|
+
email: any;
|
|
144
|
+
} | null;
|
|
139
145
|
statusHistory: ({
|
|
140
146
|
changedBy: {
|
|
141
147
|
type: "attendant";
|
|
@@ -178,8 +184,9 @@ export declare const getStationOrders: import("convex/server").RegisteredQuery<"
|
|
|
178
184
|
deliveryRoom?: string | undefined;
|
|
179
185
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
180
186
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
187
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
181
188
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
182
|
-
status: "
|
|
189
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
183
190
|
createdAt: number;
|
|
184
191
|
isDeleted: boolean;
|
|
185
192
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -260,8 +267,9 @@ export declare const getStationOrderDetails: import("convex/server").RegisteredQ
|
|
|
260
267
|
deliveryRoom?: string | undefined;
|
|
261
268
|
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
262
269
|
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
270
|
+
assignedTo?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
263
271
|
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
264
|
-
status: "
|
|
272
|
+
status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
265
273
|
createdAt: number;
|
|
266
274
|
isDeleted: boolean;
|
|
267
275
|
branchId: import("convex/values").GenericId<"branches">;
|
|
@@ -287,7 +295,24 @@ export declare const updateStationOrderStatus: import("convex/server").Registere
|
|
|
287
295
|
attendantId?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
288
296
|
attendanceId?: import("convex/values").GenericId<"attendanceLogs"> | undefined;
|
|
289
297
|
orderId: import("convex/values").GenericId<"orders">;
|
|
290
|
-
newStatus: "
|
|
298
|
+
newStatus: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
|
|
299
|
+
stationToken: string;
|
|
300
|
+
}, Promise<{
|
|
301
|
+
success: boolean;
|
|
302
|
+
orderId: import("convex/values").GenericId<"orders">;
|
|
303
|
+
}>>;
|
|
304
|
+
/**
|
|
305
|
+
* Check in online order (convert pending_dropoff to checked_in with weight)
|
|
306
|
+
* This is used for online order intake at the station
|
|
307
|
+
*/
|
|
308
|
+
export declare const checkInOnlineOrder: import("convex/server").RegisteredMutation<"public", {
|
|
309
|
+
itemCount?: number | undefined;
|
|
310
|
+
notes?: string | undefined;
|
|
311
|
+
attendantId?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
312
|
+
attendanceId?: import("convex/values").GenericId<"attendanceLogs"> | undefined;
|
|
313
|
+
actualWeight: number;
|
|
314
|
+
bagCardNumber: string;
|
|
315
|
+
orderId: import("convex/values").GenericId<"orders">;
|
|
291
316
|
stationToken: string;
|
|
292
317
|
}, Promise<{
|
|
293
318
|
success: boolean;
|
|
@@ -548,4 +573,39 @@ export declare const markAllStationNotificationsAsRead: import("convex/server").
|
|
|
548
573
|
success: boolean;
|
|
549
574
|
count: number;
|
|
550
575
|
}>>;
|
|
576
|
+
/**
|
|
577
|
+
* Get active bag numbers for a branch
|
|
578
|
+
* Returns all bag numbers currently assigned to active orders (not completed or cancelled)
|
|
579
|
+
*/
|
|
580
|
+
export declare const getActiveBagNumbers: import("convex/server").RegisteredQuery<"public", {
|
|
581
|
+
stationToken: string;
|
|
582
|
+
}, Promise<string[]>>;
|
|
583
|
+
/**
|
|
584
|
+
* Create walk-in order
|
|
585
|
+
* Creates a new order for a walk-in customer with bag number assignment
|
|
586
|
+
*/
|
|
587
|
+
export declare const createWalkInOrder: import("convex/server").RegisteredMutation<"public", {
|
|
588
|
+
customerEmail?: string | undefined;
|
|
589
|
+
itemCount?: number | undefined;
|
|
590
|
+
notes?: string | undefined;
|
|
591
|
+
isDelivery?: boolean | undefined;
|
|
592
|
+
deliveryAddress?: string | undefined;
|
|
593
|
+
deliveryPhoneNumber?: string | undefined;
|
|
594
|
+
deliveryHall?: string | undefined;
|
|
595
|
+
deliveryRoom?: string | undefined;
|
|
596
|
+
attendantId?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
597
|
+
attendanceId?: import("convex/values").GenericId<"attendanceLogs"> | undefined;
|
|
598
|
+
customerId: import("convex/values").GenericId<"users">;
|
|
599
|
+
serviceType: "wash_only" | "wash_and_dry" | "dry_only";
|
|
600
|
+
bagCardNumber: string;
|
|
601
|
+
customerName: string;
|
|
602
|
+
stationToken: string;
|
|
603
|
+
customerPhone: string;
|
|
604
|
+
weight: number;
|
|
605
|
+
}, Promise<{
|
|
606
|
+
success: boolean;
|
|
607
|
+
orderId: import("convex/values").GenericId<"orders">;
|
|
608
|
+
orderNumber: string;
|
|
609
|
+
bagCardNumber: string;
|
|
610
|
+
}>>;
|
|
551
611
|
//# sourceMappingURL=stations.d.ts.map
|