@periskope/types 0.6.147 → 0.6.149

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/supabase.types.ts CHANGED
@@ -109,6 +109,42 @@ export type Database = {
109
109
  }
110
110
  Relationships: []
111
111
  }
112
+ tbl_feature_flags: {
113
+ Row: {
114
+ created_at: string | null
115
+ enabled: boolean | null
116
+ excluded_orgs: string[] | null
117
+ exclusive_to_orgs: string[] | null
118
+ feature: string
119
+ included_orgs: string[] | null
120
+ percentage: number | null
121
+ plans: string[] | null
122
+ start_date: string | null
123
+ }
124
+ Insert: {
125
+ created_at?: string | null
126
+ enabled?: boolean | null
127
+ excluded_orgs?: string[] | null
128
+ exclusive_to_orgs?: string[] | null
129
+ feature: string
130
+ included_orgs?: string[] | null
131
+ percentage?: number | null
132
+ plans?: string[] | null
133
+ start_date?: string | null
134
+ }
135
+ Update: {
136
+ created_at?: string | null
137
+ enabled?: boolean | null
138
+ excluded_orgs?: string[] | null
139
+ exclusive_to_orgs?: string[] | null
140
+ feature?: string
141
+ included_orgs?: string[] | null
142
+ percentage?: number | null
143
+ plans?: string[] | null
144
+ start_date?: string | null
145
+ }
146
+ Relationships: []
147
+ }
112
148
  tbl_trigger_logs: {
113
149
  Row: {
114
150
  created_at: string
@@ -723,39 +759,54 @@ export type Database = {
723
759
  assigned_to: string | null
724
760
  chat_access: Json | null
725
761
  chat_id: string
762
+ chat_image: string | null
763
+ chat_name: string | null
726
764
  chat_org_phones: string[]
765
+ chat_type: string | null
727
766
  custom_properties: Json | null
728
767
  flag_count_map: Json | null
729
768
  hubspot_metadata: Json | null
730
769
  label_ids: Json | null
770
+ latest_message_timestamp: string | null
731
771
  org_id: string
732
772
  unread_count: Json | null
773
+ unread_count_map: Json | null
733
774
  updated_at: string | null
734
775
  }
735
776
  Insert: {
736
777
  assigned_to?: string | null
737
778
  chat_access?: Json | null
738
779
  chat_id: string
780
+ chat_image?: string | null
781
+ chat_name?: string | null
739
782
  chat_org_phones?: string[]
783
+ chat_type?: string | null
740
784
  custom_properties?: Json | null
741
785
  flag_count_map?: Json | null
742
786
  hubspot_metadata?: Json | null
743
787
  label_ids?: Json | null
788
+ latest_message_timestamp?: string | null
744
789
  org_id: string
745
790
  unread_count?: Json | null
791
+ unread_count_map?: Json | null
746
792
  updated_at?: string | null
747
793
  }
748
794
  Update: {
749
795
  assigned_to?: string | null
750
796
  chat_access?: Json | null
751
797
  chat_id?: string
798
+ chat_image?: string | null
799
+ chat_name?: string | null
752
800
  chat_org_phones?: string[]
801
+ chat_type?: string | null
753
802
  custom_properties?: Json | null
754
803
  flag_count_map?: Json | null
755
804
  hubspot_metadata?: Json | null
756
805
  label_ids?: Json | null
806
+ latest_message_timestamp?: string | null
757
807
  org_id?: string
758
808
  unread_count?: Json | null
809
+ unread_count_map?: Json | null
759
810
  updated_at?: string | null
760
811
  }
761
812
  Relationships: []
@@ -1809,7 +1860,6 @@ export type Database = {
1809
1860
  is_exited: boolean | null
1810
1861
  is_muted: boolean | null
1811
1862
  label_ids: Json | null
1812
- last_read_timestamp: string | null
1813
1863
  latest_message: Json | null
1814
1864
  member_add_mode: string | null
1815
1865
  member_count: number | null
@@ -1895,6 +1945,13 @@ export type Database = {
1895
1945
  }
1896
1946
  }
1897
1947
  Functions: {
1948
+ check_feature_flag_access: {
1949
+ Args: {
1950
+ org_id_input: string
1951
+ feature_input: string
1952
+ }
1953
+ Returns: boolean
1954
+ }
1898
1955
  create_partition: {
1899
1956
  Args: {
1900
1957
  org_id_input: string
@@ -1955,19 +2012,19 @@ export type Database = {
1955
2012
  }
1956
2013
  get_chat_labels_data: {
1957
2014
  Args: {
1958
- org_id_input: string;
1959
- chat_ids_input?: string[];
1960
- };
1961
- Returns: Json[];
1962
- };
2015
+ org_id_input: string
2016
+ chat_ids_input?: string[]
2017
+ }
2018
+ Returns: Json[]
2019
+ }
1963
2020
  get_chat_rule_info: {
1964
2021
  Args: {
1965
- chat_id_input: string;
1966
- org_id_input: string;
1967
- org_phone_input: string;
1968
- };
1969
- Returns: Json;
1970
- };
2022
+ chat_id_input: string
2023
+ org_id_input: string
2024
+ org_phone_input: string
2025
+ }
2026
+ Returns: Json
2027
+ }
1971
2028
  get_chats: {
1972
2029
  Args: {
1973
2030
  org_id_input: string
@@ -2014,22 +2071,31 @@ export type Database = {
2014
2071
  }
2015
2072
  Returns: Json
2016
2073
  }
2074
+ get_feature_flags: {
2075
+ Args: {
2076
+ org_id_input: string
2077
+ }
2078
+ Returns: {
2079
+ feature: string
2080
+ enabled: boolean
2081
+ }[]
2082
+ }
2017
2083
  get_integration_data: {
2018
2084
  Args: {
2019
- org_id_input?: string;
2020
- };
2021
- Returns: Json;
2022
- };
2085
+ org_id_input?: string
2086
+ }
2087
+ Returns: Json
2088
+ }
2023
2089
  get_message_rule_info: {
2024
2090
  Args: {
2025
- message_id_input: string;
2026
- chat_id_input: string;
2027
- org_id_input: string;
2028
- org_phone_input: string;
2029
- sender_id_input: string;
2030
- };
2031
- Returns: Json;
2032
- };
2091
+ message_id_input: string
2092
+ chat_id_input: string
2093
+ org_id_input: string
2094
+ org_phone_input: string
2095
+ sender_id_input: string
2096
+ }
2097
+ Returns: Json
2098
+ }
2033
2099
  get_messages_notifications_reactions: {
2034
2100
  Args: {
2035
2101
  org_id_input: string
@@ -2053,22 +2119,22 @@ export type Database = {
2053
2119
  }
2054
2120
  get_org_phones: {
2055
2121
  Args: {
2056
- org_id_input?: string;
2057
- phone_id_input?: string;
2058
- };
2059
- Returns: Json;
2060
- };
2122
+ org_id_input?: string
2123
+ phone_id_input?: string
2124
+ }
2125
+ Returns: Json
2126
+ }
2061
2127
  get_reaction_rule_info: {
2062
2128
  Args: {
2063
- reaction_id_input: string;
2064
- message_id_input: string;
2065
- chat_id_input: string;
2066
- org_id_input: string;
2067
- org_phone_input: string;
2068
- sender_id_input: string;
2069
- };
2070
- Returns: Json;
2071
- };
2129
+ reaction_id_input: string
2130
+ message_id_input: string
2131
+ chat_id_input: string
2132
+ org_id_input: string
2133
+ org_phone_input: string
2134
+ sender_id_input: string
2135
+ }
2136
+ Returns: Json
2137
+ }
2072
2138
  get_team_metrics_between_dates: {
2073
2139
  Args: {
2074
2140
  org_id_input: string
@@ -2080,22 +2146,22 @@ export type Database = {
2080
2146
  }
2081
2147
  get_ticket_info: {
2082
2148
  Args: {
2083
- ticket_id_input?: string;
2084
- org_id_input?: string;
2085
- chat_id_input?: string;
2086
- unique_message_id_input?: string;
2087
- };
2088
- Returns: Json;
2089
- };
2149
+ ticket_id_input?: string
2150
+ org_id_input?: string
2151
+ chat_id_input?: string
2152
+ unique_message_id_input?: string
2153
+ }
2154
+ Returns: Json
2155
+ }
2090
2156
  get_ticket_rule_info: {
2091
2157
  Args: {
2092
- ticket_id_input: string;
2093
- unique_message_id_input: string;
2094
- chat_id_input: string;
2095
- org_id_input: string;
2096
- };
2097
- Returns: Json;
2098
- };
2158
+ ticket_id_input: string
2159
+ unique_message_id_input: string
2160
+ chat_id_input: string
2161
+ org_id_input: string
2162
+ }
2163
+ Returns: Json
2164
+ }
2099
2165
  get_universal_search_result: {
2100
2166
  Args: {
2101
2167
  search_category_input: string
@@ -2194,6 +2260,8 @@ export type Database = {
2194
2260
  | "ticket.updated"
2195
2261
  | "ticket.deleted"
2196
2262
  | "org.integrations.updated"
2263
+ | "message.flagged"
2264
+ | "message.unflagged"
2197
2265
  enum_integration_type:
2198
2266
  | "zapier"
2199
2267
  | "pabbly"
package/types.ts CHANGED
@@ -94,6 +94,7 @@ export type OrgMetadata = {
94
94
  };
95
95
 
96
96
  type AccessScopes = {
97
+ feature_flags: Record<string, boolean>;
97
98
  integrations: boolean;
98
99
  exports: boolean;
99
100
  };
@@ -156,6 +157,7 @@ export type ChatType = Merge<
156
157
  flag_count_map?: { [key: string]: number };
157
158
  is_archived?: boolean;
158
159
  is_pinned?: boolean;
160
+ closed_at?: number;
159
161
  }
160
162
  >;
161
163
 
@@ -471,6 +473,8 @@ export enum IntegrationLogType {
471
473
  NEW_TICKET = 'ticket.created',
472
474
  TICKET_UPDATED = 'ticket.updated',
473
475
  TICKET_DELETED = 'ticket.deleted',
476
+ MESSAGE_FLAGGED = 'message.flagged',
477
+ MESSAGE_UNFLAGGED = 'message.unflagged',
474
478
  }
475
479
 
476
480
  export type IntegrationLogMetadataType<T extends IntegrationLogType> =
@@ -483,6 +487,8 @@ export type IntegrationLogMetadataType<T extends IntegrationLogType> =
483
487
  | IntegrationLogType.MESSAGE_UPDATED
484
488
  | IntegrationLogType.MESSAGE_DELETED
485
489
  | IntegrationLogType.MESSAGE_ACK_UPDATED
490
+ | IntegrationLogType.MESSAGE_FLAGGED
491
+ | IntegrationLogType.MESSAGE_UNFLAGGED
486
492
  ? Tables<'tbl_chat_messages'>
487
493
  : T extends
488
494
  | IntegrationLogType.REACTION_CREATED
@@ -553,6 +559,9 @@ export type UserPreferences = {
553
559
  right_sidepanel_open: boolean;
554
560
  sync_wa_unread_count: boolean;
555
561
  pinned_chats: string[];
562
+ archived_chats: string[];
563
+ closed_chats: Record<string, number>;
564
+ periskope_chat_limit: number;
556
565
  };
557
566
 
558
567
  /* ----------------------------- POLL VOTE INFO ----------------------------- */
@@ -750,3 +759,4 @@ export type TicketRuleInfoType = {
750
759
  >;
751
760
  message: MessageRuleInfoType['message'];
752
761
  };
762
+ export type FeatureFlagReturnType = Record<string, boolean>;