@devlider001/washlab-backend 1.1.5 → 1.1.51

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.
@@ -23,6 +23,7 @@ import type * as lib_audit from "../lib/audit.js";
23
23
  import type * as lib_auth from "../lib/auth.js";
24
24
  import type * as lib_biometricComparison from "../lib/biometricComparison.js";
25
25
  import type * as lib_biometricEncryption from "../lib/biometricEncryption.js";
26
+ import type * as lib_hubtel from "../lib/hubtel.js";
26
27
  import type * as lib_passwordHashing from "../lib/passwordHashing.js";
27
28
  import type * as lib_tokenHashing from "../lib/tokenHashing.js";
28
29
  import type * as lib_utils from "../lib/utils.js";
@@ -57,6 +58,7 @@ declare const fullApi: ApiFromModules<{
57
58
  "lib/auth": typeof lib_auth;
58
59
  "lib/biometricComparison": typeof lib_biometricComparison;
59
60
  "lib/biometricEncryption": typeof lib_biometricEncryption;
61
+ "lib/hubtel": typeof lib_hubtel;
60
62
  "lib/passwordHashing": typeof lib_passwordHashing;
61
63
  "lib/tokenHashing": typeof lib_tokenHashing;
62
64
  "lib/utils": typeof lib_utils;
package/convex/admin.d.ts CHANGED
@@ -174,6 +174,7 @@ export declare const getAttendants: import("convex/server").RegisteredQuery<"pub
174
174
  clerkUserId?: string | undefined;
175
175
  lastLoginAt?: number | undefined;
176
176
  passcodeHash?: string | undefined;
177
+ passcodeSalt?: string | undefined;
177
178
  authenticationMethods?: ("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined;
178
179
  enrollmentTokenHash?: string | undefined;
179
180
  enrollmentTokenExpiresAt?: number | undefined;
@@ -199,7 +200,7 @@ export declare const getAttendants: import("convex/server").RegisteredQuery<"pub
199
200
  isDeleted: boolean;
200
201
  branchId: import("convex/values").GenericId<"branches">;
201
202
  isActive: boolean;
202
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
203
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
203
204
  consecutiveFailures: number;
204
205
  createdBy: import("convex/values").GenericId<"admins">;
205
206
  }[];
@@ -456,7 +457,7 @@ export declare const changeAttendantStatus: import("convex/server").RegisteredMu
456
457
  attendantId: import("convex/values").GenericId<"attendants">;
457
458
  }, Promise<{
458
459
  attendantId: import("convex/values").GenericId<"attendants">;
459
- oldStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
460
+ oldStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
460
461
  newStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
461
462
  }>>;
