@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.
@@ -25,26 +25,81 @@ export declare const getByOrder: import("convex/server").RegisteredQuery<"public
25
25
  currency: string;
26
26
  } | null>>;
27
27
  /**
28
- * Get payment history by customer
28
+ * Get payment history by customer - Paginated
29
+ * Supports usePaginatedQuery for infinite scroll
29
30
  */
30
31
  export declare const getByCustomer: import("convex/server").RegisteredQuery<"public", {
31
- limit?: number | undefined;
32
+ paginationOpts: {
33
+ id?: number;
34
+ endCursor?: string | null;
35
+ maximumRowsRead?: number;
36
+ maximumBytesRead?: number;
37
+ numItems: number;
38
+ cursor: string | null;
39
+ };
32
40
  }, Promise<{
33
- _id: import("convex/values").GenericId<"payments">;
34
- _creationTime: number;
35
- gatewayTransactionId?: string | undefined;
36
- gatewayResponse?: string | undefined;
37
- completedAt?: number | undefined;
38
- processedBy?: import("convex/values").GenericId<"attendants"> | undefined;
39
- status: "pending" | "completed" | "failed" | "refunded" | "processing";
40
- createdAt: number;
41
- isDeleted: boolean;
42
- customerId: import("convex/values").GenericId<"users">;
43
- paymentMethod: "mobile_money" | "card" | "cash";
44
- orderId: import("convex/values").GenericId<"orders">;
45
- amount: number;
46
- currency: string;
47
- }[]>>;
41
+ page: {
42
+ order: {
43
+ _id: import("convex/values").GenericId<"orders">;
44
+ _creationTime: number;
45
+ createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
46
+ customerEmail?: string | undefined;
47
+ estimatedWeight?: number | undefined;
48
+ actualWeight?: number | undefined;
49
+ itemCount?: number | undefined;
50
+ estimatedLoads?: number | undefined;
51
+ whitesSeparate?: boolean | undefined;
52
+ bagCardNumber?: string | undefined;
53
+ notes?: string | undefined;
54
+ deliveryAddress?: string | undefined;
55
+ deliveryPhoneNumber?: string | undefined;
56
+ deliveryHall?: string | undefined;
57
+ deliveryRoom?: string | undefined;
58
+ paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
59
+ paymentId?: import("convex/values").GenericId<"payments"> | undefined;
60
+ fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
61
+ status: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
62
+ createdAt: number;
63
+ isDeleted: boolean;
64
+ branchId: import("convex/values").GenericId<"branches">;
65
+ deliveryFee: number;
66
+ customerId: import("convex/values").GenericId<"users">;
67
+ customerPhoneNumber: string;
68
+ orderNumber: string;
69
+ orderType: "walk_in" | "online";
70
+ serviceType: "wash_only" | "wash_and_dry" | "dry_only";
71
+ isDelivery: boolean;
72
+ basePrice: number;
73
+ totalPrice: number;
74
+ finalPrice: number;
75
+ paymentStatus: "pending" | "paid" | "failed" | "refunded";
76
+ updatedAt: number;
77
+ statusHistory: {
78
+ notes?: string | undefined;
79
+ changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
80
+ changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
81
+ status: string;
82
+ changedAt: number;
83
+ }[];
84
+ } | null;
85
+ _id: import("convex/values").GenericId<"payments">;
86
+ _creationTime: number;
87
+ gatewayTransactionId?: string | undefined;
88
+ gatewayResponse?: string | undefined;
89
+ completedAt?: number | undefined;
90
+ processedBy?: import("convex/values").GenericId<"attendants"> | undefined;
91
+ status: "pending" | "completed" | "failed" | "refunded" | "processing";
92
+ createdAt: number;
93
+ isDeleted: boolean;
94
+ customerId: import("convex/values").GenericId<"users">;
95
+ paymentMethod: "mobile_money" | "card" | "cash";
96
+ orderId: import("convex/values").GenericId<"orders">;
97
+ amount: number;
98
+ currency: string;
99
+ }[];
100
+ isDone: boolean;
101
+ continueCursor: string;
102
+ }>>;
48
103
  /**
49
104
  * Create payment record
50
105
  */
@@ -91,14 +146,99 @@ export declare const refund: import("convex/server").RegisteredMutation<"public"
91
146
  * Supports usePaginatedQuery for infinite scroll
92
147
  */
