@ai-matrx/media 0.10.3 → 0.10.4

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.
@@ -6,7 +6,7 @@
6
6
  * The host's `db` is a `SupabaseClient<FilesDatabase>`; a host typed with the
7
7
  * full platform `Database` passes its client unchanged.
8
8
  *
9
- * Schemas (15): admin, agent, ai, canvas, chat, context, dictionary, education, files, iam, platform, public, tool, ui, users
9
+ * Schemas (15): admin, agent, ai, canvas, chat, deprecated, dictionary, education, files, iam, platform, public, tool, ui, users
10
10
  */
11
11
  export type Json = unknown;
12
12
  export type FilesDatabase = {
@@ -2240,6 +2240,25 @@ export type FilesDatabase = {
2240
2240
  };
2241
2241
  Returns: Json;
2242
2242
  };
2243
+ duplicate_agent: {
2244
+ Args: {
2245
+ p_agent_id: string;
2246
+ p_as_system?: boolean;
2247
+ p_follows_source?: boolean;
2248
+ p_name?: string;
2249
+ p_organization_id?: string;
2250
+ };
2251
+ Returns: string;
2252
+ };
2253
+ duplicate_version: {
2254
+ Args: {
2255
+ p_as_system?: boolean;
2256
+ p_name?: string;
2257
+ p_organization_id?: string;
2258
+ p_version_id: string;
2259
+ };
2260
+ Returns: string;
2261
+ };
2243
2262
  message_flag_problems: {
2244
2263
  Args: never;
2245
2264
  Returns: {
@@ -4466,6 +4485,13 @@ export type FilesDatabase = {
4466
4485
  isOneToOne: false;
4467
4486
  referencedRelation: "canvas_items";
4468
4487
  referencedColumns: ["id"];
4488
+ },
4489
+ {
4490
+ foreignKeyName: "canvas_items_version_chain_same_owner";
4491
+ columns: ["user_id", "parent_canvas_id"];
4492
+ isOneToOne: false;
4493
+ referencedRelation: "canvas_items";
4494
+ referencedColumns: ["user_id", "id"];
4469
4495
  }
4470
4496
  ];
4471
4497
  };
@@ -7925,6 +7951,12 @@ export type FilesDatabase = {
7925
7951
  template_version: number;
7926
7952
  }[];
7927
7953
  };
