@periskope/types 0.6.262 → 0.6.263

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.
@@ -1,31 +1,6 @@
1
1
  export type Json = { [key: string]: any } | any
2
2
 
3
3
  export type Database = {
4
- graphql_public: {
5
- Tables: {
6
- [_ in never]: never
7
- }
8
- Views: {
9
- [_ in never]: never
10
- }
11
- Functions: {
12
- graphql: {
13
- Args: {
14
- operationName?: string
15
- query?: string
16
- variables?: Json
17
- extensions?: Json
18
- }
19
- Returns: Json
20
- }
21
- }
22
- Enums: {
23
- [_ in never]: never
24
- }
25
- CompositeTypes: {
26
- [_ in never]: never
27
- }
28
- }
29
4
  internal: {
30
5
  Tables: {
31
6
  config: {
@@ -212,45 +187,6 @@ export type Database = {
212
187
  }
213
188
  public: {
214
189
  Tables: {
215
- tbl_ai_contexts: {
216
- Row: {
217
- answer: string
218
- attachments: string[] | null
219
- context_id: string
220
- created_at: string | null
221
- document_id: string | null
222
- embedding: string
223
- metadata: Json | null
224
- org_id: string
225
- question: string
226
- type: Database["public"]["Enums"]["enum_ai_context_type"] | null
227
- }
228
- Insert: {
229
- answer: string
230
- attachments?: string[] | null
231
- context_id?: string
232
- created_at?: string | null
233
- document_id?: string | null
234
- embedding: string
235
- metadata?: Json | null
236
- org_id: string
237
- question: string
238
- type?: Database["public"]["Enums"]["enum_ai_context_type"] | null
239
- }
240
- Update: {
241
- answer?: string
242
- attachments?: string[] | null
243
- context_id?: string
244
- created_at?: string | null
245
- document_id?: string | null
246
- embedding?: string
247
- metadata?: Json | null
248
- org_id?: string
249
- question?: string
250
- type?: Database["public"]["Enums"]["enum_ai_context_type"] | null
251
- }
252
- Relationships: []
253
- }
254
190
  tbl_api_logs: {
255
191
  Row: {
256
192
  org_id: string
@@ -891,7 +827,6 @@ export type Database = {
891
827
  }
892
828
  tbl_chat_properties: {
893
829
  Row: {
894
- ai_metadata: Json | null
895
830
  assigned_to: string | null
896
831
  chat_access: Json | null
897
832
  chat_id: string
@@ -911,7 +846,6 @@ export type Database = {
911
846
  zohodesk_metadata: Json | null
912
847
  }
913
848
  Insert: {
914
- ai_metadata?: Json | null
915
849
  assigned_to?: string | null
916
850
  chat_access?: Json | null
917
851
  chat_id: string
@@ -931,7 +865,6 @@ export type Database = {
931
865
  zohodesk_metadata?: Json | null
932
866
  }
933
867
  Update: {
934
- ai_metadata?: Json | null
935
868
  assigned_to?: string | null
936
869
  chat_access?: Json | null
937
870
  chat_id?: string
@@ -1209,7 +1142,7 @@ export type Database = {
1209
1142
  is_my_contact: boolean | null
1210
1143
  is_user: boolean | null
1211
1144
  is_wa_contact: boolean | null
1212
- label_ids: Json | null
1145
+ label_ids: Json
1213
1146
  name: string | null
1214
1147
  number: string | null
1215
1148
  org_id: string
@@ -1238,7 +1171,7 @@ export type Database = {
1238
1171
  is_my_contact?: boolean | null
1239
1172
  is_user?: boolean | null
1240
1173
  is_wa_contact?: boolean | null
1241
- label_ids?: Json | null
1174
+ label_ids?: Json
1242
1175
  name?: string | null
1243
1176
  number?: string | null
1244
1177
  org_id: string
@@ -1267,7 +1200,7 @@ export type Database = {
1267
1200
  is_my_contact?: boolean | null
1268
1201
  is_user?: boolean | null
1269
1202
  is_wa_contact?: boolean | null
1270
- label_ids?: Json | null
1203
+ label_ids?: Json
1271
1204
  name?: string | null
1272
1205
  number?: string | null
1273
1206
  org_id?: string
@@ -1717,13 +1650,6 @@ export type Database = {
1717
1650
  user_id?: string | null
1718
1651
  }
1719
1652
  Relationships: [
1720
- {
1721
- foreignKeyName: "tbl_org_members_fkey_auth_users"
1722
- columns: ["user_id"]
1723
- isOneToOne: false
1724
- referencedRelation: "users"
1725
- referencedColumns: ["id"]
1726
- },
1727
1653
  {
1728
1654
  foreignKeyName: "tbl_org_members_fkey_tbl_org"
1729
1655
  columns: ["org_id"]
@@ -1967,6 +1893,63 @@ export type Database = {
1967
1893
  },
1968
1894
  ]
1969
1895
  }
1896
+ tbl_org_workflows: {
1897
+ Row: {
1898
+ actions: Json
1899
+ created_at: string
1900
+ deleted_at: string | null
1901
+ id: string
1902
+ is_active: boolean
1903
+ name: string
1904
+ org_id: string
1905
+ trigger: string
1906
+ trigger_metadata: Json
1907
+ updated_at: string
1908
+ updated_by: string
1909
+ }
1910
+ Insert: {
1911
+ actions?: Json
1912
+ created_at?: string
1913
+ deleted_at?: string | null
1914
+ id?: string
1915
+ is_active?: boolean
1916
+ name: string
1917
+ org_id: string
1918
+ trigger: string
1919
+ trigger_metadata?: Json
1920
+ updated_at?: string
1921
+ updated_by: string
1922
+ }
1923
+ Update: {
1924
+ actions?: Json
1925
+ created_at?: string
1926
+ deleted_at?: string | null
1927
+ id?: string
1928
+ is_active?: boolean
1929
+ name?: string
1930
+ org_id?: string
1931
+ trigger?: string
1932
+ trigger_metadata?: Json
1933
+ updated_at?: string
1934
+ updated_by?: string
1935
+ }
1936
+ Relationships: [
1937
+ {
1938
+ foreignKeyName: "tbl_org_workflows_org_id_fkey"
1939
+ columns: ["org_id"]
1940
+ isOneToOne: false
1941
+ referencedRelation: "tbl_org"
1942
+ referencedColumns: ["org_id"]
1943
+ },
1944
+ {
1945
+ foreignKeyName: "tbl_org_workflows_org_id_fkey"
1946
+ columns: ["org_id"]
1947
+ isOneToOne: false
1948
+ referencedRelation: "view_org"
1949
+ referencedColumns: ["org_id"]
1950
+ },
1951
+ ]
1952
+ }
1970
1953
  tbl_quick_replies: {
1971
1954
  Row: {
1972
1955
  command: string | null
@@ -2247,7 +2230,6 @@ export type Database = {
2247
2230
  view_chats: {
2248
2231
  Row: {
2249
2232
  add_members_admins_only: boolean | null
2250
- ai_metadata: Json | null
2251
2233
  assigned_to: string | null
2252
2234
  chat_access: Json | null
2253
2235
  chat_id: string | null
@@ -2391,51 +2373,34 @@ export type Database = {
2391
2373
  }
2392
2374
  Functions: {
2393
2375
  check_feature_flag_access: {
2394
- Args: {
2395
- org_id_input: string
2396
- feature_input: string
2397
- }
2376
+ Args: { org_id_input: string; feature_input: string }
2398
2377
  Returns: boolean
2399
2378
  }
2400
2379
  custom_access_token_hook: {
2401
- Args: {
2402
- event: Json
2403
- }
2380
+ Args: { event: Json }
2404
2381
  Returns: Json
2405
2382
  }
2406
2383
  delete_org: {
2407
- Args: {
2408
- org_id_input: string
2409
- }
2384
+ Args: { org_id_input: string }
2410
2385
  Returns: Json
2411
2386
  }
2412
2387
  drop_partition: {
2413
- Args: {
2414
- org_id_input: string
2415
- }
2388
+ Args: { org_id_input: string }
2416
2389
  Returns: boolean
2417
2390
  }
2418
2391
  find_discrepancies: {
2419
- Args: {
2420
- p_org_id: string
2421
- }
2392
+ Args: { p_org_id: string }
2422
2393
  Returns: {
2423
2394
  a_chat_id: string
2424
2395
  discrepancy_count: number
2425
2396
  }[]
2426
2397
  }
2427
2398
  gen_id: {
2428
- Args: {
2429
- prefix: string
2430
- size?: number
2431
- alphabet?: string
2432
- }
2399
+ Args: { prefix: string; size?: number; alphabet?: string }
2433
2400
  Returns: string
2434
2401
  }
2435
2402
  gen_ticket_id: {
2436
- Args: {
2437
- org_id_input: string
2438
- }
2403
+ Args: { org_id_input: string }
2439
2404
  Returns: string
2440
2405
  }
2441
2406
  generate_access_token: {
@@ -2457,10 +2422,7 @@ export type Database = {
2457
2422
  Returns: Json
2458
2423
  }
2459
2424
  get_chat_labels_data: {
2460
- Args: {
2461
- org_id_input: string
2462
- chat_ids_input?: string[]
2463
- }
2425
+ Args: { org_id_input: string; chat_ids_input?: string[] }
2464
2426
  Returns: Json[]
2465
2427
  }
2466
2428
  get_chat_rule_info: {
@@ -2514,10 +2476,7 @@ export type Database = {
2514
2476
  Returns: Json
2515
2477
  }
2516
2478
  get_export_members_data: {
2517
- Args: {
2518
- org_id_input: string
2519
- chat_id_input?: string[]
2520
- }
2479
+ Args: { org_id_input: string; chat_id_input?: string[] }
2521
2480
  Returns: Json
2522
2481
  }
2523
2482
  get_export_tickets_data: {
@@ -2532,9 +2491,7 @@ export type Database = {
2532
2491
  Returns: Json
2533
2492
  }
2534
2493
  get_feature_flags: {
2535
- Args: {
2536
- org_id_input: string
2537
- }
2494
+ Args: { org_id_input: string }
2538
2495
  Returns: Json
2539
2496
  }
2540
2497
  get_formatted_cp_values: {
@@ -2546,9 +2503,7 @@ export type Database = {
2546
2503
  Returns: Json
2547
2504
  }
2548
2505
  get_integration_data: {
2549
- Args: {
2550
- org_id_input?: string
2551
- }
2506
+ Args: { org_id_input?: string }
2552
2507
  Returns: Json
2553
2508
  }
2554
2509
  get_message_rule_info: {
@@ -2571,28 +2526,19 @@ export type Database = {
2571
2526
  Returns: Json
2572
2527
  }
2573
2528
  get_old_credits: {
2574
- Args: {
2575
- org_id_input?: string
2576
- }
2529
+ Args: { org_id_input?: string }
2577
2530
  Returns: Json
2578
2531
  }
2579
2532
  get_org: {
2580
- Args: {
2581
- org_id_input?: string
2582
- }
2533
+ Args: { org_id_input?: string }
2583
2534
  Returns: Json
2584
2535
  }
2585
2536
  get_org_credits: {
2586
- Args: {
2587
- org_id_input?: string
2588
- }
2537
+ Args: { org_id_input?: string }
2589
2538
  Returns: Json
2590
2539
  }
2591
2540
  get_org_phones: {
2592
- Args: {
2593
- org_id_input?: string
2594
- phone_id_input?: string
2595
- }
2541
+ Args: { org_id_input?: string; phone_id_input?: string }
2596
2542
  Returns: Json
2597
2543
  }
2598
2544
  get_reaction_rule_info: {
@@ -2606,13 +2552,6 @@ export type Database = {
2606
2552
  }
2607
2553
  Returns: Json
2608
2554
  }
2609
- get_relevant_context: {
2610
- Args: {
2611
- org_id_input: string
2612
- query_embedding_input: string
2613
- }
2614
- Returns: Json
2615
- }
2616
2555
  get_team_metrics_between_dates: {
2617
2556
  Args: {
2618
2557
  org_id_input: string
@@ -2664,10 +2603,7 @@ export type Database = {
2664
2603
  Returns: string
2665
2604
  }
2666
2605
  refresh_chat_properties: {
2667
- Args: {
2668
- org_id_input: string
2669
- chat_id_input?: string
2670
- }
2606
+ Args: { org_id_input: string; chat_id_input?: string }
2671
2607
  Returns: undefined
2672
2608
  }
2673
2609
  update_chat_properties: {
@@ -2802,11 +2738,7 @@ export type Database = {
2802
2738
  Returns: undefined
2803
2739
  }
2804
2740
  update_org_metadata: {
2805
- Args: {
2806
- org_id_input: string
2807
- key_input?: string
2808
- value_input?: Json
2809
- }
2741
+ Args: { org_id_input: string; key_input?: string; value_input?: Json }
2810
2742
  Returns: undefined
2811
2743
  }
2812
2744
  update_rule_log_entry: {
@@ -2821,7 +2753,6 @@ export type Database = {
2821
2753
  }
2822
2754
  }
2823
2755
  Enums: {
2824
- enum_ai_context_type: "faq" | "document"
2825
2756
  enum_broadcast_status: "inprogress" | "completed" | "stopped" | "expired"
2826
2757
  enum_chat_colors:
2827
2758
  | "#B4876E"
@@ -2866,10 +2797,10 @@ export type Database = {
2866
2797
  | "reaction.added"
2867
2798
  | "message.ticket.attached"
2868
2799
  | "org.phone.created"
2800
+ | "org.phone.updated"
2869
2801
  | "org.phone.connected"
2870
2802
  | "org.phone.disconnected"
2871
2803
  | "org.phone.qr"
2872
- | "org.phone.updated"
2873
2804
  enum_integration_type:
2874
2805
  | "zapier"
2875
2806
  | "pabbly"
@@ -2956,6 +2887,7 @@ export type Database = {
2956
2887
  created_at: string | null
2957
2888
  id: string
2958
2889
  last_accessed_at: string | null
2890
+ level: number | null
2959
2891
  metadata: Json | null
2960
2892
  name: string | null
2961
2893
  owner: string | null
@@ -2970,6 +2902,7 @@ export type Database = {
2970
2902
  created_at?: string | null
2971
2903
  id?: string
2972
2904
  last_accessed_at?: string | null
2905
+ level?: number | null
2973
2906
  metadata?: Json | null
2974
2907
  name?: string | null
2975
2908
  owner?: string | null
@@ -2984,6 +2917,7 @@ export type Database = {
2984
2917
  created_at?: string | null
2985
2918
  id?: string
2986
2919
  last_accessed_at?: string | null
2920
+ level?: number | null
2987
2921
  metadata?: Json | null
2988
2922
  name?: string | null
2989
2923
  owner?: string | null
@@ -3003,6 +2937,38 @@ export type Database = {
3003
2937
  },
3004
2938
  ]
3005
2939
  }
2940
+ prefixes: {
2941
+ Row: {
2942
+ bucket_id: string
2943
+ created_at: string | null
2944
+ level: number
2945
+ name: string
2946
+ updated_at: string | null
2947
+ }
2948
+ Insert: {
2949
+ bucket_id: string
2950
+ created_at?: string | null
2951
+ level?: number
2952
+ name: string
2953
+ updated_at?: string | null
2954
+ }
2955
+ Update: {
2956
+ bucket_id?: string
2957
+ created_at?: string | null
2958
+ level?: number
2959
+ name?: string
2960
+ updated_at?: string | null
2961
+ }
2962
+ Relationships: [
2963
+ {
2964
+ foreignKeyName: "prefixes_bucketId_fkey"
2965
+ columns: ["bucket_id"]
2966
+ isOneToOne: false
2967
+ referencedRelation: "buckets"
2968
+ referencedColumns: ["id"]
2969
+ },
2970
+ ]
2971
+ }
3006
2972
  s3_multipart_uploads: {
3007
2973
  Row: {
3008
2974
  bucket_id: string
@@ -3106,31 +3072,40 @@ export type Database = {
3106
3072
  [_ in never]: never
3107
3073
  }
3108
3074
  Functions: {
3075
+ add_prefixes: {
3076
+ Args: { _bucket_id: string; _name: string }
3077
+ Returns: undefined
3078
+ }
3109
3079
  can_insert_object: {
3110
- Args: {
3111
- bucketid: string
3112
- name: string
3113
- owner: string
3114
- metadata: Json
3115
- }
3080
+ Args: { bucketid: string; name: string; owner: string; metadata: Json }
3116
3081
  Returns: undefined
3117
3082
  }
3083
+ delete_prefix: {
3084
+ Args: { _bucket_id: string; _name: string }
3085
+ Returns: boolean
3086
+ }
3118
3087
  extension: {
3119
- Args: {
3120
- name: string
3121
- }
3088
+ Args: { name: string }
3122
3089
  Returns: string
3123
3090
  }
3124
3091
  filename: {
3125
- Args: {
3126
- name: string
3127
- }
3092
+ Args: { name: string }
3128
3093
  Returns: string
3129
3094
  }
3130
3095
  foldername: {
3131
- Args: {
3132
- name: string
3133
- }
3096
+ Args: { name: string }
3097
+ Returns: string[]
3098
+ }
3099
+ get_level: {
3100
+ Args: { name: string }
3101
+ Returns: number
3102
+ }
3103
+ get_prefix: {
3104
+ Args: { name: string }
3105
+ Returns: string
3106
+ }
3107
+ get_prefixes: {
3108
+ Args: { name: string }
3134
3109
  Returns: string[]
3135
3110
  }
3136
3111
  get_size_by_bucket: {
@@ -3195,6 +3170,63 @@ export type Database = {
3195
3170
  metadata: Json
3196
3171
  }[]
3197
3172
  }
3173
+ search_legacy_v1: {
3174
+ Args: {
3175
+ prefix: string
3176
+ bucketname: string
3177
+ limits?: number
3178
+ levels?: number
3179
+ offsets?: number
3180
+ search?: string
3181
+ sortcolumn?: string
3182
+ sortorder?: string
3183
+ }
3184
+ Returns: {
3185
+ name: string
3186
+ id: string
3187
+ updated_at: string
3188
+ created_at: string
3189
+ last_accessed_at: string
3190
+ metadata: Json
3191
+ }[]
3192
+ }
3193
+ search_v1_optimised: {
3194
+ Args: {
3195
+ prefix: string
3196
+ bucketname: string
3197
+ limits?: number
3198
+ levels?: number
3199
+ offsets?: number
3200
+ search?: string
3201
+ sortcolumn?: string
3202
+ sortorder?: string
3203
+ }
3204
+ Returns: {
3205
+ name: string
3206
+ id: string
3207
+ updated_at: string
3208
+ created_at: string
3209
+ last_accessed_at: string
3210
+ metadata: Json
3211
+ }[]
3212
+ }
3213
+ search_v2: {
3214
+ Args: {
3215
+ prefix: string
3216
+ bucket_name: string
3217
+ limits?: number
3218
+ levels?: number
3219
+ start_after?: string
3220
+ }
3221
+ Returns: {
3222
+ key: string
3223
+ name: string
3224
+ id: string
3225
+ updated_at: string
3226
+ created_at: string
3227
+ metadata: Json
3228
+ }[]
3229
+ }
3198
3230
  }
3199
3231
  Enums: {
3200
3232
  [_ in never]: never
@@ -3205,27 +3237,29 @@ export type Database = {
3205
3237
  }
3206
3238
  }
3207
3239
 
3208
- type PublicSchema = Database[Extract<keyof Database, "public">]
3240
+ type DefaultSchema = Database[Extract<keyof Database, "public">]
3209
3241
 
3210
3242
  export type Tables<
3211
- PublicTableNameOrOptions extends
3212
- | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
3243
+ DefaultSchemaTableNameOrOptions extends
3244
+ | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
3213
3245
  | { schema: keyof Database },
3214
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3215
- ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
3216
- Database[PublicTableNameOrOptions["schema"]]["Views"])
3246
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3247
+ schema: keyof Database
3248
+ }
3249
+ ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
3250
+ Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
3217
3251
  : never = never,
3218
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3219
- ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
3220
- Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3252
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3253
+ ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
3254
+ Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3221
3255
  Row: infer R
3222
3256
  }
3223
3257
  ? R
3224
3258
  : never
3225
- : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
3226
- PublicSchema["Views"])
3227
- ? (PublicSchema["Tables"] &
3228
- PublicSchema["Views"])[PublicTableNameOrOptions] extends {
3259
+ : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
3260
+ DefaultSchema["Views"])
3261
+ ? (DefaultSchema["Tables"] &
3262
+ DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3229
3263
  Row: infer R
3230
3264
  }
3231
3265
  ? R
@@ -3233,20 +3267,22 @@ export type Tables<
3233
3267
  : never
3234
3268
 
3235
3269
  export type TablesInsert<
3236
- PublicTableNameOrOptions extends
3237
- | keyof PublicSchema["Tables"]
3270
+ DefaultSchemaTableNameOrOptions extends
3271
+ | keyof DefaultSchema["Tables"]
3238
3272
  | { schema: keyof Database },
3239
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3240
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
3273
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3274
+ schema: keyof Database
3275
+ }
3276
+ ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
3241
3277
  : never = never,
3242
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3243
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3278
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3279
+ ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3244
3280
  Insert: infer I
3245
3281
  }
3246
3282
  ? I
3247
3283
  : never
3248
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
3249
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3284
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
3285
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3250
3286
  Insert: infer I
3251
3287
  }
3252
3288
  ? I
@@ -3254,20 +3290,22 @@ export type TablesInsert<
3254
3290
  : never
3255
3291
 
3256
3292
  export type TablesUpdate<
3257
- PublicTableNameOrOptions extends
3258
- | keyof PublicSchema["Tables"]
3293
+ DefaultSchemaTableNameOrOptions extends
3294
+ | keyof DefaultSchema["Tables"]
3259
3295
  | { schema: keyof Database },
3260
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3261
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
3296
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3297
+ schema: keyof Database
3298
+ }
3299
+ ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
3262
3300
  : never = never,
3263
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3264
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3301
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3302
+ ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3265
3303
  Update: infer U
3266
3304
  }
3267
3305
  ? U
3268
3306
  : never
3269
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
3270
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3307
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
3308
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3271
3309
  Update: infer U
3272
3310
  }
3273
3311
  ? U
@@ -3275,14 +3313,109 @@ export type TablesUpdate<
3275
3313
  : never
3276
3314
 
3277
3315
  export type Enums<
3278
- PublicEnumNameOrOptions extends
3279
- | keyof PublicSchema["Enums"]
3316
+ DefaultSchemaEnumNameOrOptions extends
3317
+ | keyof DefaultSchema["Enums"]
3318
+ | { schema: keyof Database },
3319
+ EnumName extends DefaultSchemaEnumNameOrOptions extends {
3320
+ schema: keyof Database
3321
+ }
3322
+ ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
3323
+ : never = never,
3324
+ > = DefaultSchemaEnumNameOrOptions extends { schema: keyof Database }
3325
+ ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
3326
+ : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
3327
+ ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
3328
+ : never
3329
+
3330
+ export type CompositeTypes<
3331
+ PublicCompositeTypeNameOrOptions extends
3332
+ | keyof DefaultSchema["CompositeTypes"]
3280
3333
  | { schema: keyof Database },
3281
- EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
3282
- ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
3334
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
3335
+ schema: keyof Database
3336
+ }
3337
+ ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
3283
3338
  : never = never,
3284
- > = PublicEnumNameOrOptions extends { schema: keyof Database }
3285
- ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
3286
- : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
3287
- ? PublicSchema["Enums"][PublicEnumNameOrOptions]
3339
+ > = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
3340
+ ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
3341
+ : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
3342
+ ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
3288
3343
  : never
3344
+
3345
+ export const Constants = {
3346
+ internal: {
3347
+ Enums: {},
3348
+ },
3349
+ public: {
3350
+ Enums: {
3351
+ enum_broadcast_status: ["inprogress", "completed", "stopped", "expired"],
3352
+ enum_chat_colors: [
3353
+ "#B4876E",
3354
+ "#A5B337",
3355
+ "#06CF9C",
3356
+ "#25D366",
3357
+ "#02A698",
3358
+ "#7D9EF1",
3359
+ "#007BFC",
3360
+ "#5E47DE",
3361
+ "#7F66FF",
3362
+ "#9333EA",
3363
+ "#FA6533",
3364
+ "#C4532D",
3365
+ "#DC2626",
3366
+ "#FF2E74",
3367
+ "#DB2777",
3368
+ ],
3369
+ enum_chat_tickets_status: ["open", "inprogress", "closed", "archived"],
3370
+ enum_credit_transaction_type: ["credit", "debit"],
3371
+ enum_integration_name: [
3372
+ "org.created",
3373
+ "org.updated",
3374
+ "org.member.created",
3375
+ "org.member.updated",
3376
+ "org.phone.created",
3377
+ "org.phone.connected",
3378
+ "org.phone.disconnected",
3379
+ "org.subscription.trial_will_end",
3380
+ "chat.created",
3381
+ "chat.updated",
3382
+ "chat.notification.created",
3383
+ "message.created",
3384
+ "message.updated",
3385
+ "message.deleted",
3386
+ "message.ack.updated",
3387
+ "reaction.created",
3388
+ "reaction.updated",
3389
+ "ticket.created",
3390
+ "ticket.updated",
3391
+ "ticket.deleted",
3392
+ "org.integrations.updated",
3393
+ "message.flagged",
3394
+ "message.unflagged",
3395
+ "chat.label.updated",
3396
+ "reaction.added",
3397
+ "message.ticket.attached",
3398
+ "org.phone.qr",
3399
+ ],
3400
+ enum_integration_type: [
3401
+ "zapier",
3402
+ "pabbly",
3403
+ "api",
3404
+ "webhook",
3405
+ "hubspot",
3406
+ "freshdesk",
3407
+ "slack",
3408
+ "jira",
3409
+ "salesforce",
3410
+ "zohodesk",
3411
+ "gsheets",
3412
+ ],
3413
+ enum_member_role: ["admin", "member"],
3414
+ },
3415
+ },
3416
+ storage: {
3417
+ Enums: {},
3418
+ },
3419
+ } as const
3420
+
3421
+