@devlider001/washlab-backend 1.1.0 → 1.1.1

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/admin.d.ts CHANGED
@@ -7,6 +7,8 @@ import { Id } from "./_generated/dataModel";
7
7
  */
8
8
  /**
9
9
  * Get current admin profile (from authenticated Clerk session)
10
+ * Returns null if user is authenticated but not an admin (for redirect to unauthorized page)
11
+ * Returns null if user is not authenticated (frontend handles redirect to sign-in)
10
12
  */
11
13
  export declare const getCurrentUser: import("convex/server").RegisteredQuery<"public", {}, Promise<{
12
14
  _id: import("convex/values").GenericId<"admins">;
@@ -18,7 +20,7 @@ export declare const getCurrentUser: import("convex/server").RegisteredQuery<"pu
18
20
  createdAt: number;
19
21
  isDeleted: boolean;
20
22
  role: "super_admin" | "admin";
21
- }>>;
23
+ } | null>>;
22
24
  /**
23
25
  * Get all branches - Paginated
24
26
  * Supports usePaginatedQuery for infinite scroll
@@ -38,6 +40,7 @@ export declare const getBranches: import("convex/server").RegisteredQuery<"publi
38
40
  _id: import("convex/values").GenericId<"branches">;
39
41
  _creationTime: number;
40
42
  email?: string | undefined;
43
+ terminalId?: string | undefined;
41
44
  stationPinHash?: string | undefined;
42
45
  requireStationLogin?: boolean | undefined;
43
46
  phoneNumber: string;
@@ -56,6 +59,14 @@ export declare const getBranches: import("convex/server").RegisteredQuery<"publi
56
59
  isDone: boolean;
57
60
  continueCursor: string;
58
61
  }>>;
62
+ /**
63
+ * Get all active branches with codes (public - no auth required)
64
+ * Used for displaying available branch codes on login page
65
+ */
66
+ export declare const getActiveBranchesList: import("convex/server").RegisteredQuery<"public", {}, Promise<{
67
+ code: string;
68
+ name: string;
69
+ }[]>>;
59
70
  /**
60
71
  * Get branch by code
61
72
  */
@@ -63,22 +74,15 @@ export declare const getBranchByCode: import("convex/server").RegisteredQuery<"p
63
74
  code: string;
64
75
  }, Promise<{
65
76
  _id: import("convex/values").GenericId<"branches">;
66
- _creationTime: number;
67
- email?: string | undefined;
68
- stationPinHash?: string | undefined;
69
- requireStationLogin?: boolean | undefined;
70
- phoneNumber: string;
71
77
  name: string;
72
- createdAt: number;
73
- isDeleted: boolean;
74
- isActive: boolean;
75
- createdBy: import("convex/values").GenericId<"admins">;
76
78
  code: string;
77
79
  address: string;
78
80
  city: string;
79
81
  country: string;
80
- pricingPerKg: number;
81
- deliveryFee: number;
82
+ phoneNumber: string;
83
+ email: string | undefined;
84
+ requireStationLogin: boolean;
85
+ hasStationPin: boolean;
82
86
  } | null>>;
83
87
  /**
84
88
  * Get single branch by ID
@@ -89,6 +93,7 @@ export declare const getBranch: import("convex/server").RegisteredQuery<"public"
89
93
  _id: import("convex/values").GenericId<"branches">;
90
94
  _creationTime: number;
91
95
  email?: string | undefined;
96
+ terminalId?: string | undefined;
92
97
  stationPinHash?: string | undefined;
93
98
  requireStationLogin?: boolean | undefined;
94
99
  phoneNumber: string;
@@ -317,16 +322,16 @@ export declare const deleteCustomer: import("convex/server").RegisteredMutation<
317
322
  */
