@driveflux/pdf 4.0.43 → 4.0.45-next.0

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.
@@ -1,4 +1,4 @@
1
- export var quotation = {
1
+ export const quotation = {
2
2
  id: 'QU9HLAPJ9',
3
3
  vehicleId: 'V8AR2D4ZC',
4
4
  plan: 'plan36',
@@ -16,7 +16,7 @@ export var quotation = {
16
16
  type: 'user',
17
17
  name: 'dddd',
18
18
  email: null,
19
- address: null
19
+ address: null,
20
20
  },
21
21
  fees: {
22
22
  subscriptionFee: 1610,
@@ -40,8 +40,8 @@ export var quotation = {
40
40
  extraCharges: [],
41
41
  amountBeforeTax: 2322,
42
42
  taxAmount: 185.76,
43
- amountAfterTax: 2507.76
44
- }
43
+ amountAfterTax: 2507.76,
44
+ },
45
45
  },
46
46
  images: [
47
47
  {
@@ -54,7 +54,7 @@ export var quotation = {
54
54
  small: null,
55
55
  medium: null,
56
56
  large: null,
57
- description: null
57
+ description: null,
58
58
  },
59
59
  {
60
60
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles-v8-ar2-d4-zc-images-whats-app-image-2024-09-19-at-12-47-23-pm.jpeg',
@@ -66,7 +66,7 @@ export var quotation = {
66
66
  small: null,
67
67
  medium: null,
68
68
  large: null,
69
- description: null
69
+ description: null,
70
70
  },
71
71
  {
72
72
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles-v8-ar2-d4-zc-images-whats-app-image-2024-09-19-at-12-48-30-pm-1.jpeg',
@@ -78,7 +78,7 @@ export var quotation = {
78
78
  small: null,
79
79
  medium: null,
80
80
  large: null,
81
- description: null
81
+ description: null,
82
82
  },
83
83
  {
84
84
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles-v8-ar2-d4-zc-images-whats-app-image-2024-09-19-at-12-48-31-pm.jpeg',
@@ -90,8 +90,9 @@ export var quotation = {
90
90
  small: null,
91
91
  medium: null,
92
92
  large: null,
93
- description: null
94
- }
93
+ description: null,
94
+ },
95
95
  ],
96
- quotationPdf: 'https://dev-flux-admin.s3.ap-southeast-1.amazonaws.com/quotations/QU9HLAPJ9.pdf'
96
+ quotationPdf: 'https://dev-flux-admin.s3.ap-southeast-1.amazonaws.com/quotations/QU9HLAPJ9.pdf',
97
97
  };
98
+ //# sourceMappingURL=quotation.js.map
@@ -1,5 +1,5 @@
1
1
  import { generateId } from '@driveflux/db/id';
2
- export var subscription = {
2
+ export const subscription = {
3
3
  customerId: 'U2DCCUKVW',
4
4
  invoicing: {
5
5
  payerId: 'U2DCCUKVW',
@@ -13,8 +13,8 @@ export var subscription = {
13
13
  city: 'Dubai',
14
14
  state: 'Dubai',
15
15
  country: 'AE',
16
- postalCode: '00000'
17
- }
16
+ postalCode: '00000',
17
+ },
18
18
  },
19
19
  scheduledEndAt: new Date('2024-05-25T16:00:00.000Z'),
20
20
  scheduledStartAt: new Date('2024-04-25T16:00:00.000Z'),
@@ -38,8 +38,8 @@ export var subscription = {
38
38
  expYear: 2028,
39
39
  funding: 'debit',
40
40
  country: 'AE',
41
- cardholderName: 'Zishan Kalim'
42
- }
41
+ cardholderName: 'Zishan Kalim',
42
+ },
43
43
  },
44
44
  onTheRoad: null,
45
45
  fees: {
@@ -55,7 +55,7 @@ export var subscription = {
55
55
  startFee: 2700,
56
56
  noStartFeeReason: null,
57
57
  notes: null,
58
- hostPrepaymentRatio: 0
58
+ hostPrepaymentRatio: 0,
59
59
  },
60
60
  unaccountedMileage: null,
61
61
  signature: null,
@@ -77,20 +77,14 @@ export var subscription = {
77
77
  chargingMethod: 'automatic',
78
78
  currentInvoiceId: 'IQVTSHDC9',
79
79
  currentCycleId: 'CY-S5Y9TWWSK-BR2WRKTU',
80
- discountIds: [
81
- 'discount_5bOaD3WHUAPKuYd1PblpH'
82
- ],
80
+ discountIds: ['discount_5bOaD3WHUAPKuYd1PblpH'],
83
81
  status: 'active',
84
82
  error: null,
85
83
  agreedTermsOfUsePdf: null,
86
84
  createdAt: new Date('2024-03-12T04:38:31.275Z'),
87
85
  updatedAt: new Date('2024-05-16T03:13:57.487Z'),
88
86
  metadata: {},
89
- invoiceIds: [
90
- 'IJJ3GHPCS',
91
- 'I9CC6JYET',
92
- 'IQVTSHDC9'
93
- ],
87
+ invoiceIds: ['IJJ3GHPCS', 'I9CC6JYET', 'IQVTSHDC9'],
94
88
  excludeMileage: false,
95
89
  vehicleId: 'VM98GEJKS',
96
90
  vehicleType: 'car',
@@ -124,14 +118,10 @@ export var subscription = {
124
118
  nextHostPayoutId: 'XZB4HLGEP',
125
119
  payoutIds: [],
126
120
  prepared: true,
127
- depositInvoiceIds: [
128
- 'IQVTSHDC9'
129
- ],
121
+ depositInvoiceIds: ['IQVTSHDC9'],
130
122
  totalDepositPaid: null,
131
123
  totalDepositRefunded: null,
132
- startFeeInvoiceIds: [
133
- 'I9CC6JYET'
134
- ],
124
+ startFeeInvoiceIds: ['I9CC6JYET'],
135
125
  totalStartFeePaid: null,
136
126
  startingMileage: 56,
137
127
  preparationInvoiceId: 'I9CC6JYET',
@@ -164,11 +154,9 @@ export var subscription = {
164
154
  department: null,
165
155
  signupParams: {
166
156
  method: 'email',
167
- source: null
157
+ source: null,
168
158
  },
169
- groups: [
170
- 'member'
171
- ],
159
+ groups: ['member'],
172
160
  maritalStatus: null,
173
161
  gender: null,
174
162
  emergencyContactName: null,
@@ -187,47 +175,21 @@ export var subscription = {
187
175
  'utilization.pricePerKm',
188
176
  'utilization.paid',
189
177
  'utilization.allowedMileage',
190
- 'utilization.mileage'
178
+ 'utilization.mileage',
191
179
  ],
192
- conditions: {
193
- subscription: {
194
- userId: 'U2DCCUKVW'
195
- }
196
- }
197
- },
198
- {
199
- action: 'read',
200
- subject: 'Vehicle',
201
- conditions: {
202
- status: 'listed'
203
- }
204
- },
205
- {
206
- action: 'create',
207
- subject: 'Business'
180
+ conditions: { subscription: { userId: 'U2DCCUKVW' } },
208
181
  },
182
+ { action: 'read', subject: 'Vehicle', conditions: { status: 'listed' } },
183
+ { action: 'create', subject: 'Business' },
209
184
  {
210
185
  action: 'read',
211
186
  subject: 'Subscription',
212
- conditions: {
213
- userId: 'U2DCCUKVW'
214
- }
187
+ conditions: { userId: 'U2DCCUKVW' },
215
188
  },
189
+ { action: 'read', subject: 'Coupon' },
190
+ { action: 'manageAdmin', inverted: true, subject: 'User' },
216
191
  {
217
- action: 'read',
218
- subject: 'Coupon'
219
- },
220
- {
221
- action: 'manageAdmin',
222
- inverted: true,
223
- subject: 'User'
224
- },
225
- {
226
- action: [
227
- 'create',
228
- 'update',
229
- 'delete'
230
- ],
192
+ action: ['create', 'update', 'delete'],
231
193
  inverted: true,
232
194
  subject: 'User',
233
195
  conditions: {
@@ -253,54 +215,29 @@ export var subscription = {
253
215
  'designer',
254
216
  'engineer',
255
217
  'productManager',
256
- 'ceo'
257
- ]
258
- }
218
+ 'ceo',
219
+ ],
220
+ },
259
221
  },
260
- reason: 'You are not allowed to update admin users'
222
+ reason: 'You are not allowed to update admin users',
261
223
  },
224
+ { action: 'update', subject: 'User', conditions: { id: 'U2DCCUKVW' } },
262
225
  {
263
- action: 'update',
226
+ action: ['read', 'update'],
264
227
  subject: 'User',
265
- conditions: {
266
- id: 'U2DCCUKVW'
267
- }
228
+ conditions: { id: 'U2DCCUKVW' },
268
229
  },
269
230
  {
270
- action: [
271
- 'read',
272
- 'update'
273
- ],
274
- subject: 'User',
275
- conditions: {
276
- id: 'U2DCCUKVW'
277
- }
278
- },
279
- {
280
- action: [
281
- 'read'
282
- ],
231
+ action: ['read'],
283
232
  subject: 'Invoice',
284
- conditions: {
285
- payerId: 'U2DCCUKVW'
286
- }
233
+ conditions: { payerId: 'U2DCCUKVW' },
287
234
  },
288
235
  {
289
236
  action: 'reserveVehicle',
290
237
  subject: 'User',
291
- conditions: {
292
- banned: false,
293
- consented: true
294
- }
238
+ conditions: { banned: false, consented: true },
295
239
  },
296
- {
297
- action: 'update',
298
- inverted: true,
299
- subject: 'User',
300
- fields: [
301
- 'groups'
302
- ]
303
- }
240
+ { action: 'update', inverted: true, subject: 'User', fields: ['groups'] },
304
241
  ],
305
242
  banned: false,
306
243
  banReason: null,
@@ -328,7 +265,7 @@ export var subscription = {
328
265
  entryDate: null,
329
266
  visaExpiry: null,
330
267
  visaValidityMonths: null,
331
- verified: false
268
+ verified: false,
332
269
  },
333
270
  documents: {
334
271
  passport: {
@@ -340,7 +277,7 @@ export var subscription = {
340
277
  uploaded: true,
341
278
  createdAt: new Date('2024-03-12T04:18:36.116Z'),
342
279
  updatedAt: null,
343
- metadata: null
280
+ metadata: null,
344
281
  },
345
282
  visa: {
346
283
  name: 'Visa',
@@ -351,7 +288,7 @@ export var subscription = {
351
288
  uploaded: true,
352
289
  createdAt: new Date('2024-03-12T04:18:36.116Z'),
353
290
  updatedAt: null,
354
- metadata: null
291
+ metadata: null,
355
292
  },
356
293
  idFront: null,
357
294
  idBack: null,
@@ -364,7 +301,7 @@ export var subscription = {
364
301
  uploaded: true,
365
302
  createdAt: new Date('2024-03-12T04:22:11.640Z'),
366
303
  updatedAt: null,
367
- metadata: null
304
+ metadata: null,
368
305
  },
369
306
  experianReport: null,
370
307
  pdrm: null,
@@ -379,7 +316,7 @@ export var subscription = {
379
316
  uploaded: true,
380
317
  createdAt: new Date('2024-03-12T04:29:23.025Z'),
381
318
  updatedAt: null,
382
- metadata: null
319
+ metadata: null,
383
320
  },
384
321
  bankStatement2: {
385
322
  name: 'Bank Statement 2',
@@ -390,7 +327,7 @@ export var subscription = {
390
327
  uploaded: true,
391
328
  createdAt: new Date('2024-03-12T04:29:23.025Z'),
392
329
  updatedAt: null,
393
- metadata: null
330
+ metadata: null,
394
331
  },
395
332
  bankStatement3: {
396
333
  name: 'Bank Statement 3',
@@ -401,7 +338,7 @@ export var subscription = {
401
338
  uploaded: true,
402
339
  createdAt: new Date('2024-03-12T04:29:23.025Z'),
403
340
  updatedAt: null,
404
- metadata: null
341
+ metadata: null,
405
342
  },
406
343
  epfStatement: null,
407
344
  offerLetter: {
@@ -413,8 +350,8 @@ export var subscription = {
413
350
  uploaded: true,
414
351
  createdAt: new Date('2024-03-12T04:32:27.837Z'),
415
352
  updatedAt: null,
416
- metadata: null
417
- }
353
+ metadata: null,
354
+ },
418
355
  },
419
356
  paymentMethods: [
420
357
  {
@@ -438,12 +375,12 @@ export var subscription = {
438
375
  expYear: 2029,
439
376
  funding: 'prepaid',
440
377
  country: 'MY',
441
- cardholderName: 'Zishan Kalim'
378
+ cardholderName: 'Zishan Kalim',
442
379
  },
443
380
  accountType: 'personal',
444
381
  status: 'active',
445
- metadata: {}
446
- }
382
+ metadata: {},
383
+ },
447
384
  ],
448
385
  addresses: {
449
386
  home: {
@@ -454,7 +391,7 @@ export var subscription = {
454
391
  state: 'Dubai',
455
392
  country: 'AE',
456
393
  postalCode: '00000',
457
- coordinates: null
394
+ coordinates: null,
458
395
  },
459
396
  billing: {
460
397
  name: null,
@@ -463,8 +400,8 @@ export var subscription = {
463
400
  city: 'Dubai',
464
401
  state: 'Dubai',
465
402
  country: 'AE',
466
- postalCode: '00000'
467
- }
403
+ postalCode: '00000',
404
+ },
468
405
  },
469
406
  verifications: null,
470
407
  emailPreferences: {
@@ -473,11 +410,11 @@ export var subscription = {
473
410
  signUpOnly: false,
474
411
  signUpPaymentAdded: false,
475
412
  activeSub: true,
476
- expiredSub: false
413
+ expiredSub: false,
477
414
  },
478
415
  companyName: 'FLUX',
479
416
  ethnicity: null,
480
- geoRegion: null
417
+ geoRegion: null,
481
418
  },
482
419
  vehicle: {
483
420
  id: 'VM98GEJKS',
@@ -516,10 +453,7 @@ export var subscription = {
516
453
  mileageTrackingOff: false,
517
454
  featureOnLandingPage: false,
518
455
  lastMileageRecordedAt: new Date('2024-04-23T08:36:08.893Z'),
519
- locationAvailability: [
520
- 'Kuala Lumpur',
521
- 'Johor'
522
- ],
456
+ locationAvailability: ['Kuala Lumpur', 'Johor'],
523
457
  temporary: true,
524
458
  hotDeal: null,
525
459
  activeSubscriptionId: 'S5Y9TWWSK',
@@ -537,7 +471,7 @@ export var subscription = {
537
471
  state: 'Kuala Lumpur',
538
472
  country: 'MY',
539
473
  postalCode: '50480',
540
- coordinates: null
474
+ coordinates: null,
541
475
  },
542
476
  pickup: {
543
477
  name: 'Main',
@@ -547,8 +481,8 @@ export var subscription = {
547
481
  state: 'Kuala Lumpur',
548
482
  country: 'MY',
549
483
  postalCode: '50480',
550
- coordinates: null
551
- }
484
+ coordinates: null,
485
+ },
552
486
  },
553
487
  documents: null,
554
488
  pricing: {
@@ -557,267 +491,74 @@ export var subscription = {
557
491
  tmv: 160000,
558
492
  bought: false,
559
493
  gfvNotApplicable: true,
560
- gfv: {
561
- plan60: 0,
562
- plan36: 0,
563
- plan24: 0
564
- },
494
+ gfv: { plan60: 0, plan36: 0, plan24: 0 },
565
495
  fluxPrice: {
566
496
  add: null,
567
497
  coefficient: 10,
568
498
  excessMileage: 1.4,
569
499
  originalExcessMileage: 1.8,
570
500
  matrix: {
571
- plan60: {
572
- lite: 2640,
573
- standard: 2970,
574
- plus: 3300,
575
- unlimited: 4140
576
- },
577
- plan36: {
578
- lite: 3300,
579
- standard: 3630,
580
- plus: 3960,
581
- unlimited: 4800
582
- },
583
- plan24: {
584
- lite: 3630,
585
- standard: 3960,
586
- plus: 4290,
587
- unlimited: 5130
588
- },
589
- plan12: {
590
- lite: 3960,
591
- standard: 4290,
592
- plus: 4620,
593
- unlimited: 5460
594
- },
595
- plan1: {
596
- lite: 7599,
597
- standard: 7599,
598
- plus: 7599,
599
- unlimited: 7599
600
- },
601
- planWeekly: {
602
- lite: 200,
603
- standard: 530,
604
- plus: 860,
605
- unlimited: 1700
606
- }
501
+ plan60: { lite: 2640, standard: 2970, plus: 3300, unlimited: 4140 },
502
+ plan36: { lite: 3300, standard: 3630, plus: 3960, unlimited: 4800 },
503
+ plan24: { lite: 3630, standard: 3960, plus: 4290, unlimited: 5130 },
504
+ plan12: { lite: 3960, standard: 4290, plus: 4620, unlimited: 5460 },
505
+ plan1: { lite: 7599, standard: 7599, plus: 7599, unlimited: 7599 },
506
+ planWeekly: { lite: 200, standard: 530, plus: 860, unlimited: 1700 },
607
507
  },
608
508
  originalMatrix: {
609
- plan60: {
610
- lite: 2640,
611
- standard: 2970,
612
- plus: 3300,
613
- unlimited: 4140
614
- },
615
- plan36: {
616
- lite: 3300,
617
- standard: 3630,
618
- plus: 3960,
619
- unlimited: 4800
620
- },
621
- plan24: {
622
- lite: 3630,
623
- standard: 3960,
624
- plus: 4290,
625
- unlimited: 5130
626
- },
627
- plan12: {
628
- lite: 3960,
629
- standard: 4290,
630
- plus: 4620,
631
- unlimited: 5460
632
- },
633
- plan1: {
634
- lite: 7599,
635
- standard: 7599,
636
- plus: 7599,
637
- unlimited: 7599
638
- },
639
- planWeekly: {
640
- lite: 200,
641
- standard: 530,
642
- plus: 860,
643
- unlimited: 1700
644
- }
509
+ plan60: { lite: 2640, standard: 2970, plus: 3300, unlimited: 4140 },
510
+ plan36: { lite: 3300, standard: 3630, plus: 3960, unlimited: 4800 },
511
+ plan24: { lite: 3630, standard: 3960, plus: 4290, unlimited: 5130 },
512
+ plan12: { lite: 3960, standard: 4290, plus: 4620, unlimited: 5460 },
513
+ plan1: { lite: 7599, standard: 7599, plus: 7599, unlimited: 7599 },
514
+ planWeekly: { lite: 200, standard: 530, plus: 860, unlimited: 1700 },
645
515
  },
646
- matrixComments: null
516
+ matrixComments: null,
647
517
  },
648
518
  hostTake: {
649
519
  excessMileage: 1.1,
650
520
  originalExcessMileage: 1.44,
651
521
  matrix: {
652
- plan60: {
653
- lite: 3000,
654
- standard: 3150,
655
- plus: 3150,
656
- unlimited: 4250
657
- },
658
- plan36: {
659
- lite: 3000,
660
- standard: 3300,
661
- plus: 3600,
662
- unlimited: 4350
663
- },
664
- plan24: {
665
- lite: 3300,
666
- standard: 3600,
667
- plus: 3900,
668
- unlimited: 4650
669
- },
670
- plan12: {
671
- lite: 3600,
672
- standard: 3900,
673
- plus: 4200,
674
- unlimited: 4950
675
- },
676
- plan1: {
677
- lite: 6500,
678
- standard: 6500,
679
- plus: 6500,
680
- unlimited: 6500
681
- },
682
- planWeekly: {
683
- lite: 0,
684
- standard: 0,
685
- plus: 0,
686
- unlimited: 0
687
- }
522
+ plan60: { lite: 3000, standard: 3150, plus: 3150, unlimited: 4250 },
523
+ plan36: { lite: 3000, standard: 3300, plus: 3600, unlimited: 4350 },
524
+ plan24: { lite: 3300, standard: 3600, plus: 3900, unlimited: 4650 },
525
+ plan12: { lite: 3600, standard: 3900, plus: 4200, unlimited: 4950 },
526
+ plan1: { lite: 6500, standard: 6500, plus: 6500, unlimited: 6500 },
527
+ planWeekly: { lite: 0, standard: 0, plus: 0, unlimited: 0 },
688
528
  },
689
529
  originalMatrix: {
690
- plan60: {
691
- lite: 2400,
692
- standard: 2700,
693
- plus: 3000,
694
- unlimited: 3750
695
- },
696
- plan36: {
697
- lite: 3000,
698
- standard: 3300,
699
- plus: 3600,
700
- unlimited: 4350
701
- },
702
- plan24: {
703
- lite: 3300,
704
- standard: 3600,
705
- plus: 3900,
706
- unlimited: 4650
707
- },
708
- plan12: {
709
- lite: 3600,
710
- standard: 3900,
711
- plus: 4200,
712
- unlimited: 4950
713
- },
714
- plan1: {
715
- lite: 6500,
716
- standard: 6500,
717
- plus: 6500,
718
- unlimited: 6500
719
- },
720
- planWeekly: {
721
- lite: 0,
722
- standard: 0,
723
- plus: 0,
724
- unlimited: 0
725
- }
530
+ plan60: { lite: 2400, standard: 2700, plus: 3000, unlimited: 3750 },
531
+ plan36: { lite: 3000, standard: 3300, plus: 3600, unlimited: 4350 },
532
+ plan24: { lite: 3300, standard: 3600, plus: 3900, unlimited: 4650 },
533
+ plan12: { lite: 3600, standard: 3900, plus: 4200, unlimited: 4950 },
534
+ plan1: { lite: 6500, standard: 6500, plus: 6500, unlimited: 6500 },
535
+ planWeekly: { lite: 0, standard: 0, plus: 0, unlimited: 0 },
726
536
  },
727
- matrixComments: null
537
+ matrixComments: null,
728
538
  },
729
539
  startFee: {
730
540
  matrix: {
731
- plan60: {
732
- lite: 1800,
733
- standard: 2040,
734
- plus: 2250,
735
- unlimited: 2820
736
- },
737
- plan36: {
738
- lite: 2250,
739
- standard: 2490,
740
- plus: 2700,
741
- unlimited: 3270
742
- },
743
- plan24: {
744
- lite: 2490,
745
- standard: 2700,
746
- plus: 2940,
747
- unlimited: 3510
748
- },
749
- plan12: {
750
- lite: 2700,
751
- standard: 2940,
752
- plus: 3150,
753
- unlimited: 3720
754
- },
755
- plan1: {
756
- lite: 0,
757
- standard: 0,
758
- plus: 0,
759
- unlimited: 0
760
- },
761
- planWeekly: {
762
- lite: 0,
763
- standard: 0,
764
- plus: 0,
765
- unlimited: 0
766
- }
541
+ plan60: { lite: 1800, standard: 2040, plus: 2250, unlimited: 2820 },
542
+ plan36: { lite: 2250, standard: 2490, plus: 2700, unlimited: 3270 },
543
+ plan24: { lite: 2490, standard: 2700, plus: 2940, unlimited: 3510 },
544
+ plan12: { lite: 2700, standard: 2940, plus: 3150, unlimited: 3720 },
545
+ plan1: { lite: 0, standard: 0, plus: 0, unlimited: 0 },
546
+ planWeekly: { lite: 0, standard: 0, plus: 0, unlimited: 0 },
767
547
  },
768
548
  originalMatrix: {
769
- plan60: {
770
- lite: 1800,
771
- standard: 2040,
772
- plus: 2250,
773
- unlimited: 2820
774
- },
775
- plan36: {
776
- lite: 2250,
777
- standard: 2490,
778
- plus: 2700,
779
- unlimited: 3270
780
- },
781
- plan24: {
782
- lite: 2490,
783
- standard: 2700,
784
- plus: 2940,
785
- unlimited: 3510
786
- },
787
- plan12: {
788
- lite: 2700,
789
- standard: 2940,
790
- plus: 3150,
791
- unlimited: 3720
792
- },
793
- plan1: {
794
- lite: 0,
795
- standard: 0,
796
- plus: 0,
797
- unlimited: 0
798
- },
799
- planWeekly: {
800
- lite: 0,
801
- standard: 0,
802
- plus: 0,
803
- unlimited: 0
804
- }
549
+ plan60: { lite: 1800, standard: 2040, plus: 2250, unlimited: 2820 },
550
+ plan36: { lite: 2250, standard: 2490, plus: 2700, unlimited: 3270 },
551
+ plan24: { lite: 2490, standard: 2700, plus: 2940, unlimited: 3510 },
552
+ plan12: { lite: 2700, standard: 2940, plus: 3150, unlimited: 3720 },
553
+ plan1: { lite: 0, standard: 0, plus: 0, unlimited: 0 },
554
+ planWeekly: { lite: 0, standard: 0, plus: 0, unlimited: 0 },
805
555
  },
806
- matrixComments: null
556
+ matrixComments: null,
807
557
  },
808
558
  ultraTier: 'tier11',
809
- availablePlans: [
810
- 'plan36',
811
- 'plan24',
812
- 'plan12'
813
- ],
814
- availableMileagePackages: [
815
- 'lite',
816
- 'standard',
817
- 'plus',
818
- 'unlimited'
819
- ],
820
- recommendedDeposit: null
559
+ availablePlans: ['plan36', 'plan24', 'plan12'],
560
+ availableMileagePackages: ['lite', 'standard', 'plus', 'unlimited'],
561
+ recommendedDeposit: null,
821
562
  },
822
563
  images: [
823
564
  {
@@ -830,7 +571,7 @@ export var subscription = {
830
571
  description: null,
831
572
  inspection: true,
832
573
  inspectionType: 'exterior',
833
- notActualPhoto: false
574
+ notActualPhoto: false,
834
575
  },
835
576
  {
836
577
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/ae2738e1-0475-4ea1-bf9a-9721e80d9455.jpg',
@@ -842,7 +583,7 @@ export var subscription = {
842
583
  description: null,
843
584
  inspection: false,
844
585
  inspectionType: null,
845
- notActualPhoto: false
586
+ notActualPhoto: false,
846
587
  },
847
588
  {
848
589
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/78481cf6-ccb3-4914-a878-472267db0241.jpg',
@@ -854,7 +595,7 @@ export var subscription = {
854
595
  description: null,
855
596
  inspection: false,
856
597
  inspectionType: null,
857
- notActualPhoto: false
598
+ notActualPhoto: false,
858
599
  },
859
600
  {
860
601
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/8597f00c-8714-45f3-bc5f-07b108729152.jpg',
@@ -866,7 +607,7 @@ export var subscription = {
866
607
  description: null,
867
608
  inspection: false,
868
609
  inspectionType: null,
869
- notActualPhoto: false
610
+ notActualPhoto: false,
870
611
  },
871
612
  {
872
613
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/22e6bba8-23d6-4d64-997a-37bc502aac16.jpg',
@@ -878,7 +619,7 @@ export var subscription = {
878
619
  description: null,
879
620
  inspection: false,
880
621
  inspectionType: null,
881
- notActualPhoto: false
622
+ notActualPhoto: false,
882
623
  },
883
624
  {
884
625
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7884.JPG',
@@ -890,7 +631,7 @@ export var subscription = {
890
631
  description: null,
891
632
  inspection: false,
892
633
  inspectionType: null,
893
- notActualPhoto: false
634
+ notActualPhoto: false,
894
635
  },
895
636
  {
896
637
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7882.JPG',
@@ -902,7 +643,7 @@ export var subscription = {
902
643
  description: null,
903
644
  inspection: true,
904
645
  inspectionType: 'frame',
905
- notActualPhoto: false
646
+ notActualPhoto: false,
906
647
  },
907
648
  {
908
649
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7880.JPG',
@@ -914,7 +655,7 @@ export var subscription = {
914
655
  description: null,
915
656
  inspection: false,
916
657
  inspectionType: null,
917
- notActualPhoto: false
658
+ notActualPhoto: false,
918
659
  },
919
660
  {
920
661
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7879.JPG',
@@ -926,7 +667,7 @@ export var subscription = {
926
667
  description: null,
927
668
  inspection: false,
928
669
  inspectionType: null,
929
- notActualPhoto: false
670
+ notActualPhoto: false,
930
671
  },
931
672
  {
932
673
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7878.JPG',
@@ -938,7 +679,7 @@ export var subscription = {
938
679
  description: null,
939
680
  inspection: true,
940
681
  inspectionType: 'interior',
941
- notActualPhoto: false
682
+ notActualPhoto: false,
942
683
  },
943
684
  {
944
685
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7876.JPG',
@@ -950,7 +691,7 @@ export var subscription = {
950
691
  description: null,
951
692
  inspection: false,
952
693
  inspectionType: null,
953
- notActualPhoto: false
694
+ notActualPhoto: false,
954
695
  },
955
696
  {
956
697
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7877.JPG',
@@ -962,7 +703,7 @@ export var subscription = {
962
703
  description: null,
963
704
  inspection: false,
964
705
  inspectionType: null,
965
- notActualPhoto: false
706
+ notActualPhoto: false,
966
707
  },
967
708
  {
968
709
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7873.JPG',
@@ -974,7 +715,7 @@ export var subscription = {
974
715
  description: null,
975
716
  inspection: false,
976
717
  inspectionType: null,
977
- notActualPhoto: false
718
+ notActualPhoto: false,
978
719
  },
979
720
  {
980
721
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7871.JPG',
@@ -986,7 +727,7 @@ export var subscription = {
986
727
  description: null,
987
728
  inspection: false,
988
729
  inspectionType: null,
989
- notActualPhoto: false
730
+ notActualPhoto: false,
990
731
  },
991
732
  {
992
733
  default: 'https://flux-site-files.s3.ap-southeast-1.amazonaws.com/vehicles/VDDVYB78L/images/IMG_7885.JPG',
@@ -998,8 +739,8 @@ export var subscription = {
998
739
  description: null,
999
740
  inspection: true,
1000
741
  inspectionType: 'engine',
1001
- notActualPhoto: false
1002
- }
742
+ notActualPhoto: false,
743
+ },
1003
744
  ],
1004
745
  details: {
1005
746
  numberOfSeats: 6,
@@ -1033,9 +774,9 @@ export var subscription = {
1033
774
  'abs',
1034
775
  'parking-sensor',
1035
776
  'braking-assist',
1036
- 'adaptive-headlights'
777
+ 'adaptive-headlights',
1037
778
  ],
1038
- condition: 'used'
779
+ condition: 'used',
1039
780
  },
1040
781
  inspection: {
1041
782
  exterior: 5,
@@ -1045,15 +786,15 @@ export var subscription = {
1045
786
  dashboard: null,
1046
787
  date: new Date('2023-09-18T16:00:00.000Z'),
1047
788
  total: 5,
1048
- comment: 'All new Proton X90, prestigious, high-riding motoring for corporate and family use. Well-detailed cabin and clean exterior.'
789
+ comment: 'All new Proton X90, prestigious, high-riding motoring for corporate and family use. Well-detailed cabin and clean exterior.',
1049
790
  },
1050
791
  appliedCoupon: null,
1051
792
  displayVehicleId: null,
1052
- isHostConfirmed: null
793
+ isHostConfirmed: null,
1053
794
  },
1054
- subscriptionTag: 'new'
795
+ subscriptionTag: 'new',
1055
796
  };
1056
- export var signature = {
797
+ export const signature = {
1057
798
  id: generateId('SubscriptionSignature'),
1058
799
  subscriptionId: subscription.id,
1059
800
  object: 'subscriptionSignature',
@@ -1074,9 +815,10 @@ export var signature = {
1074
815
  heading: 0,
1075
816
  altitude: 61.10000228881836,
1076
817
  longitude: 101.6787272,
1077
- accuracy: 100
1078
- }
818
+ accuracy: 100,
819
+ },
1079
820
  },
1080
821
  agreedToTerms: true,
1081
- ipAddress: null
822
+ ipAddress: null,
1082
823
  };
824
+ //# sourceMappingURL=subscription.js.map
@@ -1,22 +1,23 @@
1
- export var mockTermsOfUse = {
1
+ export const mockTermsOfUse = {
2
2
  items: [
3
3
  {
4
4
  content: 'Terms of Use',
5
5
  items: [
6
6
  {
7
7
  content: 'These Terms of ***Use*** are NOT no yes defined and govern the relationship, rules and regulations of the interactions by FLUX and its Members.',
8
- items: []
9
- }
10
- ]
8
+ items: [],
9
+ },
10
+ ],
11
11
  },
12
12
  {
13
13
  content: 'Introduction',
14
14
  items: [
15
15
  {
16
16
  content: 'FLUX is an online business functioning as a technology provider that facilitates vehicle subscriptions.',
17
- items: []
18
- }
19
- ]
20
- }
21
- ]
17
+ items: [],
18
+ },
19
+ ],
20
+ },
21
+ ],
22
22
  };
23
+ //# sourceMappingURL=tou.js.map
package/dist/debug.js CHANGED
@@ -1,220 +1,41 @@
1
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
2
- try {
3
- var info = gen[key](arg);
4
- var value = info.value;
5
- } catch (error) {
6
- reject(error);
7
- return;
8
- }
9
- if (info.done) {
10
- resolve(value);
11
- } else {
12
- Promise.resolve(value).then(_next, _throw);
13
- }
14
- }
15
- function _async_to_generator(fn) {
16
- return function() {
17
- var self = this, args = arguments;
18
- return new Promise(function(resolve, reject) {
19
- var gen = fn.apply(self, args);
20
- function _next(value) {
21
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
22
- }
23
- function _throw(err) {
24
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
25
- }
26
- _next(undefined);
27
- });
28
- };
29
- }
30
- function _ts_generator(thisArg, body) {
31
- var f, y, t, _ = {
32
- label: 0,
33
- sent: function() {
34
- if (t[0] & 1) throw t[1];
35
- return t[1];
36
- },
37
- trys: [],
38
- ops: []
39
- }, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
40
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() {
41
- return this;
42
- }), g;
43
- function verb(n) {
44
- return function(v) {
45
- return step([
46
- n,
47
- v
48
- ]);
49
- };
50
- }
51
- function step(op) {
52
- if (f) throw new TypeError("Generator is already executing.");
53
- while(g && (g = 0, op[0] && (_ = 0)), _)try {
54
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
55
- if (y = 0, t) op = [
56
- op[0] & 2,
57
- t.value
58
- ];
59
- switch(op[0]){
60
- case 0:
61
- case 1:
62
- t = op;
63
- break;
64
- case 4:
65
- _.label++;
66
- return {
67
- value: op[1],
68
- done: false
69
- };
70
- case 5:
71
- _.label++;
72
- y = op[1];
73
- op = [
74
- 0
75
- ];
76
- continue;
77
- case 7:
78
- op = _.ops.pop();
79
- _.trys.pop();
80
- continue;
81
- default:
82
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
83
- _ = 0;
84
- continue;
85
- }
86
- if (op[0] === 3 && (!t || op[1] > t[0] && op[1] < t[3])) {
87
- _.label = op[1];
88
- break;
89
- }
90
- if (op[0] === 6 && _.label < t[1]) {
91
- _.label = t[1];
92
- t = op;
93
- break;
94
- }
95
- if (t && _.label < t[2]) {
96
- _.label = t[2];
97
- _.ops.push(op);
98
- break;
99
- }
100
- if (t[2]) _.ops.pop();
101
- _.trys.pop();
102
- continue;
103
- }
104
- op = body.call(thisArg, _);
105
- } catch (e) {
106
- op = [
107
- 6,
108
- e
109
- ];
110
- y = 0;
111
- } finally{
112
- f = t = 0;
113
- }
114
- if (op[0] & 5) throw op[1];
115
- return {
116
- value: op[0] ? op[1] : void 0,
117
- done: true
118
- };
119
- }
120
- }
121
1
  import { loadAllEnv } from '@driveflux/env';
122
2
  import { quotation } from './__mocks__/quotation.js';
123
3
  import { signature, subscription } from './__mocks__/subscription.js';
124
4
  import { mockTermsOfUse } from './__mocks__/tou.js';
125
5
  import { generateQuotationPdf } from './templates/index.js';
126
6
  import { generateSubscriptionAgreementPdf } from './templates/SubscriptionAgreement/index.js';
127
- var debugSubscriptionAgreement = function() {
128
- return _async_to_generator(function() {
129
- return _ts_generator(this, function(_state) {
130
- switch(_state.label){
131
- case 0:
132
- if (!subscription) {
133
- console.error('no such subscription');
134
- return [
135
- 2
136
- ];
137
- }
138
- return [
139
- 4,
140
- generateSubscriptionAgreementPdf({
141
- subscription: subscription,
142
- termsOfUse: mockTermsOfUse,
143
- signature: signature
144
- }, "".concat(process.cwd(), "/output/subscription-agreement.pdf"))
145
- ];
146
- case 1:
147
- _state.sent();
148
- return [
149
- 2
150
- ];
151
- }
152
- });
153
- })();
7
+ const debugSubscriptionAgreement = async () => {
8
+ if (!subscription) {
9
+ console.error('no such subscription');
10
+ return;
11
+ }
12
+ await generateSubscriptionAgreementPdf({ subscription, termsOfUse: mockTermsOfUse, signature }, `${process.cwd()}/output/subscription-agreement.pdf`);
154
13
  };
155
- var debugQuotation = function() {
156
- return _async_to_generator(function() {
157
- return _ts_generator(this, function(_state) {
158
- switch(_state.label){
159
- case 0:
160
- if (!quotation) {
161
- console.error('no such quotation');
162
- return [
163
- 2
164
- ];
165
- }
166
- return [
167
- 4,
168
- generateQuotationPdf({
169
- quotation: quotation
170
- }, "".concat(process.cwd(), "/output/quotation.pdf"))
171
- ];
172
- case 1:
173
- _state.sent();
174
- return [
175
- 2
176
- ];
177
- }
178
- });
179
- })();
14
+ const debugQuotation = async () => {
15
+ if (!quotation) {
16
+ console.error('no such quotation');
17
+ return;
18
+ }
19
+ await generateQuotationPdf({ quotation }, `${process.cwd()}/output/quotation.pdf`);
180
20
  };
181
21
  //! put all the debugging functions here
182
- var debugCases = [
22
+ const debugCases = [
183
23
  debugSubscriptionAgreement(),
184
- debugQuotation()
24
+ debugQuotation(),
185
25
  ];
186
- var debug = function() {
187
- return _async_to_generator(function() {
188
- var results;
189
- return _ts_generator(this, function(_state) {
190
- switch(_state.label){
191
- case 0:
192
- loadAllEnv();
193
- return [
194
- 4,
195
- Promise.allSettled(debugCases)
196
- ];
197
- case 1:
198
- results = _state.sent();
199
- if (results.some(function(res) {
200
- return res.status === 'rejected';
201
- })) {
202
- results.forEach(function(res, i) {
203
- if (res.status === 'rejected') {
204
- console.error("debug no ".concat(i + 1, " error:"), res.reason);
205
- }
206
- });
207
- return [
208
- 2
209
- ];
210
- }
211
- console.log('Generated all PDFs successfully!');
212
- console.log("You can view them in the 'output' folder!");
213
- return [
214
- 2
215
- ];
26
+ const debug = async () => {
27
+ loadAllEnv();
28
+ const results = await Promise.allSettled(debugCases);
29
+ if (results.some((res) => res.status === 'rejected')) {
30
+ results.forEach((res, i) => {
31
+ if (res.status === 'rejected') {
32
+ console.error(`debug no ${i + 1} error:`, res.reason);
216
33
  }
217
34
  });
218
- })();
35
+ return;
36
+ }
37
+ console.log('Generated all PDFs successfully!');
38
+ console.log(`You can view them in the 'output' folder!`);
219
39
  };
220
40
  debug();
41
+ //# sourceMappingURL=debug.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@driveflux/pdf",
3
- "version": "4.0.43",
3
+ "version": "4.0.45-next.0",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -12,7 +12,7 @@
12
12
  "dist"
13
13
  ],
14
14
  "dependencies": {
15
- "@driveflux/db": "4.0.20",
15
+ "@driveflux/db": "4.0.26",
16
16
  "@driveflux/env": "3.0.0",
17
17
  "@driveflux/format-money": "7.0.0",
18
18
  "@driveflux/time": "6.0.0",