@panorama-ai/gateway 2.31.45 → 2.31.55

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.
@@ -1343,6 +1343,76 @@ export type Database = {
1343
1343
  }
1344
1344
  ];
1345
1345
  };
1346
+ chat_uploads: {
1347
+ Row: {
1348
+ content_sha256: string;
1349
+ created_at: string;
1350
+ expires_at: string;
1351
+ file_name: string;
1352
+ id: string;
1353
+ message_id: string | null;
1354
+ mime_type: string | null;
1355
+ size_bytes: number;
1356
+ status: string;
1357
+ storage_key: string;
1358
+ team_id: string;
1359
+ updated_at: string;
1360
+ user_id: string;
1361
+ };
1362
+ Insert: {
1363
+ content_sha256: string;
1364
+ created_at?: string;
1365
+ expires_at?: string;
1366
+ file_name: string;
1367
+ id?: string;
1368
+ message_id?: string | null;
1369
+ mime_type?: string | null;
1370
+ size_bytes: number;
1371
+ status?: string;
1372
+ storage_key: string;
1373
+ team_id: string;
1374
+ updated_at?: string;
1375
+ user_id: string;
1376
+ };
1377
+ Update: {
1378
+ content_sha256?: string;
1379
+ created_at?: string;
1380
+ expires_at?: string;
1381
+ file_name?: string;
1382
+ id?: string;
1383
+ message_id?: string | null;
1384
+ mime_type?: string | null;
1385
+ size_bytes?: number;
1386
+ status?: string;
1387
+ storage_key?: string;
1388
+ team_id?: string;
1389
+ updated_at?: string;
1390
+ user_id?: string;
1391
+ };
1392
+ Relationships: [
1393
+ {
1394
+ foreignKeyName: "chat_uploads_message_id_fkey";
1395
+ columns: ["message_id"];
1396
+ isOneToOne: false;
1397
+ referencedRelation: "messages";
1398
+ referencedColumns: ["id"];
1399
+ },
1400
+ {
1401
+ foreignKeyName: "chat_uploads_message_id_fkey";
1402
+ columns: ["message_id"];
1403
+ isOneToOne: false;
1404
+ referencedRelation: "messages_for_current_user";
1405
+ referencedColumns: ["id"];
1406
+ },
1407
+ {
1408
+ foreignKeyName: "chat_uploads_team_id_fkey";
1409
+ columns: ["team_id"];
1410
+ isOneToOne: false;
1411
+ referencedRelation: "teams";
1412
+ referencedColumns: ["id"];
1413
+ }
1414
+ ];
1415
+ };
1346
1416
  context_summaries: {
1347
1417
  Row: {
1348
1418
  agent_id: string;
@@ -5545,6 +5615,56 @@ export type Database = {
5545
5615
  }
5546
5616
  ];
5547
5617
  };
5618
+ team_cost_events: {
5619
+ Row: {
5620
+ agent_id: string | null;
5621
+ breakdown: Json | null;
5622
+ category: string;
5623
+ cost_usd: number;
5624
+ created_at: string;
5625
+ id: string;
5626
+ occurred_at: string;
5627
+ quantity: number | null;
5628
+ source_id: string | null;
5629
+ team_id: string;
5630
+ unit: string | null;
5631
+ };
5632
+ Insert: {
5633
+ agent_id?: string | null;
5634
+ breakdown?: Json | null;
5635
+ category: string;
5636
+ cost_usd: number;
5637
+ created_at?: string;
5638
+ id?: string;
5639
+ occurred_at?: string;
5640
+ quantity?: number | null;
5641
+ source_id?: string | null;
5642
+ team_id: string;
5643
+ unit?: string | null;
5644
+ };
5645
+ Update: {
5646
+ agent_id?: string | null;
5647
+ breakdown?: Json | null;
5648
+ category?: string;
5649
+ cost_usd?: number;
5650
+ created_at?: string;
5651
+ id?: string;
5652
+ occurred_at?: string;
5653
+ quantity?: number | null;
5654
+ source_id?: string | null;
5655
+ team_id?: string;
5656
+ unit?: string | null;
5657
+ };
5658
+ Relationships: [
5659
+ {
5660
+ foreignKeyName: "team_cost_events_team_id_fkey";
5661
+ columns: ["team_id"];
5662
+ isOneToOne: false;
5663
+ referencedRelation: "teams";
5664
+ referencedColumns: ["id"];
5665
+ }
5666
+ ];
5667
+ };
5548
5668
  team_gateways: {
5549
5669
  Row: {
5550
5670
  capabilities: Json;
@@ -5897,6 +6017,41 @@ export type Database = {
5897
6017
  }
5898
6018
  ];
5899
6019
  };
