@periskope/types 0.6.259 → 0.6.261

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,6 +2,31 @@ 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
+ };
5
30
  internal: {
6
31
  Tables: {
7
32
  config: {
@@ -188,6 +213,45 @@ export type Database = {
188
213
  };
189
214
  public: {
190
215
  Tables: {
216
+ tbl_ai_contexts: {
217
+ Row: {
218
+ answer: string;
219
+ attachments: string[] | 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?: string[] | 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?: string[] | 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
+ };
191
255
  tbl_api_logs: {
192
256
  Row: {
193
257
  org_id: string;
@@ -822,6 +886,7 @@ export type Database = {
822
886
  };
823
887
  tbl_chat_properties: {
824
888
  Row: {
889
+ ai_metadata: Json | null;
825
890
  assigned_to: string | null;
826
891
  chat_access: Json | null;
827
892
  chat_id: string;
@@ -841,6 +906,7 @@ export type Database = {
841
906
  zohodesk_metadata: Json | null;
842
907
  };
843
908
  Insert: {
909
+ ai_metadata?: Json | null;
844
910
  assigned_to?: string | null;
845
911
  chat_access?: Json | null;
846
912
  chat_id: string;
@@ -860,6 +926,7 @@ export type Database = {
860
926
  zohodesk_metadata?: Json | null;
861
927
  };
862
928
  Update: {
929
+ ai_metadata?: Json | null;
863
930
  assigned_to?: string | null;
864
931
  chat_access?: Json | null;
865
932
  chat_id?: string;
@@ -1133,7 +1200,6 @@ export type Database = {
1133
1200
  is_my_contact: boolean | null;
1134
1201
  is_user: boolean | null;
1135
1202
  is_wa_contact: boolean | null;
1136
- label_ids: Json;
1137
1203
  name: string | null;
1138
1204
  number: string | null;
1139
1205
  org_id: string;
@@ -1162,7 +1228,6 @@ export type Database = {
1162
1228
  is_my_contact?: boolean | null;
1163
1229
  is_user?: boolean | null;
1164
1230
  is_wa_contact?: boolean | null;
1165
- label_ids?: Json;
1166
1231
  name?: string | null;
1167
1232
  number?: string | null;
1168
1233
  org_id: string;
@@ -1191,7 +1256,6 @@ export type Database = {
1191
1256
  is_my_contact?: boolean | null;
1192
1257
  is_user?: boolean | null;
1193
1258
  is_wa_contact?: boolean | null;
1194
- label_ids?: Json;
1195
1259
  name?: string | null;
1196
1260
  number?: string | null;
1197
1261
  org_id?: string;
@@ -1641,6 +1705,13 @@ export type Database = {
1641
1705
  user_id?: string | null;
1642
1706
  };
1643
1707
  Relationships: [
1708
+ {
1709
+ foreignKeyName: "tbl_org_members_fkey_auth_users";
1710
+ columns: ["user_id"];
1711
+ isOneToOne: false;
1712
+ referencedRelation: "users";
1713
+ referencedColumns: ["id"];
1714
+ },
1644
1715
  {
1645
1716
  foreignKeyName: "tbl_org_members_fkey_tbl_org";
1646
1717
  columns: ["org_id"];
@@ -1664,6 +1735,7 @@ export type Database = {
1664
1735
  is_browser_open: boolean;
1665
1736
  is_ready: boolean | null;
1666
1737
  label_ids: Json | null;
1738
+ last_disconnect: Json | null;
1667
1739
  library: string | null;
1668
1740
  org_id: string;
1669
1741
  org_phone: string | null;
@@ -1687,6 +1759,7 @@ export type Database = {
1687
1759
  is_browser_open?: boolean;
1688
1760
  is_ready?: boolean | null;
1689
1761
  label_ids?: Json | null;
1762
+ last_disconnect?: Json | null;
1690
1763
  library?: string | null;
1691
1764
  org_id: string;
1692
1765
  org_phone?: string | null;
@@ -1710,6 +1783,7 @@ export type Database = {
1710
1783
  is_browser_open?: boolean;
1711
1784
  is_ready?: boolean | null;
1712
1785
  label_ids?: Json | null;
1786
+ last_disconnect?: Json | null;
1713
1787
  library?: string | null;
1714
1788
  org_id?: string;
1715
1789
  org_phone?: string | null;
@@ -2159,6 +2233,7 @@ export type Database = {
2159
2233
  view_chats: {
2160
2234
  Row: {
2161
2235
  add_members_admins_only: boolean | null;
2236
+ ai_metadata: Json | null;
2162
2237
  assigned_to: string | null;
2163
2238
  chat_access: Json | null;
2164
2239
  chat_id: string | null;
@@ -2517,6 +2592,13 @@ export type Database = {
2517
2592
  };
2518
2593
  Returns: Json;
2519
2594
  };
2595
+ get_relevant_context: {
2596
+ Args: {
2597
+ org_id_input: string;
2598
+ query_embedding_input: string;
2599
+ };
2600
+ Returns: Json;
2601
+ };
2520
2602
  get_team_metrics_between_dates: {
2521
2603
  Args: {
2522
2604
  org_id_input: string;
@@ -2725,11 +2807,12 @@ export type Database = {
2725
2807
  };
2726
2808
  };
2727
2809
  Enums: {
2810
+ enum_ai_context_type: "faq" | "document";
2728
2811
  enum_broadcast_status: "inprogress" | "completed" | "stopped" | "expired";
2729
2812
  enum_chat_colors: "#B4876E" | "#A5B337" | "#06CF9C" | "#25D366" | "#02A698" | "#7D9EF1" | "#007BFC" | "#5E47DE" | "#7F66FF" | "#9333EA" | "#FA6533" | "#C4532D" | "#DC2626" | "#FF2E74" | "#DB2777";
2730
2813
  enum_chat_tickets_status: "open" | "inprogress" | "closed" | "archived";
2731
2814
  enum_credit_transaction_type: "credit" | "debit";
2732
- enum_integration_name: "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.updated" | "org.phone.connected" | "org.phone.disconnected" | "org.phone.qr";
2815
+ enum_integration_name: "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";
2733
2816
  enum_integration_type: "zapier" | "pabbly" | "api" | "webhook" | "hubspot" | "freshdesk" | "slack" | "jira" | "salesforce" | "zohodesk" | "gsheets";
2734
2817
  enum_member_role: "admin" | "member";
2735
2818
  };
@@ -2805,7 +2888,6 @@ export type Database = {
2805
2888
  created_at: string | null;
2806
2889
  id: string;
2807
2890
  last_accessed_at: string | null;
2808
- level: number | null;
2809
2891
  metadata: Json | null;
2810
2892
  name: string | null;
2811
2893
  owner: string | null;
@@ -2820,7 +2902,6 @@ export type Database = {
2820
2902
  created_at?: string | null;
2821
2903
  id?: string;
2822
2904
  last_accessed_at?: string | null;
2823
- level?: number | null;
2824
2905
  metadata?: Json | null;
2825
2906
  name?: string | null;
2826
2907
  owner?: string | null;
@@ -2835,7 +2916,6 @@ export type Database = {
2835
2916
  created_at?: string | null;
2836
2917
  id?: string;
2837
2918
  last_accessed_at?: string | null;
2838
- level?: number | null;
2839
2919
  metadata?: Json | null;
2840
2920
  name?: string | null;
2841
2921
  owner?: string | null;
@@ -2855,38 +2935,6 @@ export type Database = {
2855
2935
  }
2856
2936
  ];
2857
2937
  };
2858
- prefixes: {
2859
- Row: {
2860
- bucket_id: string;
2861
- created_at: string | null;
2862
- level: number;
2863
- name: string;
2864
- updated_at: string | null;
2865
- };
2866
- Insert: {
2867
- bucket_id: string;
2868
- created_at?: string | null;
2869
- level?: number;
2870
- name: string;
2871
- updated_at?: string | null;
2872
- };
2873
- Update: {
2874
- bucket_id?: string;
2875
- created_at?: string | null;
2876
- level?: number;
2877
- name?: string;
2878
- updated_at?: string | null;
2879
- };
2880
- Relationships: [
2881
- {
2882
- foreignKeyName: "prefixes_bucketId_fkey";
2883
- columns: ["bucket_id"];
2884
- isOneToOne: false;
2885
- referencedRelation: "buckets";
2886
- referencedColumns: ["id"];
2887
- }
2888
- ];
2889
- };
2890
2938
  s3_multipart_uploads: {
2891
2939
  Row: {
2892
2940
  bucket_id: string;
@@ -2990,13 +3038,6 @@ export type Database = {
2990
3038
  [_ in never]: never;
2991
3039
  };
2992
3040
  Functions: {
2993
- add_prefixes: {
2994
- Args: {
2995
- _bucket_id: string;
2996
- _name: string;
2997
- };
2998
- Returns: undefined;
2999
- };
3000
3041
  can_insert_object: {
3001
3042
  Args: {
3002
3043
  bucketid: string;
@@ -3006,13 +3047,6 @@ export type Database = {
3006
3047
  };
3007
3048
  Returns: undefined;
3008
3049
  };
3009
- delete_prefix: {
3010
- Args: {
3011
- _bucket_id: string;
3012
- _name: string;
3013
- };
3014
- Returns: boolean;
3015
- };
3016
3050
  extension: {
3017
3051
  Args: {
3018
3052
  name: string;
@@ -3031,24 +3065,6 @@ export type Database = {
3031
3065
  };
3032
3066
  Returns: string[];
3033
3067
  };
3034
- get_level: {
3035
- Args: {
3036
- name: string;
3037
- };
3038
- Returns: number;
3039
- };
3040
- get_prefix: {
3041
- Args: {
3042
- name: string;
3043
- };
3044
- Returns: string;
3045
- };
3046
- get_prefixes: {
3047
- Args: {
3048
- name: string;
3049
- };
3050
- Returns: string[];
3051
- };
3052
3068
  get_size_by_bucket: {
3053
3069
  Args: Record<PropertyKey, never>;
3054
3070
  Returns: {
@@ -3111,63 +3127,6 @@ export type Database = {
3111
3127
  metadata: Json;
3112
3128
  }[];
3113
3129
  };
3114
- search_legacy_v1: {
3115
- Args: {
3116
- prefix: string;
3117
- bucketname: string;
3118
- limits?: number;
3119
- levels?: number;
3120
- offsets?: number;
3121
- search?: string;
3122
- sortcolumn?: string;
3123
- sortorder?: string;
3124
- };
3125
- Returns: {
3126
- name: string;
3127
- id: string;
3128
- updated_at: string;
3129
- created_at: string;
3130
- last_accessed_at: string;
3131
- metadata: Json;
3132
- }[];
3133
- };
3134
- search_v1_optimised: {
3135
- Args: {
3136
- prefix: string;
3137
- bucketname: string;
3138
- limits?: number;
3139
- levels?: number;
3140
- offsets?: number;
3141
- search?: string;
3142
- sortcolumn?: string;
3143
- sortorder?: string;
3144
- };
3145
- Returns: {
3146
- name: string;
3147
- id: string;
3148
- updated_at: string;
3149
- created_at: string;
3150
- last_accessed_at: string;
3151
- metadata: Json;
3152
- }[];
3153
- };
3154
- search_v2: {
3155
- Args: {
3156
- prefix: string;
3157
- bucket_name: string;
3158
- limits?: number;
3159
- levels?: number;
3160
- start_after?: string;
3161
- };
3162
- Returns: {
3163
- key: string;
3164
- name: string;
3165
- id: string;
3166
- updated_at: string;
3167
- created_at: string;
3168
- metadata: Json;
3169
- }[];
3170
- };
3171
3130
  };
3172
3131
  Enums: {
3173
3132
  [_ in never]: never;
@@ -3177,72 +3136,46 @@ export type Database = {
3177
3136
  };
3178
3137
  };
3179
3138
  };
3180
- type DefaultSchema = Database[Extract<keyof Database, "public">];
3181
- export type Tables<DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) | {
3139
+ type PublicSchema = Database[Extract<keyof Database, "public">];
3140
+ export type Tables<PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) | {
3182
3141
  schema: keyof Database;
3183
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
3142
+ }, TableName extends PublicTableNameOrOptions extends {
3184
3143
  schema: keyof Database;
3185
- } ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"]) : never = never> = DefaultSchemaTableNameOrOptions extends {
3144
+ } ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"]) : never = never> = PublicTableNameOrOptions extends {
3186
3145
  schema: keyof Database;
3187
- } ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] & Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3146
+ } ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] & Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3188
3147
  Row: infer R;
3189
- } ? R : never : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] & DefaultSchema["Views"]) ? (DefaultSchema["Tables"] & DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3148
+ } ? R : never : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] & PublicSchema["Views"]) ? (PublicSchema["Tables"] & PublicSchema["Views"])[PublicTableNameOrOptions] extends {
3190
3149
  Row: infer R;
3191
3150
  } ? R : never : never;
3192
- export type TablesInsert<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3151
+ export type TablesInsert<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
3193
3152
  schema: keyof Database;
3194
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
3153
+ }, TableName extends PublicTableNameOrOptions extends {
3195
3154
  schema: keyof Database;
3196
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3155
+ } ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] : never = never> = PublicTableNameOrOptions extends {
3197
3156
  schema: keyof Database;
3198
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3157
+ } ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3199
3158
  Insert: infer I;
3200
- } ? I : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3159
+ } ? I : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3201
3160
  Insert: infer I;
3202
3161
  } ? I : never : never;
3203
- export type TablesUpdate<DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] | {
3162
+ export type TablesUpdate<PublicTableNameOrOptions extends keyof PublicSchema["Tables"] | {
3204
3163
  schema: keyof Database;
3205
- }, TableName extends DefaultSchemaTableNameOrOptions extends {
3164
+ }, TableName extends PublicTableNameOrOptions extends {
3206
3165
  schema: keyof Database;
3207
- } ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] : never = never> = DefaultSchemaTableNameOrOptions extends {
3166
+ } ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"] : never = never> = PublicTableNameOrOptions extends {
3208
3167
  schema: keyof Database;
3209
- } ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3168
+ } ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3210
3169
  Update: infer U;
3211
- } ? U : never : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"] ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3170
+ } ? U : never : PublicTableNameOrOptions extends keyof PublicSchema["Tables"] ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3212
3171
  Update: infer U;
3213
3172
  } ? U : never : never;
3214
- export type Enums<DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] | {
3215
- schema: keyof Database;
3216
- }, EnumName extends DefaultSchemaEnumNameOrOptions extends {
3217
- schema: keyof Database;
3218
- } ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"] : never = never> = DefaultSchemaEnumNameOrOptions extends {
3173
+ export type Enums<PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] | {
3219
3174
  schema: keyof Database;
3220
- } ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName] : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"] ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions] : never;
3221
- export type CompositeTypes<PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] | {
3175
+ }, EnumName extends PublicEnumNameOrOptions extends {
3222
3176
  schema: keyof Database;
3223
- }, CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
3177
+ } ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"] : never = never> = PublicEnumNameOrOptions extends {
3224
3178
  schema: keyof Database;
3225
- } ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"] : never = never> = PublicCompositeTypeNameOrOptions extends {
3226
- schema: keyof Database;
3227
- } ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName] : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"] ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions] : never;
3228
- export declare const Constants: {
3229
- readonly internal: {
3230
- readonly Enums: {};
3231
- };
3232
- readonly public: {
3233
- readonly Enums: {
3234
- readonly enum_broadcast_status: readonly ["inprogress", "completed", "stopped", "expired"];
3235
- readonly enum_chat_colors: readonly ["#B4876E", "#A5B337", "#06CF9C", "#25D366", "#02A698", "#7D9EF1", "#007BFC", "#5E47DE", "#7F66FF", "#9333EA", "#FA6533", "#C4532D", "#DC2626", "#FF2E74", "#DB2777"];
3236
- readonly enum_chat_tickets_status: readonly ["open", "inprogress", "closed", "archived"];
3237
- readonly enum_credit_transaction_type: readonly ["credit", "debit"];
3238
- readonly enum_integration_name: readonly ["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", "org.integrations.updated", "message.flagged", "message.unflagged", "chat.label.updated", "reaction.added", "message.ticket.attached", "org.phone.qr"];
3239
- readonly enum_integration_type: readonly ["zapier", "pabbly", "api", "webhook", "hubspot", "freshdesk", "slack", "jira", "salesforce", "zohodesk", "gsheets"];
3240
- readonly enum_member_role: readonly ["admin", "member"];
3241
- };
3242
- };
3243
- readonly storage: {
3244
- readonly Enums: {};
3245
- };
3246
- };
3179
+ } ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName] : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"] ? PublicSchema["Enums"][PublicEnumNameOrOptions] : never;
3247
3180
  export {};
3248
3181
  //# sourceMappingURL=supabase.types.d.ts.map