@periskope/types 0.6.267 → 0.6.269

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: {
@@ -1723,13 +1698,6 @@ export type Database = {
1723
1698
  user_id?: string | null
1724
1699
  }
1725
1700
  Relationships: [
1726
- {
1727
- foreignKeyName: "tbl_org_members_fkey_auth_users"
1728
- columns: ["user_id"]
1729
- isOneToOne: false
1730
- referencedRelation: "users"
1731
- referencedColumns: ["id"]
1732
- },
1733
1701
  {
1734
1702
  foreignKeyName: "tbl_org_members_fkey_tbl_org"
1735
1703
  columns: ["org_id"]
@@ -2277,6 +2245,7 @@ export type Database = {
2277
2245
  label_ids: Json | null
2278
2246
  latest_message: Json | null
2279
2247
  member_count: number | null
2248
+ member_unread_count: Json | null
2280
2249
  message_unread_count: number | null
2281
2250
  messages_admins_only: boolean | null
2282
2251
  org_id: string | null
@@ -2399,51 +2368,23 @@ export type Database = {
2399
2368
  }
2400
2369
  Functions: {
2401
2370
  check_feature_flag_access: {
2402
- Args: {
2403
- org_id_input: string
2404
- feature_input: string
2405
- }
2371
+ Args: { org_id_input: string; feature_input: string }
2406
2372
  Returns: boolean
2407
2373
  }
2408
2374
  custom_access_token_hook: {
2409
- Args: {
2410
- event: Json
2411
- }
2375
+ Args: { event: Json }
2412
2376
  Returns: Json
2413
2377
  }
2414
2378
  delete_org: {
2415
- Args: {
2416
- org_id_input: string
2417
- }
2379
+ Args: { org_id_input: string }
2418
2380
  Returns: Json
2419
2381
  }
2420
- drop_partition: {
2421
- Args: {
2422
- org_id_input: string
2423
- }
2424
- Returns: boolean
2425
- }
2426
- find_discrepancies: {
2427
- Args: {
2428
- p_org_id: string
2429
- }
2430
- Returns: {
2431
- a_chat_id: string
2432
- discrepancy_count: number
2433
- }[]
2434
- }
2435
2382
  gen_id: {
2436
- Args: {
2437
- prefix: string
2438
- size?: number
2439
- alphabet?: string
2440
- }
2383
+ Args: { prefix: string; size?: number; alphabet?: string }
2441
2384
  Returns: string
2442
2385
  }
2443
2386
  gen_ticket_id: {
2444
- Args: {
2445
- org_id_input: string
2446
- }
2387
+ Args: { org_id_input: string }
2447
2388
  Returns: string
2448
2389
  }
2449
2390
  generate_access_token: {
@@ -2465,10 +2406,7 @@ export type Database = {
2465
2406
  Returns: Json
2466
2407
  }
2467
2408
  get_chat_labels_data: {
2468
- Args: {
2469
- org_id_input: string
2470
- chat_ids_input?: string[]
2471
- }
2409
+ Args: { org_id_input: string; chat_ids_input?: string[] }
2472
2410
  Returns: Json[]
2473
2411
  }
2474
2412
  get_chat_rule_info: {
@@ -2522,10 +2460,7 @@ export type Database = {
2522
2460
  Returns: Json
2523
2461
  }
2524
2462
  get_export_members_data: {
2525
- Args: {
2526
- org_id_input: string
2527
- chat_id_input?: string[]
2528
- }
2463
+ Args: { org_id_input: string; chat_id_input?: string[] }
2529
2464
  Returns: Json
2530
2465
  }
2531
2466
  get_export_tickets_data: {
@@ -2540,9 +2475,7 @@ export type Database = {
2540
2475
  Returns: Json
2541
2476
  }
2542
2477
  get_feature_flags: {
2543
- Args: {
2544
- org_id_input: string
2545
- }
2478
+ Args: { org_id_input: string }
2546
2479
  Returns: Json
2547
2480
  }
2548
2481
  get_formatted_cp_values: {
@@ -2554,9 +2487,7 @@ export type Database = {
2554
2487
  Returns: Json
2555
2488
  }
2556
2489
  get_integration_data: {
2557
- Args: {
2558
- org_id_input?: string
2559
- }
2490
+ Args: { org_id_input?: string }
2560
2491
  Returns: Json
2561
2492
  }
2562
2493
  get_message_rule_info: {
@@ -2579,28 +2510,19 @@ export type Database = {
2579
2510
  Returns: Json
2580
2511
  }
2581
2512
  get_old_credits: {
2582
- Args: {
2583
- org_id_input?: string
2584
- }
2513
+ Args: { org_id_input?: string }
2585
2514
  Returns: Json
2586
2515
  }
2587
2516
  get_org: {
2588
- Args: {
2589
- org_id_input?: string
2590
- }
2517
+ Args: { org_id_input?: string }
2591
2518
  Returns: Json
2592
2519
  }
2593
2520
  get_org_credits: {
2594
- Args: {
2595
- org_id_input?: string
2596
- }
2521
+ Args: { org_id_input?: string }
2597
2522
  Returns: Json
2598
2523
  }
2599
2524
  get_org_phones: {
2600
- Args: {
2601
- org_id_input?: string
2602
- phone_id_input?: string
2603
- }
2525
+ Args: { org_id_input?: string; phone_id_input?: string }
2604
2526
  Returns: Json
2605
2527
  }
2606
2528
  get_reaction_rule_info: {
@@ -2615,10 +2537,7 @@ export type Database = {
2615
2537
  Returns: Json
2616
2538
  }
2617
2539
  get_relevant_context: {
2618
- Args: {
2619
- org_id_input: string
2620
- query_embedding_input: string
2621
- }
2540
+ Args: { org_id_input: string; query_embedding_input: string }
2622
2541
  Returns: Json
2623
2542
  }
2624
2543
  get_team_metrics_between_dates: {
@@ -2672,10 +2591,7 @@ export type Database = {
2672
2591
  Returns: string
2673
2592
  }
2674
2593
  refresh_chat_properties: {
2675
- Args: {
2676
- org_id_input: string
2677
- chat_id_input?: string
2678
- }
2594
+ Args: { org_id_input: string; chat_id_input?: string }
2679
2595
  Returns: undefined
2680
2596
  }
2681
2597
  update_chat_properties: {
@@ -2822,11 +2738,7 @@ export type Database = {
2822
2738
  Returns: undefined
2823
2739
  }
2824
2740
  update_org_metadata: {
2825
- Args: {
2826
- org_id_input: string
2827
- key_input?: string
2828
- value_input?: Json
2829
- }
2741
+ Args: { org_id_input: string; key_input?: string; value_input?: Json }
2830
2742
  Returns: undefined
2831
2743
  }
2832
2744
  update_rule_log_entry: {
@@ -2976,6 +2888,7 @@ export type Database = {
2976
2888
  created_at: string | null
2977
2889
  id: string
2978
2890
  last_accessed_at: string | null
2891
+ level: number | null
2979
2892
  metadata: Json | null
2980
2893
  name: string | null
2981
2894
  owner: string | null
@@ -2990,6 +2903,7 @@ export type Database = {
2990
2903
  created_at?: string | null
2991
2904
  id?: string
2992
2905
  last_accessed_at?: string | null
2906
+ level?: number | null
2993
2907
  metadata?: Json | null
2994
2908
  name?: string | null
2995
2909
  owner?: string | null
@@ -3004,6 +2918,7 @@ export type Database = {
3004
2918
  created_at?: string | null
3005
2919
  id?: string
3006
2920
  last_accessed_at?: string | null
2921
+ level?: number | null
3007
2922
  metadata?: Json | null
3008
2923
  name?: string | null
3009
2924
  owner?: string | null
@@ -3023,6 +2938,38 @@ export type Database = {
3023
2938
  },
3024
2939
  ]
3025
2940
  }
2941
+ prefixes: {
2942
+ Row: {
2943
+ bucket_id: string
2944
+ created_at: string | null
2945
+ level: number
2946
+ name: string
2947
+ updated_at: string | null
2948
+ }
2949
+ Insert: {
2950
+ bucket_id: string
2951
+ created_at?: string | null
2952
+ level?: number
2953
+ name: string
2954
+ updated_at?: string | null
2955
+ }
2956
+ Update: {
2957
+ bucket_id?: string
2958
+ created_at?: string | null
2959
+ level?: number
2960
+ name?: string
2961
+ updated_at?: string | null
2962
+ }
2963
+ Relationships: [
2964
+ {
2965
+ foreignKeyName: "prefixes_bucketId_fkey"
2966
+ columns: ["bucket_id"]
2967
+ isOneToOne: false
2968
+ referencedRelation: "buckets"
2969
+ referencedColumns: ["id"]
2970
+ },
2971
+ ]
2972
+ }
3026
2973
  s3_multipart_uploads: {
3027
2974
  Row: {
3028
2975
  bucket_id: string
@@ -3126,31 +3073,40 @@ export type Database = {
3126
3073
  [_ in never]: never
3127
3074
  }
3128
3075
  Functions: {
3076
+ add_prefixes: {
3077
+ Args: { _bucket_id: string; _name: string }
3078
+ Returns: undefined
3079
+ }
3129
3080
  can_insert_object: {
3130
- Args: {
3131
- bucketid: string
3132
- name: string
3133
- owner: string
3134
- metadata: Json
3135
- }
3081
+ Args: { bucketid: string; name: string; owner: string; metadata: Json }
3136
3082
  Returns: undefined
3137
3083
  }
3084
+ delete_prefix: {
3085
+ Args: { _bucket_id: string; _name: string }
3086
+ Returns: boolean
3087
+ }
3138
3088
  extension: {
3139
- Args: {
3140
- name: string
3141
- }
3089
+ Args: { name: string }
3142
3090
  Returns: string
3143
3091
  }
3144
3092
  filename: {
3145
- Args: {
3146
- name: string
3147
- }
3093
+ Args: { name: string }
3148
3094
  Returns: string
3149
3095
  }
3150
3096
  foldername: {
3151
- Args: {
3152
- name: string
3153
- }
3097
+ Args: { name: string }
3098
+ Returns: string[]
3099
+ }
3100
+ get_level: {
3101
+ Args: { name: string }
3102
+ Returns: number
3103
+ }
3104
+ get_prefix: {
3105
+ Args: { name: string }
3106
+ Returns: string
3107
+ }
3108
+ get_prefixes: {
3109
+ Args: { name: string }
3154
3110
  Returns: string[]
3155
3111
  }
3156
3112
  get_size_by_bucket: {
@@ -3215,6 +3171,63 @@ export type Database = {
3215
3171
  metadata: Json
3216
3172
  }[]
3217
3173
  }
3174
+ search_legacy_v1: {
3175
+ Args: {
3176
+ prefix: string
3177
+ bucketname: string
3178
+ limits?: number
3179
+ levels?: number
3180
+ offsets?: number
3181
+ search?: string
3182
+ sortcolumn?: string
3183
+ sortorder?: string
3184
+ }
3185
+ Returns: {
3186
+ name: string
3187
+ id: string
3188
+ updated_at: string
3189
+ created_at: string
3190
+ last_accessed_at: string
3191
+ metadata: Json
3192
+ }[]
3193
+ }
3194
+ search_v1_optimised: {
3195
+ Args: {
3196
+ prefix: string
3197
+ bucketname: string
3198
+ limits?: number
3199
+ levels?: number
3200
+ offsets?: number
3201
+ search?: string
3202
+ sortcolumn?: string
3203
+ sortorder?: string
3204
+ }
3205
+ Returns: {
3206
+ name: string
3207
+ id: string
3208
+ updated_at: string
3209
+ created_at: string
3210
+ last_accessed_at: string
3211
+ metadata: Json
3212
+ }[]
3213
+ }
3214
+ search_v2: {
3215
+ Args: {
3216
+ prefix: string
3217
+ bucket_name: string
3218
+ limits?: number
3219
+ levels?: number
3220
+ start_after?: string
3221
+ }
3222
+ Returns: {
3223
+ key: string
3224
+ name: string
3225
+ id: string
3226
+ updated_at: string
3227
+ created_at: string
3228
+ metadata: Json
3229
+ }[]
3230
+ }
3218
3231
  }
3219
3232
  Enums: {
3220
3233
  [_ in never]: never
@@ -3225,27 +3238,29 @@ export type Database = {
3225
3238
  }
3226
3239
  }
3227
3240
 
3228
- type PublicSchema = Database[Extract<keyof Database, "public">]
3241
+ type DefaultSchema = Database[Extract<keyof Database, "public">]
3229
3242
 
3230
3243
  export type Tables<
3231
- PublicTableNameOrOptions extends
3232
- | keyof (PublicSchema["Tables"] & PublicSchema["Views"])
3244
+ DefaultSchemaTableNameOrOptions extends
3245
+ | keyof (DefaultSchema["Tables"] & DefaultSchema["Views"])
3233
3246
  | { schema: keyof Database },
3234
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3235
- ? keyof (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
3236
- Database[PublicTableNameOrOptions["schema"]]["Views"])
3247
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3248
+ schema: keyof Database
3249
+ }
3250
+ ? keyof (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
3251
+ Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])
3237
3252
  : never = never,
3238
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3239
- ? (Database[PublicTableNameOrOptions["schema"]]["Tables"] &
3240
- Database[PublicTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3253
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3254
+ ? (Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"] &
3255
+ Database[DefaultSchemaTableNameOrOptions["schema"]]["Views"])[TableName] extends {
3241
3256
  Row: infer R
3242
3257
  }
3243
3258
  ? R
3244
3259
  : never
3245
- : PublicTableNameOrOptions extends keyof (PublicSchema["Tables"] &
3246
- PublicSchema["Views"])
3247
- ? (PublicSchema["Tables"] &
3248
- PublicSchema["Views"])[PublicTableNameOrOptions] extends {
3260
+ : DefaultSchemaTableNameOrOptions extends keyof (DefaultSchema["Tables"] &
3261
+ DefaultSchema["Views"])
3262
+ ? (DefaultSchema["Tables"] &
3263
+ DefaultSchema["Views"])[DefaultSchemaTableNameOrOptions] extends {
3249
3264
  Row: infer R
3250
3265
  }
3251
3266
  ? R
@@ -3253,20 +3268,22 @@ export type Tables<
3253
3268
  : never
3254
3269
 
3255
3270
  export type TablesInsert<
3256
- PublicTableNameOrOptions extends
3257
- | keyof PublicSchema["Tables"]
3271
+ DefaultSchemaTableNameOrOptions extends
3272
+ | keyof DefaultSchema["Tables"]
3258
3273
  | { schema: keyof Database },
3259
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3260
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
3274
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3275
+ schema: keyof Database
3276
+ }
3277
+ ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
3261
3278
  : never = never,
3262
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3263
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3279
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3280
+ ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3264
3281
  Insert: infer I
3265
3282
  }
3266
3283
  ? I
3267
3284
  : never
3268
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
3269
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3285
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
3286
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3270
3287
  Insert: infer I
3271
3288
  }
3272
3289
  ? I
@@ -3274,20 +3291,22 @@ export type TablesInsert<
3274
3291
  : never
3275
3292
 
3276
3293
  export type TablesUpdate<
3277
- PublicTableNameOrOptions extends
3278
- | keyof PublicSchema["Tables"]
3294
+ DefaultSchemaTableNameOrOptions extends
3295
+ | keyof DefaultSchema["Tables"]
3279
3296
  | { schema: keyof Database },
3280
- TableName extends PublicTableNameOrOptions extends { schema: keyof Database }
3281
- ? keyof Database[PublicTableNameOrOptions["schema"]]["Tables"]
3297
+ TableName extends DefaultSchemaTableNameOrOptions extends {
3298
+ schema: keyof Database
3299
+ }
3300
+ ? keyof Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"]
3282
3301
  : never = never,
3283
- > = PublicTableNameOrOptions extends { schema: keyof Database }
3284
- ? Database[PublicTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3302
+ > = DefaultSchemaTableNameOrOptions extends { schema: keyof Database }
3303
+ ? Database[DefaultSchemaTableNameOrOptions["schema"]]["Tables"][TableName] extends {
3285
3304
  Update: infer U
3286
3305
  }
3287
3306
  ? U
3288
3307
  : never
3289
- : PublicTableNameOrOptions extends keyof PublicSchema["Tables"]
3290
- ? PublicSchema["Tables"][PublicTableNameOrOptions] extends {
3308
+ : DefaultSchemaTableNameOrOptions extends keyof DefaultSchema["Tables"]
3309
+ ? DefaultSchema["Tables"][DefaultSchemaTableNameOrOptions] extends {
3291
3310
  Update: infer U
3292
3311
  }
3293
3312
  ? U
@@ -3295,18 +3314,34 @@ export type TablesUpdate<
3295
3314
  : never
3296
3315
 
3297
3316
  export type Enums<
3298
- PublicEnumNameOrOptions extends
3299
- | keyof PublicSchema["Enums"]
3317
+ DefaultSchemaEnumNameOrOptions extends
3318
+ | keyof DefaultSchema["Enums"]
3300
3319
  | { schema: keyof Database },
3301
- EnumName extends PublicEnumNameOrOptions extends { schema: keyof Database }
3302
- ? keyof Database[PublicEnumNameOrOptions["schema"]]["Enums"]
3320
+ EnumName extends DefaultSchemaEnumNameOrOptions extends {
3321
+ schema: keyof Database
3322
+ }
3323
+ ? keyof Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"]
3303
3324
  : never = never,
3304
- > = PublicEnumNameOrOptions extends { schema: keyof Database }
3305
- ? Database[PublicEnumNameOrOptions["schema"]]["Enums"][EnumName]
3306
- : PublicEnumNameOrOptions extends keyof PublicSchema["Enums"]
3307
- ? PublicSchema["Enums"][PublicEnumNameOrOptions]
3325
+ > = DefaultSchemaEnumNameOrOptions extends { schema: keyof Database }
3326
+ ? Database[DefaultSchemaEnumNameOrOptions["schema"]]["Enums"][EnumName]
3327
+ : DefaultSchemaEnumNameOrOptions extends keyof DefaultSchema["Enums"]
3328
+ ? DefaultSchema["Enums"][DefaultSchemaEnumNameOrOptions]
3308
3329
  : never
3309
3330
 
3331
+ export type CompositeTypes<
3332
+ PublicCompositeTypeNameOrOptions extends
3333
+ | keyof DefaultSchema["CompositeTypes"]
3334
+ | { schema: keyof Database },
3335
+ CompositeTypeName extends PublicCompositeTypeNameOrOptions extends {
3336
+ schema: keyof Database
3337
+ }
3338
+ ? keyof Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"]
3339
+ : never = never,
3340
+ > = PublicCompositeTypeNameOrOptions extends { schema: keyof Database }
3341
+ ? Database[PublicCompositeTypeNameOrOptions["schema"]]["CompositeTypes"][CompositeTypeName]
3342
+ : PublicCompositeTypeNameOrOptions extends keyof DefaultSchema["CompositeTypes"]
3343
+ ? DefaultSchema["CompositeTypes"][PublicCompositeTypeNameOrOptions]
3344
+ : never
3310
3345
 
3311
3346
  export const Constants = {
3312
3347
  internal: {
@@ -3314,6 +3349,7 @@ export const Constants = {
3314
3349
  },
3315
3350
  public: {
3316
3351
  Enums: {
3352
+ enum_ai_context_type: ["faq", "document"],
3317
3353
  enum_broadcast_status: ["inprogress", "completed", "stopped", "expired"],
3318
3354
  enum_chat_colors: [
3319
3355
  "#B4876E",
@@ -3385,4 +3421,4 @@ export const Constants = {
3385
3421
  },
3386
3422
  } as const
3387
3423
 
3388
-
3424
+