318
323
  export declare const createBranch: import("convex/server").RegisteredMutation<"public", {
319
324
  email?: string | undefined;
320
- requireStationLogin?: boolean | undefined;
321
- stationPin?: string | undefined;
322
325
  phoneNumber: string;
323
326
  name: string;
324
327
  code: string;
328
+ terminalId: string;
325
329
  address: string;
326
330
  city: string;
327
331
  country: string;
328
332
  pricingPerKg: number;
329
333
  deliveryFee: number;
334
+ stationPin: string;
330
335
  }, Promise<import("convex/values").GenericId<"branches">>>;
331
336
  /**
332
337
  * Update branch details
@@ -337,12 +342,12 @@ export declare const updateBranch: import("convex/server").RegisteredMutation<"p
337
342
  name?: string | undefined;
338
343
  isActive?: boolean | undefined;
339
344
  code?: string | undefined;
345
+ terminalId?: string | undefined;
340
346
  address?: string | undefined;
341
347
  city?: string | undefined;
342
348
  country?: string | undefined;
343
349
  pricingPerKg?: number | undefined;
344
350
  deliveryFee?: number | undefined;
345
- requireStationLogin?: boolean | undefined;
346
351
  stationPin?: string | undefined;
347
352
  branchId: import("convex/values").GenericId<"branches">;
348
353
  }, Promise<import("convex/values").GenericId<"branches">>>;
@@ -307,6 +307,7 @@ export declare const findByEmail: import("convex/server").RegisteredQuery<"publi
307
307
  authenticationMethods: ("biometric_face" | "biometric_hand" | "pin" | "password")[];
308
308
  hasBiometric: boolean;
309
309
  hasPin: boolean;
310
+ hasPassword: boolean;
310
311
  } | null>>;
311
312
  /**
312
313
  * Start verification (for login or action)
@@ -29,9 +29,15 @@ export declare const getByPhone: import("convex/server").RegisteredQuery<"public
29
29
  createdAt: number;
30
30
  isDeleted: boolean;
31
31
  } | null>>;
32
+ /**
33
+ * Check if authenticated user is an admin or attendant
34
+ * Returns true if user is admin/attendant (should be blocked from customer app)
35
+ */
36
+ export declare const checkIsAdminOrAttendant: import("convex/server").RegisteredQuery<"public", {}, Promise<boolean>>;
32
37
  /**
33
38
  * Get current customer profile (from authenticated Clerk session)
34
39
  * Returns null if customer hasn't completed registration yet
40
+ * Returns null if user is admin/attendant (will be handled by unauthorized page)
35
41
  */
36
42
  export declare const getProfile: import("convex/server").RegisteredQuery<"public", {}, Promise<{
37
43
  orderCount: number;
@@ -38,6 +38,7 @@ export declare const getBranches: import("convex/server").RegisteredQuery<"publi
38
38
  _id: import("convex/values").GenericId<"branches">;
39
39
  _creationTime: number;
40
40
  email?: string | undefined;
41
+ terminalId?: string | undefined;
41
42
  stationPinHash?: string | undefined;
42
43
  requireStationLogin?: boolean | undefined;
43
44
  phoneNumber: string;
@@ -65,6 +66,7 @@ export declare const getBranchByCode: import("convex/server").RegisteredQuery<"p
65
66
  _id: import("convex/values").GenericId<"branches">;
66
67
  _creationTime: number;
67
68
  email?: string | undefined;
69
+ terminalId?: string | undefined;
68
70
  stationPinHash?: string | undefined;
69
71
  requireStationLogin?: boolean | undefined;
70
72
  phoneNumber: string;
@@ -89,6 +91,7 @@ export declare const getBranch: import("convex/server").RegisteredQuery<"public"
89
91
  _id: import("convex/values").GenericId<"branches">;
90
92
  _creationTime: number;
91
93
  email?: string | undefined;
94
+ terminalId?: string | undefined;
92
95
  stationPinHash?: string | undefined;
93
96
  requireStationLogin?: boolean | undefined;
94
97
  phoneNumber: string;
@@ -320,6 +323,7 @@ export declare const createBranch: import("convex/server").RegisteredMutation<"p
320
323
  phoneNumber: string;
321
324
  name: string;
322
325
  code: string;
326
+ terminalId: string;
323
327
  address: string;
324
328
  city: string;
325
329
  country: string;
@@ -226,6 +226,7 @@ export declare const getTransactionHistory: import("convex/server").RegisteredQu
226
226
  _id: import("convex/values").GenericId<"branches">;
227
227
  _creationTime: number;
228
228
  email?: string | undefined;
229
+ terminalId?: string | undefined;
229
230
  stationPinHash?: string | undefined;
230
231
  requireStationLogin?: boolean | undefined;
231
232
  phoneNumber: string;
@@ -142,6 +142,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
142
142
  }, {}, {}>;