93
148
  export declare const getTransactionHistory: import("convex/server").RegisteredQuery<"public", {
149
+ status?: "pending" | "completed" | "failed" | "refunded" | "processing" | undefined;
94
150
  branchId?: import("convex/values").GenericId<"branches"> | undefined;
95
151
  paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
96
- cursor?: string | undefined;
97
- numItems?: number | undefined;
98
152
  startDate?: number | undefined;
99
153
  endDate?: number | undefined;
154
+ paginationOpts: {
155
+ id?: number;
156
+ endCursor?: string | null;
157
+ maximumRowsRead?: number;
158
+ maximumBytesRead?: number;
159
+ numItems: number;
160
+ cursor: string | null;
161
+ };
100
162
  }, Promise<{
101
163
  page: {
164
+ order: {
165
+ _id: import("convex/values").GenericId<"orders">;
166
+ _creationTime: number;
167
+ createdBy?: import("convex/values").GenericId<"attendants"> | undefined;
168
+ customerEmail?: string | undefined;
169
+ estimatedWeight?: number | undefined;
170
+ actualWeight?: number | undefined;
171
+ itemCount?: number | undefined;
172
+ estimatedLoads?: number | undefined;
173
+ whitesSeparate?: boolean | undefined;
174
+ bagCardNumber?: string | undefined;
175
+ notes?: string | undefined;
176
+ deliveryAddress?: string | undefined;
177
+ deliveryPhoneNumber?: string | undefined;
178
+ deliveryHall?: string | undefined;
179
+ deliveryRoom?: string | undefined;
180
+ paymentMethod?: "mobile_money" | "card" | "cash" | undefined;
181
+ paymentId?: import("convex/values").GenericId<"payments"> | undefined;
182
+ fulfilledBy?: import("convex/values").GenericId<"attendants"> | undefined;
183
+ status: "pending" | "in_progress" | "ready_for_pickup" | "delivered" | "completed" | "cancelled";
184
+ createdAt: number;
185
+ isDeleted: boolean;
186
+ branchId: import("convex/values").GenericId<"branches">;
187
+ deliveryFee: number;
188
+ customerId: import("convex/values").GenericId<"users">;
189
+ customerPhoneNumber: string;
190
+ orderNumber: string;
191
+ orderType: "walk_in" | "online";
192
+ serviceType: "wash_only" | "wash_and_dry" | "dry_only";
193
+ isDelivery: boolean;
194
+ basePrice: number;
195
+ totalPrice: number;
196
+ finalPrice: number;
197
+ paymentStatus: "pending" | "paid" | "failed" | "refunded";
198
+ updatedAt: number;
199
+ statusHistory: {
200
+ notes?: string | undefined;
201
+ changedBy?: import("convex/values").GenericId<"attendants"> | undefined;
202
+ changedByAdmin?: import("convex/values").GenericId<"admins"> | undefined;
203
+ status: string;
204
+ changedAt: number;
205
+ }[];
206
+ } | null;
207
+ customer: {
208
+ _id: import("convex/values").GenericId<"users">;
209
+ _creationTime: number;
210
+ email?: string | undefined;
211
+ clerkUserId?: string | undefined;
212
+ status?: "active" | "blocked" | "suspended" | "restricted" | undefined;
213
+ statusNote?: string | undefined;
214
+ statusChangedBy?: import("convex/values").GenericId<"admins"> | undefined;
215
+ statusChangedAt?: number | undefined;
216
+ lastLoginAt?: number | undefined;
217
+ preferredBranchId?: import("convex/values").GenericId<"branches"> | undefined;
218
+ phoneNumber: string;
219
+ name: string;
220
+ isRegistered: boolean;
221
+ isVerified: boolean;
222
+ createdAt: number;
223
+ isDeleted: boolean;
224
+ } | null;
225
+ branch: {
226
+ _id: import("convex/values").GenericId<"branches">;
227
+ _creationTime: number;
228
+ email?: string | undefined;
229
+ phoneNumber: string;
230
+ name: string;
231
+ createdAt: number;
232
+ isDeleted: boolean;
233
+ isActive: boolean;
234
+ createdBy: import("convex/values").GenericId<"admins">;
235
+ code: string;
236
+ address: string;
237
+ city: string;
238
+ country: string;
239
+ pricingPerKg: number;
240
+ deliveryFee: number;
241
+ } | null;
102
242
  _id: import("convex/values").GenericId<"payments">;
103
243
  _creationTime: number;
104
244
  gatewayTransactionId?: string | undefined;