@tiquo/dom-package 1.5.1 → 1.5.2

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.
package/README.md CHANGED
@@ -9,6 +9,7 @@ Tiquo SDK for third-party websites. Integrate authentication, customer profiles,
9
9
  - **Multi-Tab Sync** - Auth state automatically syncs across all browser tabs
10
10
  - **Native App Integration** - WebView token injection for iOS/Android hybrid apps
11
11
  - **Customer Flow Integration** - Embed authenticated customer flows with one line of code
12
+ - **First-Party Website Analytics** - Cookie-free pageview, session, attribution, and known-customer activity tracking
12
13
  - **Phone Number Utilities** - Validation, formatting, and country code support for 200+ countries
13
14
  - **Framework Agnostic** - Works with React, Vue, Svelte, or vanilla JavaScript
14
15
  - **TypeScript Support** - Full type definitions included
@@ -39,6 +40,19 @@ const auth = new TiquoAuth({
39
40
  });
40
41
  ```
41
42
 
43
+ Website analytics starts automatically when you initialize `TiquoAuth` or `TiquoCMS`.
44
+ The same public key is used across all websites in your organization; Tiquo records
45
+ the source domain for each event and rolls `www.example.com` into `example.com`.
46
+ Other subdomains are tracked as separate websites.
47
+
48
+ ```typescript
49
+ // Optional custom analytics events
50
+ await auth.analytics?.track('booking_started', {
51
+ eventName: 'Booking Started',
52
+ eventProperties: { serviceId: 'svc_123' }
53
+ });
54
+ ```
55
+
42
56
  ### 3. Authenticate Users
43
57
 
44
58
  ```typescript
@@ -65,6 +79,7 @@ const auth = new TiquoAuth({
65
79
  storagePrefix?: string; // Optional: localStorage key prefix
66
80
  debug?: boolean; // Optional: Enable debug logging
67
81
  enableTabSync?: boolean; // Optional: Multi-tab session sync (default: true)
82
+ analytics?: boolean; // Optional: Website analytics (default: true)
68
83
  });
69
84
  ```
70
85
 
package/dist/index.d.mts CHANGED
@@ -209,8 +209,27 @@ declare function buildPhone(countryCode: string, nationalNumber: string): string
209
209
  * ```
210
210
  */
211
211
 
212
+ declare class TiquoAnalytics {
213
+ private static activeInstances;
214
+ private config;
215
+ private clientSessionId;
216
+ private pageStartedAt;
217
+ private lastPath;
218
+ private started;
219
+ constructor(config: TiquoAnalyticsConfig);
220
+ start(): void;
221
+ trackPageview(options?: TiquoAnalyticsEventOptions): Promise<void>;
222
+ track(eventType: string, options?: TiquoAnalyticsEventOptions): Promise<void>;
223
+ identify(options?: TiquoAnalyticsEventOptions): Promise<void>;
224
+ private trackEngagement;
225
+ private send;
226
+ private getClientSessionId;
227
+ private log;
228
+ private adoptConfig;
229
+ }
212
230
  declare class TiquoCMS {
213
231
  private config;
232
+ analytics: TiquoAnalytics | null;
214
233
  constructor(config: TiquoCMSConfig);
215
234
  /**
216
235
  * Fetch a published CMS page for the website attached to this public key.
@@ -236,6 +255,8 @@ interface TiquoAuthConfig {
236
255
  accessToken?: string;
237
256
  /** Pre-authenticated refresh token (for WebView injection from native apps) */
238
257
  refreshToken?: string;
258
+ /** Enable first-party website analytics (default: true) */
259
+ analytics?: boolean;
239
260
  }
