@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
package/convex/schema.d.ts
CHANGED
|
@@ -42,32 +42,81 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
42
42
|
by_status: ["status", "_creationTime"];
|
|
43
43
|
}, {}, {}>;
|
|
44
44
|
attendants: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
45
|
+
clerkUserId?: string | undefined;
|
|
45
46
|
lastLoginAt?: number | undefined;
|
|
46
47
|
passcode?: string | undefined;
|
|
48
|
+
enrollmentTokenHash?: string | undefined;
|
|
49
|
+
enrollmentTokenExpiresAt?: number | undefined;
|
|
50
|
+
enrolledAt?: number | undefined;
|
|
51
|
+
enrolledBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
52
|
+
biometricTemplateHash?: string | undefined;
|
|
53
|
+
biometricDataEncrypted?: string | undefined;
|
|
54
|
+
biometricCaptureMetadata?: {
|
|
55
|
+
deviceInfo?: string | undefined;
|
|
56
|
+
captureType: "face" | "hand";
|
|
57
|
+
anglesCaptured: string[];
|
|
58
|
+
captureQuality: number;
|
|
59
|
+
livenessPassed: boolean;
|
|
60
|
+
captureTimestamp: number;
|
|
61
|
+
} | undefined;
|
|
62
|
+
lastVerificationAt?: number | undefined;
|
|
63
|
+
lastVerificationSuccess?: boolean | undefined;
|
|
64
|
+
verificationTimeoutAt?: number | undefined;
|
|
47
65
|
phoneNumber: string;
|
|
48
66
|
email: string;
|
|
49
67
|
name: string;
|
|
50
|
-
clerkUserId: string;
|
|
51
68
|
createdAt: number;
|
|
52
69
|
isDeleted: boolean;
|
|
53
70
|
branchId: import("convex/values").GenericId<"branches">;
|
|
54
71
|
isActive: boolean;
|
|
72
|
+
enrollmentStatus: "active" | "suspended" | "invited" | "enrolling" | "locked";
|
|
73
|
+
consecutiveFailures: number;
|
|
74
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
55
75
|
}, {
|
|
56
76
|
name: import("convex/values").VString<string, "required">;
|
|
57
77
|
email: import("convex/values").VString<string, "required">;
|
|
58
78
|
phoneNumber: import("convex/values").VString<string, "required">;
|
|
59
|
-
clerkUserId: import("convex/values").VString<string, "
|
|
79
|
+
clerkUserId: import("convex/values").VString<string | undefined, "optional">;
|
|
60
80
|
passcode: import("convex/values").VString<string | undefined, "optional">;
|
|
61
81
|
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
62
82
|
isActive: import("convex/values").VBoolean<boolean, "required">;
|
|
83
|
+
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>;
|
|
84
|
+
enrollmentTokenHash: import("convex/values").VString<string | undefined, "optional">;
|
|
85
|
+
enrollmentTokenExpiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
86
|
+
enrolledAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
87
|
+
enrolledBy: import("convex/values").VId<import("convex/values").GenericId<"admins"> | undefined, "optional">;
|
|
88
|
+
biometricTemplateHash: import("convex/values").VString<string | undefined, "optional">;
|
|
89
|
+
biometricDataEncrypted: import("convex/values").VString<string | undefined, "optional">;
|
|
90
|
+
biometricCaptureMetadata: import("convex/values").VObject<{
|
|
91
|
+
deviceInfo?: string | undefined;
|
|
92
|
+
captureType: "face" | "hand";
|
|
93
|
+
anglesCaptured: string[];
|
|
94
|
+
captureQuality: number;
|
|
95
|
+
livenessPassed: boolean;
|
|
96
|
+
captureTimestamp: number;
|
|
97
|
+
} | undefined, {
|
|
98
|
+
captureType: import("convex/values").VUnion<"face" | "hand", [import("convex/values").VLiteral<"face", "required">, import("convex/values").VLiteral<"hand", "required">], "required", never>;
|
|
99
|
+
anglesCaptured: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
100
|
+
captureQuality: import("convex/values").VFloat64<number, "required">;
|
|
101
|
+
livenessPassed: import("convex/values").VBoolean<boolean, "required">;
|
|
102
|
+
deviceInfo: import("convex/values").VString<string | undefined, "optional">;
|
|
103
|
+
captureTimestamp: import("convex/values").VFloat64<number, "required">;
|
|
104
|
+
}, "optional", "captureType" | "anglesCaptured" | "captureQuality" | "livenessPassed" | "deviceInfo" | "captureTimestamp">;
|
|
105
|
+
lastVerificationAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
106
|
+
lastVerificationSuccess: import("convex/values").VBoolean<boolean | undefined, "optional">;
|
|
107
|
+
consecutiveFailures: import("convex/values").VFloat64<number, "required">;
|
|
108
|
+
verificationTimeoutAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
63
109
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
110
|
+
createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
|
|
64
111
|
lastLoginAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
65
112
|
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
66
|
-
}, "required", "phoneNumber" | "email" | "name" | "clerkUserId" | "createdAt" | "lastLoginAt" | "isDeleted" | "passcode" | "branchId" | "isActive">, {
|
|
113
|
+
}, "required", "phoneNumber" | "email" | "name" | "clerkUserId" | "createdAt" | "lastLoginAt" | "isDeleted" | "passcode" | "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">, {
|
|
67
114
|
by_branch: ["branchId", "_creationTime"];
|
|
68
115
|
by_email: ["email", "_creationTime"];
|
|
69
116
|
by_phone: ["phoneNumber", "_creationTime"];
|
|
70
117
|
by_clerk_user: ["clerkUserId", "_creationTime"];
|
|
118
|
+
by_enrollment_status: ["enrollmentStatus", "_creationTime"];
|
|
119
|
+
by_enrollment_token: ["enrollmentTokenHash", "_creationTime"];
|
|
71
120
|
}, {}, {}>;
|
|
72
121
|
admins: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
73
122
|
lastLoginAt?: number | undefined;
|
|
@@ -96,13 +145,13 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
96
145
|
createdAt: number;
|
|
97
146
|
isDeleted: boolean;
|
|
98
147
|
isActive: boolean;
|
|
148
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
99
149
|
code: string;
|
|
100
150
|
address: string;
|
|
101
151
|
city: string;
|
|
102
152
|
country: string;
|
|
103
153
|
pricingPerKg: number;
|
|
104
154
|
deliveryFee: number;
|
|
105
|
-
createdBy: import("convex/values").GenericId<"admins">;
|
|
106
155
|
}, {
|
|
107
156
|
name: import("convex/values").VString<string, "required">;
|
|
108
157
|
code: import("convex/values").VString<string, "required">;
|
|
@@ -117,13 +166,14 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
117
166
|
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
118
167
|
createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
|
|
119
168
|
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
120
|
-
}, "required", "phoneNumber" | "email" | "name" | "createdAt" | "isDeleted" | "isActive" | "code" | "address" | "city" | "country" | "pricingPerKg" | "deliveryFee"
|
|
169
|
+
}, "required", "phoneNumber" | "email" | "name" | "createdAt" | "isDeleted" | "isActive" | "createdBy" | "code" | "address" | "city" | "country" | "pricingPerKg" | "deliveryFee">, {
|
|
121
170
|
by_city: ["city", "_creationTime"];
|
|
122
171
|
by_active: ["isActive", "_creationTime"];
|
|
123
172
|
by_code: ["code", "_creationTime"];
|
|
124
173
|
}, {}, {}>;
|
|
125
174
|
orders: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
126
175
|
createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
176
|
+
customerEmail?: string | undefined;
|
|
127
177
|
estimatedWeight?: number | undefined;
|
|
128
178
|
actualWeight?: number | undefined;
|
|
129
179
|
itemCount?: number | undefined;
|
|
@@ -156,13 +206,15 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
156
206
|
updatedAt: number;
|
|
157
207
|
statusHistory: {
|
|
158
208
|
notes?: string | undefined;
|
|
209
|
+
changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
210
|
+
changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
|
|
159
211
|
status: string;
|
|
160
212
|
changedAt: number;
|
|
161
|
-
changedBy: import("convex/values").GenericId<"attendants">;
|
|
162
213
|
}[];
|
|
163
214
|
}, {
|
|
164
215
|
customerId: import("convex/values").VId<import("convex/values").GenericId<"users">, "required">;
|
|
165
216
|
customerPhoneNumber: import("convex/values").VString<string, "required">;
|
|
217
|
+
customerEmail: import("convex/values").VString<string | undefined, "optional">;
|
|
166
218
|
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
167
219
|
orderNumber: import("convex/values").VString<string, "required">;
|
|
168
220
|
orderType: import("convex/values").VUnion<"walk_in" | "online", [import("convex/values").VLiteral<"walk_in", "required">, import("convex/values").VLiteral<"online", "required">], "required", never>;
|
|
@@ -193,26 +245,30 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
193
245
|
fulfilledBy: import("convex/values").VId<import("convex/values").GenericId<"attendants"> | undefined, "optional">;
|
|
194
246
|
statusHistory: import("convex/values").VArray<{
|
|
195
247
|
notes?: string | undefined;
|
|
248
|
+
changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
249
|
+
changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
|
|
196
250
|
status: string;
|
|
197
251
|
changedAt: number;
|
|
198
|
-
changedBy: import("convex/values").GenericId<"attendants">;
|
|
199
252
|
}[], import("convex/values").VObject<{
|
|
200
253
|
notes?: string | undefined;
|
|
254
|
+
changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
|
|
255
|
+
changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
|
|
201
256
|
status: string;
|
|
202
257
|
changedAt: number;
|
|
203
|
-
changedBy: import("convex/values").GenericId<"attendants">;
|
|
204
258
|
}, {
|
|
205
259
|
status: import("convex/values").VString<string, "required">;
|
|
206
260
|
changedAt: import("convex/values").VFloat64<number, "required">;
|
|
207
|
-
changedBy: import("convex/values").VId<import("convex/values").GenericId<"attendants"
|
|
261
|
+
changedBy: import("convex/values").VId<import("convex/values").GenericId<"attendants"> | undefined, "optional">;
|
|
262
|
+
changedByAdmin: import("convex/values").VId<import("convex/values").GenericId<"admins"> | undefined, "optional">;
|
|
208
263
|
notes: import("convex/values").VString<string | undefined, "optional">;
|
|
209
|
-
}, "required", "status" | "notes" | "changedAt" | "changedBy">, "required">;
|
|
264
|
+
}, "required", "status" | "notes" | "changedAt" | "changedBy" | "changedByAdmin">, "required">;
|
|
210
265
|
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
211
|
-
}, "required", "status" | "createdAt" | "isDeleted" | "branchId" | "
|
|
266
|
+
}, "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">, {
|
|
212
267
|
by_customer: ["customerId", "_creationTime"];
|
|
213
268
|
by_branch: ["branchId", "_creationTime"];
|
|
214
269
|
by_status: ["status", "_creationTime"];
|
|
215
270
|
by_phone: ["customerPhoneNumber", "_creationTime"];
|
|
271
|
+
by_email: ["customerEmail", "_creationTime"];
|
|
216
272
|
by_order_number: ["orderNumber", "_creationTime"];
|
|
217
273
|
by_created: ["createdAt", "_creationTime"];
|
|
218
274
|
by_fulfilled_by: ["fulfilledBy", "_creationTime"];
|
|
@@ -292,11 +348,12 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
292
348
|
by_customer: ["customerId", "_creationTime"];
|
|
293
349
|
by_order: ["orderId", "_creationTime"];
|
|
294
350
|
by_created: ["createdAt", "_creationTime"];
|
|
351
|
+
by_type: ["type", "_creationTime"];
|
|
295
352
|
}, {}, {}>;
|
|
296
353
|
attendanceLogs: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
354
|
+
deviceInfo?: string | undefined;
|
|
297
355
|
clockOutAt?: number | undefined;
|
|
298
356
|
deviceId?: string | undefined;
|
|
299
|
-
deviceInfo?: string | undefined;
|
|
300
357
|
isDeleted: boolean;
|
|
301
358
|
branchId: import("convex/values").GenericId<"branches">;
|
|
302
359
|
isActive: boolean;
|
|
@@ -311,7 +368,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
311
368
|
deviceInfo: import("convex/values").VString<string | undefined, "optional">;
|
|
312
369
|
isActive: import("convex/values").VBoolean<boolean, "required">;
|
|
313
370
|
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
314
|
-
}, "required", "isDeleted" | "branchId" | "isActive" | "
|
|
371
|
+
}, "required", "isDeleted" | "branchId" | "isActive" | "deviceInfo" | "attendantId" | "clockInAt" | "clockOutAt" | "deviceId">, {
|
|
315
372
|
by_attendant: ["attendantId", "_creationTime"];
|
|
316
373
|
by_branch: ["branchId", "_creationTime"];
|
|
317
374
|
by_clock_in: ["clockInAt", "_creationTime"];
|
|
@@ -390,8 +447,8 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
390
447
|
createdAt: number;
|
|
391
448
|
isDeleted: boolean;
|
|
392
449
|
isActive: boolean;
|
|
393
|
-
code: string;
|
|
394
450
|
createdBy: import("convex/values").GenericId<"admins">;
|
|
451
|
+
code: string;
|
|
395
452
|
discountType: "percentage" | "fixed" | "free_wash";
|
|
396
453
|
discountValue: number;
|
|
397
454
|
usageLimit: number;
|
|
@@ -414,7 +471,7 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
414
471
|
createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
|
|
415
472
|
description: import("convex/values").VString<string | undefined, "optional">;
|
|
416
473
|
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
417
|
-
}, "required", "name" | "createdAt" | "isDeleted" | "isActive" | "
|
|
474
|
+
}, "required", "name" | "createdAt" | "isDeleted" | "isActive" | "createdBy" | "code" | "description" | "discountType" | "discountValue" | "usageLimit" | "usedCount" | "maxUsesPerCustomer" | "validFrom" | "validUntil" | "minOrderValue" | "applicableBranches" | "applicableServiceTypes">, {
|
|
418
475
|
by_code: ["code", "_creationTime"];
|
|
419
476
|
by_active: ["isActive", "_creationTime"];
|
|
420
477
|
by_created: ["createdAt", "_creationTime"];
|
|
@@ -511,6 +568,280 @@ declare const _default: import("convex/server").SchemaDefinition<{
|
|
|
511
568
|
by_user: ["userId", "userType", "_creationTime"];
|
|
512
569
|
by_notification_user: ["notificationId", "userId", "userType", "_creationTime"];
|
|
513
570
|
}, {}, {}>;
|
|
571
|
+
biometricProfiles: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
572
|
+
lastVerifiedAt?: number | undefined;
|
|
573
|
+
isDeleted: boolean;
|
|
574
|
+
enrolledAt: number;
|
|
575
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
576
|
+
method: "face" | "hand";
|
|
577
|
+
encryptedData: string;
|
|
578
|
+
iv: string;
|
|
579
|
+
authTag: string;
|
|
580
|
+
encryptionKeyId: string;
|
|
581
|
+
algorithm: string;
|
|
582
|
+
confidenceThreshold: number;
|
|
583
|
+
verificationCount: number;
|
|
584
|
+
version: number;
|
|
585
|
+
}, {
|
|
586
|
+
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
587
|
+
method: import("convex/values").VUnion<"face" | "hand", [import("convex/values").VLiteral<"face", "required">, import("convex/values").VLiteral<"hand", "required">], "required", never>;
|
|
588
|
+
encryptedData: import("convex/values").VString<string, "required">;
|
|
589
|
+
iv: import("convex/values").VString<string, "required">;
|
|
590
|
+
authTag: import("convex/values").VString<string, "required">;
|
|
591
|
+
encryptionKeyId: import("convex/values").VString<string, "required">;
|
|
592
|
+
algorithm: import("convex/values").VString<string, "required">;
|
|
593
|
+
confidenceThreshold: import("convex/values").VFloat64<number, "required">;
|
|
594
|
+
enrolledAt: import("convex/values").VFloat64<number, "required">;
|
|
595
|
+
lastVerifiedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
596
|
+
verificationCount: import("convex/values").VFloat64<number, "required">;
|
|
597
|
+
version: import("convex/values").VFloat64<number, "required">;
|
|
598
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
599
|
+
}, "required", "isDeleted" | "enrolledAt" | "attendantId" | "method" | "encryptedData" | "iv" | "authTag" | "encryptionKeyId" | "algorithm" | "confidenceThreshold" | "lastVerifiedAt" | "verificationCount" | "version">, {
|
|
600
|
+
by_attendant: ["attendantId", "_creationTime"];
|
|
601
|
+
by_method: ["method", "_creationTime"];
|
|
602
|
+
}, {}, {}>;
|
|
603
|
+
biometricVerificationSessions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
604
|
+
deviceInfo?: string | undefined;
|
|
605
|
+
confidenceScore?: number | undefined;
|
|
606
|
+
fallbackUsed?: "otp" | "admin_verification" | undefined;
|
|
607
|
+
otpHash?: string | undefined;
|
|
608
|
+
otpExpiresAt?: number | undefined;
|
|
609
|
+
adminVerifiedBy?: import("convex/values").GenericId<"admins"> | undefined;
|
|
610
|
+
verifiedAt?: number | undefined;
|
|
611
|
+
status: "pending" | "failed" | "expired" | "verified";
|
|
612
|
+
createdAt: number;
|
|
613
|
+
isDeleted: boolean;
|
|
614
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
615
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
616
|
+
expiresAt: number;
|
|
617
|
+
sessionType: "enrollment" | "login" | "re_verification";
|
|
618
|
+
challenge: string;
|
|
619
|
+
challengeHash: string;
|
|
620
|
+
}, {
|
|
621
|
+
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
622
|
+
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
623
|
+
sessionType: import("convex/values").VUnion<"enrollment" | "login" | "re_verification", [import("convex/values").VLiteral<"enrollment", "required">, import("convex/values").VLiteral<"login", "required">, import("convex/values").VLiteral<"re_verification", "required">], "required", never>;
|
|
624
|
+
challenge: import("convex/values").VString<string, "required">;
|
|
625
|
+
challengeHash: import("convex/values").VString<string, "required">;
|
|
626
|
+
status: import("convex/values").VUnion<"pending" | "failed" | "expired" | "verified", [import("convex/values").VLiteral<"pending", "required">, import("convex/values").VLiteral<"verified", "required">, import("convex/values").VLiteral<"failed", "required">, import("convex/values").VLiteral<"expired", "required">], "required", never>;
|
|
627
|
+
confidenceScore: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
628
|
+
fallbackUsed: import("convex/values").VUnion<"otp" | "admin_verification" | undefined, [import("convex/values").VLiteral<"otp", "required">, import("convex/values").VLiteral<"admin_verification", "required">], "optional", never>;
|
|
629
|
+
otpHash: import("convex/values").VString<string | undefined, "optional">;
|
|
630
|
+
otpExpiresAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
631
|
+
adminVerifiedBy: import("convex/values").VId<import("convex/values").GenericId<"admins"> | undefined, "optional">;
|
|
632
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
633
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
634
|
+
verifiedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
635
|
+
deviceInfo: import("convex/values").VString<string | undefined, "optional">;
|
|
636
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
637
|
+
}, "required", "status" | "createdAt" | "isDeleted" | "branchId" | "deviceInfo" | "attendantId" | "expiresAt" | "sessionType" | "challenge" | "challengeHash" | "confidenceScore" | "fallbackUsed" | "otpHash" | "otpExpiresAt" | "adminVerifiedBy" | "verifiedAt">, {
|
|
638
|
+
by_attendant: ["attendantId", "_creationTime"];
|
|
639
|
+
by_branch: ["branchId", "_creationTime"];
|
|
640
|
+
by_status: ["status", "_creationTime"];
|
|
641
|
+
by_challenge_hash: ["challengeHash", "_creationTime"];
|
|
642
|
+
}, {}, {}>;
|
|
643
|
+
attendantSessions: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
644
|
+
deviceInfo?: string | undefined;
|
|
645
|
+
ipAddress?: string | undefined;
|
|
646
|
+
userAgent?: string | undefined;
|
|
647
|
+
revokedAt?: number | undefined;
|
|
648
|
+
createdAt: number;
|
|
649
|
+
isDeleted: boolean;
|
|
650
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
651
|
+
isActive: boolean;
|
|
652
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
653
|
+
expiresAt: number;
|
|
654
|
+
sessionTokenHash: string;
|
|
655
|
+
refreshTokenHash: string;
|
|
656
|
+
refreshExpiresAt: number;
|
|
657
|
+
lastActivityAt: number;
|
|
658
|
+
}, {
|
|
659
|
+
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
660
|
+
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
661
|
+
sessionTokenHash: import("convex/values").VString<string, "required">;
|
|
662
|
+
refreshTokenHash: import("convex/values").VString<string, "required">;
|
|
663
|
+
deviceInfo: import("convex/values").VString<string | undefined, "optional">;
|
|
664
|
+
ipAddress: import("convex/values").VString<string | undefined, "optional">;
|
|
665
|
+
userAgent: import("convex/values").VString<string | undefined, "optional">;
|
|
666
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
667
|
+
refreshExpiresAt: import("convex/values").VFloat64<number, "required">;
|
|
668
|
+
isActive: import("convex/values").VBoolean<boolean, "required">;
|
|
669
|
+
lastActivityAt: import("convex/values").VFloat64<number, "required">;
|
|
670
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
671
|
+
revokedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
672
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
673
|
+
}, "required", "createdAt" | "isDeleted" | "branchId" | "isActive" | "deviceInfo" | "attendantId" | "ipAddress" | "expiresAt" | "sessionTokenHash" | "refreshTokenHash" | "userAgent" | "refreshExpiresAt" | "lastActivityAt" | "revokedAt">, {
|
|
674
|
+
by_attendant: ["attendantId", "_creationTime"];
|
|
675
|
+
by_branch: ["branchId", "_creationTime"];
|
|
676
|
+
by_session_token: ["sessionTokenHash", "_creationTime"];
|
|
677
|
+
by_active: ["isActive", "_creationTime"];
|
|
678
|
+
}, {}, {}>;
|
|
679
|
+
enrollmentTokens: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
680
|
+
usedAt?: number | undefined;
|
|
681
|
+
createdAt: number;
|
|
682
|
+
isDeleted: boolean;
|
|
683
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
684
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
685
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
686
|
+
expiresAt: number;
|
|
687
|
+
tokenHash: string;
|
|
688
|
+
plainToken: string;
|
|
689
|
+
isUsed: boolean;
|
|
690
|
+
}, {
|
|
691
|
+
tokenHash: import("convex/values").VString<string, "required">;
|
|
692
|
+
plainToken: import("convex/values").VString<string, "required">;
|
|
693
|
+
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
694
|
+
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
695
|
+
createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
|
|
696
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
697
|
+
usedAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
698
|
+
isUsed: import("convex/values").VBoolean<boolean, "required">;
|
|
699
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
700
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
701
|
+
}, "required", "createdAt" | "isDeleted" | "branchId" | "createdBy" | "attendantId" | "usedAt" | "expiresAt" | "tokenHash" | "plainToken" | "isUsed">, {
|
|
702
|
+
by_token_hash: ["tokenHash", "_creationTime"];
|
|
703
|
+
by_attendant: ["attendantId", "_creationTime"];
|
|
704
|
+
by_expires_at: ["expiresAt", "_creationTime"];
|
|
705
|
+
}, {}, {}>;
|
|
706
|
+
biometricChallenges: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
707
|
+
createdAt: number;
|
|
708
|
+
isDeleted: boolean;
|
|
709
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
710
|
+
expiresAt: number;
|
|
711
|
+
challenge: string;
|
|
712
|
+
challengeHash: string;
|
|
713
|
+
isUsed: boolean;
|
|
714
|
+
}, {
|
|
715
|
+
challengeHash: import("convex/values").VString<string, "required">;
|
|
716
|
+
challenge: import("convex/values").VString<string, "required">;
|
|
717
|
+
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
718
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
719
|
+
isUsed: import("convex/values").VBoolean<boolean, "required">;
|
|
720
|
+
createdAt: import("convex/values").VFloat64<number, "required">;
|
|
721
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
722
|
+
}, "required", "createdAt" | "isDeleted" | "attendantId" | "expiresAt" | "challenge" | "challengeHash" | "isUsed">, {
|
|
723
|
+
by_challenge_hash: ["challengeHash", "_creationTime"];
|
|
724
|
+
by_attendant: ["attendantId", "_creationTime"];
|
|
725
|
+
by_expires_at: ["expiresAt", "_creationTime"];
|
|
726
|
+
}, {}, {}>;
|
|
727
|
+
biometricEnrollments: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
728
|
+
enrolledAt?: number | undefined;
|
|
729
|
+
deviceInfo?: string | undefined;
|
|
730
|
+
status: "pending" | "in_progress" | "completed" | "failed" | "expired";
|
|
731
|
+
isDeleted: boolean;
|
|
732
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
733
|
+
enrollmentTokenHash: string;
|
|
734
|
+
createdBy: import("convex/values").GenericId<"admins">;
|
|
735
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
736
|
+
tokenCreatedAt: number;
|
|
737
|
+
tokenExpiresAt: number;
|
|
738
|
+
captureAttempts: {
|
|
739
|
+
captureQuality?: number | undefined;
|
|
740
|
+
errorMessage?: string | undefined;
|
|
741
|
+
timestamp: number;
|
|
742
|
+
success: boolean;
|
|
743
|
+
attemptNumber: number;
|
|
744
|
+
}[];
|
|
745
|
+
}, {
|
|
746
|
+
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
747
|
+
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
748
|
+
enrollmentTokenHash: import("convex/values").VString<string, "required">;
|
|
749
|
+
status: import("convex/values").VUnion<"pending" | "in_progress" | "completed" | "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>;
|
|
750
|
+
tokenCreatedAt: import("convex/values").VFloat64<number, "required">;
|
|
751
|
+
tokenExpiresAt: import("convex/values").VFloat64<number, "required">;
|
|
752
|
+
enrolledAt: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
753
|
+
captureAttempts: import("convex/values").VArray<{
|
|
754
|
+
captureQuality?: number | undefined;
|
|
755
|
+
errorMessage?: string | undefined;
|
|
756
|
+
timestamp: number;
|
|
757
|
+
success: boolean;
|
|
758
|
+
attemptNumber: number;
|
|
759
|
+
}[], import("convex/values").VObject<{
|
|
760
|
+
captureQuality?: number | undefined;
|
|
761
|
+
errorMessage?: string | undefined;
|
|
762
|
+
timestamp: number;
|
|
763
|
+
success: boolean;
|
|
764
|
+
attemptNumber: number;
|
|
765
|
+
}, {
|
|
766
|
+
attemptNumber: import("convex/values").VFloat64<number, "required">;
|
|
767
|
+
timestamp: import("convex/values").VFloat64<number, "required">;
|
|
768
|
+
success: import("convex/values").VBoolean<boolean, "required">;
|
|
769
|
+
errorMessage: import("convex/values").VString<string | undefined, "optional">;
|
|
770
|
+
captureQuality: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
771
|
+
}, "required", "captureQuality" | "timestamp" | "success" | "attemptNumber" | "errorMessage">, "required">;
|
|
772
|
+
createdBy: import("convex/values").VId<import("convex/values").GenericId<"admins">, "required">;
|
|
773
|
+
deviceInfo: import("convex/values").VString<string | undefined, "optional">;
|
|
774
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
775
|
+
}, "required", "status" | "isDeleted" | "branchId" | "enrollmentTokenHash" | "enrolledAt" | "deviceInfo" | "createdBy" | "attendantId" | "tokenCreatedAt" | "tokenExpiresAt" | "captureAttempts">, {
|
|
776
|
+
by_attendant: ["attendantId", "_creationTime"];
|
|
777
|
+
by_token_hash: ["enrollmentTokenHash", "_creationTime"];
|
|
778
|
+
by_status: ["status", "_creationTime"];
|
|
779
|
+
by_branch: ["branchId", "_creationTime"];
|
|
780
|
+
}, {}, {}>;
|
|
781
|
+
biometricVerifications: import("convex/server").TableDefinition<import("convex/values").VObject<{
|
|
782
|
+
deviceInfo?: string | undefined;
|
|
783
|
+
ipAddress?: string | undefined;
|
|
784
|
+
confidenceScore?: number | undefined;
|
|
785
|
+
fallbackUsed?: "otp" | "admin_verification" | "device_pin" | undefined;
|
|
786
|
+
actionContext?: {
|
|
787
|
+
orderId?: import("convex/values").GenericId<"orders"> | undefined;
|
|
788
|
+
amount?: number | undefined;
|
|
789
|
+
actionType?: string | undefined;
|
|
790
|
+
} | undefined;
|
|
791
|
+
matchThreshold?: number | undefined;
|
|
792
|
+
captureMetadata?: {
|
|
793
|
+
deviceInfo?: string | undefined;
|
|
794
|
+
captureType: "face" | "hand";
|
|
795
|
+
livenessPassed: boolean;
|
|
796
|
+
anglesVerified: string[];
|
|
797
|
+
} | undefined;
|
|
798
|
+
isDeleted: boolean;
|
|
799
|
+
branchId: import("convex/values").GenericId<"branches">;
|
|
800
|
+
attendantId: import("convex/values").GenericId<"attendants">;
|
|
801
|
+
success: boolean;
|
|
802
|
+
expiresAt: number;
|
|
803
|
+
verifiedAt: number;
|
|
804
|
+
verificationType: "action" | "login" | "session_renewal";
|
|
805
|
+
}, {
|
|
806
|
+
attendantId: import("convex/values").VId<import("convex/values").GenericId<"attendants">, "required">;
|
|
807
|
+
branchId: import("convex/values").VId<import("convex/values").GenericId<"branches">, "required">;
|
|
808
|
+
verificationType: import("convex/values").VUnion<"action" | "login" | "session_renewal", [import("convex/values").VLiteral<"login", "required">, import("convex/values").VLiteral<"action", "required">, import("convex/values").VLiteral<"session_renewal", "required">], "required", never>;
|
|
809
|
+
actionContext: import("convex/values").VObject<{
|
|
810
|
+
orderId?: import("convex/values").GenericId<"orders"> | undefined;
|
|
811
|
+
amount?: number | undefined;
|
|
812
|
+
actionType?: string | undefined;
|
|
813
|
+
} | undefined, {
|
|
814
|
+
actionType: import("convex/values").VString<string | undefined, "optional">;
|
|
815
|
+
orderId: import("convex/values").VId<import("convex/values").GenericId<"orders"> | undefined, "optional">;
|
|
816
|
+
amount: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
817
|
+
}, "optional", "orderId" | "amount" | "actionType">;
|
|
818
|
+
success: import("convex/values").VBoolean<boolean, "required">;
|
|
819
|
+
confidenceScore: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
820
|
+
matchThreshold: import("convex/values").VFloat64<number | undefined, "optional">;
|
|
821
|
+
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>;
|
|
822
|
+
captureMetadata: import("convex/values").VObject<{
|
|
823
|
+
deviceInfo?: string | undefined;
|
|
824
|
+
captureType: "face" | "hand";
|
|
825
|
+
livenessPassed: boolean;
|
|
826
|
+
anglesVerified: string[];
|
|
827
|
+
} | undefined, {
|
|
828
|
+
captureType: import("convex/values").VUnion<"face" | "hand", [import("convex/values").VLiteral<"face", "required">, import("convex/values").VLiteral<"hand", "required">], "required", never>;
|
|
829
|
+
anglesVerified: import("convex/values").VArray<string[], import("convex/values").VString<string, "required">, "required">;
|
|
830
|
+
livenessPassed: import("convex/values").VBoolean<boolean, "required">;
|
|
831
|
+
deviceInfo: import("convex/values").VString<string | undefined, "optional">;
|
|
832
|
+
}, "optional", "captureType" | "livenessPassed" | "deviceInfo" | "anglesVerified">;
|
|
833
|
+
verifiedAt: import("convex/values").VFloat64<number, "required">;
|
|
834
|
+
expiresAt: import("convex/values").VFloat64<number, "required">;
|
|
835
|
+
deviceInfo: import("convex/values").VString<string | undefined, "optional">;
|
|
836
|
+
ipAddress: import("convex/values").VString<string | undefined, "optional">;
|
|
837
|
+
isDeleted: import("convex/values").VBoolean<boolean, "required">;
|
|
838
|
+
}, "required", "isDeleted" | "branchId" | "deviceInfo" | "attendantId" | "ipAddress" | "success" | "expiresAt" | "confidenceScore" | "fallbackUsed" | "verifiedAt" | "verificationType" | "actionContext" | "matchThreshold" | "captureMetadata" | "actionContext.orderId" | "actionContext.amount" | "actionContext.actionType" | "captureMetadata.captureType" | "captureMetadata.livenessPassed" | "captureMetadata.deviceInfo" | "captureMetadata.anglesVerified">, {
|
|
839
|
+
by_attendant: ["attendantId", "_creationTime"];
|
|
840
|
+
by_branch: ["branchId", "_creationTime"];
|
|
841
|
+
by_verification_type: ["verificationType", "_creationTime"];
|
|
842
|
+
by_verified_at: ["verifiedAt", "_creationTime"];
|
|
843
|
+
by_success: ["success", "_creationTime"];
|
|
844
|
+
}, {}, {}>;
|
|
514
845
|
}, true>;
|
|
515
846
|
export default _default;
|
|
516
847
|
//# sourceMappingURL=schema.d.ts.map
|
package/convex/vouchers.d.ts
CHANGED
|
@@ -8,8 +8,8 @@
|
|
|
8
8
|
*/
|
|
9
9
|
export declare const getAll: import("convex/server").RegisteredQuery<"public", {
|
|
10
10
|
includeInactive?: boolean | undefined;
|
|
11
|
-
cursor?: string | undefined;
|
|
12
11
|
numItems?: number | undefined;
|
|
12
|
+
cursor?: string | undefined;
|
|
13
13
|
}, Promise<{
|
|
14
14
|
page: {
|
|
15
15
|
_id: import("convex/values").GenericId<"vouchers">;
|
|
@@ -25,8 +25,8 @@ export declare const getAll: import("convex/server").RegisteredQuery<"public", {
|
|
|
25
25
|
createdAt: number;
|
|
26
26
|
isDeleted: boolean;
|
|
27
27
|
isActive: boolean;
|
|
28
|
-
code: string;
|
|
29
28
|
createdBy: import("convex/values").GenericId<"admins">;
|
|
29
|
+
code: string;
|
|
30
30
|
discountType: "percentage" | "fixed" | "free_wash";
|
|
31
31
|
discountValue: number;
|
|
32
32
|
usageLimit: number;
|
|
@@ -54,8 +54,8 @@ export declare const getActive: import("convex/server").RegisteredQuery<"public"
|
|
|
54
54
|
createdAt: number;
|
|
55
55
|
isDeleted: boolean;
|
|
56
56
|
isActive: boolean;
|
|
57
|
-
code: string;
|
|
58
57
|
createdBy: import("convex/values").GenericId<"admins">;
|
|
58
|
+
code: string;
|
|
59
59
|
discountType: "percentage" | "fixed" | "free_wash";
|
|
60
60
|
discountValue: number;
|
|
61
61
|
usageLimit: number;
|
|
@@ -80,8 +80,8 @@ export declare const getByCode: import("convex/server").RegisteredQuery<"public"
|
|
|
80
80
|
createdAt: number;
|
|
81
81
|
isDeleted: boolean;
|
|
82
82
|
isActive: boolean;
|
|
83
|
-
code: string;
|
|
84
83
|
createdBy: import("convex/values").GenericId<"admins">;
|
|
84
|
+
code: string;
|
|
85
85
|
discountType: "percentage" | "fixed" | "free_wash";
|
|
86
86
|
discountValue: number;
|
|
87
87
|
usageLimit: number;
|
|
@@ -165,8 +165,8 @@ export declare const applyToOrder: import("convex/server").RegisteredMutation<"p
|
|
|
165
165
|
*/
|
|
166
166
|
export declare const getUsageHistory: import("convex/server").RegisteredQuery<"public", {
|
|
167
167
|
voucherId?: import("convex/values").GenericId<"vouchers"> | undefined;
|
|
168
|
-
cursor?: string | undefined;
|
|
169
168
|
numItems?: number | undefined;
|
|
169
|
+
cursor?: string | undefined;
|
|
170
170
|
}, Promise<{
|
|
171
171
|
page: {
|
|
172
172
|
_id: import("convex/values").GenericId<"voucherUsages">;
|