462
463
  /**
@@ -467,7 +468,7 @@ export declare const suspendAttendant: import("convex/server").RegisteredMutatio
467
468
  attendantId: import("convex/values").GenericId<"attendants">;
468
469
  }, Promise<{
469
470
  attendantId: import("convex/values").GenericId<"attendants">;
470
- oldStatus: "active" | "invited" | "enrolling" | "locked";
471
+ oldStatus: "active" | "invited" | "enrolling" | "biometric_complete" | "locked";
471
472
  newStatus: string;
472
473
  }>>;
473
474
  /**
@@ -478,7 +479,7 @@ export declare const activateAttendant: import("convex/server").RegisteredMutati
478
479
  attendantId: import("convex/values").GenericId<"attendants">;
479
480
  }, Promise<{
480
481
  attendantId: import("convex/values").GenericId<"attendants">;
481
- oldStatus: "suspended" | "invited" | "enrolling" | "locked";
482
+ oldStatus: "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
482
483
  newStatus: string;
483
484
  }>>;
484
485
  /**
@@ -489,7 +490,7 @@ export declare const lockAttendant: import("convex/server").RegisteredMutation<"
489
490
  attendantId: import("convex/values").GenericId<"attendants">;
490
491
  }, Promise<{
491
492
  attendantId: import("convex/values").GenericId<"attendants">;
492
- oldStatus: "active" | "suspended" | "invited" | "enrolling";
493
+ oldStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete";
493
494
  newStatus: string;
494
495
  }>>;
495
496
  /**
@@ -642,7 +643,7 @@ export declare const listAttendantEnrollments: import("convex/server").Registere
642
643
  email: string;
643
644
  phoneNumber: string;
644
645
  branchId: import("convex/values").GenericId<"branches">;
645
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
646
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
646
647
  enrolledAt: number | undefined;
647
648
  enrollmentTokenExpiresAt: number | undefined;
648
649
  lastVerificationAt: number | undefined;
@@ -14,6 +14,7 @@ export declare const getByBranch: import("convex/server").RegisteredQuery<"publi
14
14
  clerkUserId?: string | undefined;
15
15
  lastLoginAt?: number | undefined;
16
16
  passcodeHash?: string | undefined;
17
+ passcodeSalt?: string | undefined;
17
18
  authenticationMethods?: ("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined;
18
19
  enrollmentTokenHash?: string | undefined;
19
20
  enrollmentTokenExpiresAt?: number | undefined;
@@ -39,7 +40,7 @@ export declare const getByBranch: import("convex/server").RegisteredQuery<"publi
39
40
  isDeleted: boolean;
40
41
  branchId: import("convex/values").GenericId<"branches">;
41
42
  isActive: boolean;
42
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
43
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
43
44
  consecutiveFailures: number;
44
45
  createdBy: import("convex/values").GenericId<"admins">;
45
46
  }[]>>;
@@ -57,6 +58,7 @@ export declare const getCurrentUser: import("convex/server").RegisteredQuery<"pu
57
58
  clerkUserId?: string | undefined;
58
59
  lastLoginAt?: number | undefined;
59
60
  passcodeHash?: string | undefined;
61
+ passcodeSalt?: string | undefined;
60
62
  authenticationMethods?: ("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined;
61
63
  enrollmentTokenHash?: string | undefined;
62
64
  enrollmentTokenExpiresAt?: number | undefined;
@@ -82,7 +84,7 @@ export declare const getCurrentUser: import("convex/server").RegisteredQuery<"pu
82
84
  isDeleted: boolean;
83
85
  branchId: import("convex/values").GenericId<"branches">;
84
86
  isActive: boolean;
85
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
87
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
86
88
  consecutiveFailures: number;
87
89
  createdBy: import("convex/values").GenericId<"admins">;
88
90
  }>>;
@@ -163,12 +165,14 @@ export declare const getAttendanceHistory: import("convex/server").RegisteredQue
163
165
  export declare const clockIn: import("convex/server").RegisteredMutation<"public", {
164
166
  deviceInfo?: string | undefined;
165
167
  deviceId?: string | undefined;
168
+ verificationId?: import("convex/values").GenericId<"biometricVerifications"> | undefined;
166
169
  branchId: import("convex/values").GenericId<"branches">;
167
170
  }, Promise<import("convex/values").GenericId<"attendanceLogs">>>;
168
171
  /**
169
172
  * Clock out attendant (end attendance session)
170
173
  */
171
174
  export declare const clockOut: import("convex/server").RegisteredMutation<"public", {
175
+ verificationId?: import("convex/values").GenericId<"biometricVerifications"> | undefined;
172
176
  attendanceLogId?: import("convex/values").GenericId<"attendanceLogs"> | undefined;
173
177
  }, Promise<{
174
178
  attendanceLogId: import("convex/values").GenericId<"attendanceLogs">;
@@ -293,6 +297,31 @@ export declare const completeBiometricEnrollment: import("convex/server").Regist
293
297
  success: boolean;
294
298
  attendantId: import("convex/values").GenericId<"attendants">;
295
299
  enrolledAt: number;
300
+ requiresPIN: boolean;
301
+ }>>;
302
+ /**
303
+ * Complete PIN setup after biometric enrollment
304
+ * This is the second step of enrollment
305
+ */
306
+ export declare const completePINSetup: import("convex/server").RegisteredMutation<"public", {
307
+ pin: string;
308
+ enrollmentToken: string;
309
+ }, Promise<{
310
+ success: boolean;
311
+ attendantId: import("convex/values").GenericId<"attendants">;
312
+ }>>;
313
+ /**
314
+ * Verify PIN for attendant actions and create verification record
315
+ */
316
+ export declare const verifyAttendantPIN: import("convex/server").RegisteredMutation<"public", {
317
+ orderId?: import("convex/values").GenericId<"orders"> | undefined;
318
+ actionType?: string | undefined;
319
+ pin: string;
320
+ attendantId: import("convex/values").GenericId<"attendants">;
321
+ }, Promise<{
322
+ success: boolean;
323
+ attendantId: import("convex/values").GenericId<"attendants">;
324
+ verificationId: import("convex/values").GenericId<"biometricVerifications">;
296
325
  }>>;
