@ai-matrx/chat 0.3.9 → 0.3.15

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.
Files changed (35) hide show
  1. package/CHANGELOG.md +55 -0
  2. package/dist/agent-copy/export.d.ts +10 -2
  3. package/dist/agent-copy/export.js +3 -2
  4. package/dist/agents/components/context-items/bodies/WebpageBody.js +3 -8
  5. package/dist/agents/components/debug/SandboxFileViewer.js +1 -3
  6. package/dist/agents/components/inputs/smart-input/composer/ComposerMenu.js +16 -2
  7. package/dist/agents/components/live-run/LiveRunDisplay.d.ts +7 -1
  8. package/dist/agents/components/live-run/LiveRunDisplay.js +10 -3
  9. package/dist/agents/components/messages-display/TranscriptIntegrityCopyButton.js +5 -11
  10. package/dist/agents/components/messages-display/user/UserActionBar.js +3 -18
  11. package/dist/agents/constants/system-agent-registry.d.ts +0 -3
  12. package/dist/agents/constants/system-agent-registry.js +0 -3
  13. package/dist/agents/hooks/useFloatingAgentRun.d.ts +19 -0
  14. package/dist/agents/hooks/useFloatingAgentRun.js +32 -9
  15. package/dist/agents/prompt-preview/PromptPreviewContent.js +1 -7
  16. package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.d.ts +14 -0
  17. package/dist/agents/redux/execution-system/active-requests/active-requests.selectors.js +30 -0
  18. package/dist/agents/redux/execution-system/client-capabilities/desktop-native.provider.js +10 -1
  19. package/dist/agents/redux/execution-system/message-crud/refetch-single-message.thunk.js +5 -0
  20. package/dist/agents/redux/execution-system/thunks/process-stream.js +2 -2
  21. package/dist/agents/redux/execution-system/utils/stream-block-accumulator.d.ts +14 -0
  22. package/dist/agents/redux/execution-system/utils/stream-block-accumulator.js +28 -0
  23. package/dist/context/sources/scopes.d.ts +1 -1
  24. package/dist/host/db-types.d.ts +1859 -831
  25. package/dist/host/ui-slots.d.ts +3 -0
  26. package/dist/host/ui-slots.js +2 -0
  27. package/dist/host/window-openers.d.ts +2 -0
  28. package/dist/surfaces/manifests/chat.manifest.js +3 -1
  29. package/dist/ui/mandates-storage/mandateStorage.d.ts +15 -0
  30. package/dist/ui/mandates-storage/shortcutStorage.d.ts +3 -0
  31. package/dist/utils/rich-editor/in-place/caret-handoff.js +2 -1
  32. package/dist/voice-agent/components/VoiceDebugPanel.js +3 -9
  33. package/dist/window-panels/windows/agents/LiveRunWindow.d.ts +3 -1
  34. package/dist/window-panels/windows/agents/LiveRunWindow.js +5 -2
  35. package/package.json +5 -5
@@ -6,7 +6,7 @@
6
6
  * The host's `db` is a `SupabaseClient<ChatDatabase>`; a host typed with the
7
7
  * full platform `Database` passes its client unchanged.
8
8
  *
9
- * Schemas (17): admin, agent, ai, canvas, chat, context, dictionary, education, iam, mandate, platform, public, scheduler, tool, ui, users, workbench
9
+ * Schemas (18): admin, agent, ai, canvas, chat, context, deprecated, dictionary, education, iam, mandate, platform, public, scheduler, tool, ui, users, workbench
10
10
  */
11
11
  export type Json = unknown;
12
12
  export type ChatDatabase = {
@@ -4466,6 +4466,13 @@ export type ChatDatabase = {
4466
4466
  isOneToOne: false;
4467
4467
  referencedRelation: "canvas_items";
4468
4468
  referencedColumns: ["id"];
4469
+ },
4470
+ {
4471
+ foreignKeyName: "canvas_items_version_chain_same_owner";
4472
+ columns: ["user_id", "parent_canvas_id"];
4473
+ isOneToOne: false;
4474
+ referencedRelation: "canvas_items";
4475
+ referencedColumns: ["user_id", "id"];
4469
4476
  }
4470
4477
  ];
4471
4478
  };
@@ -8066,324 +8073,6 @@ export type ChatDatabase = {
8066
8073
  value_version?: number | null;
8067
8074
  was_useful?: boolean | null;
8068
8075
  };
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
- context_item_values: {
8080
- Row: {
8081
- authored_by: string | null;
8082
- change_summary: string | null;
8083
- char_count: number | null;
8084
- context_item_id: string;
8085
- created_at: string;
8086
- custom_fields: Json;
8087
- data_point_count: number | null;
8088
- has_nested_objects: boolean;
8089
- id: string;
8090
- is_current: boolean;
8091
- organization_id: string;
8092
- scope_id: string;
8093
- source_type: Database["public"]["Enums"]["context_source_type"];
8094
- value_boolean: boolean | null;
8095
- value_date: string | null;
8096
- value_document_size_bytes: number | null;
8097
- value_document_url: string | null;
8098
- value_json: Json | null;
8099
- value_number: number | null;
8100
- value_reference_id: string | null;
8101
- value_reference_type: string | null;
8102
- value_text: string | null;
8103
- value_time: string | null;
8104
- value_timestamp: string | null;
8105
- version: number;
8106
- };
8107
- Insert: {
8108
- authored_by?: string | null;
8109
- change_summary?: string | null;
8110
- char_count?: number | null;
8111
- context_item_id: string;
8112
- created_at?: string;
8113
- custom_fields?: Json;
8114
- data_point_count?: number | null;
8115
- has_nested_objects?: boolean;
8116
- id?: string;
8117
- is_current?: boolean;
8118
- organization_id: string;
8119
- scope_id: string;
8120
- source_type?: Database["public"]["Enums"]["context_source_type"];
8121
- value_boolean?: boolean | null;
8122
- value_date?: string | null;
8123
- value_document_size_bytes?: number | null;
8124
- value_document_url?: string | null;
8125
- value_json?: Json | null;
8126
- value_number?: number | null;
8127
- value_reference_id?: string | null;
8128
- value_reference_type?: string | null;
8129
- value_text?: string | null;
8130
- value_time?: string | null;
8131
- value_timestamp?: string | null;
8132
- version?: number;
8133
- };
8134
- Update: {
8135
- authored_by?: string | null;
8136
- change_summary?: string | null;
8137
- char_count?: number | null;
8138
- context_item_id?: string;
8139
- created_at?: string;
8140
- custom_fields?: Json;
8141
- data_point_count?: number | null;
8142
- has_nested_objects?: boolean;
8143
- id?: string;
8144
- is_current?: boolean;
8145
- organization_id?: string;
8146
- scope_id?: string;
8147
- source_type?: Database["public"]["Enums"]["context_source_type"];
8148
- value_boolean?: boolean | null;
8149
- value_date?: string | null;
8150
- value_document_size_bytes?: number | null;
8151
- value_document_url?: string | null;
8152
- value_json?: Json | null;
8153
- value_number?: number | null;
8154
- value_reference_id?: string | null;
8155
- value_reference_type?: string | null;
8156
- value_text?: string | null;
8157
- value_time?: string | null;
8158
- value_timestamp?: string | null;
8159
- version?: number;
8160
- };
8161
- Relationships: [];
8162
- };
8163
- context_items: {
8164
- Row: {
8165
- allowed_reference_types: string[] | null;
8166
- allowed_scope_type_ids: string[] | null;
8167
- category: string | null;
8168
- created_at: string;
8169
- created_by: string | null;
8170
- custom_component: Json | null;
8171
- custom_fields: Json;
8172
- deleted_at: string | null;
8173
- depends_on: string[];
8174
- description: string;
8175
- display_name: string;
8176
- feed_config: Json;
8177
- feed_error: string | null;
8178
- feed_status: string | null;
8179
- feed_type: Database["public"]["Enums"]["context_feed_type"];
8180
- fetch_hint: Database["public"]["Enums"]["context_fetch_hint"];
8181
- id: string;
8182
- is_active: boolean;
8183
- key: string;
8184
- last_fed_at: string | null;
8185
- last_verified_at: string | null;
8186
- max_items: number;
8187
- metadata: Json;
8188
- next_review_at: string | null;
8189
- reference_source: Json | null;
8190
- refresh_task_id: string | null;
8191
- review_interval_days: number | null;
8192
- scope_type_id: string;
8193
- sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8194
- slug: string;
8195
- sort_order: number;
8196
- source_type: Database["public"]["Enums"]["context_source_type"];
8197
- status: Database["public"]["Enums"]["context_item_status"];
8198
- status_note: string | null;
8199
- status_updated_at: string;
8200
- status_updated_by: string | null;
8201
- tags: string[];
8202
- template_item_key: string | null;
8203
- updated_at: string;
8204
- updated_by: string | null;
8205
- value_type: Database["public"]["Enums"]["context_value_type"];
8206
- version: number;
8207
- };
8208
- Insert: {
8209
- allowed_reference_types?: string[] | null;
8210
- allowed_scope_type_ids?: string[] | null;
8211
- category?: string | null;
8212
- created_at?: string;
8213
- created_by?: string | null;
8214
- custom_component?: Json | null;
8215
- custom_fields?: Json;
8216
- deleted_at?: string | null;
8217
- depends_on?: string[];
8218
- description?: string;
8219
- display_name: string;
8220
- feed_config?: Json;
8221
- feed_error?: string | null;
8222
- feed_status?: string | null;
8223
- feed_type?: Database["public"]["Enums"]["context_feed_type"];
8224
- fetch_hint?: Database["public"]["Enums"]["context_fetch_hint"];
8225
- id?: string;
8226
- is_active?: boolean;
8227
- key: string;
8228
- last_fed_at?: string | null;
8229
- last_verified_at?: string | null;
8230
- max_items?: number;
8231
- metadata?: Json;
8232
- next_review_at?: string | null;
8233
- reference_source?: Json | null;
8234
- refresh_task_id?: string | null;
8235
- review_interval_days?: number | null;
8236
- scope_type_id: string;
8237
- sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8238
- slug: string;
8239
- sort_order?: number;
8240
- source_type?: Database["public"]["Enums"]["context_source_type"];
8241
- status?: Database["public"]["Enums"]["context_item_status"];
8242
- status_note?: string | null;
8243
- status_updated_at?: string;
8244
- status_updated_by?: string | null;
8245
- tags?: string[];
8246
- template_item_key?: string | null;
8247
- updated_at?: string;
8248
- updated_by?: string | null;
8249
- value_type?: Database["public"]["Enums"]["context_value_type"];
8250
- version?: number;
8251
- };
8252
- Update: {
8253
- allowed_reference_types?: string[] | null;
8254
- allowed_scope_type_ids?: string[] | null;
8255
- category?: string | null;
8256
- created_at?: string;
8257
- created_by?: string | null;
8258
- custom_component?: Json | null;
8259
- custom_fields?: Json;
8260
- deleted_at?: string | null;
8261
- depends_on?: string[];
8262
- description?: string;
8263
- display_name?: string;
8264
- feed_config?: Json;
8265
- feed_error?: string | null;
8266
- feed_status?: string | null;
8267
- feed_type?: Database["public"]["Enums"]["context_feed_type"];
8268
- fetch_hint?: Database["public"]["Enums"]["context_fetch_hint"];
8269
- id?: string;
8270
- is_active?: boolean;
8271
- key?: string;
8272
- last_fed_at?: string | null;
8273
- last_verified_at?: string | null;
8274
- max_items?: number;
8275
- metadata?: Json;
8276
- next_review_at?: string | null;
8277
- reference_source?: Json | null;
8278
- refresh_task_id?: string | null;
8279
- review_interval_days?: number | null;
8280
- scope_type_id?: string;
8281
- sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8282
- slug?: string;
8283
- sort_order?: number;
8284
- source_type?: Database["public"]["Enums"]["context_source_type"];
8285
- status?: Database["public"]["Enums"]["context_item_status"];
8286
- status_note?: string | null;
8287
- status_updated_at?: string;
8288
- status_updated_by?: string | null;
8289
- tags?: string[];
8290
- template_item_key?: string | null;
8291
- updated_at?: string;
8292
- updated_by?: string | null;
8293
- value_type?: Database["public"]["Enums"]["context_value_type"];
8294
- version?: number;
8295
- };
8296
- Relationships: [
8297
- {
8298
- foreignKeyName: "ctx_context_items_scope_type_id_fkey";
8299
- columns: ["scope_type_id"];
8300
- isOneToOne: false;
8301
- referencedRelation: "scope_types";
8302
- referencedColumns: ["id"];
8303
- }
8304
- ];
8305
- };
8306
- context_value_refs: {
8307
- Row: {
8308
- context_item_id: string;
8309
- created_at: string;
8310
- custom_fields: Json;
8311
- id: string;
8312
- ref_key: string;
8313
- ref_type: string;
8314
- scope_id: string;
8315
- value_id: string;
8316
- };
8317
- Insert: {
8318
- context_item_id: string;
8319
- created_at?: string;
8320
- custom_fields?: Json;
8321
- id?: string;
8322
- ref_key: string;
8323
- ref_type: string;
8324
- scope_id: string;
8325
- value_id: string;
8326
- };
8327
- Update: {
8328
- context_item_id?: string;
8329
- created_at?: string;
8330
- custom_fields?: Json;
8331
- id?: string;
8332
- ref_key?: string;
8333
- ref_type?: string;
8334
- scope_id?: string;
8335
- value_id?: string;
8336
- };
8337
- Relationships: [
8338
- {
8339
- foreignKeyName: "context_value_refs_value_id_fkey";
8340
- columns: ["value_id"];
8341
- isOneToOne: false;
8342
- referencedRelation: "context_item_values";
8343
- referencedColumns: ["id"];
8344
- }
8345
- ];
8346
- };
8347
- scope_dataset_instances: {
8348
- Row: {
8349
- context_item_id: string;
8350
- created_at: string;
8351
- created_by: string | null;
8352
- custom_fields: Json;
8353
- dataset_id: string;
8354
- id: string;
8355
- metadata: Json;
8356
- organization_id: string;
8357
- scope_id: string;
8358
- template_id: string;
8359
- template_version: number;
8360
- };
8361
- Insert: {
8362
- context_item_id: string;
8363
- created_at?: string;
8364
- created_by?: string | null;
8365
- custom_fields?: Json;
8366
- dataset_id: string;
8367
- id?: string;
8368
- metadata?: Json;
8369
- organization_id: string;
8370
- scope_id: string;
8371
- template_id: string;
8372
- template_version: number;
8373
- };
8374
- Update: {
8375
- context_item_id?: string;
8376
- created_at?: string;
8377
- created_by?: string | null;
8378
- custom_fields?: Json;
8379
- dataset_id?: string;
8380
- id?: string;
8381
- metadata?: Json;
8382
- organization_id?: string;
8383
- scope_id?: string;
8384
- template_id?: string;
8385
- template_version?: number;
8386
- };
8387
8076
  Relationships: [];
8388
8077
  };
