@periskope/types 0.6.264 → 0.6.265

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.
@@ -2,31 +2,6 @@ export type Json = {
2
2
  [key: string]: any;
3
3
  } | any;
4
4
  export type Database = {
5
- graphql_public: {
6
- Tables: {
7
- [_ in never]: never;
8
- };
9
- Views: {
10
- [_ in never]: never;
11
- };
12
- Functions: {
13
- graphql: {
14
- Args: {
15
- operationName?: string;
16
- query?: string;
17
- variables?: Json;
18
- extensions?: Json;
19
- };
20
- Returns: Json;
21
- };
22
- };
23
- Enums: {
24
- [_ in never]: never;
25
- };
26
- CompositeTypes: {
27
- [_ in never]: never;
28
- };
29
- };
30
5
  internal: {
31
6
  Tables: {
32
7
  config: {
@@ -213,45 +188,6 @@ export type Database = {
213
188
  };
214
189
  public: {
215
190
  Tables: {
216
- tbl_ai_contexts: {
217
- Row: {
218
- answer: string;
219
- attachments: Json | null;
220
- context_id: string;
221
- created_at: string | null;
222
- document_id: string | null;
223
- embedding: string;
224
- metadata: Json | null;
225
- org_id: string;
226
- question: string;
227
- type: Database["public"]["Enums"]["enum_ai_context_type"] | null;
228
- };
229
- Insert: {
230
- answer: string;
231
- attachments?: Json | null;
232
- context_id?: string;
233
- created_at?: string | null;
234
- document_id?: string | null;
235
- embedding: string;
236
- metadata?: Json | null;
237
- org_id: string;
238
- question: string;
239
- type?: Database["public"]["Enums"]["enum_ai_context_type"] | null;
240
- };
241
- Update: {
242
- answer?: string;
243
- attachments?: Json | null;
244
- context_id?: string;
245
- created_at?: string | null;
246
- document_id?: string | null;
247
- embedding?: string;
248
- metadata?: Json | null;
249
- org_id?: string;
250
- question?: string;
251
- type?: Database["public"]["Enums"]["enum_ai_context_type"] | null;
252
- };
253
- Relationships: [];
254
- };
255
191
  tbl_api_logs: {
256
192
  Row: {
257
193
  org_id: string;
@@ -749,6 +685,7 @@ export type Database = {
749
685
  body: string | null;
750
686
  chat_id: string | null;
751
687
  from_me: boolean | null;
688
+ is_deleted: boolean | null;
752
689
  is_private_note: boolean;
753
690
  media: Json | null;
754
691
  mentioned_ids: string[] | null;
@@ -770,6 +707,7 @@ export type Database = {
770
707
  body?: string | null;
771
708
  chat_id?: string | null;
772
709
  from_me?: boolean | null;
710
+ is_deleted?: boolean | null;
773
711
  is_private_note?: boolean;
774
712
  media?: Json | null;
775
713
  mentioned_ids?: string[] | null;
@@ -791,6 +729,7 @@ export type Database = {
791
729
  body?: string | null;
792
730
  chat_id?: string | null;
793
731
  from_me?: boolean | null;
732
+ is_deleted?: boolean | null;
794
733
  is_private_note?: boolean;
795
734
  media?: Json | null;
796
735
  mentioned_ids?: string[] | null;
@@ -886,7 +825,6 @@ export type Database = {
886
825
  };
887
826
  tbl_chat_properties: {
888
827
  Row: {
889
- ai_metadata: Json | null;
890
828
  assigned_to: string | null;
891
829
  chat_access: Json | null;
892
830
  chat_id: string;
@@ -902,11 +840,11 @@ export type Database = {
902
840
  label_ids: Json | null;
903
841
  latest_message_timestamp: string | null;
904
842
  org_id: string;
843
+ snooze_metadata: Json | null;
905
844
  updated_at: string | null;
906
845
  zohodesk_metadata: Json | null;
907
846
  };
908
847
  Insert: {
909
- ai_metadata?: Json | null;
910
848
  assigned_to?: string | null;
911
849
  chat_access?: Json | null;
912
850
  chat_id: string;
@@ -922,11 +860,11 @@ export type Database = {
922
860
  label_ids?: Json | null;
923
861
  latest_message_timestamp?: string | null;
924
862
  org_id: string;
863
+ snooze_metadata?: Json | null;
925
864
  updated_at?: string | null;
926
865
  zohodesk_metadata?: Json | null;
927
866
  };
928
867
  Update: {
929
- ai_metadata?: Json | null;
930
868
  assigned_to?: string | null;
931
869
  chat_access?: Json | null;
932
870
  chat_id?: string;
@@ -942,6 +880,7 @@ export type Database = {
942
880
  label_ids?: Json | null;
943
881
  latest_message_timestamp?: string | null;
944
882
  org_id?: string;
883
+ snooze_metadata?: Json | null;
945
884
  updated_at?: string | null;
946
885
  zohodesk_metadata?: Json | null;
947
886
  };
@@ -1200,7 +1139,7 @@ export type Database = {
1200
1139
  is_my_contact: boolean | null;
1201
1140
  is_user: boolean | null;
1202
1141
  is_wa_contact: boolean | null;
1203
- label_ids: Json | null;
1142
+ label_ids: Json;
1204
1143
  name: string | null;
1205
1144
  number: string | null;
1206
1145
  org_id: string;
@@ -1229,7 +1168,7 @@ export type Database = {
1229
1168
  is_my_contact?: boolean | null;
1230
1169
  is_user?: boolean | null;
1231
1170
  is_wa_contact?: boolean | null;
1232
- label_ids?: Json | null;
1171
+ label_ids?: Json;
1233
1172
  name?: string | null;
1234
1173
  number?: string | null;
1235
1174
  org_id: string;
@@ -1258,7 +1197,7 @@ export type Database = {
1258
1197
  is_my_contact?: boolean | null;
1259
1198
  is_user?: boolean | null;
1260
1199
  is_wa_contact?: boolean | null;
1261
- label_ids?: Json | null;
1200
+ label_ids?: Json;
1262
1201
  name?: string | null;
1263
1202
  number?: string | null;
1264
1203
  org_id?: string;
@@ -1708,13 +1647,6 @@ export type Database = {
1708
1647
  user_id?: string | null;
1709
1648
  };
1710
1649
  Relationships: [
1711
- {
1712
- foreignKeyName: "tbl_org_members_fkey_auth_users";
1713
- columns: ["user_id"];
1714
- isOneToOne: false;
1715
- referencedRelation: "users";
1716
- referencedColumns: ["id"];
1717
- },
1718
1650
  {
1719
1651
  foreignKeyName: "tbl_org_members_fkey_tbl_org";
1720
1652
  columns: ["org_id"];
@@ -2236,7 +2168,6 @@ export type Database = {
2236
2168
  view_chats: {
2237
2169
  Row: {
2238
2170
  add_members_admins_only: boolean | null;
2239
- ai_metadata: Json | null;
2240
2171
  assigned_to: string | null;
2241
2172
  chat_access: Json | null;
2242
2173
  chat_id: string | null;
@@ -2250,6 +2181,7 @@ export type Database = {
2250
2181
  flag_count_map: Json | null;
2251
2182
  freshdesk_metadata: Json | null;
2252
2183
  group_description: string | null;
2184
+ group_metadata: Json | null;
2253
2185
  hubspot_metadata: Json | null;
2254
2186
  info_admins_only: boolean | null;
2255
2187
  initiated_by: string | null;
@@ -2264,6 +2196,7 @@ export type Database = {
2264
2196
  org_id: string | null;
2265
2197
  org_phone: string | null;
2266
2198
  pinned_messages: Json | null;
2199
+ snooze_metadata: Json | null;
2267
2200
  updated_at: string | null;
2268
2201
  zohodesk_metadata: Json | null;
2269
2202
  };
@@ -2595,13 +2528,6 @@ export type Database = {
2595
2528
  };
2596
2529
  Returns: Json;
2597
2530
  };
2598
- get_relevant_context: {
2599
- Args: {
2600
- org_id_input: string;
2601
- query_embedding_input: string;
2602
- };
2603
- Returns: Json;
2604
- };
2605
2531
  get_team_metrics_between_dates: {
2606
2532
  Args: {
2607
2533
  org_id_input: string;
@@ -2810,7 +2736,6 @@ export type Database = {
2810
2736
  };
2811
2737
  };
2812
2738
  Enums: {
2813
- enum_ai_context_type: "faq" | "document";
2814
2739
  enum_broadcast_status: "inprogress" | "completed" | "stopped" | "expired";
2815
2740
  enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
2816
2741
  enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
@@ -2891,6 +2816,7 @@ export type Database = {
2891
2816
  created_at: string | null;
2892
2817
  id: string;
2893
2818
  last_accessed_at: string | null;
2819
+ level: number | null;
2894
2820
  metadata: Json | null;
2895
2821
  name: string | null;
2896
2822
  owner: string | null;
@@ -2905,6 +2831,7 @@ export type Database = {
2905
2831
  created_at?: string | null;
2906
2832
  id?: string;
2907
2833
  last_accessed_at?: string | null;
2834
+ level?: number | null;
2908
2835
  metadata?: Json | null;
2909
2836
  name?: string | null;
2910
2837
  owner?: string | null;
@@ -2919,6 +2846,7 @@ export type Database = {
2919
2846
  created_at?: string | null;
2920
2847
  id?: string;
2921
2848
  last_accessed_at?: string | null;
2849
+ level?: number | null;
2922
2850
  metadata?: Json | null;
2923
2851
  name?: string | null;
2924
2852
  owner?: string | null;
@@ -2938,6 +2866,38 @@ export type Database = {
2938
2866
  }
2939
2867
  ];
2940
2868
  };
2869
+ prefixes: {
2870
+ Row: {
2871
+ bucket_id: string;
2872
+ created_at: string | null;
2873
+ level: number;
2874
+ name: string;
2875
+ updated_at: string | null;
2876
+ };
2877
+ Insert: {
2878
+ bucket_id: string;
2879
+ created_at?: string | null;
2880
+ level?: number;
2881
+ name: string;
2882
+ updated_at?: string | null;
2883
+ };
2884
+ Update: {
2885
+ bucket_id?: string;
2886
+ created_at?: string | null;
2887
+ level?: number;
2888
+ name?: string;
2889
+ updated_at?: string | null;
2890
+ };
2891
+ Relationships: [
2892
+ {
2893
+ foreignKeyName: "prefixes_bucketId_fkey";
2894
+ columns: ["bucket_id"];
2895
+ isOneToOne: false;
2896
+ referencedRelation: "buckets";
2897
+ referencedColumns: ["id"];
2898
+ }
2899
+ ];
2900
+ };
2941
2901
  s3_multipart_uploads: {
2942
2902
  Row: {
2943
2903
  bucket_id: string;
@@ -3041,6 +3001,13 @@ export type Database = {
3041
3001
  [_ in never]: never;
3042
3002
  };
3043
3003
  Functions: {
3004
+ add_prefixes: {
3005
+ Args: {
3006
+ _bucket_id: string;
3007
+ _name: string;
3008
+ };
3009
+ Returns: undefined;
3010
+ };
3044
3011
  can_insert_object: {
3045
3012
  Args: {
3046
3013
  bucketid: string;
@@ -3050,6 +3017,13 @@ export type Database = {
3050
3017
  };
3051
3018
  Returns: undefined;
3052
3019
  };
3020
+ delete_prefix: {
3021
+ Args: {
3022
+ _bucket_id: string;
3023
+ _name: string;
3024
+ };
3025
+ Returns: boolean;
3026
+ };
3053
3027
  extension: {
3054
3028
  Args: {
3055
3029
  name: string;
@@ -3068,6 +3042,24 @@ export type Database = {
3068
3042
  };
3069
3043
  Returns: string[];
3070
3044
  };
3045
+ get_level: {
3046
+ Args: {
3047
+ name: string;
3048
+ };
3049
+ Returns: number;
3050
+ };
3051
+ get_prefix: {
3052
+ Args: {
3053
+ name: string;
3054
+ };
3055
+ Returns: string;
3056
+ };
3057
+ get_prefixes: {
3058
+ Args: {
3059
+ name: string;
3060
+ };
3061
+ Returns: string[];
3062
+ };
3071
3063
  get_size_by_bucket: {
3072
3064
  Args: Record<PropertyKey, never>;
3073
3065
  Returns: {
@@ -3130,6 +3122,63 @@ export type Database = {
3130
3122
  metadata: Json;
3131
3123
  }[];
3132
3124
  };
3125
+ search_legacy_v1: {
3126
+ Args: {
3127
+ prefix: string;
3128
+ bucketname: string;
3129
+ limits?: number;
3130
+ levels?: number;
3131
+ offsets?: number;
3132
+ search?: string;
3133
+ sortcolumn?: string;
3134
+ sortorder?: string;
3135
+ };
3136
+ Returns: {
3137
+ name: string;
3138
+ id: string;
3139
+ updated_at: string;
3140
+ created_at: string;
3141
+ last_accessed_at: string;
3142
+ metadata: Json;
3143
+ }[];
3144
+ };
3145
+ search_v1_optimised: {
3146
+ Args: {
3147
+ prefix: string;
3148
+ bucketname: string;
3149
+ limits?: number;
3150
+ levels?: number;
3151
+ offsets?: number;
3152
+ search?: string;
3153
+ sortcolumn?: string;
3154
+ sortorder?: string;
3155
+ };
3156
+ Returns: {
3157
+ name: string;
3158
+ id: string;
3159
+ updated_at: string;
3160
+ created_at: string;
3161
+ last_accessed_at: string;
3162
+ metadata: Json;
3163
+ }[];
3164
+ };
3165
+ search_v2: {
3166
+ Args: {
3167
+ prefix: string;
3168
+ bucket_name: string;
3169
+ limits?: number;
3170
+ levels?: number;
3171
+ start_after?: string;
3172
+ };
3173
+ Returns: {
3174
+ key: string;
3175
+ name: string;
3176
+ id: string;
3177
+ updated_at: string;
3178
+ created_at: string;
3179
+ metadata: Json;
3180
+ }[];
3181
+ };
3133
3182
  };
3134
3183
  Enums: {
3135
3184
  [_ in never]: never;
@@ -3139,46 +3188,72 @@ export type Database = {
3139
3188
  };
3140
3189
  };
3141
3190
  };
3142
- type PublicSchema = Database[Extract<keyof Database, "public">];
3143
- export type Tables<PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) | {
3191
+ type DefaultSchema = Database[Extract<keyof Database, "public">];
3192
+ export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
3144
3193
  schema: keyof Database;
3145
- }, TableName extends PublicTableNameOrOptions extends {
3194
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
3146
3195
  schema: keyof Database;
3147
- } ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"]) : never = never> = PublicTableNameOrOptions extends {
3196
+ } ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
3148
3197
  schema: keyof Database;
3149
- } ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3198
+ } ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3150
3199
  Row: infer R;
3151
- } ? R : never : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) ? (PublicSchema["Tables"] & PublicSchema["Views"])[PublicTableNameOrOptions] extends {
3200
+ } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3152
3201
  Row: infer R;
3153
3202
  } ? R : never : never;
3154
- export type TablesInsert<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
3203
+ export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3155
3204
  schema: keyof Database;
3156
- }, TableName extends PublicTableNameOrOptions extends {
3205
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
3157
3206
  schema: keyof Database;
3158
- } ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] : never = never> = PublicTableNameOrOptions extends {
3207
+ } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3159
3208
  schema: keyof Database;
3160
- } ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3209
+ } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3161
3210
  Insert: infer I;
3162
- } ? I : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3211
+ } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3163
3212
  Insert: infer I;
3164
3213
  } ? I : never : never;
3165
- export type TablesUpdate<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
3214
+ export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3166
3215
  schema: keyof Database;
3167
- }, TableName extends PublicTableNameOrOptions extends {
3216
+ }, TableName extends DefaultSchemaTableNameOrOptions extends {
3168
3217
  schema: keyof Database;
3169
- } ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] : never = never> = PublicTableNameOrOptions extends {
3218
+ } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3170
3219
  schema: keyof Database;
3171
- } ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3220
+ } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3172
3221
  Update: infer U;
3173
- } ? U : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3222
+ } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3174
3223
  Update: infer U;
3175
3224
  } ? U : never : never;
3176
- export type Enums<PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] | {
3225
+ export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
3226
+ schema: keyof Database;
3227
+ }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
3228
+ schema: keyof Database;
3229
+ } ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
3230
+ schema: keyof Database;
3231
+ } ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
3232
+ export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
3177
3233
  schema: keyof Database;
3178
- }, EnumName extends PublicEnumNameOrOptions extends {
3234
+ }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
3179
3235
  schema: keyof Database;
3180
- } ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] : never = never> = PublicEnumNameOrOptions extends {
3236
+ } ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
3181
3237
  schema: keyof Database;
3182
- } ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never;
3238
+ } ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
3239
+ export declare const Constants: {
3240
+ readonly internal: {
3241
+ readonly Enums: {};
3242
+ };
3243
+ readonly public: {
3244
+ readonly Enums: {
3245
+ readonly enum_broadcast_status: readonly ["inprogress", "completed", "stopped", "expired"];
3246
+ readonly enum_chat_colors: readonly ["#B4876E", "#A5B337", "#06CF9C", "#25D366", "#02A698", "#7D9EF1", "#007BFC", "#5E47DE", "#7F66FF", "#9333EA", "#FA6533", "#C4532D", "#DC2626", "#FF2E74", "#DB2777"];
3247
+ readonly enum_chat_tickets_status: readonly ["open", "inprogress", "closed", "archived"];
3248
+ readonly enum_credit_transaction_type: readonly ["credit", "debit"];
3249
+ readonly enum_integration_name: readonly ["org.created", "org.updated", "org.member.created", "org.member.updated", "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", "org.integrations.updated", "message.flagged", "message.unflagged", "chat.label.updated", "reaction.added", "message.ticket.attached", "org.phone.created", "org.phone.connected", "org.phone.disconnected", "org.phone.qr", "org.phone.updated"];
3250
+ readonly enum_integration_type: readonly ["zapier", "pabbly", "api", "webhook", "hubspot", "freshdesk", "slack", "jira", "salesforce", "zohodesk", "gsheets"];
3251
+ readonly enum_member_role: readonly ["admin", "member"];
3252
+ };
3253
+ };
3254
+ readonly storage: {
3255
+ readonly Enums: {};
3256
+ };
3257
+ };
3183
3258
  export {};
3184
3259
  //# sourceMappingURL=supabase.types.d.ts.map