@devlider001/washlab-backend 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/convex/_generated/api.d.ts +6 -0
- package/convex/admin.d.ts +165 -10
- package/convex/attendants.d.ts +177 -6
- package/convex/customers.d.ts +59 -3
- package/convex/lib/auth.d.ts +42 -2
- package/convex/lib/biometricComparison.d.ts +38 -0
- package/convex/lib/biometricEncryption.d.ts +49 -0
- package/convex/lib/tokenHashing.d.ts +26 -0
- package/convex/loyalty.d.ts +131 -7
- package/convex/notifications.d.ts +25 -2
- package/convex/orders.d.ts +424 -215
- package/convex/payments.d.ts +159 -19
- package/convex/schema.d.ts +346 -15
- package/convex/vouchers.d.ts +5 -5
- package/package.json +1 -1
|
@@ -18,6 +18,9 @@ import type * as customers from "../customers.js";
|
|
|
18
18
|
import type * as http from "../http.js";
|
|
19
19
|
import type * as lib_audit from "../lib/audit.js";
|
|
20
20
|
import type * as lib_auth from "../lib/auth.js";
|
|
21
|
+
import type * as lib_biometricComparison from "../lib/biometricComparison.js";
|
|
22
|
+
import type * as lib_biometricEncryption from "../lib/biometricEncryption.js";
|
|
23
|
+
import type * as lib_tokenHashing from "../lib/tokenHashing.js";
|
|
21
24
|
import type * as lib_utils from "../lib/utils.js";
|
|
22
25
|
import type * as loyalty from "../loyalty.js";
|
|
23
26
|
import type * as notifications from "../notifications.js";
|
|
@@ -43,6 +46,9 @@ declare const fullApi: ApiFromModules<{
|
|
|
43
46
|
http: typeof http;
|
|
44
47
|
"lib/audit": typeof lib_audit;
|
|
45
48
|
"lib/auth": typeof lib_auth;
|
|
49
|
+
"lib/biometricComparison": typeof lib_biometricComparison;
|
|
50
|
+
"lib/biometricEncryption": typeof lib_biometricEncryption;
|
|
51
|
+
"lib/tokenHashing": typeof lib_tokenHashing;
|
|
46
52
|
"lib/utils": typeof lib_utils;
|
|
47
53
|
loyalty: typeof loyalty;
|
|
48
54
|
notifications: typeof notifications;
|
package/convex/admin.d.ts
CHANGED
|
@@ -25,8 +25,14 @@ export declare const getCurrentUser: import("convex/server").RegisteredQuery<"pu
|
|
|
25
25
|
*/
|
|
26
26
|
export declare const getBranches: import("convex/server").RegisteredQuery<"public", {
|
|
27
27
|
includeInactive?: boolean | undefined;
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
paginationOpts: {
|
|
29
|
+
id?: number;
|
|
30
|
+
endCursor?: string | null;
|
|
31
|
+
maximumRowsRead?: number;
|
|
32
|
+
maximumBytesRead?: number;
|
|
33
|
+
numItems: number;
|
|
34
|
+
cursor: string | null;
|
|
35
|
+
};
|
|
30
36
|
}, Promise<{
|
|
31
37
|
page: {
|
|
32
38
|
_id: import("convex/values").GenericId<"branches">;
|
|
@@ -37,13 +43,13 @@ export declare const getBranches: import("convex/server").RegisteredQuery<"publi
|
|
|
37
43
|
createdAt: number;
|
|
38
44
|
isDeleted: boolean;
|
|
39
45
|
isActive: boolean;
|
|
46
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
40
47
|
code: string;
|
|
41
48
|
address: string;
|
|
42
49
|
city: string;
|
|
43
50
|
country: string;
|
|
44
51
|
pricingPerKg: number;
|
|
45
52
|
deliveryFee: number;
|
|
46
|
-
createdBy: import("convex/values").GenericId<"admins">;
|
|
47
53
|
}[];
|
|
48
54
|
isDone: boolean;
|
|
49
55
|
continueCursor: string;
|
|
@@ -62,13 +68,13 @@ export declare const getBranchByCode: import("convex/server").RegisteredQuery<"p
|
|
|
62
68
|
createdAt: number;
|
|
63
69
|
isDeleted: boolean;
|
|
64
70
|
isActive: boolean;
|
|
71
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
65
72
|
code: string;
|
|
66
73
|
address: string;
|
|
67
74
|
city: string;
|
|
68
75
|
country: string;
|
|
69
76
|
pricingPerKg: number;
|
|
70
77
|
deliveryFee: number;
|
|
71
|
-
createdBy: import("convex/values").GenericId<"admins">;
|
|
72
78
|
} | null>>;
|
|
73
79
|
/**
|
|
74
80
|
* Get single branch by ID
|
|
@@ -84,13 +90,13 @@ export declare const getBranch: import("convex/server").RegisteredQuery<"public"
|
|
|
84
90
|
createdAt: number;
|
|
85
91
|
isDeleted: boolean;
|
|
86
92
|
isActive: boolean;
|
|
93
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
87
94
|
code: string;
|
|
88
95
|
address: string;
|
|
89
96
|
city: string;
|
|
90
97
|
country: string;
|
|
91
98
|
pricingPerKg: number;
|
|
92
99
|
deliveryFee: number;
|
|
93
|
-
createdBy: import("convex/values").GenericId<"admins">;
|
|
94
100
|
} | null>>;
|
|
95
101
|
/**
|
|
96
102
|
* Get all attendants - Paginated
|
|
@@ -99,22 +105,42 @@ export declare const getBranch: import("convex/server").RegisteredQuery<"public"
|
|
|
99
105
|
export declare const getAttendants: import("convex/server").RegisteredQuery<"public", {
|
|
100
106
|
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
101
107
|
includeInactive?: boolean | undefined;
|
|
102
|
-
cursor?: string | undefined;
|
|
103
108
|
numItems?: number | undefined;
|
|
109
|
+
cursor?: string | undefined;
|
|
104
110
|
}, Promise<{
|
|
105
111
|
page: {
|
|
106
112
|
_id: import("convex/values").GenericId<"attendants">;
|
|
107
113
|
_creationTime: number;
|
|
114
|
+
clerkUserId?: string | undefined;
|
|
108
115
|
lastLoginAt?: number | undefined;
|
|
109
116
|
passcode?: string | undefined;
|
|
117
|
+
enrollmentTokenHash?: string | undefined;
|
|
118
|
+
enrollmentTokenExpiresAt?: number | undefined;
|
|
119
|
+
enrolledAt?: number | undefined;
|
|
120
|
+
enrolledBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
121
|
+
biometricTemplateHash?: string | undefined;
|
|
122
|
+
biometricDataEncrypted?: string | undefined;
|
|
123
|
+
biometricCaptureMetadata?: {
|
|
124
|
+
deviceInfo?: string | undefined;
|
|
125
|
+
captureType: "face" | "hand";
|
|
126
|
+
anglesCaptured: string[];
|
|
127
|
+
captureQuality: number;
|
|
128
|
+
livenessPassed: boolean;
|
|
129
|
+
captureTimestamp: number;
|
|
130
|
+
} | undefined;
|
|
131
|
+
lastVerificationAt?: number | undefined;
|
|
132
|
+
lastVerificationSuccess?: boolean | undefined;
|
|
133
|
+
verificationTimeoutAt?: number | undefined;
|
|
110
134
|
phoneNumber: string;
|
|
111
135
|
email: string;
|
|
112
136
|
name: string;
|
|
113
|
-
clerkUserId: string;
|
|
114
137
|
createdAt: number;
|
|
115
138
|
isDeleted: boolean;
|
|
116
139
|
branchId: import("convex/values").GenericId<"branches">;
|
|
117
140
|
isActive: boolean;
|
|
141
|
+
enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
|
|
142
|
+
consecutiveFailures: number;
|
|
143
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
118
144
|
}[];
|
|
119
145
|
isDone: boolean;
|
|
120
146
|
continueCursor: string;
|
|
@@ -126,15 +152,22 @@ export declare const getAttendants: import("convex/server").RegisteredQuery<"pub
|
|
|
126
152
|
export declare const getOrders: import("convex/server").RegisteredQuery<"public", {
|
|
127
153
|
status?: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled" | undefined;
|
|
128
154
|
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
129
|
-
cursor?: string | undefined;
|
|
130
|
-
numItems?: number | undefined;
|
|
131
155
|
startDate?: number | undefined;
|
|
132
156
|
endDate?: number | undefined;
|
|
157
|
+
paginationOpts: {
|
|
158
|
+
id?: number;
|
|
159
|
+
endCursor?: string | null;
|
|
160
|
+
maximumRowsRead?: number;
|
|
161
|
+
maximumBytesRead?: number;
|
|
162
|
+
numItems: number;
|
|
163
|
+
cursor: string | null;
|
|
164
|
+
};
|
|
133
165
|
}, Promise<{
|
|
134
166
|
page: {
|
|
135
167
|
_id: import("convex/values").GenericId<"orders">;
|
|
136
168
|
_creationTime: number;
|
|
137
169
|
createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
170
|
+
customerEmail?: string | undefined;
|
|
138
171
|
estimatedWeight?: number | undefined;
|
|
139
172
|
actualWeight?: number | undefined;
|
|
140
173
|
itemCount?: number | undefined;
|
|
@@ -167,9 +200,10 @@ export declare const getOrders: import("convex/server").RegisteredQuery<"public"
|
|
|
167
200
|
updatedAt: number;
|
|
168
201
|
statusHistory: {
|
|
169
202
|
notes?: string | undefined;
|
|
203
|
+
changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
204
|
+
changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
|
|
170
205
|
status: string;
|
|
171
206
|
changedAt: number;
|
|
172
|
-
changedBy: import("convex/values").GenericId<"attendants">;
|
|
173
207
|
}[];
|
|
174
208
|
}[];
|
|
175
209
|
isDone: boolean;
|
|
@@ -374,4 +408,125 @@ export declare const createFirstSuperAdmin: import("convex/server").RegisteredMu
|
|
|
374
408
|
name: string;
|
|
375
409
|
clerkUserId: string;
|
|
376
410
|
}, Promise<import("convex/values").GenericId<"admins">>>;
|
|
411
|
+
/**
|
|
412
|
+
* Admin: Update order status (admin can update any order)
|
|
413
|
+
*/
|
|
414
|
+
export declare const updateOrderStatus: import("convex/server").RegisteredMutation<"public", {
|
|
415
|
+
notes?: string | undefined;
|
|
416
|
+
orderId: import("convex/values").GenericId<"orders">;
|
|
417
|
+
newStatus: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
|
|
418
|
+
}, Promise<import("convex/values").GenericId<"orders">>>;
|
|
419
|
+
/**
|
|
420
|
+
* Admin: Delete order (soft delete)
|
|
421
|
+
*/
|
|
422
|
+
export declare const deleteOrder: import("convex/server").RegisteredMutation<"public", {
|
|
423
|
+
orderId: import("convex/values").GenericId<"orders">;
|
|
424
|
+
}, Promise<import("convex/values").GenericId<"orders">>>;
|
|
425
|
+
/**
|
|
426
|
+
* Admin: Get order details (includes full order information with customer and branch)
|
|
427
|
+
*/
|
|
428
|
+
export declare const getOrderDetails: import("convex/server").RegisteredQuery<"public", {
|
|
429
|
+
orderId: import("convex/values").GenericId<"orders">;
|
|
430
|
+
}, Promise<{
|
|
431
|
+
customer: {
|
|
432
|
+
_id: import("convex/values").GenericId<"users">;
|
|
433
|
+
name: string;
|
|
434
|
+
phoneNumber: string;
|
|
435
|
+
email: string | undefined;
|
|
436
|
+
} | null;
|
|
437
|
+
branch: {
|
|
438
|
+
_id: import("convex/values").GenericId<"branches">;
|
|
439
|
+
name: string;
|
|
440
|
+
code: string;
|
|
441
|
+
address: string;
|
|
442
|
+
city: string;
|
|
443
|
+
} | null;
|
|
444
|
+
_id: import("convex/values").GenericId<"orders">;
|
|
445
|
+
_creationTime: number;
|
|
446
|
+
createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
447
|
+
customerEmail?: string | undefined;
|
|
448
|
+
estimatedWeight?: number | undefined;
|
|
449
|
+
actualWeight?: number | undefined;
|
|
450
|
+
itemCount?: number | undefined;
|
|
451
|
+
estimatedLoads?: number | undefined;
|
|
452
|
+
whitesSeparate?: boolean | undefined;
|
|
453
|
+
bagCardNumber?: string | undefined;
|
|
454
|
+
notes?: string | undefined;
|
|
455
|
+
deliveryAddress?: string | undefined;
|
|
456
|
+
deliveryPhoneNumber?: string | undefined;
|
|
457
|
+
deliveryHall?: string | undefined;
|
|
458
|
+
deliveryRoom?: string | undefined;
|
|
459
|
+
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
460
|
+
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
461
|
+
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
462
|
+
status: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
|
|
463
|
+
createdAt: number;
|
|
464
|
+
isDeleted: boolean;
|
|
465
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
466
|
+
deliveryFee: number;
|
|
467
|
+
customerId: import("convex/values").GenericId<"users">;
|
|
468
|
+
customerPhoneNumber: string;
|
|
469
|
+
orderNumber: string;
|
|
470
|
+
orderType: "walk_in" | "online";
|
|
471
|
+
serviceType: "wash_only" | "wash_and_dry" | "dry_only";
|
|
472
|
+
isDelivery: boolean;
|
|
473
|
+
basePrice: number;
|
|
474
|
+
totalPrice: number;
|
|
475
|
+
finalPrice: number;
|
|
476
|
+
paymentStatus: "pending" | "paid" | "failed" | "refunded";
|
|
477
|
+
updatedAt: number;
|
|
478
|
+
statusHistory: {
|
|
479
|
+
notes?: string | undefined;
|
|
480
|
+
changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
481
|
+
changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
|
|
482
|
+
status: string;
|
|
483
|
+
changedAt: number;
|
|
484
|
+
}[];
|
|
485
|
+
} | null>>;
|
|
486
|
+
/**
|
|
487
|
+
* Create attendant enrollment (Admin)
|
|
488
|
+
* Generates enrollment link for attendant to complete biometric setup
|
|
489
|
+
*/
|
|
490
|
+
export declare const createAttendantEnrollment: import("convex/server").RegisteredMutation<"public", {
|
|
491
|
+
expiresInHours?: number | undefined;
|
|
492
|
+
phoneNumber: string;
|
|
493
|
+
email: string;
|
|
494
|
+
name: string;
|
|
495
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
496
|
+
}, Promise<{
|
|
497
|
+
attendantId: Id<"attendants">;
|
|
498
|
+
enrollmentToken: string;
|
|
499
|
+
enrollmentLink: string;
|
|
500
|
+
expiresAt: number;
|
|
501
|
+
}>>;
|
|
502
|
+
/**
|
|
503
|
+
* List attendant enrollments (Admin)
|
|
504
|
+
*/
|
|
505
|
+
export declare const listAttendantEnrollments: import("convex/server").RegisteredQuery<"public", {
|
|
506
|
+
status?: "active" | "suspended" | "invited" | "enrolling" | "locked" | undefined;
|
|
507
|
+
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
508
|
+
}, Promise<{
|
|
509
|
+
id: import("convex/values").GenericId<"attendants">;
|
|
510
|
+
name: string;
|
|
511
|
+
email: string;
|
|
512
|
+
phoneNumber: string;
|
|
513
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
514
|
+
enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
|
|
515
|
+
enrolledAt: number | undefined;
|
|
516
|
+
enrollmentTokenExpiresAt: number | undefined;
|
|
517
|
+
lastVerificationAt: number | undefined;
|
|
518
|
+
consecutiveFailures: number;
|
|
519
|
+
createdAt: number;
|
|
520
|
+
}[]>>;
|
|
521
|
+
/**
|
|
522
|
+
* Resend enrollment link (Admin)
|
|
523
|
+
*/
|
|
524
|
+
export declare const resendEnrollmentLink: import("convex/server").RegisteredMutation<"public", {
|
|
525
|
+
expiresInHours?: number | undefined;
|
|
526
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
527
|
+
}, Promise<{
|
|
528
|
+
enrollmentToken: string;
|
|
529
|
+
enrollmentLink: string;
|
|
530
|
+
expiresAt: number;
|
|
531
|
+
}>>;
|
|
377
532
|
//# sourceMappingURL=admin.d.ts.map
|
package/convex/attendants.d.ts
CHANGED
|
@@ -11,16 +11,36 @@ export declare const getByBranch: import("convex/server").RegisteredQuery<"publi
|
|
|
11
11
|
}, Promise<{
|
|
12
12
|
_id: import("convex/values").GenericId<"attendants">;
|
|
13
13
|
_creationTime: number;
|
|
14
|
+
clerkUserId?: string | undefined;
|
|
14
15
|
lastLoginAt?: number | undefined;
|
|
15
16
|
passcode?: string | undefined;
|
|
17
|
+
enrollmentTokenHash?: string | undefined;
|
|
18
|
+
enrollmentTokenExpiresAt?: number | undefined;
|
|
19
|
+
enrolledAt?: number | undefined;
|
|
20
|
+
enrolledBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
21
|
+
biometricTemplateHash?: string | undefined;
|
|
22
|
+
biometricDataEncrypted?: string | undefined;
|
|
23
|
+
biometricCaptureMetadata?: {
|
|
24
|
+
deviceInfo?: string | undefined;
|
|
25
|
+
captureType: "face" | "hand";
|
|
26
|
+
anglesCaptured: string[];
|
|
27
|
+
captureQuality: number;
|
|
28
|
+
livenessPassed: boolean;
|
|
29
|
+
captureTimestamp: number;
|
|
30
|
+
} | undefined;
|
|
31
|
+
lastVerificationAt?: number | undefined;
|
|
32
|
+
lastVerificationSuccess?: boolean | undefined;
|
|
33
|
+
verificationTimeoutAt?: number | undefined;
|
|
16
34
|
phoneNumber: string;
|
|
17
35
|
email: string;
|
|
18
36
|
name: string;
|
|
19
|
-
clerkUserId: string;
|
|
20
37
|
createdAt: number;
|
|
21
38
|
isDeleted: boolean;
|
|
22
39
|
branchId: import("convex/values").GenericId<"branches">;
|
|
23
40
|
isActive: boolean;
|
|
41
|
+
enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
|
|
42
|
+
consecutiveFailures: number;
|
|
43
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
24
44
|
}[]>>;
|
|
25
45
|
/**
|
|
26
46
|
* Get current attendant profile (from authenticated Clerk session)
|
|
@@ -33,16 +53,36 @@ export declare const getCurrentUser: import("convex/server").RegisteredQuery<"pu
|
|
|
33
53
|
} | null;
|
|
34
54
|
_id: import("convex/values").GenericId<"attendants">;
|
|
35
55
|
_creationTime: number;
|
|
56
|
+
clerkUserId?: string | undefined;
|
|
36
57
|
lastLoginAt?: number | undefined;
|
|
37
58
|
passcode?: string | undefined;
|
|
59
|
+
enrollmentTokenHash?: string | undefined;
|
|
60
|
+
enrollmentTokenExpiresAt?: number | undefined;
|
|
61
|
+
enrolledAt?: number | undefined;
|
|
62
|
+
enrolledBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
63
|
+
biometricTemplateHash?: string | undefined;
|
|
64
|
+
biometricDataEncrypted?: string | undefined;
|
|
65
|
+
biometricCaptureMetadata?: {
|
|
66
|
+
deviceInfo?: string | undefined;
|
|
67
|
+
captureType: "face" | "hand";
|
|
68
|
+
anglesCaptured: string[];
|
|
69
|
+
captureQuality: number;
|
|
70
|
+
livenessPassed: boolean;
|
|
71
|
+
captureTimestamp: number;
|
|
72
|
+
} | undefined;
|
|
73
|
+
lastVerificationAt?: number | undefined;
|
|
74
|
+
lastVerificationSuccess?: boolean | undefined;
|
|
75
|
+
verificationTimeoutAt?: number | undefined;
|
|
38
76
|
phoneNumber: string;
|
|
39
77
|
email: string;
|
|
40
78
|
name: string;
|
|
41
|
-
clerkUserId: string;
|
|
42
79
|
createdAt: number;
|
|
43
80
|
isDeleted: boolean;
|
|
44
81
|
branchId: import("convex/values").GenericId<"branches">;
|
|
45
82
|
isActive: boolean;
|
|
83
|
+
enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
|
|
84
|
+
consecutiveFailures: number;
|
|
85
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
46
86
|
}>>;
|
|
47
87
|
/**
|
|
48
88
|
* Get current active attendance session
|
|
@@ -50,9 +90,9 @@ export declare const getCurrentUser: import("convex/server").RegisteredQuery<"pu
|
|
|
50
90
|
export declare const getActiveSession: import("convex/server").RegisteredQuery<"public", {}, Promise<{
|
|
51
91
|
_id: import("convex/values").GenericId<"attendanceLogs">;
|
|
52
92
|
_creationTime: number;
|
|
93
|
+
deviceInfo?: string | undefined;
|
|
53
94
|
clockOutAt?: number | undefined;
|
|
54
95
|
deviceId?: string | undefined;
|
|
55
|
-
deviceInfo?: string | undefined;
|
|
56
96
|
isDeleted: boolean;
|
|
57
97
|
branchId: import("convex/values").GenericId<"branches">;
|
|
58
98
|
isActive: boolean;
|
|
@@ -65,15 +105,15 @@ export declare const getActiveSession: import("convex/server").RegisteredQuery<"
|
|
|
65
105
|
*/
|
|
66
106
|
export declare const getAttendanceHistory: import("convex/server").RegisteredQuery<"public", {
|
|
67
107
|
branchId?: import("convex/values").GenericId<"branches"> | undefined;
|
|
68
|
-
cursor?: string | undefined;
|
|
69
108
|
numItems?: number | undefined;
|
|
109
|
+
cursor?: string | undefined;
|
|
70
110
|
}, Promise<{
|
|
71
111
|
page: {
|
|
72
112
|
_id: import("convex/values").GenericId<"attendanceLogs">;
|
|
73
113
|
_creationTime: number;
|
|
114
|
+
deviceInfo?: string | undefined;
|
|
74
115
|
clockOutAt?: number | undefined;
|
|
75
116
|
deviceId?: string | undefined;
|
|
76
|
-
deviceInfo?: string | undefined;
|
|
77
117
|
isDeleted: boolean;
|
|
78
118
|
branchId: import("convex/values").GenericId<"branches">;
|
|
79
119
|
isActive: boolean;
|
|
@@ -87,8 +127,8 @@ export declare const getAttendanceHistory: import("convex/server").RegisteredQue
|
|
|
87
127
|
* Clock in attendant (start attendance session)
|
|
88
128
|
*/
|
|
89
129
|
export declare const clockIn: import("convex/server").RegisteredMutation<"public", {
|
|
90
|
-
deviceId?: string | undefined;
|
|
91
130
|
deviceInfo?: string | undefined;
|
|
131
|
+
deviceId?: string | undefined;
|
|
92
132
|
branchId: import("convex/values").GenericId<"branches">;
|
|
93
133
|
}, Promise<import("convex/values").GenericId<"attendanceLogs">>>;
|
|
94
134
|
/**
|
|
@@ -137,4 +177,135 @@ export declare const getAttendanceSummary: import("convex/server").RegisteredQue
|
|
|
137
177
|
end: number;
|
|
138
178
|
};
|
|
139
179
|
}>>;
|
|
180
|
+
/**
|
|
181
|
+
* Verify enrollment token (public query - no auth required)
|
|
182
|
+
*/
|
|
183
|
+
export declare const verifyEnrollmentToken: import("convex/server").RegisteredQuery<"public", {
|
|
184
|
+
token: string;
|
|
185
|
+
}, Promise<{
|
|
186
|
+
valid: boolean;
|
|
187
|
+
error: string;
|
|
188
|
+
attendant?: undefined;
|
|
189
|
+
expiresAt?: undefined;
|
|
190
|
+
} | {
|
|
191
|
+
valid: boolean;
|
|
192
|
+
attendant: {
|
|
193
|
+
id: import("convex/values").GenericId<"attendants">;
|
|
194
|
+
name: string;
|
|
195
|
+
email: string;
|
|
196
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
197
|
+
branchName: string;
|
|
198
|
+
};
|
|
199
|
+
expiresAt: number;
|
|
200
|
+
error?: undefined;
|
|
201
|
+
}>>;
|
|
202
|
+
/**
|
|
203
|
+
* Start biometric enrollment
|
|
204
|
+
*/
|
|
205
|
+
export declare const startBiometricEnrollment: import("convex/server").RegisteredMutation<"public", {
|
|
206
|
+
method: "face" | "hand";
|
|
207
|
+
enrollmentToken: string;
|
|
208
|
+
}, Promise<{
|
|
209
|
+
sessionId: import("convex/values").GenericId<"biometricVerificationSessions">;
|
|
210
|
+
challenge: string;
|
|
211
|
+
expiresAt: number;
|
|
212
|
+
}>>;
|
|
213
|
+
/**
|
|
214
|
+
* Complete biometric enrollment
|
|
215
|
+
*/
|
|
216
|
+
export declare const completeBiometricEnrollment: import("convex/server").RegisteredMutation<"public", {
|
|
217
|
+
challenge: string;
|
|
218
|
+
enrollmentToken: string;
|
|
219
|
+
biometricData: {
|
|
220
|
+
deviceInfo?: string | undefined;
|
|
221
|
+
captureType: "face" | "hand";
|
|
222
|
+
captureQuality: number;
|
|
223
|
+
angles: string[];
|
|
224
|
+
features: string;
|
|
225
|
+
measurements: string;
|
|
226
|
+
livenessData: string;
|
|
227
|
+
};
|
|
228
|
+
}, Promise<{
|
|
229
|
+
success: boolean;
|
|
230
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
231
|
+
enrolledAt: number;
|
|
232
|
+
}>>;
|
|
233
|
+
/**
|
|
234
|
+
* Find attendant by email (for login)
|
|
235
|
+
*/
|
|
236
|
+
export declare const findByEmail: import("convex/server").RegisteredQuery<"public", {
|
|
237
|
+
email: string;
|
|
238
|
+
}, Promise<{
|
|
239
|
+
id: import("convex/values").GenericId<"attendants">;
|
|
240
|
+
name: string;
|
|
241
|
+
email: string;
|
|
242
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
243
|
+
} | null>>;
|
|
244
|
+
/**
|
|
245
|
+
* Start verification (for login or action)
|
|
246
|
+
* Changed to mutation to allow storing challenges
|
|
247
|
+
*/
|
|
248
|
+
export declare const startVerification: import("convex/server").RegisteredMutation<"public", {
|
|
249
|
+
actionContext?: {
|
|
250
|
+
orderId?: import("convex/values").GenericId<"orders"> | undefined;
|
|
251
|
+
amount?: number | undefined;
|
|
252
|
+
actionType?: string | undefined;
|
|
253
|
+
} | undefined;
|
|
254
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
255
|
+
verificationType: "action" | "login" | "session_renewal";
|
|
256
|
+
}, Promise<{
|
|
257
|
+
challenge: string;
|
|
258
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
259
|
+
verificationType: "action" | "login" | "session_renewal";
|
|
260
|
+
requiresLiveness: boolean;
|
|
261
|
+
}>>;
|
|
262
|
+
/**
|
|
263
|
+
* Verify biometric (complete verification)
|
|
264
|
+
*/
|
|
265
|
+
export declare const verifyBiometric: import("convex/server").RegisteredMutation<"public", {
|
|
266
|
+
actionContext?: {
|
|
267
|
+
orderId?: import("convex/values").GenericId<"orders"> | undefined;
|
|
268
|
+
amount?: number | undefined;
|
|
269
|
+
actionType?: string | undefined;
|
|
270
|
+
} | undefined;
|
|
271
|
+
useFallback?: boolean | undefined;
|
|
272
|
+
fallbackType?: "otp" | "admin_verification" | undefined;
|
|
273
|
+
fallbackCode?: string | undefined;
|
|
274
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
275
|
+
challenge: string;
|
|
276
|
+
verificationType: "action" | "login" | "session_renewal";
|
|
277
|
+
biometricData: {
|
|
278
|
+
deviceInfo?: string | undefined;
|
|
279
|
+
captureType: "face" | "hand";
|
|
280
|
+
captureQuality: number;
|
|
281
|
+
angles: string[];
|
|
282
|
+
features: string;
|
|
283
|
+
measurements: string;
|
|
284
|
+
livenessData: string;
|
|
285
|
+
};
|
|
286
|
+
}, Promise<{
|
|
287
|
+
success: boolean;
|
|
288
|
+
verificationId: import("convex/values").GenericId<"biometricVerifications">;
|
|
289
|
+
expiresAt: number;
|
|
290
|
+
fallbackUsed: "otp" | "admin_verification";
|
|
291
|
+
confidence?: undefined;
|
|
292
|
+
} | {
|
|
293
|
+
success: boolean;
|
|
294
|
+
verificationId: import("convex/values").GenericId<"biometricVerifications">;
|
|
295
|
+
confidence: number;
|
|
296
|
+
expiresAt: number;
|
|
297
|
+
fallbackUsed?: undefined;
|
|
298
|
+
}>>;
|
|
299
|
+
/**
|
|
300
|
+
* Check verification status
|
|
301
|
+
*/
|
|
302
|
+
export declare const checkVerificationStatus: import("convex/server").RegisteredQuery<"public", {
|
|
303
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
304
|
+
}, Promise<{
|
|
305
|
+
isVerified: boolean;
|
|
306
|
+
expiresAt: number | undefined;
|
|
307
|
+
lastVerificationAt: number | undefined;
|
|
308
|
+
consecutiveFailures: number;
|
|
309
|
+
enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
|
|
310
|
+
}>>;
|
|
140
311
|
//# sourceMappingURL=attendants.d.ts.map
|
package/convex/customers.d.ts
CHANGED
|
@@ -59,8 +59,14 @@ export declare const getProfile: import("convex/server").RegisteredQuery<"public
|
|
|
59
59
|
* Returns empty results if customer not found
|
|
60
60
|
*/
|
|
61
61
|
export declare const getOrders: import("convex/server").RegisteredQuery<"public", {
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
paginationOpts: {
|
|
63
|
+
id?: number;
|
|
64
|
+
endCursor?: string | null;
|
|
65
|
+
maximumRowsRead?: number;
|
|
66
|
+
maximumBytesRead?: number;
|
|
67
|
+
numItems: number;
|
|
68
|
+
cursor: string | null;
|
|
69
|
+
};
|
|
64
70
|
}, Promise<{
|
|
65
71
|
page: never[];
|
|
66
72
|
isDone: boolean;
|
|
@@ -70,6 +76,7 @@ export declare const getOrders: import("convex/server").RegisteredQuery<"public"
|
|
|
70
76
|
_id: import("convex/values").GenericId<"orders">;
|
|
71
77
|
_creationTime: number;
|
|
72
78
|
createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
79
|
+
customerEmail?: string | undefined;
|
|
73
80
|
estimatedWeight?: number | undefined;
|
|
74
81
|
actualWeight?: number | undefined;
|
|
75
82
|
itemCount?: number | undefined;
|
|
@@ -102,14 +109,62 @@ export declare const getOrders: import("convex/server").RegisteredQuery<"public"
|
|
|
102
109
|
updatedAt: number;
|
|
103
110
|
statusHistory: {
|
|
104
111
|
notes?: string | undefined;
|
|
112
|
+
changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
113
|
+
changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
|
|
105
114
|
status: string;
|
|
106
115
|
changedAt: number;
|
|
107
|
-
changedBy: import("convex/values").GenericId<"attendants">;
|
|
108
116
|
}[];
|
|
109
117
|
}[];
|
|
110
118
|
isDone: boolean;
|
|
111
119
|
continueCursor: string;
|
|
112
120
|
}>>;
|
|
121
|
+
/**
|
|
122
|
+
* Get active orders for customer (not cancelled or completed)
|
|
123
|
+
* Returns orders that are still in progress
|
|
124
|
+
*/
|
|
125
|
+
export declare const getActiveOrders: import("convex/server").RegisteredQuery<"public", {}, Promise<{
|
|
126
|
+
_id: import("convex/values").GenericId<"orders">;
|
|
127
|
+
_creationTime: number;
|
|
128
|
+
createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
129
|
+
customerEmail?: string | undefined;
|
|
130
|
+
estimatedWeight?: number | undefined;
|
|
131
|
+
actualWeight?: number | undefined;
|
|
132
|
+
itemCount?: number | undefined;
|
|
133
|
+
estimatedLoads?: number | undefined;
|
|
134
|
+
whitesSeparate?: boolean | undefined;
|
|
135
|
+
bagCardNumber?: string | undefined;
|
|
136
|
+
notes?: string | undefined;
|
|
137
|
+
deliveryAddress?: string | undefined;
|
|
138
|
+
deliveryPhoneNumber?: string | undefined;
|
|
139
|
+
deliveryHall?: string | undefined;
|
|
140
|
+
deliveryRoom?: string | undefined;
|
|
141
|
+
paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
|
|
142
|
+
paymentId?: import("convex/values").GenericId<"payments"> | undefined;
|
|
143
|
+
fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
144
|
+
status: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
|
|
145
|
+
createdAt: number;
|
|
146
|
+
isDeleted: boolean;
|
|
147
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
148
|
+
deliveryFee: number;
|
|
149
|
+
customerId: import("convex/values").GenericId<"users">;
|
|
150
|
+
customerPhoneNumber: string;
|
|
151
|
+
orderNumber: string;
|
|
152
|
+
orderType: "walk_in" | "online";
|
|
153
|
+
serviceType: "wash_only" | "wash_and_dry" | "dry_only";
|
|
154
|
+
isDelivery: boolean;
|
|
155
|
+
basePrice: number;
|
|
156
|
+
totalPrice: number;
|
|
157
|
+
finalPrice: number;
|
|
158
|
+
paymentStatus: "pending" | "paid" | "failed" | "refunded";
|
|
159
|
+
updatedAt: number;
|
|
160
|
+
statusHistory: {
|
|
161
|
+
notes?: string | undefined;
|
|
162
|
+
changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
163
|
+
changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
|
|
164
|
+
status: string;
|
|
165
|
+
changedAt: number;
|
|
166
|
+
}[];
|
|
167
|
+
}[]>>;
|
|
113
168
|
/**
|
|
114
169
|
* Get customer loyalty points balance
|
|
115
170
|
* Returns zero points if customer not found
|
|
@@ -148,6 +203,7 @@ export declare const register: import("convex/server").RegisteredMutation<"publi
|
|
|
148
203
|
* Update customer profile
|
|
149
204
|
*/
|
|
150
205
|
export declare const updateProfile: import("convex/server").RegisteredMutation<"public", {
|
|
206
|
+
phoneNumber?: string | undefined;
|
|
151
207
|
email?: string | undefined;
|
|
152
208
|
name?: string | undefined;
|
|
153
209
|
preferredBranchId?: import("convex/values").GenericId<"branches"> | undefined;
|