@periskope/types 0.6.120 → 0.6.121

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.
@@ -62,6 +62,63 @@ export type Database = {
62
62
  };
63
63
  Relationships: [];
64
64
  };
65
+ tbl_automation_rules: {
66
+ Row: {
67
+ actions: Json;
68
+ conditions: Json;
69
+ created_at: string;
70
+ id: number;
71
+ is_active: boolean;
72
+ last_updated_at: string;
73
+ last_updated_by: string;
74
+ org_id: string;
75
+ rule_description: string | null;
76
+ rule_name: string;
77
+ trigger: string;
78
+ };
79
+ Insert: {
80
+ actions: Json;
81
+ conditions: Json;
82
+ created_at?: string;
83
+ id?: number;
84
+ is_active?: boolean;
85
+ last_updated_at?: string;
86
+ last_updated_by: string;
87
+ org_id: string;
88
+ rule_description?: string | null;
89
+ rule_name: string;
90
+ trigger: string;
91
+ };
92
+ Update: {
93
+ actions?: Json;
94
+ conditions?: Json;
95
+ created_at?: string;
96
+ id?: number;
97
+ is_active?: boolean;
98
+ last_updated_at?: string;
99
+ last_updated_by?: string;
100
+ org_id?: string;
101
+ rule_description?: string | null;
102
+ rule_name?: string;
103
+ trigger?: string;
104
+ };
105
+ Relationships: [
106
+ {
107
+ foreignKeyName: "public_tbl_automation_rules_org_id_fkey";
108
+ columns: ["org_id"];
109
+ isOneToOne: false;
110
+ referencedRelation: "tbl_org";
111
+ referencedColumns: ["org_id"];
112
+ },
113
+ {
114
+ foreignKeyName: "public_tbl_automation_rules_org_id_fkey";
115
+ columns: ["org_id"];
116
+ isOneToOne: false;
117
+ referencedRelation: "view_org";
118
+ referencedColumns: ["org_id"];
119
+ }
120
+ ];
121
+ };
65
122
  tbl_broadcast_logs: {
66
123
  Row: {
67
124
  broadcast_id: string;
@@ -238,6 +295,41 @@ export type Database = {
238
295
  }
239
296
  ];
240
297
  };
