@periskope/types 0.6.465 → 0.6.466

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.
@@ -830,6 +830,73 @@ export type Database = {
830
830
  }
831
831
  Relationships: []
832
832
  }
833
+ tbl_api_tokens: {
834
+ Row: {
835
+ exp: string
836
+ iat: string
837
+ id: string
838
+ is_revealed: boolean
839
+ name: string
840
+ org_id: string
841
+ refresh_token_hash: string | null
842
+ role: string
843
+ token: string
844
+ token_hash: string
845
+ token_metadata: Json
846
+ type: string
847
+ }
848
+ Insert: {
849
+ exp: string
850
+ iat: string
851
+ id: string
852
+ is_revealed?: boolean
853
+ name: string
854
+ org_id: string
855
+ refresh_token_hash?: string | null
856
+ role: string
857
+ token: string
858
+ token_hash: string
859
+ token_metadata?: Json
860
+ type: string
861
+ }
862
+ Update: {
863
+ exp?: string
864
+ iat?: string
865
+ id?: string
866
+ is_revealed?: boolean
867
+ name?: string
868
+ org_id?: string
869
+ refresh_token_hash?: string | null
870
+ role?: string
871
+ token?: string
872
+ token_hash?: string
873
+ token_metadata?: Json
874
+ type?: string
875
+ }
876
+ Relationships: [
877
+ {
878
+ foreignKeyName: "tbl_api_tokens_org_id_fkey"
879
+ columns: ["org_id"]
880
+ isOneToOne: false
881
+ referencedRelation: "tbl_org"
882
+ referencedColumns: ["org_id"]
883
+ },
884
+ {
885
+ foreignKeyName: "tbl_api_tokens_org_id_fkey"
886
+ columns: ["org_id"]
887
+ isOneToOne: false
888
+ referencedRelation: "view_org"
889
+ referencedColumns: ["org_id"]
890
+ },
891
+ {
892
+ foreignKeyName: "tbl_api_tokens_org_id_fkey"
893
+ columns: ["org_id"]
894
+ isOneToOne: false
895
+ referencedRelation: "view_org_all"
896
+ referencedColumns: ["org_id"]
897
+ },
898
+ ]
899
+ }
833
900
  tbl_automation_rules: {
834
901
  Row: {
835
902
  actions: Json
@@ -895,29 +962,29 @@ export type Database = {
895
962
  Row: {
896
963
  chat_ids: string[]
897
964
  created_at: string
898
- updated_at: string | null
899
965
  created_by: string | null
900
966
  org_id: string
901
967
  template_id: string
902
968
  template_name: string
969
+ updated_at: string | null
903
970
  }
904
971
  Insert: {
905
972
  chat_ids?: string[]
906
973
  created_at?: string
907
- updated_at?: string | null
908
974
  created_by?: string | null
909
975
  org_id: string
910
976
  template_id?: string
911
977
  template_name: string
978
+ updated_at?: string | null
912
979
  }
913
980
  Update: {
914
981
  chat_ids?: string[]
915
982
  created_at?: string
916
- updated_at?: string | null
917
983
  created_by?: string | null
918
984
  org_id?: string
919
985
  template_id?: string
920
986
  template_name?: string
987
+ updated_at?: string | null
921
988
  }
922
989
  Relationships: [
923
990
  {
@@ -956,9 +1023,9 @@ export type Database = {
956
1023
  message_id: string | null
957
1024
  org_id: string
958
1025
  org_phone: string | null
1026
+ poll_results: Json | null
959
1027
  read_count: number | null
960
1028
  remarks: string | null
961
- poll_results: Json | null
962
1029
  }
963
1030
  Insert: {
964
1031
  broadcast_id: string
@@ -972,9 +1039,9 @@ export type Database = {
972
1039
  message_id?: string | null
973
1040
  org_id: string
974
1041
  org_phone?: string | null
1042
+ poll_results?: Json | null
975
1043
  read_count?: number | null
976
1044
  remarks?: string | null
977
- poll_results?: Json | null
978
1045
  }
979
1046
  Update: {
980
1047
  broadcast_id?: string
@@ -988,9 +1055,9 @@ export type Database = {
988
1055
  message_id?: string | null
989
1056
  org_id?: string
990
1057
  org_phone?: string | null
1058
+ poll_results?: Json | null
991
1059
  read_count?: number | null
992
1060
  remarks?: string | null
993
- poll_results?: Json | null
994
1061
  }
995
1062
  Relationships: [
996
1063
  {
@@ -1167,6 +1234,42 @@ export type Database = {
1167
1234
  },
1168
1235
  ]
1169
1236
  }
1237
+ tbl_chat_audit_logs: {
1238
+ Row: {
1239
+ action: string | null
1240
+ chat_id: string | null
1241
+ log_id: string
1242
+ new_record: Json | null
1243
+ old_record: Json | null
1244
+ org_id: string | null
1245
+ performed_by: string | null
1246
+ timestamp: string
1247
+ type: string | null
1248
+ }
1249
+ Insert: {
1250
+ action?: string | null
1251
+ chat_id?: string | null
1252
+ log_id?: string
1253
+ new_record?: Json | null
1254
+ old_record?: Json | null
1255
+ org_id?: string | null
1256
+ performed_by?: string | null
1257
+ timestamp?: string
1258
+ type?: string | null
1259
+ }
1260
+ Update: {
1261
+ action?: string | null
1262
+ chat_id?: string | null
1263
+ log_id?: string
1264
+ new_record?: Json | null
1265
+ old_record?: Json | null
1266
+ org_id?: string | null
1267
+ performed_by?: string | null
1268
+ timestamp?: string
1269
+ type?: string | null
1270
+ }
1271
+ Relationships: []
1272
+ }
1170
1273
  tbl_chat_logs: {
1171
1274
  Row: {
1172
1275
  action: string | null
@@ -1811,6 +1914,7 @@ export type Database = {
1811
1914
  is_read_only: boolean | null
1812
1915
  latest_mention_at: string | null
1813
1916
  latest_message: Json | null
1917
+ latest_message_timestamp: string | null
1814
1918
  member_count: number | null
1815
1919
  member_unread_count: Json | null
1816
1920
  mute_expiration: number | null
@@ -1842,6 +1946,7 @@ export type Database = {
1842
1946
  is_read_only?: boolean | null
1843
1947
  latest_mention_at?: string | null
1844
1948
  latest_message?: Json | null
1949
+ latest_message_timestamp?: string | null
1845
1950
  member_count?: number | null
1846
1951
  member_unread_count?: Json | null
1847
1952
  mute_expiration?: number | null
@@ -1873,6 +1978,7 @@ export type Database = {
1873
1978
  is_read_only?: boolean | null
1874
1979
  latest_mention_at?: string | null
1875
1980
  latest_message?: Json | null
1981
+ latest_message_timestamp?: string | null
1876
1982
  member_count?: number | null
1877
1983
  member_unread_count?: Json | null
1878
1984
  mute_expiration?: number | null
@@ -2249,59 +2355,6 @@ export type Database = {
2249
2355
  },
2250
2356
  ]
2251
2357
  }
2252
- tbl_api_tokens: {
2253
- Row: {
2254
- exp: string
2255
- iat: string
2256
- id: string
2257
- is_revealed: boolean
2258
- name: string
2259
- org_id: string
2260
- refresh_token_hash: string | null
2261
- role: string
2262
- token: string
2263
- token_hash: string
2264
- token_metadata: Json
2265
- type: string
2266
- }
2267
- Insert: {
2268
- exp: string
2269
- iat: string
2270
- id: string
2271
- is_revealed?: boolean
2272
- name: string
2273
- org_id: string
2274
- refresh_token_hash?: string | null
2275
- role: string
2276
- token: string
2277
- token_hash: string
2278
- token_metadata?: Json
2279
- type: string
2280
- }
2281
- Update: {
2282
- exp?: string
2283
- iat?: string
2284
- id?: string
2285
- is_revealed?: boolean
2286
- name?: string
2287
- org_id?: string
2288
- refresh_token_hash?: string | null
2289
- role?: string
2290
- token?: string
2291
- token_hash?: string
2292
- token_metadata?: Json
2293
- type?: string
2294
- }
2295
- Relationships: [
2296
- {
2297
- foreignKeyName: "tbl_api_tokens_org_id_fkey"
2298
- columns: ["org_id"]
2299
- isOneToOne: false
2300
- referencedRelation: "tbl_org"
2301
- referencedColumns: ["org_id"]
2302
- },
2303
- ]
2304
- }
2305
2358
  tbl_integration_tokens: {
2306
2359
  Row: {
2307
2360
  exp: string
@@ -2381,51 +2434,6 @@ export type Database = {
2381
2434
  }
2382
2435
  Relationships: []
2383
2436
  }
2384
- tbl_mcp_tokens: {
2385
- Row: {
2386
- access_token_expires_at: string
2387
- access_token_hash: string
2388
- client_id: string
2389
- client_name: string | null
2390
- created_at: string
2391
- id: string
2392
- integration_token_id: string
2393
- org_id: string
2394
- phone_scopes: string[] | null
2395
- refresh_token_expires_at: string
2396
- refresh_token_hash: string
2397
- revoked_at: string | null
2398
- }
2399
- Insert: {
2400
- access_token_expires_at: string
2401
- access_token_hash: string
2402
- client_id: string
2403
- client_name?: string | null
2404
- created_at?: string
2405
- id?: string
2406
- integration_token_id: string
2407
- org_id: string
2408
- phone_scopes?: string[] | null
2409
- refresh_token_expires_at: string
2410
- refresh_token_hash: string
2411
- revoked_at?: string | null
2412
- }
2413
- Update: {
2414
- access_token_expires_at?: string
2415
- access_token_hash?: string
2416
- client_id?: string
2417
- client_name?: string | null
2418
- created_at?: string
2419
- id?: string
2420
- integration_token_id?: string
2421
- org_id?: string
2422
- phone_scopes?: string[] | null
2423
- refresh_token_expires_at?: string
2424
- refresh_token_hash?: string
2425
- revoked_at?: string | null
2426
- }
2427
- Relationships: []
2428
- }
2429
2437
  tbl_org: {
2430
2438
  Row: {
2431
2439
  ai_settings: Json | null
@@ -2628,6 +2636,8 @@ export type Database = {
2628
2636
  library: string | null
2629
2637
  org_id: string
2630
2638
  org_phone: string | null
2639
+ passkey_code: string | null
2640
+ passkey_request: Json | null
2631
2641
  phone_id: string
2632
2642
  phone_image: string | null
2633
2643
  phone_name: string | null
@@ -2653,6 +2663,8 @@ export type Database = {
2653
2663
  library?: string | null
2654
2664
  org_id: string
2655
2665
  org_phone?: string | null
2666
+ passkey_code?: string | null
2667
+ passkey_request?: Json | null
2656
2668
  phone_id?: string
2657
2669
  phone_image?: string | null
2658
2670
  phone_name?: string | null
@@ -2678,6 +2690,8 @@ export type Database = {
2678
2690
  library?: string | null
2679
2691
  org_id?: string
2680
2692
  org_phone?: string | null
2693
+ passkey_code?: string | null
2694
+ passkey_request?: Json | null
2681
2695
  phone_id?: string
2682
2696
  phone_image?: string | null
2683
2697
  phone_name?: string | null
@@ -2996,7 +3010,6 @@ export type Database = {
2996
3010
  chat_ids: string[]
2997
3011
  created_at: string
2998
3012
  delay: number | null
2999
- scheduled_id: string
3000
3013
  is_active: boolean
3001
3014
  message_payload: Json
3002
3015
  next_occurrence_at: string
@@ -3005,6 +3018,7 @@ export type Database = {
3005
3018
  org_phones: string[] | null
3006
3019
  performed_by: string | null
3007
3020
  repeat_config: Json
3021
+ scheduled_id: string
3008
3022
  updated_at: string
3009
3023
  variables: Json | null
3010
3024
  }
@@ -3012,7 +3026,6 @@ export type Database = {
3012
3026
  chat_ids: string[]
3013
3027
  created_at?: string
3014
3028
  delay?: number | null
3015
- scheduled_id?: string
3016
3029
  is_active?: boolean
3017
3030
  message_payload: Json
3018
3031
  next_occurrence_at: string
@@ -3021,6 +3034,7 @@ export type Database = {
3021
3034
  org_phones?: string[] | null
3022
3035
  performed_by?: string | null
3023
3036
  repeat_config: Json
3037
+ scheduled_id?: string
3024
3038
  updated_at?: string
3025
3039
  variables?: Json | null
3026
3040
  }
@@ -3028,7 +3042,6 @@ export type Database = {
3028
3042
  chat_ids?: string[]
3029
3043
  created_at?: string
3030
3044
  delay?: number | null
3031
- scheduled_id?: string
3032
3045
  is_active?: boolean
3033
3046
  message_payload?: Json
3034
3047
  next_occurrence_at?: string
@@ -3037,6 +3050,7 @@ export type Database = {
3037
3050
  org_phones?: string[] | null
3038
3051
  performed_by?: string | null
3039
3052
  repeat_config?: Json
3053
+ scheduled_id?: string
3040
3054
  updated_at?: string
3041
3055
  variables?: Json | null
3042
3056
  }
@@ -3048,6 +3062,20 @@ export type Database = {
3048
3062
  referencedRelation: "tbl_org"
3049
3063
  referencedColumns: ["org_id"]
3050
3064
  },
3065
+ {
3066
+ foreignKeyName: "tbl_recurring_broadcasts_org_id_fkey"
3067
+ columns: ["org_id"]
3068
+ isOneToOne: false
3069
+ referencedRelation: "view_org"
3070
+ referencedColumns: ["org_id"]
3071
+ },
3072
+ {
3073
+ foreignKeyName: "tbl_recurring_broadcasts_org_id_fkey"
3074
+ columns: ["org_id"]
3075
+ isOneToOne: false
3076
+ referencedRelation: "view_org_all"
3077
+ referencedColumns: ["org_id"]
3078
+ },
3051
3079
  ]
3052
3080
  }
3053
3081
  tbl_recurring_messages: {
@@ -3402,6 +3430,39 @@ export type Database = {
3402
3430
  },
3403
3431
  ]
3404
3432
  }
3433
+ tbl_usage_records: {
3434
+ Row: {
3435
+ amount: number
3436
+ created_at: string
3437
+ id: string
3438
+ metadata: Json | null
3439
+ org_id: string
3440
+ source: string
3441
+ transaction_type: Database["public"]["Enums"]["enum_credit_transaction_type"]
3442
+ unit_type: string
3443
+ }
3444
+ Insert: {
3445
+ amount?: number
3446
+ created_at?: string
3447
+ id?: string
3448
+ metadata?: Json | null
3449
+ org_id: string
3450
+ source: string
3451
+ transaction_type?: Database["public"]["Enums"]["enum_credit_transaction_type"]
3452
+ unit_type?: string
3453
+ }
3454
+ Update: {
3455
+ amount?: number
3456
+ created_at?: string
3457
+ id?: string
3458
+ metadata?: Json | null
3459
+ org_id?: string
3460
+ source?: string
3461
+ transaction_type?: Database["public"]["Enums"]["enum_credit_transaction_type"]
3462
+ unit_type?: string
3463
+ }
3464
+ Relationships: []
3465
+ }
3405
3466
  }
3406
3467
  Views: {
3407
3468
  view_broadcast_logs: {
@@ -3412,8 +3473,12 @@ export type Database = {
3412
3473
  | null
3413
3474
  created_at: string | null
3414
3475
  delivered_percentage: number | null
3476
+ due_at: string | null
3415
3477
  failed_chats: number | null
3478
+ is_active: boolean | null
3416
3479
  message_payload: Json | null
3480
+ next_occurrence_at: string | null
3481
+ occurrence_count: number | null
3417
3482
  org_id: string | null
3418
3483
  parent_broadcast_id: string | null
3419
3484
  pending_chats: number | null
@@ -3421,18 +3486,14 @@ export type Database = {
3421
3486
  performed_by: string | null
3422
3487
  previous_retries: Json | null
3423
3488
  read_percentage: number | null
3489
+ repeat_config: Json | null
3424
3490
  retry_count: number | null
3425
3491
  scheduled_at: string | null
3426
3492
  sent_chats: number | null
3427
- is_active: boolean | null
3428
- next_occurrence_at: string | null
3429
- occurrence_count: number | null
3430
- repeat_config: Json | null
3431
3493
  total_chats: number | null
3432
3494
  total_delivered_count: number | null
3433
3495
  total_member_count: number | null
3434
3496
  total_read_count: number | null
3435
- due_at: string | null
3436
3497
  }
3437
3498
  Relationships: [
3438
3499
  {
@@ -3522,9 +3583,11 @@ export type Database = {
3522
3583
  is_archived: boolean | null
3523
3584
  is_exited: boolean | null
3524
3585
  is_muted: boolean | null
3586
+ join_approval_mode: boolean | null
3525
3587
  label_ids: Json | null
3526
3588
  latest_mention_at: string | null
3527
3589
  latest_message: Json | null
3590
+ latest_message_timestamp: string | null
3528
3591
  member_closed_at: Json | null
3529
3592
  member_count: number | null
3530
3593
  member_unread_count: Json | null
@@ -3783,10 +3846,6 @@ export type Database = {
3783
3846
  Args: { chat_ids_input?: string[]; org_id_input: string }
3784
3847
  Returns: Json[]
3785
3848
  }
3786
- get_mcp_connections: {
3787
- Args: { org_id_input: string }
3788
- Returns: Json
3789
- }
3790
3849
  get_chat_properties_by_chat_ids: {
3791
3850
  Args: { chat_id_input?: string[]; org_id_input: string }
3792
3851
  Returns: Json
@@ -3849,22 +3908,39 @@ export type Database = {
3849
3908
  Returns: Json
3850
3909
  }
3851
3910
  get_counts: {
3852
- Args: { org_id_input: string; sync_wa_unread_count?: boolean, org_phone_input?: string[] }
3853
- Returns: Json
3854
- }
3855
- get_export_chats_data: {
3856
3911
  Args: {
3857
- chat_id_input?: string[]
3858
- chat_type_input?: string
3859
- end_date_input?: string
3860
- filter_by_input?: string
3861
- limit_input?: number
3862
- offset_input?: number
3863
3912
  org_id_input: string
3864
- start_date_input?: string
3913
+ org_phone_input?: string[]
3914
+ sync_wa_unread_count?: boolean
3865
3915
  }
3866
3916
  Returns: Json
3867
3917
  }
3918
+ get_export_chats_data:
3919
+ | {
3920
+ Args: {
3921
+ chat_id_input?: string[]
3922
+ chat_type_input?: string
3923
+ end_date_input?: string
3924
+ limit_input?: number
3925
+ offset_input?: number
3926
+ org_id_input: string
3927
+ start_date_input?: string
3928
+ }
3929
+ Returns: Json
3930
+ }
3931
+ | {
3932
+ Args: {
3933
+ chat_id_input?: string[]
3934
+ chat_type_input?: string
3935
+ end_date_input?: string
3936
+ filter_by_input?: string
3937
+ limit_input?: number
3938
+ offset_input?: number
3939
+ org_id_input: string
3940
+ start_date_input?: string
3941
+ }
3942
+ Returns: Json
3943
+ }
3868
3944
  get_export_members_data: {
3869
3945
  Args: {
3870
3946
  chat_id_input?: string[]
@@ -3897,38 +3973,34 @@ export type Database = {
3897
3973
  }
3898
3974
  Returns: Json
3899
3975
  }
3900
- get_message_rule_info: {
3901
- Args: {
3902
- chat_id_input: string
3903
- message_id_input: string
3904
- org_id_input: string
3905
- org_phone_input: string
3906
- sender_id_input: string
3907
- }
3908
- Returns: Json
3909
- }
3910
-
3911
- get_integration_data: {
3912
- Args: { org_id_input?: string }
3913
- Returns: Json
3914
- }
3976
+ get_integration_data: { Args: { org_id_input?: string }; Returns: Json }
3977
+ get_mcp_connections: { Args: { org_id_input: string }; Returns: Json }
3915
3978
  get_media_library: {
3916
3979
  Args: {
3917
- org_id_input: string
3918
- type_input: string
3919
- search_query?: string
3920
3980
  limit_input?: number
3921
3981
  offset_input?: number
3982
+ org_id_input: string
3983
+ search_query?: string
3984
+ type_input: string
3922
3985
  }
3923
3986
  Returns: {
3987
+ created_at: string
3924
3988
  id: string
3989
+ metadata: Json
3925
3990
  name: string
3926
- created_at: string
3927
3991
  updated_at: string
3928
- metadata: Json
3929
3992
  }[]
3930
3993
  }
3931
-
3994
+ get_message_rule_info: {
3995
+ Args: {
3996
+ chat_id_input: string
3997
+ message_id_input: string
3998
+ org_id_input: string
3999
+ org_phone_input: string
4000
+ sender_id_input: string
4001
+ }
4002
+ Returns: Json
4003
+ }
3932
4004
  get_message_workflow_info: {
3933
4005
  Args: {
3934
4006
  chat_id_input: string
@@ -4079,10 +4151,7 @@ export type Database = {
4079
4151
  Args: { chat_id_input?: string; org_id_input: string }
4080
4152
  Returns: undefined
4081
4153
  }
4082
- revoke_mcp_connection: {
4083
- Args: { id_input: string }
4084
- Returns: undefined
4085
- }
4154
+ revoke_mcp_connection: { Args: { id_input: string }; Returns: undefined }
4086
4155
  update_chat_properties: {
4087
4156
  Args: {
4088
4157
  chat_id_input: string[]
@@ -4122,6 +4191,7 @@ export type Database = {
4122
4191
  is_read_only: boolean | null
4123
4192
  latest_mention_at: string | null
4124
4193
  latest_message: Json | null
4194
+ latest_message_timestamp: string | null
4125
4195
  member_count: number | null
4126
4196
  member_unread_count: Json | null
4127
4197
  mute_expiration: number | null
@@ -4538,10 +4608,8 @@ export const Constants = {
4538
4608
  "zohodesk",
4539
4609
  "gsheets",
4540
4610
  "zohocrm",
4541
- "mcp",
4542
4611
  ],
4543
4612
  enum_member_role: ["admin", "member"],
4544
4613
  },
4545
4614
  },
4546
4615
  } as const
4547
-
package/src/types.ts CHANGED
@@ -1287,6 +1287,7 @@ export type MessageRuleInfoType = {
1287
1287
  >,
1288
1288
  {
1289
1289
  is_last_message: boolean;
1290
+ flagged_by: string | null;
1290
1291
  }
1291
1292
  >;
1292
1293
  };