@vrplatform/log 2.0.0-alpha.49 → 2.0.0-alpha.50

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,199 +1,9 @@
1
1
  export type TrackProps = OptionalUser<{
2
2
  groupId: string;
3
3
  timestamp?: Date;
4
- } & ({
5
- event: 'account_invitation_accepted';
6
- properties: AccountInvitationAcceptedProps;
7
- } | {
8
- event: 'account_password_reset_completed';
9
- properties: AccountPasswordResetCompletedProps;
10
- } | {
11
- event: 'account_password_reset_failed';
12
- properties: AccountPasswordResetFailedProps;
13
- } | {
14
- event: 'account_password_reset_requested';
15
- properties: AccountPasswordResetRequestedProps;
16
- } | {
17
- event: 'account_signed_out';
18
- properties: AccountSignedOutProps;
19
- } | {
20
- event: 'account_signin_completed';
21
- properties: AccountSigninCompletedProps;
22
- } | {
23
- event: 'account_signup_code_completed';
24
- properties: AccountSignupCodeCompletedProps;
25
- } | {
26
- event: 'account_signup_code_failed';
27
- properties: AccountSignupCodeFailedProps;
28
- } | {
29
- event: 'account_signup_code_requested';
30
- properties: AccountSignupCodeRequestedProps;
31
- } | {
32
- event: 'account_signup_completed';
33
- properties: AccountSignupCompletedProps;
34
- } | {
35
- event: 'automation_created';
36
- properties: AutomationCreatedProps;
37
- } | {
38
- event: 'automation_deleted';
39
- properties: AutomationDeletedProps;
40
- } | {
41
- event: 'automation_updated';
42
- properties: AutomationUpdated;
43
- } | {
44
- event: 'connection_created';
45
- properties: ConnectionCreatedProps;
46
- } | {
47
- event: 'connection_deleted';
48
- properties: ConnectionDeletedProps;
49
- } | {
50
- event: 'connection_reconnected';
51
- properties: ConnectionReconnectedProps;
52
- } | {
53
- event: 'connection_requested';
54
- properties: ConnectionRequestedProps;
55
- } | {
56
- event: 'gl_owner_statement_downloaded';
57
- properties: GlOwnerStatementDownloadedProps;
58
- } | {
59
- event: 'gl_owner_statement_preview_opened';
60
- properties: GlOwnerStatementPreviewOpenedProps;
61
- } | {
62
- event: 'hyperline_customer_created';
63
- properties: HyperlineCustomerCreatedProps;
64
- } | {
65
- event: 'hyperline_customer_updated';
66
- properties: HyperlineCustomerUpdatedProps;
67
- } | {
68
- event: 'hyperline_invoice_ready';
69
- properties: HyperlineInvoiceReadyProps;
70
- } | {
71
- event: 'hyperline_invoice_settled';
72
- properties: HyperlineInvoiceSettledProps;
73
- } | {
74
- event: 'hyperline_payment_method_created';
75
- properties: HyperlinePaymentMethodCreatedProps;
76
- } | {
77
- event: 'hyperline_payment_method_deleted';
78
- properties: HyperlinePaymentMethodDeletedProps;
79
- } | {
80
- event: 'hyperline_payment_method_errored';
81
- properties: HyperlinePaymentMethodErroredProps;
82
- } | {
83
- event: 'hyperline_subscription_activated';
84
- properties: HyperlineSubscriptionActivatedProps;
85
- } | {
86
- event: 'hyperline_subscription_cancelled';
87
- properties: HyperlineSubscriptionCancelledProps;
88
- } | {
89
- event: 'hyperline_subscription_charged';
90
- properties: HyperlineSubscriptionChargedProps;
91
- } | {
92
- event: 'hyperline_subscription_created';
93
- properties: HyperlineSubscriptionCreatedProps;
94
- } | {
95
- event: 'hyperline_subscription_errored';
96
- properties: HyperlineSubscriptionErroredProps;
97
- } | {
98
- event: 'hyperline_subscription_paused';
99
- properties: HyperlineSubscriptionPausedProps;
100
- } | {
101
- event: 'hyperline_subscription_voided';
102
- properties: HyperlineSubscriptionVoidedProps;
103
- } | {
104
- event: 'hyperline_trial_ended';
105
- properties: HyperlineTrialEndedProps;
106
- } | {
107
- event: 'hyperline_trial_started';
108
- properties: HyperlineTrialStartedProps;
109
- } | {
110
- event: 'owner_created';
111
- properties: OwnerCreatedProps;
112
- } | {
113
- event: 'owner_deleted';
114
- properties: OwnerDeletedProps;
115
- } | {
116
- event: 'owner_tax_info_modal_opened';
117
- properties: OwnerTaxInfoModalOpenedProps;
118
- } | {
119
- event: 'owner_tax_info_modal_submitted';
120
- properties: OwnerTaxInfoModalSubmittedProps;
121
- } | {
122
- event: 'owner_updated';
123
- properties: OwnerUpdatedProps;
124
- } | {
125
- event: 'ownership_created';
126
- properties: OwnershipCreatedProps;
127
- } | {
128
- event: 'ownership_deleted';
129
- properties: OwnershipDeletedProps;
130
- } | {
131
- event: 'ownership_updated';
132
- properties: OwnershipUpdatedProps;
133
- } | {
134
- event: 'setup_accounting_config_completed';
135
- properties: SetupAccountingConfigCompleted;
136
- } | {
137
- event: 'setup_accounting_version_completed';
138
- properties: SetupAccountingVersionCompleted;
139
- } | {
140
- event: 'setup_classes_set';
141
- properties: SetupClassesSet;
142
- } | {
143
- event: 'setup_entities_set';
144
- properties: SetupEntitiesSet;
145
- } | {
146
- event: 'setup_listing_imported';
147
- properties: SetupListingImportedProps;
148
- } | {
149
- event: 'setup_owner_imported';
150
- properties: SetupOwnerImportedProps;
151
- } | {
152
- event: 'setup_reservation_imported';
153
- properties: SetupReservationImportedProps;
154
- } | {
155
- event: 'setup_vendors_set';
156
- properties: SetupVendorsSet;
157
- } | {
158
- event: 'tax_statement_downloaded';
159
- properties: TaxStatementDownloadedProps;
160
- } | {
161
- event: 'tax_statement_preview_opened';
162
- properties: TaxStatementPreviewOpenedProps;
163
- } | {
164
- event: 'team_added';
165
- properties: TeamAddedProps;
166
- } | {
167
- event: 'team_deleted';
168
- properties: TeamDeletedProps;
169
- } | {
170
- event: 'team_info_updated';
171
- properties: TeamInfoUpdatedProps;
172
- } | {
173
- event: 'team_member_removed';
174
- properties: TeamMemberRemovedProps;
175
- } | {
176
- event: 'test_error';
177
- properties: TestErrorProps;
178
- } | {
179
- event: 'test_event';
180
- properties: TestEventProps;
181
- } | {
182
- event: 'user_forced_reloaded';
183
- properties: UserForcedReloadedProps;
184
- } | {
185
- event: 'owner_statement_opened';
186
- properties: OwnerStatementOpenedProps;
187
- } | {
188
- event: 'listing_activated';
189
- properties: ListingActivated;
190
- } | {
191
- event: 'listing_deactivated';
192
- properties: ListingDeactivated;
193
- } | {
194
- event: 'listings_reported';
195
- properties: ListingsReported;
196
- })>;
4
+ event: TrackingEvent;
5
+ properties: TrackingEventProps[TrackingEvent];
6
+ }>;
197
7
  export type IdentifyProps = {
198
8
  userId: string;
199
9
  traits?: {
@@ -241,9 +51,73 @@ export type GroupProps = OptionalUser<{
241
51
  };
242
52
  timestamp?: Date;
243
53
  }>;
244
- export type UserRole = 'super-admin' | 'vrp-admin' | 'partner-admin' | 'team-admin' | 'admin' | 'owner' | 'user';
245
- export type TenantType = 'admin' | 'partner' | 'propertyManager';
246
- export type TenantStatus = 'active' | 'inactive';
54
+ type TrackingEventProps = {
55
+ account_invitation_accepted: AccountInvitationAcceptedProps;
56
+ account_signed_out: AccountSignedOutProps;
57
+ account_signin_completed: AccountSigninCompletedProps;
58
+ account_signup_code_requested: AccountSignupCodeRequestedProps;
59
+ account_signup_code_completed: AccountSignupCodeCompletedProps;
60
+ account_signup_code_failed: AccountSignupCodeFailedProps;
61
+ account_signup_completed: AccountSignupCompletedProps;
62
+ account_password_reset_requested: AccountPasswordResetRequestedProps;
63
+ account_password_reset_failed: AccountPasswordResetFailedProps;
64
+ account_password_reset_completed: AccountPasswordResetCompletedProps;
65
+ connection_created: ConnectionCreatedProps;
66
+ connection_reconnected: ConnectionReconnectedProps;
67
+ connection_deleted: ConnectionDeletedProps;
68
+ connection_requested: ConnectionRequestedProps;
69
+ ownership_created: OwnershipCreatedProps;
70
+ ownership_updated: OwnershipUpdatedProps;
71
+ ownership_deleted: OwnershipDeletedProps;
72
+ owner_created: OwnerCreatedProps;
73
+ owner_updated: OwnerUpdatedProps;
74
+ owner_deleted: OwnerDeletedProps;
75
+ owner_tax_info_modal_opened: OwnerTaxInfoModalOpenedProps;
76
+ owner_tax_info_modal_submitted: OwnerTaxInfoModalSubmittedProps;
77
+ setup_classes_set: SetupClassesSetProps;
78
+ setup_entities_set: SetupEntitiesSetProps;
79
+ setup_reservation_imported: SetupReservationImportedProps;
80
+ setup_vendors_set: SetupVendorsSetProps;
81
+ setup_accounting_version_completed: SetupAccountingVersionCompletedProps;
82
+ setup_accounting_config_completed: SetupAccountingConfigCompletedProps;
83
+ setup_owner_imported: SetupOwnerImportedProps;
84
+ setup_listing_imported: SetupListingImportedProps;
85
+ automation_created: AutomationCreatedProps;
86
+ automation_updated: AutomationUpdatedProps;
87
+ automation_deleted: AutomationDeletedProps;
88
+ tax_statement_preview_opened: TaxStatementPreviewOpenedProps;
89
+ tax_statement_downloaded: TaxStatementDownloadedProps;
90
+ team_added: TeamAddedProps;
91
+ team_deleted: TeamDeletedProps;
92
+ team_info_updated: TeamInfoUpdatedProps;
93
+ team_member_removed: TeamMemberRemovedProps;
94
+ gl_owner_statement_preview_opened: GlOwnerStatementPreviewOpenedProps;
95
+ gl_owner_statement_downloaded: GlOwnerStatementDownloadedProps;
96
+ hyperline_invoice_ready: HyperlineInvoiceReadyProps;
97
+ hyperline_invoice_settled: HyperlineInvoiceSettledProps;
98
+ hyperline_trial_started: HyperlineTrialStartedProps;
99
+ hyperline_trial_ended: HyperlineTrialEndedProps;
100
+ hyperline_subscription_activated: HyperlineSubscriptionActivatedProps;
101
+ hyperline_subscription_cancelled: HyperlineSubscriptionCancelledProps;
102
+ hyperline_subscription_created: HyperlineSubscriptionCreatedProps;
103
+ hyperline_subscription_errored: HyperlineSubscriptionErroredProps;
104
+ hyperline_subscription_paused: HyperlineSubscriptionPausedProps;
105
+ hyperline_subscription_voided: HyperlineSubscriptionVoidedProps;
106
+ hyperline_subscription_charged: HyperlineSubscriptionChargedProps;
107
+ hyperline_customer_created: HyperlineCustomerCreatedProps;
108
+ hyperline_customer_updated: HyperlineCustomerUpdatedProps;
109
+ hyperline_payment_method_created: HyperlinePaymentMethodCreatedProps;
110
+ hyperline_payment_method_errored: HyperlinePaymentMethodErroredProps;
111
+ hyperline_payment_method_deleted: HyperlinePaymentMethodDeletedProps;
112
+ listing_activated: ListingActivatedProps;
113
+ listing_deactivated: ListingDeactivatedProps;
114
+ listings_reported: ListingsReportedProps;
115
+ update_refresh_accepted: UpdateRefreshAcceptedProps;
116
+ owner_statement_opened: OwnerStatementOpenedProps;
117
+ test_event: TestEventProps;
118
+ test_error: TestErrorProps;
119
+ };
120
+ export type TrackingEvent = keyof TrackingEventProps;
247
121
  type OptionalUser<T> = T & ({
248
122
  userId: string;
249
123
  anonymousId?: string;
@@ -251,22 +125,10 @@ type OptionalUser<T> = T & ({
251
125
  userId?: string;
252
126
  anonymousId: string;
253
127
  });
254
- type AuthEvent = 'account_signin_completed' | 'account_signup_code_requested' | 'account_signup_code_completed' | 'account_signup_code_failed' | 'account_signup_completed' | 'account_password_reset_requested' | 'account_password_reset_failed' | 'account_password_reset_completed' | 'account_invitation_accepted' | 'account_signed_out';
255
- type TeamEvent = 'team_added' | 'team_info_updated' | 'team_deleted' | 'team_member_removed';
256
- type ConnectionEvent = 'connection_created' | 'connection_reconnected' | 'connection_deleted' | 'connection_requested';
257
- type OwnershipEvent = 'ownership_created' | 'ownership_updated' | 'ownership_deleted';
258
- type OwnerEvent = 'owner_created' | 'owner_updated' | 'owner_deleted' | 'owner_tax_info_modal_opened' | 'owner_tax_info_modal_submitted';
259
- type SetupEvent = 'setup_classes_set' | 'setup_accounting_version_completed' | 'setup_accounting_config_completed' | 'setup_owner_imported' | 'setup_listing_imported';
260
- type AutomationEvent = 'automation_created' | 'automation_updated' | 'automation_deleted';
261
- type TaxStatementEvent = 'tax_statement_preview_opened' | 'tax_statement_downloaded';
262
- type GLOwnerStatementEvent = 'gl_owner_statement_preview_opened' | 'gl_owner_statement_downloaded';
263
- type HyperlineEvent = 'hyperline_invoice_ready' | 'hyperline_invoice_settled' | 'hyperline_trial_started' | 'hyperline_trial_ended' | 'hyperline_subscription_activated' | 'hyperline_subscription_cancelled' | 'hyperline_subscription_created' | 'hyperline_subscription_errored' | 'hyperline_subscription_paused' | 'hyperline_subscription_voided' | 'hyperline_subscription_charged' | 'hyperline_customer_created' | 'hyperline_customer_updated' | 'hyperline_payment_method_created' | 'hyperline_payment_method_errored' | 'hyperline_payment_method_deleted';
264
- type ListingEvent = 'listing_activated' | 'listing_deactivated';
265
- type ReportEvent = 'listings_reported';
266
- type UserEvent = 'update_refresh_accepted' | 'owner_statement_opened';
267
- type TestEvent = 'test_event' | 'test_error';
268
- export type TrackingEvent = AuthEvent | TeamEvent | ConnectionEvent | OwnershipEvent | OwnerEvent | SetupEvent | AutomationEvent | TaxStatementEvent | GLOwnerStatementEvent | HyperlineEvent | UserEvent | ListingEvent | ReportEvent | TestEvent;
269
- type WebhookEventType = 'customer.created' | 'customer.updated' | 'subscription.activated' | 'subscription.cancelled' | 'subscription.created' | 'subscription.errored' | 'subscription.paused' | 'subscription.voided' | 'subscription.charged' | 'payment_method.created' | 'payment_method.errored' | 'payment_method.deleted';
128
+ export type UserRole = 'super-admin' | 'vrp-admin' | 'partner-admin' | 'team-admin' | 'admin' | 'owner' | 'user';
129
+ export type TenantType = 'admin' | 'partner' | 'propertyManager';
130
+ export type TenantStatus = 'active' | 'inactive';
131
+ export type WebhookEventType = 'customer.created' | 'customer.updated' | 'subscription.activated' | 'subscription.cancelled' | 'subscription.created' | 'subscription.errored' | 'subscription.paused' | 'subscription.voided' | 'subscription.charged' | 'payment_method.created' | 'payment_method.errored' | 'payment_method.deleted';
270
132
  type AccountInvitationAcceptedProps = Partial<{
271
133
  userId: string;
272
134
  userEmail: string;
@@ -343,7 +205,7 @@ type AutomationDeletedProps = Partial<{
343
205
  userEmail: string;
344
206
  tenantId: string;
345
207
  }>;
346
- type AutomationUpdated = any;
208
+ type AutomationUpdatedProps = any;
347
209
  type ConnectionCreatedProps = Partial<{
348
210
  connectionId: string;
349
211
  tenantId: string;
@@ -425,7 +287,7 @@ type HyperlinePaymentMethodCreatedProps = Partial<{
425
287
  payloadState: 'active' | 'pending';
426
288
  payloadId: string;
427
289
  payloadCustomerId: string;
428
- webhookEventType: WebhookEventType;
290
+ webhookEventType: 'payment_method.created';
429
291
  }>;
430
292
  type HyperlinePaymentMethodDeletedProps = Partial<{
431
293
  userId: string;
@@ -435,7 +297,7 @@ type HyperlinePaymentMethodDeletedProps = Partial<{
435
297
  payloadState: 'active' | 'pending';
436
298
  payloadId: string;
437
299
  payloadCustomerId: string;
438
- webhookEventType: WebhookEventType;
300
+ webhookEventType: 'payment_method.deleted';
439
301
  }>;
440
302
  type HyperlinePaymentMethodErroredProps = Partial<{
441
303
  userId: string;
@@ -445,13 +307,13 @@ type HyperlinePaymentMethodErroredProps = Partial<{
445
307
  payloadState: 'active' | 'pending';
446
308
  payloadId: string;
447
309
  payloadCustomerId: string;
448
- webhookEventType: WebhookEventType;
310
+ webhookEventType: 'payment_method.errored';
449
311
  }>;
450
312
  type HyperlineSubscriptionActivatedProps = Partial<{
451
313
  userId: string;
452
314
  tenantId: string;
453
315
  tenantBillingStatus: 'pending' | 'active' | 'canceled';
454
- webhookEventType: WebhookEventType;
316
+ webhookEventType: 'subscription.activated';
455
317
  }>;
456
318
  type HyperlineSubscriptionCancelledProps = Partial<{
457
319
  trialEndAt: string;
@@ -463,7 +325,7 @@ type HyperlineSubscriptionCancelledProps = Partial<{
463
325
  customerId: string;
464
326
  userId: string;
465
327
  tenantId: string;
466
- webhookEventType: WebhookEventType;
328
+ webhookEventType: 'subscription.cancelled';
467
329
  tenantBillingStatus: 'pending' | 'active' | 'canceled';
468
330
  }>;
469
331
  type HyperlineSubscriptionChargedProps = Partial<{
@@ -487,19 +349,19 @@ type HyperlineSubscriptionErroredProps = Partial<{
487
349
  userId: string;
488
350
  tenantId: string;
489
351
  tenantBillingStatus: 'pending' | 'active' | 'canceled';
490
- webhookEventType: WebhookEventType;
352
+ webhookEventType: 'subscription.errored';
491
353
  }>;
492
354
  type HyperlineSubscriptionPausedProps = Partial<{
493
355
  userId: string;
494
356
  tenantId: string;
495
357
  tenantBillingStatus: 'pending' | 'active' | 'canceled';
496
- webhookEventType: WebhookEventType;
358
+ webhookEventType: 'subscription.paused';
497
359
  }>;
498
360
  type HyperlineSubscriptionVoidedProps = Partial<{
499
361
  userId: string;
500
362
  tenantId: string;
501
363
  tenantBillingStatus: 'pending' | 'active' | 'canceled';
502
- webhookEventType: WebhookEventType;
364
+ webhookEventType: 'subscription.voided';
503
365
  }>;
504
366
  type HyperlineTrialEndedProps = Partial<{
505
367
  trialStartDate: string;
@@ -514,7 +376,7 @@ type HyperlineTrialStartedProps = Partial<{
514
376
  tenantId: string;
515
377
  userId: string;
516
378
  tenantBillingStatus: 'pending' | 'active' | 'canceled';
517
- webhookEventType: WebhookEventType;
379
+ webhookEventType: 'payment_method.created';
518
380
  }>;
519
381
  type OwnerCreatedProps = Partial<{
520
382
  userId: string;
@@ -561,10 +423,10 @@ type OwnershipUpdatedProps = Partial<{
561
423
  userEmail: string;
562
424
  tenantId: string;
563
425
  }>;
564
- type SetupAccountingConfigCompleted = any;
565
- type SetupAccountingVersionCompleted = any;
566
- type SetupClassesSet = any;
567
- type SetupEntitiesSet = any;
426
+ type SetupAccountingConfigCompletedProps = any;
427
+ type SetupAccountingVersionCompletedProps = any;
428
+ type SetupClassesSetProps = any;
429
+ type SetupEntitiesSetProps = any;
568
430
  type SetupListingImportedProps = Partial<{
569
431
  appId: string;
570
432
  }>;
@@ -574,7 +436,7 @@ type SetupOwnerImportedProps = Partial<{
574
436
  type SetupReservationImportedProps = Partial<{
575
437
  appId: string;
576
438
  }>;
577
- type SetupVendorsSet = any;
439
+ type SetupVendorsSetProps = any;
578
440
  type TaxStatementDownloadedProps = Partial<{
579
441
  taxStatementStatus?: 'draft' | 'ignored' | 'inReview' | 'ready' | 'submitted';
580
442
  taxStatementId: string;
@@ -624,7 +486,7 @@ type TestErrorProps = Partial<{
624
486
  type TestEventProps = Partial<{
625
487
  success: boolean;
626
488
  }>;
627
- type UserForcedReloadedProps = Partial<{
489
+ type UpdateRefreshAcceptedProps = Partial<{
628
490
  appName: string;
629
491
  }>;
630
492
  type OwnerStatementOpenedProps = Partial<{
@@ -634,7 +496,7 @@ type OwnerStatementOpenedProps = Partial<{
634
496
  listingId: string;
635
497
  startAt: string;
636
498
  }>;
637
- type ListingActivated = any;
638
- type ListingDeactivated = any;
639
- type ListingsReported = any;
499
+ type ListingActivatedProps = any;
500
+ type ListingDeactivatedProps = any;
501
+ type ListingsReportedProps = any;
640
502
  export {};