7954
+ coding_projects_of: {
7955
+ Args: {
7956
+ p_user: string;
7957
+ };
7958
+ Returns: Json;
7959
+ };
7928
7960
  conversation_lane: {
7929
7961
  Args: {
7930
7962
  conversation_type: string;
@@ -7973,6 +8005,14 @@ export type FilesDatabase = {
7973
8005
  };
7974
8006
  Returns: unknown;
7975
8007
  };
8008
+ move_coding_conversations_to_organization: {
8009
+ Args: {
8010
+ p_conversation_ids: Json;
8011
+ p_target: string;
8012
+ p_user: string;
8013
+ };
8014
+ Returns: Json;
8015
+ };
7976
8016
  recompute_user_request_totals: {
7977
8017
  Args: {
7978
8018
  p_id?: string;
@@ -8009,73 +8049,8 @@ export type FilesDatabase = {
8009
8049
  [_ in never]: never;
8010
8050
  };
8011
8051
  };
8012
- context: {
8052
+ deprecated: {
8013
8053
  Tables: {
8014
- context_access_log: {
8015
- Row: {
8016
- accessed_at: string;
8017
- agent_id: string | null;
8018
- app_source: string | null;
8019
- char_count_served: number | null;
8020
- context_item_id: string;
8021
- created_at: string;
8022
- fetch_reason: string | null;
8023
- id: string;
8024
- latency_ms: number | null;
8025
- metadata: Json;
8026
- organization_id: string;
8027
- request_id: string | null;
8028
- user_id: string | null;
8029
- value_id: string | null;
8030
- value_version: number | null;
8031
- was_useful: boolean | null;
8032
- };
8033
- Insert: {
8034
- accessed_at?: string;
8035
- agent_id?: string | null;
8036
- app_source?: string | null;
8037
- char_count_served?: number | null;
8038
- context_item_id: string;
8039
- created_at?: string;
8040
- fetch_reason?: string | null;
8041
- id?: string;
8042
- latency_ms?: number | null;
8043
- metadata?: Json;
8044
- organization_id: string;
8045
- request_id?: string | null;
8046
- user_id?: string | null;
8047
- value_id?: string | null;
8048
- value_version?: number | null;
8049
- was_useful?: boolean | null;
8050
- };
8051
- Update: {
8052
- accessed_at?: string;
8053
- agent_id?: string | null;
8054
- app_source?: string | null;
8055
- char_count_served?: number | null;
8056
- context_item_id?: string;
8057
- created_at?: string;
8058
- fetch_reason?: string | null;
8059
- id?: string;
8060
- latency_ms?: number | null;
8061
- metadata?: Json;
8062
- organization_id?: string;
8063
- request_id?: string | null;
8064
- user_id?: string | null;
8065
- value_id?: string | null;
8066
- value_version?: number | null;
8067
- was_useful?: boolean | null;
8068
- };
8069
- Relationships: [
8070
- {
8071
- foreignKeyName: "context_access_log_value_id_fkey";
8072
- columns: ["value_id"];
8073
- isOneToOne: false;
8074
- referencedRelation: "context_item_values";
8075
- referencedColumns: ["id"];
8076
- }
8077
- ];
8078
- };
8079
8054
  context_item_values: {
8080
8055
  Row: {
8081
8056
  authored_by: string | null;
@@ -8088,6 +8063,7 @@ export type FilesDatabase = {
8088
8063
  has_nested_objects: boolean;
8089
8064
  id: string;
8090
8065
  is_current: boolean;
8066
+ metadata: Json;
8091
8067
  organization_id: string;
8092
8068
  scope_id: string;
8093
8069
  source_type: Database["public"]["Enums"]["context_source_type"];
@@ -8115,6 +8091,7 @@ export type FilesDatabase = {
8115
8091
  has_nested_objects?: boolean;
8116
8092
  id?: string;
8117
8093
  is_current?: boolean;
8094
+ metadata?: Json;
8118
8095
  organization_id: string;
8119
8096
  scope_id: string;
8120
8097
  source_type?: Database["public"]["Enums"]["context_source_type"];
@@ -8142,6 +8119,7 @@ export type FilesDatabase = {
8142
8119
  has_nested_objects?: boolean;
8143
8120
  id?: string;
8144
8121
  is_current?: boolean;
8122
+ metadata?: Json;
8145
8123
  organization_id?: string;
8146
8124
  scope_id?: string;
8147
8125
  source_type?: Database["public"]["Enums"]["context_source_type"];
@@ -8344,6 +8322,485 @@ export type FilesDatabase = {
8344
8322
  }
8345
8323
  ];
8346
8324
  };
8325
+ custom_entity_definition: {
8326
+ Row: {
8327
+ ai_exposure: string;
8328
+ allow_record_sharing: boolean;
8329
+ archived_at: string | null;
8330
+ color: string | null;
8331
+ created_at: string;
8332
+ created_by: string | null;
8333
+ custom_fields: Json;
8334
+ deleted_at: string | null;
8335
+ description: string | null;
8336
+ icon: string | null;
8337
+ id: string;
8338
+ is_searchable: boolean;
8339
+ max_fields: number | null;
8340
+ max_records: number | null;
8341
+ metadata: Json;
8342
+ name: string;
8343
+ name_plural: string;
8344
+ organization_id: string;
8345
+ published_to_web: boolean;
8346
+ published_to_web_at: string | null;
8347
+ published_to_web_by: string | null;
8348
+ record_name_backfill_done: number;
8349
+ record_name_backfill_error: string | null;
8350
+ record_name_backfill_state: string;
8351
+ record_name_template: string | null;
8352
+ sensitivity_tier: string;
8353
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8354
+ slug: string;
8355
+ updated_at: string;
8356
+ updated_by: string | null;
8357
+ validation_mode: string;
8358
+ version: number;
8359
+ visibility: Database["platform"]["Enums"]["visibility"];
8360
+ };
8361
+ Insert: {
8362
+ ai_exposure?: string;
8363
+ allow_record_sharing?: boolean;
8364
+ archived_at?: string | null;
8365
+ color?: string | null;
8366
+ created_at?: string;
8367
+ created_by?: string | null;
8368
+ custom_fields?: Json;
8369
+ deleted_at?: string | null;
8370
+ description?: string | null;
8371
+ icon?: string | null;
8372
+ id?: string;
8373
+ is_searchable?: boolean;
8374
+ max_fields?: number | null;
8375
+ max_records?: number | null;
8376
+ metadata?: Json;
8377
+ name: string;
8378
+ name_plural: string;
8379
+ organization_id: string;
8380
+ published_to_web?: boolean;
8381
+ published_to_web_at?: string | null;
8382
+ published_to_web_by?: string | null;
8383
+ record_name_backfill_done?: number;
8384
+ record_name_backfill_error?: string | null;
8385
+ record_name_backfill_state?: string;
8386
+ record_name_template?: string | null;
8387
+ sensitivity_tier?: string;
8388
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8389
+ slug: string;
8390
+ updated_at?: string;
8391
+ updated_by?: string | null;
8392
+ validation_mode?: string;
8393
+ version?: number;
8394
+ visibility?: Database["platform"]["Enums"]["visibility"];
8395
+ };
8396
+ Update: {
8397
+ ai_exposure?: string;
8398
+ allow_record_sharing?: boolean;
8399
+ archived_at?: string | null;
8400
+ color?: string | null;
8401
+ created_at?: string;
8402
+ created_by?: string | null;
8403
+ custom_fields?: Json;
8404
+ deleted_at?: string | null;
8405
+ description?: string | null;
8406
+ icon?: string | null;
8407
+ id?: string;
8408
+ is_searchable?: boolean;
8409
+ max_fields?: number | null;
8410
+ max_records?: number | null;
8411
+ metadata?: Json;
8412
+ name?: string;
8413
+ name_plural?: string;
8414
+ organization_id?: string;
8415
+ published_to_web?: boolean;
8416
+ published_to_web_at?: string | null;
8417
+ published_to_web_by?: string | null;
8418
+ record_name_backfill_done?: number;
8419
+ record_name_backfill_error?: string | null;
8420
+ record_name_backfill_state?: string;
8421
+ record_name_template?: string | null;
8422
+ sensitivity_tier?: string;
8423
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8424
+ slug?: string;
8425
+ updated_at?: string;
8426
+ updated_by?: string | null;
8427
+ validation_mode?: string;
8428
+ version?: number;
8429
+ visibility?: Database["platform"]["Enums"]["visibility"];
8430
+ };
8431
+ Relationships: [];
8432
+ };
8433
+ custom_record: {
8434
+ Row: {
8435
+ created_at: string;
8436
+ created_by: string | null;
8437
+ custom_fields: Json;
8438
+ data: Json;
8439
+ deleted_at: string | null;
8440
+ entity_definition_id: string;
8441
+ external_key: string | null;
8442
+ id: string;
8443
+ metadata: Json;
8444
+ organization_id: string;
8445
+ record_name: string | null;
8446
+ search_vector: unknown;
8447
+ updated_at: string;
8448
+ updated_by: string | null;
8449
+ version: number;
8450
+ };
8451
+ Insert: {
8452
+ created_at?: string;
8453
+ created_by?: string | null;
8454
+ custom_fields?: Json;
8455
+ data?: Json;
8456
+ deleted_at?: string | null;
8457
+ entity_definition_id: string;
8458
+ external_key?: string | null;
8459
+ id?: string;
8460
+ metadata?: Json;
8461
+ organization_id: string;
8462
+ record_name?: string | null;
8463
+ search_vector?: unknown;
8464
+ updated_at?: string;
8465
+ updated_by?: string | null;
8466
+ version?: number;
8467
+ };
8468
+ Update: {
8469
+ created_at?: string;
8470
+ created_by?: string | null;
8471
+ custom_fields?: Json;
8472
+ data?: Json;
8473
+ deleted_at?: string | null;
8474
+ entity_definition_id?: string;
8475
+ external_key?: string | null;
8476
+ id?: string;
8477
+ metadata?: Json;
8478
+ organization_id?: string;
8479
+ record_name?: string | null;
8480
+ search_vector?: unknown;
8481
+ updated_at?: string;
8482
+ updated_by?: string | null;
8483
+ version?: number;
8484
+ };
8485
+ Relationships: [
8486
+ {
8487
+ foreignKeyName: "custom_record_entity_definition_id_fkey";
8488
+ columns: ["entity_definition_id"];
8489
+ isOneToOne: false;
8490
+ referencedRelation: "custom_entity_definition";
8491
+ referencedColumns: ["id"];
8492
+ }
8493
+ ];
8494
+ };
8495
+ flexible_data: {
8496
+ Row: {
8497
+ category_id: string | null;
8498
+ created_at: string;
8499
+ created_by: string | null;
8500
+ custom_fields: Json;
8501
+ data: Json;
8502
+ deleted_at: string | null;
8503
+ id: string;
8504
+ label: string;
8505
+ metadata: Json;
8506
+ organization_id: string;
8507
+ published_to_web: boolean;
8508
+ published_to_web_at: string | null;
8509
+ published_to_web_by: string | null;
8510
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8511
+ slug: string | null;
8512
+ updated_at: string;
8513
+ updated_by: string | null;
8514
+ version: number;
8515
+ visibility: Database["platform"]["Enums"]["visibility"];
8516
+ };
8517
+ Insert: {
8518
+ category_id?: string | null;
8519
+ created_at?: string;
8520
+ created_by?: string | null;
8521
+ custom_fields?: Json;
8522
+ data?: Json;
8523
+ deleted_at?: string | null;
8524
+ id?: string;
8525
+ label: string;
8526
+ metadata?: Json;
8527
+ organization_id: string;
8528
+ published_to_web?: boolean;
8529
+ published_to_web_at?: string | null;
8530
+ published_to_web_by?: string | null;
8531
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8532
+ slug?: string | null;
8533
+ updated_at?: string;
8534
+ updated_by?: string | null;
8535
+ version?: number;
8536
+ visibility?: Database["platform"]["Enums"]["visibility"];
8537
+ };
8538
+ Update: {
8539
+ category_id?: string | null;
8540
+ created_at?: string;
8541
+ created_by?: string | null;
8542
+ custom_fields?: Json;
8543
+ data?: Json;
8544
+ deleted_at?: string | null;
8545
+ id?: string;
8546
+ label?: string;
8547
+ metadata?: Json;
8548
+ organization_id?: string;
8549
+ published_to_web?: boolean;
8550
+ published_to_web_at?: string | null;
8551
+ published_to_web_by?: string | null;
8552
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8553
+ slug?: string | null;
8554
+ updated_at?: string;
8555
+ updated_by?: string | null;
8556
+ version?: number;
8557
+ visibility?: Database["platform"]["Enums"]["visibility"];
8558
+ };
8559
+ Relationships: [];
8560
+ };
8561
+ pb_claim_appeals_fd31de: {
8562
+ Row: {
8563
+ claim_id: string;
8564
+ created_at: string;
8565
+ created_by: string | null;
8566
+ custom_fields: Json;
8567
+ deleted_at: string | null;
8568
+ filed_on: string | null;
8569
+ id: string;
8570
+ metadata: Json;
8571
+ organization_id: string;
8572
+ published_to_web: boolean;
8573
+ published_to_web_at: string | null;
8574
+ published_to_web_by: string | null;
8575
+ reason: string;
8576
+ updated_at: string;
8577
+ updated_by: string | null;
8578
+ version: number;
8579
+ visibility: Database["platform"]["Enums"]["visibility"];
8580
+ };
8581
+ Insert: {
8582
+ claim_id: string;
8583
+ created_at?: string;
8584
+ created_by?: string | null;
8585
+ custom_fields?: Json;
8586
+ deleted_at?: string | null;
8587
+ filed_on?: string | null;
8588
+ id?: string;
8589
+ metadata?: Json;
8590
+ organization_id: string;
8591
+ published_to_web?: boolean;
8592
+ published_to_web_at?: string | null;
8593
+ published_to_web_by?: string | null;
8594
+ reason: string;
8595
+ updated_at?: string;
8596
+ updated_by?: string | null;
8597
+ version?: number;
8598
+ visibility?: Database["platform"]["Enums"]["visibility"];
8599
+ };
8600
+ Update: {
8601
+ claim_id?: string;
8602
+ created_at?: string;
8603
+ created_by?: string | null;
8604
+ custom_fields?: Json;
8605
+ deleted_at?: string | null;
8606
+ filed_on?: string | null;
8607
+ id?: string;
8608
+ metadata?: Json;
8609
+ organization_id?: string;
8610
+ published_to_web?: boolean;
8611
+ published_to_web_at?: string | null;
8612
+ published_to_web_by?: string | null;
8613
+ reason?: string;
8614
+ updated_at?: string;
8615
+ updated_by?: string | null;
8616
+ version?: number;
8617
+ visibility?: Database["platform"]["Enums"]["visibility"];
8618
+ };
8619
+ Relationships: [];
8620
+ };
8621
+ pb_insurance_claims_fd31de: {
8622
+ Row: {
8623
+ billed_cents: number | null;
8624
+ carrier: string;
8625
+ created_at: string;
8626
+ created_by: string | null;
8627
+ custom_fields: Json;
8628
+ deleted_at: string | null;
8629
+ id: string;
8630
+ metadata: Json;
8631
+ organization_id: string;
8632
+ published_to_web: boolean;
8633
+ published_to_web_at: string | null;
8634
+ published_to_web_by: string | null;
8635
+ status: string | null;
8636
+ updated_at: string;
8637
+ updated_by: string | null;
8638
+ version: number;
8639
+ visibility: Database["platform"]["Enums"]["visibility"];
8640
+ };
8641
+ Insert: {
8642
+ billed_cents?: number | null;
8643
+ carrier: string;
8644
+ created_at?: string;
8645
+ created_by?: string | null;
8646
+ custom_fields?: Json;
8647
+ deleted_at?: string | null;
8648
+ id?: string;
8649
+ metadata?: Json;
8650
+ organization_id: string;
8651
+ published_to_web?: boolean;
8652
+ published_to_web_at?: string | null;
8653
+ published_to_web_by?: string | null;
8654
+ status?: string | null;
8655
+ updated_at?: string;
8656
+ updated_by?: string | null;
8657
+ version?: number;
8658
+ visibility?: Database["platform"]["Enums"]["visibility"];
8659
+ };
8660
+ Update: {
8661
+ billed_cents?: number | null;
8662
+ carrier?: string;
8663
+ created_at?: string;
8664
+ created_by?: string | null;
8665
+ custom_fields?: Json;
8666
+ deleted_at?: string | null;
8667
+ id?: string;
8668
+ metadata?: Json;
8669
+ organization_id?: string;
8670
+ published_to_web?: boolean;
8671
+ published_to_web_at?: string | null;
8672
+ published_to_web_by?: string | null;
8673
+ status?: string | null;
8674
+ updated_at?: string;
8675
+ updated_by?: string | null;
8676
+ version?: number;
8677
+ visibility?: Database["platform"]["Enums"]["visibility"];
8678
+ };
8679
+ Relationships: [];
8680
+ };
8681
+ provlock_recall_visits_all8u5: {
8682
+ Row: {
8683
+ booked: boolean | null;
8684
+ created_at: string;
8685
+ created_by: string | null;
8686
+ custom_fields: Json;
8687
+ deleted_at: string | null;
8688
+ due_on: string | null;
8689
+ id: string;
8690
+ metadata: Json;
8691
+ organization_id: string;
8692
+ patient_ref: string;
8693
+ published_to_web: boolean;
8694
+ published_to_web_at: string | null;
8695
+ published_to_web_by: string | null;
8696
+ updated_at: string;
8697
+ updated_by: string | null;
8698
+ version: number;
8699
+ visibility: Database["platform"]["Enums"]["visibility"];
8700
+ };
8701
+ Insert: {
8702
+ booked?: boolean | null;
8703
+ created_at?: string;
8704
+ created_by?: string | null;
8705
+ custom_fields?: Json;
8706
+ deleted_at?: string | null;
8707
+ due_on?: string | null;
8708
+ id?: string;
8709
+ metadata?: Json;
8710
+ organization_id: string;
8711
+ patient_ref: string;
8712
+ published_to_web?: boolean;
8713
+ published_to_web_at?: string | null;
8714
+ published_to_web_by?: string | null;
8715
+ updated_at?: string;
8716
+ updated_by?: string | null;
8717
+ version?: number;
8718
+ visibility?: Database["platform"]["Enums"]["visibility"];
8719
+ };
8720
+ Update: {
8721
+ booked?: boolean | null;
8722
+ created_at?: string;
8723
+ created_by?: string | null;
8724
+ custom_fields?: Json;
8725
+ deleted_at?: string | null;
8726
+ due_on?: string | null;
8727
+ id?: string;
8728
+ metadata?: Json;
8729
+ organization_id?: string;
8730
+ patient_ref?: string;
8731
+ published_to_web?: boolean;
8732
+ published_to_web_at?: string | null;
8733
+ published_to_web_by?: string | null;
8734
+ updated_at?: string;
8735
+ updated_by?: string | null;
8736
+ version?: number;
8737
+ visibility?: Database["platform"]["Enums"]["visibility"];
8738
+ };
8739
+ Relationships: [];
8740
+ };
8741
+ rag_library_docs_bodies: {
8742
+ Row: {
8743
+ archived_at: string | null;
8744
+ body: string | null;
8745
+ body_hash: string | null;
8746
+ id: string;
8747
+ processed_document_id: string | null;
8748
+ title: string | null;
8749
+ };
8750
+ Insert: {
8751
+ archived_at?: string | null;
8752
+ body?: string | null;
8753
+ body_hash?: string | null;
8754
+ id: string;
8755
+ processed_document_id?: string | null;
8756
+ title?: string | null;
8757
+ };
8758
+ Update: {
8759
+ archived_at?: string | null;
8760
+ body?: string | null;
8761
+ body_hash?: string | null;
8762
+ id?: string;
8763
+ processed_document_id?: string | null;
8764
+ title?: string | null;
8765
+ };
8766
+ Relationships: [];
8767
+ };
8768
+ research_rs_content_bodies: {
8769
+ Row: {
8770
+ archived_at: string;
8771
+ content: string;
8772
+ content_hash: string | null;
8773
+ content_type: string | null;
8774
+ id: string;
8775
+ is_current: boolean | null;
8776
+ processed_document_id: string;
8777
+ source_id: string | null;
8778
+ topic_id: string | null;
8779
+ };
8780
+ Insert: {
8781
+ archived_at?: string;
8782
+ content: string;
8783
+ content_hash?: string | null;
8784
+ content_type?: string | null;
8785
+ id: string;
8786
+ is_current?: boolean | null;
8787
+ processed_document_id: string;
8788
+ source_id?: string | null;
8789
+ topic_id?: string | null;
8790
+ };
8791
+ Update: {
8792
+ archived_at?: string;
8793
+ content?: string;
8794
+ content_hash?: string | null;
8795
+ content_type?: string | null;
8796
+ id?: string;
8797
+ is_current?: boolean | null;
8798
+ processed_document_id?: string;
8799
+ source_id?: string | null;
8800
+ topic_id?: string | null;
8801
+ };
8802
+ Relationships: [];
8803
+ };
8347
8804
  scope_dataset_instances: {
8348
8805
  Row: {
8349
8806
  context_item_id: string;
@@ -8384,28 +8841,15 @@ export type FilesDatabase = {
8384
8841
  template_id?: string;
8385
8842
  template_version?: number;
8386
8843
  };
8387
- Relationships: [];
8388
- };
8389
- scope_door_registry: {
8390
- Row: {
8391
- door_class: string;
8392
- function_name: string;
8393
- reason: string;
8394
- reviewed_at: string;
8395
- };
8396
- Insert: {
8397
- door_class: string;
8398
- function_name: string;
8399
- reason: string;
8400
- reviewed_at?: string;
8401
- };
8402
- Update: {
8403
- door_class?: string;
8404
- function_name?: string;
8405
- reason?: string;
8406
- reviewed_at?: string;
8407
- };
8408
- Relationships: [];
8844
+ Relationships: [
8845
+ {
8846
+ foreignKeyName: "scope_dataset_instances_dataset_id_fkey";
8847
+ columns: ["dataset_id"];
8848
+ isOneToOne: true;
8849
+ referencedRelation: "udt_datasets";
8850
+ referencedColumns: ["id"];
8851
+ }
8852
+ ];
8409
8853
  };
8410
8854
  scope_types: {
8411
8855
  Row: {
@@ -8574,462 +9018,707 @@ export type FilesDatabase = {
8574
9018
  }
8575
9019
  ];
8576
9020
  };
8577
- system_context_item: {
9021
+ udt_dataset_fields: {
8578
9022
  Row: {
8579
9023
  created_at: string;
8580
9024
  created_by: string | null;
9025
+ custom_fields: Json;
9026
+ data_type: Database["public"]["Enums"]["field_data_type"];
9027
+ default_value: Json | null;
8581
9028
  deleted_at: string | null;
8582
- description: string | null;
8583
9029
  display_name: string;
8584
- feed_config: Json;
8585
- feed_error: string | null;
8586
- feed_status: string | null;
8587
- feed_type: Database["public"]["Enums"]["context_feed_type"];
9030
+ field_name: string;
9031
+ field_order: number;
8588
9032
  id: string;
8589
- is_active: boolean;
8590
- item_class: string;
8591
- key: string;
8592
- last_fed_at: string | null;
9033
+ is_public: boolean;
9034
+ is_required: boolean;
8593
9035
  metadata: Json;
8594
9036
  organization_id: string;
8595
- published_to_web: boolean;
8596
- published_to_web_at: string | null;
8597
- published_to_web_by: string | null;
8598
- sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8599
- shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8600
- sort_order: number;
9037
+ table_id: string;
8601
9038
  updated_at: string;
8602
9039
  updated_by: string | null;
8603
- value: Json | null;
8604
- value_type: Database["public"]["Enums"]["context_value_type"];
9040
+ user_id: string;
9041
+ validation_rules: Json | null;
8605
9042
  version: number;
8606
- visibility: Database["platform"]["Enums"]["visibility"];
8607
9043
  };
8608
9044
  Insert: {
8609
9045
  created_at?: string;
8610
9046
  created_by?: string | null;
9047
+ custom_fields?: Json;
9048
+ data_type?: Database["public"]["Enums"]["field_data_type"];
9049
+ default_value?: Json | null;
8611
9050
  deleted_at?: string | null;
8612
- description?: string | null;
8613
9051
  display_name: string;
8614
- feed_config?: Json;
8615
- feed_error?: string | null;
8616
- feed_status?: string | null;
8617
- feed_type?: Database["public"]["Enums"]["context_feed_type"];
9052
+ field_name: string;
9053
+ field_order?: number;
8618
9054
  id?: string;
8619
- is_active?: boolean;
8620
- item_class?: string;
8621
- key: string;
8622
- last_fed_at?: string | null;
9055
+ is_public?: boolean;
9056
+ is_required?: boolean;
8623
9057
  metadata?: Json;
8624
9058
  organization_id: string;
8625
- published_to_web?: boolean;
8626
- published_to_web_at?: string | null;
8627
- published_to_web_by?: string | null;
8628
- sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8629
- shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8630
- sort_order?: number;
9059
+ table_id: string;
8631
9060
  updated_at?: string;
8632
9061
  updated_by?: string | null;
8633
- value?: Json | null;
8634
- value_type?: Database["public"]["Enums"]["context_value_type"];
9062
+ user_id: string;
9063
+ validation_rules?: Json | null;
8635
9064
  version?: number;
8636
- visibility?: Database["platform"]["Enums"]["visibility"];
8637
9065
  };
8638
9066
  Update: {
8639
9067
  created_at?: string;
8640
9068
  created_by?: string | null;
9069
+ custom_fields?: Json;
9070
+ data_type?: Database["public"]["Enums"]["field_data_type"];
9071
+ default_value?: Json | null;
8641
9072
  deleted_at?: string | null;
8642
- description?: string | null;
8643
9073
  display_name?: string;
8644
- feed_config?: Json;
8645
- feed_error?: string | null;
8646
- feed_status?: string | null;
8647
- feed_type?: Database["public"]["Enums"]["context_feed_type"];
9074
+ field_name?: string;
9075
+ field_order?: number;
8648
9076
  id?: string;
8649
- is_active?: boolean;
8650
- item_class?: string;
8651
- key?: string;
8652
- last_fed_at?: string | null;
9077
+ is_public?: boolean;
9078
+ is_required?: boolean;
8653
9079
  metadata?: Json;
8654
9080
  organization_id?: string;
8655
- published_to_web?: boolean;
8656
- published_to_web_at?: string | null;
8657
- published_to_web_by?: string | null;
8658
- sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8659
- shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8660
- sort_order?: number;
9081
+ table_id?: string;
8661
9082
  updated_at?: string;
8662
9083
  updated_by?: string | null;
8663
- value?: Json | null;
8664
- value_type?: Database["public"]["Enums"]["context_value_type"];
9084
+ user_id?: string;
9085
+ validation_rules?: Json | null;
8665
9086
  version?: number;
8666
- visibility?: Database["platform"]["Enums"]["visibility"];
9087
+ };
9088
+ Relationships: [
9089
+ {
9090
+ foreignKeyName: "udt_dataset_fields_dataset_id_fkey";
9091
+ columns: ["table_id"];
9092
+ isOneToOne: false;
9093
+ referencedRelation: "udt_datasets";
9094
+ referencedColumns: ["id"];
9095
+ }
9096
+ ];
9097
+ };
9098
+ udt_dataset_row_versions: {
9099
+ Row: {
9100
+ change_kind: Database["public"]["Enums"]["row_change_kind"];
9101
+ changed_at: string;
9102
+ changed_by: string | null;
9103
+ custom_fields: Json;
9104
+ data: Json | null;
9105
+ id: number;
9106
+ prior_data: Json | null;
9107
+ reason: string | null;
9108
+ row_id: string;
9109
+ table_id: string;
9110
+ };
9111
+ Insert: {
9112
+ change_kind: Database["public"]["Enums"]["row_change_kind"];
9113
+ changed_at?: string;
9114
+ changed_by?: string | null;
9115
+ custom_fields?: Json;
9116
+ data?: Json | null;
9117
+ id?: number;
9118
+ prior_data?: Json | null;
9119
+ reason?: string | null;
9120
+ row_id: string;
9121
+ table_id: string;
9122
+ };
9123
+ Update: {
9124
+ change_kind?: Database["public"]["Enums"]["row_change_kind"];
9125
+ changed_at?: string;
9126
+ changed_by?: string | null;
9127
+ custom_fields?: Json;
9128
+ data?: Json | null;
9129
+ id?: number;
9130
+ prior_data?: Json | null;
9131
+ reason?: string | null;
9132
+ row_id?: string;
9133
+ table_id?: string;
8667
9134
  };
8668
9135
  Relationships: [];
8669
9136
  };
8670
- template_context_items: {
9137
+ udt_dataset_rows: {
8671
9138
  Row: {
8672
9139
  created_at: string;
9140
+ created_by: string | null;
9141
+ custom_fields: Json;
9142
+ data: Json;
8673
9143
  deleted_at: string | null;
8674
- description: string;
8675
- display_name: string;
8676
9144
  id: string;
8677
- key: string;
9145
+ is_public: boolean;
8678
9146
  metadata: Json;
8679
- sort_order: number;
8680
- template_scope_type_id: string;
8681
- value_type: Database["public"]["Enums"]["context_value_type"];
9147
+ organization_id: string;
9148
+ source_row_ref: string | null;
9149
+ table_id: string;
9150
+ updated_at: string;
9151
+ updated_by: string | null;
9152
+ user_id: string;
9153
+ version: number;
8682
9154
  };
8683
9155
  Insert: {
8684
9156
  created_at?: string;
9157
+ created_by?: string | null;
9158
+ custom_fields?: Json;
9159
+ data: Json;
8685
9160
  deleted_at?: string | null;
8686
- description?: string;
8687
- display_name: string;
8688
9161
  id?: string;
8689
- key: string;
9162
+ is_public?: boolean;
8690
9163
  metadata?: Json;
8691
- sort_order?: number;
8692
- template_scope_type_id: string;
8693
- value_type?: Database["public"]["Enums"]["context_value_type"];
9164
+ organization_id: string;
9165
+ source_row_ref?: string | null;
9166
+ table_id: string;
9167
+ updated_at?: string;
9168
+ updated_by?: string | null;
9169
+ user_id: string;
9170
+ version?: number;
8694
9171
  };
8695
9172
  Update: {
8696
9173
  created_at?: string;
9174
+ created_by?: string | null;
9175
+ custom_fields?: Json;
9176
+ data?: Json;
8697
9177
  deleted_at?: string | null;
8698
- description?: string;
8699
- display_name?: string;
8700
9178
  id?: string;
8701
- key?: string;
9179
+ is_public?: boolean;
8702
9180
  metadata?: Json;
8703
- sort_order?: number;
8704
- template_scope_type_id?: string;
8705
- value_type?: Database["public"]["Enums"]["context_value_type"];
9181
+ organization_id?: string;
9182
+ source_row_ref?: string | null;
9183
+ table_id?: string;
9184
+ updated_at?: string;
9185
+ updated_by?: string | null;
9186
+ user_id?: string;
9187
+ version?: number;
8706
9188
  };
8707
9189
  Relationships: [
8708
9190
  {
8709
- foreignKeyName: "ctx_template_context_items_template_scope_type_id_fkey";
8710
- columns: ["template_scope_type_id"];
9191
+ foreignKeyName: "udt_dataset_rows_dataset_id_fkey";
9192
+ columns: ["table_id"];
8711
9193
  isOneToOne: false;
8712
- referencedRelation: "template_scope_types";
9194
+ referencedRelation: "udt_datasets";
8713
9195
  referencedColumns: ["id"];
8714
9196
  }
8715
9197
  ];
8716
9198
  };
8717
- template_scope_types: {
9199
+ udt_dataset_template_fields: {
8718
9200
  Row: {
8719
9201
  created_at: string;
8720
- deleted_at: string | null;
8721
- description: string;
8722
- icon: string;
9202
+ custom_fields: Json;
9203
+ data_type: Database["public"]["Enums"]["field_data_type"];
9204
+ default_value: Json | null;
9205
+ display_name: string;
9206
+ field_name: string;
9207
+ field_order: number;
8723
9208
  id: string;
8724
- key: string;
8725
- label_plural: string;
8726
- label_singular: string;
8727
- max_assignments_per_entity: number | null;
9209
+ is_required: boolean;
8728
9210
  metadata: Json;
8729
- parent_template_type_id: string | null;
8730
- sort_order: number;
9211
+ organization_id: string;
8731
9212
  template_id: string;
9213
+ updated_at: string;
9214
+ validation_rules: Json | null;
8732
9215
  };
8733
9216
  Insert: {
8734
9217
  created_at?: string;
8735
- deleted_at?: string | null;
8736
- description?: string;
8737
- icon?: string;
9218
+ custom_fields?: Json;
9219
+ data_type?: Database["public"]["Enums"]["field_data_type"];
9220
+ default_value?: Json | null;
9221
+ display_name: string;
9222
+ field_name: string;
9223
+ field_order?: number;
8738
9224
  id?: string;
8739
- key: string;
8740
- label_plural: string;
8741
- label_singular: string;
8742
- max_assignments_per_entity?: number | null;
9225
+ is_required?: boolean;
8743
9226
  metadata?: Json;
8744
- parent_template_type_id?: string | null;
8745
- sort_order?: number;
9227
+ organization_id: string;
8746
9228
  template_id: string;
9229
+ updated_at?: string;
9230
+ validation_rules?: Json | null;
8747
9231
  };
8748
9232
  Update: {
8749
9233
  created_at?: string;
8750
- deleted_at?: string | null;
8751
- description?: string;
8752
- icon?: string;
9234
+ custom_fields?: Json;
9235
+ data_type?: Database["public"]["Enums"]["field_data_type"];
9236
+ default_value?: Json | null;
9237
+ display_name?: string;
9238
+ field_name?: string;
9239
+ field_order?: number;
8753
9240
  id?: string;
8754
- key?: string;
8755
- label_plural?: string;
8756
- label_singular?: string;
8757
- max_assignments_per_entity?: number | null;
9241
+ is_required?: boolean;
8758
9242
  metadata?: Json;
8759
- parent_template_type_id?: string | null;
8760
- sort_order?: number;
9243
+ organization_id?: string;
8761
9244
  template_id?: string;
9245
+ updated_at?: string;
9246
+ validation_rules?: Json | null;
8762
9247
  };
8763
9248
  Relationships: [
8764
9249
  {
8765
- foreignKeyName: "ctx_template_scope_types_parent_template_type_id_fkey";
8766
- columns: ["parent_template_type_id"];
8767
- isOneToOne: false;
8768
- referencedRelation: "template_scope_types";
8769
- referencedColumns: ["id"];
8770
- },
8771
- {
8772
- foreignKeyName: "ctx_template_scope_types_template_id_fkey";
9250
+ foreignKeyName: "udt_dataset_template_fields_template_id_fkey";
8773
9251
  columns: ["template_id"];
8774
9252
  isOneToOne: false;
8775
- referencedRelation: "templates";
9253
+ referencedRelation: "udt_dataset_templates";
8776
9254
  referencedColumns: ["id"];
8777
9255
  }
8778
9256
  ];
8779
9257
  };
8780
- templates: {
9258
+ udt_dataset_templates: {
8781
9259
  Row: {
8782
- audience: string;
8783
- category: string;
8784
9260
  created_at: string;
9261
+ created_by: string | null;
9262
+ custom_fields: Json;
8785
9263
  deleted_at: string | null;
8786
9264
  description: string;
8787
- icon: string;
8788
9265
  id: string;
8789
9266
  is_active: boolean;
8790
- key: string;
8791
9267
  metadata: Json;
8792
9268
  name: string;
8793
- sort_order: number;
9269
+ organization_id: string;
8794
9270
  updated_at: string;
9271
+ updated_by: string | null;
9272
+ version: number;
8795
9273
  };
8796
9274
  Insert: {
8797
- audience?: string;
8798
- category: string;
8799
9275
  created_at?: string;
9276
+ created_by?: string | null;
9277
+ custom_fields?: Json;
8800
9278
  deleted_at?: string | null;
8801
9279
  description?: string;
8802
- icon?: string;
8803
9280
  id?: string;
8804
9281
  is_active?: boolean;
8805
- key: string;
8806
9282
  metadata?: Json;
8807
9283
  name: string;
8808
- sort_order?: number;
9284
+ organization_id: string;
8809
9285
  updated_at?: string;
9286
+ updated_by?: string | null;
9287
+ version?: number;
8810
9288
  };
8811
9289
  Update: {
8812
- audience?: string;
8813
- category?: string;
8814
9290
  created_at?: string;
9291
+ created_by?: string | null;
9292
+ custom_fields?: Json;
8815
9293
  deleted_at?: string | null;
8816
9294
  description?: string;
8817
- icon?: string;
8818
9295
  id?: string;
8819
9296
  is_active?: boolean;
8820
- key?: string;
8821
9297
  metadata?: Json;
8822
9298
  name?: string;
8823
- sort_order?: number;
9299
+ organization_id?: string;
8824
9300
  updated_at?: string;
9301
+ updated_by?: string | null;
9302
+ version?: number;
8825
9303
  };
8826
9304
  Relationships: [];
8827
9305
  };
8828
- user_active_context: {
9306
+ udt_datasets: {
8829
9307
  Row: {
8830
- active_entity_id: string | null;
8831
- active_entity_type: string | null;
8832
- app_source: string;
8833
9308
  created_at: string;
8834
- created_by: string | null;
9309
+ created_by: string;
8835
9310
  custom_fields: Json;
9311
+ deleted_at: string | null;
9312
+ description: string | null;
8836
9313
  id: string;
8837
- last_activity: string;
9314
+ is_public: boolean;
8838
9315
  metadata: Json;
8839
9316
  organization_id: string;
8840
9317
  project_id: string | null;
9318
+ published_to_web: boolean;
9319
+ published_to_web_at: string | null;
9320
+ published_to_web_by: string | null;
9321
+ row_ordering_config: Json | null;
9322
+ sheet_index: number | null;
9323
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
9324
+ sync_source: Json | null;
9325
+ table_name: string;
8841
9326
  task_id: string | null;
9327
+ template_id: string | null;
9328
+ template_version: number | null;
8842
9329
  updated_at: string;
8843
9330
  updated_by: string | null;
8844
9331
  user_id: string;
9332
+ validation_mode: string;
8845
9333
  version: number;
9334
+ visibility: Database["platform"]["Enums"]["visibility"];
9335
+ workbook_id: string | null;
8846
9336
  };
8847
9337
  Insert: {
8848
- active_entity_id?: string | null;
8849
- active_entity_type?: string | null;
8850
- app_source?: string;
8851
9338
  created_at?: string;
8852
- created_by?: string | null;
9339
+ created_by: string;
8853
9340
  custom_fields?: Json;
9341
+ deleted_at?: string | null;
9342
+ description?: string | null;
8854
9343
  id?: string;
8855
- last_activity?: string;
9344
+ is_public?: boolean;
8856
9345
  metadata?: Json;
8857
9346
  organization_id: string;
8858
9347
  project_id?: string | null;
9348
+ published_to_web?: boolean;
9349
+ published_to_web_at?: string | null;
9350
+ published_to_web_by?: string | null;
9351
+ row_ordering_config?: Json | null;
9352
+ sheet_index?: number | null;
9353
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9354
+ sync_source?: Json | null;
9355
+ table_name: string;
8859
9356
  task_id?: string | null;
9357
+ template_id?: string | null;
9358
+ template_version?: number | null;
8860
9359
  updated_at?: string;
8861
9360
  updated_by?: string | null;
8862
9361
  user_id: string;
9362
+ validation_mode?: string;
8863
9363
  version?: number;
9364
+ visibility: Database["platform"]["Enums"]["visibility"];
9365
+ workbook_id?: string | null;
8864
9366
  };
8865
9367
  Update: {
8866
- active_entity_id?: string | null;
8867
- active_entity_type?: string | null;
8868
- app_source?: string;
8869
9368
  created_at?: string;
8870
- created_by?: string | null;
9369
+ created_by?: string;
8871
9370
  custom_fields?: Json;
9371
+ deleted_at?: string | null;
9372
+ description?: string | null;
8872
9373
  id?: string;
8873
- last_activity?: string;
9374
+ is_public?: boolean;
8874
9375
  metadata?: Json;
8875
9376
  organization_id?: string;
8876
9377
  project_id?: string | null;
9378
+ published_to_web?: boolean;
9379
+ published_to_web_at?: string | null;
9380
+ published_to_web_by?: string | null;
9381
+ row_ordering_config?: Json | null;
9382
+ sheet_index?: number | null;
9383
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9384
+ sync_source?: Json | null;
9385
+ table_name?: string;
8877
9386
  task_id?: string | null;
9387
+ template_id?: string | null;
9388
+ template_version?: number | null;
8878
9389
  updated_at?: string;
8879
9390
  updated_by?: string | null;
8880
9391
  user_id?: string;
9392
+ validation_mode?: string;
8881
9393
  version?: number;
9394
+ visibility?: Database["platform"]["Enums"]["visibility"];
9395
+ workbook_id?: string | null;
8882
9396
  };
8883
9397
  Relationships: [];
8884
9398
  };
8885
- };
8886
- Views: {
8887
- [_ in never]: never;
8888
- };
8889
- Functions: {
8890
- _assert_scope_readable: {
8891
- Args: {
8892
- p_level?: string;
8893
- p_scope_id: string;
8894
- };
8895
- Returns: undefined;
8896
- };
8897
- _readable_scope_ids: {
8898
- Args: never;
8899
- Returns: string[];
8900
- };
8901
- _scope_denial_message: {
8902
- Args: {
8903
- p_level?: string;
8904
- p_scope_id: string;
8905
- };
8906
- Returns: string;
8907
- };
8908
- _scope_readable: {
8909
- Args: {
8910
- p_level?: string;
8911
- p_scope_id: string;
9399
+ udt_structured_list_items: {
9400
+ Row: {
9401
+ created_at: string;
9402
+ created_by: string | null;
9403
+ custom_fields: Json;
9404
+ deleted_at: string | null;
9405
+ description: string | null;
9406
+ group_name: string | null;
9407
+ help_text: string | null;
9408
+ icon_name: string | null;
9409
+ id: string;
9410
+ is_public: boolean | null;
9411
+ label: string | null;
9412
+ list_id: string | null;
9413
+ metadata: Json;
9414
+ organization_id: string | null;
9415
+ public_read: boolean | null;
9416
+ updated_at: string | null;
9417
+ updated_by: string | null;
9418
+ user_id: string | null;
9419
+ version: number;
8912
9420
  };
8913
- Returns: boolean;
8914
- };
8915
- _scope_readable_for: {
8916
- Args: {
8917
- p_level?: string;
8918
- p_scope_id: string;
8919
- p_user_id: string;
9421
+ Insert: {
9422
+ created_at?: string;
9423
+ created_by?: string | null;
9424
+ custom_fields?: Json;
9425
+ deleted_at?: string | null;
9426
+ description?: string | null;
9427
+ group_name?: string | null;
9428
+ help_text?: string | null;
9429
+ icon_name?: string | null;
9430
+ id?: string;
9431
+ is_public?: boolean | null;
9432
+ label?: string | null;
9433
+ list_id?: string | null;
9434
+ metadata?: Json;
9435
+ organization_id?: string | null;
9436
+ public_read?: boolean | null;
9437
+ updated_at?: string | null;
9438
+ updated_by?: string | null;
9439
+ user_id?: string | null;
9440
+ version?: number;
8920
9441
  };
8921
- Returns: boolean;
8922
- };
8923
- _strip_sql_noise: {
8924
- Args: {
8925
- p_src: string;
9442
+ Update: {
9443
+ created_at?: string;
9444
+ created_by?: string | null;
9445
+ custom_fields?: Json;
9446
+ deleted_at?: string | null;
9447
+ description?: string | null;
9448
+ group_name?: string | null;
9449
+ help_text?: string | null;
9450
+ icon_name?: string | null;
9451
+ id?: string;
9452
+ is_public?: boolean | null;
9453
+ label?: string | null;
9454
+ list_id?: string | null;
9455
+ metadata?: Json;
9456
+ organization_id?: string | null;
9457
+ public_read?: boolean | null;
9458
+ updated_at?: string | null;
9459
+ updated_by?: string | null;
9460
+ user_id?: string | null;
9461
+ version?: number;
8926
9462
  };
8927
- Returns: string;
9463
+ Relationships: [
9464
+ {
9465
+ foreignKeyName: "udt_structured_list_items_list_id_fkey";
9466
+ columns: ["list_id"];
9467
+ isOneToOne: false;
9468
+ referencedRelation: "udt_structured_lists";
9469
+ referencedColumns: ["id"];
9470
+ }
9471
+ ];
8928
9472
  };
8929
- deliverable_system_context_items: {
8930
- Args: never;
8931
- Returns: {
9473
+ udt_structured_lists: {
9474
+ Row: {
8932
9475
  created_at: string;
8933
- created_by: string | null;
9476
+ created_by: string;
9477
+ custom_fields: Json;
8934
9478
  deleted_at: string | null;
8935
9479
  description: string | null;
8936
- display_name: string;
8937
- feed_config: Json;
8938
- feed_error: string | null;
8939
- feed_status: string | null;
8940
- feed_type: Database["public"]["Enums"]["context_feed_type"];
8941
9480
  id: string;
8942
- is_active: boolean;
8943
- item_class: string;
8944
- key: string;
8945
- last_fed_at: string | null;
9481
+ is_public: boolean | null;
9482
+ list_name: string | null;
8946
9483
  metadata: Json;
8947
- organization_id: string;
9484
+ organization_id: string | null;
9485
+ public_read: boolean | null;
8948
9486
  published_to_web: boolean;
8949
9487
  published_to_web_at: string | null;
8950
9488
  published_to_web_by: string | null;
8951
- sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8952
9489
  shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8953
- sort_order: number;
8954
- updated_at: string;
9490
+ updated_at: string | null;
8955
9491
  updated_by: string | null;
8956
- value: Json | null;
8957
- value_type: Database["public"]["Enums"]["context_value_type"];
9492
+ user_id: string | null;
8958
9493
  version: number;
8959
9494
  visibility: Database["platform"]["Enums"]["visibility"];
8960
- }[];
8961
- SetofOptions: {
8962
- from: "*";
8963
- to: "system_context_item";
8964
- isOneToOne: false;
8965
- isSetofReturn: true;
8966
9495
  };
8967
- };
8968
- named_system_context_items: {
8969
- Args: {
8970
- p_refs: string[];
9496
+ Insert: {
9497
+ created_at?: string;
9498
+ created_by: string;
9499
+ custom_fields?: Json;
9500
+ deleted_at?: string | null;
9501
+ description?: string | null;
9502
+ id?: string;
9503
+ is_public?: boolean | null;
9504
+ list_name?: string | null;
9505
+ metadata?: Json;
9506
+ organization_id?: string | null;
9507
+ public_read?: boolean | null;
9508
+ published_to_web?: boolean;
9509
+ published_to_web_at?: string | null;
9510
+ published_to_web_by?: string | null;
9511
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9512
+ updated_at?: string | null;
9513
+ updated_by?: string | null;
9514
+ user_id?: string | null;
9515
+ version?: number;
9516
+ visibility: Database["platform"]["Enums"]["visibility"];
8971
9517
  };
8972
- Returns: {
9518
+ Update: {
9519
+ created_at?: string;
9520
+ created_by?: string;
9521
+ custom_fields?: Json;
9522
+ deleted_at?: string | null;
9523
+ description?: string | null;
9524
+ id?: string;
9525
+ is_public?: boolean | null;
9526
+ list_name?: string | null;
9527
+ metadata?: Json;
9528
+ organization_id?: string | null;
9529
+ public_read?: boolean | null;
9530
+ published_to_web?: boolean;
9531
+ published_to_web_at?: string | null;
9532
+ published_to_web_by?: string | null;
9533
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9534
+ updated_at?: string | null;
9535
+ updated_by?: string | null;
9536
+ user_id?: string | null;
9537
+ version?: number;
9538
+ visibility?: Database["platform"]["Enums"]["visibility"];
9539
+ };
9540
+ Relationships: [];
9541
+ };
9542
+ working_documents: {
9543
+ Row: {
9544
+ content: string;
8973
9545
  created_at: string;
8974
9546
  created_by: string | null;
9547
+ custom_fields: Json;
8975
9548
  deleted_at: string | null;
8976
- description: string | null;
8977
- display_name: string;
8978
- feed_config: Json;
8979
- feed_error: string | null;
8980
- feed_status: string | null;
8981
- feed_type: Database["public"]["Enums"]["context_feed_type"];
8982
9549
  id: string;
8983
- is_active: boolean;
8984
- item_class: string;
8985
- key: string;
8986
- last_fed_at: string | null;
9550
+ kind: string;
8987
9551
  metadata: Json;
8988
9552
  organization_id: string;
8989
9553
  published_to_web: boolean;
8990
9554
  published_to_web_at: string | null;
8991
9555
  published_to_web_by: string | null;
8992
- sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8993
9556
  shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8994
- sort_order: number;
9557
+ title: string;
8995
9558
  updated_at: string;
8996
9559
  updated_by: string | null;
8997
- value: Json | null;
8998
- value_type: Database["public"]["Enums"]["context_value_type"];
8999
9560
  version: number;
9000
9561
  visibility: Database["platform"]["Enums"]["visibility"];
9001
- }[];
9002
- SetofOptions: {
9003
- from: "*";
9004
- to: "system_context_item";
9005
- isOneToOne: false;
9006
- isSetofReturn: true;
9007
9562
  };
9563
+ Insert: {
9564
+ content?: string;
9565
+ created_at?: string;
9566
+ created_by?: string | null;
9567
+ custom_fields?: Json;
9568
+ deleted_at?: string | null;
9569
+ id?: string;
9570
+ kind?: string;
9571
+ metadata?: Json;
9572
+ organization_id: string;
9573
+ published_to_web?: boolean;
9574
+ published_to_web_at?: string | null;
9575
+ published_to_web_by?: string | null;
9576
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9577
+ title?: string;
9578
+ updated_at?: string;
9579
+ updated_by?: string | null;
9580
+ version?: number;
9581
+ visibility?: Database["platform"]["Enums"]["visibility"];
9582
+ };
9583
+ Update: {
9584
+ content?: string;
9585
+ created_at?: string;
9586
+ created_by?: string | null;
9587
+ custom_fields?: Json;
9588
+ deleted_at?: string | null;
9589
+ id?: string;
9590
+ kind?: string;
9591
+ metadata?: Json;
9592
+ organization_id?: string;
9593
+ published_to_web?: boolean;
9594
+ published_to_web_at?: string | null;
9595
+ published_to_web_by?: string | null;
9596
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9597
+ title?: string;
9598
+ updated_at?: string;
9599
+ updated_by?: string | null;
9600
+ version?: number;
9601
+ visibility?: Database["platform"]["Enums"]["visibility"];
9602
+ };
9603
+ Relationships: [];
9008
9604
  };
9009
- parse_reference_fence: {
9605
+ };
9606
+ Views: {
9607
+ [_ in never]: never;
9608
+ };
9609
+ Functions: {
9610
+ _ctx_dataset_field_holds: {
9010
9611
  Args: {
9011
- p_value_text: string;
9612
+ p_org: string;
9613
+ p_spec: Json;
9614
+ };
9615
+ Returns: undefined;
9616
+ };
9617
+ _cutover_seam_apply: {
9618
+ Args: {
9619
+ p_actor: string;
9620
+ p_org: string;
9621
+ p_press: string;
9622
+ p_seam: string;
9623
+ p_to: string;
9012
9624
  };
9013
9625
  Returns: Json;
9014
9626
  };
9015
- reference_item_ref_key: {
9627
+ _udt_display_spec: {
9016
9628
  Args: {
9017
- p_item: Json;
9018
- p_type: string;
9629
+ p_raw: Json;
9019
9630
  };
9020
- Returns: string;
9631
+ Returns: Json;
9021
9632
  };
9022
- slugify: {
9633
+ _udt_row_granted: {
9023
9634
  Args: {
9024
- p: string;
9635
+ p_row_id: string;
9636
+ };
9637
+ Returns: boolean;
9638
+ };
9639
+ _udt_row_words: {
9640
+ Args: {
9641
+ p_display?: Json;
9642
+ p_hop?: number;
9643
+ p_organization_id: string;
9644
+ p_row_id: string;
9025
9645
  };
9026
9646
  Returns: string;
9027
9647
  };
9028
- system_item_refs_or_defaults: {
9648
+ list_udt_dataset_templates: {
9029
9649
  Args: {
9030
- p_refs: string[];
9650
+ p_org_id: string;
9031
9651
  };
9032
- Returns: string[];
9652
+ Returns: Json;
9653
+ };
9654
+ udt_cast_jsonb_value: {
9655
+ Args: {
9656
+ p_new_type: Database["public"]["Enums"]["field_data_type"];
9657
+ p_value: Json;
9658
+ };
9659
+ Returns: Json;
9660
+ };
9661
+ udt_dataset_archive: {
9662
+ Args: {
9663
+ p_moved_to_table_id: string;
9664
+ p_reason?: string;
9665
+ p_table_id: string;
9666
+ };
9667
+ Returns: Json;
9668
+ };
9669
+ udt_dataset_row_versions_trim: {
9670
+ Args: never;
9671
+ Returns: Json;
9672
+ };
9673
+ udt_dataset_row_versions_trim_scoped: {
9674
+ Args: {
9675
+ p_dry_run?: boolean;
9676
+ p_table_id?: string;
9677
+ };
9678
+ Returns: Json;
9679
+ };
9680
+ udt_dataset_unarchive: {
9681
+ Args: {
9682
+ p_table_id: string;
9683
+ };
9684
+ Returns: Json;
9685
+ };
9686
+ udt_refuse_row_in_trash: {
9687
+ Args: never;
9688
+ Returns: undefined;
9689
+ };
9690
+ udt_row_words_many: {
9691
+ Args: {
9692
+ p_display: Json;
9693
+ p_organization_id: string;
9694
+ p_row_ids: string[];
9695
+ };
9696
+ Returns: {
9697
+ row_id: string;
9698
+ words: string;
9699
+ }[];
9700
+ };
9701
+ udt_structured_list_archive: {
9702
+ Args: {
9703
+ p_list_id: string;
9704
+ p_moved_to_table_id: string;
9705
+ p_reason?: string;
9706
+ };
9707
+ Returns: Json;
9708
+ };
9709
+ udt_structured_list_unarchive: {
9710
+ Args: {
9711
+ p_list_id: string;
9712
+ };
9713
+ Returns: Json;
9714
+ };
9715
+ udt_validate_cell_rules: {
9716
+ Args: {
9717
+ p_data_type: string;
9718
+ p_rules: Json;
9719
+ p_value: Json;
9720
+ };
9721
+ Returns: string;
9033
9722
  };
9034
9723
  validate_dataset_template_source: {
9035
9724
  Args: {
@@ -14126,6 +14815,149 @@ export type FilesDatabase = {
14126
14815
  }
14127
14816
  ];
14128
14817
  };
14818
+ access_shadow_log: {
14819
+ Row: {
14820
+ at: string;
14821
+ caller: string;
14822
+ compared: number | null;
14823
+ disagreed: number | null;
14824
+ error: string | null;
14825
+ id: string;
14826
+ level: string;
14827
+ new_answer: boolean | null;
14828
+ old_answer: boolean | null;
14829
+ person: string;
14830
+ target: string | null;
14831
+ };
14832
+ Insert: {
14833
+ at?: string;
14834
+ caller: string;
14835
+ compared?: number | null;
14836
+ disagreed?: number | null;
14837
+ error?: string | null;
14838
+ id?: string;
14839
+ level: string;
14840
+ new_answer?: boolean | null;
14841
+ old_answer?: boolean | null;
14842
+ person: string;
14843
+ target?: string | null;
14844
+ };
14845
+ Update: {
14846
+ at?: string;
14847
+ caller?: string;
14848
+ compared?: number | null;
14849
+ disagreed?: number | null;
14850
+ error?: string | null;
14851
+ id?: string;
14852
+ level?: string;
14853
+ new_answer?: boolean | null;
14854
+ old_answer?: boolean | null;
14855
+ person?: string;
14856
+ target?: string | null;
14857
+ };
14858
+ Relationships: [];
14859
+ };
14860
+ account_closure: {
14861
+ Row: {
14862
+ closed_at: string;
14863
+ created_at: string;
14864
+ created_by: string | null;
14865
+ deleted_at: string | null;
14866
+ erased_at: string | null;
14867
+ id: string;
14868
+ metadata: Json;
14869
+ organization_id: string;
14870
+ published_to_web: boolean;
14871
+ published_to_web_at: string | null;
14872
+ published_to_web_by: string | null;
14873
+ reason: string | null;
14874
+ reopened_at: string | null;
14875
+ request_ref: string | null;
14876
+ revoked: Json;
14877
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
14878
+ updated_at: string;
14879
+ updated_by: string | null;
14880
+ user_id: string;
14881
+ version: number;
14882
+ visibility: Database["platform"]["Enums"]["visibility"];
14883
+ };
14884
+ Insert: {
14885
+ closed_at?: string;
14886
+ created_at?: string;
14887
+ created_by?: string | null;
14888
+ deleted_at?: string | null;
14889
+ erased_at?: string | null;
14890
+ id?: string;
14891
+ metadata?: Json;
14892
+ organization_id: string;
14893
+ published_to_web?: boolean;
14894
+ published_to_web_at?: string | null;
14895
+ published_to_web_by?: string | null;
14896
+ reason?: string | null;
14897
+ reopened_at?: string | null;
14898
+ request_ref?: string | null;
14899
+ revoked?: Json;
14900
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
14901
+ updated_at?: string;
14902
+ updated_by?: string | null;
14903
+ user_id: string;
14904
+ version?: number;
14905
+ visibility?: Database["platform"]["Enums"]["visibility"];
14906
+ };
14907
+ Update: {
14908
+ closed_at?: string;
14909
+ created_at?: string;
14910
+ created_by?: string | null;
14911
+ deleted_at?: string | null;
14912
+ erased_at?: string | null;
14913
+ id?: string;
14914
+ metadata?: Json;
14915
+ organization_id?: string;
14916
+ published_to_web?: boolean;
14917
+ published_to_web_at?: string | null;
14918
+ published_to_web_by?: string | null;
14919
+ reason?: string | null;
14920
+ reopened_at?: string | null;
14921
+ request_ref?: string | null;
14922
+ revoked?: Json;
14923
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
14924
+ updated_at?: string;
14925
+ updated_by?: string | null;
14926
+ user_id?: string;
14927
+ version?: number;
14928
+ visibility?: Database["platform"]["Enums"]["visibility"];
14929
+ };
14930
+ Relationships: [
14931
+ {
14932
+ foreignKeyName: "account_closure_created_by_fkey";
14933
+ columns: ["created_by"];
14934
+ isOneToOne: false;
14935
+ referencedRelation: "users";
14936
+ referencedColumns: ["id"];
14937
+ },
14938
+ {
14939
+ foreignKeyName: "account_closure_organization_id_fkey";
14940
+ columns: ["organization_id"];
14941
+ isOneToOne: false;
14942
+ referencedRelation: "organizations";
14943
+ referencedColumns: ["id"];
14944
+ },
14945
+ {
14946
+ foreignKeyName: "account_closure_updated_by_fkey";
14947
+ columns: ["updated_by"];
14948
+ isOneToOne: false;
14949
+ referencedRelation: "users";
14950
+ referencedColumns: ["id"];
14951
+ },
14952
+ {
14953
+ foreignKeyName: "account_closure_user_id_fkey";
14954
+ columns: ["user_id"];
14955
+ isOneToOne: false;
14956
+ referencedRelation: "users";
14957
+ referencedColumns: ["id"];
14958
+ }
14959
+ ];
14960
+ };
14129
14961
  api_keys: {
14130
14962
  Row: {
14131
14963
  created_at: string;
@@ -14780,14 +15612,14 @@ export type FilesDatabase = {
14780
15612
  };
14781
15613
  Relationships: [
14782
15614
  {
14783
- foreignKeyName: "memberships_created_by_fkey_p";
15615
+ foreignKeyName: "memberships_created_by_fkey";
14784
15616
  columns: ["created_by"];
14785
15617
  isOneToOne: false;
14786
15618
  referencedRelation: "users";
14787
15619
  referencedColumns: ["id"];
14788
15620
  },
14789
15621
  {
14790
- foreignKeyName: "memberships_invited_by_fkey_p";
15622
+ foreignKeyName: "memberships_invited_by_fkey";
14791
15623
  columns: ["invited_by"];
14792
15624
  isOneToOne: false;
14793
15625
  referencedRelation: "users";
@@ -14801,14 +15633,14 @@ export type FilesDatabase = {
14801
15633
  referencedColumns: ["id"];
14802
15634
  },
14803
15635
  {
14804
- foreignKeyName: "memberships_updated_by_fkey_p";
15636
+ foreignKeyName: "memberships_updated_by_fkey";
14805
15637
  columns: ["updated_by"];
14806
15638
  isOneToOne: false;
14807
15639
  referencedRelation: "users";
14808
15640
  referencedColumns: ["id"];
14809
15641
  },
14810
15642
  {
14811
- foreignKeyName: "memberships_user_id_fkey_p";
15643
+ foreignKeyName: "memberships_user_id_fkey";
14812
15644
  columns: ["user_id"];
14813
15645
  isOneToOne: false;
14814
15646
  referencedRelation: "users";
@@ -15125,14 +15957,14 @@ export type FilesDatabase = {
15125
15957
  };
15126
15958
  Relationships: [
15127
15959
  {
15128
- foreignKeyName: "organizations_created_by_fkey_p";
15960
+ foreignKeyName: "organizations_created_by_fkey";
15129
15961
  columns: ["created_by"];
15130
15962
  isOneToOne: false;
15131
15963
  referencedRelation: "users";
15132
15964
  referencedColumns: ["id"];
15133
15965
  },
15134
15966
  {
15135
- foreignKeyName: "organizations_updated_by_fkey_p";
15967
+ foreignKeyName: "organizations_updated_by_fkey";
15136
15968
  columns: ["updated_by"];
15137
15969
  isOneToOne: false;
15138
15970
  referencedRelation: "users";
@@ -15201,21 +16033,21 @@ export type FilesDatabase = {
15201
16033
  referencedColumns: ["id"];
15202
16034
  },
15203
16035
  {
15204
- foreignKeyName: "permissions_created_by_fkey_p";
16036
+ foreignKeyName: "permissions_created_by_fkey";
15205
16037
  columns: ["created_by"];
15206
16038
  isOneToOne: false;
15207
16039
  referencedRelation: "users";
15208
16040
  referencedColumns: ["id"];
15209
16041
  },
15210
16042
  {
15211
- foreignKeyName: "permissions_granted_to_user_id_fkey_p";
16043
+ foreignKeyName: "permissions_granted_to_user_id_fkey";
15212
16044
  columns: ["granted_to_user_id"];
15213
16045
  isOneToOne: false;
15214
16046
  referencedRelation: "users";
15215
16047
  referencedColumns: ["id"];
15216
16048
  },
15217
16049
  {
15218
- foreignKeyName: "permissions_reviewed_by_fkey_p";
16050
+ foreignKeyName: "permissions_reviewed_by_fkey";
15219
16051
  columns: ["reviewed_by"];
15220
16052
  isOneToOne: false;
15221
16053
  referencedRelation: "users";
@@ -15223,6 +16055,103 @@ export type FilesDatabase = {
15223
16055
  }
15224
16056
  ];
15225
16057
  };
16058
+ personal_data_column: {
16059
+ Row: {
16060
+ column_name: string;
16061
+ created_at: string;
16062
+ created_by: string | null;
16063
+ handling: string;
16064
+ id: string;
16065
+ metadata: Json;
16066
+ organization_id: string;
16067
+ published_to_web: boolean;
16068
+ published_to_web_at: string | null;
16069
+ published_to_web_by: string | null;
16070
+ reason: string;
16071
+ replacement: string | null;
16072
+ schema_name: string;
16073
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
16074
+ subject_column: string | null;
16075
+ subject_filter: string | null;
16076
+ subject_match: string;
16077
+ table_name: string;
16078
+ updated_at: string;
16079
+ updated_by: string | null;
16080
+ version: number;
16081
+ visibility: Database["platform"]["Enums"]["visibility"];
16082
+ };
16083
+ Insert: {
16084
+ column_name: string;
16085
+ created_at?: string;
16086
+ created_by?: string | null;
16087
+ handling: string;
16088
+ id?: string;
16089
+ metadata?: Json;
16090
+ organization_id: string;
16091
+ published_to_web?: boolean;
16092
+ published_to_web_at?: string | null;
16093
+ published_to_web_by?: string | null;
16094
+ reason: string;
16095
+ replacement?: string | null;
16096
+ schema_name: string;
16097
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
16098
+ subject_column?: string | null;
16099
+ subject_filter?: string | null;
16100
+ subject_match?: string;
16101
+ table_name: string;
16102
+ updated_at?: string;
16103
+ updated_by?: string | null;
16104
+ version?: number;
16105
+ visibility?: Database["platform"]["Enums"]["visibility"];
16106
+ };
16107
+ Update: {
16108
+ column_name?: string;
16109
+ created_at?: string;
16110
+ created_by?: string | null;
16111
+ handling?: string;
16112
+ id?: string;
16113
+ metadata?: Json;
16114
+ organization_id?: string;
16115
+ published_to_web?: boolean;
16116
+ published_to_web_at?: string | null;
16117
+ published_to_web_by?: string | null;
16118
+ reason?: string;
16119
+ replacement?: string | null;
16120
+ schema_name?: string;
16121
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
16122
+ subject_column?: string | null;
16123
+ subject_filter?: string | null;
16124
+ subject_match?: string;
16125
+ table_name?: string;
16126
+ updated_at?: string;
16127
+ updated_by?: string | null;
16128
+ version?: number;
16129
+ visibility?: Database["platform"]["Enums"]["visibility"];
16130
+ };
16131
+ Relationships: [
16132
+ {
16133
+ foreignKeyName: "personal_data_column_created_by_fkey";
16134
+ columns: ["created_by"];
16135
+ isOneToOne: false;
16136
+ referencedRelation: "users";
16137
+ referencedColumns: ["id"];
16138
+ },
16139
+ {
16140
+ foreignKeyName: "personal_data_column_organization_id_fkey";
16141
+ columns: ["organization_id"];
16142
+ isOneToOne: false;
16143
+ referencedRelation: "organizations";
16144
+ referencedColumns: ["id"];
16145
+ },
16146
+ {
16147
+ foreignKeyName: "personal_data_column_updated_by_fkey";
16148
+ columns: ["updated_by"];
16149
+ isOneToOne: false;
16150
+ referencedRelation: "users";
16151
+ referencedColumns: ["id"];
16152
+ }
16153
+ ];
16154
+ };
15226
16155
  publish_binding: {
15227
16156
  Row: {
15228
16157
  bound_at: string;
@@ -15643,7 +16572,7 @@ export type FilesDatabase = {
15643
16572
  };
15644
16573
  Relationships: [
15645
16574
  {
15646
- foreignKeyName: "memberships_invited_by_fkey_p";
16575
+ foreignKeyName: "memberships_invited_by_fkey";
15647
16576
  columns: ["invited_by"];
15648
16577
  isOneToOne: false;
15649
16578
  referencedRelation: "users";
@@ -15657,7 +16586,7 @@ export type FilesDatabase = {
15657
16586
  referencedColumns: ["id"];
15658
16587
  },
15659
16588
  {
15660
- foreignKeyName: "memberships_user_id_fkey_p";
16589
+ foreignKeyName: "memberships_user_id_fkey";
15661
16590
  columns: ["user_id"];
15662
16591
  isOneToOne: false;
15663
16592
  referencedRelation: "users";
@@ -16153,6 +17082,12 @@ export type FilesDatabase = {
16153
17082
  Args: never;
16154
17083
  Returns: string[];
16155
17084
  };
17085
+ arm_fixture_delete: {
17086
+ Args: {
17087
+ p_ids: string[];
17088
+ };
17089
+ Returns: number;
17090
+ };
16156
17091
  asks_about_caller: {
16157
17092
  Args: {
16158
17093
  p_function?: string;
@@ -16334,6 +17269,13 @@ export type FilesDatabase = {
16334
17269
  };
16335
17270
  Returns: boolean;
16336
17271
  };
17272
+ close_account: {
17273
+ Args: {
17274
+ p_reason?: string;
17275
+ p_user?: string;
17276
+ };
17277
+ Returns: Json;
17278
+ };
16337
17279
  component_original_lane: {
16338
17280
  Args: {
16339
17281
  p_schema: string;
@@ -16377,12 +17319,6 @@ export type FilesDatabase = {
16377
17319
  };
16378
17320
  Returns: string;
16379
17321
  };
16380
- default_organization_id: {
16381
- Args: {
16382
- p_user_id: string;
16383
- };
16384
- Returns: string;
16385
- };
16386
17322
  derive_organization_abbreviation: {
16387
17323
  Args: {
16388
17324
  p_name: string;
@@ -16531,6 +17467,13 @@ export type FilesDatabase = {
16531
17467
  user_id: string;
16532
17468
  }[];
16533
17469
  };
17470
+ erase_account: {
17471
+ Args: {
17472
+ p_request_ref: string;
17473
+ p_user: string;
17474
+ };
17475
+ Returns: Json;
17476
+ };
16534
17477
  external_principal_card: {
16535
17478
  Args: {
16536
17479
  p_user_id?: string;
@@ -16672,6 +17615,31 @@ export type FilesDatabase = {
16672
17615
  };
16673
17616
  Returns: boolean;
16674
17617
  };
17618
+ has_access_for_many: {
17619
+ Args: {
17620
+ p_level: string;
17621
+ p_person: string;
17622
+ p_targets: string[];
17623
+ p_type?: string;
17624
+ };
17625
+ Returns: {
17626
+ allowed: boolean;
17627
+ target: string;
17628
+ }[];
17629
+ };
17630
+ has_access_for_shadow: {
17631
+ Args: {
17632
+ p_caller?: string;
17633
+ p_level: string;
17634
+ p_person: string;
17635
+ p_targets: string[];
17636
+ p_type?: string;
17637
+ };
17638
+ Returns: {
17639
+ allowed: boolean;
17640
+ target: string;
17641
+ }[];
17642
+ };
16675
17643
  has_org_access: {
16676
17644
  Args: {
16677
17645
  p_org: string;
@@ -16783,6 +17751,12 @@ export type FilesDatabase = {
16783
17751
  Args: never;
16784
17752
  Returns: boolean;
16785
17753
  };
17754
+ kernel_shadow_on: {
17755
+ Args: {
17756
+ p_person: string;
17757
+ };
17758
+ Returns: boolean;
17759
+ };
16786
17760
  lane_of: {
16787
17761
  Args: {
16788
17762
  p_resource_id: string;
@@ -17105,6 +18079,14 @@ export type FilesDatabase = {
17105
18079
  why: string;
17106
18080
  }[];
17107
18081
  };
18082
+ personal_data_unregistered: {
18083
+ Args: never;
18084
+ Returns: {
18085
+ column_name: string;
18086
+ schema_name: string;
18087
+ table_name: string;
18088
+ }[];
18089
+ };
17108
18090
  personal_opens_row: {
17109
18091
  Args: {
17110
18092
  p_id: string;
@@ -17351,6 +18333,13 @@ export type FilesDatabase = {
17351
18333
  };
17352
18334
  Returns: Json;
17353
18335
  };
18336
+ reopen_account: {
18337
+ Args: {
18338
+ p_reason?: string;
18339
+ p_user: string;
18340
+ };
18341
+ Returns: Json;
18342
+ };
17354
18343
  reserved_namespace: {
17355
18344
  Args: never;
17356
18345
  Returns: {
@@ -18748,6 +19737,7 @@ export type FilesDatabase = {
18748
19737
  container_side: string;
18749
19738
  conveys_max: Database["public"]["Enums"]["permission_level"];
18750
19739
  created_at: string;
19740
+ id: string;
18751
19741
  is_active: boolean;
18752
19742
  label: string | null;
18753
19743
  notes: string | null;
@@ -18761,6 +19751,7 @@ export type FilesDatabase = {
18761
19751
  container_side?: string;
18762
19752
  conveys_max?: Database["public"]["Enums"]["permission_level"];
18763
19753
  created_at?: string;
19754
+ id?: string;
18764
19755
  is_active?: boolean;
18765
19756
  label?: string | null;
18766
19757
  notes?: string | null;
@@ -18774,6 +19765,7 @@ export type FilesDatabase = {
18774
19765
  container_side?: string;
18775
19766
  conveys_max?: Database["public"]["Enums"]["permission_level"];
18776
19767
  created_at?: string;
19768
+ id?: string;
18777
19769
  is_active?: boolean;
18778
19770
  label?: string | null;
18779
19771
  notes?: string | null;
@@ -20337,6 +21329,108 @@ export type FilesDatabase = {
20337
21329
  };
20338
21330
  Relationships: [];
20339
21331
  };
21332
+ device_handoff: {
21333
+ Row: {
21334
+ completed_at: string | null;
21335
+ created_at: string;
21336
+ created_by: string | null;
21337
+ deleted_at: string | null;
21338
+ envelope_id: string | null;
21339
+ expires_at: string;
21340
+ id: string;
21341
+ ip: unknown;
21342
+ metadata: Json;
21343
+ method: string | null;
21344
+ opened_at: string | null;
21345
+ organization_id: string;
21346
+ phone_last4: string | null;
21347
+ published_to_web: boolean;
21348
+ published_to_web_at: string | null;
21349
+ published_to_web_by: string | null;
21350
+ purpose: string;
21351
+ result_file_id: string | null;
21352
+ secret_hash: string;
21353
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
21354
+ status: string;
21355
+ strokes: Json | null;
21356
+ subject_id: string | null;
21357
+ subject_type: string | null;
21358
+ target: string | null;
21359
+ texts_sent: number;
21360
+ updated_at: string;
21361
+ updated_by: string | null;
21362
+ user_agent: string | null;
21363
+ version: number;
21364
+ visibility: Database["platform"]["Enums"]["visibility"];
21365
+ };
21366
+ Insert: {
21367
+ completed_at?: string | null;
21368
+ created_at?: string;
21369
+ created_by?: string | null;
21370
+ deleted_at?: string | null;
21371
+ envelope_id?: string | null;
21372
+ expires_at: string;
21373
+ id?: string;
21374
+ ip?: unknown;
21375
+ metadata?: Json;
21376
+ method?: string | null;
21377
+ opened_at?: string | null;
21378
+ organization_id: string;
21379
+ phone_last4?: string | null;
21380
+ published_to_web?: boolean;
21381
+ published_to_web_at?: string | null;
21382
+ published_to_web_by?: string | null;
21383
+ purpose: string;
21384
+ result_file_id?: string | null;
21385
+ secret_hash: string;
21386
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
21387
+ status?: string;
21388
+ strokes?: Json | null;
21389
+ subject_id?: string | null;
21390
+ subject_type?: string | null;
21391
+ target?: string | null;
21392
+ texts_sent?: number;
21393
+ updated_at?: string;
21394
+ updated_by?: string | null;
21395
+ user_agent?: string | null;
21396
+ version?: number;
21397
+ visibility?: Database["platform"]["Enums"]["visibility"];
21398
+ };
21399
+ Update: {
21400
+ completed_at?: string | null;
21401
+ created_at?: string;
21402
+ created_by?: string | null;
21403
+ deleted_at?: string | null;
21404
+ envelope_id?: string | null;
21405
+ expires_at?: string;
21406
+ id?: string;
21407
+ ip?: unknown;
21408
+ metadata?: Json;
21409
+ method?: string | null;
21410
+ opened_at?: string | null;
21411
+ organization_id?: string;
21412
+ phone_last4?: string | null;
21413
+ published_to_web?: boolean;
21414
+ published_to_web_at?: string | null;
21415
+ published_to_web_by?: string | null;
21416
+ purpose?: string;
21417
+ result_file_id?: string | null;
21418
+ secret_hash?: string;
21419
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
21420
+ status?: string;
21421
+ strokes?: Json | null;
21422
+ subject_id?: string | null;
21423
+ subject_type?: string | null;
21424
+ target?: string | null;
21425
+ texts_sent?: number;
21426
+ updated_at?: string;
21427
+ updated_by?: string | null;
21428
+ user_agent?: string | null;
21429
+ version?: number;
21430
+ visibility?: Database["platform"]["Enums"]["visibility"];
21431
+ };
21432
+ Relationships: [];
21433
+ };
20340
21434
  domain_classification: {
20341
21435
  Row: {
20342
21436
  authority: number | null;
@@ -23104,6 +24198,7 @@ export type FilesDatabase = {
23104
24198
  published_to_web_by: string | null;
23105
24199
  readable_columns: string[];
23106
24200
  resource: string;
24201
+ session_sliding: boolean;
23107
24202
  session_ttl_minutes: number;
23108
24203
  shown_to: Database["platform"]["Enums"]["shown_to"] | null;
23109
24204
  updated_at: string;
@@ -23137,6 +24232,7 @@ export type FilesDatabase = {
23137
24232
  published_to_web_by?: string | null;
23138
24233
  readable_columns?: string[];
23139
24234
  resource: string;
24235
+ session_sliding?: boolean;
23140
24236
  session_ttl_minutes?: number;
23141
24237
  shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
23142
24238
  updated_at?: string;
@@ -23170,6 +24266,7 @@ export type FilesDatabase = {
23170
24266
  published_to_web_by?: string | null;
23171
24267
  readable_columns?: string[];
23172
24268
  resource?: string;
24269
+ session_sliding?: boolean;
23173
24270
  session_ttl_minutes?: number;
23174
24271
  shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
23175
24272
  updated_at?: string;
@@ -23470,6 +24567,84 @@ export type FilesDatabase = {
23470
24567
  };
23471
24568
  Relationships: [];
23472
24569
  };
24570
+ public_compat_wrapper: {
24571
+ Row: {
24572
+ created_at: string;
24573
+ expires_at: string;
24574
+ forwarder_oid: unknown;
24575
+ identity: string;
24576
+ owner_schema: string;
24577
+ };
24578
+ Insert: {
24579
+ created_at?: string;
24580
+ expires_at: string;
24581
+ forwarder_oid?: unknown;
24582
+ identity: string;
24583
+ owner_schema: string;
24584
+ };
24585
+ Update: {
24586
+ created_at?: string;
24587
+ expires_at?: string;
24588
+ forwarder_oid?: unknown;
24589
+ identity?: string;
24590
+ owner_schema?: string;
24591
+ };
24592
+ Relationships: [];
24593
+ };
24594
+ public_placement_baseline: {
24595
+ Row: {
24596
+ identity: string;
24597
+ object_type: string;
24598
+ taken_at: string;
24599
+ };
24600
+ Insert: {
24601
+ identity: string;
24602
+ object_type: string;
24603
+ taken_at?: string;
24604
+ };
24605
+ Update: {
24606
+ identity?: string;
24607
+ object_type?: string;
24608
+ taken_at?: string;
24609
+ };
24610
+ Relationships: [];
24611
+ };
24612
+ public_placement_domain: {
24613
+ Row: {
24614
+ prefix: string;
24615
+ schema_name: string;
24616
+ };
24617
+ Insert: {
24618
+ prefix: string;
24619
+ schema_name: string;
24620
+ };
24621
+ Update: {
24622
+ prefix?: string;
24623
+ schema_name?: string;
24624
+ };
24625
+ Relationships: [];
24626
+ };
24627
+ public_restore_permit: {
24628
+ Row: {
24629
+ approved_by: string;
24630
+ expires_at: string;
24631
+ identity: string;
24632
+ reason: string;
24633
+ };
24634
+ Insert: {
24635
+ approved_by: string;
24636
+ expires_at: string;
24637
+ identity: string;
24638
+ reason: string;
24639
+ };
24640
+ Update: {
24641
+ approved_by?: string;
24642
+ expires_at?: string;
24643
+ identity?: string;
24644
+ reason?: string;
24645
+ };
24646
+ Relationships: [];
24647
+ };
23473
24648
  purpose: {
23474
24649
  Row: {
23475
24650
  created_at: string;
@@ -25789,6 +26964,13 @@ export type FilesDatabase = {
25789
26964
  };
25790
26965
  Returns: Json;
25791
26966
  };
26967
+ _device_handoff_live: {
26968
+ Args: {
26969
+ p_expires_at: string;
26970
+ p_status: string;
26971
+ };
26972
+ Returns: boolean;
26973
+ };
25792
26974
  _door_follows_its_function_impl: {
25793
26975
  Args: {
25794
26976
  p_schemas: string[];
@@ -27792,6 +28974,64 @@ export type FilesDatabase = {
27792
28974
  type_value: string;
27793
28975
  }[];
27794
28976
  };
28977
+ device_handoff_cancel: {
28978
+ Args: {
28979
+ p_handoff_id: string;
28980
+ p_subject_id: string;
28981
+ };
28982
+ Returns: Json;
28983
+ };
28984
+ device_handoff_complete: {
28985
+ Args: {
28986
+ p_image_file_id: string;
28987
+ p_ip: unknown;
28988
+ p_method: string;
28989
+ p_secret: string;
28990
+ p_strokes: Json;
28991
+ p_ua: string;
28992
+ };
28993
+ Returns: Json;
28994
+ };
28995
+ device_handoff_open: {
28996
+ Args: {
28997
+ p_ip: unknown;
28998
+ p_secret: string;
28999
+ p_ua: string;
29000
+ };
29001
+ Returns: Json;
29002
+ };
29003
+ device_handoff_start: {
29004
+ Args: {
29005
+ p_envelope_id: string;
29006
+ p_organization_id: string;
29007
+ p_path: string;
29008
+ p_purpose: string;
29009
+ p_subject_id: string;
29010
+ p_subject_type: string;
29011
+ p_target: string;
29012
+ p_ttl_minutes: number;
29013
+ };
29014
+ Returns: Json;
29015
+ };
29016
+ device_handoff_status: {
29017
+ Args: {
29018
+ p_handoff_id: string;
29019
+ p_subject_id: string;
29020
+ };
29021
+ Returns: Json;
29022
+ };
29023
+ device_handoff_text: {
29024
+ Args: {
29025
+ p_handoff_id: string;
29026
+ p_ip: unknown;
29027
+ p_per_ip_per_day: number;
29028
+ p_per_subject: number;
29029
+ p_phone: string;
29030
+ p_secret: string;
29031
+ p_subject_id: string;
29032
+ };
29033
+ Returns: Json;
29034
+ };
27795
29035
  doctrine_shape_vocabulary: {
27796
29036
  Args: never;
27797
29037
  Returns: {
@@ -28119,6 +29359,20 @@ export type FilesDatabase = {
28119
29359
  };
28120
29360
  Returns: Json;
28121
29361
  };
29362
+ entity_usage: {
29363
+ Args: {
29364
+ p_entity: string;
29365
+ p_ids: string[];
29366
+ };
29367
+ Returns: {
29368
+ entity_id: string;
29369
+ failure_count: number;
29370
+ last_used_at: string;
29371
+ run_count: number;
29372
+ success_count: number;
29373
+ total_cost: number;
29374
+ }[];
29375
+ };
28122
29376
  extensibility_knob: {
28123
29377
  Args: {
28124
29378
  p_definition_id?: string;
@@ -28235,10 +29489,18 @@ export type FilesDatabase = {
28235
29489
  Args: never;
28236
29490
  Returns: Json;
28237
29491
  };
29492
+ kernel_fingerprint_status: {
29493
+ Args: never;
29494
+ Returns: Json;
29495
+ };
28238
29496
  kernel_fixture_tokens: {
28239
29497
  Args: never;
28240
29498
  Returns: string[];
28241
29499
  };
29500
+ kernel_follow_now: {
29501
+ Args: never;
29502
+ Returns: Json;
29503
+ };
28242
29504
  knob_archive: {
28243
29505
  Args: {
28244
29506
  p_feature: string;
@@ -31932,13 +33194,6 @@ export type FilesDatabase = {
31932
33194
  slug: string;
31933
33195
  }[];
31934
33196
  };
31935
- _d31_impl_add_data_row_to_user_table: {
31936
- Args: {
31937
- p_data: Json;
31938
- p_table_id: string;
31939
- };
31940
- Returns: Json;
31941
- };
31942
33197
  _d31_impl_add_feedback_comment: {
31943
33198
  Args: {
31944
33199
  p_author_name: string;
@@ -32015,14 +33270,6 @@ export type FilesDatabase = {
32015
33270
  isSetofReturn: true;
32016
33271
  };
32017
33272
  };
32018
- _d31_impl_get_user_table_complete: {
32019
- Args: {
32020
- p_sort_direction?: string;
32021
- p_sort_field?: string;
32022
- p_table_id: string;
32023
- };
32024
- Returns: Json;
32025
- };
32026
33273
  _d31_impl_reply_to_user_review: {
32027
33274
  Args: {
32028
33275
  p_feedback_id: string;
@@ -32041,36 +33288,6 @@ export type FilesDatabase = {
32041
33288
  };
32042
33289
  Returns: Json;
32043
33290
  };
32044
- _d31_impl_update_user_list: {
32045
- Args: {
32046
- p_authenticated_read?: boolean;
32047
- p_description?: string;
32048
- p_is_public?: boolean;
32049
- p_items?: Json;
32050
- p_list_id: string;
32051
- p_list_name?: string;
32052
- p_public_read?: boolean;
32053
- };
32054
- Returns: Json;
32055
- };
32056
- _d31_impl_update_user_table_config: {
32057
- Args: {
32058
- p_field_updates?: Json;
32059
- p_table_id: string;
32060
- p_table_updates?: Json;
32061
- };
32062
- Returns: Json;
32063
- };
32064
- _d31_impl_update_user_table_metadata: {
32065
- Args: {
32066
- p_authenticated_read?: boolean;
32067
- p_description?: string;
32068
- p_is_public?: boolean;
32069
- p_table_id: string;
32070
- p_table_name?: string;
32071
- };
32072
- Returns: Json;
32073
- };
32074
33291
  _dict_context_owner_org: {
32075
33292
  Args: {
32076
33293
  p_level: string;
@@ -32100,7 +33317,7 @@ export type FilesDatabase = {
32100
33317
  } & "Could not choose the best candidate function between: public._edu_access_mode(p_scope => scopes), public._edu_access_mode(p_scope => _edu_class_row). Try renaming the parameters or the function itself in the database so function overloading can be resolved";
32101
33318
  } | {
32102
33319
  Args: {
32103
- p_scope: Database["context"]["Tables"]["scopes"]["Row"];
33320
+ p_scope: Database["deprecated"]["Tables"]["scopes"]["Row"];
32104
33321
  };
32105
33322
  Returns: {
32106
33323
  error: true;
@@ -32153,7 +33370,7 @@ export type FilesDatabase = {
32153
33370
  } & "Could not choose the best candidate function between: public._edu_ensure_owner_membership(p_scope => scopes), public._edu_ensure_owner_membership(p_scope => _edu_class_row). Try renaming the parameters or the function itself in the database so function overloading can be resolved";
32154
33371
  } | {
32155
33372
  Args: {
32156
- p_scope: Database["context"]["Tables"]["scopes"]["Row"];
33373
+ p_scope: Database["deprecated"]["Tables"]["scopes"]["Row"];
32157
33374
  };
32158
33375
  Returns: {
32159
33376
  error: true;
@@ -32185,7 +33402,7 @@ export type FilesDatabase = {
32185
33402
  } & "Could not choose the best candidate function between: public._edu_is_owner(p_scope => scopes), public._edu_is_owner(p_scope => _edu_class_row). Try renaming the parameters or the function itself in the database so function overloading can be resolved";
32186
33403
  } | {
32187
33404
  Args: {
32188
- p_scope: Database["context"]["Tables"]["scopes"]["Row"];
33405
+ p_scope: Database["deprecated"]["Tables"]["scopes"]["Row"];
32189
33406
  };
32190
33407
  Returns: {
32191
33408
  error: true;
@@ -33619,15 +34836,6 @@ export type FilesDatabase = {
33619
34836
  };
33620
34837
  Returns: undefined;
33621
34838
  };
33622
- agx_duplicate_agent: {
33623
- Args: {
33624
- p_agent_id: string;
33625
- p_as_system?: boolean;
33626
- p_follows_source?: boolean;
33627
- p_organization_id?: string;
33628
- };
33629
- Returns: string;
33630
- };
33631
34839
  agx_duplicate_shortcut: {
33632
34840
  Args: {
33633
34841
  p_organization_id?: string;
@@ -33642,14 +34850,6 @@ export type FilesDatabase = {
33642
34850
  };
33643
34851
  Returns: string;
33644
34852
  };
33645
- agx_duplicate_version: {
33646
- Args: {
33647
- p_as_system?: boolean;
33648
- p_organization_id?: string;
33649
- p_version_id: string;
33650
- };
33651
- Returns: string;
33652
- };
33653
34853
  agx_escape_regex: {
33654
34854
  Args: {
33655
34855
  p: string;
@@ -34263,20 +35463,25 @@ export type FilesDatabase = {
34263
35463
  created_by: string;
34264
35464
  custom_fields: Json;
34265
35465
  description: string;
35466
+ failure_count: number;
34266
35467
  id: string;
34267
35468
  is_active: boolean;
34268
35469
  is_archived: boolean;
34269
35470
  is_favorite: boolean;
34270
35471
  is_owner: boolean;
35472
+ last_used_at: string;
34271
35473
  model_id: string;
34272
35474
  name: string;
34273
35475
  offering_id: string;
34274
35476
  organization_id: string;
34275
35477
  organization_name: string;
34276
35478
  owner_email: string;
35479
+ run_count: number;
34277
35480
  source_agent_id: string;
35481
+ success_count: number;
34278
35482
  tags: string[];
34279
35483
  task_id: string;
35484
+ total_cost: number;
34280
35485
  total_count: number;
34281
35486
  updated_at: string;
34282
35487
  version: number;
@@ -34639,6 +35844,18 @@ export type FilesDatabase = {
34639
35844
  };
34640
35845
  Returns: Json;
34641
35846
  };
35847
+ applet_public_intro: {
35848
+ Args: {
35849
+ p_slug: string;
35850
+ };
35851
+ Returns: Json;
35852
+ };
35853
+ applets_public: {
35854
+ Args: {
35855
+ p_templates_only?: boolean;
35856
+ };
35857
+ Returns: Json;
35858
+ };
34642
35859
  apply_template_definition: {
34643
35860
  Args: {
34644
35861
  p_definition: Json;
@@ -35081,21 +36298,6 @@ export type FilesDatabase = {
35081
36298
  };
35082
36299
  Returns: boolean;
35083
36300
  };
35084
- check_prompt_app_drift: {
35085
- Args: {
35086
- p_user_id?: string;
35087
- };
35088
- Returns: {
35089
- app_id: string;
35090
- app_name: string;
35091
- current_version: number;
35092
- pinned_version: number;
35093
- prompt_id: string;
35094
- prompt_name: string;
35095
- prompt_source_type: string;
35096
- versions_behind: number;
35097
- }[];
35098
- };
35099
36301
  check_rate_limit: {
35100
36302
  Args: {
35101
36303
  p_app_id: string;
@@ -37624,8 +38826,6 @@ export type FilesDatabase = {
37624
38826
  p_slug?: string;
37625
38827
  };
37626
38828
  Returns: {
37627
- agent_id: string;
37628
- agent_version_id: string;
37629
38829
  allowed_imports: Json;
37630
38830
  category: string;
37631
38831
  component_code: string;
@@ -37634,41 +38834,15 @@ export type FilesDatabase = {
37634
38834
  favicon_url: string;
37635
38835
  id: string;
37636
38836
  layout_config: Json;
37637
- mandate_agent_id: string;
37638
- mandate_agent_version_id: string;
37639
- mandate_id: string;
37640
- mandate_key: string;
37641
38837
  name: string;
37642
38838
  preview_image_url: string;
37643
38839
  publisher_name: string;
37644
- shell_config: Json;
37645
- shell_kind: string;
37646
- slot_code: Json;
37647
- slot_overrides: Json;
37648
38840
  slug: string;
37649
38841
  styling_config: Json;
37650
38842
  success_rate: number;
37651
38843
  tagline: string;
37652
38844
  tags: string[];
37653
38845
  total_executions: number;
37654
- use_latest: boolean;
37655
- variable_schema: Json;
37656
- }[];
37657
- };
37658
- get_aga_public_execution: {
37659
- Args: {
37660
- p_app_id: string;
37661
- };
37662
- Returns: {
37663
- auto_context_disabled: boolean;
37664
- context_policies: Json;
37665
- custom_tools: Json;
37666
- id: string;
37667
- model_id: string;
37668
- settings: Json;
37669
- tools: string[];
37670
- ui_gates: Json;
37671
- variable_definitions: Json;
37672
38846
  }[];
37673
38847
  };
37674
38848
  get_agent_conversations: {
@@ -38206,6 +39380,18 @@ export type FilesDatabase = {
38206
39380
  isSetofReturn: true;
38207
39381
  };
38208
39382
  };
39383
+ get_pick_list_for_selection: {
39384
+ Args: {
39385
+ p_list_id: string;
39386
+ };
39387
+ Returns: Json;
39388
+ };
39389
+ get_pick_lists_summary: {
39390
+ Args: {
39391
+ p_user_id: string;
39392
+ };
39393
+ Returns: Json;
39394
+ };
38209
39395
  get_project_members_with_users: {
38210
39396
  Args: {
38211
39397
  p_project_id: string;
@@ -38246,74 +39432,12 @@ export type FilesDatabase = {
38246
39432
  table_name: string;
38247
39433
  }[];
38248
39434
  };
38249
- get_prompt_app_execution_payload: {
38250
- Args: {
38251
- p_app_id: string;
38252
- };
38253
- Returns: Json;
38254
- };
38255
- get_prompt_app_public_data: {
38256
- Args: {
38257
- p_app_id?: string;
38258
- p_slug?: string;
38259
- };
38260
- Returns: {
38261
- allowed_imports: Json;
38262
- category: string;
38263
- component_code: string;
38264
- component_language: string;
38265
- description: string;
38266
- favicon_url: string;
38267
- id: string;
38268
- layout_config: Json;
38269
- name: string;
38270
- preview_image_url: string;
38271
- slug: string;
38272
- styling_config: Json;
38273
- success_rate: number;
38274
- tagline: string;
38275
- tags: string[];
38276
- total_executions: number;
38277
- variable_schema: Json;
38278
- }[];
38279
- };
38280
39435
  get_public_flashcard_set: {
38281
39436
  Args: {
38282
39437
  p_set_id: string;
38283
39438
  };
38284
39439
  Returns: Json;
38285
39440
  };
38286
- get_published_app_with_prompt: {
38287
- Args: {
38288
- p_app_id?: string;
38289
- p_slug?: string;
38290
- };
38291
- Returns: {
38292
- allowed_imports: Json;
38293
- category: string;
38294
- component_code: string;
38295
- component_language: string;
38296
- description: string;
38297
- favicon_url: string;
38298
- id: string;
38299
- layout_config: Json;
38300
- name: string;
38301
- preview_image_url: string;
38302
- prompt_id: string;
38303
- prompt_messages: Json;
38304
- prompt_settings: Json;
38305
- prompt_variable_defaults: Json;
38306
- slug: string;
38307
- status: string;
38308
- styling_config: Json;
38309
- success_rate: number;
38310
- tagline: string;
38311
- tags: string[];
38312
- total_executions: number;
38313
- user_id: string;
38314
- variable_schema: Json;
38315
- }[];
38316
- };
38317
39441
  get_resource_access: {
38318
39442
  Args: {
38319
39443
  p_resource_id: string;
@@ -38393,12 +39517,6 @@ export type FilesDatabase = {
38393
39517
  };
38394
39518
  Returns: Json;
38395
39519
  };
38396
- get_pick_list_for_selection: {
38397
- Args: {
38398
- p_list_id: string;
38399
- };
38400
- Returns: Json;
38401
- };
38402
39520
  get_tables_and_columns: {
38403
39521
  Args: never;
38404
39522
  Returns: {
@@ -38556,12 +39674,6 @@ export type FilesDatabase = {
38556
39674
  };
38557
39675
  Returns: Json;
38558
39676
  };
38559
- get_pick_lists_summary: {
38560
- Args: {
38561
- p_user_id: string;
38562
- };
38563
- Returns: Json;
38564
- };
38565
39677
  get_user_messages: {
38566
39678
  Args: {
38567
39679
  p_feedback_id: string;
@@ -40865,12 +41977,6 @@ export type FilesDatabase = {
40865
41977
  };
40866
41978
  Returns: Json;
40867
41979
  };
40868
- list_udt_dataset_templates: {
40869
- Args: {
40870
- p_org_id: string;
40871
- };
40872
- Returns: Json;
40873
- };
40874
41980
  list_user_organizations: {
40875
41981
  Args: {
40876
41982
  p_archived?: string;
@@ -41787,13 +42893,6 @@ export type FilesDatabase = {
41787
42893
  user_id: string;
41788
42894
  }[];
41789
42895
  };
41790
- pin_prompt_app_to_version: {
41791
- Args: {
41792
- p_app_id: string;
41793
- p_version_id: string;
41794
- };
41795
- Returns: Json;
41796
- };
41797
42896
  plpgsql_check_function: {
41798
42897
  Args: {
41799
42898
  all_warnings?: boolean;
@@ -43689,32 +44788,6 @@ export type FilesDatabase = {
43689
44788
  };
43690
44789
  Returns: boolean;
43691
44790
  };
43692
- udt_cast_jsonb_value: {
43693
- Args: {
43694
- p_new_type: Database["public"]["Enums"]["field_data_type"];
43695
- p_value: Json;
43696
- };
43697
- Returns: Json;
43698
- };
43699
- udt_dataset_row_versions_trim: {
43700
- Args: never;
43701
- Returns: Json;
43702
- };
43703
- udt_dataset_row_versions_trim_scoped: {
43704
- Args: {
43705
- p_dry_run?: boolean;
43706
- p_table_id?: string;
43707
- };
43708
- Returns: Json;
43709
- };
43710
- udt_validate_cell_rules: {
43711
- Args: {
43712
- p_data_type: string;
43713
- p_rules: Json;
43714
- p_value: Json;
43715
- };
43716
- Returns: string;
43717
- };
43718
44791
  ues_get_bulk: {
43719
44792
  Args: {
43720
44793
  p_entity_ids: string[];
@@ -44049,6 +45122,7 @@ export type FilesDatabase = {
44049
45122
  created_by: string;
44050
45123
  custom_fields: Json;
44051
45124
  description: string;
45125
+ failure_count: number;
44052
45126
  id: string;
44053
45127
  is_active: boolean;
44054
45128
  is_archived: boolean;
@@ -44063,11 +45137,14 @@ export type FilesDatabase = {
44063
45137
  owner_email: string;
44064
45138
  run_count: number;
44065
45139
  step_count: number;
45140
+ success_count: number;
44066
45141
  tags: string[];
45142
+ total_cost: number;
44067
45143
  total_count: number;
44068
45144
  updated_at: string;
44069
45145
  version: number;
44070
45146
  visibility: string;
45147
+ workflow_type: string;
44071
45148
  }[];
44072
45149
  };
44073
45150
  wsp_resolve_system_task: {
@@ -44138,7 +45215,7 @@ export type FilesDatabase = {
44138
45215
  operation_type: "insert" | "update" | "delete";
44139
45216
  org_role: "owner" | "member" | "admin";
44140
45217
  orientation: "vertical" | "horizontal" | "default";
44141
- permission_level: "viewer" | "commenter" | "editor" | "admin";
45218
+ permission_level: "viewer" | "commenter" | "edit_content" | "editor" | "admin";
44142
45219
  project_role: "owner" | "admin" | "member";
44143
45220
  recipe_status: "live" | "draft" | "in_review" | "active_testing" | "archived" | "other";
44144
45221
  reg_func_category: "Recipes" | "Agents" | "Prompts" | "Processors" | "Extractors" | "Files" | "Database" | "Web" | "Media" | "Documents" | "Integrations" | "Commands" | "Executors" | "API" | "Other";
@@ -45470,6 +46547,69 @@ export type FilesDatabase = {
45470
46547
  };
45471
46548
  ui: {
45472
46549
  Tables: {
46550
+ decision_pick: {
46551
+ Row: {
46552
+ created_at: string;
46553
+ created_by: string | null;
46554
+ custom_fields: Json;
46555
+ decision_id: string | null;
46556
+ deleted_at: string | null;
46557
+ id: string;
46558
+ metadata: Json;
46559
+ note: string | null;
46560
+ organization_id: string;
46561
+ published_to_web: boolean;
46562
+ published_to_web_at: string | null;
46563
+ published_to_web_by: string | null;
46564
+ shown_to: Database["platform"]["Enums"]["shown_to"];
46565
+ updated_at: string;
46566
+ updated_by: string | null;
46567
+ version: number;
46568
+ visibility: Database["platform"]["Enums"]["visibility"];
46569
+ winner: string | null;
46570
+ };
46571
+ Insert: {
46572
+ created_at?: string;
46573
+ created_by?: string | null;
46574
+ custom_fields?: Json;
46575
+ decision_id?: string | null;
46576
+ deleted_at?: string | null;
46577
+ id?: string;
46578
+ metadata?: Json;
46579
+ note?: string | null;
46580
+ organization_id: string;
46581
+ published_to_web?: boolean;
46582
+ published_to_web_at?: string | null;
46583
+ published_to_web_by?: string | null;
46584
+ shown_to?: Database["platform"]["Enums"]["shown_to"];
46585
+ updated_at?: string;
46586
+ updated_by?: string | null;
46587
+ version?: number;
46588
+ visibility?: Database["platform"]["Enums"]["visibility"];
46589
+ winner?: string | null;
46590
+ };
46591
+ Update: {
46592
+ created_at?: string;
46593
+ created_by?: string | null;
46594
+ custom_fields?: Json;
46595
+ decision_id?: string | null;
46596
+ deleted_at?: string | null;
46597
+ id?: string;
46598
+ metadata?: Json;
46599
+ note?: string | null;
46600
+ organization_id?: string;
46601
+ published_to_web?: boolean;
46602
+ published_to_web_at?: string | null;
46603
+ published_to_web_by?: string | null;
46604
+ shown_to?: Database["platform"]["Enums"]["shown_to"];
46605
+ updated_at?: string;
46606
+ updated_by?: string | null;
46607
+ version?: number;
46608
+ visibility?: Database["platform"]["Enums"]["visibility"];
46609
+ winner?: string | null;
46610
+ };
46611
+ Relationships: [];
46612
+ };
45473
46613
  ui_client: {
45474
46614
  Row: {
45475
46615
  created_at: string;
@@ -46745,6 +47885,7 @@ export type FilesDatabase = {
46745
47885
  completed_at: string | null;
46746
47886
  created_at: string;
46747
47887
  created_by: string | null;
47888
+ deleted_at: string | null;
46748
47889
  id: string;
46749
47890
  metadata: Json;
46750
47891
  mutation_id: string;
@@ -46768,6 +47909,7 @@ export type FilesDatabase = {
46768
47909
  completed_at?: string | null;
46769
47910
  created_at?: string;
46770
47911
  created_by?: string | null;
47912
+ deleted_at?: string | null;
46771
47913
  id?: string;
46772
47914
  metadata?: Json;
46773
47915
  mutation_id: string;
@@ -46791,6 +47933,7 @@ export type FilesDatabase = {
46791
47933
  completed_at?: string | null;
46792
47934
  created_at?: string;
46793
47935
  created_by?: string | null;
47936
+ deleted_at?: string | null;
46794
47937
  id?: string;
46795
47938
  metadata?: Json;
46796
47939
  mutation_id?: string;
@@ -48271,12 +49414,13 @@ export type FilesDatabase = {
48271
49414
  created_at: string;
48272
49415
  created_by: string | null;
48273
49416
  custom_fields: Json;
48274
- default_organization_id: string | null;
48275
49417
  deleted_at: string | null;
48276
49418
  id: string;
49419
+ last_active_organization_id: string | null;
48277
49420
  metadata: Json;
48278
49421
  organization_id: string;
48279
49422
  preferences: Json;
49423
+ startup_organization_id: string | null;
48280
49424
  updated_at: string;
48281
49425
  updated_by: string | null;
48282
49426
  user_id: string;
@@ -48287,12 +49431,13 @@ export type FilesDatabase = {
48287
49431
  created_at?: string;
48288
49432
  created_by?: string | null;
48289
49433
  custom_fields?: Json;
48290
- default_organization_id?: string | null;
48291
49434
  deleted_at?: string | null;
48292
49435
  id?: string;
49436
+ last_active_organization_id?: string | null;
48293
49437
  metadata?: Json;
48294
49438
  organization_id: string;
48295
49439
  preferences: Json;
49440
+ startup_organization_id?: string | null;
48296
49441
  updated_at?: string;
48297
49442
  updated_by?: string | null;
48298
49443
  user_id: string;
@@ -48303,12 +49448,13 @@ export type FilesDatabase = {
48303
49448
  created_at?: string;
48304
49449
  created_by?: string | null;
48305
49450
  custom_fields?: Json;
48306
- default_organization_id?: string | null;
48307
49451
  deleted_at?: string | null;
48308
49452
  id?: string;
49453
+ last_active_organization_id?: string | null;
48309
49454
  metadata?: Json;
48310
49455
  organization_id?: string;
48311
49456
  preferences?: Json;
49457
+ startup_organization_id?: string | null;
48312
49458
  updated_at?: string;
48313
49459
  updated_by?: string | null;
48314
49460
  user_id?: string;
@@ -48644,6 +49790,13 @@ export type FilesDatabase = {
48644
49790
  [_ in never]: never;
48645
49791
  };
48646
49792
  Functions: {
49793
+ _set_own_organization_choice: {
49794
+ Args: {
49795
+ p_column: string;
49796
+ p_organization_id: string;
49797
+ };
49798
+ Returns: string;
49799
+ };
48647
49800
  admin_account_facts: {
48648
49801
  Args: never;
48649
49802
  Returns: {
@@ -48749,6 +49902,12 @@ export type FilesDatabase = {
48749
49902
  vault_access: string;
48750
49903
  }[];
48751
49904
  };
49905
+ set_last_active_organization: {
49906
+ Args: {
49907
+ p_organization_id: string;
49908
+ };
49909
+ Returns: string;
49910
+ };
48752
49911
  set_organization_vault_access: {
48753
49912
  Args: {
48754
49913
  p_access: string;
@@ -48758,6 +49917,12 @@ export type FilesDatabase = {
48758
49917
  };
48759
49918
  Returns: string;
48760
49919
  };
49920
+ set_startup_organization: {
49921
+ Args: {
49922
+ p_organization_id: string;
49923
+ };
49924
+ Returns: string;
49925
+ };
48761
49926
  user_preferences_drift_report: {
48762
49927
  Args: never;
48763
49928
  Returns: {