297
326
  /**
298
327
  * Find attendant by email (for login)
@@ -374,7 +403,7 @@ export declare const checkVerificationStatus: import("convex/server").Registered
374
403
  expiresAt: number | undefined;
375
404
  lastVerificationAt: number | undefined;
376
405
  consecutiveFailures: number;
377
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
406
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
378
407
  }>>;
379
408
  /**
380
409
  * Create session after successful biometric verification
@@ -60,6 +60,7 @@ export declare function getCurrentAttendant(ctx: QueryCtx | MutationCtx): Promis
60
60
  clerkUserId?: string | undefined;
61
61
  lastLoginAt?: number | undefined;
62
62
  passcodeHash?: string | undefined;
63
+ passcodeSalt?: string | undefined;
63
64
  authenticationMethods?: ("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined;
64
65
  enrollmentTokenHash?: string | undefined;
65
66
  enrollmentTokenExpiresAt?: number | undefined;
@@ -85,7 +86,7 @@ export declare function getCurrentAttendant(ctx: QueryCtx | MutationCtx): Promis
85
86
  isDeleted: boolean;
86
87
  branchId: import("convex/values").GenericId<"branches">;
87
88
  isActive: boolean;
88
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
89
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
89
90
  consecutiveFailures: number;
90
91
  createdBy: import("convex/values").GenericId<"admins">;
91
92
  }>;
@@ -129,6 +130,7 @@ export declare function verifyAttendantBranch(ctx: QueryCtx | MutationCtx, atten
129
130
  clerkUserId?: string | undefined;
130
131
  lastLoginAt?: number | undefined;
131
132
  passcodeHash?: string | undefined;
133
+ passcodeSalt?: string | undefined;
132
134
  authenticationMethods?: ("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined;
133
135
  enrollmentTokenHash?: string | undefined;
134
136
  enrollmentTokenExpiresAt?: number | undefined;
@@ -154,7 +156,7 @@ export declare function verifyAttendantBranch(ctx: QueryCtx | MutationCtx, atten
154
156
  isDeleted: boolean;
155
157
  branchId: import("convex/values").GenericId<"branches">;
156
158
  isActive: boolean;
157
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
159
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
158
160
  consecutiveFailures: number;
159
161
  createdBy: import("convex/values").GenericId<"admins">;
160
162
  }>;
@@ -0,0 +1,35 @@
1
+ /**
2
+ * Hubtel Payment Integration
3
+ *
4
+ * Functions for sending USSD codes and processing payments via Hubtel
5
+ *
6
+ * Note: This requires Hubtel API credentials to be configured in Convex environment variables
7
+ */
8
+ /**
9
+ * Send USSD payment code to customer
10
+ * This will trigger a USSD prompt on the customer's phone
11
+ *
12
+ * Note: Environment variables should be set in Convex dashboard
13
+ * For now, we'll use a placeholder that needs to be configured
14
+ *
15
+ * @param phoneNumber - Customer phone number (can be in various formats)
16
+ * @param amount - Payment amount in GHS
17
+ * @param orderNumber - Order number for reference
18
+ * @param description - Payment description
19
+ * @returns Object with success status and message/error
20
+ */
21
+ export declare function sendUSSDCode(phoneNumber: string, amount: number, orderNumber: string, description?: string): Promise<{
22
+ success: boolean;
23
+ message?: string;
24
+ error?: string;
25
+ transactionRef?: string;
26
+ }>;
27
+ /**
28
+ * Verify payment status from Hubtel callback
29
+ */
30
+ export declare function verifyPaymentStatus(transactionRef: string): Promise<{
31
+ paid: boolean;
32
+ amount?: number;
33
+ transactionId?: string;
34
+ }>;
35
+ //# sourceMappingURL=hubtel.d.ts.map
@@ -16,17 +16,21 @@ export declare function calculateOrderPrice(weight: number, pricingPerKg: number
16
16
  totalPrice: number;
17
17
  };
18
18
  /**
19
- * Calculate service price based on service type
20
- * Service pricing:
19
+ * Calculate service price based on service type and weight
20
+ * Pricing rules:
21
+ * - Machine capacity: 8kg per load
22
+ * - Plus 1 minus 1 logic: weight ≤ 8kg = 1 load, > 8kg but ≤ 16kg = 2 loads, etc.
21
23
  * - wash_only: ₵25/load
22
24
  * - wash_and_dry: ₵50/load
23
25
  * - dry_only: ₵25/load
26
+ * - whitesSeparate: adds another ₵25 (separate wash for whites)
24
27
  */
