@periskope/types 0.6.103 → 0.6.105

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.
@@ -346,9 +346,11 @@ export type Database = {
346
346
  duration: string | null;
347
347
  flag_metadata: Json | null;
348
348
  flag_response_time: number | null;
349
+ flag_status: boolean | null;
349
350
  forwarding_score: number | null;
350
351
  from: string | null;
351
352
  from_me: boolean | null;
353
+ fts: unknown | null;
352
354
  has_media: boolean | null;
353
355
  has_quoted_msg: boolean | null;
354
356
  has_reaction: boolean | null;
@@ -396,9 +398,11 @@ export type Database = {
396
398
  duration?: string | null;
397
399
  flag_metadata?: Json | null;
398
400
  flag_response_time?: number | null;
401
+ flag_status?: boolean | null;
399
402
  forwarding_score?: number | null;
400
403
  from?: string | null;
401
404
  from_me?: boolean | null;
405
+ fts?: unknown | null;
402
406
  has_media?: boolean | null;
403
407
  has_quoted_msg?: boolean | null;
404
408
  has_reaction?: boolean | null;
@@ -446,9 +450,11 @@ export type Database = {
446
450
  duration?: string | null;
447
451
  flag_metadata?: Json | null;
448
452
  flag_response_time?: number | null;
453
+ flag_status?: boolean | null;
449
454
  forwarding_score?: number | null;
450
455
  from?: string | null;
451
456
  from_me?: boolean | null;
457
+ fts?: unknown | null;
452
458
  has_media?: boolean | null;
453
459
  has_quoted_msg?: boolean | null;
454
460
  has_reaction?: boolean | null;
@@ -486,7 +492,7 @@ export type Database = {
486
492
  };
487
493
  Relationships: [
488
494
  {
489
- foreignKeyName: 'tbl_chat_messages_parent_fkey_tbl_org_phones';
495
+ foreignKeyName: 'tbl_chat_messages_fkey_tbl_org_phones';
490
496
  columns: ['org_phone', 'org_id'];
491
497
  isOneToOne: false;
492
498
  referencedRelation: 'tbl_org_phones';
@@ -494,312 +500,6 @@ export type Database = {
494
500
  }
495
501
  ];
496
502
  };
497
- tbl_chat_messages_2997dd64_89bf_48d3_9a22_b314fca017e5: {
498
- Row: {
499
- ack: string | null;
500
- author: string | null;
501
- body: string | null;
502
- broadcast: boolean | null;
503
- broadcast_id: string | null;
504
- chat_id: string | null;
505
- delivery_info: Json | null;
506
- device_type: string | null;
507
- duration: string | null;
508
- flag_metadata: Json | null;
509
- flag_response_time: number | null;
510
- forwarding_score: number | null;
511
- from: string | null;
512
- from_me: boolean | null;
513
- has_media: boolean | null;
514
- has_quoted_msg: boolean | null;
515
- has_reaction: boolean | null;
516
- id: Json | null;
517
- invite_v4: Json | null;
518
- is_deleted: boolean | null;
519
- is_ephemeral: boolean | null;
520
- is_forwarded: boolean | null;
521
- is_gif: boolean | null;
522
- is_starred: boolean | null;
523
- is_status: boolean | null;
524
- links: Json | null;
525
- location: Json | null;
526
- media: Json | null;
527
- media_key: string | null;
528
- mentioned_ids: string[] | null;
529
- message_id: string;
530
- message_ticket_id: string | null;
531
- message_type: string | null;
532
- order_id: string | null;
533
- org_id: string;
534
- org_phone: string;
535
- performed_by: string | null;
536
- prev_body: string | null;
537
- quoted_message_id: string | null;
538
- raw_data: Json | null;
539
- sender_phone: string | null;
540
- sent_message_id: string | null;
541
- timestamp: string | null;
542
- to: string | null;
543
- token: string | null;
544
- unique_id: string | null;
545
- updated_at: string | null;
546
- vcards: string[] | null;
547
- };
548
- Insert: {
549
- ack?: string | null;
550
- author?: string | null;
551
- body?: string | null;
552
- broadcast?: boolean | null;
553
- broadcast_id?: string | null;
554
- chat_id?: string | null;
555
- delivery_info?: Json | null;
556
- device_type?: string | null;
557
- duration?: string | null;
558
- flag_metadata?: Json | null;
559
- flag_response_time?: number | null;
560
- forwarding_score?: number | null;
561
- from?: string | null;
562
- from_me?: boolean | null;
563
- has_media?: boolean | null;
564
- has_quoted_msg?: boolean | null;
565
- has_reaction?: boolean | null;
566
- id?: Json | null;
567
- invite_v4?: Json | null;
568
- is_deleted?: boolean | null;
569
- is_ephemeral?: boolean | null;
570
- is_forwarded?: boolean | null;
571
- is_gif?: boolean | null;
572
- is_starred?: boolean | null;
573
- is_status?: boolean | null;
574
- links?: Json | null;
575
- location?: Json | null;
576
- media?: Json | null;
577
- media_key?: string | null;
578
- mentioned_ids?: string[] | null;
579
- message_id: string;
580
- message_ticket_id?: string | null;
581
- message_type?: string | null;
582
- order_id?: string | null;
583
- org_id: string;
584
- org_phone: string;
585
- performed_by?: string | null;
586
- prev_body?: string | null;
587
- quoted_message_id?: string | null;
588
- raw_data?: Json | null;
589
- sender_phone?: string | null;
590
- sent_message_id?: string | null;
591
- timestamp?: string | null;
592
- to?: string | null;
593
- token?: string | null;
594
- unique_id?: string | null;
595
- updated_at?: string | null;
596
- vcards?: string[] | null;
597
- };
598
- Update: {
599
- ack?: string | null;
600
- author?: string | null;
601
- body?: string | null;
602
- broadcast?: boolean | null;
603
- broadcast_id?: string | null;
604
- chat_id?: string | null;
605
- delivery_info?: Json | null;
606
- device_type?: string | null;
607
- duration?: string | null;
608
- flag_metadata?: Json | null;
609
- flag_response_time?: number | null;
610
- forwarding_score?: number | null;
611
- from?: string | null;
612
- from_me?: boolean | null;
613
- has_media?: boolean | null;
614
- has_quoted_msg?: boolean | null;
615
- has_reaction?: boolean | null;
616
- id?: Json | null;
617
- invite_v4?: Json | null;
618
- is_deleted?: boolean | null;
619
- is_ephemeral?: boolean | null;
620
- is_forwarded?: boolean | null;
621
- is_gif?: boolean | null;
622
- is_starred?: boolean | null;
623
- is_status?: boolean | null;
624
- links?: Json | null;
625
- location?: Json | null;
626
- media?: Json | null;
627
- media_key?: string | null;
628
- mentioned_ids?: string[] | null;
629
- message_id?: string;
630
- message_ticket_id?: string | null;
631
- message_type?: string | null;
632
- order_id?: string | null;
633
- org_id?: string;
634
- org_phone?: string;
635
- performed_by?: string | null;
636
- prev_body?: string | null;
637
- quoted_message_id?: string | null;
638
- raw_data?: Json | null;
639
- sender_phone?: string | null;
640
- sent_message_id?: string | null;
641
- timestamp?: string | null;
642
- to?: string | null;
643
- token?: string | null;
644
- unique_id?: string | null;
645
- updated_at?: string | null;
646
- vcards?: string[] | null;
647
- };
648
- Relationships: [];
649
- };
650
- tbl_chat_messages_default: {
651
- Row: {
652
- ack: string | null;
653
- author: string | null;
654
- body: string | null;
655
- broadcast: boolean | null;
656
- broadcast_id: string | null;
657
- chat_id: string | null;
658
- delivery_info: Json | null;
659
- device_type: string | null;
660
- duration: string | null;
661
- flag_metadata: Json | null;
662
- flag_response_time: number | null;
663
- forwarding_score: number | null;
664
- from: string | null;
665
- from_me: boolean | null;
666
- has_media: boolean | null;
667
- has_quoted_msg: boolean | null;
668
- has_reaction: boolean | null;
669
- id: Json | null;
670
- invite_v4: Json | null;
671
- is_deleted: boolean | null;
672
- is_ephemeral: boolean | null;
673
- is_forwarded: boolean | null;
674
- is_gif: boolean | null;
675
- is_starred: boolean | null;
676
- is_status: boolean | null;
677
- links: Json | null;
678
- location: Json | null;
679
- media: Json | null;
680
- media_key: string | null;
681
- mentioned_ids: string[] | null;
682
- message_id: string;
683
- message_ticket_id: string | null;
684
- message_type: string | null;
685
- order_id: string | null;
686
- org_id: string;
687
- org_phone: string;
688
- performed_by: string | null;
689
- prev_body: string | null;
690
- quoted_message_id: string | null;
691
- raw_data: Json | null;
692
- sender_phone: string | null;
693
- sent_message_id: string | null;
694
- timestamp: string | null;
695
- to: string | null;
696
- token: string | null;
697
- unique_id: string | null;
698
- updated_at: string | null;
699
- vcards: string[] | null;
700
- };
701
- Insert: {
702
- ack?: string | null;
703
- author?: string | null;
704
- body?: string | null;
705
- broadcast?: boolean | null;
706
- broadcast_id?: string | null;
707
- chat_id?: string | null;
708
- delivery_info?: Json | null;
709
- device_type?: string | null;
710
- duration?: string | null;
711
- flag_metadata?: Json | null;
712
- flag_response_time?: number | null;
713
- forwarding_score?: number | null;
714
- from?: string | null;
715
- from_me?: boolean | null;
716
- has_media?: boolean | null;
717
- has_quoted_msg?: boolean | null;
718
- has_reaction?: boolean | null;
719
- id?: Json | null;
720
- invite_v4?: Json | null;
721
- is_deleted?: boolean | null;
722
- is_ephemeral?: boolean | null;
723
- is_forwarded?: boolean | null;
724
- is_gif?: boolean | null;
725
- is_starred?: boolean | null;
726
- is_status?: boolean | null;
727
- links?: Json | null;
728
- location?: Json | null;
729
- media?: Json | null;
730
- media_key?: string | null;
731
- mentioned_ids?: string[] | null;
732
- message_id: string;
733
- message_ticket_id?: string | null;
734
- message_type?: string | null;
735
- order_id?: string | null;
736
- org_id: string;
737
- org_phone: string;
738
- performed_by?: string | null;
739
- prev_body?: string | null;
740
- quoted_message_id?: string | null;
741
- raw_data?: Json | null;
742
- sender_phone?: string | null;
743
- sent_message_id?: string | null;
744
- timestamp?: string | null;
745
- to?: string | null;
746
- token?: string | null;
747
- unique_id?: string | null;
748
- updated_at?: string | null;
749
- vcards?: string[] | null;
750
- };
751
- Update: {
752
- ack?: string | null;
753
- author?: string | null;
754
- body?: string | null;
755
- broadcast?: boolean | null;
756
- broadcast_id?: string | null;
757
- chat_id?: string | null;
758
- delivery_info?: Json | null;
759
- device_type?: string | null;
760
- duration?: string | null;
761
- flag_metadata?: Json | null;
762
- flag_response_time?: number | null;
763
- forwarding_score?: number | null;
764
- from?: string | null;
765
- from_me?: boolean | null;
766
- has_media?: boolean | null;
767
- has_quoted_msg?: boolean | null;
768
- has_reaction?: boolean | null;
769
- id?: Json | null;
770
- invite_v4?: Json | null;
771
- is_deleted?: boolean | null;
772
- is_ephemeral?: boolean | null;
773
- is_forwarded?: boolean | null;
774
- is_gif?: boolean | null;
775
- is_starred?: boolean | null;
776
- is_status?: boolean | null;
777
- links?: Json | null;
778
- location?: Json | null;
779
- media?: Json | null;
780
- media_key?: string | null;
781
- mentioned_ids?: string[] | null;
782
- message_id?: string;
783
- message_ticket_id?: string | null;
784
- message_type?: string | null;
785
- order_id?: string | null;
786
- org_id?: string;
787
- org_phone?: string;
788
- performed_by?: string | null;
789
- prev_body?: string | null;
790
- quoted_message_id?: string | null;
791
- raw_data?: Json | null;
792
- sender_phone?: string | null;
793
- sent_message_id?: string | null;
794
- timestamp?: string | null;
795
- to?: string | null;
796
- token?: string | null;
797
- unique_id?: string | null;
798
- updated_at?: string | null;
799
- vcards?: string[] | null;
800
- };
801
- Relationships: [];
802
- };
803
503
  tbl_chat_notifications: {
804
504
  Row: {
805
505
  author: string | null;
@@ -1166,6 +866,7 @@ export type Database = {
1166
866
  name: string | null;
1167
867
  number: string | null;
1168
868
  org_id: string;
869
+ periskope_name: string | null;
1169
870
  pushname: string | null;
1170
871
  short_name: string | null;
1171
872
  updated_at: string | null;
@@ -1193,6 +894,7 @@ export type Database = {
1193
894
  name?: string | null;
1194
895
  number?: string | null;
1195
896
  org_id: string;
897
+ periskope_name?: string | null;
1196
898
  pushname?: string | null;
1197
899
  short_name?: string | null;
1198
900
  updated_at?: string | null;
@@ -1220,6 +922,7 @@ export type Database = {
1220
922
  name?: string | null;
1221
923
  number?: string | null;
1222
924
  org_id?: string;
925
+ periskope_name?: string | null;
1223
926
  pushname?: string | null;
1224
927
  short_name?: string | null;
1225
928
  updated_at?: string | null;
@@ -1613,7 +1316,7 @@ export type Database = {
1613
1316
  first_connected_at: string | null;
1614
1317
  is_browser_open: boolean;
1615
1318
  is_ready: boolean | null;
1616
- legacy_version: boolean;
1319
+ legacy_version: boolean | null;
1617
1320
  org_id: string;
1618
1321
  org_phone: string | null;
1619
1322
  phone_id: string;
@@ -1632,7 +1335,7 @@ export type Database = {
1632
1335
  first_connected_at?: string | null;
1633
1336
  is_browser_open?: boolean;
1634
1337
  is_ready?: boolean | null;
1635
- legacy_version?: boolean;
1338
+ legacy_version?: boolean | null;
1636
1339
  org_id: string;
1637
1340
  org_phone?: string | null;
1638
1341
  phone_id?: string;
@@ -1651,7 +1354,7 @@ export type Database = {
1651
1354
  first_connected_at?: string | null;
1652
1355
  is_browser_open?: boolean;
1653
1356
  is_ready?: boolean | null;
1654
- legacy_version?: boolean;
1357
+ legacy_version?: boolean | null;
1655
1358
  org_id?: string;
1656
1359
  org_phone?: string | null;
1657
1360
  phone_id?: string;
@@ -1701,21 +1404,21 @@ export type Database = {
1701
1404
  command: string | null;
1702
1405
  created_at: string;
1703
1406
  message_payload: Json | null;
1704
- org_id: string | null;
1407
+ org_id: string;
1705
1408
  reply_id: string;
1706
1409
  };
1707
1410
  Insert: {
1708
1411
  command?: string | null;
1709
1412
  created_at?: string;
1710
1413
  message_payload?: Json | null;
1711
- org_id?: string | null;
1414
+ org_id: string;
1712
1415
  reply_id?: string;
1713
1416
  };
1714
1417
  Update: {
1715
1418
  command?: string | null;
1716
1419
  created_at?: string;
1717
1420
  message_payload?: Json | null;
1718
- org_id?: string | null;
1421
+ org_id?: string;
1719
1422
  reply_id?: string;
1720
1423
  };
1721
1424
  Relationships: [
@@ -1831,11 +1534,11 @@ export type Database = {
1831
1534
  };
1832
1535
  view_chats: {
1833
1536
  Row: {
1834
- active_phone: string | null;
1835
1537
  chat_access: Json | null;
1836
1538
  chat_id: string | null;
1837
1539
  chat_image: string | null;
1838
1540
  chat_name: string | null;
1541
+ chat_org_phones: string[] | null;
1839
1542
  chat_type: string | null;
1840
1543
  created_at: string | null;
1841
1544
  custom_properties: Json | null;
@@ -2069,6 +1772,17 @@ export type Database = {
2069
1772
  };
2070
1773
  Returns: Json;
2071
1774
  };
1775
+ get_universal_search_result: {
1776
+ Args: {
1777
+ search_category_input: string;
1778
+ search_query_input: string;
1779
+ org_id_input: string;
1780
+ };
1781
+ Returns: {
1782
+ category: string;
1783
+ result: Json;
1784
+ }[];
1785
+ };
2072
1786
  image_path: {
2073
1787
  Args: {
2074
1788
  path_input?: string;
@@ -2099,7 +1813,7 @@ export type Database = {
2099
1813
  enum_broadcast_status: 'inprogress' | 'completed' | 'stopped';
2100
1814
  enum_chat_colors: '#B4876E' | '#A5B337' | '#06CF9C' | '#25D366' | '#02A698' | '#7D9EF1' | '#007BFC' | '#5E47DE' | '#7F66FF' | '#9333EA' | '#FA6533' | '#C4532D' | '#DC2626' | '#FF2E74' | '#DB2777';
2101
1815
  enum_chat_tickets_status: 'open' | 'inprogress' | 'closed' | 'archived';
2102
- enum_integration_name: 'org.created' | 'org.updated' | 'org.member.created' | 'org.member.updated' | 'org.phone.created' | 'org.phone.connected' | 'org.phone.disconnected' | 'org.subscription.trial_will_end' | 'chat.created' | 'chat.updated' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.ack.updated' | 'reaction.created' | 'reaction.updated' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted';
1816
+ enum_integration_name: 'org.created' | 'org.updated' | 'org.member.created' | 'org.member.updated' | 'org.phone.created' | 'org.phone.connected' | 'org.phone.disconnected' | 'org.subscription.trial_will_end' | 'chat.created' | 'chat.updated' | 'chat.notification.created' | 'message.created' | 'message.updated' | 'message.deleted' | 'message.ack.updated' | 'reaction.created' | 'reaction.updated' | 'ticket.created' | 'ticket.updated' | 'ticket.deleted';
2103
1817
  enum_integration_type: 'zapier' | 'pabbly' | 'api' | 'webhook' | 'hubspot' | 'freshdesk' | 'slack' | 'jira' | 'salesforce';
2104
1818
  enum_member_role: 'admin' | 'member';
2105
1819
  };
@@ -2384,6 +2098,10 @@ export type Database = {
2384
2098
  updated_at: string;
2385
2099
  }[];
2386
2100
  };
2101
+ operation: {
2102
+ Args: Record<PropertyKey, never>;
2103
+ Returns: string;
2104
+ };
2387
2105
  search: {
2388
2106
  Args: {
2389
2107
  prefix: string;
package/dist/types.d.ts CHANGED
@@ -62,8 +62,6 @@ export type OrgMetadata = {
62
62
  ticket_prefix: string;
63
63
  referralSource?: string;
64
64
  surveyData?: MicrosurveyData;
65
- onboarding: Record<string, boolean>;
66
- onboarding_completed_at: Date | null;
67
65
  preferences?: OrgPreferences;
68
66
  hubspot_pipelines?: {
69
67
  id: string;
@@ -122,6 +120,10 @@ export type ChatType = Merge<Tables<'view_chats'>, {
122
120
  } | null;
123
121
  info_admins_only: boolean;
124
122
  messages_admins_only: boolean;
123
+ unread_count?: {
124
+ [key: string]: number;
125
+ };
126
+ active_phone: string | null;
125
127
  }>;
126
128
  export type MediaType = {
127
129
  path: string;
@@ -170,7 +172,7 @@ export type TicketType = OverrideProperties<Tables<'tbl_chat_tickets'>, {
170
172
  closed_at: string;
171
173
  closed_message?: string | null;
172
174
  send_reply_message_id?: string | null;
173
- } | null;
175
+ } | any;
174
176
  }>;
175
177
  export type ContactType = Merge<Tables<'tbl_contacts'>, {
176
178
  chats: ChatType[] | null;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.103",
3
+ "version": "0.6.105",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/supabase.types.ts CHANGED
@@ -351,9 +351,11 @@ export type Database = {
351
351
  duration: string | null;
352
352
  flag_metadata: Json | null;
353
353
  flag_response_time: number | null;
354
+ flag_status: boolean | null;
354
355
  forwarding_score: number | null;
355
356
  from: string | null;
356
357
  from_me: boolean | null;
358
+ fts: unknown | null;
357
359
  has_media: boolean | null;
358
360
  has_quoted_msg: boolean | null;
359
361
  has_reaction: boolean | null;
@@ -401,9 +403,11 @@ export type Database = {
401
403
  duration?: string | null;
402
404
  flag_metadata?: Json | null;
403
405
  flag_response_time?: number | null;
406
+ flag_status?: boolean | null;
404
407
  forwarding_score?: number | null;
405
408
  from?: string | null;
406
409
  from_me?: boolean | null;
410
+ fts?: unknown | null;
407
411
  has_media?: boolean | null;
408
412
  has_quoted_msg?: boolean | null;
409
413
  has_reaction?: boolean | null;
@@ -451,9 +455,11 @@ export type Database = {
451
455
  duration?: string | null;
452
456
  flag_metadata?: Json | null;
453
457
  flag_response_time?: number | null;
458
+ flag_status?: boolean | null;
454
459
  forwarding_score?: number | null;
455
460
  from?: string | null;
456
461
  from_me?: boolean | null;
462
+ fts?: unknown | null;
457
463
  has_media?: boolean | null;
458
464
  has_quoted_msg?: boolean | null;
459
465
  has_reaction?: boolean | null;
@@ -491,7 +497,7 @@ export type Database = {
491
497
  };
492
498
  Relationships: [
493
499
  {
494
- foreignKeyName: 'tbl_chat_messages_parent_fkey_tbl_org_phones';
500
+ foreignKeyName: 'tbl_chat_messages_fkey_tbl_org_phones';
495
501
  columns: ['org_phone', 'org_id'];
496
502
  isOneToOne: false;
497
503
  referencedRelation: 'tbl_org_phones';
@@ -499,312 +505,6 @@ export type Database = {
499
505
  },
500
506
  ];
501
507
  };
502
- tbl_chat_messages_2997dd64_89bf_48d3_9a22_b314fca017e5: {
503
- Row: {
504
- ack: string | null;
505
- author: string | null;
506
- body: string | null;
507
- broadcast: boolean | null;
508
- broadcast_id: string | null;
509
- chat_id: string | null;
510
- delivery_info: Json | null;
511
- device_type: string | null;
512
- duration: string | null;
513
- flag_metadata: Json | null;
514
- flag_response_time: number | null;
515
- forwarding_score: number | null;
516
- from: string | null;
517
- from_me: boolean | null;
518
- has_media: boolean | null;
519
- has_quoted_msg: boolean | null;
520
- has_reaction: boolean | null;
521
- id: Json | null;
522
- invite_v4: Json | null;
523
- is_deleted: boolean | null;
524
- is_ephemeral: boolean | null;
525
- is_forwarded: boolean | null;
526
- is_gif: boolean | null;
527
- is_starred: boolean | null;
528
- is_status: boolean | null;
529
- links: Json | null;
530
- location: Json | null;
531
- media: Json | null;
532
- media_key: string | null;
533
- mentioned_ids: string[] | null;
534
- message_id: string;
535
- message_ticket_id: string | null;
536
- message_type: string | null;
537
- order_id: string | null;
538
- org_id: string;
539
- org_phone: string;
540
- performed_by: string | null;
541
- prev_body: string | null;
542
- quoted_message_id: string | null;
543
- raw_data: Json | null;
544
- sender_phone: string | null;
545
- sent_message_id: string | null;
546
- timestamp: string | null;
547
- to: string | null;
548
- token: string | null;
549
- unique_id: string | null;
550
- updated_at: string | null;
551
- vcards: string[] | null;
552
- };
553
- Insert: {
554
- ack?: string | null;
555
- author?: string | null;
556
- body?: string | null;
557
- broadcast?: boolean | null;
558
- broadcast_id?: string | null;
559
- chat_id?: string | null;
560
- delivery_info?: Json | null;
561
- device_type?: string | null;
562
- duration?: string | null;
563
- flag_metadata?: Json | null;
564
- flag_response_time?: number | null;
565
- forwarding_score?: number | null;
566
- from?: string | null;
567
- from_me?: boolean | null;
568
- has_media?: boolean | null;
569
- has_quoted_msg?: boolean | null;
570
- has_reaction?: boolean | null;
571
- id?: Json | null;
572
- invite_v4?: Json | null;
573
- is_deleted?: boolean | null;
574
- is_ephemeral?: boolean | null;
575
- is_forwarded?: boolean | null;
576
- is_gif?: boolean | null;
577
- is_starred?: boolean | null;
578
- is_status?: boolean | null;
579
- links?: Json | null;
580
- location?: Json | null;
581
- media?: Json | null;
582
- media_key?: string | null;
583
- mentioned_ids?: string[] | null;
584
- message_id: string;
585
- message_ticket_id?: string | null;
586
- message_type?: string | null;
587
- order_id?: string | null;
588
- org_id: string;
589
- org_phone: string;
590
- performed_by?: string | null;
591
- prev_body?: string | null;
592
- quoted_message_id?: string | null;
593
- raw_data?: Json | null;
594
- sender_phone?: string | null;
595
- sent_message_id?: string | null;
596
- timestamp?: string | null;
597
- to?: string | null;
598
- token?: string | null;
599
- unique_id?: string | null;
600
- updated_at?: string | null;
601
- vcards?: string[] | null;
602
- };
603
- Update: {
604
- ack?: string | null;
605
- author?: string | null;
606
- body?: string | null;
607
- broadcast?: boolean | null;
608
- broadcast_id?: string | null;
609
- chat_id?: string | null;
610
- delivery_info?: Json | null;
611
- device_type?: string | null;
612
- duration?: string | null;
613
- flag_metadata?: Json | null;
614
- flag_response_time?: number | null;
615
- forwarding_score?: number | null;
616
- from?: string | null;
617
- from_me?: boolean | null;
618
- has_media?: boolean | null;
619
- has_quoted_msg?: boolean | null;
620
- has_reaction?: boolean | null;
621
- id?: Json | null;
622
- invite_v4?: Json | null;
623
- is_deleted?: boolean | null;
624
- is_ephemeral?: boolean | null;
625
- is_forwarded?: boolean | null;
626
- is_gif?: boolean | null;
627
- is_starred?: boolean | null;
628
- is_status?: boolean | null;
629
- links?: Json | null;
630
- location?: Json | null;
631
- media?: Json | null;
632
- media_key?: string | null;
633
- mentioned_ids?: string[] | null;
634
- message_id?: string;
635
- message_ticket_id?: string | null;
636
- message_type?: string | null;
637
- order_id?: string | null;
638
- org_id?: string;
639
- org_phone?: string;
640
- performed_by?: string | null;
641
- prev_body?: string | null;
642
- quoted_message_id?: string | null;
643
- raw_data?: Json | null;
644
- sender_phone?: string | null;
645
- sent_message_id?: string | null;
646
- timestamp?: string | null;
647
- to?: string | null;
648
- token?: string | null;
649
- unique_id?: string | null;
650
- updated_at?: string | null;
651
- vcards?: string[] | null;
652
- };
653
- Relationships: [];
654
- };
655
- tbl_chat_messages_default: {
656
- Row: {
657
- ack: string | null;
658
- author: string | null;
659
- body: string | null;
660
- broadcast: boolean | null;
661
- broadcast_id: string | null;
662
- chat_id: string | null;
663
- delivery_info: Json | null;
664
- device_type: string | null;
665
- duration: string | null;
666
- flag_metadata: Json | null;
667
- flag_response_time: number | null;
668
- forwarding_score: number | null;
669
- from: string | null;
670
- from_me: boolean | null;
671
- has_media: boolean | null;
672
- has_quoted_msg: boolean | null;
673
- has_reaction: boolean | null;
674
- id: Json | null;
675
- invite_v4: Json | null;
676
- is_deleted: boolean | null;
677
- is_ephemeral: boolean | null;
678
- is_forwarded: boolean | null;
679
- is_gif: boolean | null;
680
- is_starred: boolean | null;
681
- is_status: boolean | null;
682
- links: Json | null;
683
- location: Json | null;
684
- media: Json | null;
685
- media_key: string | null;
686
- mentioned_ids: string[] | null;
687
- message_id: string;
688
- message_ticket_id: string | null;
689
- message_type: string | null;
690
- order_id: string | null;
691
- org_id: string;
692
- org_phone: string;
693
- performed_by: string | null;
694
- prev_body: string | null;
695
- quoted_message_id: string | null;
696
- raw_data: Json | null;
697
- sender_phone: string | null;
698
- sent_message_id: string | null;
699
- timestamp: string | null;
700
- to: string | null;
701
- token: string | null;
702
- unique_id: string | null;
703
- updated_at: string | null;
704
- vcards: string[] | null;
705
- };
706
- Insert: {
707
- ack?: string | null;
708
- author?: string | null;
709
- body?: string | null;
710
- broadcast?: boolean | null;
711
- broadcast_id?: string | null;
712
- chat_id?: string | null;
713
- delivery_info?: Json | null;
714
- device_type?: string | null;
715
- duration?: string | null;
716
- flag_metadata?: Json | null;
717
- flag_response_time?: number | null;
718
- forwarding_score?: number | null;
719
- from?: string | null;
720
- from_me?: boolean | null;
721
- has_media?: boolean | null;
722
- has_quoted_msg?: boolean | null;
723
- has_reaction?: boolean | null;
724
- id?: Json | null;
725
- invite_v4?: Json | null;
726
- is_deleted?: boolean | null;
727
- is_ephemeral?: boolean | null;
728
- is_forwarded?: boolean | null;
729
- is_gif?: boolean | null;
730
- is_starred?: boolean | null;
731
- is_status?: boolean | null;
732
- links?: Json | null;
733
- location?: Json | null;
734
- media?: Json | null;
735
- media_key?: string | null;
736
- mentioned_ids?: string[] | null;
737
- message_id: string;
738
- message_ticket_id?: string | null;
739
- message_type?: string | null;
740
- order_id?: string | null;
741
- org_id: string;
742
- org_phone: string;
743
- performed_by?: string | null;
744
- prev_body?: string | null;
745
- quoted_message_id?: string | null;
746
- raw_data?: Json | null;
747
- sender_phone?: string | null;
748
- sent_message_id?: string | null;
749
- timestamp?: string | null;
750
- to?: string | null;
751
- token?: string | null;
752
- unique_id?: string | null;
753
- updated_at?: string | null;
754
- vcards?: string[] | null;
755
- };
756
- Update: {
757
- ack?: string | null;
758
- author?: string | null;
759
- body?: string | null;
760
- broadcast?: boolean | null;
761
- broadcast_id?: string | null;
762
- chat_id?: string | null;
763
- delivery_info?: Json | null;
764
- device_type?: string | null;
765
- duration?: string | null;
766
- flag_metadata?: Json | null;
767
- flag_response_time?: number | null;
768
- forwarding_score?: number | null;
769
- from?: string | null;
770
- from_me?: boolean | null;
771
- has_media?: boolean | null;
772
- has_quoted_msg?: boolean | null;
773
- has_reaction?: boolean | null;
774
- id?: Json | null;
775
- invite_v4?: Json | null;
776
- is_deleted?: boolean | null;
777
- is_ephemeral?: boolean | null;
778
- is_forwarded?: boolean | null;
779
- is_gif?: boolean | null;
780
- is_starred?: boolean | null;
781
- is_status?: boolean | null;
782
- links?: Json | null;
783
- location?: Json | null;
784
- media?: Json | null;
785
- media_key?: string | null;
786
- mentioned_ids?: string[] | null;
787
- message_id?: string;
788
- message_ticket_id?: string | null;
789
- message_type?: string | null;
790
- order_id?: string | null;
791
- org_id?: string;
792
- org_phone?: string;
793
- performed_by?: string | null;
794
- prev_body?: string | null;
795
- quoted_message_id?: string | null;
796
- raw_data?: Json | null;
797
- sender_phone?: string | null;
798
- sent_message_id?: string | null;
799
- timestamp?: string | null;
800
- to?: string | null;
801
- token?: string | null;
802
- unique_id?: string | null;
803
- updated_at?: string | null;
804
- vcards?: string[] | null;
805
- };
806
- Relationships: [];
807
- };
808
508
  tbl_chat_notifications: {
809
509
  Row: {
810
510
  author: string | null;
@@ -1177,6 +877,7 @@ export type Database = {
1177
877
  name: string | null;
1178
878
  number: string | null;
1179
879
  org_id: string;
880
+ periskope_name: string | null;
1180
881
  pushname: string | null;
1181
882
  short_name: string | null;
1182
883
  updated_at: string | null;
@@ -1206,6 +907,7 @@ export type Database = {
1206
907
  name?: string | null;
1207
908
  number?: string | null;
1208
909
  org_id: string;
910
+ periskope_name?: string | null;
1209
911
  pushname?: string | null;
1210
912
  short_name?: string | null;
1211
913
  updated_at?: string | null;
@@ -1235,6 +937,7 @@ export type Database = {
1235
937
  name?: string | null;
1236
938
  number?: string | null;
1237
939
  org_id?: string;
940
+ periskope_name?: string | null;
1238
941
  pushname?: string | null;
1239
942
  short_name?: string | null;
1240
943
  updated_at?: string | null;
@@ -1628,7 +1331,7 @@ export type Database = {
1628
1331
  first_connected_at: string | null;
1629
1332
  is_browser_open: boolean;
1630
1333
  is_ready: boolean | null;
1631
- legacy_version: boolean;
1334
+ legacy_version: boolean | null;
1632
1335
  org_id: string;
1633
1336
  org_phone: string | null;
1634
1337
  phone_id: string;
@@ -1647,7 +1350,7 @@ export type Database = {
1647
1350
  first_connected_at?: string | null;
1648
1351
  is_browser_open?: boolean;
1649
1352
  is_ready?: boolean | null;
1650
- legacy_version?: boolean;
1353
+ legacy_version?: boolean | null;
1651
1354
  org_id: string;
1652
1355
  org_phone?: string | null;
1653
1356
  phone_id?: string;
@@ -1666,7 +1369,7 @@ export type Database = {
1666
1369
  first_connected_at?: string | null;
1667
1370
  is_browser_open?: boolean;
1668
1371
  is_ready?: boolean | null;
1669
- legacy_version?: boolean;
1372
+ legacy_version?: boolean | null;
1670
1373
  org_id?: string;
1671
1374
  org_phone?: string | null;
1672
1375
  phone_id?: string;
@@ -1716,21 +1419,21 @@ export type Database = {
1716
1419
  command: string | null;
1717
1420
  created_at: string;
1718
1421
  message_payload: Json | null;
1719
- org_id: string | null;
1422
+ org_id: string;
1720
1423
  reply_id: string;
1721
1424
  };
1722
1425
  Insert: {
1723
1426
  command?: string | null;
1724
1427
  created_at?: string;
1725
1428
  message_payload?: Json | null;
1726
- org_id?: string | null;
1429
+ org_id: string;
1727
1430
  reply_id?: string;
1728
1431
  };
1729
1432
  Update: {
1730
1433
  command?: string | null;
1731
1434
  created_at?: string;
1732
1435
  message_payload?: Json | null;
1733
- org_id?: string | null;
1436
+ org_id?: string;
1734
1437
  reply_id?: string;
1735
1438
  };
1736
1439
  Relationships: [
@@ -1848,11 +1551,11 @@ export type Database = {
1848
1551
  };
1849
1552
  view_chats: {
1850
1553
  Row: {
1851
- active_phone: string | null;
1852
1554
  chat_access: Json | null;
1853
1555
  chat_id: string | null;
1854
1556
  chat_image: string | null;
1855
1557
  chat_name: string | null;
1558
+ chat_org_phones: string[] | null;
1856
1559
  chat_type: string | null;
1857
1560
  created_at: string | null;
1858
1561
  custom_properties: Json | null;
@@ -2086,6 +1789,17 @@ export type Database = {
2086
1789
  };
2087
1790
  Returns: Json;
2088
1791
  };
1792
+ get_universal_search_result: {
1793
+ Args: {
1794
+ search_category_input: string;
1795
+ search_query_input: string;
1796
+ org_id_input: string;
1797
+ };
1798
+ Returns: {
1799
+ category: string;
1800
+ result: Json;
1801
+ }[];
1802
+ };
2089
1803
  image_path: {
2090
1804
  Args: {
2091
1805
  path_input?: string;
@@ -2142,6 +1856,7 @@ export type Database = {
2142
1856
  | 'org.subscription.trial_will_end'
2143
1857
  | 'chat.created'
2144
1858
  | 'chat.updated'
1859
+ | 'chat.notification.created'
2145
1860
  | 'message.created'
2146
1861
  | 'message.updated'
2147
1862
  | 'message.deleted'
@@ -2444,6 +2159,10 @@ export type Database = {
2444
2159
  updated_at: string;
2445
2160
  }[];
2446
2161
  };
2162
+ operation: {
2163
+ Args: Record<PropertyKey, never>;
2164
+ Returns: string;
2165
+ };
2447
2166
  search: {
2448
2167
  Args: {
2449
2168
  prefix: string;
package/types.ts CHANGED
@@ -85,8 +85,6 @@ export type OrgMetadata = {
85
85
  ticket_prefix: string;
86
86
  referralSource?: string;
87
87
  surveyData?: MicrosurveyData;
88
- onboarding: Record<string, boolean>;
89
- onboarding_completed_at: Date | null;
90
88
  preferences?: OrgPreferences;
91
89
  hubspot_pipelines?: {
92
90
  id: string;
@@ -151,7 +149,8 @@ export type ChatType = Merge<
151
149
  } | null;
152
150
  info_admins_only: boolean;
153
151
  messages_admins_only: boolean;
154
- // is_open?: boolean;
152
+ unread_count?: { [key: string]: number };
153
+ active_phone: string | null;
155
154
  }
156
155
  >;
157
156
 
@@ -205,14 +204,17 @@ export type TicketType = OverrideProperties<
205
204
  };
206
205
  object_data?: HubspotObjectDataType;
207
206
  } | null;
208
- close_ticket_metadata?: {
209
- closed_by: string;
210
- closed_at: string;
211
- closed_message?: string | null;
212
- send_reply_message_id?: string | null;
213
- } | null;
207
+ close_ticket_metadata?:
208
+ | {
209
+ closed_by: string;
210
+ closed_at: string;
211
+ closed_message?: string | null;
212
+ send_reply_message_id?: string | null;
213
+ }
214
+ | any;
214
215
  }
215
216
  >;
217
+
216
218
  export type ContactType = Merge<
217
219
  Tables<'tbl_contacts'>,
218
220
  {