143
143
  branches: import("convex/server").TableDefinition<import("convex/values").VObject<{
144
144
  email?: string | undefined;
145
+ terminalId?: string | undefined;
145
146
  stationPinHash?: string | undefined;
146
147
  requireStationLogin?: boolean | undefined;
147
148
  phoneNumber: string;
@@ -159,6 +160,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
159
160
  }, {
160
161
  name: import("convex/values").VString<string, "required">;
161
162
  code: import("convex/values").VString<string, "required">;
163
+ terminalId: import("convex/values").VString<string | undefined, "optional">;
162
164
  address: import("convex/values").VString<string, "required">;
163
165
  city: import("convex/values").VString<string, "required">;
164
166
  country: import("convex/values").VString<string, "required">;
@@ -172,10 +174,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
172
174
  createdAt: import("convex/values").VFloat64<number, "required">;
173
175
  createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
174
176
  isDeleted: import("convex/values").VBoolean<boolean, "required">;
175
- }, "required", "phoneNumber" | "email" | "name" | "createdAt" | "isDeleted" | "isActive" | "createdBy" | "code" | "address" | "city" | "country" | "pricingPerKg" | "deliveryFee" | "stationPinHash" | "requireStationLogin">, {
177
+ }, "required", "phoneNumber" | "email" | "name" | "createdAt" | "isDeleted" | "isActive" | "createdBy" | "code" | "terminalId" | "address" | "city" | "country" | "pricingPerKg" | "deliveryFee" | "stationPinHash" | "requireStationLogin">, {
176
178
  by_city: ["city", "_creationTime"];
177
179
  by_active: ["isActive", "_creationTime"];
178
180
  by_code: ["code", "_creationTime"];
181
+ by_terminal_id: ["terminalId", "_creationTime"];
179
182
  }, {}, {}>;
