@vrplatform/log 2.0.61 → 2.0.62

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,3 +1,5 @@
1
+ import type { Maybe } from '@finalytic/utils';
2
+
1
3
  export type TrackProps<T extends TrackingEvent> = OptionalUser<{
2
4
  groupId: string;
3
5
  packageName: string;
@@ -6,6 +8,8 @@ export type TrackProps<T extends TrackingEvent> = OptionalUser<{
6
8
  properties: TrackingEventProps[T];
7
9
  }>;
8
10
 
11
+ type MaybePartial<T> = { [P in keyof T]?: Maybe<T[P]> };
12
+
9
13
  // const plan = [
10
14
  // 'All-in-One VRP Subscription',
11
15
  // 'Essentials VRP Subscription',
@@ -178,7 +182,8 @@ export type TaxStatementStatus =
178
182
  | 'ignored'
179
183
  | 'inReview'
180
184
  | 'ready'
181
- | 'submitted';
185
+ | 'submitted'
186
+ | 'error';
182
187
  export type PaymentMethodType =
183
188
  | 'card'
184
189
  | 'direct_debit'
@@ -188,7 +193,7 @@ export type PaymentMethodType =
188
193
  | 'transfer_automated'
189
194
  | 'external';
190
195
 
191
- type AccountInvitationAcceptedProps = Partial<{
196
+ type AccountInvitationAcceptedProps = MaybePartial<{
192
197
  userId: string;
193
198
  userEmail: string;
194
199
  userRole: 'owner' | 'user' | 'admin';
@@ -196,11 +201,11 @@ type AccountInvitationAcceptedProps = Partial<{
196
201
  isNewUser: boolean;
197
202
  }>;
198
203
 
199
- type AccountPasswordResetCompletedProps = Partial<{
204
+ type AccountPasswordResetCompletedProps = MaybePartial<{
200
205
  userEmail: string;
201
206
  }>;
202
207
 
203
- type AccountPasswordResetFailedProps = Partial<{
208
+ type AccountPasswordResetFailedProps = MaybePartial<{
204
209
  userEmail: string;
205
210
  status:
206
211
  | 'needs_second_factor'
@@ -211,11 +216,11 @@ type AccountPasswordResetFailedProps = Partial<{
211
216
  | any;
212
217
  }>;
213
218
 
214
- type AccountPasswordResetRequestedProps = Partial<{
219
+ type AccountPasswordResetRequestedProps = MaybePartial<{
215
220
  userEmail: string;
216
221
  }>;
217
222
 
218
- type AccountSignedOutProps = Partial<{
223
+ type AccountSignedOutProps = MaybePartial<{
219
224
  userId: string;
220
225
  userEmail: string;
221
226
  tenantId: string;
@@ -223,13 +228,13 @@ type AccountSignedOutProps = Partial<{
223
228
  lastName: string;
224
229
  }>;
225
230
 
226
- type AccountSigninCompletedProps = Partial<{
231
+ type AccountSigninCompletedProps = MaybePartial<{
227
232
  firstName: string;
228
233
  lastName: string;
229
234
  userEmail: string;
230
235
  }>;
231
236
 
232
- type AccountSignupCodeCompletedProps = Partial<{
237
+ type AccountSignupCodeCompletedProps = MaybePartial<{
233
238
  firstName: string;
234
239
  lastName: string;
235
240
  userEmail: string;
@@ -237,7 +242,7 @@ type AccountSignupCodeCompletedProps = Partial<{
237
242
  type: 'property_manager' | 'partner';
238
243
  }>;
239
244
 
240
- type AccountSignupCodeFailedProps = Partial<{
245
+ type AccountSignupCodeFailedProps = MaybePartial<{
241
246
  firstName: string;
242
247
  lastName: string;
243
248
  userEmail: string;
@@ -246,7 +251,7 @@ type AccountSignupCodeFailedProps = Partial<{
246
251
  status: 'missing_requirements' | 'abandoned' | null | any;
247
252
  }>;
248
253
 
249
- type AccountSignupCodeRequestedProps = Partial<{
254
+ type AccountSignupCodeRequestedProps = MaybePartial<{
250
255
  firstName: string;
251
256
  lastName: string;
252
257
  userEmail: string;
@@ -254,7 +259,7 @@ type AccountSignupCodeRequestedProps = Partial<{
254
259
  type: 'property_manager' | 'partner';
255
260
  }>;
256
261
 
257
- type AccountSignupCompletedProps = Partial<{
262
+ type AccountSignupCompletedProps = MaybePartial<{
258
263
  tenantId: string;
259
264
  userEmail: string;
260
265
  firstName: string;
@@ -262,7 +267,7 @@ type AccountSignupCompletedProps = Partial<{
262
267
  userId: string;
263
268
  }>;
264
269
 
265
- type AutomationCreatedProps = Partial<{
270
+ type AutomationCreatedProps = MaybePartial<{
266
271
  automationId: string;
267
272
  templateId: string;
268
273
  type?: string | null;
@@ -272,7 +277,7 @@ type AutomationCreatedProps = Partial<{
272
277
  tenantId: string;
273
278
  }>;
274
279
 
275
- type AutomationDeletedProps = Partial<{
280
+ type AutomationDeletedProps = MaybePartial<{
276
281
  automationId: string;
277
282
  templateId: string;
278
283
  type?: string | null;
@@ -284,7 +289,7 @@ type AutomationDeletedProps = Partial<{
284
289
 
285
290
  type AutomationUpdatedProps = any;
286
291
 
287
- type ConnectionCreatedProps = Partial<{
292
+ type ConnectionCreatedProps = MaybePartial<{
288
293
  connectionId: string;
289
294
  tenantId: string;
290
295
  userId: string;
@@ -293,7 +298,7 @@ type ConnectionCreatedProps = Partial<{
293
298
  type?: string;
294
299
  }>;
295
300
 
296
- type ConnectionDeletedProps = Partial<{
301
+ type ConnectionDeletedProps = MaybePartial<{
297
302
  connectionId: string;
298
303
  tenantId: string;
299
304
  type?: string;
@@ -302,7 +307,7 @@ type ConnectionDeletedProps = Partial<{
302
307
  userEmail: string;
303
308
  }>;
304
309
 
305
- type ConnectionReconnectedProps = Partial<{
310
+ type ConnectionReconnectedProps = MaybePartial<{
306
311
  connectionId: string;
307
312
  tenantId: string;
308
313
  userId: string;
@@ -310,7 +315,7 @@ type ConnectionReconnectedProps = Partial<{
310
315
  appId: string;
311
316
  }>;
312
317
 
313
- type ConnectionRequestedProps = Partial<{
318
+ type ConnectionRequestedProps = MaybePartial<{
314
319
  type: 'PMS' | 'Accounting';
315
320
  website: string;
316
321
  userId: string;
@@ -318,20 +323,20 @@ type ConnectionRequestedProps = Partial<{
318
323
  tenantId: string;
319
324
  }>;
320
325
 
321
- type GlOwnerStatementDownloadedProps = Partial<{
326
+ type GlOwnerStatementDownloadedProps = MaybePartial<{
322
327
  ownerStatementId: string;
323
328
  ownerStatementUrls: string[];
324
329
  userType: 'owner' | 'property_manager';
325
330
  }>;
326
331
 
327
- type GlOwnerStatementPreviewOpenedProps = Partial<{
332
+ type GlOwnerStatementPreviewOpenedProps = MaybePartial<{
328
333
  ownerStatementStatus: string;
329
334
  ownerStatementId: string;
330
335
  ownerStatementUrls: string[];
331
336
  userType: 'owner' | 'property_manager';
332
337
  }>;
333
338
 
334
- type HyperlineCustomerCreatedProps = Partial<{
339
+ type HyperlineCustomerCreatedProps = MaybePartial<{
335
340
  tenantId: string;
336
341
  customerId: string;
337
342
  billingEmail: string;
@@ -342,7 +347,7 @@ type HyperlineCustomerCreatedProps = Partial<{
342
347
  webhookEventType: 'customer.created';
343
348
  }>;
344
349
 
345
- type HyperlineCustomerUpdatedProps = Partial<{
350
+ type HyperlineCustomerUpdatedProps = MaybePartial<{
346
351
  tenantId: string;
347
352
  customerId: string;
348
353
  billingEmail: string;
@@ -353,7 +358,7 @@ type HyperlineCustomerUpdatedProps = Partial<{
353
358
  webhookEventType: 'customer.updated';
354
359
  }>;
355
360
 
356
- type HyperlineInvoiceErroredProps = Partial<{
361
+ type HyperlineInvoiceErroredProps = MaybePartial<{
357
362
  status: 'errored';
358
363
  paymentMethodType: string;
359
364
  invoiceId: string;
@@ -363,7 +368,7 @@ type HyperlineInvoiceErroredProps = Partial<{
363
368
  erroredAt: string;
364
369
  }>;
365
370
 
366
- type HyperlineInvoiceReadyProps = Partial<{
371
+ type HyperlineInvoiceReadyProps = MaybePartial<{
367
372
  status: 'ready';
368
373
  paymentMethodType: string;
369
374
  invoiceId: string;
@@ -375,7 +380,7 @@ type HyperlineInvoiceReadyProps = Partial<{
375
380
  readyAt: string;
376
381
  }>;
377
382
 
378
- type HyperlineInvoiceSettledProps = Partial<{
383
+ type HyperlineInvoiceSettledProps = MaybePartial<{
379
384
  status: 'settled';
380
385
  paymentMethodType: string;
381
386
  invoiceId: string;
@@ -387,7 +392,7 @@ type HyperlineInvoiceSettledProps = Partial<{
387
392
  settledAt: string;
388
393
  }>;
389
394
 
390
- type HyperlineInvoiceVoidedProps = Partial<{
395
+ type HyperlineInvoiceVoidedProps = MaybePartial<{
391
396
  status: 'voided';
392
397
  paymentMethodType: string;
393
398
  invoiceId: string;
@@ -397,7 +402,7 @@ type HyperlineInvoiceVoidedProps = Partial<{
397
402
  voidedAt: string;
398
403
  }>;
399
404
 
400
- type HyperlinePaymentMethodCreatedProps = Partial<{
405
+ type HyperlinePaymentMethodCreatedProps = MaybePartial<{
401
406
  tenantId: string;
402
407
  subscriptionStartDate: string;
403
408
  paymentMethodType: PaymentMethodType;
@@ -407,7 +412,7 @@ type HyperlinePaymentMethodCreatedProps = Partial<{
407
412
  webhookEventType: 'payment_method.created';
408
413
  }>;
409
414
 
410
- type HyperlinePaymentMethodDeletedProps = Partial<{
415
+ type HyperlinePaymentMethodDeletedProps = MaybePartial<{
411
416
  tenantId: string;
412
417
  subscriptionStartDate: string;
413
418
  paymentMethodType: PaymentMethodType;
@@ -417,7 +422,7 @@ type HyperlinePaymentMethodDeletedProps = Partial<{
417
422
  webhookEventType: 'payment_method.deleted';
418
423
  }>;
419
424
 
420
- type HyperlinePaymentMethodErroredProps = Partial<{
425
+ type HyperlinePaymentMethodErroredProps = MaybePartial<{
421
426
  tenantId: string;
422
427
  subscriptionStartDate: string;
423
428
  paymentMethodType: PaymentMethodType;
@@ -427,7 +432,7 @@ type HyperlinePaymentMethodErroredProps = Partial<{
427
432
  webhookEventType: 'payment_method.errored';
428
433
  }>;
429
434
 
430
- type HyperlineSubscriptionCancellationScheduledProps = Partial<{
435
+ type HyperlineSubscriptionCancellationScheduledProps = MaybePartial<{
431
436
  subscriptionId: string;
432
437
  cancellationStrategy:
433
438
  | 'charge_prorata'
@@ -443,7 +448,7 @@ type HyperlineSubscriptionCancellationScheduledProps = Partial<{
443
448
  webhookEventType: 'subscription.cancellation_scheduled';
444
449
  }>;
445
450
 
446
- type HyperlineSubscriptionChargedProps = Partial<{
451
+ type HyperlineSubscriptionChargedProps = MaybePartial<{
447
452
  plan: string;
448
453
  subscriptionId: string;
449
454
  subscriptionStartDate: string;
@@ -452,7 +457,7 @@ type HyperlineSubscriptionChargedProps = Partial<{
452
457
  customerId: string;
453
458
  }>;
454
459
 
455
- type HyperlineSubscriptionCreatedProps = Partial<{
460
+ type HyperlineSubscriptionCreatedProps = MaybePartial<{
456
461
  trialStartDate: string;
457
462
  plan: string;
458
463
  subscriptionId: string;
@@ -462,7 +467,7 @@ type HyperlineSubscriptionCreatedProps = Partial<{
462
467
  customerId: string;
463
468
  }>;
464
469
 
465
- type HyperlineSubscriptionStatusChangedProps = Partial<{
470
+ type HyperlineSubscriptionStatusChangedProps = MaybePartial<{
466
471
  subscriptionId: string;
467
472
  plan: string;
468
473
  tenantId: string;
@@ -474,7 +479,7 @@ type HyperlineSubscriptionStatusChangedProps = Partial<{
474
479
  customerId: string;
475
480
  }>;
476
481
 
477
- type HyperlineTrialEndedProps = Partial<{
482
+ type HyperlineTrialEndedProps = MaybePartial<{
478
483
  trialStartDate: string;
479
484
  trialEndDate: string;
480
485
  plan: string;
@@ -484,14 +489,14 @@ type HyperlineTrialEndedProps = Partial<{
484
489
  paymentMethodType: PaymentMethodType;
485
490
  }>;
486
491
 
487
- type HyperlineTrialStartedProps = Partial<{
492
+ type HyperlineTrialStartedProps = MaybePartial<{
488
493
  tenantId: string;
489
494
  subscriptionStatus: SubscriptionStatus;
490
495
  trialUntil: string;
491
496
  webhookEventType: 'payment_method.created';
492
497
  }>;
493
498
 
494
- type OwnerCreatedProps = Partial<{
499
+ type OwnerCreatedProps = MaybePartial<{
495
500
  userId: string;
496
501
  tenantId: string;
497
502
  ownerId: string;
@@ -507,7 +512,7 @@ type OwnerCreatedProps = Partial<{
507
512
  userEmail: string;
508
513
  }>;
509
514
 
510
- type OwnerDeletedProps = Partial<{
515
+ type OwnerDeletedProps = MaybePartial<{
511
516
  userId: string;
512
517
  tenantId: string;
513
518
  ownerId: string;
@@ -516,21 +521,21 @@ type OwnerDeletedProps = Partial<{
516
521
  ownershipId: string;
517
522
  }>;
518
523
 
519
- type OwnerTaxInfoModalOpenedProps = Partial<{
524
+ type OwnerTaxInfoModalOpenedProps = MaybePartial<{
520
525
  flag: string;
521
526
  }>;
522
527
 
523
- type OwnerTaxInfoModalSubmittedProps = Partial<{
528
+ type OwnerTaxInfoModalSubmittedProps = MaybePartial<{
524
529
  flag: string;
525
530
  }>;
526
531
 
527
- type OwnerUpdatedProps = Partial<{
532
+ type OwnerUpdatedProps = MaybePartial<{
528
533
  userId: string;
529
534
  tenantId: string;
530
535
  ownerId: string;
531
536
  }>;
532
537
 
533
- type OwnershipCreatedProps = Partial<{
538
+ type OwnershipCreatedProps = MaybePartial<{
534
539
  ownershipId: string;
535
540
  ownerId: string;
536
541
  listingId: string;
@@ -539,7 +544,7 @@ type OwnershipCreatedProps = Partial<{
539
544
  tenantId: string;
540
545
  }>;
541
546
 
542
- type OwnershipDeletedProps = Partial<{
547
+ type OwnershipDeletedProps = MaybePartial<{
543
548
  ownershipId: string;
544
549
  ownerId: string;
545
550
  listingId: string;
@@ -548,7 +553,7 @@ type OwnershipDeletedProps = Partial<{
548
553
  tenantId: string;
549
554
  }>;
550
555
 
551
- type OwnershipUpdatedProps = Partial<{
556
+ type OwnershipUpdatedProps = MaybePartial<{
552
557
  ownershipId: string;
553
558
  ownerId: string;
554
559
  listingId: string;
@@ -565,21 +570,21 @@ type SetupClassesSetProps = any;
565
570
 
566
571
  type SetupEntitiesSetProps = any;
567
572
 
568
- type SetupListingImportedProps = Partial<{
573
+ type SetupListingImportedProps = MaybePartial<{
569
574
  appId: string;
570
575
  }>;
571
576
 
572
- type SetupOwnerImportedProps = Partial<{
577
+ type SetupOwnerImportedProps = MaybePartial<{
573
578
  appId: string;
574
579
  }>;
575
580
 
576
- type SetupReservationImportedProps = Partial<{
581
+ type SetupReservationImportedProps = MaybePartial<{
577
582
  appId: string;
578
583
  }>;
579
584
 
580
585
  type SetupVendorsSetProps = any;
581
586
 
582
- type TaxStatementDownloadedProps = Partial<{
587
+ type TaxStatementDownloadedProps = MaybePartial<{
583
588
  taxStatementStatus?: TaxStatementStatus;
584
589
  taxStatementId: string;
585
590
  taxStatementUrl: string;
@@ -589,7 +594,7 @@ type TaxStatementDownloadedProps = Partial<{
589
594
  tenantId: string;
590
595
  }>;
591
596
 
592
- type TaxStatementPreviewOpenedProps = Partial<{
597
+ type TaxStatementPreviewOpenedProps = MaybePartial<{
593
598
  taxStatementStatus?: TaxStatementStatus;
594
599
  taxStatementId: string;
595
600
  taxStatementUrl: string;
@@ -599,7 +604,7 @@ type TaxStatementPreviewOpenedProps = Partial<{
599
604
  tenantId: string;
600
605
  }>;
601
606
 
602
- type TeamAddedProps = Partial<{
607
+ type TeamAddedProps = MaybePartial<{
603
608
  tenantId: string;
604
609
  tenantName: string;
605
610
  partnerId: string;
@@ -608,7 +613,7 @@ type TeamAddedProps = Partial<{
608
613
  userEmail: string;
609
614
  }>;
610
615
 
611
- type TeamCanceledProps = Partial<{
616
+ type TeamCanceledProps = MaybePartial<{
612
617
  tenantId: string;
613
618
  customerId: string;
614
619
  subscriptionId: string;
@@ -616,46 +621,46 @@ type TeamCanceledProps = Partial<{
616
621
  reason: string;
617
622
  }>;
618
623
 
619
- type TeamDeletedProps = Partial<{
624
+ type TeamDeletedProps = MaybePartial<{
620
625
  tenantId: string;
621
626
  userId: string;
622
627
  userEmail: string;
623
628
  }>;
624
629
 
625
- type TeamInfoUpdatedProps = Partial<{
630
+ type TeamInfoUpdatedProps = MaybePartial<{
626
631
  userId: string;
627
632
  tenantId: string;
628
633
  userEmail: string;
629
634
  }>;
630
635
 
631
- type TeamMemberRemovedProps = Partial<{
636
+ type TeamMemberRemovedProps = MaybePartial<{
632
637
  userId: string;
633
638
  removedUserId: string;
634
639
  tenantId: string;
635
640
  userEmail: string;
636
641
  }>;
637
642
 
638
- type TeamReinstatedProps = Partial<{
643
+ type TeamReinstatedProps = MaybePartial<{
639
644
  tenantId: string;
640
645
  subscriptionId: string;
641
646
  }>;
642
647
 
643
- type TestErrorProps = Partial<{
648
+ type TestErrorProps = MaybePartial<{
644
649
  userId: string;
645
650
  tenantId: string;
646
651
  [key: string]: any;
647
652
  }>;
648
653
 
649
- type TestEventProps = Partial<{
654
+ type TestEventProps = MaybePartial<{
650
655
  success: boolean;
651
656
  [key: string]: any;
652
657
  }>;
653
658
 
654
- type UpdateRefreshAcceptedProps = Partial<{
659
+ type UpdateRefreshAcceptedProps = MaybePartial<{
655
660
  appName: string;
656
661
  }>;
657
662
 
658
- type OwnerStatementStatusChangedProps = Partial<{
663
+ type OwnerStatementStatusChangedProps = MaybePartial<{
659
664
  userId: string;
660
665
  tenantId: string;
661
666
  userEmail: string;
@@ -666,13 +671,23 @@ type OwnerStatementStatusChangedProps = Partial<{
666
671
  status: OwnerStatementStatus;
667
672
  }>;
668
673
 
669
- type ListingActivatedProps = any;
674
+ type ListingActivatedProps = MaybePartial<{
675
+ tenantId: string;
676
+ billingStatus: 'active' | 'inactive';
677
+ name: string;
678
+ vrpStatus: 'active' | 'disabled' | 'enabled' | 'inactive';
679
+ pmsStatus: string;
680
+ }>;
670
681
 
671
- type ListingDeactivatedProps = any;
682
+ type ListingDeactivatedProps = ListingActivatedProps;
672
683
 
673
- type ListingsReportedProps = any;
684
+ type ListingsReportedProps = MaybePartial<{
685
+ userId: string;
686
+ tenantId: string;
687
+ activeListings: number;
688
+ }>;
674
689
 
675
- type IntercomConversationCreated = Partial<{
690
+ type IntercomConversationCreated = MaybePartial<{
676
691
  userId: string;
677
692
  tenantId: string;
678
693
  userEmail: string;
@@ -686,7 +701,7 @@ type IntercomConversationCreated = Partial<{
686
701
 
687
702
  type IntercomConversationReplied = IntercomConversationCreated;
688
703
 
689
- type IntercomConversationClosed = Partial<{
704
+ type IntercomConversationClosed = MaybePartial<{
690
705
  userId: string;
691
706
  tenantId: string;
692
707
  userEmail: string;
@@ -694,7 +709,7 @@ type IntercomConversationClosed = Partial<{
694
709
  createdAt: string;
695
710
  }>;
696
711
 
697
- type IntercomConversationRated = Partial<{
712
+ type IntercomConversationRated = MaybePartial<{
698
713
  userId: string;
699
714
  tenantId: string;
700
715
  userEmail: string;
@@ -704,7 +719,7 @@ type IntercomConversationRated = Partial<{
704
719
  createdAt: string;
705
720
  }>;
706
721
 
707
- type MrrReportedProps = Partial<{
722
+ type MrrReportedProps = MaybePartial<{
708
723
  mrr: number;
709
724
  subscriptionStatus: SubscriptionStatus;
710
725
  }>;