25
- export declare function calculateServicePrice(serviceType: "wash_only" | "wash_and_dry" | "dry_only", estimatedWeight: number, estimatedLoads: number, pricingPerKg: number, // Fallback pricing per kg
26
- deliveryFee: number, isDelivery: boolean): {
28
+ export declare function calculateServicePrice(serviceType: "wash_only" | "wash_and_dry" | "dry_only", actualWeight: number, whitesSeparate: boolean | undefined, deliveryFee: number, isDelivery: boolean): {
27
29
  basePrice: number;
28
30
  deliveryFee: number;
29
31
  totalPrice: number;
32
+ numberOfLoads: number;
33
+ whitesLoads: number;
30
34
  };
31
35
  /**
32
36
  * Format date to YYYY-MM-DD string
@@ -178,6 +178,7 @@ export declare const getAttendants: import("convex/server").RegisteredQuery<"pub
178
178
  clerkUserId?: string | undefined;
179
179
  lastLoginAt?: number | undefined;
180
180
  passcodeHash?: string | undefined;
181
+ passcodeSalt?: string | undefined;
181
182
  authenticationMethods?: ("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined;
182
183
  enrollmentTokenHash?: string | undefined;
183
184
  enrollmentTokenExpiresAt?: number | undefined;
@@ -203,7 +204,7 @@ export declare const getAttendants: import("convex/server").RegisteredQuery<"pub
203
204
  isDeleted: boolean;
204
205
  branchId: import("convex/values").GenericId<"branches">;
205
206
  isActive: boolean;
206
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
207
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
207
208
  consecutiveFailures: number;
208
209
  createdBy: import("convex/values").GenericId<"admins">;
209
210
  }[];
@@ -45,6 +45,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
45
45
  clerkUserId?: string | undefined;
46
46
  lastLoginAt?: number | undefined;
47
47
  passcodeHash?: string | undefined;
48
+ passcodeSalt?: string | undefined;
48
49
  authenticationMethods?: ("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined;
49
50
  enrollmentTokenHash?: string | undefined;
50
51
  enrollmentTokenExpiresAt?: number | undefined;
@@ -70,7 +71,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
70
71
  isDeleted: boolean;
71
72
  branchId: import("convex/values").GenericId<"branches">;
72
73
  isActive: boolean;
73
- enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
74
+ enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked";
74
75
  consecutiveFailures: number;
75
76
  createdBy: import("convex/values").GenericId<"admins">;
76
77
  }, {
@@ -79,10 +80,11 @@ declare const _default: import("convex/server").SchemaDefinition<{
79
80
  phoneNumber: import("convex/values").VString<string, "required">;
80
81
  clerkUserId: import("convex/values").VString<string | undefined, "optional">;
81
82
  passcodeHash: import("convex/values").VString<string | undefined, "optional">;
83
+ passcodeSalt: import("convex/values").VString<string | undefined, "optional">;
82
84
  authenticationMethods: import("convex/values").VArray<("biometric_face" | "biometric_hand" | "pin" | "password")[] | undefined, import("convex/values").VUnion<"biometric_face" | "biometric_hand" | "pin" | "password", [import("convex/values").VLiteral<"biometric_face", "required">, import("convex/values").VLiteral<"biometric_hand", "required">, import("convex/values").VLiteral<"pin", "required">, import("convex/values").VLiteral<"password", "required">], "required", never>, "optional">;
83
85
  branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
84
86
  isActive: import("convex/values").VBoolean<boolean, "required">;
85
- enrollmentStatus: import("convex/values").VUnion<"active" | "suspended" | "invited" | "enrolling" | "locked", [import("convex/values").VLiteral<"invited", "required">, import("convex/values").VLiteral<"enrolling", "required">, import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"suspended", "required">, import("convex/values").VLiteral<"locked", "required">], "required", never>;
87
+ enrollmentStatus: import("convex/values").VUnion<"active" | "suspended" | "invited" | "enrolling" | "biometric_complete" | "locked", [import("convex/values").VLiteral<"invited", "required">, import("convex/values").VLiteral<"enrolling", "required">, import("convex/values").VLiteral<"biometric_complete", "required">, import("convex/values").VLiteral<"active", "required">, import("convex/values").VLiteral<"suspended", "required">, import("convex/values").VLiteral<"locked", "required">], "required", never>;
86
88
  enrollmentTokenHash: import("convex/values").VString<string | undefined, "optional">;
87
89
  enrollmentTokenExpiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
88
90
  enrolledAt: import("convex/values").VFloat64<number | undefined, "optional">;
@@ -112,7 +114,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
112
114
  createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
113
115
  lastLoginAt: import("convex/values").VFloat64<number | undefined, "optional">;
114
116
  isDeleted: import("convex/values").VBoolean<boolean, "required">;
115
- }, "required", "phoneNumber" | "email" | "name" | "clerkUserId" | "createdAt" | "lastLoginAt" | "isDeleted" | "passcodeHash" | "authenticationMethods" | "branchId" | "isActive" | "enrollmentStatus" | "enrollmentTokenHash" | "enrollmentTokenExpiresAt" | "enrolledAt" | "enrolledBy" | "biometricTemplateHash" | "biometricDataEncrypted" | "biometricCaptureMetadata" | "lastVerificationAt" | "lastVerificationSuccess" | "consecutiveFailures" | "verificationTimeoutAt" | "createdBy" | "biometricCaptureMetadata.captureType" | "biometricCaptureMetadata.anglesCaptured" | "biometricCaptureMetadata.captureQuality" | "biometricCaptureMetadata.livenessPassed" | "biometricCaptureMetadata.deviceInfo" | "biometricCaptureMetadata.captureTimestamp">, {
117
+ }, "required", "phoneNumber" | "email" | "name" | "clerkUserId" | "createdAt" | "lastLoginAt" | "isDeleted" | "passcodeHash" | "passcodeSalt" | "authenticationMethods" | "branchId" | "isActive" | "enrollmentStatus" | "enrollmentTokenHash" | "enrollmentTokenExpiresAt" | "enrolledAt" | "enrolledBy" | "biometricTemplateHash" | "biometricDataEncrypted" | "biometricCaptureMetadata" | "lastVerificationAt" | "lastVerificationSuccess" | "consecutiveFailures" | "verificationTimeoutAt" | "createdBy" | "biometricCaptureMetadata.captureType" | "biometricCaptureMetadata.anglesCaptured" | "biometricCaptureMetadata.captureQuality" | "biometricCaptureMetadata.livenessPassed" | "biometricCaptureMetadata.deviceInfo" | "biometricCaptureMetadata.captureTimestamp">, {
116
118
  by_branch: ["branchId", "_creationTime"];
117
119
  by_email: ["email", "_creationTime"];
118
120
  by_phone: ["phoneNumber", "_creationTime"];
@@ -831,7 +833,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
831
833
  deviceInfo?: string | undefined;
832
834
  ipAddress?: string | undefined;
833
835
  confidenceScore?: number | undefined;
834
- fallbackUsed?: "otp" | "admin_verification" | "device_pin" | undefined;
836
+ fallbackUsed?: "pin" | "otp" | "admin_verification" | "device_pin" | undefined;
835
837
  actionContext?: {
836
838
  orderId?: import("convex/values").GenericId<"orders"> | undefined;
837
839
  amount?: number | undefined;
@@ -867,7 +869,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
867
869
  success: import("convex/values").VBoolean<boolean, "required">;
868
870
  confidenceScore: import("convex/values").VFloat64<number | undefined, "optional">;
869
871
  matchThreshold: import("convex/values").VFloat64<number | undefined, "optional">;
870
- fallbackUsed: import("convex/values").VUnion<"otp" | "admin_verification" | "device_pin" | undefined, [import("convex/values").VLiteral<"otp", "required">, import("convex/values").VLiteral<"admin_verification", "required">, import("convex/values").VLiteral<"device_pin", "required">], "optional", never>;
872
+ fallbackUsed: import("convex/values").VUnion<"pin" | "otp" | "admin_verification" | "device_pin" | undefined, [import("convex/values").VLiteral<"otp", "required">, import("convex/values").VLiteral<"admin_verification", "required">, import("convex/values").VLiteral<"device_pin", "required">, import("convex/values").VLiteral<"pin", "required">], "optional", never>;
871
873
  captureMetadata: import("convex/values").VObject<{
872
874
  deviceInfo?: string | undefined;
873
875
  captureType: "face" | "hand";
@@ -317,6 +317,34 @@ export declare const checkInOnlineOrder: import("convex/server").RegisteredMutat
317
317
  }, Promise<{
318
318
  success: boolean;
319
319
  orderId: import("convex/values").GenericId<"orders">;
320
+ ussdSent: boolean;
321
+ ussdMessage: string | undefined;
322
+ }>>;
323
+ /**
324
+ * Cancel/reject online order (requires identity verification)
325
+ */
326
+ export declare const cancelOnlineOrder: import("convex/server").RegisteredMutation<"public", {
327
+ reason?: string | undefined;
328
+ orderId: import("convex/values").GenericId<"orders">;
329
+ verificationId: import("convex/values").GenericId<"biometricVerifications">;
330
+ stationToken: string;
331
+ }, Promise<{
332
+ success: boolean;
333
+ orderId: import("convex/values").GenericId<"orders">;
334
+ }>>;
335
+ /**
336
+ * Get station/branch info (pricing, etc.)
337
+ */
338
+ export declare const getStationInfo: import("convex/server").RegisteredQuery<"public", {
339
+ stationToken: string;
340
+ }, Promise<{
341
+ branchId: import("convex/values").GenericId<"branches">;
342
+ branchName: string;
343
+ pricingPerKg: number;
344
+ deliveryFee: number;
345
+ terminalId: string | undefined;
346
+ deviceId: string;
347
+ loggedInAt: number;
320
348
  }>>;
321
349
  /**
322
350
  * Get station analytics/dashboard stats
@@ -339,6 +367,27 @@ export declare const getStationStats: import("convex/server").RegisteredQuery<"p
339
367
  };
340
368
  averageOrderValue: number;
341
369
  }>>;
370
+ /**
371
+ * Get station transaction history (paid orders)
372
+ */
373
+ export declare const getStationTransactions: import("convex/server").RegisteredQuery<"public", {
374
+ startDate?: number | undefined;
375
+ endDate?: number | undefined;
376
+ stationToken: string;
377
+ }, Promise<{
378
+ orderId: import("convex/values").GenericId<"orders">;
379
+ orderCode: string;
380
+ amount: number;
381
+ paymentMethod: "mobile_money" | "card" | "cash";
382
+ orderType: "walk_in" | "online";
383
+ status: "pending_dropoff" | "checked_in" | "sorting" | "washing" | "drying" | "folding" | "ready" | "completed" | "cancelled" | "pending" | "in_progress" | "ready_for_pickup" | "delivered";
384
+ staffId: any;
385
+ staffName: any;
386
+ verifiedAt: number;
387
+ customerPhone: string;
388
+ customerName: string;
389
+ createdAt: number;
390
+ }[]>>;
342
391
  /**
343
392
  * Search customers for station
344
393
  */
@@ -587,6 +636,7 @@ export declare const getActiveBagNumbers: import("convex/server").RegisteredQuer
587
636
  export declare const createWalkInOrder: import("convex/server").RegisteredMutation<"public", {
588
637
  customerEmail?: string | undefined;
589
638
  itemCount?: number | undefined;
639
+ whitesSeparate?: boolean | undefined;
590
640
  notes?: string | undefined;
591
641
  isDelivery?: boolean | undefined;
592
642
  deliveryAddress?: string | undefined;
@@ -608,4 +658,20 @@ export declare const createWalkInOrder: import("convex/server").RegisteredMutati
608
658
  orderNumber: string;
609
659
  bagCardNumber: string;
610
660
  }>>;
661
+ /**
662
+ * Complete payment for walk-in order (requires identity verification)
663
+ * Sends USSD code to customer if payment method is mobile_money
664
+ */
665
+ export declare const completeWalkInPayment: import("convex/server").RegisteredMutation<"public", {
666
+ amountTendered?: number | undefined;
667
+ paymentMethod: "mobile_money" | "cash";
668
+ orderId: import("convex/values").GenericId<"orders">;
669
+ verificationId: import("convex/values").GenericId<"biometricVerifications">;
670
+ stationToken: string;
671
+ }, Promise<{
672
+ success: boolean;
673
+ paymentId: import("convex/values").GenericId<"payments">;
674
+ orderId: import("convex/values").GenericId<"orders">;
675
+ ussdSent: boolean;
676
+ }>>;
611
677
  //# 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.5",
3
+ "version": "1.1.51",
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",