180
183
  orders: import("convex/server").TableDefinition<import("convex/values").VObject<{
181
184
  createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
@@ -4,6 +4,14 @@
4
4
  * Handles station (branch) login and session management.
5
5
  * Station login is separate from attendant authentication.
6
6
  */
7
+ /**
8
+ * Get all active branches with codes (public - no auth required)
9
+ * Used for displaying available branch codes on login page
10
+ */
11
+ export declare const getActiveBranches: import("convex/server").RegisteredQuery<"public", {}, Promise<{
12
+ code: string;
13
+ name: string;
14
+ }[]>>;
7
15
  /**
8
16
  * Verify branch code (public - no auth required)
9
17
  * Returns branch info without sensitive data
@@ -28,30 +36,52 @@ export declare const verifyBranchCode: import("convex/server").RegisteredQuery<"
28
36
  */
29
37
  export declare const loginStation: import("convex/server").RegisteredMutation<"public", {
30
38
  deviceInfo?: string | undefined;
31
- stationPin?: string | undefined;
32
39
  branchId: import("convex/values").GenericId<"branches">;
33
40
  deviceId: string;
41
+ stationPin: string;
34
42
  }, Promise<{
35
- success: boolean;
43
+ stationToken: string;
44
+ sessionId: import("convex/values").GenericId<"stationSessions">;
36
45
  branchId: import("convex/values").GenericId<"branches">;
37
46
  branchName: string;
38
- stationToken: string;
39
47
  expiresAt: number;
40
- sessionId: import("convex/values").GenericId<"stationSessions">;
41
48
  }>>;
42
49
  /**
43
- * Verify station session token
50
+ * Verify station session
44
51
  */
45
52
  export declare const verifyStationSession: import("convex/server").RegisteredQuery<"public", {
46
53
  stationToken: string;
47
54
  }, Promise<{
55
+ valid: boolean;
56
+ reason: string;
57
+ branchActive: boolean;
58
+ branchId?: undefined;
59
+ branchName?: undefined;
60
+ branchCode?: undefined;
61
+ terminalId?: undefined;
62
+ deviceId?: undefined;
63
+ sessionId?: undefined;
64
+ } | {
48
65
  valid: boolean;
49
66
  branchId: import("convex/values").GenericId<"branches">;
50
- branchName: string | undefined;
67
+ branchName: string;
68
+ branchCode: string;
69
+ branchActive: boolean;
70
+ reason: string;
71
+ terminalId: string | undefined;
51
72
  deviceId: string;
52
- expiresAt: number;
53
- loggedInAt: number;
54
- } | null>>;
73
+ sessionId: string;
74
+ } | {
75
+ valid: boolean;
76
+ branchId: import("convex/values").GenericId<"branches">;
77
+ branchName: string;
78
+ branchCode: string;
79
+ branchActive: boolean;
80
+ terminalId: string | undefined;
81
+ deviceId: string;
82
+ sessionId: string;
83
+ reason?: undefined;
84
+ }>>;
55
85
  /**
56
86
  * Logout from station
57
87
  */
@@ -61,17 +91,355 @@ export declare const logoutStation: import("convex/server").RegisteredMutation<"
61
91
  success: boolean;
62
92
  }>>;
63
93
  /**
64
- * Get active station session for device
94
+ * Get active station session info
65
95
  */
66
96
  export declare const getActiveStationSession: import("convex/server").RegisteredQuery<"public", {
67
- branchId: import("convex/values").GenericId<"branches">;
68
- deviceId: string;
97
+ stationToken: string;
69
98
  }, Promise<{
70
- _id: import("convex/values").GenericId<"stationSessions">;
99
+ sessionId: import("convex/values").GenericId<"stationSessions">;
71
100
  branchId: import("convex/values").GenericId<"branches">;
72
- branchName: string | undefined;
101
+ branchName: string;
73
102
  deviceId: string;
74
103
  loggedInAt: number;
75
104
  expiresAt: number;
76
105
  } | null>>;