298
+ tbl_chat_access: {
299
+ Row: {
300
+ chat_id: string;
301
+ email: string;
302
+ has_access: boolean | null;
303
+ last_read_timestamp: string | null;
304
+ message_unread_count: number | null;
305
+ org_id: string;
306
+ };
307
+ Insert: {
308
+ chat_id: string;
309
+ email: string;
310
+ has_access?: boolean | null;
311
+ last_read_timestamp?: string | null;
312
+ message_unread_count?: number | null;
313
+ org_id: string;
314
+ };
315
+ Update: {
316
+ chat_id?: string;
317
+ email?: string;
318
+ has_access?: boolean | null;
319
+ last_read_timestamp?: string | null;
320
+ message_unread_count?: number | null;
321
+ org_id?: string;
322
+ };
323
+ Relationships: [
324
+ {
325
+ foreignKeyName: "tbl_chat_access_org_id_email_fkey";
326
+ columns: ["org_id", "email"];
327
+ isOneToOne: false;
328
+ referencedRelation: "tbl_org_members";
329
+ referencedColumns: ["org_id", "email"];
330
+ }
331
+ ];
332
+ };
241
333
  tbl_chat_logs: {
242
334
  Row: {
243
335
  action: string | null;
@@ -560,7 +652,7 @@ export type Database = {
560
652
  chat_id: string;
561
653
  chat_org_phones: string[];
562
654
  custom_properties: Json | null;
563
- flag_count: Json | null;
655
+ flag_count_map: Json | null;
564
656
  hubspot_metadata: Json | null;
565
657
  label_ids: Json | null;
566
658
  org_id: string;
@@ -573,7 +665,7 @@ export type Database = {
573
665
  chat_id: string;
574
666
  chat_org_phones?: string[];
575
667
  custom_properties?: Json | null;
576
- flag_count?: Json | null;
668
+ flag_count_map?: Json | null;
577
669
  hubspot_metadata?: Json | null;
578
670
  label_ids?: Json | null;
579
671
  org_id: string;
@@ -586,7 +678,7 @@ export type Database = {
586
678
  chat_id?: string;
587
679
  chat_org_phones?: string[];
588
680
  custom_properties?: Json | null;
589
- flag_count?: Json | null;
681
+ flag_count_map?: Json | null;
590
682
  hubspot_metadata?: Json | null;
591
683
  label_ids?: Json | null;
592
684
  org_id?: string;
@@ -752,6 +844,7 @@ export type Database = {
752
844
  chat_name: string | null;
753
845
  chat_type: string | null;
754
846
  created_at: string;
847
+ flag_count: number;
755
848
  group_metadata: Json | null;
756
849
  id: Json | null;
757
850
  invite_link: string | null;
@@ -776,6 +869,7 @@ export type Database = {
776
869
  chat_name?: string | null;
777
870
  chat_type?: string | null;
778
871
  created_at?: string;
872
+ flag_count?: number;
779
873
  group_metadata?: Json | null;
780
874
  id?: Json | null;
781
875
  invite_link?: string | null;
@@ -800,6 +894,7 @@ export type Database = {
800
894
  chat_name?: string | null;
801
895
  chat_type?: string | null;
802
896
  created_at?: string;
897
+ flag_count?: number;
803
898
  group_metadata?: Json | null;
804
899
  id?: Json | null;
805
900
  invite_link?: string | null;
@@ -840,6 +935,7 @@ export type Database = {
840
935
  is_business: boolean | null;
841
936
  is_enterprise: boolean | null;
842
937
  is_group: boolean | null;
938
+ is_imported: boolean | null;
843
939
  is_internal: boolean | null;
844
940
  is_me: boolean | null;
845
941
  is_my_contact: boolean | null;
@@ -868,6 +964,7 @@ export type Database = {
868
964
  is_business?: boolean | null;
869
965
  is_enterprise?: boolean | null;
870
966
  is_group?: boolean | null;
967
+ is_imported?: boolean | null;
871
968
  is_internal?: boolean | null;
872
969
  is_me?: boolean | null;
873
970
  is_my_contact?: boolean | null;
@@ -896,6 +993,7 @@ export type Database = {
896
993
  is_business?: boolean | null;
897
994
  is_enterprise?: boolean | null;
898
995
  is_group?: boolean | null;
996
+ is_imported?: boolean | null;
899
997
  is_internal?: boolean | null;
900
998
  is_me?: boolean | null;
901
999
  is_my_contact?: boolean | null;
@@ -1527,6 +1625,7 @@ export type Database = {
1527
1625
  created_at: string | null;
1528
1626
  custom_properties: Json | null;
1529
1627
  flag_count: number | null;
1628
+ flag_count_map: Json | null;
1530
1629
  group_description: string | null;
1531
1630
  hubspot_metadata: Json | null;
1532
1631
  info_admins_only: boolean | null;
@@ -1705,15 +1804,6 @@ export type Database = {
1705
1804
  };
1706
1805
  Returns: Json;
1707
1806
  };
1708
- get_dashboard_statistics_between_dates: {
1709
- Args: {
1710
- org_id_input: string;
1711
- start_date: string;
1712
- end_date: string;
1713
- chat_id_input?: string[];
1714
- };
1715
- Returns: Json;
1716
- };
1717
1807
  get_export_chats_data: {
1718
1808
  Args: {
1719
1809
  org_id_input: string;
@@ -2111,10 +2201,6 @@ export type Database = {
2111
2201
  updated_at: string;
2112
2202
  }[];
2113
2203
  };
2114
- operation: {
2115
- Args: Record<PropertyKey, never>;
2116
- Returns: string;
2117
- };
2118
2204
  search: {
2119
2205
  Args: {
2120
2206
  prefix: string;
package/dist/types.d.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { default as _Stripe } from 'stripe';
2
2
  import { Merge, OverrideProperties } from 'type-fest';
3
- import { Tables } from './supabase.types';
3
+ import { Tables, TablesUpdate } from './supabase.types';
4
4
  export declare enum AllPlans {
5
5
  FREE_TRIAL = "free-trial",
6
6
  ENTERPRISE = "enterprise",
@@ -180,8 +180,9 @@ export type ContactType = Merge<Tables<'tbl_contacts'>, {
180
180
  }>;
181
181
  export type ReactionType = Tables<'tbl_chat_reactions'>;
182
182
  export type NotificationType = Tables<'tbl_chat_notifications'>;
183
- export type ChatAccessType = Merge<Tables<'tbl_org_members'>, {
183
+ export type ChatAccessType = Merge<TablesUpdate<'tbl_org_members'>, {
184
184
  has_access?: boolean;
185
+ email: string | null;
185
186
  }>;
186
187
  export declare const labelColors: string[];
187
188
  export declare const enumChatColors: readonly ["#B4876E", "#A5B337", "#06CF9C", "#25D366", "#02A698", "#7D9EF1", "#007BFC", "#5E47DE", "#7F66FF", "#9333EA", "#FA6533", "#C4532D", "#DC2626", "#FF2E74", "#DB2777"];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.120",
3
+ "version": "0.6.121",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/supabase.types.ts CHANGED
@@ -61,6 +61,63 @@ export type Database = {
61
61
  }
62
62
  Relationships: []
63
63
  }
64
+ tbl_automation_rules: {
65
+ Row: {
66
+ actions: Json
67
+ conditions: Json
68
+ created_at: string
69
+ id: number
70
+ is_active: boolean
71
+ last_updated_at: string
72
+ last_updated_by: string
73
+ org_id: string
74
+ rule_description: string | null
75
+ rule_name: string
76
+ trigger: string
77
+ }
78
+ Insert: {
79
+ actions: Json
80
+ conditions: Json
81
+ created_at?: string
82
+ id?: number
83
+ is_active?: boolean
84
+ last_updated_at?: string
85
+ last_updated_by: string
86
+ org_id: string
87
+ rule_description?: string | null
88
+ rule_name: string
89
+ trigger: string
90
+ }
91
+ Update: {
92
+ actions?: Json
93
+ conditions?: Json
94
+ created_at?: string
95
+ id?: number
96
+ is_active?: boolean
97
+ last_updated_at?: string
98
+ last_updated_by?: string
99
+ org_id?: string
100
+ rule_description?: string | null
101
+ rule_name?: string
102
+ trigger?: string
103
+ }
104
+ Relationships: [
105
+ {
106
+ foreignKeyName: "public_tbl_automation_rules_org_id_fkey"
107
+ columns: ["org_id"]
108
+ isOneToOne: false
109
+ referencedRelation: "tbl_org"
110
+ referencedColumns: ["org_id"]
111
+ },
112
+ {
113
+ foreignKeyName: "public_tbl_automation_rules_org_id_fkey"
114
+ columns: ["org_id"]
115
+ isOneToOne: false
116
+ referencedRelation: "view_org"
117
+ referencedColumns: ["org_id"]
118
+ },
119
+ ]
120
+ }
64
121
  tbl_broadcast_logs: {
65
122
  Row: {
66
123
  broadcast_id: string
@@ -243,6 +300,41 @@ export type Database = {
243
300
  },
244
301
  ]
245
302
  }
303
+ tbl_chat_access: {
304
+ Row: {
305
+ chat_id: string
306
+ email: string
307
+ has_access: boolean | null
308
+ last_read_timestamp: string | null
309
+ message_unread_count: number | null
310
+ org_id: string
311
+ }
312
+ Insert: {
313
+ chat_id: string
314
+ email: string
315
+ has_access?: boolean | null
316
+ last_read_timestamp?: string | null
317
+ message_unread_count?: number | null
318
+ org_id: string
319
+ }
320
+ Update: {
321
+ chat_id?: string
322
+ email?: string
323
+ has_access?: boolean | null
324
+ last_read_timestamp?: string | null
325
+ message_unread_count?: number | null
326
+ org_id?: string
327
+ }
328
+ Relationships: [
329
+ {
330
+ foreignKeyName: "tbl_chat_access_org_id_email_fkey"
331
+ columns: ["org_id", "email"]
332
+ isOneToOne: false
333
+ referencedRelation: "tbl_org_members"
334
+ referencedColumns: ["org_id", "email"]
335
+ },
336
+ ]
337
+ }
246
338
  tbl_chat_logs: {
247
339
  Row: {
248
340
  action: string | null
@@ -565,7 +657,7 @@ export type Database = {
565
657
  chat_id: string
566
658
  chat_org_phones: string[]
567
659
  custom_properties: Json | null
568
- flag_count: Json | null
660
+ flag_count_map: Json | null
569
661
  hubspot_metadata: Json | null
570
662
  label_ids: Json | null
571
663
  org_id: string
@@ -578,7 +670,7 @@ export type Database = {
578
670
  chat_id: string
579
671
  chat_org_phones?: string[]
580
672
  custom_properties?: Json | null
581
- flag_count?: Json | null
673
+ flag_count_map?: Json | null
582
674
  hubspot_metadata?: Json | null
583
675
  label_ids?: Json | null
584
676
  org_id: string
@@ -591,7 +683,7 @@ export type Database = {
591
683
  chat_id?: string
592
684
  chat_org_phones?: string[]
593
685
  custom_properties?: Json | null
594
- flag_count?: Json | null
686
+ flag_count_map?: Json | null
595
687
  hubspot_metadata?: Json | null
596
688
  label_ids?: Json | null
597
689
  org_id?: string
@@ -761,6 +853,7 @@ export type Database = {
761
853
  chat_name: string | null
762
854
  chat_type: string | null
763
855
  created_at: string
856
+ flag_count: number
764
857
  group_metadata: Json | null
765
858
  id: Json | null
766
859
  invite_link: string | null
@@ -785,6 +878,7 @@ export type Database = {
785
878
  chat_name?: string | null
786
879
  chat_type?: string | null
787
880
  created_at?: string
881
+ flag_count?: number
788
882
  group_metadata?: Json | null
789
883
  id?: Json | null
790
884
  invite_link?: string | null
@@ -809,6 +903,7 @@ export type Database = {
809
903
  chat_name?: string | null
810
904
  chat_type?: string | null
811
905
  created_at?: string
906
+ flag_count?: number
812
907
  group_metadata?: Json | null
813
908
  id?: Json | null
814
909
  invite_link?: string | null
@@ -849,6 +944,7 @@ export type Database = {
849
944
  is_business: boolean | null
850
945
  is_enterprise: boolean | null
851
946
  is_group: boolean | null
947
+ is_imported: boolean | null
852
948
  is_internal: boolean | null
853
949
  is_me: boolean | null
854
950
  is_my_contact: boolean | null
@@ -877,6 +973,7 @@ export type Database = {
877
973
  is_business?: boolean | null
878
974
  is_enterprise?: boolean | null
879
975
  is_group?: boolean | null
976
+ is_imported?: boolean | null
880
977
  is_internal?: boolean | null
881
978
  is_me?: boolean | null
882
979
  is_my_contact?: boolean | null
@@ -905,6 +1002,7 @@ export type Database = {
905
1002
  is_business?: boolean | null
906
1003
  is_enterprise?: boolean | null
907
1004
  is_group?: boolean | null
1005
+ is_imported?: boolean | null
908
1006
  is_internal?: boolean | null
909
1007
  is_me?: boolean | null
910
1008
  is_my_contact?: boolean | null
@@ -1538,6 +1636,7 @@ export type Database = {
1538
1636
  created_at: string | null
1539
1637
  custom_properties: Json | null
1540
1638
  flag_count: number | null
1639
+ flag_count_map: Json | null
1541
1640
  group_description: string | null
1542
1641
  hubspot_metadata: Json | null
1543
1642
  info_admins_only: boolean | null
@@ -1716,15 +1815,6 @@ export type Database = {
1716
1815
  }
1717
1816
  Returns: Json
1718
1817
  }
1719
- get_dashboard_statistics_between_dates: {
1720
- Args: {
1721
- org_id_input: string
1722
- start_date: string
1723
- end_date: string
1724
- chat_id_input?: string[]
1725
- }
1726
- Returns: Json
1727
- }
1728
1818
  get_export_chats_data: {
1729
1819
  Args: {
1730
1820
  org_id_input: string
@@ -2168,10 +2258,6 @@ export type Database = {
2168
2258
  updated_at: string
2169
2259
  }[]
2170
2260
  }
2171
- operation: {
2172
- Args: Record<PropertyKey, never>
2173
- Returns: string
2174
- }
2175
2261
  search: {
2176
2262
  Args: {
2177
2263
  prefix: string
package/types.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import type { default as _Stripe } from 'stripe';
2
2
  import { Merge, OverrideProperties } from 'type-fest';
3
- import { Tables } from './supabase.types';
3
+ import { Tables, TablesUpdate } from './supabase.types';
4
4
 
5
5
  /* ----------------------------- TYPE SHORTHANDS ---------------------------- */
6
6
 
@@ -222,9 +222,10 @@ export type ReactionType = Tables<'tbl_chat_reactions'>;
222
222
  export type NotificationType = Tables<'tbl_chat_notifications'>;
223
223
 
224
224
  export type ChatAccessType = Merge<
225
- Tables<'tbl_org_members'>,
225
+ TablesUpdate<'tbl_org_members'>,
226
226
  {
227
227
  has_access?: boolean;
228
+ email: string | null;
228
229
  }
229
230
  >;
230
231