6020
+ team_storage_meter_runs: {
6021
+ Row: {
6022
+ charge_usd: number;
6023
+ created_at: string;
6024
+ id: string;
6025
+ metered_on: string;
6026
+ stored_bytes: number;
6027
+ team_id: string;
6028
+ };
6029
+ Insert: {
6030
+ charge_usd: number;
6031
+ created_at?: string;
6032
+ id?: string;
6033
+ metered_on: string;
6034
+ stored_bytes: number;
6035
+ team_id: string;
6036
+ };
6037
+ Update: {
6038
+ charge_usd?: number;
6039
+ created_at?: string;
6040
+ id?: string;
6041
+ metered_on?: string;
6042
+ stored_bytes?: number;
6043
+ team_id?: string;
6044
+ };
6045
+ Relationships: [
6046
+ {
6047
+ foreignKeyName: "team_storage_meter_runs_team_id_fkey";
6048
+ columns: ["team_id"];
6049
+ isOneToOne: false;
6050
+ referencedRelation: "teams";
6051
+ referencedColumns: ["id"];
6052
+ }
6053
+ ];
6054
+ };
5900
6055
  team_subscription_state_transitions: {
5901
6056
  Row: {
5902
6057
  changed_at: string;
@@ -6095,7 +6250,6 @@ export type Database = {
6095
6250
  id: string;
6096
6251
  max_cost_per_hour: number | null;
6097
6252
  name: string;
6098
- storage_limit_bytes: number;
6099
6253
  updated_at: string;
6100
6254
  uses_custom_api_keys: boolean | null;
6101
6255
  };
@@ -6108,7 +6262,6 @@ export type Database = {
6108
6262
  id?: string;
6109
6263
  max_cost_per_hour?: number | null;
6110
6264
  name: string;
6111
- storage_limit_bytes?: number;
6112
6265
  updated_at?: string;
6113
6266
  uses_custom_api_keys?: boolean | null;
6114
6267
  };
@@ -6121,7 +6274,6 @@ export type Database = {
6121
6274
  id?: string;
6122
6275
  max_cost_per_hour?: number | null;
6123
6276
  name?: string;
6124
- storage_limit_bytes?: number;
6125
6277
  updated_at?: string;
6126
6278
  uses_custom_api_keys?: boolean | null;
6127
6279
  };
@@ -8365,6 +8517,12 @@ export type Database = {
8365
8517
  };
8366
8518
  Returns: number;
8367
8519
  };
8520
+ calculate_team_stored_bytes: {
8521
+ Args: {
8522
+ p_team_id: string;
8523
+ };
8524
+ Returns: number;
8525
+ };
8368
8526
  can_join_team: {
8369
8527
  Args: {
8370
8528
  p_user_email: string;
@@ -8729,6 +8887,7 @@ export type Database = {
8729
8887
  };
8730
8888
  create_channel_message: {
8731
8889
  Args: {
8890
+ p_attachment_upload_ids?: string[];
8732
8891
  p_content: string;
8733
8892
  p_conversation_id: string;
8734
8893
  p_local_id?: string;
@@ -8953,6 +9112,7 @@ export type Database = {
8953
9112
  };
8954
9113
  create_user_dm_message: {
8955
9114
  Args: {
9115
+ p_attachment_upload_ids?: string[];
8956
9116
  p_content: string;
8957
9117
  p_local_id?: string;
8958
9118
  p_metadata?: Json;
@@ -8994,6 +9154,7 @@ export type Database = {
8994
9154
  create_user_message: {
8995
9155
  Args: {
8996
9156
  p_agent_id: string;
9157
+ p_attachment_upload_ids?: string[];
8997
9158
  p_content: string;
8998
9159
  p_local_id?: string;
8999
9160
  p_metadata?: Json;
@@ -9087,6 +9248,11 @@ export type Database = {
9087
9248
  Args: {
9088
9249
  p_actual_cost: number;
9089
9250
  p_agent_id: string;
9251
+ p_breakdown?: Json;
9252
+ p_category: string;
9253
+ p_quantity?: number;
9254
+ p_source_id?: string;
9255
+ p_unit?: string;
9090
9256
  };
9091
9257
  Returns: {
9092
9258
  message: string;
@@ -9098,6 +9264,11 @@ export type Database = {
9098
9264
  Args: {
9099
9265
  p_actual_cost: number;
9100
9266
  p_agent_id: string;
9267
+ p_breakdown?: Json;
9268
+ p_category: string;
9269
+ p_quantity?: number;
9270
+ p_source_id?: string;
9271
+ p_unit?: string;
9101
9272
  };
9102
9273
  Returns: {
9103
9274
  message: string;
@@ -9119,7 +9290,13 @@ export type Database = {
9119
9290
  deduct_team_cost: {
9120
9291
  Args: {
9121
9292
  p_actual_cost: number;
9293
+ p_agent_id?: string;
9294
+ p_breakdown?: Json;
9295
+ p_category: string;
9296
+ p_quantity?: number;
9297
+ p_source_id?: string;
9122
9298
  p_team_id: string;
9299
+ p_unit?: string;
9123
9300
  };
9124
9301
  Returns: {
9125
9302
  message: string;
@@ -9301,6 +9478,13 @@ export type Database = {
9301
9478
  };
9302
9479
  Returns: string;
9303
9480
  };
9481
+ emit_chat_upload_cleanup_job: {
9482
+ Args: {
9483
+ p_run_at: string;
9484
+ p_upload_id: string;
9485
+ };
9486
+ Returns: undefined;
9487
+ };
9304
9488
  emit_drive_change_batch_resource_event: {
9305
9489
  Args: {
9306
9490
  p_batch_id: string;
@@ -9362,6 +9546,13 @@ export type Database = {
9362
9546
  isSetofReturn: false;
9363
9547
  };
9364
9548
  };
9549
+ emit_team_storage_meter_job: {
9550
+ Args: {
9551
+ p_run_at: string;
9552
+ p_team_id: string;
9553
+ };
9554
+ Returns: undefined;
9555
+ };
9365
9556
  emit_vm_gateway_runtime_change: {
9366
9557
  Args: {
9367
9558
  p_device_name?: string;
@@ -10566,11 +10757,11 @@ export type Database = {
10566
10757
  p_team_id: string;
10567
10758
  };
10568
10759
  Returns: {
10569
- bytes_remaining: number;
10760
+ drive_bytes: number;
10570
10761
  file_count: number;
10571
- storage_limit_bytes: number;
10762
+ resource_bytes: number;
10572
10763
  total_bytes: number;
10573
- usage_percent: number;
10764
+ upload_bytes: number;
10574
10765
  }[];
10575
10766
  };
10576
10767
  get_team_usage_stats: {
@@ -10929,6 +11120,7 @@ export type Database = {
10929
11120
  Args: {
10930
11121
  p_agent_id: string;
10931
11122
  p_agent_updates?: Json;
11123
+ p_cost_breakdown?: Json;
10932
11124
  p_job_id: string;
10933
11125
  p_logs: Json;
10934
11126
  p_primary_log_id?: string;
@@ -11011,6 +11203,13 @@ export type Database = {
11011
11203
  };
11012
11204
  Returns: boolean;
11013
11205
  };
11206
+ meter_team_storage: {
11207
+ Args: {
11208
+ p_rate_per_gb_month: number;
11209
+ p_team_id: string;
11210
+ };
11211
+ Returns: Json;
11212
+ };
11014
11213
  move_drive_entry: {
11015
11214
  Args: {
11016
11215
  p_actor_agent_id?: string;
@@ -11259,6 +11458,7 @@ export type Database = {
11259
11458
  Args: {
11260
11459
  p_actual_cost: number;
11261
11460
  p_agent_id: string;
11461
+ p_category?: string;
11262
11462
  p_idempotency_key: string;
11263
11463
  p_usage_record: Json;
11264
11464
  };
@@ -11819,6 +12019,18 @@ export type Database = {
11819
12019
  };
11820
12020
  Returns: Json;
11821
12021
  };
12022
+ save_stored_resource_version: {
12023
+ Args: {
12024
+ p_agent_id: string;
12025
+ p_content: string;
12026
+ p_database_schema?: Json;
12027
+ p_exclude_storage_id?: string;
12028
+ p_resource_name: string;
12029
+ p_scope?: string;
12030
+ p_team_id?: string;
12031
+ };
12032
+ Returns: string;
12033
+ };
11822
12034
  search_log_embeddings: {
11823
12035
  Args: {
11824
12036
  p_agent_id: string;
@@ -12033,6 +12245,15 @@ export type Database = {
12033
12245
  };
12034
12246
  Returns: boolean;
12035
12247
  };
12248
+ stamp_chat_upload_attachments: {
12249
+ Args: {
12250
+ p_attachment_upload_ids: string[];
12251
+ p_message_id: string;
12252
+ p_team_id: string;
12253
+ p_user_id: string;
12254
+ };
12255
+ Returns: Json;
12256
+ };
12036
12257
  switch_team: {
12037
12258
  Args: {
12038
12259
  p_team_id: string;