@periskope/types 0.6.65 → 0.6.67

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.
@@ -111,8 +111,6 @@ export type Database = {
111
111
  chat_id: string;
112
112
  email: string;
113
113
  has_access: boolean | null;
114
- is_archived: boolean;
115
- is_muted: boolean;
116
114
  last_read_timestamp: string | null;
117
115
  org_id: string;
118
116
  };
@@ -121,8 +119,6 @@ export type Database = {
121
119
  chat_id: string;
122
120
  email: string;
123
121
  has_access?: boolean | null;
124
- is_archived?: boolean;
125
- is_muted?: boolean;
126
122
  last_read_timestamp?: string | null;
127
123
  org_id: string;
128
124
  };
@@ -131,8 +127,6 @@ export type Database = {
131
127
  chat_id?: string;
132
128
  email?: string;
133
129
  has_access?: boolean | null;
134
- is_archived?: boolean;
135
- is_muted?: boolean;
136
130
  last_read_timestamp?: string | null;
137
131
  org_id?: string;
138
132
  };
@@ -160,7 +154,6 @@ export type Database = {
160
154
  forwarding_score: number | null;
161
155
  from: string | null;
162
156
  from_me: boolean | null;
163
- frt_timestamp: string | null;
164
157
  has_media: boolean | null;
165
158
  has_quoted_msg: boolean | null;
166
159
  has_reaction: boolean | null;
@@ -168,7 +161,6 @@ export type Database = {
168
161
  invite_v4: Json | null;
169
162
  is_deleted: boolean | null;
170
163
  is_ephemeral: boolean | null;
171
- is_flagged: boolean | null;
172
164
  is_forwarded: boolean | null;
173
165
  is_gif: boolean | null;
174
166
  is_starred: boolean | null;
@@ -210,7 +202,6 @@ export type Database = {
210
202
  forwarding_score?: number | null;
211
203
  from?: string | null;
212
204
  from_me?: boolean | null;
213
- frt_timestamp?: string | null;
214
205
  has_media?: boolean | null;
215
206
  has_quoted_msg?: boolean | null;
216
207
  has_reaction?: boolean | null;
@@ -218,7 +209,6 @@ export type Database = {
218
209
  invite_v4?: Json | null;
219
210
  is_deleted?: boolean | null;
220
211
  is_ephemeral?: boolean | null;
221
- is_flagged?: boolean | null;
222
212
  is_forwarded?: boolean | null;
223
213
  is_gif?: boolean | null;
224
214
  is_starred?: boolean | null;
@@ -260,7 +250,6 @@ export type Database = {
260
250
  forwarding_score?: number | null;
261
251
  from?: string | null;
262
252
  from_me?: boolean | null;
263
- frt_timestamp?: string | null;
264
253
  has_media?: boolean | null;
265
254
  has_quoted_msg?: boolean | null;
266
255
  has_reaction?: boolean | null;
@@ -268,7 +257,6 @@ export type Database = {
268
257
  invite_v4?: Json | null;
269
258
  is_deleted?: boolean | null;
270
259
  is_ephemeral?: boolean | null;
271
- is_flagged?: boolean | null;
272
260
  is_forwarded?: boolean | null;
273
261
  is_gif?: boolean | null;
274
262
  is_starred?: boolean | null;
@@ -739,6 +727,41 @@ export type Database = {
739
727
  }
740
728
  ];
741
729
  };
730
+ tbl_flagged_messages: {
731
+ Row: {
732
+ chat_id: string | null;
733
+ org_id: string;
734
+ response_id: string | null;
735
+ response_timestamp: string | null;
736
+ response_type: string | null;
737
+ unique_id: string;
738
+ };
739
+ Insert: {
740
+ chat_id?: string | null;
741
+ org_id: string;
742
+ response_id?: string | null;
743
+ response_timestamp?: string | null;
744
+ response_type?: string | null;
745
+ unique_id: string;
746
+ };
747
+ Update: {
748
+ chat_id?: string | null;
749
+ org_id?: string;
750
+ response_id?: string | null;
751
+ response_timestamp?: string | null;
752
+ response_type?: string | null;
753
+ unique_id?: string;
754
+ };
755
+ Relationships: [
756
+ {
757
+ foreignKeyName: "tbl_flagged_messages_org_id_fkey";
758
+ columns: ["org_id"];
759
+ isOneToOne: false;
760
+ referencedRelation: "tbl_org";
761
+ referencedColumns: ["org_id"];
762
+ }
763
+ ];
764
+ };
742
765
  tbl_integration_hooks: {
743
766
  Row: {
744
767
  hook_url: string;
@@ -874,6 +897,7 @@ export type Database = {
874
897
  tbl_org: {
875
898
  Row: {
876
899
  created_at: string;
900
+ is_subscription_active: boolean | null;
877
901
  org_id: string;
878
902
  org_image: string | null;
879
903
  org_metadata: Json | null;
@@ -882,10 +906,12 @@ export type Database = {
882
906
  stripe_customer_details: Json | null;
883
907
  stripe_customer_id: string | null;
884
908
  stripe_subscription_details: Json | null;
909
+ subscription_status: string | null;
885
910
  support_link: string | null;
886
911
  };
887
912
  Insert: {
888
913
  created_at?: string;
914
+ is_subscription_active?: boolean | null;
889
915
  org_id?: string;
890
916
  org_image?: string | null;
891
917
  org_metadata?: Json | null;
@@ -894,10 +920,12 @@ export type Database = {
894
920
  stripe_customer_details?: Json | null;
895
921
  stripe_customer_id?: string | null;
896
922
  stripe_subscription_details?: Json | null;
923
+ subscription_status?: string | null;
897
924
  support_link?: string | null;
898
925
  };
899
926
  Update: {
900
927
  created_at?: string;
928
+ is_subscription_active?: boolean | null;
901
929
  org_id?: string;
902
930
  org_image?: string | null;
903
931
  org_metadata?: Json | null;
@@ -906,6 +934,7 @@ export type Database = {
906
934
  stripe_customer_details?: Json | null;
907
935
  stripe_customer_id?: string | null;
908
936
  stripe_subscription_details?: Json | null;
937
+ subscription_status?: string | null;
909
938
  support_link?: string | null;
910
939
  };
911
940
  Relationships: [];
@@ -952,10 +981,12 @@ export type Database = {
952
981
  invited_at: string | null;
953
982
  invited_by: string | null;
954
983
  is_active: boolean;
984
+ label_ids: string[] | null;
955
985
  member_color: Database["public"]["Enums"]["enum_chat_colors"];
956
986
  member_image: string | null;
957
987
  member_name: string | null;
958
988
  org_id: string;
989
+ org_phones: string[] | null;
959
990
  role: Database["public"]["Enums"]["enum_member_role"];
960
991
  user_id: string | null;
961
992
  };
@@ -965,10 +996,12 @@ export type Database = {
965
996
  invited_at?: string | null;
966
997
  invited_by?: string | null;
967
998
  is_active?: boolean;
999
+ label_ids?: string[] | null;
968
1000
  member_color?: Database["public"]["Enums"]["enum_chat_colors"];
969
1001
  member_image?: string | null;
970
1002
  member_name?: string | null;
971
1003
  org_id: string;
1004
+ org_phones?: string[] | null;
972
1005
  role?: Database["public"]["Enums"]["enum_member_role"];
973
1006
  user_id?: string | null;
974
1007
  };
@@ -978,10 +1011,12 @@ export type Database = {
978
1011
  invited_at?: string | null;
979
1012
  invited_by?: string | null;
980
1013
  is_active?: boolean;
1014
+ label_ids?: string[] | null;
981
1015
  member_color?: Database["public"]["Enums"]["enum_chat_colors"];
982
1016
  member_image?: string | null;
983
1017
  member_name?: string | null;
984
1018
  org_id?: string;
1019
+ org_phones?: string[] | null;
985
1020
  role?: Database["public"]["Enums"]["enum_member_role"];
986
1021
  user_id?: string | null;
987
1022
  };
@@ -1012,10 +1047,12 @@ export type Database = {
1012
1047
  phone_id: string;
1013
1048
  phone_image: string | null;
1014
1049
  phone_name: string | null;
1050
+ phone_state: Json | null;
1015
1051
  qr_code: string | null;
1016
1052
  server_ip: string | null;
1017
1053
  updated_at: string | null;
1018
1054
  wa_state: string | null;
1055
+ wa_version: string | null;
1019
1056
  };
1020
1057
  Insert: {
1021
1058
  created_at?: string;
@@ -1026,10 +1063,12 @@ export type Database = {
1026
1063
  phone_id?: string;
1027
1064
  phone_image?: string | null;
1028
1065
  phone_name?: string | null;
1066
+ phone_state?: Json | null;
1029
1067
  qr_code?: string | null;
1030
1068
  server_ip?: string | null;
1031
1069
  updated_at?: string | null;
1032
1070
  wa_state?: string | null;
1071
+ wa_version?: string | null;
1033
1072
  };
1034
1073
  Update: {
1035
1074
  created_at?: string;
@@ -1040,10 +1079,12 @@ export type Database = {
1040
1079
  phone_id?: string;
1041
1080
  phone_image?: string | null;
1042
1081
  phone_name?: string | null;
1082
+ phone_state?: Json | null;
1043
1083
  qr_code?: string | null;
1044
1084
  server_ip?: string | null;
1045
1085
  updated_at?: string | null;
1046
1086
  wa_state?: string | null;
1087
+ wa_version?: string | null;
1047
1088
  };
1048
1089
  Relationships: [
1049
1090
  {
@@ -1237,6 +1278,13 @@ export type Database = {
1237
1278
  };
1238
1279
  Returns: Json;
1239
1280
  };
1281
+ get_org_phones: {
1282
+ Args: {
1283
+ org_id_input?: string;
1284
+ phone_id_input?: string;
1285
+ };
1286
+ Returns: Json;
1287
+ };
1240
1288
  get_ticket_info: {
1241
1289
  Args: {
1242
1290
  ticket_id_input?: string;
package/dist/types.d.ts CHANGED
@@ -144,20 +144,19 @@ export type StripeSubscription = _Stripe.Subscription;
144
144
  export type StripeCustomer = _Stripe.Customer;
145
145
  export type StripeCoupon = _Stripe.Coupon;
146
146
  export type StripePrice = _Stripe.Price;
147
- export type PhoneRealtimeChannel = {
147
+ export type PhoneStateType = {
148
148
  loading: boolean;
149
149
  state: string;
150
- ready: boolean;
151
- sync: boolean;
150
+ sync: number;
152
151
  percent: number | null;
153
152
  message?: string;
154
153
  error?: string;
155
- presence_ref?: string;
156
154
  };
157
155
  export type TicketLogType = OverrideProperties<Tables<'tbl_integration_logs'>, {
158
156
  integration_name: IntegrationLogType.NEW_TICKET;
159
157
  metadata: {
160
158
  ticket_id: string;
159
+ name: string;
161
160
  };
162
161
  }>;
163
162
  export type IntegrationLogDetailsType = TicketLogType;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@periskope/types",
3
- "version": "0.6.65",
3
+ "version": "0.6.67",
4
4
  "private": false,
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
package/supabase.types.ts CHANGED
@@ -110,8 +110,6 @@ export type Database = {
110
110
  chat_id: string
111
111
  email: string
112
112
  has_access: boolean | null
113
- is_archived: boolean
114
- is_muted: boolean
115
113
  last_read_timestamp: string | null
116
114
  org_id: string
117
115
  }
@@ -120,8 +118,6 @@ export type Database = {
120
118
  chat_id: string
121
119
  email: string
122
120
  has_access?: boolean | null
123
- is_archived?: boolean
124
- is_muted?: boolean
125
121
  last_read_timestamp?: string | null
126
122
  org_id: string
127
123
  }
@@ -130,8 +126,6 @@ export type Database = {
130
126
  chat_id?: string
131
127
  email?: string
132
128
  has_access?: boolean | null
133
- is_archived?: boolean
134
- is_muted?: boolean
135
129
  last_read_timestamp?: string | null
136
130
  org_id?: string
137
131
  }
@@ -159,7 +153,6 @@ export type Database = {
159
153
  forwarding_score: number | null
160
154
  from: string | null
161
155
  from_me: boolean | null
162
- frt_timestamp: string | null
163
156
  has_media: boolean | null
164
157
  has_quoted_msg: boolean | null
165
158
  has_reaction: boolean | null
@@ -167,7 +160,6 @@ export type Database = {
167
160
  invite_v4: Json | null
168
161
  is_deleted: boolean | null
169
162
  is_ephemeral: boolean | null
170
- is_flagged: boolean | null
171
163
  is_forwarded: boolean | null
172
164
  is_gif: boolean | null
173
165
  is_starred: boolean | null
@@ -209,7 +201,6 @@ export type Database = {
209
201
  forwarding_score?: number | null
210
202
  from?: string | null
211
203
  from_me?: boolean | null
212
- frt_timestamp?: string | null
213
204
  has_media?: boolean | null
214
205
  has_quoted_msg?: boolean | null
215
206
  has_reaction?: boolean | null
@@ -217,7 +208,6 @@ export type Database = {
217
208
  invite_v4?: Json | null
218
209
  is_deleted?: boolean | null
219
210
  is_ephemeral?: boolean | null
220
- is_flagged?: boolean | null
221
211
  is_forwarded?: boolean | null
222
212
  is_gif?: boolean | null
223
213
  is_starred?: boolean | null
@@ -259,7 +249,6 @@ export type Database = {
259
249
  forwarding_score?: number | null
260
250
  from?: string | null
261
251
  from_me?: boolean | null
262
- frt_timestamp?: string | null
263
252
  has_media?: boolean | null
264
253
  has_quoted_msg?: boolean | null
265
254
  has_reaction?: boolean | null
@@ -267,7 +256,6 @@ export type Database = {
267
256
  invite_v4?: Json | null
268
257
  is_deleted?: boolean | null
269
258
  is_ephemeral?: boolean | null
270
- is_flagged?: boolean | null
271
259
  is_forwarded?: boolean | null
272
260
  is_gif?: boolean | null
273
261
  is_starred?: boolean | null
@@ -742,6 +730,41 @@ export type Database = {
742
730
  },
743
731
  ]
744
732
  }
733
+ tbl_flagged_messages: {
734
+ Row: {
735
+ chat_id: string | null
736
+ org_id: string
737
+ response_id: string | null
738
+ response_timestamp: string | null
739
+ response_type: string | null
740
+ unique_id: string
741
+ }
742
+ Insert: {
743
+ chat_id?: string | null
744
+ org_id: string
745
+ response_id?: string | null
746
+ response_timestamp?: string | null
747
+ response_type?: string | null
748
+ unique_id: string
749
+ }
750
+ Update: {
751
+ chat_id?: string | null
752
+ org_id?: string
753
+ response_id?: string | null
754
+ response_timestamp?: string | null
755
+ response_type?: string | null
756
+ unique_id?: string
757
+ }
758
+ Relationships: [
759
+ {
760
+ foreignKeyName: "tbl_flagged_messages_org_id_fkey"
761
+ columns: ["org_id"]
762
+ isOneToOne: false
763
+ referencedRelation: "tbl_org"
764
+ referencedColumns: ["org_id"]
765
+ },
766
+ ]
767
+ }
745
768
  tbl_integration_hooks: {
746
769
  Row: {
747
770
  hook_url: string
@@ -877,6 +900,7 @@ export type Database = {
877
900
  tbl_org: {
878
901
  Row: {
879
902
  created_at: string
903
+ is_subscription_active: boolean | null
880
904
  org_id: string
881
905
  org_image: string | null
882
906
  org_metadata: Json | null
@@ -885,10 +909,12 @@ export type Database = {
885
909
  stripe_customer_details: Json | null
886
910
  stripe_customer_id: string | null
887
911
  stripe_subscription_details: Json | null
912
+ subscription_status: string | null
888
913
  support_link: string | null
889
914
  }
890
915
  Insert: {
891
916
  created_at?: string
917
+ is_subscription_active?: boolean | null
892
918
  org_id?: string
893
919
  org_image?: string | null
894
920
  org_metadata?: Json | null
@@ -897,10 +923,12 @@ export type Database = {
897
923
  stripe_customer_details?: Json | null
898
924
  stripe_customer_id?: string | null
899
925
  stripe_subscription_details?: Json | null
926
+ subscription_status?: string | null
900
927
  support_link?: string | null
901
928
  }
902
929
  Update: {
903
930
  created_at?: string
931
+ is_subscription_active?: boolean | null
904
932
  org_id?: string
905
933
  org_image?: string | null
906
934
  org_metadata?: Json | null
@@ -909,6 +937,7 @@ export type Database = {
909
937
  stripe_customer_details?: Json | null
910
938
  stripe_customer_id?: string | null
911
939
  stripe_subscription_details?: Json | null
940
+ subscription_status?: string | null
912
941
  support_link?: string | null
913
942
  }
914
943
  Relationships: []
@@ -955,10 +984,12 @@ export type Database = {
955
984
  invited_at: string | null
956
985
  invited_by: string | null
957
986
  is_active: boolean
987
+ label_ids: string[] | null
958
988
  member_color: Database["public"]["Enums"]["enum_chat_colors"]
959
989
  member_image: string | null
960
990
  member_name: string | null
961
991
  org_id: string
992
+ org_phones: string[] | null
962
993
  role: Database["public"]["Enums"]["enum_member_role"]
963
994
  user_id: string | null
964
995
  }
@@ -968,10 +999,12 @@ export type Database = {
968
999
  invited_at?: string | null
969
1000
  invited_by?: string | null
970
1001
  is_active?: boolean
1002
+ label_ids?: string[] | null
971
1003
  member_color?: Database["public"]["Enums"]["enum_chat_colors"]
972
1004
  member_image?: string | null
973
1005
  member_name?: string | null
974
1006
  org_id: string
1007
+ org_phones?: string[] | null
975
1008
  role?: Database["public"]["Enums"]["enum_member_role"]
976
1009
  user_id?: string | null
977
1010
  }
@@ -981,10 +1014,12 @@ export type Database = {
981
1014
  invited_at?: string | null
982
1015
  invited_by?: string | null
983
1016
  is_active?: boolean
1017
+ label_ids?: string[] | null
984
1018
  member_color?: Database["public"]["Enums"]["enum_chat_colors"]
985
1019
  member_image?: string | null
986
1020
  member_name?: string | null
987
1021
  org_id?: string
1022
+ org_phones?: string[] | null
988
1023
  role?: Database["public"]["Enums"]["enum_member_role"]
989
1024
  user_id?: string | null
990
1025
  }
@@ -1015,10 +1050,12 @@ export type Database = {
1015
1050
  phone_id: string
1016
1051
  phone_image: string | null
1017
1052
  phone_name: string | null
1053
+ phone_state: Json | null
1018
1054
  qr_code: string | null
1019
1055
  server_ip: string | null
1020
1056
  updated_at: string | null
1021
1057
  wa_state: string | null
1058
+ wa_version: string | null
1022
1059
  }
1023
1060
  Insert: {
1024
1061
  created_at?: string
@@ -1029,10 +1066,12 @@ export type Database = {
1029
1066
  phone_id?: string
1030
1067
  phone_image?: string | null
1031
1068
  phone_name?: string | null
1069
+ phone_state?: Json | null
1032
1070
  qr_code?: string | null
1033
1071
  server_ip?: string | null
1034
1072
  updated_at?: string | null
1035
1073
  wa_state?: string | null
1074
+ wa_version?: string | null
1036
1075
  }
1037
1076
  Update: {
1038
1077
  created_at?: string
@@ -1043,10 +1082,12 @@ export type Database = {
1043
1082
  phone_id?: string
1044
1083
  phone_image?: string | null
1045
1084
  phone_name?: string | null
1085
+ phone_state?: Json | null
1046
1086
  qr_code?: string | null
1047
1087
  server_ip?: string | null
1048
1088
  updated_at?: string | null
1049
1089
  wa_state?: string | null
1090
+ wa_version?: string | null
1050
1091
  }
1051
1092
  Relationships: [
1052
1093
  {
@@ -1240,6 +1281,13 @@ export type Database = {
1240
1281
  }
1241
1282
  Returns: Json
1242
1283
  }
1284
+ get_org_phones: {
1285
+ Args: {
1286
+ org_id_input?: string
1287
+ phone_id_input?: string
1288
+ }
1289
+ Returns: Json
1290
+ }
1243
1291
  get_ticket_info: {
1244
1292
  Args: {
1245
1293
  ticket_id_input?: string
package/types.ts CHANGED
@@ -244,15 +244,13 @@ export type StripePrice = _Stripe.Price;
244
244
 
245
245
  /* -------------------------------- REALTIME -------------------------------- */
246
246
 
247
- export type PhoneRealtimeChannel = {
247
+ export type PhoneStateType = {
248
248
  loading: boolean;
249
249
  state: string;
250
- ready: boolean;
251
- sync: boolean;
250
+ sync: number;
252
251
  percent: number | null;
253
252
  message?: string;
254
253
  error?: string;
255
- presence_ref?: string;
256
254
  };
257
255
 
258
256
  /* ------------------------------- INTEGRATIONS ----------------------------- */
@@ -262,6 +260,7 @@ export type TicketLogType = OverrideProperties<Tables<'tbl_integration_logs'>, {
262
260
  integration_name: IntegrationLogType.NEW_TICKET;
263
261
  metadata: {
264
262
  ticket_id: string;
263
+ name: string;
265
264
  };
266
265
  }>;
267
266