@periskope/types 0.6.464 → 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,56 +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
- role: string
2261
- token: string
2262
- token_hash: string
2263
- token_metadata: Json
2264
- type: Database["public"]["Enums"]["enum_integration_type"]
2265
- }
2266
- Insert: {
2267
- exp: string
2268
- iat: string
2269
- id: string
2270
- is_revealed?: boolean
2271
- name: string
2272
- org_id: string
2273
- role: string
2274
- token: string
2275
- token_hash: string
2276
- token_metadata?: Json
2277
- type: Database["public"]["Enums"]["enum_integration_type"]
2278
- }
2279
- Update: {
2280
- exp?: string
2281
- iat?: string
2282
- id?: string
2283
- is_revealed?: boolean
2284
- name?: string
2285
- org_id?: string
2286
- role?: string
2287
- token?: string
2288
- token_hash?: string
2289
- token_metadata?: Json
2290
- type?: Database["public"]["Enums"]["enum_integration_type"]
2291
- }
2292
- Relationships: [
2293
- {
2294
- foreignKeyName: "tbl_api_tokens_org_id_fkey"
2295
- columns: ["org_id"]
2296
- isOneToOne: false
2297
- referencedRelation: "tbl_org"
2298
- referencedColumns: ["org_id"]
2299
- },
2300
- ]
2301
- }
2302
2358
  tbl_integration_tokens: {
2303
2359
  Row: {
2304
2360
  exp: string
@@ -2378,51 +2434,6 @@ export type Database = {
2378
2434
  }
2379
2435
  Relationships: []
2380
2436
  }
2381
- tbl_mcp_tokens: {
2382
- Row: {
2383
- access_token_expires_at: string
2384
- access_token_hash: string
2385
- client_id: string
2386
- client_name: string | null
2387
- created_at: string
2388
- id: string
2389
- integration_token_id: string
2390
- org_id: string
2391
- phone_scopes: string[] | null
2392
- refresh_token_expires_at: string
2393
- refresh_token_hash: string
2394
- revoked_at: string | null
2395
- }
2396
- Insert: {
2397
- access_token_expires_at: string
2398
- access_token_hash: string
2399
- client_id: string
2400
- client_name?: string | null
2401
- created_at?: string
2402
- id?: string
2403
- integration_token_id: string
2404
- org_id: string
2405
- phone_scopes?: string[] | null
2406
- refresh_token_expires_at: string
2407
- refresh_token_hash: string
2408
- revoked_at?: string | null
2409
- }
2410
- Update: {
2411
- access_token_expires_at?: string
2412
- access_token_hash?: string
2413
- client_id?: string
2414
- client_name?: string | null
2415
- created_at?: string
2416
- id?: string
2417
- integration_token_id?: string
2418
- org_id?: string
2419
- phone_scopes?: string[] | null
2420
- refresh_token_expires_at?: string
2421
- refresh_token_hash?: string
2422
- revoked_at?: string | null
2423
- }
2424
- Relationships: []
2425
- }
2426
2437
  tbl_org: {
2427
2438
  Row: {
2428
2439
  ai_settings: Json | null
@@ -2625,6 +2636,8 @@ export type Database = {
2625
2636
  library: string | null
2626
2637
  org_id: string
2627
2638
  org_phone: string | null
2639
+ passkey_code: string | null
2640
+ passkey_request: Json | null
2628
2641
  phone_id: string
2629
2642
  phone_image: string | null
2630
2643
  phone_name: string | null
@@ -2650,6 +2663,8 @@ export type Database = {
2650
2663
  library?: string | null
2651
2664
  org_id: string
2652
2665
  org_phone?: string | null
2666
+ passkey_code?: string | null
2667
+ passkey_request?: Json | null
2653
2668
  phone_id?: string
2654
2669
  phone_image?: string | null
2655
2670
  phone_name?: string | null
@@ -2675,6 +2690,8 @@ export type Database = {
2675
2690
  library?: string | null
2676
2691
  org_id?: string
2677
2692
  org_phone?: string | null
2693
+ passkey_code?: string | null
2694
+ passkey_request?: Json | null
2678
2695
  phone_id?: string
2679
2696
  phone_image?: string | null
2680
2697
  phone_name?: string | null
@@ -2993,7 +3010,6 @@ export type Database = {
2993
3010
  chat_ids: string[]
2994
3011
  created_at: string
2995
3012
  delay: number | null
2996
- scheduled_id: string
2997
3013
  is_active: boolean
2998
3014
  message_payload: Json
2999
3015
  next_occurrence_at: string
@@ -3002,6 +3018,7 @@ export type Database = {
3002
3018
  org_phones: string[] | null
3003
3019
  performed_by: string | null
3004
3020
  repeat_config: Json
3021
+ scheduled_id: string
3005
3022
  updated_at: string
3006
3023
  variables: Json | null
3007
3024
  }
@@ -3009,7 +3026,6 @@ export type Database = {
3009
3026
  chat_ids: string[]
3010
3027
  created_at?: string
3011
3028
  delay?: number | null
3012
- scheduled_id?: string
3013
3029
  is_active?: boolean
3014
3030
  message_payload: Json
3015
3031
  next_occurrence_at: string
@@ -3018,6 +3034,7 @@ export type Database = {
3018
3034
  org_phones?: string[] | null
3019
3035
  performed_by?: string | null
3020
3036
  repeat_config: Json
3037
+ scheduled_id?: string
3021
3038
  updated_at?: string
3022
3039
  variables?: Json | null
3023
3040
  }
@@ -3025,7 +3042,6 @@ export type Database = {
3025
3042
  chat_ids?: string[]
3026
3043
  created_at?: string
3027
3044
  delay?: number | null
3028
- scheduled_id?: string
3029
3045
  is_active?: boolean
3030
3046
  message_payload?: Json
3031
3047
  next_occurrence_at?: string
@@ -3034,6 +3050,7 @@ export type Database = {
3034
3050
  org_phones?: string[] | null
3035
3051
  performed_by?: string | null
3036
3052
  repeat_config?: Json
3053
+ scheduled_id?: string
3037
3054
  updated_at?: string
3038
3055
  variables?: Json | null
3039
3056
  }
@@ -3045,6 +3062,20 @@ export type Database = {
3045
3062
  referencedRelation: "tbl_org"
3046
3063
  referencedColumns: ["org_id"]
3047
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
+ },
3048
3079
  ]
3049
3080
  }
3050
3081
  tbl_recurring_messages: {
@@ -3399,6 +3430,39 @@ export type Database = {
3399
3430
  },
3400
3431
  ]
3401
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
+ }
3402
3466
  }
3403
3467
  Views: {
3404
3468
  view_broadcast_logs: {
@@ -3409,8 +3473,12 @@ export type Database = {
3409
3473
  | null
3410
3474
  created_at: string | null
3411
3475
  delivered_percentage: number | null
3476
+ due_at: string | null
3412
3477
  failed_chats: number | null
3478
+ is_active: boolean | null
3413
3479
  message_payload: Json | null
3480
+ next_occurrence_at: string | null
3481
+ occurrence_count: number | null
3414
3482
  org_id: string | null
3415
3483
  parent_broadcast_id: string | null
3416
3484
  pending_chats: number | null
@@ -3418,18 +3486,14 @@ export type Database = {
3418
3486
  performed_by: string | null
3419
3487
  previous_retries: Json | null
3420
3488
  read_percentage: number | null
3489
+ repeat_config: Json | null
3421
3490
  retry_count: number | null
3422
3491
  scheduled_at: string | null
3423
3492
  sent_chats: number | null
3424
- is_active: boolean | null
3425
- next_occurrence_at: string | null
3426
- occurrence_count: number | null
3427
- repeat_config: Json | null
3428
3493
  total_chats: number | null
3429
3494
  total_delivered_count: number | null
3430
3495
  total_member_count: number | null
3431
3496
  total_read_count: number | null
3432
- due_at: string | null
3433
3497
  }
3434
3498
  Relationships: [
3435
3499
  {
@@ -3519,9 +3583,11 @@ export type Database = {
3519
3583
  is_archived: boolean | null
3520
3584
  is_exited: boolean | null
3521
3585
  is_muted: boolean | null
3586
+ join_approval_mode: boolean | null
3522
3587
  label_ids: Json | null
3523
3588
  latest_mention_at: string | null
3524
3589
  latest_message: Json | null
3590
+ latest_message_timestamp: string | null
3525
3591
  member_closed_at: Json | null
3526
3592
  member_count: number | null
3527
3593
  member_unread_count: Json | null
@@ -3780,10 +3846,6 @@ export type Database = {
3780
3846
  Args: { chat_ids_input?: string[]; org_id_input: string }
3781
3847
  Returns: Json[]
3782
3848
  }
3783
- get_mcp_connections: {
3784
- Args: { org_id_input: string }
3785
- Returns: Json
3786
- }
3787
3849
  get_chat_properties_by_chat_ids: {
3788
3850
  Args: { chat_id_input?: string[]; org_id_input: string }
3789
3851
  Returns: Json
@@ -3846,22 +3908,39 @@ export type Database = {
3846
3908
  Returns: Json
3847
3909
  }
3848
3910
  get_counts: {
3849
- Args: { org_id_input: string; sync_wa_unread_count?: boolean, org_phone_input?: string[] }
3850
- Returns: Json
3851
- }
3852
- get_export_chats_data: {
3853
3911
  Args: {
3854
- chat_id_input?: string[]
3855
- chat_type_input?: string
3856
- end_date_input?: string
3857
- filter_by_input?: string
3858
- limit_input?: number
3859
- offset_input?: number
3860
3912
  org_id_input: string
3861
- start_date_input?: string
3913
+ org_phone_input?: string[]
3914
+ sync_wa_unread_count?: boolean
3862
3915
  }
3863
3916
  Returns: Json
3864
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
+ }
3865
3944
  get_export_members_data: {
3866
3945
  Args: {
3867
3946
  chat_id_input?: string[]
@@ -3894,38 +3973,34 @@ export type Database = {
3894
3973
  }
3895
3974
  Returns: Json
3896
3975
  }
3897
- get_message_rule_info: {
3898
- Args: {
3899
- chat_id_input: string
3900
- message_id_input: string
3901
- org_id_input: string
3902
- org_phone_input: string
3903
- sender_id_input: string
3904
- }
3905
- Returns: Json
3906
- }
3907
-
3908
- get_integration_data: {
3909
- Args: { org_id_input?: string }
3910
- Returns: Json
3911
- }
3976
+ get_integration_data: { Args: { org_id_input?: string }; Returns: Json }
3977
+ get_mcp_connections: { Args: { org_id_input: string }; Returns: Json }
3912
3978
  get_media_library: {
3913
3979
  Args: {
3914
- org_id_input: string
3915
- type_input: string
3916
- search_query?: string
3917
3980
  limit_input?: number
3918
3981
  offset_input?: number
3982
+ org_id_input: string
3983
+ search_query?: string
3984
+ type_input: string
3919
3985
  }
3920
3986
  Returns: {
3987
+ created_at: string
3921
3988
  id: string
3989
+ metadata: Json
3922
3990
  name: string
3923
- created_at: string
3924
3991
  updated_at: string
3925
- metadata: Json
3926
3992
  }[]
3927
3993
  }
3928
-
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
+ }
3929
4004
  get_message_workflow_info: {
3930
4005
  Args: {
3931
4006
  chat_id_input: string
@@ -4076,10 +4151,7 @@ export type Database = {
4076
4151
  Args: { chat_id_input?: string; org_id_input: string }
4077
4152
  Returns: undefined
4078
4153
  }
4079
- revoke_mcp_connection: {
4080
- Args: { id_input: string }
4081
- Returns: undefined
4082
- }
4154
+ revoke_mcp_connection: { Args: { id_input: string }; Returns: undefined }
4083
4155
  update_chat_properties: {
4084
4156
  Args: {
4085
4157
  chat_id_input: string[]
@@ -4119,6 +4191,7 @@ export type Database = {
4119
4191
  is_read_only: boolean | null
4120
4192
  latest_mention_at: string | null
4121
4193
  latest_message: Json | null
4194
+ latest_message_timestamp: string | null
4122
4195
  member_count: number | null
4123
4196
  member_unread_count: Json | null
4124
4197
  mute_expiration: number | null
@@ -4540,4 +4613,3 @@ export const Constants = {
4540
4613
  },
4541
4614
  },
4542
4615
  } as const
4543
-
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
  };