240
261
  interface TiquoCMSConfig {
241
262
  /** Public key from your Tiquo Auth DOM settings */
@@ -244,6 +265,35 @@ interface TiquoCMSConfig {
244
265
  apiEndpoint?: string;
245
266
  /** Enable debug logging */
246
267
  debug?: boolean;
268
+ /** Enable first-party website analytics (default: true) */
269
+ analytics?: boolean;
270
+ }
271
+ interface TiquoAnalyticsConfig {
272
+ /** Public key from your Tiquo Auth DOM settings */
273
+ publicKey: string;
274
+ /** API endpoint (defaults to production) */
275
+ apiEndpoint?: string;
276
+ /** Enable debug logging */
277
+ debug?: boolean;
278
+ /** Optional CMS website slug */
279
+ siteSlug?: string;
280
+ /** Enable automatic pageview tracking (default: true) */
281
+ autoTrackPageviews?: boolean;
282
+ /** Optional access-token getter used to associate events with known customers */
283
+ getAccessToken?: () => string | null | undefined;
284
+ }
285
+ interface TiquoAnalyticsEventOptions {
286
+ eventName?: string;
287
+ eventProperties?: Record<string, unknown>;
288
+ siteSlug?: string;
289
+ pageSlug?: string;
290
+ path?: string;
291
+ url?: string;
292
+ title?: string;
293
+ referrer?: string;
294
+ durationMs?: number;
295
+ scrollDepth?: number;
296
+ identityLinkType?: "auth_dom_login" | "email_capture" | "booking" | "enquiry" | "order" | "customer_portal" | "manual";
247
297
  }
248
298
  interface TiquoCMSPageRequest {
249
299
  /** CMS website slug */
@@ -392,7 +442,7 @@ interface TiquoOrderItem {
392
442
  quantity: number;
393
443
  unitPrice: number;
394
444
  total: number;
395
- type: 'product' | 'booking' | 'custom';
445
+ type: "product" | "booking" | "custom";
396
446
  }
397
447
  /**
398
448
  * An order belonging to the authenticated customer.
@@ -404,8 +454,8 @@ interface TiquoOrderItem {
404
454
  interface TiquoOrder {
405
455
  id: string;
406
456
  orderNumber: string;
407
- status: 'draft' | 'processing' | 'completed' | 'cancelled' | 'refunded' | 'open_tab';
408
- paymentStatus: 'pending' | 'paid' | 'partial' | 'refunded' | 'partially_refunded' | 'failed' | 'cancelled';
457
+ status: "draft" | "processing" | "completed" | "cancelled" | "refunded" | "open_tab";
458
+ paymentStatus: "pending" | "paid" | "partial" | "refunded" | "partially_refunded" | "failed" | "cancelled";
409
459
  total: number;
410
460
  subtotal: number;
411
461
  taxTotal: number;
@@ -413,12 +463,12 @@ interface TiquoOrder {
413
463
  items: TiquoOrderItem[];
414
464
  createdAt: number;
415
465
  completedAt?: number;
416
- customerRole: 'primary' | 'attendee' | 'billing' | 'referrer' | 'other';
466
+ customerRole: "primary" | "attendee" | "billing" | "referrer" | "other";
417
467
  }
418
468
  interface GetOrdersOptions {
419
469
  limit?: number;
420
470
  cursor?: string;
421
- status?: TiquoOrder['status'];
471
+ status?: TiquoOrder["status"];
422
472
  }
423
473
  interface GetOrdersResult {
424
474
  orders: TiquoOrder[];
@@ -434,7 +484,7 @@ interface TiquoReceiptItem {
434
484
  tax: number;
435
485
  discount: number;
436
486
  total: number;
437
- type: 'product' | 'booking' | 'custom' | 'membership';
487
+ type: "product" | "booking" | "custom" | "membership";
438
488
  specialInstructions?: string;
439
489
  }
440
490
  interface TiquoReceiptBusiness {
@@ -461,8 +511,8 @@ interface TiquoReceiptCustomer {
461
511
  interface TiquoReceiptOrder {
462
512
  id: string;
463
513
  orderNumber: string;
464
- status: TiquoOrder['status'];
465
- paymentStatus: TiquoOrder['paymentStatus'];
514
+ status: TiquoOrder["status"];
515
+ paymentStatus: TiquoOrder["paymentStatus"];
466
516
  currency: string;
467
517
  subtotal: number;
468
518
  taxTotal: number;
@@ -502,7 +552,7 @@ interface TiquoReceipt {
502
552
  interface TiquoBooking {
503
553
  id: string;
504
554
  bookingNumber: string;
505
- status: 'scheduled' | 'confirmed' | 'reminder_sent' | 'waiting_room' | 'waiting_list' | 'checked_in' | 'active' | 'in_progress' | 'completed' | 'cancelled' | 'no_show' | 'rescheduled';
555
+ status: "scheduled" | "confirmed" | "reminder_sent" | "waiting_room" | "waiting_list" | "checked_in" | "active" | "in_progress" | "completed" | "cancelled" | "no_show" | "rescheduled";
506
556
  date: number;
507
557
  startTime: string;
508
558
  endTime: string;
@@ -526,7 +576,7 @@ interface TiquoBooking {
526
576
  interface GetBookingsOptions {
527
577
  limit?: number;
528
578
  cursor?: string;
529
- status?: TiquoBooking['status'];
579
+ status?: TiquoBooking["status"];
530
580
  upcoming?: boolean;
531
581
  }
532
582
  interface GetBookingsResult {
@@ -541,27 +591,27 @@ interface TiquoEnquiry {
541
591
  subject: string;
542
592
  message: string;
543
593
  category: string;
544
- status: 'new' | 'in_progress' | 'waiting_customer' | 'waiting_internal' | 'won' | 'lost' | 'closed' | 'resolved' | 'archived';
545
- priority: 'low' | 'medium' | 'high' | 'urgent';
546
- source: 'online' | 'website' | 'phone' | 'email' | 'walk_in' | 'social' | 'referral' | 'pos' | 'admin';
594
+ status: "new" | "in_progress" | "waiting_customer" | "waiting_internal" | "won" | "lost" | "closed" | "resolved" | "archived";
595
+ priority: "low" | "medium" | "high" | "urgent";
596
+ source: "online" | "website" | "phone" | "email" | "walk_in" | "social" | "referral" | "pos" | "admin";
547
597
  responseCount: number;
548
598
  createdAt: string;
549
599
  updatedAt: string;
550
600
  firstResponseAt?: string;
551
601
  resolvedAt?: string;
552
- customerRole: 'primary' | 'attendee' | 'billing' | 'referrer' | 'other';
602
+ customerRole: "primary" | "attendee" | "billing" | "referrer" | "other";
553
603
  }
554
604
  interface GetEnquiriesOptions {
555
605
  limit?: number;
556
606
  cursor?: string;
557
- status?: TiquoEnquiry['status'];
607
+ status?: TiquoEnquiry["status"];
558
608
  }
559
609
  interface GetEnquiriesResult {
560
610
  enquiries: TiquoEnquiry[];
561
611
  hasMore: boolean;
562
612
  nextCursor?: string;
563
613
  }
564
- type TiquoCompanyRelationship = 'employee' | 'contractor' | 'manager' | 'executive' | 'owner' | 'contact' | 'other';
614
+ type TiquoCompanyRelationship = "employee" | "contractor" | "manager" | "executive" | "owner" | "contact" | "other";
565
615
  /**
566
616
  * The authenticated customer's membership in a company. Each company the
567
617
  * customer belongs to has its own membership record — a customer can be
@@ -599,9 +649,9 @@ interface TiquoCompany {
599
649
  postalCode?: string;
600
650
  country?: string;
601
651
  industry?: string;
602
- companySize?: '1-10' | '11-50' | '51-200' | '201-500' | '501-1000' | '1000+';
603
- status: 'active' | 'inactive' | 'archived';
604
- type?: 'client' | 'prospect' | 'vendor' | 'partner' | 'other';
652
+ companySize?: "1-10" | "11-50" | "51-200" | "201-500" | "501-1000" | "1000+";
653
+ status: "active" | "inactive" | "archived";
654
+ type?: "client" | "prospect" | "vendor" | "partner" | "other";
605
655
  membership: TiquoCompanyMembership;
606
656
  }
607
657
  interface GetCompaniesResult {
@@ -652,6 +702,7 @@ declare class TiquoAuth {
652
702
  private visibilityHandler;
653
703
  private iframeObserver;
654
704
  private injectedIframes;
705
+ analytics: TiquoAnalytics | null;
655
706
  private broadcastChannel;
656
707
  private tabId;
657
708
  private isProcessingTabSync;
@@ -731,7 +782,7 @@ declare class TiquoAuth {
731
782
  * future, since they're effectively history. Use `getBookings()` without
732
783
  * `upcoming: true` if you need those.
733
784
  */
734
- getUpcomingBookings(options?: Omit<GetBookingsOptions, 'upcoming'>): Promise<GetBookingsResult>;
785
+ getUpcomingBookings(options?: Omit<GetBookingsOptions, "upcoming">): Promise<GetBookingsResult>;
735
786
  /**
736
787
  * Get a printable receipt for a single order owned by the authenticated
737
788
  * customer. Only resolves for orders that are paid (full or partial),
@@ -941,4 +992,4 @@ declare class TiquoPhone {
941
992
  static buildPhone: typeof buildPhone;
942
993
  }
943
994
 
944
- export { type AuthStateChangeCallback, type CountryPhoneInfo, type GetBookingsOptions, type GetBookingsResult, type GetCompaniesResult, type GetCompanyColleaguesResult, type GetEnquiriesOptions, type GetEnquiriesResult, type GetOrdersOptions, type GetOrdersResult, type IframeTokenResult, type PhoneValidationResult, type ProfilePhotoUploadResult, type ProfileUpdateData, type ProfileUpdateResult, type SendOTPResult, TiquoAuth, type TiquoAuthConfig, TiquoAuthError, type TiquoBooking, TiquoCMS, type TiquoCMSBlock, type TiquoCMSConfig, type TiquoCMSPage, type TiquoCMSPageRequest, type TiquoCompany, type TiquoCompanyColleague, type TiquoCompanyMembership, type TiquoCompanyRelationship, type TiquoCustomer, type TiquoCustomerEmail, type TiquoCustomerPhone, type TiquoEnquiry, type TiquoOrder, type TiquoOrderItem, TiquoPhone, type TiquoReceipt, type TiquoReceiptBusiness, type TiquoReceiptCustomer, type TiquoReceiptItem, type TiquoReceiptOrder, type TiquoSession, type TiquoUser, type VerifyOTPResult, addCustomerUserId, clearCachedEmail, TiquoAuth as default, getCustomerUserIds, getPrefilledEmailFromCookie, isDashboardSession, trackCustomerPresence, useTiquoAuth };
995
+ export { type AuthStateChangeCallback, type CountryPhoneInfo, type GetBookingsOptions, type GetBookingsResult, type GetCompaniesResult, type GetCompanyColleaguesResult, type GetEnquiriesOptions, type GetEnquiriesResult, type GetOrdersOptions, type GetOrdersResult, type IframeTokenResult, type PhoneValidationResult, type ProfilePhotoUploadResult, type ProfileUpdateData, type ProfileUpdateResult, type SendOTPResult, TiquoAnalytics, type TiquoAnalyticsConfig, type TiquoAnalyticsEventOptions, TiquoAuth, type TiquoAuthConfig, TiquoAuthError, type TiquoBooking, TiquoCMS, type TiquoCMSBlock, type TiquoCMSConfig, type TiquoCMSPage, type TiquoCMSPageRequest, type TiquoCompany, type TiquoCompanyColleague, type TiquoCompanyMembership, type TiquoCompanyRelationship, type TiquoCustomer, type TiquoCustomerEmail, type TiquoCustomerPhone, type TiquoEnquiry, type TiquoOrder, type TiquoOrderItem, TiquoPhone, type TiquoReceipt, type TiquoReceiptBusiness, type TiquoReceiptCustomer, type TiquoReceiptItem, type TiquoReceiptOrder, type TiquoSession, type TiquoUser, type VerifyOTPResult, addCustomerUserId, clearCachedEmail, TiquoAuth as default, getCustomerUserIds, getPrefilledEmailFromCookie, isDashboardSession, trackCustomerPresence, useTiquoAuth };
package/dist/index.d.ts CHANGED
@@ -209,8 +209,27 @@ declare function buildPhone(countryCode: string, nationalNumber: string): string
209
209
  * ```
210
210
  */
211
211
 
212
+ declare class TiquoAnalytics {
213
+ private static activeInstances;
214
+ private config;
215
+ private clientSessionId;
216
+ private pageStartedAt;
217
+ private lastPath;
218
+ private started;
219
+ constructor(config: TiquoAnalyticsConfig);
220
+ start(): void;
221
+ trackPageview(options?: TiquoAnalyticsEventOptions): Promise<void>;
222
+ track(eventType: string, options?: TiquoAnalyticsEventOptions): Promise<void>;
223
+ identify(options?: TiquoAnalyticsEventOptions): Promise<void>;
224
+ private trackEngagement;
225
+ private send;
226
+ private getClientSessionId;
227
+ private log;
228
+ private adoptConfig;
229
+ }
212
230
  declare class TiquoCMS {
213
231
  private config;
232
+ analytics: TiquoAnalytics | null;
214
233
  constructor(config: TiquoCMSConfig);
215
234
  /**
216
235
  * Fetch a published CMS page for the website attached to this public key.
@@ -236,6 +255,8 @@ interface TiquoAuthConfig {
236
255
  accessToken?: string;
237
256
  /** Pre-authenticated refresh token (for WebView injection from native apps) */
238
257
  refreshToken?: string;
258
+ /** Enable first-party website analytics (default: true) */
259
+ analytics?: boolean;
239
260
  }
240
261
  interface TiquoCMSConfig {
241
262
  /** Public key from your Tiquo Auth DOM settings */
@@ -244,6 +265,35 @@ interface TiquoCMSConfig {
244
265
  apiEndpoint?: string;
245
266
  /** Enable debug logging */
246
267
  debug?: boolean;
268
+ /** Enable first-party website analytics (default: true) */
269
+ analytics?: boolean;
270
+ }
271
+ interface TiquoAnalyticsConfig {
272
+ /** Public key from your Tiquo Auth DOM settings */
273
+ publicKey: string;
274
+ /** API endpoint (defaults to production) */
275
+ apiEndpoint?: string;
276
+ /** Enable debug logging */
277
+ debug?: boolean;
278
+ /** Optional CMS website slug */
279
+ siteSlug?: string;
280
+ /** Enable automatic pageview tracking (default: true) */
281
+ autoTrackPageviews?: boolean;
282
+ /** Optional access-token getter used to associate events with known customers */
283
+ getAccessToken?: () => string | null | undefined;
284
+ }
285
+ interface TiquoAnalyticsEventOptions {
286
+ eventName?: string;
287
+ eventProperties?: Record<string, unknown>;
288
+ siteSlug?: string;
289
+ pageSlug?: string;
290
+ path?: string;
291
+ url?: string;
292
+ title?: string;
293
+ referrer?: string;
294
+ durationMs?: number;
295
+ scrollDepth?: number;
296
+ identityLinkType?: "auth_dom_login" | "email_capture" | "booking" | "enquiry" | "order" | "customer_portal" | "manual";
247
297
  }
248
298
  interface TiquoCMSPageRequest {
249
299
  /** CMS website slug */
@@ -392,7 +442,7 @@ interface TiquoOrderItem {
392
442
  quantity: number;
393
443
  unitPrice: number;
394
444
  total: number;
395
- type: 'product' | 'booking' | 'custom';
445
+ type: "product" | "booking" | "custom";
396
446
  }
397
447
  /**
398
448
  * An order belonging to the authenticated customer.
@@ -404,8 +454,8 @@ interface TiquoOrderItem {
404
454
  interface TiquoOrder {
405
455
  id: string;
406
456
  orderNumber: string;
407
- status: 'draft' | 'processing' | 'completed' | 'cancelled' | 'refunded' | 'open_tab';
408
- paymentStatus: 'pending' | 'paid' | 'partial' | 'refunded' | 'partially_refunded' | 'failed' | 'cancelled';
457
+ status: "draft" | "processing" | "completed" | "cancelled" | "refunded" | "open_tab";
458
+ paymentStatus: "pending" | "paid" | "partial" | "refunded" | "partially_refunded" | "failed" | "cancelled";
409
459
  total: number;
410
460
  subtotal: number;
411
461
  taxTotal: number;
@@ -413,12 +463,12 @@ interface TiquoOrder {
413
463
  items: TiquoOrderItem[];
414
464
  createdAt: number;
415
465
  completedAt?: number;
416
- customerRole: 'primary' | 'attendee' | 'billing' | 'referrer' | 'other';
466
+ customerRole: "primary" | "attendee" | "billing" | "referrer" | "other";
417
467
  }
418
468
  interface GetOrdersOptions {
419
469
  limit?: number;
420
470
  cursor?: string;
421
- status?: TiquoOrder['status'];
471
+ status?: TiquoOrder["status"];
422
472
  }
423
473
  interface GetOrdersResult {
424
474
  orders: TiquoOrder[];
@@ -434,7 +484,7 @@ interface TiquoReceiptItem {
434
484
  tax: number;
435
485
  discount: number;
436
486
  total: number;
437
- type: 'product' | 'booking' | 'custom' | 'membership';
487
+ type: "product" | "booking" | "custom" | "membership";
438
488
  specialInstructions?: string;
439
489
  }
440
490
  interface TiquoReceiptBusiness {
@@ -461,8 +511,8 @@ interface TiquoReceiptCustomer {
461
511
  interface TiquoReceiptOrder {
462
512
  id: string;
463
513
  orderNumber: string;
464
- status: TiquoOrder['status'];
465
- paymentStatus: TiquoOrder['paymentStatus'];
514
+ status: TiquoOrder["status"];
515
+ paymentStatus: TiquoOrder["paymentStatus"];
466
516
  currency: string;
467
517
  subtotal: number;
468
518
  taxTotal: number;
@@ -502,7 +552,7 @@ interface TiquoReceipt {
502
552
  interface TiquoBooking {
503
553
  id: string;
504
554
  bookingNumber: string;
505
- status: 'scheduled' | 'confirmed' | 'reminder_sent' | 'waiting_room' | 'waiting_list' | 'checked_in' | 'active' | 'in_progress' | 'completed' | 'cancelled' | 'no_show' | 'rescheduled';
555
+ status: "scheduled" | "confirmed" | "reminder_sent" | "waiting_room" | "waiting_list" | "checked_in" | "active" | "in_progress" | "completed" | "cancelled" | "no_show" | "rescheduled";
506
556
  date: number;
507
557
  startTime: string;
508
558
  endTime: string;
@@ -526,7 +576,7 @@ interface TiquoBooking {
526
576
  interface GetBookingsOptions {
527
577
  limit?: number;
528
578
  cursor?: string;
529
- status?: TiquoBooking['status'];
579
+ status?: TiquoBooking["status"];
530
580
  upcoming?: boolean;
531
581
  }
532
582
  interface GetBookingsResult {
@@ -541,27 +591,27 @@ interface TiquoEnquiry {
541
591
  subject: string;
542
592
  message: string;
543
593
  category: string;
544
- status: 'new' | 'in_progress' | 'waiting_customer' | 'waiting_internal' | 'won' | 'lost' | 'closed' | 'resolved' | 'archived';
545
- priority: 'low' | 'medium' | 'high' | 'urgent';
546
- source: 'online' | 'website' | 'phone' | 'email' | 'walk_in' | 'social' | 'referral' | 'pos' | 'admin';
594
+ status: "new" | "in_progress" | "waiting_customer" | "waiting_internal" | "won" | "lost" | "closed" | "resolved" | "archived";
595
+ priority: "low" | "medium" | "high" | "urgent";
596
+ source: "online" | "website" | "phone" | "email" | "walk_in" | "social" | "referral" | "pos" | "admin";
547
597
  responseCount: number;
548
598
  createdAt: string;
549
599
  updatedAt: string;
550
600
  firstResponseAt?: string;
551
601
  resolvedAt?: string;
552
- customerRole: 'primary' | 'attendee' | 'billing' | 'referrer' | 'other';
602
+ customerRole: "primary" | "attendee" | "billing" | "referrer" | "other";
553
603
  }
554
604
  interface GetEnquiriesOptions {
555
605
  limit?: number;
556
606
  cursor?: string;
557
- status?: TiquoEnquiry['status'];
607
+ status?: TiquoEnquiry["status"];
558
608
  }
559
609
  interface GetEnquiriesResult {
560
610
  enquiries: TiquoEnquiry[];
561
611
  hasMore: boolean;
562
612
  nextCursor?: string;
563
613
  }
564
- type TiquoCompanyRelationship = 'employee' | 'contractor' | 'manager' | 'executive' | 'owner' | 'contact' | 'other';
614
+ type TiquoCompanyRelationship = "employee" | "contractor" | "manager" | "executive" | "owner" | "contact" | "other";
565
615
  /**
566
616
  * The authenticated customer's membership in a company. Each company the
567
617
  * customer belongs to has its own membership record — a customer can be
@@ -599,9 +649,9 @@ interface TiquoCompany {
599
649
  postalCode?: string;
600
650
  country?: string;
601
651
  industry?: string;
602
- companySize?: '1-10' | '11-50' | '51-200' | '201-500' | '501-1000' | '1000+';
603
- status: 'active' | 'inactive' | 'archived';
604
- type?: 'client' | 'prospect' | 'vendor' | 'partner' | 'other';
652
+ companySize?: "1-10" | "11-50" | "51-200" | "201-500" | "501-1000" | "1000+";
653
+ status: "active" | "inactive" | "archived";
654
+ type?: "client" | "prospect" | "vendor" | "partner" | "other";
605
655
  membership: TiquoCompanyMembership;
606
656
  }
607
657
  interface GetCompaniesResult {
@@ -652,6 +702,7 @@ declare class TiquoAuth {
652
702
  private visibilityHandler;
653
703
  private iframeObserver;
654
704
  private injectedIframes;
705
+ analytics: TiquoAnalytics | null;
655
706
  private broadcastChannel;
656
707
  private tabId;
657
708
  private isProcessingTabSync;
@@ -731,7 +782,7 @@ declare class TiquoAuth {
731
782
  * future, since they're effectively history. Use `getBookings()` without
732
783
  * `upcoming: true` if you need those.
733
784
  */
734
- getUpcomingBookings(options?: Omit<GetBookingsOptions, 'upcoming'>): Promise<GetBookingsResult>;
785
+ getUpcomingBookings(options?: Omit<GetBookingsOptions, "upcoming">): Promise<GetBookingsResult>;
735
786
  /**
736
787
  * Get a printable receipt for a single order owned by the authenticated
737
788
  * customer. Only resolves for orders that are paid (full or partial),
@@ -941,4 +992,4 @@ declare class TiquoPhone {
941
992
  static buildPhone: typeof buildPhone;
942
993
  }
943
994
 
944
- export { type AuthStateChangeCallback, type CountryPhoneInfo, type GetBookingsOptions, type GetBookingsResult, type GetCompaniesResult, type GetCompanyColleaguesResult, type GetEnquiriesOptions, type GetEnquiriesResult, type GetOrdersOptions, type GetOrdersResult, type IframeTokenResult, type PhoneValidationResult, type ProfilePhotoUploadResult, type ProfileUpdateData, type ProfileUpdateResult, type SendOTPResult, TiquoAuth, type TiquoAuthConfig, TiquoAuthError, type TiquoBooking, TiquoCMS, type TiquoCMSBlock, type TiquoCMSConfig, type TiquoCMSPage, type TiquoCMSPageRequest, type TiquoCompany, type TiquoCompanyColleague, type TiquoCompanyMembership, type TiquoCompanyRelationship, type TiquoCustomer, type TiquoCustomerEmail, type TiquoCustomerPhone, type TiquoEnquiry, type TiquoOrder, type TiquoOrderItem, TiquoPhone, type TiquoReceipt, type TiquoReceiptBusiness, type TiquoReceiptCustomer, type TiquoReceiptItem, type TiquoReceiptOrder, type TiquoSession, type TiquoUser, type VerifyOTPResult, addCustomerUserId, clearCachedEmail, TiquoAuth as default, getCustomerUserIds, getPrefilledEmailFromCookie, isDashboardSession, trackCustomerPresence, useTiquoAuth };
995
+ export { type AuthStateChangeCallback, type CountryPhoneInfo, type GetBookingsOptions, type GetBookingsResult, type GetCompaniesResult, type GetCompanyColleaguesResult, type GetEnquiriesOptions, type GetEnquiriesResult, type GetOrdersOptions, type GetOrdersResult, type IframeTokenResult, type PhoneValidationResult, type ProfilePhotoUploadResult, type ProfileUpdateData, type ProfileUpdateResult, type SendOTPResult, TiquoAnalytics, type TiquoAnalyticsConfig, type TiquoAnalyticsEventOptions, TiquoAuth, type TiquoAuthConfig, TiquoAuthError, type TiquoBooking, TiquoCMS, type TiquoCMSBlock, type TiquoCMSConfig, type TiquoCMSPage, type TiquoCMSPageRequest, type TiquoCompany, type TiquoCompanyColleague, type TiquoCompanyMembership, type TiquoCompanyRelationship, type TiquoCustomer, type TiquoCustomerEmail, type TiquoCustomerPhone, type TiquoEnquiry, type TiquoOrder, type TiquoOrderItem, TiquoPhone, type TiquoReceipt, type TiquoReceiptBusiness, type TiquoReceiptCustomer, type TiquoReceiptItem, type TiquoReceiptOrder, type TiquoSession, type TiquoUser, type VerifyOTPResult, addCustomerUserId, clearCachedEmail, TiquoAuth as default, getCustomerUserIds, getPrefilledEmailFromCookie, isDashboardSession, trackCustomerPresence, useTiquoAuth };