106
+ /**
107
+ * Get station orders with pagination and filtering
108
+ */
109
+ export declare const getStationOrders: import("convex/server").RegisteredQuery<"public", {
110
+ status?: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled" | undefined;
111
+ paginationOpts: {
112
+ id?: number;
113
+ endCursor?: string | null;
114
+ maximumRowsRead?: number;
115
+ maximumBytesRead?: number;
116
+ numItems: number;
117
+ cursor: string | null;
118
+ };
119
+ stationToken: string;
120
+ }, Promise<{
121
+ page: {
122
+ customer: {
123
+ _id: import("convex/values").GenericId<"users">;
124
+ name: string;
125
+ phoneNumber: string;
126
+ email: string | undefined;
127
+ } | null;
128
+ _id: import("convex/values").GenericId<"orders">;
129
+ _creationTime: number;
130
+ createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
131
+ customerEmail?: string | undefined;
132
+ estimatedWeight?: number | undefined;
133
+ actualWeight?: number | undefined;
134
+ itemCount?: number | undefined;
135
+ estimatedLoads?: number | undefined;
136
+ whitesSeparate?: boolean | undefined;
137
+ bagCardNumber?: string | undefined;
138
+ notes?: string | undefined;
139
+ deliveryAddress?: string | undefined;
140
+ deliveryPhoneNumber?: string | undefined;
141
+ deliveryHall?: string | undefined;
142
+ deliveryRoom?: string | undefined;
143
+ paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
144
+ paymentId?: import("convex/values").GenericId<"payments"> | undefined;
145
+ fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
146
+ status: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
147
+ createdAt: number;
148
+ isDeleted: boolean;
149
+ branchId: import("convex/values").GenericId<"branches">;
150
+ deliveryFee: number;
151
+ customerId: import("convex/values").GenericId<"users">;
152
+ customerPhoneNumber: string;
153
+ orderNumber: string;
154
+ orderType: "walk_in" | "online";
155
+ serviceType: "wash_only" | "wash_and_dry" | "dry_only";
156
+ isDelivery: boolean;
157
+ basePrice: number;
158
+ totalPrice: number;
159
+ finalPrice: number;
160
+ paymentStatus: "pending" | "paid" | "failed" | "refunded";
161
+ updatedAt: number;
162
+ statusHistory: {
163
+ notes?: string | undefined;
164
+ changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
165
+ changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
166
+ status: string;
167
+ changedAt: number;
168
+ }[];
169
+ }[];
170
+ isDone: boolean;
171
+ continueCursor: string;
172
+ }>>;
173
+ /**
174
+ * Get order details for station
175
+ */
176
+ export declare const getStationOrderDetails: import("convex/server").RegisteredQuery<"public", {
177
+ orderId: import("convex/values").GenericId<"orders">;
178
+ stationToken: string;
179
+ }, Promise<{
180
+ customer: {
181
+ _id: import("convex/values").GenericId<"users">;
182
+ name: string;
183
+ phoneNumber: string;
184
+ email: string | undefined;
185
+ } | null;
186
+ branch: {
187
+ _id: import("convex/values").GenericId<"branches">;
188
+ name: string;
189
+ code: string;
190
+ address: string;
191
+ };
192
+ _id: import("convex/values").GenericId<"orders">;
193
+ _creationTime: number;
194
+ createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
195
+ customerEmail?: string | undefined;
196
+ estimatedWeight?: number | undefined;
197
+ actualWeight?: number | undefined;
198
+ itemCount?: number | undefined;
199
+ estimatedLoads?: number | undefined;
200
+ whitesSeparate?: boolean | undefined;
201
+ bagCardNumber?: string | undefined;
202
+ notes?: string | undefined;
203
+ deliveryAddress?: string | undefined;
204
+ deliveryPhoneNumber?: string | undefined;
205
+ deliveryHall?: string | undefined;
206
+ deliveryRoom?: string | undefined;
207
+ paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
208
+ paymentId?: import("convex/values").GenericId<"payments"> | undefined;
209
+ fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
210
+ status: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
211
+ createdAt: number;
212
+ isDeleted: boolean;
213
+ branchId: import("convex/values").GenericId<"branches">;
214
+ deliveryFee: number;
215
+ customerId: import("convex/values").GenericId<"users">;
216
+ customerPhoneNumber: string;
217
+ orderNumber: string;
218
+ orderType: "walk_in" | "online";
219
+ serviceType: "wash_only" | "wash_and_dry" | "dry_only";
220
+ isDelivery: boolean;
221
+ basePrice: number;
222
+ totalPrice: number;
223
+ finalPrice: number;
224
+ paymentStatus: "pending" | "paid" | "failed" | "refunded";
225
+ updatedAt: number;
226
+ statusHistory: {
227
+ notes?: string | undefined;
228
+ changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
229
+ changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
230
+ status: string;
231
+ changedAt: number;
232
+ }[];
233
+ } | null>>;
234
+ /**
235
+ * Update order status (for station)
236
+ * Allows station to update order status
237
+ */
238
+ export declare const updateStationOrderStatus: import("convex/server").RegisteredMutation<"public", {
239
+ notes?: string | undefined;
240
+ orderId: import("convex/values").GenericId<"orders">;
241
+ newStatus: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
242
+ stationToken: string;
243
+ }, Promise<{
244
+ success: boolean;
245
+ orderId: import("convex/values").GenericId<"orders">;
246
+ }>>;
247
+ /**
248
+ * Get station analytics/dashboard stats
249
+ */
250
+ export declare const getStationStats: import("convex/server").RegisteredQuery<"public", {
251
+ startDate?: number | undefined;
252
+ endDate?: number | undefined;
253
+ stationToken: string;
254
+ }, Promise<{
255
+ totalOrders: number;
256
+ totalRevenue: number;
257
+ pendingOrders: number;
258
+ ordersByStatus: {
259
+ pending: number;
260
+ in_progress: number;
261
+ ready_for_pickup: number;
262
+ delivered: number;
263
+ completed: number;
264
+ cancelled: number;
265
+ };
266
+ averageOrderValue: number;
267
+ }>>;
268
+ /**
269
+ * Search customers for station
270
+ */
271
+ export declare const searchStationCustomers: import("convex/server").RegisteredQuery<"public", {
272
+ limit?: number | undefined;
273
+ query: string;
274
+ stationToken: string;
275
+ }, Promise<{
276
+ _id: import("convex/values").GenericId<"users">;
277
+ name: string;
278
+ phoneNumber: string;
279
+ email: string | undefined;
280
+ status: "active" | "blocked" | "suspended" | "restricted" | undefined;
281
+ orderCount: number;
282
+ completedOrderCount: number;
283
+ totalSpent: number;
284
+ }[]>>;
285
+ /**
286
+ * Get active attendance for station
287
+ * Returns active attendance logs for the station's branch
288
+ * Multiple attendants can be clocked in simultaneously
289
+ */
290
+ export declare const getActiveStationAttendances: import("convex/server").RegisteredQuery<"public", {
291
+ stationToken: string;
292
+ }, Promise<{
293
+ _id: import("convex/values").GenericId<"attendanceLogs">;
294
+ clockInAt: number;
295
+ deviceId: string | undefined;
296
+ attendant: {
297
+ _id: import("convex/values").GenericId<"attendants">;
298
+ name: string;
299
+ email: string;
300
+ } | null;
301
+ }[]>>;
302
+ /**
303
+ * Get attendants for branch (for clock-in selection)
304
+ * Returns list of attendants assigned to the branch
305
+ */
306
+ export declare const getBranchAttendants: import("convex/server").RegisteredQuery<"public", {
307
+ stationToken: string;
308
+ }, Promise<{
309
+ _id: import("convex/values").GenericId<"attendants">;
310
+ name: string;
311
+ email: string;
312
+ hasBiometric: boolean;
313
+ hasPin: boolean;
314
+ authenticationMethods: ("biometric_face" | "biometric_hand" | "pin" | "password")[];
315
+ }[]>>;
316
+ /**
317
+ * Start biometric verification for clock-in
318
+ * Creates a challenge for the attendant to verify their identity
319
+ */
320
+ export declare const startClockInVerification: import("convex/server").RegisteredMutation<"public", {
321
+ attendantId: import("convex/values").GenericId<"attendants">;
322
+ stationToken: string;
323
+ }, Promise<{
324
+ challenge: string;
325
+ attendantId: import("convex/values").GenericId<"attendants">;
326
+ verificationType: "login";
327
+ requiresLiveness: boolean;
328
+ }>>;
329
+ /**
330
+ * Complete clock-in with biometric verification
331
+ * Verifies biometric and creates attendance record
332
+ */
333
+ export declare const completeClockIn: import("convex/server").RegisteredMutation<"public", {
334
+ attendantId: import("convex/values").GenericId<"attendants">;
335
+ challenge: string;
336
+ biometricData: {
337
+ deviceInfo?: string | undefined;
338
+ captureType: "face" | "hand";
339
+ captureQuality: number;
340
+ angles: string[];
341
+ features: string;
342
+ measurements: string;
343
+ livenessData: string;
344
+ };
345
+ stationToken: string;
346
+ }, Promise<{
347
+ attendanceId: import("convex/values").GenericId<"attendanceLogs">;
348
+ clockInAt: number;
349
+ attendant: {
350
+ _id: import("convex/values").GenericId<"attendants">;
351
+ name: string;
352
+ email: string;
353
+ };
354
+ }>>;
355
+ /**
356
+ * Start clock-out verification
357
+ */
358
+ export declare const startClockOutVerification: import("convex/server").RegisteredMutation<"public", {
359
+ attendanceId: import("convex/values").GenericId<"attendanceLogs">;
360
+ stationToken: string;
361
+ }, Promise<{
362
+ challenge: string;
363
+ attendantId: import("convex/values").GenericId<"attendants">;
364
+ verificationType: "action";
365
+ requiresLiveness: boolean;
366
+ }>>;
367
+ /**
368
+ * Complete clock-out with biometric verification
369
+ */
370
+ export declare const completeClockOut: import("convex/server").RegisteredMutation<"public", {
371
+ notes?: string | undefined;
372
+ attendanceId: import("convex/values").GenericId<"attendanceLogs">;
373
+ challenge: string;
374
+ biometricData: {
375
+ deviceInfo?: string | undefined;
376
+ captureType: "face" | "hand";
377
+ captureQuality: number;
378
+ angles: string[];
379
+ features: string;
380
+ measurements: string;
381
+ livenessData: string;
382
+ };
383
+ stationToken: string;
384
+ }, Promise<{
385
+ attendanceId: import("convex/values").GenericId<"attendanceLogs">;
386
+ durationMinutes: number;
387
+ clockOutAt: number;
388
+ sessionsRevoked: number;
389
+ }>>;
390
+ /**
391
+ * Get attendance history for the station's branch
392
+ * Returns attendance logs with optional date filtering
393
+ */
394
+ export declare const getStationAttendanceHistory: import("convex/server").RegisteredQuery<"public", {
395
+ startDate?: number | undefined;
396
+ endDate?: number | undefined;
397
+ limit?: number | undefined;
398
+ stationToken: string;
399
+ }, Promise<{
400
+ _id: import("convex/values").GenericId<"attendanceLogs">;
401
+ clockInAt: number;
402
+ clockOutAt: number | undefined;
403
+ deviceId: string | undefined;
404
+ isActive: boolean;
405
+ durationMinutes: number | null;
406
+ attendant: {
407
+ _id: import("convex/values").GenericId<"attendants">;
408
+ name: string;
409
+ email: string;
410
+ } | null;
411
+ }[]>>;
412
+ /**
413
+ * Get activity logs (audit logs) for the station's branch
414
+ * Returns audit logs for actions taken at this station
415
+ */
416
+ export declare const getStationActivityLogs: import("convex/server").RegisteredQuery<"public", {
417
+ limit?: number | undefined;
418
+ stationToken: string;
419
+ }, Promise<{
420
+ _id: import("convex/values").GenericId<"auditLogs">;
421
+ action: string;
422
+ entityType: string;
423
+ entityId: string | undefined;
424
+ actor: {
425
+ type: "attendant";
426
+ name: string;
427
+ email: string;
428
+ } | {
429
+ type: "admin";
430
+ name: string;
431
+ email: string;
432
+ } | {
433
+ type: "customer";
434
+ name: string;
435
+ email: string | undefined;
436
+ } | null;
437
+ actorRole: string;
438
+ attendanceId: import("convex/values").GenericId<"attendanceLogs"> | undefined;
439
+ deviceId: string | undefined;
440
+ details: string | undefined;
441
+ oldValue: string | undefined;
442
+ newValue: string | undefined;
443
+ timestamp: number;
444
+ }[]>>;
77
445
  //# sourceMappingURL=stations.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devlider001/washlab-backend",
3
- "version": "1.1.0",
3
+ "version": "1.1.1",
4
4
  "description": "Washlab backend - Convex API package for Lider Technology Ltd",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",