@periskope/types 0.6.261 → 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,6 +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
1145
+ label_ids: Json
1212
1146
  name: string | null
1213
1147
  number: string | null
1214
1148
  org_id: string
@@ -1237,6 +1171,7 @@ export type Database = {
1237
1171
  is_my_contact?: boolean | null
1238
1172
  is_user?: boolean | null
1239
1173
  is_wa_contact?: boolean | null
1174
+ label_ids?: Json
1240
1175
  name?: string | null
1241
1176
  number?: string | null
1242
1177
  org_id: string
@@ -1265,6 +1200,7 @@ export type Database = {
1265
1200
  is_my_contact?: boolean | null
1266
1201
  is_user?: boolean | null
1267
1202
  is_wa_contact?: boolean | null
1203
+ label_ids?: Json
1268
1204
  name?: string | null
1269
1205
  number?: string | null
1270
1206
  org_id?: string
@@ -1714,13 +1650,6 @@ export type Database = {
1714
1650
  user_id?: string | null
1715
1651
  }
1716
1652
  Relationships: [
1717
- {
1718
- foreignKeyName: "tbl_org_members_fkey_auth_users"
1719
- columns: ["user_id"]
1720
- isOneToOne: false
1721
- referencedRelation: "users"
1722
- referencedColumns: ["id"]
1723
- },
1724
1653
  {
1725
1654
  foreignKeyName: "tbl_org_members_fkey_tbl_org"
1726
1655
  columns: ["org_id"]
@@ -1964,6 +1893,63 @@ export type Database = {
1964
1893
  },
1965
1894
  ]
1966
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
+ }
1967
1953
  tbl_quick_replies: {
1968
1954
  Row: {
1969
1955
  command: string | null
@@ -2244,7 +2230,6 @@ export type Database = {
2244
2230
  view_chats: {
2245
2231
  Row: {
2246
2232
  add_members_admins_only: boolean | null
2247
- ai_metadata: Json | null
2248
2233
  assigned_to: string | null
2249
2234
  chat_access: Json | null
2250
2235
  chat_id: string | null
@@ -2388,51 +2373,34 @@ export type Database = {
2388
2373
  }
2389
2374
  Functions: {
2390
2375
  check_feature_flag_access: {
2391
- Args: {
2392
- org_id_input: string
2393
- feature_input: string
2394
- }
2376
+ Args: { org_id_input: string; feature_input: string }
2395
2377
  Returns: boolean
2396
2378
  }
2397
2379
  custom_access_token_hook: {
2398
- Args: {
2399
- event: Json
2400
- }
2380
+ Args: { event: Json }
2401
2381
  Returns: Json
2402
2382
  }
2403
2383
  delete_org: {
2404
- Args: {
2405
- org_id_input: string
2406
- }
2384
+ Args: { org_id_input: string }
2407
2385
  Returns: Json
2408
2386
  }
2409
2387
  drop_partition: {
2410
- Args: {
2411
- org_id_input: string
2412
- }
2388
+ Args: { org_id_input: string }
2413
2389
  Returns: boolean
2414
2390
  }
2415
2391
  find_discrepancies: {
2416
- Args: {
2417
- p_org_id: string
2418
- }
2392
+ Args: { p_org_id: string }
2419
2393
  Returns: {
2420
2394
  a_chat_id: string
2421
2395
  discrepancy_count: number
2422
2396
  }[]
2423
2397
  }
2424
2398
  gen_id: {
2425
- Args: {
2426
- prefix: string
2427
- size?: number
2428
- alphabet?: string
2429
- }
2399
+ Args: { prefix: string; size?: number; alphabet?: string }
2430
2400
  Returns: string
2431
2401
  }
2432
2402
  gen_ticket_id: {
2433
- Args: {
2434
- org_id_input: string
2435
- }
2403
+ Args: { org_id_input: string }
2436
2404
  Returns: string
2437
2405
  }
2438
2406
  generate_access_token: {
@@ -2454,10 +2422,7 @@ export type Database = {
2454
2422
  Returns: Json
2455
2423
  }
2456
2424
  get_chat_labels_data: {
2457
- Args: {
2458
- org_id_input: string
2459
- chat_ids_input?: string[]
2460
- }
2425
+ Args: { org_id_input: string; chat_ids_input?: string[] }
2461
2426
  Returns: Json[]
2462
2427
  }
2463
2428
  get_chat_rule_info: {
@@ -2511,10 +2476,7 @@ export type Database = {
2511
2476
  Returns: Json
2512
2477
  }
2513
2478
  get_export_members_data: {
2514
- Args: {
2515
- org_id_input: string
2516
- chat_id_input?: string[]
2517
- }
2479
+ Args: { org_id_input: string; chat_id_input?: string[] }
2518
2480
  Returns: Json
2519
2481
  }
2520
2482
  get_export_tickets_data: {
@@ -2529,9 +2491,7 @@ export type Database = {
2529
2491
  Returns: Json
2530
2492
  }
2531
2493
  get_feature_flags: {
2532
- Args: {
2533
- org_id_input: string
2534
- }
2494
+ Args: { org_id_input: string }
2535
2495
  Returns: Json
2536
2496
  }
2537
2497
  get_formatted_cp_values: {
@@ -2543,9 +2503,7 @@ export type Database = {
2543
2503
  Returns: Json
2544
2504
  }
2545
2505
  get_integration_data: {
2546
- Args: {
2547
- org_id_input?: string
2548
- }
2506
+ Args: { org_id_input?: string }
2549
2507
  Returns: Json
2550
2508
  }
2551
2509
  get_message_rule_info: {
@@ -2568,28 +2526,19 @@ export type Database = {
2568
2526
  Returns: Json
2569
2527
  }
2570
2528
  get_old_credits: {
2571
- Args: {
2572
- org_id_input?: string
2573
- }
2529
+ Args: { org_id_input?: string }
2574
2530
  Returns: Json
2575
2531
  }
2576
2532
  get_org: {
2577
- Args: {
2578
- org_id_input?: string
2579
- }
2533
+ Args: { org_id_input?: string }
2580
2534
  Returns: Json
2581
2535
  }
2582
2536
  get_org_credits: {
2583
- Args: {
2584
- org_id_input?: string
2585
- }
2537
+ Args: { org_id_input?: string }
2586
2538
  Returns: Json
2587
2539
  }
2588
2540
  get_org_phones: {
2589
- Args: {
2590
- org_id_input?: string
2591
- phone_id_input?: string
2592
- }
2541
+ Args: { org_id_input?: string; phone_id_input?: string }
2593
2542
  Returns: Json
2594
2543
  }
2595
2544
  get_reaction_rule_info: {
@@ -2603,13 +2552,6 @@ export type Database = {
2603
2552
  }
2604
2553
  Returns: Json
2605
2554
  }
2606
- get_relevant_context: {
2607
- Args: {
2608
- org_id_input: string
2609
- query_embedding_input: string
2610
- }
2611
- Returns: Json
2612
- }
2613
2555
  get_team_metrics_between_dates: {
2614
2556
  Args: {
2615
2557
  org_id_input: string
@@ -2661,10 +2603,7 @@ export type Database = {
2661
2603
  Returns: string
2662
2604
  }
2663
2605
  refresh_chat_properties: {
2664
- Args: {
2665
- org_id_input: string
2666
- chat_id_input?: string
2667
- }
2606
+ Args: { org_id_input: string; chat_id_input?: string }
2668
2607
  Returns: undefined
2669
2608
  }
2670
2609
  update_chat_properties: {
@@ -2799,11 +2738,7 @@ export type Database = {
2799
2738
  Returns: undefined
2800
2739
  }
2801
2740
  update_org_metadata: {
2802
- Args: {
2803
- org_id_input: string
2804
- key_input?: string
2805
- value_input?: Json
2806
- }
2741
+ Args: { org_id_input: string; key_input?: string; value_input?: Json }
2807
2742
  Returns: undefined
2808
2743
  }
2809
2744
  update_rule_log_entry: {
@@ -2818,7 +2753,6 @@ export type Database = {
2818
2753
  }
2819
2754
  }
2820
2755
  Enums: {
2821
- enum_ai_context_type: "faq" | "document"
2822
2756
  enum_broadcast_status: "inprogress" | "completed" | "stopped" | "expired"
2823
2757
  enum_chat_colors:
2824
2758
  | "#B4876E"
@@ -2863,10 +2797,10 @@ export type Database = {
2863
2797
  | "reaction.added"
2864
2798
  | "message.ticket.attached"
2865
2799
  | "org.phone.created"
2800
+ | "org.phone.updated"
2866
2801
  | "org.phone.connected"
2867
2802
  | "org.phone.disconnected"
2868
2803
  | "org.phone.qr"
2869
- | "org.phone.updated"
2870
2804
  enum_integration_type:
2871
2805
  | "zapier"
2872
2806
  | "pabbly"
@@ -2953,6 +2887,7 @@ export type Database = {
2953
2887
  created_at: string | null
2954
2888
  id: string
2955
2889
  last_accessed_at: string | null
2890
+ level: number | null
2956
2891
  metadata: Json | null
2957
2892
  name: string | null
2958
2893
  owner: string | null
@@ -2967,6 +2902,7 @@ export type Database = {
2967
2902
  created_at?: string | null
2968
2903
  id?: string
2969
2904
  last_accessed_at?: string | null
2905
+ level?: number | null
2970
2906
  metadata?: Json | null
2971
2907
  name?: string | null
2972
2908
  owner?: string | null
@@ -2981,6 +2917,7 @@ export type Database = {
2981
2917
  created_at?: string | null
2982
2918
  id?: string
2983
2919
  last_accessed_at?: string | null
2920
+ level?: number | null
2984
2921
  metadata?: Json | null
2985
2922
  name?: string | null
2986
2923
  owner?: string | null
@@ -3000,6 +2937,38 @@ export type Database = {
3000
2937
  },
3001
2938
  ]
3002
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
+ }
3003
2972
  s3_multipart_uploads: {
3004
2973
  Row: {
3005
2974
  bucket_id: string
@@ -3103,31 +3072,40 @@ export type Database = {
3103
3072
  [_ in never]: never
3104
3073
  }
3105
3074
  Functions: {
3075
+ add_prefixes: {
3076
+ Args: { _bucket_id: string; _name: string }
3077
+ Returns: undefined
3078
+ }
3106
3079
  can_insert_object: {
3107
- Args: {
3108
- bucketid: string
3109
- name: string
3110
- owner: string
3111
- metadata: Json
3112
- }
3080
+ Args: { bucketid: string; name: string; owner: string; metadata: Json }
3113
3081
  Returns: undefined
3114
3082
  }
3083
+ delete_prefix: {
3084
+ Args: { _bucket_id: string; _name: string }
3085
+ Returns: boolean
3086
+ }
3115
3087
  extension: {
3116
- Args: {
3117
- name: string
3118
- }
3088
+ Args: { name: string }
3119
3089
  Returns: string
3120
3090
  }
3121
3091
  filename: {
3122
- Args: {
3123
- name: string
3124
- }
3092
+ Args: { name: string }
3125
3093
  Returns: string
3126
3094
  }
3127
3095
  foldername: {
3128
- Args: {
3129
- name: string
3130
- }
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 }
3131
3109
  Returns: string[]
3132
3110
  }
3133
3111
  get_size_by_bucket: {
@@ -3192,6 +3170,63 @@ export type Database = {
3192
3170
  metadata: Json
3193
3171
  }[]
3194
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
+ }
3195
3230
  }
3196
3231
  Enums: {
3197
3232
  [_ in never]: never
@@ -3202,27 +3237,29 @@ export type Database = {
3202
3237
  }
3203
3238
  }
3204
3239
 
3205
- type PublicSchema = Database[Extract<keyof Database, "public">]
3240
+ type DefaultSchema = Database[Extract<keyof Database, "public">]
3206
3241
 
3207
3242
  export type Tables<
3208
- PublicTableNameOrOptions extends
3209
- | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
3243
+ DefaultSchemaTableNameOrOptions extends
3244
+ | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
3210
3245
  | { schema: keyof Database },
3211
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3212
- ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
3213
- 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"])
3214
3251
  : never = never,
3215
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3216
- ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
3217
- Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3252
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3253
+ ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
3254
+ Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3218
3255
  Row: infer R
3219
3256
  }
3220
3257
  ? R
3221
3258
  : never
3222
- : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
3223
- PublicSchema["Views"])
3224
- ? (PublicSchema["Tables"] &
3225
- PublicSchema["Views"])[PublicTableNameOrOptions] extends {
3259
+ : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
3260
+ DefaultSchema["Views"])
3261
+ ? (DefaultSchema["Tables"] &
3262
+ DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3226
3263
  Row: infer R
3227
3264
  }
3228
3265
  ? R
@@ -3230,20 +3267,22 @@ export type Tables<
3230
3267
  : never
3231
3268
 
3232
3269
  export type TablesInsert<
3233
- PublicTableNameOrOptions extends
3234
- | keyof PublicSchema["Tables"]
3270
+ DefaultSchemaTableNameOrOptions extends
3271
+ | keyof DefaultSchema["Tables"]
3235
3272
  | { schema: keyof Database },
3236
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3237
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
3273
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3274
+ schema: keyof Database
3275
+ }
3276
+ ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
3238
3277
  : never = never,
3239
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3240
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3278
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3279
+ ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3241
3280
  Insert: infer I
3242
3281
  }
3243
3282
  ? I
3244
3283
  : never
3245
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
3246
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3284
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
3285
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3247
3286
  Insert: infer I
3248
3287
  }
3249
3288
  ? I
@@ -3251,20 +3290,22 @@ export type TablesInsert<
3251
3290
  : never
3252
3291
 
3253
3292
  export type TablesUpdate<
3254
- PublicTableNameOrOptions extends
3255
- | keyof PublicSchema["Tables"]
3293
+ DefaultSchemaTableNameOrOptions extends
3294
+ | keyof DefaultSchema["Tables"]
3256
3295
  | { schema: keyof Database },
3257
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3258
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
3296
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3297
+ schema: keyof Database
3298
+ }
3299
+ ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
3259
3300
  : never = never,
3260
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3261
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3301
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3302
+ ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3262
3303
  Update: infer U
3263
3304
  }
3264
3305
  ? U
3265
3306
  : never
3266
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
3267
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3307
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
3308
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3268
3309
  Update: infer U
3269
3310
  }
3270
3311
  ? U
@@ -3272,14 +3313,109 @@ export type TablesUpdate<
3272
3313
  : never
3273
3314
 
3274
3315
  export type Enums<
3275
- PublicEnumNameOrOptions extends
3276
- | 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"]
3277
3333
  | { schema: keyof Database },
3278
- EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
3279
- ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
3334
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
3335
+ schema: keyof Database
3336
+ }
3337
+ ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
3280
3338
  : never = never,
3281
- > = PublicEnumNameOrOptions extends { schema: keyof Database }
3282
- ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
3283
- : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
3284
- ? 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]
3285
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
+