8389
8078
  scope_door_registry: {
@@ -8407,638 +8096,1805 @@ export type ChatDatabase = {
8407
8096
  };
8408
8097
  Relationships: [];
8409
8098
  };
8410
- scope_types: {
8099
+ system_context_item: {
8100
+ Row: {
8101
+ created_at: string;
8102
+ created_by: string | null;
8103
+ deleted_at: string | null;
8104
+ description: string | null;
8105
+ display_name: string;
8106
+ feed_config: Json;
8107
+ feed_error: string | null;
8108
+ feed_status: string | null;
8109
+ feed_type: Database["public"]["Enums"]["context_feed_type"];
8110
+ id: string;
8111
+ is_active: boolean;
8112
+ item_class: string;
8113
+ key: string;
8114
+ last_fed_at: string | null;
8115
+ metadata: Json;
8116
+ organization_id: string;
8117
+ published_to_web: boolean;
8118
+ published_to_web_at: string | null;
8119
+ published_to_web_by: string | null;
8120
+ sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8121
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8122
+ sort_order: number;
8123
+ updated_at: string;
8124
+ updated_by: string | null;
8125
+ value: Json | null;
8126
+ value_type: Database["public"]["Enums"]["context_value_type"];
8127
+ version: number;
8128
+ visibility: Database["platform"]["Enums"]["visibility"];
8129
+ };
8130
+ Insert: {
8131
+ created_at?: string;
8132
+ created_by?: string | null;
8133
+ deleted_at?: string | null;
8134
+ description?: string | null;
8135
+ display_name: string;
8136
+ feed_config?: Json;
8137
+ feed_error?: string | null;
8138
+ feed_status?: string | null;
8139
+ feed_type?: Database["public"]["Enums"]["context_feed_type"];
8140
+ id?: string;
8141
+ is_active?: boolean;
8142
+ item_class?: string;
8143
+ key: string;
8144
+ last_fed_at?: string | null;
8145
+ metadata?: Json;
8146
+ organization_id: string;
8147
+ published_to_web?: boolean;
8148
+ published_to_web_at?: string | null;
8149
+ published_to_web_by?: string | null;
8150
+ sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8151
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8152
+ sort_order?: number;
8153
+ updated_at?: string;
8154
+ updated_by?: string | null;
8155
+ value?: Json | null;
8156
+ value_type?: Database["public"]["Enums"]["context_value_type"];
8157
+ version?: number;
8158
+ visibility?: Database["platform"]["Enums"]["visibility"];
8159
+ };
8160
+ Update: {
8161
+ created_at?: string;
8162
+ created_by?: string | null;
8163
+ deleted_at?: string | null;
8164
+ description?: string | null;
8165
+ display_name?: string;
8166
+ feed_config?: Json;
8167
+ feed_error?: string | null;
8168
+ feed_status?: string | null;
8169
+ feed_type?: Database["public"]["Enums"]["context_feed_type"];
8170
+ id?: string;
8171
+ is_active?: boolean;
8172
+ item_class?: string;
8173
+ key?: string;
8174
+ last_fed_at?: string | null;
8175
+ metadata?: Json;
8176
+ organization_id?: string;
8177
+ published_to_web?: boolean;
8178
+ published_to_web_at?: string | null;
8179
+ published_to_web_by?: string | null;
8180
+ sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8181
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8182
+ sort_order?: number;
8183
+ updated_at?: string;
8184
+ updated_by?: string | null;
8185
+ value?: Json | null;
8186
+ value_type?: Database["public"]["Enums"]["context_value_type"];
8187
+ version?: number;
8188
+ visibility?: Database["platform"]["Enums"]["visibility"];
8189
+ };
8190
+ Relationships: [];
8191
+ };
8192
+ template_context_items: {
8193
+ Row: {
8194
+ created_at: string;
8195
+ deleted_at: string | null;
8196
+ description: string;
8197
+ display_name: string;
8198
+ id: string;
8199
+ key: string;
8200
+ metadata: Json;
8201
+ sort_order: number;
8202
+ template_scope_type_id: string;
8203
+ value_type: Database["public"]["Enums"]["context_value_type"];
8204
+ };
8205
+ Insert: {
8206
+ created_at?: string;
8207
+ deleted_at?: string | null;
8208
+ description?: string;
8209
+ display_name: string;
8210
+ id?: string;
8211
+ key: string;
8212
+ metadata?: Json;
8213
+ sort_order?: number;
8214
+ template_scope_type_id: string;
8215
+ value_type?: Database["public"]["Enums"]["context_value_type"];
8216
+ };
8217
+ Update: {
8218
+ created_at?: string;
8219
+ deleted_at?: string | null;
8220
+ description?: string;
8221
+ display_name?: string;
8222
+ id?: string;
8223
+ key?: string;
8224
+ metadata?: Json;
8225
+ sort_order?: number;
8226
+ template_scope_type_id?: string;
8227
+ value_type?: Database["public"]["Enums"]["context_value_type"];
8228
+ };
8229
+ Relationships: [
8230
+ {
8231
+ foreignKeyName: "ctx_template_context_items_template_scope_type_id_fkey";
8232
+ columns: ["template_scope_type_id"];
8233
+ isOneToOne: false;
8234
+ referencedRelation: "template_scope_types";
8235
+ referencedColumns: ["id"];
8236
+ }
8237
+ ];
8238
+ };
8239
+ template_scope_types: {
8240
+ Row: {
8241
+ created_at: string;
8242
+ deleted_at: string | null;
8243
+ description: string;
8244
+ icon: string;
8245
+ id: string;
8246
+ key: string;
8247
+ label_plural: string;
8248
+ label_singular: string;
8249
+ max_assignments_per_entity: number | null;
8250
+ metadata: Json;
8251
+ parent_template_type_id: string | null;
8252
+ sort_order: number;
8253
+ template_id: string;
8254
+ };
8255
+ Insert: {
8256
+ created_at?: string;
8257
+ deleted_at?: string | null;
8258
+ description?: string;
8259
+ icon?: string;
8260
+ id?: string;
8261
+ key: string;
8262
+ label_plural: string;
8263
+ label_singular: string;
8264
+ max_assignments_per_entity?: number | null;
8265
+ metadata?: Json;
8266
+ parent_template_type_id?: string | null;
8267
+ sort_order?: number;
8268
+ template_id: string;
8269
+ };
8270
+ Update: {
8271
+ created_at?: string;
8272
+ deleted_at?: string | null;
8273
+ description?: string;
8274
+ icon?: string;
8275
+ id?: string;
8276
+ key?: string;
8277
+ label_plural?: string;
8278
+ label_singular?: string;
8279
+ max_assignments_per_entity?: number | null;
8280
+ metadata?: Json;
8281
+ parent_template_type_id?: string | null;
8282
+ sort_order?: number;
8283
+ template_id?: string;
8284
+ };
8285
+ Relationships: [
8286
+ {
8287
+ foreignKeyName: "ctx_template_scope_types_parent_template_type_id_fkey";
8288
+ columns: ["parent_template_type_id"];
8289
+ isOneToOne: false;
8290
+ referencedRelation: "template_scope_types";
8291
+ referencedColumns: ["id"];
8292
+ },
8293
+ {
8294
+ foreignKeyName: "ctx_template_scope_types_template_id_fkey";
8295
+ columns: ["template_id"];
8296
+ isOneToOne: false;
8297
+ referencedRelation: "templates";
8298
+ referencedColumns: ["id"];
8299
+ }
8300
+ ];
8301
+ };
8302
+ templates: {
8303
+ Row: {
8304
+ audience: string;
8305
+ category: string;
8306
+ created_at: string;
8307
+ deleted_at: string | null;
8308
+ description: string;
8309
+ icon: string;
8310
+ id: string;
8311
+ is_active: boolean;
8312
+ key: string;
8313
+ metadata: Json;
8314
+ name: string;
8315
+ sort_order: number;
8316
+ updated_at: string;
8317
+ };
8318
+ Insert: {
8319
+ audience?: string;
8320
+ category: string;
8321
+ created_at?: string;
8322
+ deleted_at?: string | null;
8323
+ description?: string;
8324
+ icon?: string;
8325
+ id?: string;
8326
+ is_active?: boolean;
8327
+ key: string;
8328
+ metadata?: Json;
8329
+ name: string;
8330
+ sort_order?: number;
8331
+ updated_at?: string;
8332
+ };
8333
+ Update: {
8334
+ audience?: string;
8335
+ category?: string;
8336
+ created_at?: string;
8337
+ deleted_at?: string | null;
8338
+ description?: string;
8339
+ icon?: string;
8340
+ id?: string;
8341
+ is_active?: boolean;
8342
+ key?: string;
8343
+ metadata?: Json;
8344
+ name?: string;
8345
+ sort_order?: number;
8346
+ updated_at?: string;
8347
+ };
8348
+ Relationships: [];
8349
+ };
8350
+ user_active_context: {
8351
+ Row: {
8352
+ active_entity_id: string | null;
8353
+ active_entity_type: string | null;
8354
+ app_source: string;
8355
+ created_at: string;
8356
+ created_by: string | null;
8357
+ custom_fields: Json;
8358
+ id: string;
8359
+ last_activity: string;
8360
+ metadata: Json;
8361
+ organization_id: string;
8362
+ project_id: string | null;
8363
+ task_id: string | null;
8364
+ updated_at: string;
8365
+ updated_by: string | null;
8366
+ user_id: string;
8367
+ version: number;
8368
+ };
8369
+ Insert: {
8370
+ active_entity_id?: string | null;
8371
+ active_entity_type?: string | null;
8372
+ app_source?: string;
8373
+ created_at?: string;
8374
+ created_by?: string | null;
8375
+ custom_fields?: Json;
8376
+ id?: string;
8377
+ last_activity?: string;
8378
+ metadata?: Json;
8379
+ organization_id: string;
8380
+ project_id?: string | null;
8381
+ task_id?: string | null;
8382
+ updated_at?: string;
8383
+ updated_by?: string | null;
8384
+ user_id: string;
8385
+ version?: number;
8386
+ };
8387
+ Update: {
8388
+ active_entity_id?: string | null;
8389
+ active_entity_type?: string | null;
8390
+ app_source?: string;
8391
+ created_at?: string;
8392
+ created_by?: string | null;
8393
+ custom_fields?: Json;
8394
+ id?: string;
8395
+ last_activity?: string;
8396
+ metadata?: Json;
8397
+ organization_id?: string;
8398
+ project_id?: string | null;
8399
+ task_id?: string | null;
8400
+ updated_at?: string;
8401
+ updated_by?: string | null;
8402
+ user_id?: string;
8403
+ version?: number;
8404
+ };
8405
+ Relationships: [];
8406
+ };
8407
+ };
8408
+ Views: {
8409
+ [_ in never]: never;
8410
+ };
8411
+ Functions: {
8412
+ _assert_scope_readable: {
8413
+ Args: {
8414
+ p_level?: string;
8415
+ p_scope_id: string;
8416
+ };
8417
+ Returns: undefined;
8418
+ };
8419
+ _readable_scope_ids: {
8420
+ Args: never;
8421
+ Returns: string[];
8422
+ };
8423
+ _scope_denial_message: {
8424
+ Args: {
8425
+ p_level?: string;
8426
+ p_scope_id: string;
8427
+ };
8428
+ Returns: string;
8429
+ };
8430
+ _scope_readable: {
8431
+ Args: {
8432
+ p_level?: string;
8433
+ p_scope_id: string;
8434
+ };
8435
+ Returns: boolean;
8436
+ };
8437
+ _scope_readable_for: {
8438
+ Args: {
8439
+ p_level?: string;
8440
+ p_scope_id: string;
8441
+ p_user_id: string;
8442
+ };
8443
+ Returns: boolean;
8444
+ };
8445
+ _strip_sql_noise: {
8446
+ Args: {
8447
+ p_src: string;
8448
+ };
8449
+ Returns: string;
8450
+ };
8451
+ deliverable_system_context_items: {
8452
+ Args: never;
8453
+ Returns: {
8454
+ created_at: string;
8455
+ created_by: string | null;
8456
+ deleted_at: string | null;
8457
+ description: string | null;
8458
+ display_name: string;
8459
+ feed_config: Json;
8460
+ feed_error: string | null;
8461
+ feed_status: string | null;
8462
+ feed_type: Database["public"]["Enums"]["context_feed_type"];
8463
+ id: string;
8464
+ is_active: boolean;
8465
+ item_class: string;
8466
+ key: string;
8467
+ last_fed_at: string | null;
8468
+ metadata: Json;
8469
+ organization_id: string;
8470
+ published_to_web: boolean;
8471
+ published_to_web_at: string | null;
8472
+ published_to_web_by: string | null;
8473
+ sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8474
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8475
+ sort_order: number;
8476
+ updated_at: string;
8477
+ updated_by: string | null;
8478
+ value: Json | null;
8479
+ value_type: Database["public"]["Enums"]["context_value_type"];
8480
+ version: number;
8481
+ visibility: Database["platform"]["Enums"]["visibility"];
8482
+ }[];
8483
+ SetofOptions: {
8484
+ from: "*";
8485
+ to: "system_context_item";
8486
+ isOneToOne: false;
8487
+ isSetofReturn: true;
8488
+ };
8489
+ };
8490
+ named_system_context_items: {
8491
+ Args: {
8492
+ p_refs: string[];
8493
+ };
8494
+ Returns: {
8495
+ created_at: string;
8496
+ created_by: string | null;
8497
+ deleted_at: string | null;
8498
+ description: string | null;
8499
+ display_name: string;
8500
+ feed_config: Json;
8501
+ feed_error: string | null;
8502
+ feed_status: string | null;
8503
+ feed_type: Database["public"]["Enums"]["context_feed_type"];
8504
+ id: string;
8505
+ is_active: boolean;
8506
+ item_class: string;
8507
+ key: string;
8508
+ last_fed_at: string | null;
8509
+ metadata: Json;
8510
+ organization_id: string;
8511
+ published_to_web: boolean;
8512
+ published_to_web_at: string | null;
8513
+ published_to_web_by: string | null;
8514
+ sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8515
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8516
+ sort_order: number;
8517
+ updated_at: string;
8518
+ updated_by: string | null;
8519
+ value: Json | null;
8520
+ value_type: Database["public"]["Enums"]["context_value_type"];
8521
+ version: number;
8522
+ visibility: Database["platform"]["Enums"]["visibility"];
8523
+ }[];
8524
+ SetofOptions: {
8525
+ from: "*";
8526
+ to: "system_context_item";
8527
+ isOneToOne: false;
8528
+ isSetofReturn: true;
8529
+ };
8530
+ };
8531
+ parse_reference_fence: {
8532
+ Args: {
8533
+ p_value_text: string;
8534
+ };
8535
+ Returns: Json;
8536
+ };
8537
+ reference_item_ref_key: {
8538
+ Args: {
8539
+ p_item: Json;
8540
+ p_type: string;
8541
+ };
8542
+ Returns: string;
8543
+ };
8544
+ slugify: {
8545
+ Args: {
8546
+ p: string;
8547
+ };
8548
+ Returns: string;
8549
+ };
8550
+ system_item_refs_or_defaults: {
8551
+ Args: {
8552
+ p_refs: string[];
8553
+ };
8554
+ Returns: string[];
8555
+ };
8556
+ validate_dataset_template_source: {
8557
+ Args: {
8558
+ p_org_id: string;
8559
+ p_source: Json;
8560
+ };
8561
+ Returns: string;
8562
+ };
8563
+ };
8564
+ Enums: {
8565
+ [_ in never]: never;
8566
+ };
8567
+ CompositeTypes: {
8568
+ [_ in never]: never;
8569
+ };
8570
+ };
8571
+ deprecated: {
8572
+ Tables: {
8573
+ context_item_values: {
8574
+ Row: {
8575
+ authored_by: string | null;
8576
+ change_summary: string | null;
8577
+ char_count: number | null;
8578
+ context_item_id: string;
8579
+ created_at: string;
8580
+ custom_fields: Json;
8581
+ data_point_count: number | null;
8582
+ has_nested_objects: boolean;
8583
+ id: string;
8584
+ is_current: boolean;
8585
+ metadata: Json;
8586
+ organization_id: string;
8587
+ scope_id: string;
8588
+ source_type: Database["public"]["Enums"]["context_source_type"];
8589
+ value_boolean: boolean | null;
8590
+ value_date: string | null;
8591
+ value_document_size_bytes: number | null;
8592
+ value_document_url: string | null;
8593
+ value_json: Json | null;
8594
+ value_number: number | null;
8595
+ value_reference_id: string | null;
8596
+ value_reference_type: string | null;
8597
+ value_text: string | null;
8598
+ value_time: string | null;
8599
+ value_timestamp: string | null;
8600
+ version: number;
8601
+ };
8602
+ Insert: {
8603
+ authored_by?: string | null;
8604
+ change_summary?: string | null;
8605
+ char_count?: number | null;
8606
+ context_item_id: string;
8607
+ created_at?: string;
8608
+ custom_fields?: Json;
8609
+ data_point_count?: number | null;
8610
+ has_nested_objects?: boolean;
8611
+ id?: string;
8612
+ is_current?: boolean;
8613
+ metadata?: Json;
8614
+ organization_id: string;
8615
+ scope_id: string;
8616
+ source_type?: Database["public"]["Enums"]["context_source_type"];
8617
+ value_boolean?: boolean | null;
8618
+ value_date?: string | null;
8619
+ value_document_size_bytes?: number | null;
8620
+ value_document_url?: string | null;
8621
+ value_json?: Json | null;
8622
+ value_number?: number | null;
8623
+ value_reference_id?: string | null;
8624
+ value_reference_type?: string | null;
8625
+ value_text?: string | null;
8626
+ value_time?: string | null;
8627
+ value_timestamp?: string | null;
8628
+ version?: number;
8629
+ };
8630
+ Update: {
8631
+ authored_by?: string | null;
8632
+ change_summary?: string | null;
8633
+ char_count?: number | null;
8634
+ context_item_id?: string;
8635
+ created_at?: string;
8636
+ custom_fields?: Json;
8637
+ data_point_count?: number | null;
8638
+ has_nested_objects?: boolean;
8639
+ id?: string;
8640
+ is_current?: boolean;
8641
+ metadata?: Json;
8642
+ organization_id?: string;
8643
+ scope_id?: string;
8644
+ source_type?: Database["public"]["Enums"]["context_source_type"];
8645
+ value_boolean?: boolean | null;
8646
+ value_date?: string | null;
8647
+ value_document_size_bytes?: number | null;
8648
+ value_document_url?: string | null;
8649
+ value_json?: Json | null;
8650
+ value_number?: number | null;
8651
+ value_reference_id?: string | null;
8652
+ value_reference_type?: string | null;
8653
+ value_text?: string | null;
8654
+ value_time?: string | null;
8655
+ value_timestamp?: string | null;
8656
+ version?: number;
8657
+ };
8658
+ Relationships: [];
8659
+ };
8660
+ context_items: {
8661
+ Row: {
8662
+ allowed_reference_types: string[] | null;
8663
+ allowed_scope_type_ids: string[] | null;
8664
+ category: string | null;
8665
+ created_at: string;
8666
+ created_by: string | null;
8667
+ custom_component: Json | null;
8668
+ custom_fields: Json;
8669
+ deleted_at: string | null;
8670
+ depends_on: string[];
8671
+ description: string;
8672
+ display_name: string;
8673
+ feed_config: Json;
8674
+ feed_error: string | null;
8675
+ feed_status: string | null;
8676
+ feed_type: Database["public"]["Enums"]["context_feed_type"];
8677
+ fetch_hint: Database["public"]["Enums"]["context_fetch_hint"];
8678
+ id: string;
8679
+ is_active: boolean;
8680
+ key: string;
8681
+ last_fed_at: string | null;
8682
+ last_verified_at: string | null;
8683
+ max_items: number;
8684
+ metadata: Json;
8685
+ next_review_at: string | null;
8686
+ reference_source: Json | null;
8687
+ refresh_task_id: string | null;
8688
+ review_interval_days: number | null;
8689
+ scope_type_id: string;
8690
+ sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8691
+ slug: string;
8692
+ sort_order: number;
8693
+ source_type: Database["public"]["Enums"]["context_source_type"];
8694
+ status: Database["public"]["Enums"]["context_item_status"];
8695
+ status_note: string | null;
8696
+ status_updated_at: string;
8697
+ status_updated_by: string | null;
8698
+ tags: string[];
8699
+ template_item_key: string | null;
8700
+ updated_at: string;
8701
+ updated_by: string | null;
8702
+ value_type: Database["public"]["Enums"]["context_value_type"];
8703
+ version: number;
8704
+ };
8705
+ Insert: {
8706
+ allowed_reference_types?: string[] | null;
8707
+ allowed_scope_type_ids?: string[] | null;
8708
+ category?: string | null;
8709
+ created_at?: string;
8710
+ created_by?: string | null;
8711
+ custom_component?: Json | null;
8712
+ custom_fields?: Json;
8713
+ deleted_at?: string | null;
8714
+ depends_on?: string[];
8715
+ description?: string;
8716
+ display_name: string;
8717
+ feed_config?: Json;
8718
+ feed_error?: string | null;
8719
+ feed_status?: string | null;
8720
+ feed_type?: Database["public"]["Enums"]["context_feed_type"];
8721
+ fetch_hint?: Database["public"]["Enums"]["context_fetch_hint"];
8722
+ id?: string;
8723
+ is_active?: boolean;
8724
+ key: string;
8725
+ last_fed_at?: string | null;
8726
+ last_verified_at?: string | null;
8727
+ max_items?: number;
8728
+ metadata?: Json;
8729
+ next_review_at?: string | null;
8730
+ reference_source?: Json | null;
8731
+ refresh_task_id?: string | null;
8732
+ review_interval_days?: number | null;
8733
+ scope_type_id: string;
8734
+ sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8735
+ slug: string;
8736
+ sort_order?: number;
8737
+ source_type?: Database["public"]["Enums"]["context_source_type"];
8738
+ status?: Database["public"]["Enums"]["context_item_status"];
8739
+ status_note?: string | null;
8740
+ status_updated_at?: string;
8741
+ status_updated_by?: string | null;
8742
+ tags?: string[];
8743
+ template_item_key?: string | null;
8744
+ updated_at?: string;
8745
+ updated_by?: string | null;
8746
+ value_type?: Database["public"]["Enums"]["context_value_type"];
8747
+ version?: number;
8748
+ };
8749
+ Update: {
8750
+ allowed_reference_types?: string[] | null;
8751
+ allowed_scope_type_ids?: string[] | null;
8752
+ category?: string | null;
8753
+ created_at?: string;
8754
+ created_by?: string | null;
8755
+ custom_component?: Json | null;
8756
+ custom_fields?: Json;
8757
+ deleted_at?: string | null;
8758
+ depends_on?: string[];
8759
+ description?: string;
8760
+ display_name?: string;
8761
+ feed_config?: Json;
8762
+ feed_error?: string | null;
8763
+ feed_status?: string | null;
8764
+ feed_type?: Database["public"]["Enums"]["context_feed_type"];
8765
+ fetch_hint?: Database["public"]["Enums"]["context_fetch_hint"];
8766
+ id?: string;
8767
+ is_active?: boolean;
8768
+ key?: string;
8769
+ last_fed_at?: string | null;
8770
+ last_verified_at?: string | null;
8771
+ max_items?: number;
8772
+ metadata?: Json;
8773
+ next_review_at?: string | null;
8774
+ reference_source?: Json | null;
8775
+ refresh_task_id?: string | null;
8776
+ review_interval_days?: number | null;
8777
+ scope_type_id?: string;
8778
+ sensitivity?: Database["public"]["Enums"]["context_sensitivity"];
8779
+ slug?: string;
8780
+ sort_order?: number;
8781
+ source_type?: Database["public"]["Enums"]["context_source_type"];
8782
+ status?: Database["public"]["Enums"]["context_item_status"];
8783
+ status_note?: string | null;
8784
+ status_updated_at?: string;
8785
+ status_updated_by?: string | null;
8786
+ tags?: string[];
8787
+ template_item_key?: string | null;
8788
+ updated_at?: string;
8789
+ updated_by?: string | null;
8790
+ value_type?: Database["public"]["Enums"]["context_value_type"];
8791
+ version?: number;
8792
+ };
8793
+ Relationships: [
8794
+ {
8795
+ foreignKeyName: "ctx_context_items_scope_type_id_fkey";
8796
+ columns: ["scope_type_id"];
8797
+ isOneToOne: false;
8798
+ referencedRelation: "scope_types";
8799
+ referencedColumns: ["id"];
8800
+ }
8801
+ ];
8802
+ };
8803
+ context_value_refs: {
8804
+ Row: {
8805
+ context_item_id: string;
8806
+ created_at: string;
8807
+ custom_fields: Json;
8808
+ id: string;
8809
+ ref_key: string;
8810
+ ref_type: string;
8811
+ scope_id: string;
8812
+ value_id: string;
8813
+ };
8814
+ Insert: {
8815
+ context_item_id: string;
8816
+ created_at?: string;
8817
+ custom_fields?: Json;
8818
+ id?: string;
8819
+ ref_key: string;
8820
+ ref_type: string;
8821
+ scope_id: string;
8822
+ value_id: string;
8823
+ };
8824
+ Update: {
8825
+ context_item_id?: string;
8826
+ created_at?: string;
8827
+ custom_fields?: Json;
8828
+ id?: string;
8829
+ ref_key?: string;
8830
+ ref_type?: string;
8831
+ scope_id?: string;
8832
+ value_id?: string;
8833
+ };
8834
+ Relationships: [
8835
+ {
8836
+ foreignKeyName: "context_value_refs_value_id_fkey";
8837
+ columns: ["value_id"];
8838
+ isOneToOne: false;
8839
+ referencedRelation: "context_item_values";
8840
+ referencedColumns: ["id"];
8841
+ }
8842
+ ];
8843
+ };
8844
+ custom_entity_definition: {
8845
+ Row: {
8846
+ ai_exposure: string;
8847
+ allow_record_sharing: boolean;
8848
+ archived_at: string | null;
8849
+ color: string | null;
8850
+ created_at: string;
8851
+ created_by: string | null;
8852
+ custom_fields: Json;
8853
+ deleted_at: string | null;
8854
+ description: string | null;
8855
+ icon: string | null;
8856
+ id: string;
8857
+ is_searchable: boolean;
8858
+ max_fields: number | null;
8859
+ max_records: number | null;
8860
+ metadata: Json;
8861
+ name: string;
8862
+ name_plural: string;
8863
+ organization_id: string;
8864
+ published_to_web: boolean;
8865
+ published_to_web_at: string | null;
8866
+ published_to_web_by: string | null;
8867
+ record_name_backfill_done: number;
8868
+ record_name_backfill_error: string | null;
8869
+ record_name_backfill_state: string;
8870
+ record_name_template: string | null;
8871
+ sensitivity_tier: string;
8872
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8873
+ slug: string;
8874
+ updated_at: string;
8875
+ updated_by: string | null;
8876
+ validation_mode: string;
8877
+ version: number;
8878
+ visibility: Database["platform"]["Enums"]["visibility"];
8879
+ };
8880
+ Insert: {
8881
+ ai_exposure?: string;
8882
+ allow_record_sharing?: boolean;
8883
+ archived_at?: string | null;
8884
+ color?: string | null;
8885
+ created_at?: string;
8886
+ created_by?: string | null;
8887
+ custom_fields?: Json;
8888
+ deleted_at?: string | null;
8889
+ description?: string | null;
8890
+ icon?: string | null;
8891
+ id?: string;
8892
+ is_searchable?: boolean;
8893
+ max_fields?: number | null;
8894
+ max_records?: number | null;
8895
+ metadata?: Json;
8896
+ name: string;
8897
+ name_plural: string;
8898
+ organization_id: string;
8899
+ published_to_web?: boolean;
8900
+ published_to_web_at?: string | null;
8901
+ published_to_web_by?: string | null;
8902
+ record_name_backfill_done?: number;
8903
+ record_name_backfill_error?: string | null;
8904
+ record_name_backfill_state?: string;
8905
+ record_name_template?: string | null;
8906
+ sensitivity_tier?: string;
8907
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8908
+ slug: string;
8909
+ updated_at?: string;
8910
+ updated_by?: string | null;
8911
+ validation_mode?: string;
8912
+ version?: number;
8913
+ visibility?: Database["platform"]["Enums"]["visibility"];
8914
+ };
8915
+ Update: {
8916
+ ai_exposure?: string;
8917
+ allow_record_sharing?: boolean;
8918
+ archived_at?: string | null;
8919
+ color?: string | null;
8920
+ created_at?: string;
8921
+ created_by?: string | null;
8922
+ custom_fields?: Json;
8923
+ deleted_at?: string | null;
8924
+ description?: string | null;
8925
+ icon?: string | null;
8926
+ id?: string;
8927
+ is_searchable?: boolean;
8928
+ max_fields?: number | null;
8929
+ max_records?: number | null;
8930
+ metadata?: Json;
8931
+ name?: string;
8932
+ name_plural?: string;
8933
+ organization_id?: string;
8934
+ published_to_web?: boolean;
8935
+ published_to_web_at?: string | null;
8936
+ published_to_web_by?: string | null;
8937
+ record_name_backfill_done?: number;
8938
+ record_name_backfill_error?: string | null;
8939
+ record_name_backfill_state?: string;
8940
+ record_name_template?: string | null;
8941
+ sensitivity_tier?: string;
8942
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8943
+ slug?: string;
8944
+ updated_at?: string;
8945
+ updated_by?: string | null;
8946
+ validation_mode?: string;
8947
+ version?: number;
8948
+ visibility?: Database["platform"]["Enums"]["visibility"];
8949
+ };
8950
+ Relationships: [];
8951
+ };
8952
+ custom_record: {
8411
8953
  Row: {
8412
- color: string;
8413
8954
  created_at: string;
8414
8955
  created_by: string | null;
8415
8956
  custom_fields: Json;
8416
- default_variable_keys: string[];
8957
+ data: Json;
8417
8958
  deleted_at: string | null;
8418
- description: string;
8419
- icon: string;
8959
+ entity_definition_id: string;
8960
+ external_key: string | null;
8420
8961
  id: string;
8421
- label_plural: string;
8422
- label_singular: string;
8423
- max_assignments_per_entity: number | null;
8424
8962
  metadata: Json;
8425
8963
  organization_id: string;
8426
- parent_type_id: string | null;
8427
- slug: string;
8428
- sort_order: number;
8964
+ record_name: string | null;
8965
+ search_vector: unknown;
8429
8966
  updated_at: string;
8430
8967
  updated_by: string | null;
8431
8968
  version: number;
8432
8969
  };
8433
8970
  Insert: {
8434
- color?: string;
8435
8971
  created_at?: string;
8436
8972
  created_by?: string | null;
8437
8973
  custom_fields?: Json;
8438
- default_variable_keys?: string[];
8974
+ data?: Json;
8439
8975
  deleted_at?: string | null;
8440
- description?: string;
8441
- icon?: string;
8976
+ entity_definition_id: string;
8977
+ external_key?: string | null;
8442
8978
  id?: string;
8443
- label_plural: string;
8444
- label_singular: string;
8445
- max_assignments_per_entity?: number | null;
8446
8979
  metadata?: Json;
8447
8980
  organization_id: string;
8448
- parent_type_id?: string | null;
8449
- slug: string;
8450
- sort_order?: number;
8981
+ record_name?: string | null;
8982
+ search_vector?: unknown;
8451
8983
  updated_at?: string;
8452
8984
  updated_by?: string | null;
8453
8985
  version?: number;
8454
8986
  };
8455
8987
  Update: {
8456
- color?: string;
8457
8988
  created_at?: string;
8458
8989
  created_by?: string | null;
8459
8990
  custom_fields?: Json;
8460
- default_variable_keys?: string[];
8991
+ data?: Json;
8461
8992
  deleted_at?: string | null;
8462
- description?: string;
8463
- icon?: string;
8993
+ entity_definition_id?: string;
8994
+ external_key?: string | null;
8464
8995
  id?: string;
8465
- label_plural?: string;
8466
- label_singular?: string;
8467
- max_assignments_per_entity?: number | null;
8468
8996
  metadata?: Json;
8469
8997
  organization_id?: string;
8470
- parent_type_id?: string | null;
8471
- slug?: string;
8472
- sort_order?: number;
8998
+ record_name?: string | null;
8999
+ search_vector?: unknown;
8473
9000
  updated_at?: string;
8474
9001
  updated_by?: string | null;
8475
9002
  version?: number;
8476
9003
  };
8477
9004
  Relationships: [
8478
9005
  {
8479
- foreignKeyName: "ctx_scope_types_parent_type_id_fkey";
8480
- columns: ["parent_type_id"];
9006
+ foreignKeyName: "custom_record_entity_definition_id_fkey";
9007
+ columns: ["entity_definition_id"];
8481
9008
  isOneToOne: false;
8482
- referencedRelation: "scope_types";
9009
+ referencedRelation: "custom_entity_definition";
8483
9010
  referencedColumns: ["id"];
8484
9011
  }
8485
9012
  ];
8486
9013
  };
8487
- scopes: {
9014
+ flexible_data: {
8488
9015
  Row: {
9016
+ category_id: string | null;
8489
9017
  created_at: string;
8490
9018
  created_by: string | null;
8491
9019
  custom_fields: Json;
9020
+ data: Json;
8492
9021
  deleted_at: string | null;
8493
- description: string;
8494
9022
  id: string;
9023
+ label: string;
8495
9024
  metadata: Json;
8496
- name: string;
8497
9025
  organization_id: string;
8498
- parent_scope_id: string | null;
8499
9026
  published_to_web: boolean;
8500
9027
  published_to_web_at: string | null;
8501
9028
  published_to_web_by: string | null;
8502
- scope_type_id: string;
8503
- settings: Json;
8504
9029
  shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8505
- slug: string;
8506
- sort_order: number;
9030
+ slug: string | null;
8507
9031
  updated_at: string;
8508
9032
  updated_by: string | null;
8509
9033
  version: number;
8510
9034
  visibility: Database["platform"]["Enums"]["visibility"];
8511
9035
  };
8512
9036
  Insert: {
9037
+ category_id?: string | null;
8513
9038
  created_at?: string;
8514
9039
  created_by?: string | null;
8515
9040
  custom_fields?: Json;
9041
+ data?: Json;
8516
9042
  deleted_at?: string | null;
8517
- description?: string;
8518
9043
  id?: string;
9044
+ label: string;
8519
9045
  metadata?: Json;
8520
- name: string;
8521
9046
  organization_id: string;
8522
- parent_scope_id?: string | null;
8523
9047
  published_to_web?: boolean;
8524
9048
  published_to_web_at?: string | null;
8525
9049
  published_to_web_by?: string | null;
8526
- scope_type_id: string;
8527
- settings?: Json;
8528
9050
  shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8529
- slug: string;
8530
- sort_order?: number;
9051
+ slug?: string | null;
8531
9052
  updated_at?: string;
8532
9053
  updated_by?: string | null;
8533
9054
  version?: number;
8534
9055
  visibility?: Database["platform"]["Enums"]["visibility"];
8535
9056
  };
8536
9057
  Update: {
9058
+ category_id?: string | null;
8537
9059
  created_at?: string;
8538
9060
  created_by?: string | null;
8539
9061
  custom_fields?: Json;
9062
+ data?: Json;
8540
9063
  deleted_at?: string | null;
8541
- description?: string;
8542
9064
  id?: string;
9065
+ label?: string;
8543
9066
  metadata?: Json;
8544
- name?: string;
8545
9067
  organization_id?: string;
8546
- parent_scope_id?: string | null;
8547
9068
  published_to_web?: boolean;
8548
9069
  published_to_web_at?: string | null;
8549
9070
  published_to_web_by?: string | null;
8550
- scope_type_id?: string;
8551
- settings?: Json;
8552
9071
  shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
8553
- slug?: string;
8554
- sort_order?: number;
9072
+ slug?: string | null;
8555
9073
  updated_at?: string;
8556
9074
  updated_by?: string | null;
8557
9075
  version?: number;
8558
9076
  visibility?: Database["platform"]["Enums"]["visibility"];
8559
9077
  };
8560
- Relationships: [
8561
- {
8562
- foreignKeyName: "ctx_scopes_parent_scope_id_fkey";
8563
- columns: ["parent_scope_id"];
8564
- isOneToOne: false;
8565
- referencedRelation: "scopes";
8566
- referencedColumns: ["id"];
8567
- },
8568
- {
8569
- foreignKeyName: "ctx_scopes_scope_type_id_fkey";
8570
- columns: ["scope_type_id"];
8571
- isOneToOne: false;
8572
- referencedRelation: "scope_types";
8573
- referencedColumns: ["id"];
8574
- }
8575
- ];
9078
+ Relationships: [];
8576
9079
  };
8577
- system_context_item: {
9080
+ pb_claim_appeals_fd31de: {
8578
9081
  Row: {
9082
+ claim_id: string;
8579
9083
  created_at: string;
8580
9084
  created_by: string | null;
9085
+ custom_fields: Json;
8581
9086
  deleted_at: string | null;
8582
- description: string | null;
8583
- 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"];
9087
+ filed_on: string | null;
8588
9088
  id: string;
8589
- is_active: boolean;
8590
- item_class: string;
8591
- key: string;
8592
- last_fed_at: string | null;
8593
9089
  metadata: Json;
8594
9090
  organization_id: string;
8595
9091
  published_to_web: boolean;
8596
9092
  published_to_web_at: string | null;
8597
9093
  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;
9094
+ reason: string;
8601
9095
  updated_at: string;
8602
9096
  updated_by: string | null;
8603
- value: Json | null;
8604
- value_type: Database["public"]["Enums"]["context_value_type"];
8605
9097
  version: number;
8606
9098
  visibility: Database["platform"]["Enums"]["visibility"];
8607
9099
  };
8608
9100
  Insert: {
9101
+ claim_id: string;
8609
9102
  created_at?: string;
8610
9103
  created_by?: string | null;
9104
+ custom_fields?: Json;
8611
9105
  deleted_at?: string | null;
8612
- description?: string | null;
8613
- 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"];
9106
+ filed_on?: string | null;
8618
9107
  id?: string;
8619
- is_active?: boolean;
8620
- item_class?: string;
8621
- key: string;
8622
- last_fed_at?: string | null;
8623
9108
  metadata?: Json;
8624
9109
  organization_id: string;
8625
9110
  published_to_web?: boolean;
8626
9111
  published_to_web_at?: string | null;
8627
9112
  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;
9113
+ reason: string;
8631
9114
  updated_at?: string;
8632
9115
  updated_by?: string | null;
8633
- value?: Json | null;
8634
- value_type?: Database["public"]["Enums"]["context_value_type"];
8635
9116
  version?: number;
8636
9117
  visibility?: Database["platform"]["Enums"]["visibility"];
8637
9118
  };
8638
9119
  Update: {
9120
+ claim_id?: string;
8639
9121
  created_at?: string;
8640
9122
  created_by?: string | null;
9123
+ custom_fields?: Json;
8641
9124
  deleted_at?: string | null;
8642
- description?: string | null;
8643
- 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"];
9125
+ filed_on?: string | null;
8648
9126
  id?: string;
8649
- is_active?: boolean;
8650
- item_class?: string;
8651
- key?: string;
8652
- last_fed_at?: string | null;
8653
9127
  metadata?: Json;
8654
9128
  organization_id?: string;
8655
9129
  published_to_web?: boolean;
8656
9130
  published_to_web_at?: string | null;
8657
9131
  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;
9132
+ reason?: string;
8661
9133
  updated_at?: string;
8662
9134
  updated_by?: string | null;
8663
- value?: Json | null;
8664
- value_type?: Database["public"]["Enums"]["context_value_type"];
8665
9135
  version?: number;
8666
9136
  visibility?: Database["platform"]["Enums"]["visibility"];
8667
9137
  };
8668
9138
  Relationships: [];
8669
9139
  };
8670
- template_context_items: {
9140
+ pb_insurance_claims_fd31de: {
9141
+ Row: {
9142
+ billed_cents: number | null;
9143
+ carrier: string;
9144
+ created_at: string;
9145
+ created_by: string | null;
9146
+ custom_fields: Json;
9147
+ deleted_at: string | null;
9148
+ id: string;
9149
+ metadata: Json;
9150
+ organization_id: string;
9151
+ published_to_web: boolean;
9152
+ published_to_web_at: string | null;
9153
+ published_to_web_by: string | null;
9154
+ status: string | null;
9155
+ updated_at: string;
9156
+ updated_by: string | null;
9157
+ version: number;
9158
+ visibility: Database["platform"]["Enums"]["visibility"];
9159
+ };
9160
+ Insert: {
9161
+ billed_cents?: number | null;
9162
+ carrier: string;
9163
+ created_at?: string;
9164
+ created_by?: string | null;
9165
+ custom_fields?: Json;
9166
+ deleted_at?: string | null;
9167
+ id?: string;
9168
+ metadata?: Json;
9169
+ organization_id: string;
9170
+ published_to_web?: boolean;
9171
+ published_to_web_at?: string | null;
9172
+ published_to_web_by?: string | null;
9173
+ status?: string | null;
9174
+ updated_at?: string;
9175
+ updated_by?: string | null;
9176
+ version?: number;
9177
+ visibility?: Database["platform"]["Enums"]["visibility"];
9178
+ };
9179
+ Update: {
9180
+ billed_cents?: number | null;
9181
+ carrier?: string;
9182
+ created_at?: string;
9183
+ created_by?: string | null;
9184
+ custom_fields?: Json;
9185
+ deleted_at?: string | null;
9186
+ id?: string;
9187
+ metadata?: Json;
9188
+ organization_id?: string;
9189
+ published_to_web?: boolean;
9190
+ published_to_web_at?: string | null;
9191
+ published_to_web_by?: string | null;
9192
+ status?: string | null;
9193
+ updated_at?: string;
9194
+ updated_by?: string | null;
9195
+ version?: number;
9196
+ visibility?: Database["platform"]["Enums"]["visibility"];
9197
+ };
9198
+ Relationships: [];
9199
+ };
9200
+ provlock_recall_visits_all8u5: {
9201
+ Row: {
9202
+ booked: boolean | null;
9203
+ created_at: string;
9204
+ created_by: string | null;
9205
+ custom_fields: Json;
9206
+ deleted_at: string | null;
9207
+ due_on: string | null;
9208
+ id: string;
9209
+ metadata: Json;
9210
+ organization_id: string;
9211
+ patient_ref: string;
9212
+ published_to_web: boolean;
9213
+ published_to_web_at: string | null;
9214
+ published_to_web_by: string | null;
9215
+ updated_at: string;
9216
+ updated_by: string | null;
9217
+ version: number;
9218
+ visibility: Database["platform"]["Enums"]["visibility"];
9219
+ };
9220
+ Insert: {
9221
+ booked?: boolean | null;
9222
+ created_at?: string;
9223
+ created_by?: string | null;
9224
+ custom_fields?: Json;
9225
+ deleted_at?: string | null;
9226
+ due_on?: string | null;
9227
+ id?: string;
9228
+ metadata?: Json;
9229
+ organization_id: string;
9230
+ patient_ref: string;
9231
+ published_to_web?: boolean;
9232
+ published_to_web_at?: string | null;
9233
+ published_to_web_by?: string | null;
9234
+ updated_at?: string;
9235
+ updated_by?: string | null;
9236
+ version?: number;
9237
+ visibility?: Database["platform"]["Enums"]["visibility"];
9238
+ };
9239
+ Update: {
9240
+ booked?: boolean | null;
9241
+ created_at?: string;
9242
+ created_by?: string | null;
9243
+ custom_fields?: Json;
9244
+ deleted_at?: string | null;
9245
+ due_on?: string | null;
9246
+ id?: string;
9247
+ metadata?: Json;
9248
+ organization_id?: string;
9249
+ patient_ref?: string;
9250
+ published_to_web?: boolean;
9251
+ published_to_web_at?: string | null;
9252
+ published_to_web_by?: string | null;
9253
+ updated_at?: string;
9254
+ updated_by?: string | null;
9255
+ version?: number;
9256
+ visibility?: Database["platform"]["Enums"]["visibility"];
9257
+ };
9258
+ Relationships: [];
9259
+ };
9260
+ scope_dataset_instances: {
9261
+ Row: {
9262
+ context_item_id: string;
9263
+ created_at: string;
9264
+ created_by: string | null;
9265
+ custom_fields: Json;
9266
+ dataset_id: string;
9267
+ id: string;
9268
+ metadata: Json;
9269
+ organization_id: string;
9270
+ scope_id: string;
9271
+ template_id: string;
9272
+ template_version: number;
9273
+ };
9274
+ Insert: {
9275
+ context_item_id: string;
9276
+ created_at?: string;
9277
+ created_by?: string | null;
9278
+ custom_fields?: Json;
9279
+ dataset_id: string;
9280
+ id?: string;
9281
+ metadata?: Json;
9282
+ organization_id: string;
9283
+ scope_id: string;
9284
+ template_id: string;
9285
+ template_version: number;
9286
+ };
9287
+ Update: {
9288
+ context_item_id?: string;
9289
+ created_at?: string;
9290
+ created_by?: string | null;
9291
+ custom_fields?: Json;
9292
+ dataset_id?: string;
9293
+ id?: string;
9294
+ metadata?: Json;
9295
+ organization_id?: string;
9296
+ scope_id?: string;
9297
+ template_id?: string;
9298
+ template_version?: number;
9299
+ };
9300
+ Relationships: [
9301
+ {
9302
+ foreignKeyName: "scope_dataset_instances_dataset_id_fkey";
9303
+ columns: ["dataset_id"];
9304
+ isOneToOne: true;
9305
+ referencedRelation: "udt_datasets";
9306
+ referencedColumns: ["id"];
9307
+ }
9308
+ ];
9309
+ };
9310
+ scope_types: {
8671
9311
  Row: {
9312
+ color: string;
8672
9313
  created_at: string;
9314
+ created_by: string | null;
9315
+ custom_fields: Json;
9316
+ default_variable_keys: string[];
8673
9317
  deleted_at: string | null;
8674
9318
  description: string;
8675
- display_name: string;
9319
+ icon: string;
8676
9320
  id: string;
8677
- key: string;
9321
+ label_plural: string;
9322
+ label_singular: string;
9323
+ max_assignments_per_entity: number | null;
8678
9324
  metadata: Json;
9325
+ organization_id: string;
9326
+ parent_type_id: string | null;
9327
+ slug: string;
8679
9328
  sort_order: number;
8680
- template_scope_type_id: string;
8681
- value_type: Database["public"]["Enums"]["context_value_type"];
9329
+ updated_at: string;
9330
+ updated_by: string | null;
9331
+ version: number;
8682
9332
  };
8683
9333
  Insert: {
9334
+ color?: string;
8684
9335
  created_at?: string;
9336
+ created_by?: string | null;
9337
+ custom_fields?: Json;
9338
+ default_variable_keys?: string[];
8685
9339
  deleted_at?: string | null;
8686
9340
  description?: string;
8687
- display_name: string;
9341
+ icon?: string;
8688
9342
  id?: string;
8689
- key: string;
9343
+ label_plural: string;
9344
+ label_singular: string;
9345
+ max_assignments_per_entity?: number | null;
8690
9346
  metadata?: Json;
9347
+ organization_id: string;
9348
+ parent_type_id?: string | null;
9349
+ slug: string;
8691
9350
  sort_order?: number;
8692
- template_scope_type_id: string;
8693
- value_type?: Database["public"]["Enums"]["context_value_type"];
9351
+ updated_at?: string;
9352
+ updated_by?: string | null;
9353
+ version?: number;
8694
9354
  };
8695
9355
  Update: {
9356
+ color?: string;
8696
9357
  created_at?: string;
9358
+ created_by?: string | null;
9359
+ custom_fields?: Json;
9360
+ default_variable_keys?: string[];
8697
9361
  deleted_at?: string | null;
8698
9362
  description?: string;
8699
- display_name?: string;
9363
+ icon?: string;
8700
9364
  id?: string;
8701
- key?: string;
9365
+ label_plural?: string;
9366
+ label_singular?: string;
9367
+ max_assignments_per_entity?: number | null;
8702
9368
  metadata?: Json;
9369
+ organization_id?: string;
9370
+ parent_type_id?: string | null;
9371
+ slug?: string;
8703
9372
  sort_order?: number;
8704
- template_scope_type_id?: string;
8705
- value_type?: Database["public"]["Enums"]["context_value_type"];
9373
+ updated_at?: string;
9374
+ updated_by?: string | null;
9375
+ version?: number;
8706
9376
  };
8707
9377
  Relationships: [
8708
9378
  {
8709
- foreignKeyName: "ctx_template_context_items_template_scope_type_id_fkey";
8710
- columns: ["template_scope_type_id"];
9379
+ foreignKeyName: "ctx_scope_types_parent_type_id_fkey";
9380
+ columns: ["parent_type_id"];
8711
9381
  isOneToOne: false;
8712
- referencedRelation: "template_scope_types";
9382
+ referencedRelation: "scope_types";
8713
9383
  referencedColumns: ["id"];
8714
9384
  }
8715
9385
  ];
8716
9386
  };
8717
- template_scope_types: {
9387
+ scopes: {
8718
9388
  Row: {
8719
9389
  created_at: string;
9390
+ created_by: string | null;
9391
+ custom_fields: Json;
8720
9392
  deleted_at: string | null;
8721
9393
  description: string;
8722
- icon: string;
8723
9394
  id: string;
8724
- key: string;
8725
- label_plural: string;
8726
- label_singular: string;
8727
- max_assignments_per_entity: number | null;
8728
9395
  metadata: Json;
8729
- parent_template_type_id: string | null;
9396
+ name: string;
9397
+ organization_id: string;
9398
+ parent_scope_id: string | null;
9399
+ published_to_web: boolean;
9400
+ published_to_web_at: string | null;
9401
+ published_to_web_by: string | null;
9402
+ scope_type_id: string;
9403
+ settings: Json;
9404
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
9405
+ slug: string;
8730
9406
  sort_order: number;
8731
- template_id: string;
9407
+ updated_at: string;
9408
+ updated_by: string | null;
9409
+ version: number;
9410
+ visibility: Database["platform"]["Enums"]["visibility"];
8732
9411
  };
8733
9412
  Insert: {
8734
9413
  created_at?: string;
9414
+ created_by?: string | null;
9415
+ custom_fields?: Json;
8735
9416
  deleted_at?: string | null;
8736
9417
  description?: string;
8737
- icon?: string;
8738
9418
  id?: string;
8739
- key: string;
8740
- label_plural: string;
8741
- label_singular: string;
8742
- max_assignments_per_entity?: number | null;
8743
9419
  metadata?: Json;
8744
- parent_template_type_id?: string | null;
8745
- sort_order?: number;
8746
- template_id: string;
9420
+ name: string;
9421
+ organization_id: string;
9422
+ parent_scope_id?: string | null;
9423
+ published_to_web?: boolean;
9424
+ published_to_web_at?: string | null;
9425
+ published_to_web_by?: string | null;
9426
+ scope_type_id: string;
9427
+ settings?: Json;
9428
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9429
+ slug: string;
9430
+ sort_order?: number;
9431
+ updated_at?: string;
9432
+ updated_by?: string | null;
9433
+ version?: number;
9434
+ visibility?: Database["platform"]["Enums"]["visibility"];
9435
+ };
9436
+ Update: {
9437
+ created_at?: string;
9438
+ created_by?: string | null;
9439
+ custom_fields?: Json;
9440
+ deleted_at?: string | null;
9441
+ description?: string;
9442
+ id?: string;
9443
+ metadata?: Json;
9444
+ name?: string;
9445
+ organization_id?: string;
9446
+ parent_scope_id?: string | null;
9447
+ published_to_web?: boolean;
9448
+ published_to_web_at?: string | null;
9449
+ published_to_web_by?: string | null;
9450
+ scope_type_id?: string;
9451
+ settings?: Json;
9452
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9453
+ slug?: string;
9454
+ sort_order?: number;
9455
+ updated_at?: string;
9456
+ updated_by?: string | null;
9457
+ version?: number;
9458
+ visibility?: Database["platform"]["Enums"]["visibility"];
9459
+ };
9460
+ Relationships: [
9461
+ {
9462
+ foreignKeyName: "ctx_scopes_parent_scope_id_fkey";
9463
+ columns: ["parent_scope_id"];
9464
+ isOneToOne: false;
9465
+ referencedRelation: "scopes";
9466
+ referencedColumns: ["id"];
9467
+ },
9468
+ {
9469
+ foreignKeyName: "ctx_scopes_scope_type_id_fkey";
9470
+ columns: ["scope_type_id"];
9471
+ isOneToOne: false;
9472
+ referencedRelation: "scope_types";
9473
+ referencedColumns: ["id"];
9474
+ }
9475
+ ];
9476
+ };
9477
+ udt_dataset_fields: {
9478
+ Row: {
9479
+ created_at: string;
9480
+ created_by: string | null;
9481
+ custom_fields: Json;
9482
+ data_type: Database["public"]["Enums"]["field_data_type"];
9483
+ default_value: Json | null;
9484
+ deleted_at: string | null;
9485
+ display_name: string;
9486
+ field_name: string;
9487
+ field_order: number;
9488
+ id: string;
9489
+ is_public: boolean;
9490
+ is_required: boolean;
9491
+ metadata: Json;
9492
+ organization_id: string;
9493
+ table_id: string;
9494
+ updated_at: string;
9495
+ updated_by: string | null;
9496
+ user_id: string;
9497
+ validation_rules: Json | null;
9498
+ version: number;
9499
+ };
9500
+ Insert: {
9501
+ created_at?: string;
9502
+ created_by?: string | null;
9503
+ custom_fields?: Json;
9504
+ data_type?: Database["public"]["Enums"]["field_data_type"];
9505
+ default_value?: Json | null;
9506
+ deleted_at?: string | null;
9507
+ display_name: string;
9508
+ field_name: string;
9509
+ field_order?: number;
9510
+ id?: string;
9511
+ is_public?: boolean;
9512
+ is_required?: boolean;
9513
+ metadata?: Json;
9514
+ organization_id: string;
9515
+ table_id: string;
9516
+ updated_at?: string;
9517
+ updated_by?: string | null;
9518
+ user_id: string;
9519
+ validation_rules?: Json | null;
9520
+ version?: number;
8747
9521
  };
8748
9522
  Update: {
8749
9523
  created_at?: string;
9524
+ created_by?: string | null;
9525
+ custom_fields?: Json;
9526
+ data_type?: Database["public"]["Enums"]["field_data_type"];
9527
+ default_value?: Json | null;
8750
9528
  deleted_at?: string | null;
8751
- description?: string;
8752
- icon?: string;
9529
+ display_name?: string;
9530
+ field_name?: string;
9531
+ field_order?: number;
8753
9532
  id?: string;
8754
- key?: string;
8755
- label_plural?: string;
8756
- label_singular?: string;
8757
- max_assignments_per_entity?: number | null;
9533
+ is_public?: boolean;
9534
+ is_required?: boolean;
8758
9535
  metadata?: Json;
8759
- parent_template_type_id?: string | null;
8760
- sort_order?: number;
8761
- template_id?: string;
9536
+ organization_id?: string;
9537
+ table_id?: string;
9538
+ updated_at?: string;
9539
+ updated_by?: string | null;
9540
+ user_id?: string;
9541
+ validation_rules?: Json | null;
9542
+ version?: number;
8762
9543
  };
8763
9544
  Relationships: [
8764
9545
  {
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";
8773
- columns: ["template_id"];
9546
+ foreignKeyName: "udt_dataset_fields_dataset_id_fkey";
9547
+ columns: ["table_id"];
8774
9548
  isOneToOne: false;
8775
- referencedRelation: "templates";
9549
+ referencedRelation: "udt_datasets";
8776
9550
  referencedColumns: ["id"];
8777
9551
  }
8778
9552
  ];
8779
9553
  };
8780
- templates: {
9554
+ udt_dataset_row_versions: {
9555
+ Row: {
9556
+ change_kind: Database["public"]["Enums"]["row_change_kind"];
9557
+ changed_at: string;
9558
+ changed_by: string | null;
9559
+ custom_fields: Json;
9560
+ data: Json | null;
9561
+ id: number;
9562
+ prior_data: Json | null;
9563
+ reason: string | null;
9564
+ row_id: string;
9565
+ table_id: string;
9566
+ };
9567
+ Insert: {
9568
+ change_kind: Database["public"]["Enums"]["row_change_kind"];
9569
+ changed_at?: string;
9570
+ changed_by?: string | null;
9571
+ custom_fields?: Json;
9572
+ data?: Json | null;
9573
+ id?: number;
9574
+ prior_data?: Json | null;
9575
+ reason?: string | null;
9576
+ row_id: string;
9577
+ table_id: string;
9578
+ };
9579
+ Update: {
9580
+ change_kind?: Database["public"]["Enums"]["row_change_kind"];
9581
+ changed_at?: string;
9582
+ changed_by?: string | null;
9583
+ custom_fields?: Json;
9584
+ data?: Json | null;
9585
+ id?: number;
9586
+ prior_data?: Json | null;
9587
+ reason?: string | null;
9588
+ row_id?: string;
9589
+ table_id?: string;
9590
+ };
9591
+ Relationships: [];
9592
+ };
9593
+ udt_dataset_rows: {
8781
9594
  Row: {
8782
- audience: string;
8783
- category: string;
8784
9595
  created_at: string;
9596
+ created_by: string | null;
9597
+ custom_fields: Json;
9598
+ data: Json;
8785
9599
  deleted_at: string | null;
8786
- description: string;
8787
- icon: string;
8788
9600
  id: string;
8789
- is_active: boolean;
8790
- key: string;
9601
+ is_public: boolean;
8791
9602
  metadata: Json;
8792
- name: string;
8793
- sort_order: number;
9603
+ organization_id: string;
9604
+ source_row_ref: string | null;
9605
+ table_id: string;
8794
9606
  updated_at: string;
9607
+ updated_by: string | null;
9608
+ user_id: string;
9609
+ version: number;
8795
9610
  };
8796
9611
  Insert: {
8797
- audience?: string;
8798
- category: string;
8799
9612
  created_at?: string;
9613
+ created_by?: string | null;
9614
+ custom_fields?: Json;
9615
+ data: Json;
8800
9616
  deleted_at?: string | null;
8801
- description?: string;
8802
- icon?: string;
8803
9617
  id?: string;
8804
- is_active?: boolean;
8805
- key: string;
9618
+ is_public?: boolean;
8806
9619
  metadata?: Json;
8807
- name: string;
8808
- sort_order?: number;
9620
+ organization_id: string;
9621
+ source_row_ref?: string | null;
9622
+ table_id: string;
8809
9623
  updated_at?: string;
9624
+ updated_by?: string | null;
9625
+ user_id: string;
9626
+ version?: number;
8810
9627
  };
8811
9628
  Update: {
8812
- audience?: string;
8813
- category?: string;
8814
9629
  created_at?: string;
9630
+ created_by?: string | null;
9631
+ custom_fields?: Json;
9632
+ data?: Json;
8815
9633
  deleted_at?: string | null;
8816
- description?: string;
8817
- icon?: string;
8818
9634
  id?: string;
8819
- is_active?: boolean;
8820
- key?: string;
9635
+ is_public?: boolean;
8821
9636
  metadata?: Json;
8822
- name?: string;
8823
- sort_order?: number;
9637
+ organization_id?: string;
9638
+ source_row_ref?: string | null;
9639
+ table_id?: string;
8824
9640
  updated_at?: string;
9641
+ updated_by?: string | null;
9642
+ user_id?: string;
9643
+ version?: number;
8825
9644
  };
8826
- Relationships: [];
9645
+ Relationships: [
9646
+ {
9647
+ foreignKeyName: "udt_dataset_rows_dataset_id_fkey";
9648
+ columns: ["table_id"];
9649
+ isOneToOne: false;
9650
+ referencedRelation: "udt_datasets";
9651
+ referencedColumns: ["id"];
9652
+ }
9653
+ ];
8827
9654
  };
8828
- user_active_context: {
9655
+ udt_datasets: {
8829
9656
  Row: {
8830
- active_entity_id: string | null;
8831
- active_entity_type: string | null;
8832
- app_source: string;
8833
9657
  created_at: string;
8834
- created_by: string | null;
9658
+ created_by: string;
8835
9659
  custom_fields: Json;
9660
+ deleted_at: string | null;
9661
+ description: string | null;
8836
9662
  id: string;
8837
- last_activity: string;
9663
+ is_public: boolean;
8838
9664
  metadata: Json;
8839
9665
  organization_id: string;
8840
9666
  project_id: string | null;
9667
+ published_to_web: boolean;
9668
+ published_to_web_at: string | null;
9669
+ published_to_web_by: string | null;
9670
+ row_ordering_config: Json | null;
9671
+ sheet_index: number | null;
9672
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
9673
+ sync_source: Json | null;
9674
+ table_name: string;
8841
9675
  task_id: string | null;
9676
+ template_id: string | null;
9677
+ template_version: number | null;
8842
9678
  updated_at: string;
8843
9679
  updated_by: string | null;
8844
9680
  user_id: string;
9681
+ validation_mode: string;
8845
9682
  version: number;
9683
+ visibility: Database["platform"]["Enums"]["visibility"];
9684
+ workbook_id: string | null;
8846
9685
  };
8847
9686
  Insert: {
8848
- active_entity_id?: string | null;
8849
- active_entity_type?: string | null;
8850
- app_source?: string;
8851
9687
  created_at?: string;
8852
- created_by?: string | null;
9688
+ created_by: string;
8853
9689
  custom_fields?: Json;
9690
+ deleted_at?: string | null;
9691
+ description?: string | null;
8854
9692
  id?: string;
8855
- last_activity?: string;
9693
+ is_public?: boolean;
8856
9694
  metadata?: Json;
8857
9695
  organization_id: string;
8858
9696
  project_id?: string | null;
9697
+ published_to_web?: boolean;
9698
+ published_to_web_at?: string | null;
9699
+ published_to_web_by?: string | null;
9700
+ row_ordering_config?: Json | null;
9701
+ sheet_index?: number | null;
9702
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9703
+ sync_source?: Json | null;
9704
+ table_name: string;
8859
9705
  task_id?: string | null;
9706
+ template_id?: string | null;
9707
+ template_version?: number | null;
8860
9708
  updated_at?: string;
8861
9709
  updated_by?: string | null;
8862
9710
  user_id: string;
9711
+ validation_mode?: string;
8863
9712
  version?: number;
9713
+ visibility: Database["platform"]["Enums"]["visibility"];
9714
+ workbook_id?: string | null;
8864
9715
  };
8865
9716
  Update: {
8866
- active_entity_id?: string | null;
8867
- active_entity_type?: string | null;
8868
- app_source?: string;
8869
9717
  created_at?: string;
8870
- created_by?: string | null;
9718
+ created_by?: string;
8871
9719
  custom_fields?: Json;
9720
+ deleted_at?: string | null;
9721
+ description?: string | null;
8872
9722
  id?: string;
8873
- last_activity?: string;
9723
+ is_public?: boolean;
8874
9724
  metadata?: Json;
8875
9725
  organization_id?: string;
8876
9726
  project_id?: string | null;
9727
+ published_to_web?: boolean;
9728
+ published_to_web_at?: string | null;
9729
+ published_to_web_by?: string | null;
9730
+ row_ordering_config?: Json | null;
9731
+ sheet_index?: number | null;
9732
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9733
+ sync_source?: Json | null;
9734
+ table_name?: string;
8877
9735
  task_id?: string | null;
9736
+ template_id?: string | null;
9737
+ template_version?: number | null;
8878
9738
  updated_at?: string;
8879
9739
  updated_by?: string | null;
8880
9740
  user_id?: string;
9741
+ validation_mode?: string;
8881
9742
  version?: number;
9743
+ visibility?: Database["platform"]["Enums"]["visibility"];
9744
+ workbook_id?: string | null;
8882
9745
  };
8883
9746
  Relationships: [];
8884
9747
  };
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;
8912
- };
8913
- Returns: boolean;
8914
- };
8915
- _scope_readable_for: {
8916
- Args: {
8917
- p_level?: string;
8918
- p_scope_id: string;
8919
- p_user_id: string;
8920
- };
8921
- Returns: boolean;
8922
- };
8923
- _strip_sql_noise: {
8924
- Args: {
8925
- p_src: string;
8926
- };
8927
- Returns: string;
8928
- };
8929
- deliverable_system_context_items: {
8930
- Args: never;
8931
- Returns: {
9748
+ udt_structured_list_items: {
9749
+ Row: {
8932
9750
  created_at: string;
8933
9751
  created_by: string | null;
9752
+ custom_fields: Json;
8934
9753
  deleted_at: string | null;
8935
9754
  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"];
9755
+ group_name: string | null;
9756
+ help_text: string | null;
9757
+ icon_name: string | null;
8941
9758
  id: string;
8942
- is_active: boolean;
8943
- item_class: string;
8944
- key: string;
8945
- last_fed_at: string | null;
9759
+ is_public: boolean | null;
9760
+ label: string | null;
9761
+ list_id: string | null;
8946
9762
  metadata: Json;
8947
- organization_id: string;
8948
- published_to_web: boolean;
8949
- published_to_web_at: string | null;
8950
- published_to_web_by: string | null;
8951
- sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8952
- shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8953
- sort_order: number;
8954
- updated_at: string;
9763
+ organization_id: string | null;
9764
+ public_read: boolean | null;
9765
+ updated_at: string | null;
8955
9766
  updated_by: string | null;
8956
- value: Json | null;
8957
- value_type: Database["public"]["Enums"]["context_value_type"];
9767
+ user_id: string | null;
8958
9768
  version: number;
8959
- visibility: Database["platform"]["Enums"]["visibility"];
8960
- }[];
8961
- SetofOptions: {
8962
- from: "*";
8963
- to: "system_context_item";
8964
- isOneToOne: false;
8965
- isSetofReturn: true;
8966
9769
  };
8967
- };
8968
- named_system_context_items: {
8969
- Args: {
8970
- p_refs: string[];
9770
+ Insert: {
9771
+ created_at?: string;
9772
+ created_by?: string | null;
9773
+ custom_fields?: Json;
9774
+ deleted_at?: string | null;
9775
+ description?: string | null;
9776
+ group_name?: string | null;
9777
+ help_text?: string | null;
9778
+ icon_name?: string | null;
9779
+ id?: string;
9780
+ is_public?: boolean | null;
9781
+ label?: string | null;
9782
+ list_id?: string | null;
9783
+ metadata?: Json;
9784
+ organization_id?: string | null;
9785
+ public_read?: boolean | null;
9786
+ updated_at?: string | null;
9787
+ updated_by?: string | null;
9788
+ user_id?: string | null;
9789
+ version?: number;
8971
9790
  };
8972
- Returns: {
9791
+ Update: {
9792
+ created_at?: string;
9793
+ created_by?: string | null;
9794
+ custom_fields?: Json;
9795
+ deleted_at?: string | null;
9796
+ description?: string | null;
9797
+ group_name?: string | null;
9798
+ help_text?: string | null;
9799
+ icon_name?: string | null;
9800
+ id?: string;
9801
+ is_public?: boolean | null;
9802
+ label?: string | null;
9803
+ list_id?: string | null;
9804
+ metadata?: Json;
9805
+ organization_id?: string | null;
9806
+ public_read?: boolean | null;
9807
+ updated_at?: string | null;
9808
+ updated_by?: string | null;
9809
+ user_id?: string | null;
9810
+ version?: number;
9811
+ };
9812
+ Relationships: [
9813
+ {
9814
+ foreignKeyName: "udt_structured_list_items_list_id_fkey";
9815
+ columns: ["list_id"];
9816
+ isOneToOne: false;
9817
+ referencedRelation: "udt_structured_lists";
9818
+ referencedColumns: ["id"];
9819
+ }
9820
+ ];
9821
+ };
9822
+ udt_structured_lists: {
9823
+ Row: {
8973
9824
  created_at: string;
8974
- created_by: string | null;
9825
+ created_by: string;
9826
+ custom_fields: Json;
8975
9827
  deleted_at: string | null;
8976
9828
  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
9829
  id: string;
8983
- is_active: boolean;
8984
- item_class: string;
8985
- key: string;
8986
- last_fed_at: string | null;
9830
+ is_public: boolean | null;
9831
+ list_name: string | null;
8987
9832
  metadata: Json;
8988
- organization_id: string;
9833
+ organization_id: string | null;
9834
+ public_read: boolean | null;
8989
9835
  published_to_web: boolean;
8990
9836
  published_to_web_at: string | null;
8991
9837
  published_to_web_by: string | null;
8992
- sensitivity: Database["public"]["Enums"]["context_sensitivity"];
8993
9838
  shown_to: Database["platform"]["Enums"]["shown_to"] | null;
8994
- sort_order: number;
8995
- updated_at: string;
9839
+ updated_at: string | null;
8996
9840
  updated_by: string | null;
8997
- value: Json | null;
8998
- value_type: Database["public"]["Enums"]["context_value_type"];
9841
+ user_id: string | null;
8999
9842
  version: number;
9000
9843
  visibility: Database["platform"]["Enums"]["visibility"];
9001
- }[];
9002
- SetofOptions: {
9003
- from: "*";
9004
- to: "system_context_item";
9005
- isOneToOne: false;
9006
- isSetofReturn: true;
9007
- };
9008
- };
9009
- parse_reference_fence: {
9010
- Args: {
9011
- p_value_text: string;
9012
- };
9013
- Returns: Json;
9014
- };
9015
- reference_item_ref_key: {
9016
- Args: {
9017
- p_item: Json;
9018
- p_type: string;
9019
9844
  };
9020
- Returns: string;
9021
- };
9022
- slugify: {
9023
- Args: {
9024
- p: string;
9025
- };
9026
- Returns: string;
9027
- };
9028
- system_item_refs_or_defaults: {
9029
- Args: {
9030
- p_refs: string[];
9845
+ Insert: {
9846
+ created_at?: string;
9847
+ created_by: string;
9848
+ custom_fields?: Json;
9849
+ deleted_at?: string | null;
9850
+ description?: string | null;
9851
+ id?: string;
9852
+ is_public?: boolean | null;
9853
+ list_name?: string | null;
9854
+ metadata?: Json;
9855
+ organization_id?: string | null;
9856
+ public_read?: boolean | null;
9857
+ published_to_web?: boolean;
9858
+ published_to_web_at?: string | null;
9859
+ published_to_web_by?: string | null;
9860
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9861
+ updated_at?: string | null;
9862
+ updated_by?: string | null;
9863
+ user_id?: string | null;
9864
+ version?: number;
9865
+ visibility: Database["platform"]["Enums"]["visibility"];
9031
9866
  };
9032
- Returns: string[];
9033
- };
9034
- validate_dataset_template_source: {
9035
- Args: {
9036
- p_org_id: string;
9037
- p_source: Json;
9867
+ Update: {
9868
+ created_at?: string;
9869
+ created_by?: string;
9870
+ custom_fields?: Json;
9871
+ deleted_at?: string | null;
9872
+ description?: string | null;
9873
+ id?: string;
9874
+ is_public?: boolean | null;
9875
+ list_name?: string | null;
9876
+ metadata?: Json;
9877
+ organization_id?: string | null;
9878
+ public_read?: boolean | null;
9879
+ published_to_web?: boolean;
9880
+ published_to_web_at?: string | null;
9881
+ published_to_web_by?: string | null;
9882
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
9883
+ updated_at?: string | null;
9884
+ updated_by?: string | null;
9885
+ user_id?: string | null;
9886
+ version?: number;
9887
+ visibility?: Database["platform"]["Enums"]["visibility"];
9038
9888
  };
9039
- Returns: string;
9889
+ Relationships: [];
9040
9890
  };
9041
9891
  };
9892
+ Views: {
9893
+ [_ in never]: never;
9894
+ };
9895
+ Functions: {
9896
+ [_ in never]: never;
9897
+ };
9042
9898
  Enums: {
9043
9899
  [_ in never]: never;
9044
9900
  };
@@ -12267,6 +13123,107 @@ export type ChatDatabase = {
12267
13123
  }
12268
13124
  ];
12269
13125
  };
13126
+ account_closure: {
13127
+ Row: {
13128
+ closed_at: string;
13129
+ created_at: string;
13130
+ created_by: string | null;
13131
+ deleted_at: string | null;
13132
+ erased_at: string | null;
13133
+ id: string;
13134
+ metadata: Json;
13135
+ organization_id: string;
13136
+ published_to_web: boolean;
13137
+ published_to_web_at: string | null;
13138
+ published_to_web_by: string | null;
13139
+ reason: string | null;
13140
+ reopened_at: string | null;
13141
+ request_ref: string | null;
13142
+ revoked: Json;
13143
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
13144
+ updated_at: string;
13145
+ updated_by: string | null;
13146
+ user_id: string;
13147
+ version: number;
13148
+ visibility: Database["platform"]["Enums"]["visibility"];
13149
+ };
13150
+ Insert: {
13151
+ closed_at?: string;
13152
+ created_at?: string;
13153
+ created_by?: string | null;
13154
+ deleted_at?: string | null;
13155
+ erased_at?: string | null;
13156
+ id?: string;
13157
+ metadata?: Json;
13158
+ organization_id: string;
13159
+ published_to_web?: boolean;
13160
+ published_to_web_at?: string | null;
13161
+ published_to_web_by?: string | null;
13162
+ reason?: string | null;
13163
+ reopened_at?: string | null;
13164
+ request_ref?: string | null;
13165
+ revoked?: Json;
13166
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
13167
+ updated_at?: string;
13168
+ updated_by?: string | null;
13169
+ user_id: string;
13170
+ version?: number;
13171
+ visibility?: Database["platform"]["Enums"]["visibility"];
13172
+ };
13173
+ Update: {
13174
+ closed_at?: string;
13175
+ created_at?: string;
13176
+ created_by?: string | null;
13177
+ deleted_at?: string | null;
13178
+ erased_at?: string | null;
13179
+ id?: string;
13180
+ metadata?: Json;
13181
+ organization_id?: string;
13182
+ published_to_web?: boolean;
13183
+ published_to_web_at?: string | null;
13184
+ published_to_web_by?: string | null;
13185
+ reason?: string | null;
13186
+ reopened_at?: string | null;
13187
+ request_ref?: string | null;
13188
+ revoked?: Json;
13189
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
13190
+ updated_at?: string;
13191
+ updated_by?: string | null;
13192
+ user_id?: string;
13193
+ version?: number;
13194
+ visibility?: Database["platform"]["Enums"]["visibility"];
13195
+ };
13196
+ Relationships: [
13197
+ {
13198
+ foreignKeyName: "account_closure_created_by_fkey";
13199
+ columns: ["created_by"];
13200
+ isOneToOne: false;
13201
+ referencedRelation: "users";
13202
+ referencedColumns: ["id"];
13203
+ },
13204
+ {
13205
+ foreignKeyName: "account_closure_organization_id_fkey";
13206
+ columns: ["organization_id"];
13207
+ isOneToOne: false;
13208
+ referencedRelation: "organizations";
13209
+ referencedColumns: ["id"];
13210
+ },
13211
+ {
13212
+ foreignKeyName: "account_closure_updated_by_fkey";
13213
+ columns: ["updated_by"];
13214
+ isOneToOne: false;
13215
+ referencedRelation: "users";
13216
+ referencedColumns: ["id"];
13217
+ },
13218
+ {
13219
+ foreignKeyName: "account_closure_user_id_fkey";
13220
+ columns: ["user_id"];
13221
+ isOneToOne: false;
13222
+ referencedRelation: "users";
13223
+ referencedColumns: ["id"];
13224
+ }
13225
+ ];
13226
+ };
12270
13227
  api_keys: {
12271
13228
  Row: {
12272
13229
  created_at: string;
@@ -12921,14 +13878,14 @@ export type ChatDatabase = {
12921
13878
  };
12922
13879
  Relationships: [
12923
13880
  {
12924
- foreignKeyName: "memberships_created_by_fkey_p";
13881
+ foreignKeyName: "memberships_created_by_fkey";
12925
13882
  columns: ["created_by"];
12926
13883
  isOneToOne: false;
12927
13884
  referencedRelation: "users";
12928
13885
  referencedColumns: ["id"];
12929
13886
  },
12930
13887
  {
12931
- foreignKeyName: "memberships_invited_by_fkey_p";
13888
+ foreignKeyName: "memberships_invited_by_fkey";
12932
13889
  columns: ["invited_by"];
12933
13890
  isOneToOne: false;
12934
13891
  referencedRelation: "users";
@@ -12942,14 +13899,14 @@ export type ChatDatabase = {
12942
13899
  referencedColumns: ["id"];
12943
13900
  },
12944
13901
  {
12945
- foreignKeyName: "memberships_updated_by_fkey_p";
13902
+ foreignKeyName: "memberships_updated_by_fkey";
12946
13903
  columns: ["updated_by"];
12947
13904
  isOneToOne: false;
12948
13905
  referencedRelation: "users";
12949
13906
  referencedColumns: ["id"];
12950
13907
  },
12951
13908
  {
12952
- foreignKeyName: "memberships_user_id_fkey_p";
13909
+ foreignKeyName: "memberships_user_id_fkey";
12953
13910
  columns: ["user_id"];
12954
13911
  isOneToOne: false;
12955
13912
  referencedRelation: "users";
@@ -13266,14 +14223,14 @@ export type ChatDatabase = {
13266
14223
  };
13267
14224
  Relationships: [
13268
14225
  {
13269
- foreignKeyName: "organizations_created_by_fkey_p";
14226
+ foreignKeyName: "organizations_created_by_fkey";
13270
14227
  columns: ["created_by"];
13271
14228
  isOneToOne: false;
13272
14229
  referencedRelation: "users";
13273
14230
  referencedColumns: ["id"];
13274
14231
  },
13275
14232
  {
13276
- foreignKeyName: "organizations_updated_by_fkey_p";
14233
+ foreignKeyName: "organizations_updated_by_fkey";
13277
14234
  columns: ["updated_by"];
13278
14235
  isOneToOne: false;
13279
14236
  referencedRelation: "users";
@@ -13342,21 +14299,21 @@ export type ChatDatabase = {
13342
14299
  referencedColumns: ["id"];
13343
14300
  },
13344
14301
  {
13345
- foreignKeyName: "permissions_created_by_fkey_p";
14302
+ foreignKeyName: "permissions_created_by_fkey";
13346
14303
  columns: ["created_by"];
13347
14304
  isOneToOne: false;
13348
14305
  referencedRelation: "users";
13349
14306
  referencedColumns: ["id"];
13350
14307
  },
13351
14308
  {
13352
- foreignKeyName: "permissions_granted_to_user_id_fkey_p";
14309
+ foreignKeyName: "permissions_granted_to_user_id_fkey";
13353
14310
  columns: ["granted_to_user_id"];
13354
14311
  isOneToOne: false;
13355
14312
  referencedRelation: "users";
13356
14313
  referencedColumns: ["id"];
13357
14314
  },
13358
14315
  {
13359
- foreignKeyName: "permissions_reviewed_by_fkey_p";
14316
+ foreignKeyName: "permissions_reviewed_by_fkey";
13360
14317
  columns: ["reviewed_by"];
13361
14318
  isOneToOne: false;
13362
14319
  referencedRelation: "users";
@@ -13364,6 +14321,103 @@ export type ChatDatabase = {
13364
14321
  }
13365
14322
  ];
13366
14323
  };
14324
+ personal_data_column: {
14325
+ Row: {
14326
+ column_name: string;
14327
+ created_at: string;
14328
+ created_by: string | null;
14329
+ handling: string;
14330
+ id: string;
14331
+ metadata: Json;
14332
+ organization_id: string;
14333
+ published_to_web: boolean;
14334
+ published_to_web_at: string | null;
14335
+ published_to_web_by: string | null;
14336
+ reason: string;
14337
+ replacement: string | null;
14338
+ schema_name: string;
14339
+ shown_to: Database["platform"]["Enums"]["shown_to"] | null;
14340
+ subject_column: string | null;
14341
+ subject_filter: string | null;
14342
+ subject_match: string;
14343
+ table_name: string;
14344
+ updated_at: string;
14345
+ updated_by: string | null;
14346
+ version: number;
14347
+ visibility: Database["platform"]["Enums"]["visibility"];
14348
+ };
14349
+ Insert: {
14350
+ column_name: string;
14351
+ created_at?: string;
14352
+ created_by?: string | null;
14353
+ handling: string;
14354
+ id?: string;
14355
+ metadata?: Json;
14356
+ organization_id: string;
14357
+ published_to_web?: boolean;
14358
+ published_to_web_at?: string | null;
14359
+ published_to_web_by?: string | null;
14360
+ reason: string;
14361
+ replacement?: string | null;
14362
+ schema_name: string;
14363
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
14364
+ subject_column?: string | null;
14365
+ subject_filter?: string | null;
14366
+ subject_match?: string;
14367
+ table_name: string;
14368
+ updated_at?: string;
14369
+ updated_by?: string | null;
14370
+ version?: number;
14371
+ visibility?: Database["platform"]["Enums"]["visibility"];
14372
+ };
14373
+ Update: {
14374
+ column_name?: string;
14375
+ created_at?: string;
14376
+ created_by?: string | null;
14377
+ handling?: string;
14378
+ id?: string;
14379
+ metadata?: Json;
14380
+ organization_id?: string;
14381
+ published_to_web?: boolean;
14382
+ published_to_web_at?: string | null;
14383
+ published_to_web_by?: string | null;
14384
+ reason?: string;
14385
+ replacement?: string | null;
14386
+ schema_name?: string;
14387
+ shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
14388
+ subject_column?: string | null;
14389
+ subject_filter?: string | null;
14390
+ subject_match?: string;
14391
+ table_name?: string;
14392
+ updated_at?: string;
14393
+ updated_by?: string | null;
14394
+ version?: number;
14395
+ visibility?: Database["platform"]["Enums"]["visibility"];
14396
+ };
14397
+ Relationships: [
14398
+ {
14399
+ foreignKeyName: "personal_data_column_created_by_fkey";
14400
+ columns: ["created_by"];
14401
+ isOneToOne: false;
14402
+ referencedRelation: "users";
14403
+ referencedColumns: ["id"];
14404
+ },
14405
+ {
14406
+ foreignKeyName: "personal_data_column_organization_id_fkey";
14407
+ columns: ["organization_id"];
14408
+ isOneToOne: false;
14409
+ referencedRelation: "organizations";
14410
+ referencedColumns: ["id"];
14411
+ },
14412
+ {
14413
+ foreignKeyName: "personal_data_column_updated_by_fkey";
14414
+ columns: ["updated_by"];
14415
+ isOneToOne: false;
14416
+ referencedRelation: "users";
14417
+ referencedColumns: ["id"];
14418
+ }
14419
+ ];
14420
+ };
13367
14421
  publish_binding: {
13368
14422
  Row: {
13369
14423
  bound_at: string;
@@ -13784,7 +14838,7 @@ export type ChatDatabase = {
13784
14838
  };
13785
14839
  Relationships: [
13786
14840
  {
13787
- foreignKeyName: "memberships_invited_by_fkey_p";
14841
+ foreignKeyName: "memberships_invited_by_fkey";
13788
14842
  columns: ["invited_by"];
13789
14843
  isOneToOne: false;
13790
14844
  referencedRelation: "users";
@@ -13798,7 +14852,7 @@ export type ChatDatabase = {
13798
14852
  referencedColumns: ["id"];
13799
14853
  },
13800
14854
  {
13801
- foreignKeyName: "memberships_user_id_fkey_p";
14855
+ foreignKeyName: "memberships_user_id_fkey";
13802
14856
  columns: ["user_id"];
13803
14857
  isOneToOne: false;
13804
14858
  referencedRelation: "users";
@@ -14294,6 +15348,12 @@ export type ChatDatabase = {
14294
15348
  Args: never;
14295
15349
  Returns: string[];
14296
15350
  };
15351
+ arm_fixture_delete: {
15352
+ Args: {
15353
+ p_ids: string[];
15354
+ };
15355
+ Returns: number;
15356
+ };
14297
15357
  asks_about_caller: {
14298
15358
  Args: {
14299
15359
  p_function?: string;
@@ -14475,6 +15535,13 @@ export type ChatDatabase = {
14475
15535
  };
14476
15536
  Returns: boolean;
14477
15537
  };
15538
+ close_account: {
15539
+ Args: {
15540
+ p_reason?: string;
15541
+ p_user?: string;
15542
+ };
15543
+ Returns: Json;
15544
+ };
14478
15545
  component_original_lane: {
14479
15546
  Args: {
14480
15547
  p_schema: string;
@@ -14672,6 +15739,13 @@ export type ChatDatabase = {
14672
15739
  user_id: string;
14673
15740
  }[];
14674
15741
  };
15742
+ erase_account: {
15743
+ Args: {
15744
+ p_request_ref: string;
15745
+ p_user: string;
15746
+ };
15747
+ Returns: Json;
15748
+ };
14675
15749
  external_principal_card: {
14676
15750
  Args: {
14677
15751
  p_user_id?: string;
@@ -15246,6 +16320,14 @@ export type ChatDatabase = {
15246
16320
  why: string;
15247
16321
  }[];
15248
16322
  };
16323
+ personal_data_unregistered: {
16324
+ Args: never;
16325
+ Returns: {
16326
+ column_name: string;
16327
+ schema_name: string;
16328
+ table_name: string;
16329
+ }[];
16330
+ };
15249
16331
  personal_opens_row: {
15250
16332
  Args: {
15251
16333
  p_id: string;
@@ -15492,6 +16574,13 @@ export type ChatDatabase = {
15492
16574
  };
15493
16575
  Returns: Json;
15494
16576
  };
16577
+ reopen_account: {
16578
+ Args: {
16579
+ p_reason?: string;
16580
+ p_user: string;
16581
+ };
16582
+ Returns: Json;
16583
+ };
15495
16584
  reserved_namespace: {
15496
16585
  Args: never;
15497
16586
  Returns: {
@@ -16335,6 +17424,7 @@ export type ChatDatabase = {
16335
17424
  required_output_keys: string[];
16336
17425
  shown_to: Database["platform"]["Enums"]["shown_to"] | null;
16337
17426
  source_mandate_id: string | null;
17427
+ typed_input_complete: boolean;
16338
17428
  updated_at: string;
16339
17429
  updated_by: string | null;
16340
17430
  version: number;
@@ -16380,6 +17470,7 @@ export type ChatDatabase = {
16380
17470
  required_output_keys?: string[];
16381
17471
  shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
16382
17472
  source_mandate_id?: string | null;
17473
+ typed_input_complete?: boolean;
16383
17474
  updated_at?: string;
16384
17475
  updated_by?: string | null;
16385
17476
  version?: number;
@@ -16425,6 +17516,7 @@ export type ChatDatabase = {
16425
17516
  required_output_keys?: string[];
16426
17517
  shown_to?: Database["platform"]["Enums"]["shown_to"] | null;
16427
17518
  source_mandate_id?: string | null;
17519
+ typed_input_complete?: boolean;
16428
17520
  updated_at?: string;
16429
17521
  updated_by?: string | null;
16430
17522
  version?: number;
@@ -23612,6 +24704,84 @@ export type ChatDatabase = {
23612
24704
  };
23613
24705
  Relationships: [];
23614
24706
  };
24707
+ public_compat_wrapper: {
24708
+ Row: {
24709
+ created_at: string;
24710
+ expires_at: string;
24711
+ forwarder_oid: unknown;
24712
+ identity: string;
24713
+ owner_schema: string;
24714
+ };
24715
+ Insert: {
24716
+ created_at?: string;
24717
+ expires_at: string;
24718
+ forwarder_oid?: unknown;
24719
+ identity: string;
24720
+ owner_schema: string;
24721
+ };
24722
+ Update: {
24723
+ created_at?: string;
24724
+ expires_at?: string;
24725
+ forwarder_oid?: unknown;
24726
+ identity?: string;
24727
+ owner_schema?: string;
24728
+ };
24729
+ Relationships: [];
24730
+ };
24731
+ public_placement_baseline: {
24732
+ Row: {
24733
+ identity: string;
24734
+ object_type: string;
24735
+ taken_at: string;
24736
+ };
24737
+ Insert: {
24738
+ identity: string;
24739
+ object_type: string;
24740
+ taken_at?: string;
24741
+ };
24742
+ Update: {
24743
+ identity?: string;
24744
+ object_type?: string;
24745
+ taken_at?: string;
24746
+ };
24747
+ Relationships: [];
24748
+ };
24749
+ public_placement_domain: {
24750
+ Row: {
24751
+ prefix: string;
24752
+ schema_name: string;
24753
+ };
24754
+ Insert: {
24755
+ prefix: string;
24756
+ schema_name: string;
24757
+ };
24758
+ Update: {
24759
+ prefix?: string;
24760
+ schema_name?: string;
24761
+ };
24762
+ Relationships: [];
24763
+ };
24764
+ public_restore_permit: {
24765
+ Row: {
24766
+ approved_by: string;
24767
+ expires_at: string;
24768
+ identity: string;
24769
+ reason: string;
24770
+ };
24771
+ Insert: {
24772
+ approved_by: string;
24773
+ expires_at: string;
24774
+ identity: string;
24775
+ reason: string;
24776
+ };
24777
+ Update: {
24778
+ approved_by?: string;
24779
+ expires_at?: string;
24780
+ identity?: string;
24781
+ reason?: string;
24782
+ };
24783
+ Relationships: [];
24784
+ };
23615
24785
  purpose: {
23616
24786
  Row: {
23617
24787
  created_at: string;
@@ -32074,13 +33244,6 @@ export type ChatDatabase = {
32074
33244
  slug: string;
32075
33245
  }[];
32076
33246
  };
32077
- _d31_impl_add_data_row_to_user_table: {
32078
- Args: {
32079
- p_data: Json;
32080
- p_table_id: string;
32081
- };
32082
- Returns: Json;
32083
- };
32084
33247
  _d31_impl_add_feedback_comment: {
32085
33248
  Args: {
32086
33249
  p_author_name: string;
@@ -32157,14 +33320,6 @@ export type ChatDatabase = {
32157
33320
  isSetofReturn: true;
32158
33321
  };
32159
33322
  };
32160
- _d31_impl_get_user_table_complete: {
32161
- Args: {
32162
- p_sort_direction?: string;
32163
- p_sort_field?: string;
32164
- p_table_id: string;
32165
- };
32166
- Returns: Json;
32167
- };
32168
33323
  _d31_impl_reply_to_user_review: {
32169
33324
  Args: {
32170
33325
  p_feedback_id: string;
@@ -32183,36 +33338,6 @@ export type ChatDatabase = {
32183
33338
  };
32184
33339
  Returns: Json;
32185
33340
  };
32186
- _d31_impl_update_user_list: {
32187
- Args: {
32188
- p_authenticated_read?: boolean;
32189
- p_description?: string;
32190
- p_is_public?: boolean;
32191
- p_items?: Json;
32192
- p_list_id: string;
32193
- p_list_name?: string;
32194
- p_public_read?: boolean;
32195
- };
32196
- Returns: Json;
32197
- };
32198
- _d31_impl_update_user_table_config: {
32199
- Args: {
32200
- p_field_updates?: Json;
32201
- p_table_id: string;
32202
- p_table_updates?: Json;
32203
- };
32204
- Returns: Json;
32205
- };
32206
- _d31_impl_update_user_table_metadata: {
32207
- Args: {
32208
- p_authenticated_read?: boolean;
32209
- p_description?: string;
32210
- p_is_public?: boolean;
32211
- p_table_id: string;
32212
- p_table_name?: string;
32213
- };
32214
- Returns: Json;
32215
- };
32216
33341
  _dict_context_owner_org: {
32217
33342
  Args: {
32218
33343
  p_level: string;
@@ -32242,7 +33367,7 @@ export type ChatDatabase = {
32242
33367
  } & "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";
32243
33368
  } | {
32244
33369
  Args: {
32245
- p_scope: Database["context"]["Tables"]["scopes"]["Row"];
33370
+ p_scope: Database["deprecated"]["Tables"]["scopes"]["Row"];
32246
33371
  };
32247
33372
  Returns: {
32248
33373
  error: true;
@@ -32295,7 +33420,7 @@ export type ChatDatabase = {
32295
33420
  } & "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";
32296
33421
  } | {
32297
33422
  Args: {
32298
- p_scope: Database["context"]["Tables"]["scopes"]["Row"];
33423
+ p_scope: Database["deprecated"]["Tables"]["scopes"]["Row"];
32299
33424
  };
32300
33425
  Returns: {
32301
33426
  error: true;
@@ -32327,7 +33452,7 @@ export type ChatDatabase = {
32327
33452
  } & "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";
32328
33453
  } | {
32329
33454
  Args: {
32330
- p_scope: Database["context"]["Tables"]["scopes"]["Row"];
33455
+ p_scope: Database["deprecated"]["Tables"]["scopes"]["Row"];
32331
33456
  };
32332
33457
  Returns: {
32333
33458
  error: true;
@@ -34781,6 +35906,18 @@ export type ChatDatabase = {
34781
35906
  };
34782
35907
  Returns: Json;
34783
35908
  };
35909
+ applet_public_intro: {
35910
+ Args: {
35911
+ p_slug: string;
35912
+ };
35913
+ Returns: Json;
35914
+ };
35915
+ applets_public: {
35916
+ Args: {
35917
+ p_templates_only?: boolean;
35918
+ };
35919
+ Returns: Json;
35920
+ };
34784
35921
  apply_template_definition: {
34785
35922
  Args: {
34786
35923
  p_definition: Json;
@@ -35223,21 +36360,6 @@ export type ChatDatabase = {
35223
36360
  };
35224
36361
  Returns: boolean;
35225
36362
  };
35226
- check_prompt_app_drift: {
35227
- Args: {
35228
- p_user_id?: string;
35229
- };
35230
- Returns: {
35231
- app_id: string;
35232
- app_name: string;
35233
- current_version: number;
35234
- pinned_version: number;
35235
- prompt_id: string;
35236
- prompt_name: string;
35237
- prompt_source_type: string;
35238
- versions_behind: number;
35239
- }[];
35240
- };
35241
36363
  check_rate_limit: {
35242
36364
  Args: {
35243
36365
  p_app_id: string;
@@ -37766,8 +38888,6 @@ export type ChatDatabase = {
37766
38888
  p_slug?: string;
37767
38889
  };
37768
38890
  Returns: {
37769
- agent_id: string;
37770
- agent_version_id: string;
37771
38891
  allowed_imports: Json;
37772
38892
  category: string;
37773
38893
  component_code: string;
@@ -37776,41 +38896,15 @@ export type ChatDatabase = {
37776
38896
  favicon_url: string;
37777
38897
  id: string;
37778
38898
  layout_config: Json;
37779
- mandate_agent_id: string;
37780
- mandate_agent_version_id: string;
37781
- mandate_id: string;
37782
- mandate_key: string;
37783
38899
  name: string;
37784
38900
  preview_image_url: string;
37785
38901
  publisher_name: string;
37786
- shell_config: Json;
37787
- shell_kind: string;
37788
- slot_code: Json;
37789
- slot_overrides: Json;
37790
38902
  slug: string;
37791
38903
  styling_config: Json;
37792
38904
  success_rate: number;
37793
38905
  tagline: string;
37794
38906
  tags: string[];
37795
38907
  total_executions: number;
37796
- use_latest: boolean;
37797
- variable_schema: Json;
37798
- }[];
37799
- };
37800
- get_aga_public_execution: {
37801
- Args: {
37802
- p_app_id: string;
37803
- };
37804
- Returns: {
37805
- auto_context_disabled: boolean;
37806
- context_policies: Json;
37807
- custom_tools: Json;
37808
- id: string;
37809
- model_id: string;
37810
- settings: Json;
37811
- tools: string[];
37812
- ui_gates: Json;
37813
- variable_definitions: Json;
37814
38908
  }[];
37815
38909
  };
37816
38910
  get_agent_conversations: {
@@ -38400,74 +39494,12 @@ export type ChatDatabase = {
38400
39494
  table_name: string;
38401
39495
  }[];
38402
39496
  };
38403
- get_prompt_app_execution_payload: {
38404
- Args: {
38405
- p_app_id: string;
38406
- };
38407
- Returns: Json;
38408
- };
38409
- get_prompt_app_public_data: {
38410
- Args: {
38411
- p_app_id?: string;
38412
- p_slug?: string;
38413
- };
38414
- Returns: {
38415
- allowed_imports: Json;
38416
- category: string;
38417
- component_code: string;
38418
- component_language: string;
38419
- description: string;
38420
- favicon_url: string;
38421
- id: string;
38422
- layout_config: Json;
38423
- name: string;
38424
- preview_image_url: string;
38425
- slug: string;
38426
- styling_config: Json;
38427
- success_rate: number;
38428
- tagline: string;
38429
- tags: string[];
38430
- total_executions: number;
38431
- variable_schema: Json;
38432
- }[];
38433
- };
38434
39497
  get_public_flashcard_set: {
38435
39498
  Args: {
38436
39499
  p_set_id: string;
38437
39500
  };
38438
39501
  Returns: Json;
38439
39502
  };
38440
- get_published_app_with_prompt: {
38441
- Args: {
38442
- p_app_id?: string;
38443
- p_slug?: string;
38444
- };
38445
- Returns: {
38446
- allowed_imports: Json;
38447
- category: string;
38448
- component_code: string;
38449
- component_language: string;
38450
- description: string;
38451
- favicon_url: string;
38452
- id: string;
38453
- layout_config: Json;
38454
- name: string;
38455
- preview_image_url: string;
38456
- prompt_id: string;
38457
- prompt_messages: Json;
38458
- prompt_settings: Json;
38459
- prompt_variable_defaults: Json;
38460
- slug: string;
38461
- status: string;
38462
- styling_config: Json;
38463
- success_rate: number;
38464
- tagline: string;
38465
- tags: string[];
38466
- total_executions: number;
38467
- user_id: string;
38468
- variable_schema: Json;
38469
- }[];
38470
- };
38471
39503
  get_resource_access: {
38472
39504
  Args: {
38473
39505
  p_resource_id: string;
@@ -41929,13 +42961,6 @@ export type ChatDatabase = {
41929
42961
  user_id: string;
41930
42962
  }[];
41931
42963
  };
41932
- pin_prompt_app_to_version: {
41933
- Args: {
41934
- p_app_id: string;
41935
- p_version_id: string;
41936
- };
41937
- Returns: Json;
41938
- };
41939
42964
  plpgsql_check_function: {
41940
42965
  Args: {
41941
42966
  all_warnings?: boolean;
@@ -47413,6 +48438,7 @@ export type ChatDatabase = {
47413
48438
  completed_at: string | null;
47414
48439
  created_at: string;
47415
48440
  created_by: string | null;
48441
+ deleted_at: string | null;
47416
48442
  id: string;
47417
48443
  metadata: Json;
47418
48444
  mutation_id: string;
@@ -47436,6 +48462,7 @@ export type ChatDatabase = {
47436
48462
  completed_at?: string | null;
47437
48463
  created_at?: string;
47438
48464
  created_by?: string | null;
48465
+ deleted_at?: string | null;
47439
48466
  id?: string;
47440
48467
  metadata?: Json;
47441
48468
  mutation_id: string;
@@ -47459,6 +48486,7 @@ export type ChatDatabase = {
47459
48486
  completed_at?: string | null;
47460
48487
  created_at?: string;
47461
48488
  created_by?: string | null;
48489
+ deleted_at?: string | null;
47462
48490
  id?: string;
47463
48491
  metadata?: Json;
47464
48492
  mutation_id?: string;