lazywait-calcs 1.1.2 → 1.1.4

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.
@@ -0,0 +1,864 @@
1
+ import { CategoryAddon, CategoryDiscount, CategoryTax, ItemAddon, itemDiscount as ItemDiscount, ItemTax, OrderItem as LwOrderItem, Source, Item as LwItem, Category as LwCategory } from './types';
2
+ import { TimeZone } from './timezones';
3
+ declare namespace FirebaseFirestore {
4
+ type Timestamp = {};
5
+ type FieldValue = {};
6
+ }
7
+ declare type TimestampType = FirebaseFirestore.Timestamp;
8
+ export declare namespace LazyWaitAppTypes {
9
+ export type NotificationType = {
10
+ title: string;
11
+ body: string;
12
+ token: string;
13
+ data: {
14
+ navigate?: string;
15
+ navigateParams?: string;
16
+ [key: string]: string | undefined;
17
+ };
18
+ is_hms?: boolean;
19
+ userId: string;
20
+ };
21
+ export type OneSignalNotificationType = {
22
+ title_ar: string;
23
+ title_en: string;
24
+ body_ar: string;
25
+ body_en: string;
26
+ data: {
27
+ navigate?: string;
28
+ navigateParams?: string;
29
+ [key: string]: string | undefined;
30
+ };
31
+ usersIds: string[];
32
+ };
33
+ export type Vendor = {
34
+ lyve_pickup_number?: string;
35
+ approved: boolean;
36
+ isTest?: boolean;
37
+ ownerEmail?: string;
38
+ id?: string;
39
+ VAT?: number;
40
+ address?: string;
41
+ categoryID?: string;
42
+ createdAt: TimestampType | Date;
43
+ currency?: {
44
+ [key: string]: string;
45
+ };
46
+ description?: string;
47
+ filters?: {
48
+ [key: string]: boolean;
49
+ };
50
+ location?: string;
51
+ latitude: number;
52
+ locationHash?: string;
53
+ longitude: number;
54
+ lw_branch_id?: string;
55
+ lw_client_id?: string;
56
+ photo?: string;
57
+ reviewsCount?: number;
58
+ reviewsSum?: number;
59
+ title_lan_p: string;
60
+ title_lan_s: string;
61
+ phoneNumber?: string;
62
+ countryCode?: string;
63
+ deliveryRadius?: number;
64
+ timezone?: TimeZone;
65
+ workingHours?: WorkingHours;
66
+ backgroundPhoto?: string;
67
+ iban?: string;
68
+ description_lan_p?: string;
69
+ description_lan_s?: string;
70
+ isReceivingOrders?: boolean;
71
+ store_url?: string;
72
+ approvedEmailSent?: boolean;
73
+ showInApp?: boolean;
74
+ paymentMethods?: ('CASH_ON_DELIVERY' | 'ONLINE' | string)[];
75
+ _geo?: {
76
+ lat: number;
77
+ lng: number;
78
+ };
79
+ destination_id?: string;
80
+ integrations?: {
81
+ key: 'PAYLINK' | 'TAP' | 'PAYTABS';
82
+ isApproved: boolean;
83
+ }[];
84
+ instagramUrl?: string;
85
+ twitterUrl?: string;
86
+ facebookUrl?: string;
87
+ linkedinUrl?: string;
88
+ };
89
+ export type Address = {
90
+ city?: string;
91
+ country?: string;
92
+ line1?: string;
93
+ line2?: string;
94
+ postalCode?: string;
95
+ name?: string;
96
+ email?: string;
97
+ details?: string;
98
+ isPrimary?: boolean;
99
+ location?: Location;
100
+ id?: string;
101
+ extraDetails?: string;
102
+ };
103
+ export type Location = {
104
+ latitude: number;
105
+ longitude: number;
106
+ };
107
+ export type License = {
108
+ expireDate?: TimestampType | Date;
109
+ createdAt?: TimestampType | Date;
110
+ startDate?: TimestampType | Date;
111
+ vendorId: string;
112
+ branchId: string;
113
+ clientId: string;
114
+ };
115
+ export type OrderType = 'pickup' | 'delivery' | 'dine_in' | 'car_pickup' | '' | undefined;
116
+ export type PaymentStatus = 'paid' | 'unpaid' | undefined;
117
+ export type PaymentDetails = {
118
+ cartAmount: string;
119
+ cartCurrency?: string;
120
+ cartDescription?: string;
121
+ cartID?: string;
122
+ payResponseReturn?: string;
123
+ transactionReference: string;
124
+ token?: string;
125
+ paymentInfo?: {
126
+ cardScheme?: string;
127
+ cardType?: string;
128
+ paymentDescription?: string;
129
+ cardIssuer?: string;
130
+ issuerCountry?: string;
131
+ };
132
+ paymentResult?: {
133
+ responseCode?: string;
134
+ responseMessage?: string;
135
+ responseStatus?: string;
136
+ transactionTime?: string | TimestampType;
137
+ };
138
+ };
139
+ export type Payment = {
140
+ paymentDetails: PaymentDetails;
141
+ lw_client_id: string;
142
+ lw_branch_id: string;
143
+ title_lan_p?: string;
144
+ title_lan_s?: string;
145
+ userName?: string;
146
+ userPhone?: string;
147
+ userID: string;
148
+ orderID: string;
149
+ vendorID: string;
150
+ amount: number;
151
+ createdAt?: Date | TimestampType;
152
+ paymentId: string;
153
+ };
154
+ export type OrderStatus = 'Order Placed' | 'Order Accepted' | 'In Transit' | 'Order Completed' | 'Order Canceled' | 'Order Ready' | 'Driver Rejected' | 'Driver Accepted' | 'Driver Arrived';
155
+ export type DeliveryOrderEvent = 'Assign' | 'PickUp' | 'Delivered' | 'Canceled' | 'Arrived';
156
+ export type DeliveryOrderUpdate = {
157
+ order_number: string;
158
+ order_id: number;
159
+ event: DeliveryOrderEvent;
160
+ driver_id?: string;
161
+ driver_name: string;
162
+ driver_phone: string;
163
+ lat: number;
164
+ lng: number;
165
+ time: string;
166
+ customer_phone?: string;
167
+ customer_name?: string;
168
+ title_lan_p?: string;
169
+ pos_order_number?: string;
170
+ };
171
+ export type LyveOrderCreate = {
172
+ order_number: string;
173
+ pos_number: string;
174
+ amount: number;
175
+ payment_method: 'PAID' | 'UNPAID' | 'COD';
176
+ order_source_name: string;
177
+ additional_order_number: string;
178
+ pickup_number: string;
179
+ pickup_name: string;
180
+ pickup_building: string;
181
+ pickup_street: string;
182
+ pickup_area: string;
183
+ pickup_postal_code: string;
184
+ pickup_city: string;
185
+ pickup_country: string;
186
+ pickup_business_vertical: string;
187
+ pickup_is_autoassign: boolean;
188
+ pickup_contact_phone: string;
189
+ timezone: 'Asia/Riyadh' | string;
190
+ currency: 'SAR' | string;
191
+ pickup_radius: number;
192
+ recipient: string;
193
+ recipient_phone: string;
194
+ pickup_lattitude: number;
195
+ pickup_longitude: number;
196
+ extra_info: string;
197
+ destination_address: string;
198
+ destination_latitude: number;
199
+ destination_longitude: number;
200
+ };
201
+ export type LyveOrderPut = {
202
+ status: 3 | 4 | 5 | undefined;
203
+ order_number?: string;
204
+ amount?: number;
205
+ payment_method: 'PAID' | 'UNPAID' | 'COD';
206
+ };
207
+ export type PickupTime = 'AS_SOON_AS_POSSIBLE' | '15MIN' | '30MIN' | '45MIN' | '1HOUR' | '2HOURS';
208
+ export type MinimizedOrderItem = {
209
+ itemId: string;
210
+ menu_item_id: string;
211
+ menu_category_id: string;
212
+ quantity: number;
213
+ details?: string;
214
+ price_id: string;
215
+ addons?: MinimizedOrderItemAddon[];
216
+ };
217
+ export type MinimizedOrderItemAddon = {
218
+ addon_id: string;
219
+ quantity: number;
220
+ is_included_in_custom_addons: boolean;
221
+ };
222
+ export type MinimizedOrderDiscount = {
223
+ discount_id: string;
224
+ };
225
+ export type MinimizedOrderTax = {
226
+ tax_id: string;
227
+ };
228
+ export type MinimizedOrder = {
229
+ authorID?: string;
230
+ vendorID?: string;
231
+ products?: MinimizedOrderItem[];
232
+ orderDiscounts?: MinimizedOrderDiscount[];
233
+ orderTaxes?: MinimizedOrderTax[];
234
+ paymentReference?: string;
235
+ promoCodeID?: string;
236
+ lw_table_id?: string;
237
+ addressID?: string;
238
+ longitude?: number;
239
+ latitude?: number;
240
+ carID?: string;
241
+ orderNote?: string;
242
+ orderType: OrderType;
243
+ paymentGateway?: 'TAP' | 'PAYTABS' | 'PAYLINK';
244
+ usedPoints?: number;
245
+ usedCoins?: number;
246
+ version?: string;
247
+ tempPickupTime?: PickupTime;
248
+ handledByTap?: boolean;
249
+ isFromHome?: boolean;
250
+ handledByPaymentGateway?: boolean;
251
+ };
252
+ export type Order = {
253
+ integration_order_id?: string;
254
+ integration_id?: 'shgardi' | 'lyve' | 'lazywait';
255
+ driver_tracking_url?: string;
256
+ deliveryUpdates?: DeliveryOrderUpdate[];
257
+ address?: Address;
258
+ author?: User;
259
+ authorID?: string;
260
+ createdAt: TimestampType | Date;
261
+ id?: string;
262
+ orderNote?: string;
263
+ orderNumber?: number;
264
+ orderType: OrderType;
265
+ paymentStatus: PaymentStatus;
266
+ products: OrderItem[];
267
+ canceledItems?: OrderItem[];
268
+ status: OrderStatus;
269
+ vendor?: Vendor;
270
+ vendorID?: string;
271
+ paymentDetails?: PaymentDetails;
272
+ lw_table_id?: string;
273
+ usedPoints?: number;
274
+ usedCoins?: number;
275
+ updates?: {
276
+ status: OrderStatus;
277
+ updateDate: Date | TimestampType;
278
+ }[];
279
+ isTest?: boolean;
280
+ orderDiscounts?: (OrderDiscount & PromoCode)[];
281
+ orderTaxes?: OrderTax[];
282
+ version?: string;
283
+ reviewed?: boolean;
284
+ review_reminder_sent?: boolean;
285
+ externalOrderRef?: string;
286
+ externalOrderId?: string;
287
+ externalDisplayId?: string;
288
+ externalReceiptNumber?: string;
289
+ total?: number;
290
+ totalWithoutPromo?: number;
291
+ cancelNote?: string;
292
+ refundNote?: string;
293
+ tempPickupTime?: PickupTime;
294
+ clientArrivedAt?: Date | TimestampType;
295
+ handledByPaymentGateway?: boolean;
296
+ delivery?: OrderDelivery;
297
+ isPaidByDriver?: boolean;
298
+ driverPaymentDate?: Date | TimestampType;
299
+ expirationTaskId?: string;
300
+ tapRefunds?: {
301
+ refundId: string;
302
+ refundAt: Date | TimestampType;
303
+ refundAmount: number;
304
+ }[];
305
+ isFromHome?: boolean;
306
+ car?: Car;
307
+ customerRating?: number;
308
+ };
309
+ export type OrderDelivery = {
310
+ delivery_fee: number;
311
+ delivery_type?: 'FIXED' | 'CUSTOM' | 'RADIUS';
312
+ delivery_radius?: number;
313
+ };
314
+ export type OrderDiscount = {
315
+ client_id: string;
316
+ branch_id: string;
317
+ item_discount_id?: string;
318
+ discount_name?: string;
319
+ discount_id: string;
320
+ auto_apply?: boolean;
321
+ amount?: number;
322
+ menu_category_id?: string;
323
+ menu_item_id?: string;
324
+ value?: number;
325
+ is_percentage?: boolean;
326
+ active?: boolean;
327
+ promoCode?: string;
328
+ spends_at_least?: boolean;
329
+ spends_at_least_amount?: number;
330
+ };
331
+ export type OrderTax = {
332
+ client_id: string;
333
+ branch_id: string;
334
+ name_lan_p?: string;
335
+ name_lan_s?: string;
336
+ amount?: number;
337
+ tax_value?: number;
338
+ tax_id?: string;
339
+ isPercent?: boolean;
340
+ spends_at_least?: boolean;
341
+ spends_at_least_amount?: number;
342
+ auto_apply?: boolean;
343
+ };
344
+ export type OrderItem = LwOrderItem & {
345
+ itemId: string;
346
+ categoryId: string;
347
+ userId?: string;
348
+ userName?: string;
349
+ addedToCartAt?: Date | TimestampType;
350
+ updatedInCartAt?: Date | TimestampType;
351
+ };
352
+ export type Car = {
353
+ id?: string;
354
+ carModel?: string;
355
+ carColor?: string;
356
+ plateNumber?: number;
357
+ plateLetters?: string;
358
+ };
359
+ export type User = {
360
+ addresses?: Address[];
361
+ branchesIds?: string[];
362
+ createdAt?: number | TimestampType | Date;
363
+ id?: string;
364
+ firstName?: string;
365
+ lastName?: string;
366
+ isActive?: boolean;
367
+ isOnline?: boolean;
368
+ isTest?: boolean;
369
+ lastOnlineTimestamp?: number | TimestampType | Date;
370
+ location?: Location;
371
+ phone?: string;
372
+ email?: string;
373
+ profilePictureURL?: string;
374
+ pushKitToken?: string;
375
+ pushToken?: string;
376
+ role?: 'driver' | string;
377
+ settings?: object;
378
+ userID?: string;
379
+ language?: 'en' | 'ar';
380
+ cart?: {
381
+ cartId: string;
382
+ is_owner: boolean;
383
+ };
384
+ cars?: Car[];
385
+ gender?: 'male' | 'female' | string;
386
+ dateOfBirth?: number | TimestampType | Date;
387
+ reviewsCount?: number;
388
+ reviewsSum?: number;
389
+ deliveryVendorIds?: string[];
390
+ showInDriverRequests?: boolean;
391
+ };
392
+ export type EmailPayload = {
393
+ to: string[];
394
+ subject: string;
395
+ html: string;
396
+ attachments?: any[];
397
+ };
398
+ export type NotificationPayload = {
399
+ title: string;
400
+ subtitle?: string;
401
+ body?: string;
402
+ ids?: string[];
403
+ terminal_ids?: string[];
404
+ data: {
405
+ type?: string;
406
+ client_id: string;
407
+ branch_id: string;
408
+ order_ref?: string;
409
+ };
410
+ };
411
+ type HH = '00' | '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23';
412
+ type MM = '00' | '01' | '02' | '03' | '04' | '05' | '06' | '07' | '08' | '09' | '10' | '11' | '12' | '13' | '14' | '15' | '16' | '17' | '18' | '19' | '20' | '21' | '22' | '23' | '24' | '25' | '26' | '27' | '28' | '29' | '30' | '31' | '32' | '33' | '34' | '35' | '36' | '37' | '38' | '39' | '40' | '41' | '42' | '43' | '44' | '45' | '46' | '47' | '48' | '49' | '50' | '51' | '52' | '53' | '54' | '55' | '56' | '57' | '58' | '59';
413
+ type SS = MM;
414
+ export type WorkingHour = `${HH}:${MM}:${SS}`;
415
+ export type WorkingHours = {
416
+ 0?: WorkingHour[];
417
+ 1?: WorkingHour[];
418
+ 2?: WorkingHour[];
419
+ 3?: WorkingHour[];
420
+ 4?: WorkingHour[];
421
+ 5?: WorkingHour[];
422
+ 6?: WorkingHour[];
423
+ };
424
+ export type PromoCode = {
425
+ allowedOnce?: boolean;
426
+ amount: number;
427
+ createdAt?: FirebaseFirestore.Timestamp;
428
+ createdByVendor?: boolean;
429
+ id: string;
430
+ isAppliedAllVendors?: boolean;
431
+ isFixedAmount?: boolean;
432
+ isPercentage?: boolean;
433
+ promoCode: string;
434
+ validFrom?: FirebaseFirestore.Timestamp;
435
+ validTo?: FirebaseFirestore.Timestamp;
436
+ vendorIds: string[];
437
+ type?: 'promo_code' | 'lazycoins';
438
+ minOrderAmount?: number;
439
+ };
440
+ export type RecordData = {
441
+ [key: string]: number | FirebaseFirestore.FieldValue;
442
+ };
443
+ export type CustomerRecordData = {
444
+ [key: string]: {
445
+ visits?: number | FirebaseFirestore.FieldValue;
446
+ ordersIds?: string[] | FirebaseFirestore.FieldValue;
447
+ phoneNumber?: string;
448
+ lastOrderDate?: Date | FirebaseFirestore.Timestamp;
449
+ };
450
+ };
451
+ export type BusyTimesRecordData = {
452
+ [weekDay: string]: {
453
+ [hour: number]: {
454
+ visits?: number | FirebaseFirestore.FieldValue;
455
+ ordersIds?: string[] | FirebaseFirestore.FieldValue;
456
+ customerIds?: string[] | FirebaseFirestore.FieldValue;
457
+ };
458
+ };
459
+ };
460
+ export type ItemsCombos = {
461
+ [menu_item_id: string]: RecordData;
462
+ };
463
+ export type SellingRecordData = {
464
+ id: string;
465
+ vendorId?: string;
466
+ isTest?: boolean;
467
+ from: Date | FirebaseFirestore.Timestamp;
468
+ to: Date | FirebaseFirestore.Timestamp;
469
+ items_checkouts?: RecordData;
470
+ promo_codes_used?: RecordData;
471
+ customers?: CustomerRecordData;
472
+ busyTimes?: BusyTimesRecordData;
473
+ itemsCombos?: ItemsCombos;
474
+ numberOfOrders?: number | FirebaseFirestore.FieldValue;
475
+ };
476
+ export type SellingRecordMainDoc = {
477
+ vendorId: string;
478
+ isTest?: boolean;
479
+ vendor_title_lan_p?: string;
480
+ vendor_title_lan_s?: string;
481
+ items_checkouts?: RecordData;
482
+ promo_codes_used?: RecordData;
483
+ customers?: CustomerRecordData;
484
+ busyTimes?: BusyTimesRecordData;
485
+ itemsCombos?: ItemsCombos;
486
+ lastOrderDate?: Date | FirebaseFirestore.Timestamp;
487
+ numberOfOrders?: number | FirebaseFirestore.FieldValue;
488
+ };
489
+ export type ItemTag = {
490
+ tag_id: string;
491
+ branches_ids?: string[];
492
+ menu_item_id?: string;
493
+ name_lan_p: string;
494
+ name_lan_s: string;
495
+ is_predefined?: boolean;
496
+ };
497
+ export type Item = {
498
+ vendorId: string;
499
+ itemId: string;
500
+ client_id: string;
501
+ branch_id?: string;
502
+ lw_client_id: string;
503
+ lw_branch_id: string;
504
+ menu_item_id: string;
505
+ menu_category_id: string;
506
+ name_lan_p: string;
507
+ name_lan_s?: string;
508
+ details_lan_p?: string;
509
+ details_lan_s?: string;
510
+ cat_name_lan_p: string;
511
+ cat_name_lan_s?: string;
512
+ sources_ids?: string[];
513
+ sources?: Source[];
514
+ prices?: ItemPrice[];
515
+ discounts?: ItemDiscount[];
516
+ addons?: ItemAddon[];
517
+ taxes?: ItemTax[];
518
+ allergens?: string[];
519
+ branches_ids?: string[];
520
+ taxable: boolean;
521
+ photo?: string | null;
522
+ time_range?: boolean;
523
+ valid_from?: Date | TimestampType | null;
524
+ valid_to?: Date | TimestampType | null;
525
+ active: boolean;
526
+ show_online: boolean;
527
+ loyalty_points?: number;
528
+ sort_id?: number;
529
+ tags?: ItemTag[];
530
+ };
531
+ export type ItemPrice = {
532
+ vendorId: string;
533
+ itemId: string;
534
+ client_id: string;
535
+ branch_id?: string;
536
+ lw_client_id: string;
537
+ lw_branch_id?: string;
538
+ branches_ids?: string[];
539
+ name_lan_p?: string;
540
+ name_lan_s?: string;
541
+ item_name_lan_p?: string;
542
+ item_name_lan_s?: string;
543
+ cat_name_lan_p?: string;
544
+ cat_name_lan_s?: string;
545
+ menu_category_id?: string;
546
+ menu_item_id?: string;
547
+ calories?: number;
548
+ price?: number;
549
+ price_id?: string;
550
+ stock_enabled?: boolean;
551
+ loyalty_points?: number;
552
+ unit?: Unit;
553
+ consumption?: {
554
+ [source_id: string]: number;
555
+ };
556
+ custom_addons_limit?: number;
557
+ included_custom_addons_ids?: string[];
558
+ stockSnoozed?: boolean;
559
+ show_online?: boolean;
560
+ auto_selected_addons?: string[];
561
+ multi_max?: number;
562
+ };
563
+ export type Unit = 'g' | 'mg' | 'kg' | 'oz' | 'lb' | 'oz' | 'c' | 'ea' | 'gal' | 'l' | 'ml' | string | null;
564
+ export type Category = {
565
+ vendorId: string;
566
+ categoryId: string;
567
+ lw_client_id: string;
568
+ client_id?: string;
569
+ branches_ids?: string[];
570
+ name_lan_p?: string;
571
+ name_lan_s?: string;
572
+ menu_category_id?: string;
573
+ active?: boolean;
574
+ show_online?: boolean;
575
+ photo?: string | null;
576
+ addons?: CategoryAddon[];
577
+ discounts?: CategoryDiscount[];
578
+ taxes?: CategoryTax[];
579
+ taxable?: boolean;
580
+ custom_addons_limit?: number;
581
+ included_custom_addons_ids?: string[];
582
+ sort_id?: number;
583
+ multi_max?: number;
584
+ auto_selected_addons?: string[];
585
+ };
586
+ export type VendorMenu = {
587
+ lw_client_id: string;
588
+ lw_branch_id: string;
589
+ vendorId: string;
590
+ vendor_title_lan_p?: string;
591
+ vendor_title_lan_s?: string;
592
+ };
593
+ export type CartUser = {
594
+ userId: string;
595
+ firstName: string;
596
+ lastName: string;
597
+ photo?: string;
598
+ phone: string;
599
+ email?: string;
600
+ is_owner?: boolean;
601
+ };
602
+ export type Cart = {
603
+ cartId: string;
604
+ vendor: Vendor;
605
+ items: OrderItem[];
606
+ ownerId: string;
607
+ usersIds: string[];
608
+ users: CartUser[];
609
+ totalItems: number;
610
+ createdAt: Date | TimestampType;
611
+ lastUpdated?: Date | TimestampType;
612
+ shareQr: string;
613
+ isCheckout: boolean;
614
+ orderId?: string;
615
+ };
616
+ export type Agreement = {
617
+ id?: string;
618
+ added_value?: number;
619
+ lw_branch_id?: string;
620
+ lw_client_id?: string;
621
+ name?: string;
622
+ percentage?: any;
623
+ vendorId?: string;
624
+ version?: number;
625
+ subscriptionPlan?: number;
626
+ startDate?: Date | TimestampType;
627
+ expireDate?: Date | TimestampType;
628
+ createdAt?: Date | TimestampType;
629
+ support_user_id?: string;
630
+ operational_status?: 'live' | 'unverified' | 'lost' | 'out_of_business' | 'duplicated';
631
+ };
632
+ export type MenuUpdateBody = {
633
+ client_id: string;
634
+ branch_id: string;
635
+ developer_ids?: string[];
636
+ item?: LwItem;
637
+ category?: LwCategory;
638
+ items?: LwItem[];
639
+ categories?: LwCategory[];
640
+ type: 'ADD' | 'UPDATE' | 'DELETE';
641
+ };
642
+ export type LazyCoin = {
643
+ id: string;
644
+ balance: number;
645
+ createdAt: Date | TimestampType;
646
+ lastUpdated?: Date | TimestampType;
647
+ };
648
+ export type LazyCoinMovement = {
649
+ id: string;
650
+ type: 'ADD' | 'USE' | 'CANCELED';
651
+ date: Date | TimestampType;
652
+ amount: number;
653
+ orderRef?: string;
654
+ userId?: string;
655
+ canceled?: boolean;
656
+ };
657
+ export type NotificationDoc = {
658
+ id: string;
659
+ title: string;
660
+ body: string;
661
+ imageUrl?: string;
662
+ createdDate: FirebaseFirestore.Timestamp;
663
+ sendingDate: FirebaseFirestore.Timestamp;
664
+ expireDate?: FirebaseFirestore.Timestamp;
665
+ isTest?: boolean;
666
+ show: boolean;
667
+ };
668
+ export type TapRefundBody = {
669
+ charge_id: string;
670
+ amount: number;
671
+ currency: 'SAR' | string;
672
+ description?: string;
673
+ reason: 'duplicate' | 'fraudulent' | 'requested_by_customer';
674
+ reference?: {
675
+ order?: string;
676
+ transaction?: string;
677
+ vendorId?: string;
678
+ orderId?: string;
679
+ lw_client_id?: string;
680
+ lw_branch_id?: string;
681
+ };
682
+ destinations?: {
683
+ destination?: {
684
+ id: string;
685
+ amount: number;
686
+ currency: 'SAR';
687
+ description?: string;
688
+ reference?: string;
689
+ }[];
690
+ };
691
+ };
692
+ export type PaymentReportMain = {
693
+ vendorId: string;
694
+ lw_client_id: string;
695
+ lw_branch_id: string;
696
+ title_lan_p: string;
697
+ title_lan_s: string;
698
+ isTest?: boolean;
699
+ };
700
+ export type DailyPaymentReport = {
701
+ from: Date | TimestampType;
702
+ to: Date | TimestampType;
703
+ totalPayments?: number | FirebaseFirestore.FieldValue;
704
+ totalCardPayments?: number | FirebaseFirestore.FieldValue;
705
+ totalCashPayments?: number | FirebaseFirestore.FieldValue;
706
+ totalPromoCodesDiscount?: number | FirebaseFirestore.FieldValue;
707
+ totalLazyCoinsDiscount?: number | FirebaseFirestore.FieldValue;
708
+ promoCodesTotals?: {
709
+ [promoCode: string]: number | FirebaseFirestore.FieldValue;
710
+ };
711
+ };
712
+ export type VendorCategory = {
713
+ id: string;
714
+ lw_category_id: string;
715
+ mainCategory: string;
716
+ order: string;
717
+ photo: string;
718
+ title: string;
719
+ title_ar: string;
720
+ };
721
+ export type PaymentMethod = {
722
+ active: boolean;
723
+ isNativePaymentMethod?: boolean;
724
+ key: string;
725
+ sort_id: number;
726
+ title: string;
727
+ };
728
+ export type VendorReview = {
729
+ author: User;
730
+ authorID: string;
731
+ authorName: string;
732
+ authorProfilePic?: string;
733
+ createdAt: Date | TimestampType;
734
+ entityID: string;
735
+ id: string;
736
+ rating: number;
737
+ text: string;
738
+ };
739
+ export type OrderDetails = {
740
+ order_date: any;
741
+ order_details: string;
742
+ order_ref: string;
743
+ table_id: string;
744
+ table_name: string;
745
+ total: number;
746
+ };
747
+ export interface CategoryWithItems extends Category {
748
+ items: Item[];
749
+ }
750
+ export type ShgardiOrderCreate = {
751
+ DeliveryFeeIncludeInPrice: boolean;
752
+ consignmentNo: string;
753
+ pickupDate?: string;
754
+ deliveryDate: string;
755
+ paymentMethod: 1 | 7 | undefined;
756
+ dimensions: string;
757
+ orderdescription: string;
758
+ recipientName: string;
759
+ recipientMobile: string;
760
+ recipientAddress: string;
761
+ recipientLongitude: number;
762
+ recipientLatitude: number;
763
+ senderName: string;
764
+ senderMobile: string;
765
+ senderAddress: string;
766
+ senderLongitude: number;
767
+ senderLatitude: number;
768
+ price: number;
769
+ thirdPartyOrderId?: string;
770
+ };
771
+ export type shgardiOrderUpdate = {
772
+ OrderStatus: shgardiOrderEvent;
773
+ OrderId: string;
774
+ OrderStoreId: string;
775
+ ThirdPartyOrderId: string;
776
+ };
777
+ export type shgardiOrderEvent = 'Submitted' | 'AssigningDriver' | 'DriverAssigned' | 'PickingUp' | 'Delivering' | 'Delivered' | 'Canceled' | 'ClosedBySystem' | 'ClosedBySupport' | 'CanceledByPartner' | 'CanceledByDriver';
778
+ export interface PaylinkPayment {
779
+ amount: number;
780
+ checkUrl: string;
781
+ digitalOrder: boolean;
782
+ foreignCurrencyRate: number;
783
+ gatewayOrderRequest: {
784
+ amount: number;
785
+ callBackUrl: string;
786
+ cancelUrl: string;
787
+ clientEmail: string;
788
+ clientMobile: string;
789
+ clientName: string;
790
+ currency: string;
791
+ note: string;
792
+ orderNumber: string;
793
+ products: {
794
+ amount: number;
795
+ description: string;
796
+ name: string;
797
+ quantity: number;
798
+ }[];
799
+ };
800
+ orderStatus: 'Cancelled' | 'Declined' | 'Paid' | 'Pending';
801
+ paymentErrors: {
802
+ errorCode: string;
803
+ errorMessage: string;
804
+ errorTile: Date;
805
+ errorTitle: string;
806
+ }[];
807
+ qrUrl: string;
808
+ success: boolean;
809
+ transactionNo: string;
810
+ url: string;
811
+ paymentReceipt: {
812
+ receiptUrl: string;
813
+ passcode: string;
814
+ paymentMethod: string;
815
+ paymentDate: string;
816
+ bankCardNumber: string;
817
+ };
818
+ }
819
+ export interface PaylinkInvoiceResponse {
820
+ gatewayOrderRequest?: Object;
821
+ amount?: number;
822
+ transactionNo?: string;
823
+ orderStatus?: string;
824
+ paymentErrors?: string[];
825
+ url?: string;
826
+ qrUrl?: string;
827
+ checkUrl?: string;
828
+ mobileUrl?: string;
829
+ success?: boolean;
830
+ digitalOrder?: boolean;
831
+ foreignCurrencyRate?: number;
832
+ detail?: string;
833
+ title?: string;
834
+ type?: string;
835
+ status?: string;
836
+ }
837
+ export type FirebaseUser = {
838
+ displayName?: string;
839
+ email?: string;
840
+ phoneNumber?: string;
841
+ photoURL?: string;
842
+ uid?: string;
843
+ };
844
+ export type VersionInfo = {
845
+ google_play: string;
846
+ huawei: string;
847
+ ios: string;
848
+ is_mandatory_push: boolean;
849
+ push_android: number;
850
+ push_ios: number;
851
+ };
852
+ export interface LWDriver extends User {
853
+ requestId: string;
854
+ requestedAt: Date | TimestampType | number;
855
+ show: boolean;
856
+ }
857
+ export type OneSignalAppKeys = {
858
+ app_id: string;
859
+ api_key: string;
860
+ };
861
+ export {};
862
+ }
863
+ export {};
864
+ //# sourceMappingURL=lwapp_types.d.ts.map