@ai-matrx/records 0.5.1 → 0.7.2
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.
- package/CHANGELOG.md +133 -0
- package/dist/core/index.cjs +201 -46
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +47 -3
- package/dist/core/index.d.ts +47 -3
- package/dist/core/index.js +201 -46
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +144 -46
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +451 -47
- package/dist/index.d.ts +451 -47
- package/dist/index.js +144 -46
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +263 -46
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +537 -47
- package/dist/react/index.d.ts +537 -47
- package/dist/react/index.js +263 -46
- package/dist/react/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.js
CHANGED
|
@@ -9,6 +9,33 @@ import {
|
|
|
9
9
|
useMemo
|
|
10
10
|
} from "react";
|
|
11
11
|
|
|
12
|
+
// src/level.ts
|
|
13
|
+
var PERMISSION_LEVELS = [
|
|
14
|
+
"viewer",
|
|
15
|
+
"commenter",
|
|
16
|
+
"editor",
|
|
17
|
+
"admin"
|
|
18
|
+
];
|
|
19
|
+
var ORDINAL = {
|
|
20
|
+
viewer: 1,
|
|
21
|
+
commenter: 2,
|
|
22
|
+
editor: 3,
|
|
23
|
+
admin: 4
|
|
24
|
+
};
|
|
25
|
+
function atLeast(held, needed) {
|
|
26
|
+
if (!held) return false;
|
|
27
|
+
const have = ORDINAL[held];
|
|
28
|
+
return have !== void 0 && have >= ORDINAL[needed];
|
|
29
|
+
}
|
|
30
|
+
function asPermissionLevel(word) {
|
|
31
|
+
return typeof word === "string" && word in ORDINAL ? word : null;
|
|
32
|
+
}
|
|
33
|
+
function highestLevel(left, right) {
|
|
34
|
+
if (!left) return right ?? null;
|
|
35
|
+
if (!right) return left;
|
|
36
|
+
return ORDINAL[left] >= ORDINAL[right] ? left : right;
|
|
37
|
+
}
|
|
38
|
+
|
|
12
39
|
// src/results.ts
|
|
13
40
|
function isRecordsErr(result) {
|
|
14
41
|
return result.ok === false;
|
|
@@ -78,12 +105,14 @@ var STORE_DOORS = [
|
|
|
78
105
|
{ name: "absence_reasons", args: "", returns: "text[]", security: "invoker" },
|
|
79
106
|
{ name: "actor_vocabulary", args: "", returns: "text[]", security: "invoker" },
|
|
80
107
|
{ name: "actor_word", args: "p_declared text", returns: "text", security: "invoker" },
|
|
108
|
+
{ name: "agent_change_approval", args: "p_organization uuid, p_conversation uuid DEFAULT NULL::uuid, p_table uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
|
|
81
109
|
{ name: "agent_context", args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50", returns: "jsonb", security: "invoker" },
|
|
110
|
+
{ name: "agent_table_claim", args: "p_organization uuid, p_table uuid, p_conversation uuid DEFAULT NULL::uuid", returns: "void", security: "definer" },
|
|
82
111
|
{ name: "agg_assert_key", args: "p_key text", returns: "text", security: "invoker" },
|
|
83
112
|
{ name: "agg_buckets", args: "", returns: "text[]", security: "invoker" },
|
|
84
113
|
{ name: "agg_deliver", args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid, p_channel text, p_recipient_user_id uuid, p_event_key text, p_subject text, p_body text, p_payload jsonb DEFAULT '{}'::jsonb", returns: "uuid", security: "invoker" },
|
|
85
114
|
{ name: "agg_digest_run", args: "p_organization_id uuid, p_rule_id uuid DEFAULT NULL::uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone", returns: "integer", security: "invoker" },
|
|
86
|
-
{ name: "agg_explain", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_required text DEFAULT 'viewer'::text", returns: "jsonb", security: "
|
|
115
|
+
{ name: "agg_explain", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_required text DEFAULT 'viewer'::text", returns: "jsonb", security: "definer" },
|
|
87
116
|
{ name: "agg_operations", args: "", returns: "text[]", security: "invoker" },
|
|
88
117
|
{ name: "agg_sql", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text", returns: "text", security: "invoker" },
|
|
89
118
|
{ name: "agg_subscription_cadences", args: "", returns: "text[]", security: "invoker" },
|
|
@@ -96,25 +125,35 @@ var STORE_DOORS = [
|
|
|
96
125
|
{ name: "anon_inbound_land", args: "p_address text, p_secret text, p_payload jsonb, p_raw_payload jsonb DEFAULT '{}'::jsonb, p_client_key text DEFAULT NULL::text", returns: "uuid", security: "definer" },
|
|
97
126
|
{ name: "anon_publish", args: "p_organization_id uuid, p_form_id uuid, p_published boolean DEFAULT true", returns: "timestamp with time zone", security: "definer" },
|
|
98
127
|
{ name: "anon_rate_take", args: "p_organization_id uuid, p_form_id uuid, p_bucket text, p_token_id uuid DEFAULT NULL::uuid", returns: "integer", security: "definer" },
|
|
128
|
+
{ name: "anon_submissions", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, form_id uuid, inbound_id uuid, table_id uuid, source text, state text, payload jsonb, raw_payload jsonb, client_key text, record_id uuid, remote_origin text, rejection_reason text, created_at timestamp with time zone, cleared_at timestamp with time zone)", security: "definer" },
|
|
99
129
|
{ name: "anon_token_issue", args: "p_organization_id uuid, p_mode text, p_allowed_origins jsonb, p_form_id uuid DEFAULT NULL::uuid, p_saved_view_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid, p_expires_at timestamp with time zone DEFAULT NULL::timestamp with time zone", returns: "TABLE(token_id uuid, secret text)", security: "definer" },
|
|
100
130
|
{ name: "anon_token_revoke", args: "p_organization_id uuid, p_token_id uuid", returns: "boolean", security: "definer" },
|
|
101
131
|
{ name: "anon_token_verify", args: "p_secret text, p_origin text, p_required_mode text", returns: "TABLE(token_id uuid, organization_id uuid, form_id uuid, saved_view_id uuid, record_id uuid, mode text)", security: "definer" },
|
|
102
132
|
{ name: "anon_write", args: "p_secret text, p_origin text, p_payload jsonb, p_client_key text DEFAULT NULL::text, p_raw_payload jsonb DEFAULT '{}'::jsonb", returns: "uuid", security: "definer" },
|
|
103
133
|
{ name: "applicable_fields", args: "p_organization_id uuid, p_table_id uuid, p_record_type text DEFAULT NULL::text", returns: "SETOF custom.record", security: "definer" },
|
|
104
134
|
{ name: "assert_client_may_change", args: "p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'editor'::permission_level, p_subject_word text DEFAULT 'record'::text", returns: "void", security: "invoker" },
|
|
135
|
+
{ name: "assert_client_may_open", args: "p_organization_id uuid, p_subject_id uuid, p_door text, p_required permission_level DEFAULT 'viewer'::permission_level, p_subject_word text DEFAULT 'record'::text", returns: "void", security: "invoker" },
|
|
105
136
|
{ name: "assert_client_may_reach", args: "p_organization_id uuid, p_door text", returns: "void", security: "invoker" },
|
|
137
|
+
{ name: "assert_may_know_table", args: "p_organization_id uuid, p_table_id uuid, p_door text", returns: "void", security: "invoker" },
|
|
138
|
+
{ name: "assert_organization_admin", args: "p_organization_id uuid, p_door text, p_what text", returns: "void", security: "invoker" },
|
|
106
139
|
{ name: "assert_organization_wall", args: "p_kind text, p_organization_id uuid, p_row jsonb", returns: "void", security: "invoker" },
|
|
107
140
|
{ name: "assert_store_door", args: "p_organization_id uuid, p_door text", returns: "void", security: "invoker" },
|
|
108
141
|
{ name: "bump_epoch", args: "p_entity_type text, p_entity_id uuid, p_organization_id uuid DEFAULT NULL::uuid", returns: "bigint", security: "definer" },
|
|
109
142
|
{ name: "cache_lookup", args: "p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid", returns: "permission_level", security: "definer" },
|
|
110
143
|
{ name: "caller_role", args: "", returns: "name", security: "invoker" },
|
|
144
|
+
{ name: "carrying_edges_in", args: "p_organization_id uuid", returns: "TABLE(container_type text, container_id uuid, item_type text, item_id uuid, conveys_max permission_level)", security: "definer" },
|
|
145
|
+
{ name: "carrying_edges_of", args: "p_item_type text, p_item_id uuid", returns: "TABLE(container_type text, container_id uuid, conveys_max permission_level)", security: "definer" },
|
|
111
146
|
{ name: "client_write_grants", args: "", returns: "TABLE(role_name text, object_name text, privilege text)", security: "invoker" },
|
|
112
147
|
{ name: "computed_provenance", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)", security: "invoker" },
|
|
113
148
|
{ name: "containment_chain", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(ancestor_id uuid, depth integer)", security: "invoker" },
|
|
114
149
|
{ name: "containment_depth_ceiling", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "integer", security: "invoker" },
|
|
115
150
|
{ name: "containment_edges", args: "p_organization_id uuid", returns: "TABLE(parent_id uuid, child_id uuid, via text)", security: "invoker" },
|
|
116
151
|
{ name: "containment_parent", args: "p_data jsonb", returns: "uuid", security: "invoker" },
|
|
152
|
+
{ name: "cross_organization_links_open", args: "p_source_organization_id uuid, p_target_organization_id uuid", returns: "boolean", security: "invoker" },
|
|
117
153
|
{ name: "custom_fields_tables", args: "", returns: "TABLE(token text, schema_name text, table_name text)", security: "invoker" },
|
|
154
|
+
{ name: "delete_cascade_closure", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid[]", security: "invoker" },
|
|
155
|
+
{ name: "delete_preview", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
156
|
+
{ name: "delete_rule", args: "p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true", returns: "jsonb", security: "definer" },
|
|
118
157
|
{ name: "dependency_cycle", args: "p_organization_id uuid, p_row custom.record", returns: "text[]", security: "invoker" },
|
|
119
158
|
{ name: "dependency_label", args: "p_organization_id uuid, p_node text", returns: "text", security: "invoker" },
|
|
120
159
|
{ name: "derive_visibility", args: "p_container_type text, p_container_id uuid", returns: "TABLE(item_type text, item_id uuid, depth integer, max_level permission_level)", security: "definer" },
|
|
@@ -146,16 +185,26 @@ var STORE_DOORS = [
|
|
|
146
185
|
{ name: "external_tier_contract", args: "", returns: "jsonb", security: "definer" },
|
|
147
186
|
{ name: "external_write_through", args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb", returns: "void", security: "definer" },
|
|
148
187
|
{ name: "external_writes_set", args: "p_organization_id uuid, p_source_id uuid, p_enabled boolean", returns: "boolean", security: "definer" },
|
|
149
|
-
{ name: "
|
|
188
|
+
{ name: "field_behaviour", args: "p_field_data jsonb", returns: "text", security: "invoker" },
|
|
189
|
+
{ name: "field_declare", args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
190
|
+
{ name: "field_dependants", args: "p_organization_id uuid, p_field_id uuid", returns: "TABLE(kind text, dependant_id uuid, label text, how text)", security: "definer" },
|
|
150
191
|
{ name: "field_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
151
|
-
{ name: "field_options", args: "p_organization_id uuid, p_field_id uuid", returns: "SETOF custom.record", security: "
|
|
192
|
+
{ name: "field_options", args: "p_organization_id uuid, p_field_id uuid", returns: "SETOF custom.record", security: "definer" },
|
|
193
|
+
{ name: "field_retire", args: "p_organization_id uuid, p_field_id uuid", returns: "boolean", security: "definer" },
|
|
152
194
|
{ name: "field_rules", args: "p_field_data jsonb", returns: "TABLE(kind text, spec jsonb)", security: "invoker" },
|
|
195
|
+
{ name: "field_update", args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb", returns: "uuid", security: "definer" },
|
|
196
|
+
{ name: "field_value_convert", args: "p_to jsonb, p_value jsonb", returns: "jsonb", security: "invoker" },
|
|
153
197
|
{ name: "file_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
154
198
|
{ name: "formula_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb", returns: "jsonb", security: "invoker" },
|
|
199
|
+
{ name: "guard_refusals_are_complete", args: "", returns: "TABLE(guard text, said text)", security: "invoker" },
|
|
155
200
|
{ name: "has_visibility", args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "boolean", security: "definer" },
|
|
156
201
|
{ name: "has_visibility_at", args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_organization_id uuid DEFAULT NULL::uuid, p_min_version bigint DEFAULT NULL::bigint", returns: "boolean", security: "definer" },
|
|
157
202
|
{ name: "hidden_field_notice", args: "p_field custom.record, p_action text DEFAULT 'read'::text", returns: "jsonb", security: "invoker" },
|
|
158
|
-
{ name: "
|
|
203
|
+
{ name: "history_prune", args: "p_organization_id uuid, p_scope text DEFAULT 'values'::text, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true", returns: "jsonb", security: "definer" },
|
|
204
|
+
{ name: "history_retention", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid", returns: "jsonb", security: "definer" },
|
|
205
|
+
{ name: "history_retention_floor_raise", args: "p_organization_id uuid, p_days integer", returns: "integer", security: "definer" },
|
|
206
|
+
{ name: "history_retention_set", args: "p_organization_id uuid, p_table_id uuid, p_days integer", returns: "integer", security: "definer" },
|
|
207
|
+
{ name: "home_add", args: "p_organization_id uuid, p_table_id uuid, p_home_record_id uuid", returns: "uuid", security: "definer" },
|
|
159
208
|
{ name: "home_relations", args: "", returns: "TABLE(table_id uuid, home_record_id uuid, organization_id uuid, relation_id uuid)", security: "invoker" },
|
|
160
209
|
{ name: "index_payload", args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000", returns: "TABLE(id uuid, searchable text)", security: "invoker" },
|
|
161
210
|
{ name: "intern_provenance", args: "p_data jsonb", returns: "jsonb", security: "invoker" },
|
|
@@ -167,7 +216,7 @@ var STORE_DOORS = [
|
|
|
167
216
|
{ name: "io_csv_escape", args: "p_value text, p_delimiter text DEFAULT ','::text", returns: "text", security: "invoker" },
|
|
168
217
|
{ name: "io_csv_parse", args: "p_text text, p_delimiter text DEFAULT NULL::text", returns: "TABLE(row_number integer, cells text[])", security: "invoker" },
|
|
169
218
|
{ name: "io_export", args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_required text DEFAULT 'viewer'::text", returns: "jsonb", security: "definer" },
|
|
170
|
-
{ name: "io_export_csv", args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT
|
|
219
|
+
{ name: "io_export_csv", args: "p_organization_id uuid, p_table_id uuid, p_columns text[] DEFAULT NULL::text[], p_limit integer DEFAULT 10000, p_delimiter text DEFAULT chr(44), p_required text DEFAULT 'viewer'::text", returns: "text", security: "definer" },
|
|
171
220
|
{ name: "io_import_open", args: "p_organization_id uuid, p_table_id uuid, p_format text DEFAULT 'csv'::text, p_source_name text DEFAULT NULL::text, p_source_columns jsonb DEFAULT '[]'::jsonb", returns: "uuid", security: "definer" },
|
|
172
221
|
{ name: "io_import_rows", args: "p_organization_id uuid, p_import_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "definer" },
|
|
173
222
|
{ name: "io_infer_type", args: "p_samples jsonb", returns: "text", security: "invoker" },
|
|
@@ -178,23 +227,30 @@ var STORE_DOORS = [
|
|
|
178
227
|
{ name: "io_proposal_reject", args: "p_organization_id uuid, p_import_id uuid, p_column text", returns: "boolean", security: "definer" },
|
|
179
228
|
{ name: "io_record_changed", args: "", returns: "trigger", security: "definer" },
|
|
180
229
|
{ name: "io_restore", args: "p_organization_id uuid, p_record_id uuid, p_version integer", returns: "integer", security: "definer" },
|
|
181
|
-
{ name: "io_revisions", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text)", security: "definer" },
|
|
230
|
+
{ name: "io_revisions", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)", security: "definer" },
|
|
231
|
+
{ name: "is_a_retirement", args: "p_old_deleted timestamp with time zone, p_new_deleted timestamp with time zone, p_old_data jsonb, p_new_data jsonb, p_old_table uuid, p_new_table uuid, p_old_org uuid, p_new_org uuid, p_old_class text, p_new_class text", returns: "boolean", security: "invoker" },
|
|
182
232
|
{ name: "lookup_value", args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb", returns: "jsonb", security: "invoker" },
|
|
183
233
|
{ name: "mask_document", args: "p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "invoker" },
|
|
184
234
|
{ name: "mask_document", args: "p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb, p_declared_keys text[] DEFAULT NULL::text[]", returns: "jsonb", security: "invoker" },
|
|
185
235
|
{ name: "merge_field_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
186
|
-
{ name: "migrate_delete", args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
187
|
-
{ name: "migrate_demote", args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
188
|
-
{ name: "migrate_extract_parent", args: "p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
189
|
-
{ name: "migrate_merge", args: "p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
190
|
-
{ name: "migrate_promote", args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
191
|
-
{ name: "migrate_purge", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true", returns: "jsonb", security: "
|
|
192
|
-
{ name: "migrate_rename", args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
193
|
-
{ name: "migrate_reparent", args: "p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
194
|
-
{ name: "migrate_retype", args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
195
|
-
{ name: "migrate_split", args: "p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text", returns: "jsonb", security: "
|
|
236
|
+
{ name: "migrate_delete", args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
237
|
+
{ name: "migrate_demote", args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
238
|
+
{ name: "migrate_extract_parent", args: "p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
239
|
+
{ name: "migrate_merge", args: "p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
240
|
+
{ name: "migrate_promote", args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
241
|
+
{ name: "migrate_purge", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true", returns: "jsonb", security: "definer" },
|
|
242
|
+
{ name: "migrate_rename", args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
243
|
+
{ name: "migrate_reparent", args: "p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
244
|
+
{ name: "migrate_retype", args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
245
|
+
{ name: "migrate_split", args: "p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
246
|
+
{ name: "migrate_undo", args: "p_organization_id uuid, p_log_id uuid", returns: "jsonb", security: "definer" },
|
|
247
|
+
{ name: "migrations", args: "p_organization_id uuid, p_target_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100", returns: "TABLE(id uuid, verb text, target_kind text, target_id uuid, note text, applied_at timestamp with time zone, applied_by uuid, undone_at timestamp with time zone)", security: "definer" },
|
|
248
|
+
{ name: "my_level", args: "p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text", returns: "permission_level", security: "definer" },
|
|
249
|
+
{ name: "my_levels", args: "p_organization_id uuid, p_ids jsonb, p_type text DEFAULT 'record'::text", returns: "TABLE(id uuid, level permission_level)", security: "definer" },
|
|
196
250
|
{ name: "organization_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
197
251
|
{ name: "organization_references", args: "p_kind text, p_organization_id uuid, p_row jsonb", returns: "TABLE(site text, what text, ref_id uuid, openable boolean)", security: "invoker" },
|
|
252
|
+
{ name: "owning_table", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid", security: "invoker" },
|
|
253
|
+
{ name: "owning_table_gone", args: "p_organization_id uuid, p_record_id uuid", returns: "boolean", security: "invoker" },
|
|
198
254
|
{ name: "parity_field_types", args: "", returns: "TABLE(parity_type text, behavior text, made_of text)", security: "invoker" },
|
|
199
255
|
{ name: "parity_type", args: "p_field_data jsonb", returns: "text", security: "invoker" },
|
|
200
256
|
{ name: "parity_values", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, parity_type text, behavior text, unit text, format text, value jsonb, value_version integer, actor text, written_at timestamp with time zone)", security: "invoker" },
|
|
@@ -214,38 +270,53 @@ var STORE_DOORS = [
|
|
|
214
270
|
{ name: "promoted_value_path", args: "p_field_data jsonb", returns: "text", security: "invoker" },
|
|
215
271
|
{ name: "promotion_inline_ceiling", args: "", returns: "integer", security: "invoker" },
|
|
216
272
|
{ name: "query_access_ids", args: "p_organization_id uuid, p_required text DEFAULT 'viewer'::text", returns: "uuid[]", security: "invoker" },
|
|
217
|
-
{ name: "query_across_homes", args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)", security: "
|
|
218
|
-
{ name: "query_by_coordinates", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_coordinates jsonb DEFAULT '[]'::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)", security: "
|
|
219
|
-
{ name: "query_can_see", args: "p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text", returns: "boolean", security: "
|
|
273
|
+
{ name: "query_across_homes", args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)", security: "definer" },
|
|
274
|
+
{ name: "query_by_coordinates", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_coordinates jsonb DEFAULT '[]'::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)", security: "definer" },
|
|
275
|
+
{ name: "query_can_see", args: "p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text", returns: "boolean", security: "definer" },
|
|
220
276
|
{ name: "query_hot_paths", args: "", returns: "TABLE(name text, statement text)", security: "invoker" },
|
|
221
277
|
{ name: "query_hot_paths_prepared", args: "", returns: "TABLE(name text, prepared boolean, generic_plans bigint)", security: "invoker" },
|
|
222
278
|
{ name: "query_is_store_owner", args: "", returns: "boolean", security: "invoker" },
|
|
223
279
|
{ name: "query_prepare_hot", args: "", returns: "integer", security: "invoker" },
|
|
224
280
|
{ name: "query_principal", args: "", returns: "uuid", security: "invoker" },
|
|
225
|
-
{ name: "query_record_as_of", args: "p_organization_id uuid, p_record_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_required text DEFAULT 'viewer'::text", returns: "jsonb", security: "
|
|
226
|
-
{ name: "query_relation_edges", args: "p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text", returns: "TABLE(parent_id uuid, child_id uuid, role text, flavor text)", security: "
|
|
227
|
-
{ name: "query_rollup", args: "p_organization_id uuid, p_roots uuid[], p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, depth integer)", security: "
|
|
228
|
-
{ name: "query_rollup_sum", args: "p_organization_id uuid, p_roots uuid[], p_field_key text, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text", returns: "numeric", security: "
|
|
229
|
-
{ name: "query_table_as_of", args: "p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, data jsonb)", security: "
|
|
230
|
-
{ name: "query_table_homes", args: "p_organization_id uuid, p_table_id uuid", returns: "SETOF uuid", security: "
|
|
231
|
-
{ name: "
|
|
281
|
+
{ name: "query_record_as_of", args: "p_organization_id uuid, p_record_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_required text DEFAULT 'viewer'::text", returns: "jsonb", security: "definer" },
|
|
282
|
+
{ name: "query_relation_edges", args: "p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text", returns: "TABLE(parent_id uuid, child_id uuid, role text, flavor text)", security: "definer" },
|
|
283
|
+
{ name: "query_rollup", args: "p_organization_id uuid, p_roots uuid[], p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, depth integer)", security: "definer" },
|
|
284
|
+
{ name: "query_rollup_sum", args: "p_organization_id uuid, p_roots uuid[], p_field_key text, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text, p_max_depth integer DEFAULT 33, p_required text DEFAULT 'viewer'::text", returns: "numeric", security: "definer" },
|
|
285
|
+
{ name: "query_table_as_of", args: "p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_world_on date DEFAULT NULL::date, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_required text DEFAULT 'viewer'::text", returns: "TABLE(record_id uuid, data jsonb)", security: "definer" },
|
|
286
|
+
{ name: "query_table_homes", args: "p_organization_id uuid, p_table_id uuid", returns: "SETOF uuid", security: "definer" },
|
|
287
|
+
{ name: "query_visibility_parity", args: "p_organization_id uuid", returns: "TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)", security: "definer" },
|
|
288
|
+
{ name: "query_visible_ids", args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_required text DEFAULT 'viewer'::text", returns: "SETOF uuid", security: "definer" },
|
|
232
289
|
{ name: "reachable_from", args: "p_organization_id uuid, p_roots uuid[]", returns: "TABLE(record_id uuid, depth integer, via text)", security: "invoker" },
|
|
290
|
+
{ name: "reaches_directly", args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "boolean", security: "definer" },
|
|
291
|
+
{ name: "read_door_carried_ids", args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level, OUT o_ids uuid[], OUT o_containers integer", returns: "record", security: "definer" },
|
|
292
|
+
{ name: "read_door_granted_ids", args: "p_organization_id uuid, p_table_id uuid", returns: "uuid[]", security: "definer" },
|
|
293
|
+
{ name: "read_door_ladder_ceiling", args: "", returns: "integer", security: "invoker" },
|
|
294
|
+
{ name: "read_door_parity", args: "p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer", returns: "TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)", security: "definer" },
|
|
233
295
|
{ name: "read_paths_outside_the_door", args: "", returns: "TABLE(object_name text, why text)", security: "invoker" },
|
|
234
296
|
{ name: "read_record", args: "p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
235
297
|
{ name: "read_records", args: "p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
236
|
-
{ name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)", security: "
|
|
298
|
+
{ name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)", security: "definer" },
|
|
237
299
|
{ name: "record_applicability", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)", security: "invoker" },
|
|
300
|
+
{ name: "record_as_of", args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
|
|
301
|
+
{ name: "record_card", args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
302
|
+
{ name: "record_carrying_edges", args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone", returns: "TABLE(container_id uuid, item_id uuid, edge_role text)", security: "invoker" },
|
|
238
303
|
{ name: "record_delete", args: "p_organization_id uuid, p_record_id uuid", returns: "timestamp with time zone", security: "definer" },
|
|
239
|
-
{ name: "
|
|
304
|
+
{ name: "record_relation_edges", args: "p_organization_id uuid, p_id uuid, p_table_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone", returns: "TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)", security: "invoker" },
|
|
305
|
+
{ name: "record_reparent", args: "p_organization_id uuid, p_record_id uuid, p_parent_id uuid", returns: "void", security: "definer" },
|
|
306
|
+
{ name: "record_resolve", args: "p_organization_id uuid, p_id uuid", returns: "jsonb", security: "definer" },
|
|
240
307
|
{ name: "record_restore", args: "p_organization_id uuid, p_record_id uuid", returns: "void", security: "definer" },
|
|
308
|
+
{ name: "record_state_as_of", args: "p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
|
|
241
309
|
{ name: "record_update", args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer", returns: "integer", security: "definer" },
|
|
242
310
|
{ name: "record_values", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
243
|
-
{ name: "record_values_versioned", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)", security: "
|
|
311
|
+
{ name: "record_values_versioned", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)", security: "definer" },
|
|
244
312
|
{ name: "record_write", args: "p_organization_id uuid, p_table_id uuid, p_data jsonb", returns: "uuid", security: "definer" },
|
|
245
|
-
{ name: "
|
|
313
|
+
{ name: "relation_carry", args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid", returns: "uuid", security: "definer" },
|
|
314
|
+
{ name: "relation_own", args: "p_organization_id uuid, p_owner_id uuid, p_target_id uuid", returns: "uuid", security: "definer" },
|
|
315
|
+
{ name: "relation_target_card", args: "p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text", returns: "TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)", security: "definer" },
|
|
246
316
|
{ name: "relation_target_external", args: "p_connection_token text, p_external_table text, p_external_key text", returns: "jsonb", security: "definer" },
|
|
247
317
|
{ name: "relation_target_ours", args: "p_entity_token text, p_row_id uuid", returns: "jsonb", security: "definer" },
|
|
248
|
-
{ name: "relation_targets", args: "p_organization_id uuid, p_record_id uuid, p_via_key text", returns: "SETOF uuid", security: "
|
|
318
|
+
{ name: "relation_targets", args: "p_organization_id uuid, p_record_id uuid, p_via_key text", returns: "SETOF uuid", security: "definer" },
|
|
319
|
+
{ name: "relation_uncarry", args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid", returns: "integer", security: "definer" },
|
|
249
320
|
{ name: "reopen_declared_doors", args: "", returns: "TABLE(reopened text)", security: "definer" },
|
|
250
321
|
{ name: "required_epoch", args: "p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid", returns: "bigint", security: "definer" },
|
|
251
322
|
{ name: "resolve_first_match", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "invoker" },
|
|
@@ -266,6 +337,16 @@ var STORE_DOORS = [
|
|
|
266
337
|
{ name: "rule_truth", args: "p_answer jsonb", returns: "boolean", security: "invoker" },
|
|
267
338
|
{ name: "rule_uses", args: "", returns: "text[]", security: "invoker" },
|
|
268
339
|
{ name: "rule_version", args: "p_organization_id uuid, p_rule_id uuid", returns: "integer", security: "invoker" },
|
|
340
|
+
{ name: "said", args: "p_value text, p_when_there_is_none text", returns: "text", security: "invoker" },
|
|
341
|
+
{ name: "share_access", args: "p_organization_id uuid, p_subject_id uuid", returns: "TABLE(principal_kind text, principal_id uuid, principal_label text, level permission_level, reason text, reason_detail text, via_type text, via_id uuid, revocable boolean)", security: "definer" },
|
|
342
|
+
{ name: "share_grant", args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid, p_level permission_level DEFAULT 'viewer'::permission_level", returns: "jsonb", security: "definer" },
|
|
343
|
+
{ name: "share_lane_set", args: "p_organization_id uuid, p_subject_id uuid, p_choice text, p_level permission_level DEFAULT NULL::permission_level", returns: "jsonb", security: "definer" },
|
|
344
|
+
{ name: "share_lanes", args: "", returns: "TABLE(choice text, lane text, discoverable boolean, label text, means text)", security: "definer" },
|
|
345
|
+
{ name: "share_levels", args: "", returns: "TABLE(level permission_level, ordinal integer, label text, means text)", security: "definer" },
|
|
346
|
+
{ name: "share_people", args: "p_organization_id uuid, p_subject_id uuid DEFAULT NULL::uuid, p_query text DEFAULT NULL::text, p_limit integer DEFAULT 25", returns: "TABLE(user_id uuid, email text, display_name text, membership text, already_at permission_level, already_why text)", security: "definer" },
|
|
347
|
+
{ name: "share_revoke", args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid", returns: "jsonb", security: "definer" },
|
|
348
|
+
{ name: "share_subject_name", args: "p_organization_id uuid, p_type text, p_id uuid", returns: "text", security: "definer" },
|
|
349
|
+
{ name: "shared_only_disagreements", args: "p_pretend text DEFAULT NULL::text", returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, record_id uuid, table_id uuid, ladder boolean, read_door boolean, rls_mirror boolean, why text)", security: "invoker" },
|
|
269
350
|
{ name: "size_refusal", args: "p_organization_id uuid, p_data jsonb", returns: "text", security: "invoker" },
|
|
270
351
|
{ name: "source_next_pointer", args: "p_sources jsonb", returns: "text", security: "invoker" },
|
|
271
352
|
{ name: "source_pointer", args: "p_sources jsonb, p_source jsonb", returns: "text", security: "invoker" },
|
|
@@ -273,14 +354,18 @@ var STORE_DOORS = [
|
|
|
273
354
|
{ name: "storage_modes", args: "", returns: "text[]", security: "invoker" },
|
|
274
355
|
{ name: "store_is_open", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "boolean", security: "invoker" },
|
|
275
356
|
{ name: "table_capacity", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
357
|
+
{ name: "table_contents", args: "p_organization_id uuid, p_table_id uuid", returns: "TABLE(record_id uuid, kind text, goes_at integer)", security: "invoker" },
|
|
276
358
|
{ name: "table_declare", args: "p_organization_id uuid, p_spec jsonb", returns: "uuid", security: "definer" },
|
|
359
|
+
{ name: "table_has_a_visible_record", args: "p_user uuid, p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
360
|
+
{ name: "table_is_live", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
277
361
|
{ name: "table_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
278
362
|
{ name: "table_record_ceiling", args: "", returns: "integer", security: "invoker" },
|
|
279
363
|
{ name: "table_record_ceiling", args: "p_organization_id uuid", returns: "integer", security: "invoker" },
|
|
280
364
|
{ name: "table_rules", args: "p_organization_id uuid, p_table_id uuid, p_use text, p_record_type text DEFAULT NULL::text", returns: "SETOF custom.record", security: "invoker" },
|
|
281
365
|
{ name: "table_storage", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
282
|
-
{ name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "
|
|
283
|
-
{ name: "tables_at_home", args: "p_organization_id uuid, p_home_ids uuid[]", returns: "TABLE(table_id uuid, home_record_id uuid, kind text)", security: "
|
|
366
|
+
{ name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
367
|
+
{ name: "tables_at_home", args: "p_organization_id uuid, p_home_ids uuid[]", returns: "TABLE(table_id uuid, home_record_id uuid, kind text)", security: "definer" },
|
|
368
|
+
{ name: "tables_described_without_asking", args: "", returns: "TABLE(function_name text, identity_args text, why text)", security: "invoker" },
|
|
284
369
|
{ name: "trg_associations_bump_visibility", args: "", returns: "trigger", security: "definer" },
|
|
285
370
|
{ name: "validate_custom_fields", args: "p_token text, p_organization_id uuid, p_values jsonb", returns: "void", security: "invoker" },
|
|
286
371
|
{ name: "validate_value_envelope", args: "p_organization_id uuid, p_fields custom.record[], p_data jsonb", returns: "void", security: "invoker" },
|
|
@@ -289,13 +374,16 @@ var STORE_DOORS = [
|
|
|
289
374
|
{ name: "value_envelope_keys", args: "", returns: "text[]", security: "invoker" },
|
|
290
375
|
{ name: "value_envelope_ok", args: "p_data jsonb", returns: "boolean", security: "invoker" },
|
|
291
376
|
{ name: "value_envelope_refusal", args: "p_data jsonb", returns: "text", security: "invoker" },
|
|
292
|
-
{ name: "value_read", args: "p_organization_id uuid, p_record_id uuid, p_key text", returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)", security: "
|
|
377
|
+
{ name: "value_read", args: "p_organization_id uuid, p_record_id uuid, p_key text", returns: "TABLE(field_key text, field_id uuid, value jsonb, value_version integer, source jsonb, absent_reason text, actor text, on_behalf_of text, written_at timestamp with time zone, alternates jsonb)", security: "definer" },
|
|
293
378
|
{ name: "value_versions", args: "p_old jsonb, p_new jsonb", returns: "jsonb", security: "invoker" },
|
|
294
379
|
{ name: "visibility_ancestors", args: "p_item_type text, p_item_id uuid", returns: "TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)", security: "definer" },
|
|
380
|
+
{ name: "visibility_as_of", args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(principal_kind text, principal_id uuid, level permission_level, through_kind text, through_id uuid, reason text, replayed boolean, held_from timestamp with time zone, held_to timestamp with time zone)", security: "definer" },
|
|
295
381
|
{ name: "visibility_cache_rebuild", args: "", returns: "integer", security: "definer" },
|
|
296
382
|
{ name: "visibility_parity", args: "", returns: "TABLE(side text, container_type text, container_id uuid, item_type text, item_id uuid, stored_level permission_level, derived_level permission_level, reason text)", security: "definer" },
|
|
297
383
|
{ name: "visibility_warm", args: "p_container_type text, p_container_id uuid", returns: "integer", security: "definer" },
|
|
384
|
+
{ name: "visible_predicate_sql", args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, p_alias text DEFAULT 'r'::text", returns: "text", security: "definer" },
|
|
298
385
|
{ name: "visible_record_ids", args: "p_user_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level", returns: "TABLE(id uuid)", security: "definer" },
|
|
386
|
+
{ name: "visible_set", args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level, OUT o_all_visible boolean, OUT o_true_visibility platform.visibility[], OUT o_granted_all uuid[], OUT o_granted_visible uuid[], OUT o_carried_visible uuid[], OUT o_ladder_calls integer, OUT o_fallback boolean, OUT o_note text", returns: "record", security: "definer" },
|
|
299
387
|
{ name: "widget_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
300
388
|
{ name: "work_assignment_fields", args: "p_options_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(key text, label text, spec jsonb)", security: "invoker" },
|
|
301
389
|
{ name: "work_has_assignment", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "invoker" },
|
|
@@ -317,9 +405,9 @@ var STORE_DOORS = [
|
|
|
317
405
|
{ name: "work_whose_turn", args: "p_organization_id uuid, p_table_id uuid, p_include_finished boolean DEFAULT false", returns: "TABLE(record_id uuid, title text, assignee_id uuid, turn text, due_on timestamp with time zone, state text, status text, terminal boolean)", security: "invoker" }
|
|
318
406
|
];
|
|
319
407
|
var STORE_KNOBS = [
|
|
320
|
-
{ key: "accessible_entity_ids_guard", value: "
|
|
321
|
-
{ key: "agent_schema_changes", value: '"
|
|
322
|
-
{ key: "associations_guard", value: "
|
|
408
|
+
{ key: "accessible_entity_ids_guard", value: "true", type: "boolean" },
|
|
409
|
+
{ key: "agent_schema_changes", value: '"ask"', type: "string" },
|
|
410
|
+
{ key: "associations_guard", value: "true", type: "boolean" },
|
|
323
411
|
{ key: "code_paths_enabled", value: "false", type: "boolean" },
|
|
324
412
|
{ key: "consumer_chat_seeding_enabled", value: "false", type: "boolean" },
|
|
325
413
|
{ key: "consumer_checkout_enabled", value: "false", type: "boolean" },
|
|
@@ -330,6 +418,7 @@ var STORE_KNOBS = [
|
|
|
330
418
|
{ key: "consumer_saved_ai_outputs_enabled", value: "false", type: "boolean" },
|
|
331
419
|
{ key: "consumer_scopes_enabled", value: "false", type: "boolean" },
|
|
332
420
|
{ key: "containment_depth_ceiling", value: "16", type: "integer" },
|
|
421
|
+
{ key: "cross_organization_links", value: "false", type: "boolean" },
|
|
333
422
|
{ key: "document_max_bytes", value: "1048576", type: "integer" },
|
|
334
423
|
{ key: "emergency_door_guard", value: "false", type: "boolean" },
|
|
335
424
|
{ key: "emergency_door_sweep_enabled", value: "false", type: "boolean" },
|
|
@@ -338,7 +427,9 @@ var STORE_KNOBS = [
|
|
|
338
427
|
{ key: "external_principal_enabled", value: "false", type: "boolean" },
|
|
339
428
|
{ key: "field_index_guard", value: "false", type: "boolean" },
|
|
340
429
|
{ key: "field_sensitivity_levels", value: '{"edit": {"public": "editor", "internal": "editor", "restricted": "admin", "confidential": "admin"}, "read": {"public": "viewer", "internal": "viewer", "restricted": "admin", "confidential": "editor"}}', type: "json" },
|
|
341
|
-
{ key: "member_default_level", value: '"viewer"', type: "
|
|
430
|
+
{ key: "member_default_level", value: '"viewer"', type: "enum" },
|
|
431
|
+
{ key: "member_default_visibility", value: '"all_records"', type: "enum" },
|
|
432
|
+
{ key: "records_tool_default", value: "true", type: "boolean" },
|
|
342
433
|
{ key: "row_versions_guard", value: "false", type: "boolean" },
|
|
343
434
|
{ key: "sandbox_expanded_frame_height_px", value: "20000", type: "integer" },
|
|
344
435
|
{ key: "sandbox_frame_height_px", value: "4000", type: "integer" },
|
|
@@ -351,17 +442,18 @@ var STORE_KNOBS = [
|
|
|
351
442
|
{ key: "world_publish_enabled", value: "false", type: "boolean" }
|
|
352
443
|
];
|
|
353
444
|
var STORE_REFUSAL_CODES = [
|
|
354
|
-
{ code: "02000", raised_by: "doc_render_body,doc_render_document,doc_sign,doc_signature_intact,doc_template_save,external_history_event,external_rows,external_stub_upsert,external_writes_set,migrate_delete,migrate_extract_parent,migrate_merge,migrate_rename,migrate_reparent,migrate_retype,migrate_split,read_record,record_delete,record_restore,record_update" },
|
|
445
|
+
{ code: "02000", raised_by: "doc_render_body,doc_render_document,doc_sign,doc_signature_intact,doc_template_save,external_history_event,external_rows,external_stub_upsert,external_writes_set,migrate_delete,migrate_extract_parent,migrate_merge,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,read_record,record_delete,record_restore,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,visibility_as_of" },
|
|
355
446
|
{ code: "0A000", raised_by: "external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_slots_declare" },
|
|
356
|
-
{ code: "22004", raised_by: "_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,doc_render_write,doc_sign,doc_signature_write,doc_template_save,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_purge,migrate_split,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_restore,record_update,record_write,relation_own,table_declare,work_template_declare" },
|
|
447
|
+
{ code: "22004", raised_by: "_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,doc_render_write,doc_sign,doc_signature_write,doc_template_save,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,home_add,io_comment_write,io_import_open,io_outbox_drain,io_restore,migrate_purge,migrate_split,migrate_undo,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,relation_carry,relation_own,share_grant,table_declare,work_template_declare" },
|
|
357
448
|
{ code: "22012", raised_by: "rule_eval" },
|
|
358
|
-
{ code: "22023", raised_by: "_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,doc_render_body,doc_render_write,doc_signature_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,io_import_open,io_proposal_accept,migrate_merge,query_by_coordinates,query_rollup,record_update,rule_eval,rule_members,table_rules,work_slot_hold" },
|
|
359
|
-
{ code: "23503", raised_by: "_containment_guard,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,doc_sign,doc_template_save,home_add,io_comment_write,io_import_rows,io_proposal_accept,
|
|
360
|
-
{ code: "23505", raised_by: "doc_sign,doc_signature_write,home_add,io_proposal_accept,work_slot_hold" },
|
|
361
|
-
{ code: "23514", raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_rule_shape_guard,_rule_topology_guard,_table_shape_guard,_value_envelope,_work_shape_guard,doc_sign,doc_signature_write,doc_template_save,home_add,validate_value_envelope,validate_values,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
449
|
+
{ code: "22023", raised_by: "_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,containment_parent,doc_render_body,doc_render_write,doc_signature_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,io_import_open,io_proposal_accept,migrate_merge,my_levels,query_by_coordinates,query_rollup,record_update,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,table_rules,visibility_as_of,work_slot_hold" },
|
|
450
|
+
{ code: "23503", raised_by: "_containment_guard,_record_rule_uses,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,delete_rule,doc_sign,doc_template_save,home_add,io_comment_write,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,promote_field,promote_table,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_eval,rule_members,rule_run,work_take_assignment,work_template_instantiate" },
|
|
451
|
+
{ code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,field_declare,home_add,io_proposal_accept,relation_carry,relation_own,share_grant,work_slot_hold" },
|
|
452
|
+
{ code: "23514", raised_by: "_containment_guard,_dated_values_guard,_derived_fields,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_shape_guard,_value_envelope,_work_shape_guard,doc_sign,doc_signature_write,doc_template_save,field_declare,field_retire,field_update,home_add,migrate_merge,relation_carry,relation_own,validate_value_envelope,validate_values,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
362
453
|
{ code: "40001", raised_by: "has_visibility_at" },
|
|
363
|
-
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_reach,assert_store_door,external_write_through,io_comment_resolve,io_comment_write,io_restore,migrate_purge,promote_table,read_record,read_records" },
|
|
364
|
-
{ code: "53400", raised_by: "anon_rate_take,promote_field" },
|
|
454
|
+
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,external_write_through,io_comment_resolve,io_comment_write,io_restore,migrate_purge,my_levels,promote_table,query_visibility_parity,read_record,read_records,share_grant,visibility_as_of" },
|
|
455
|
+
{ code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,promote_field" },
|
|
456
|
+
{ code: "54001", raised_by: "record_delete" },
|
|
365
457
|
{ code: "PT409", raised_by: "record_update" }
|
|
366
458
|
];
|
|
367
459
|
var ENTITY_TOKENS = [
|
|
@@ -572,6 +664,7 @@ var ENTITY_TOKENS = [
|
|
|
572
664
|
"content_ir_kind_example",
|
|
573
665
|
"content_ir_kind_instance",
|
|
574
666
|
"content_ir_kind_surface",
|
|
667
|
+
"content_lane",
|
|
575
668
|
"context_access_log",
|
|
576
669
|
"context_item",
|
|
577
670
|
"context_item_suggestion",
|
|
@@ -1006,6 +1099,7 @@ var ENTITY_TOKENS = [
|
|
|
1006
1099
|
"part_config_sub",
|
|
1007
1100
|
"party",
|
|
1008
1101
|
"party_contact_point",
|
|
1102
|
+
"passkey_credential",
|
|
1009
1103
|
"path_drift_repair_2026_09",
|
|
1010
1104
|
"pc_article",
|
|
1011
1105
|
"pc_episode",
|
|
@@ -1453,6 +1547,20 @@ var DOORS = {
|
|
|
1453
1547
|
fieldOptions: "field_options",
|
|
1454
1548
|
parityValues: "parity_values",
|
|
1455
1549
|
tableDeclare: "table_declare",
|
|
1550
|
+
// ADDING A COLUMN — the first thing anybody does with a table, and until
|
|
1551
|
+
// 2026-09-19 there was no door for it. A Field is a record (REC-25), so a
|
|
1552
|
+
// screen wrote one with `record_write`; that door writes ONE row with
|
|
1553
|
+
// `data_class = 'record'` and cannot also add the key to the Table record's
|
|
1554
|
+
// `fields` array, which the field guard requires before it accepts any
|
|
1555
|
+
// definition at all. So every "Add field" ended on "the table does not
|
|
1556
|
+
// declare a field called … — declare it there first". These three doors take
|
|
1557
|
+
// what a person knows — a field type, a name, and for a choice list the
|
|
1558
|
+
// choices themselves — and the STORE turns that into the document its own
|
|
1559
|
+
// guards demand, so every client inherits one answer instead of each one
|
|
1560
|
+
// re-deriving thirteen and getting them wrong.
|
|
1561
|
+
fieldDeclare: "field_declare",
|
|
1562
|
+
fieldUpdate: "field_update",
|
|
1563
|
+
fieldRetire: "field_retire",
|
|
1456
1564
|
tableCapacity: "table_capacity",
|
|
1457
1565
|
tableStorage: "table_storage",
|
|
1458
1566
|
promoteTable: "promote_table",
|
|
@@ -1465,6 +1573,10 @@ var DOORS = {
|
|
|
1465
1573
|
recordReparent: "record_reparent",
|
|
1466
1574
|
containmentChain: "containment_chain",
|
|
1467
1575
|
storeIsOpen: "store_is_open",
|
|
1576
|
+
// DOOR-1, from the screen's side. What level the CALLER holds on the subjects
|
|
1577
|
+
// they name — the one question a screen has to answer BEFORE it draws a
|
|
1578
|
+
// control, and the only one the store had no client answer to.
|
|
1579
|
+
myLevels: "my_levels",
|
|
1468
1580
|
// DOOR-11. The record's own revision list. A screen that offers an optimistic
|
|
1469
1581
|
// save needs the version it LOADED, and the read door answers documents, not
|
|
1470
1582
|
// versions — so the version comes from here, once, for the one record being
|
|
@@ -1573,6 +1685,12 @@ var BY_SQLSTATE = {
|
|
|
1573
1685
|
"0A000": "not_supported",
|
|
1574
1686
|
"53400": "store_limit",
|
|
1575
1687
|
"22012": "store_limit",
|
|
1688
|
+
// 54001 — `custom.record_delete` stops a cascade that nests past sixty-four
|
|
1689
|
+
// levels of containment, because that is a loop somebody built rather than a
|
|
1690
|
+
// hierarchy, and saying so beats recursing until the server runs out of
|
|
1691
|
+
// stack. It is a LIMIT of the store, and the store's own sentence names what
|
|
1692
|
+
// to do about it, so it reads as one.
|
|
1693
|
+
"54001": "store_limit",
|
|
1576
1694
|
// VIS: `custom.has_visibility_at` refuses to answer from a snapshot older
|
|
1577
1695
|
// than a write this reader has already seen, rather than returning something
|
|
1578
1696
|
// they just lost access to. It is retryable on a fresher connection, which is
|
|
@@ -1948,6 +2066,27 @@ function createRecordsClient(config) {
|
|
|
1948
2066
|
"tableCapacity"
|
|
1949
2067
|
);
|
|
1950
2068
|
},
|
|
2069
|
+
async fieldDeclare({ table_id, spec }) {
|
|
2070
|
+
return callDoor(
|
|
2071
|
+
DOORS.fieldDeclare,
|
|
2072
|
+
{ p_organization_id: org, p_table_id: table_id, p_spec: spec },
|
|
2073
|
+
"fieldDeclare"
|
|
2074
|
+
);
|
|
2075
|
+
},
|
|
2076
|
+
async fieldUpdate({ field_id, patch }) {
|
|
2077
|
+
return callDoor(
|
|
2078
|
+
DOORS.fieldUpdate,
|
|
2079
|
+
{ p_organization_id: org, p_field_id: field_id, p_patch: patch },
|
|
2080
|
+
"fieldUpdate"
|
|
2081
|
+
);
|
|
2082
|
+
},
|
|
2083
|
+
async fieldRetire({ field_id }) {
|
|
2084
|
+
return callDoor(
|
|
2085
|
+
DOORS.fieldRetire,
|
|
2086
|
+
{ p_organization_id: org, p_field_id: field_id },
|
|
2087
|
+
"fieldRetire"
|
|
2088
|
+
);
|
|
2089
|
+
},
|
|
1951
2090
|
async tableDeclare({ spec, homeId }) {
|
|
1952
2091
|
return callDoor(
|
|
1953
2092
|
DOORS.tableDeclare,
|
|
@@ -2422,6 +2561,18 @@ function createRecordsClient(config) {
|
|
|
2422
2561
|
},
|
|
2423
2562
|
async storeIsOpen() {
|
|
2424
2563
|
return callDoor(DOORS.storeIsOpen, { p_organization_id: org }, "storeIsOpen");
|
|
2564
|
+
},
|
|
2565
|
+
async myLevels({ ids, subject }) {
|
|
2566
|
+
if (ids.length === 0) return ok([]);
|
|
2567
|
+
const answered = await callDoor(
|
|
2568
|
+
DOORS.myLevels,
|
|
2569
|
+
{ p_organization_id: org, p_ids: ids, p_type: subject ?? "record" },
|
|
2570
|
+
"myLevels"
|
|
2571
|
+
);
|
|
2572
|
+
if (!answered.ok) return err(answered.error);
|
|
2573
|
+
return ok(
|
|
2574
|
+
(answered.data ?? []).map((row) => ({ id: row.id, level: asPermissionLevel(row.level) }))
|
|
2575
|
+
);
|
|
2425
2576
|
}
|
|
2426
2577
|
};
|
|
2427
2578
|
return client;
|
|
@@ -2516,6 +2667,31 @@ function useTable(tableId) {
|
|
|
2516
2667
|
function useTables() {
|
|
2517
2668
|
return useAsync((client) => client.tableList(), []);
|
|
2518
2669
|
}
|
|
2670
|
+
function useMyLevels(ids) {
|
|
2671
|
+
const key = ids.join(",");
|
|
2672
|
+
return useAsync(
|
|
2673
|
+
async (client) => {
|
|
2674
|
+
const asked = key === "" ? [] : key.split(",");
|
|
2675
|
+
const answered = await client.myLevels({ ids: asked });
|
|
2676
|
+
if (!answered.ok) return answered;
|
|
2677
|
+
const held = {};
|
|
2678
|
+
for (const row of answered.data) held[row.id] = row.level;
|
|
2679
|
+
return { ok: true, data: held };
|
|
2680
|
+
},
|
|
2681
|
+
[key]
|
|
2682
|
+
);
|
|
2683
|
+
}
|
|
2684
|
+
function useMyLevel(id) {
|
|
2685
|
+
return useAsync(
|
|
2686
|
+
async (client) => {
|
|
2687
|
+
if (!id) return { ok: true, data: null };
|
|
2688
|
+
const answered = await client.myLevels({ ids: [id] });
|
|
2689
|
+
if (!answered.ok) return answered;
|
|
2690
|
+
return { ok: true, data: answered.data[0]?.level ?? null };
|
|
2691
|
+
},
|
|
2692
|
+
[id]
|
|
2693
|
+
);
|
|
2694
|
+
}
|
|
2519
2695
|
function useFields(tableId, recordType) {
|
|
2520
2696
|
return useAsync(
|
|
2521
2697
|
async (client) => {
|
|
@@ -2610,6 +2786,40 @@ function useRecordMutation() {
|
|
|
2610
2786
|
[client, run, saving, error, conflict]
|
|
2611
2787
|
);
|
|
2612
2788
|
}
|
|
2789
|
+
function useFieldMutation() {
|
|
2790
|
+
const client = useRecordsClient();
|
|
2791
|
+
const [saving, setSaving] = useState(false);
|
|
2792
|
+
const [error, setError] = useState(null);
|
|
2793
|
+
const run = useCallback(
|
|
2794
|
+
async (call, whenRefused) => {
|
|
2795
|
+
setSaving(true);
|
|
2796
|
+
setError(null);
|
|
2797
|
+
try {
|
|
2798
|
+
const result = await call();
|
|
2799
|
+
if (result.ok) return result.data;
|
|
2800
|
+
setError(result.error);
|
|
2801
|
+
return whenRefused;
|
|
2802
|
+
} finally {
|
|
2803
|
+
setSaving(false);
|
|
2804
|
+
}
|
|
2805
|
+
},
|
|
2806
|
+
[]
|
|
2807
|
+
);
|
|
2808
|
+
return useMemo2(
|
|
2809
|
+
() => ({
|
|
2810
|
+
declare: (args) => run(
|
|
2811
|
+
() => client.fieldDeclare({ table_id: args.table_id, spec: args.spec }),
|
|
2812
|
+
null
|
|
2813
|
+
),
|
|
2814
|
+
update: (args) => run(() => client.fieldUpdate({ field_id: args.field_id, patch: args.patch }), null),
|
|
2815
|
+
retire: (args) => run(() => client.fieldRetire({ field_id: args.field_id }), false),
|
|
2816
|
+
saving,
|
|
2817
|
+
error,
|
|
2818
|
+
clearError: () => setError(null)
|
|
2819
|
+
}),
|
|
2820
|
+
[client, run, saving, error]
|
|
2821
|
+
);
|
|
2822
|
+
}
|
|
2613
2823
|
function useMergeField(key, state) {
|
|
2614
2824
|
const client = useRecordsClient();
|
|
2615
2825
|
const [resolution, setResolution] = useState(null);
|
|
@@ -2725,6 +2935,7 @@ export {
|
|
|
2725
2935
|
ON_DELETE,
|
|
2726
2936
|
OVERRIDE_POLICIES,
|
|
2727
2937
|
PARITY_FIELD_TYPES,
|
|
2938
|
+
PERMISSION_LEVELS,
|
|
2728
2939
|
PER_VALUE_ACCESS_WORDS,
|
|
2729
2940
|
RELATION_BINDINGS,
|
|
2730
2941
|
RELATION_CARDINALITIES,
|
|
@@ -2742,12 +2953,18 @@ export {
|
|
|
2742
2953
|
TABLE_TYPES,
|
|
2743
2954
|
VALUE_ALTERNATE_KEYS,
|
|
2744
2955
|
VALUE_ENVELOPE_KEYS,
|
|
2956
|
+
asPermissionLevel,
|
|
2957
|
+
atLeast,
|
|
2745
2958
|
err,
|
|
2959
|
+
highestLevel,
|
|
2746
2960
|
isRecordsErr,
|
|
2747
2961
|
measureKey,
|
|
2748
2962
|
ok,
|
|
2963
|
+
useFieldMutation,
|
|
2749
2964
|
useFields,
|
|
2750
2965
|
useMergeField,
|
|
2966
|
+
useMyLevel,
|
|
2967
|
+
useMyLevels,
|
|
2751
2968
|
useRecord,
|
|
2752
2969
|
useRecordMutation,
|
|
2753
2970
|
useRecords,
|