declare const ACTOR_VOCABULARY: readonly ["user", "agent", "system"]; /** The three words the store still accepts and rewrites, and what each becomes. */ declare const RETIRED_ACTOR_WORDS: { readonly ai: "agent"; readonly code: "system"; readonly human: "user"; }; declare const ABSENCE_REASONS: readonly ["never asked", "none", "refused", "conflicting"]; declare const VALUE_ENVELOPE_KEYS: readonly ["ver", "src", "actor", "on_behalf_of", "at", "absent", "alternates", "dated", "pinned"]; declare const VALUE_ALTERNATE_KEYS: readonly ["value", "src", "rank"]; declare const STORAGE_MODES: readonly ["light", "heavy"]; declare const RULE_USES: readonly ["validate", "compute", "membership", "applicability"]; declare const PER_VALUE_ACCESS_WORDS: readonly ["visibility", "access", "share", "acl", "permission", "permissions", "secret"]; /** FLD-11's parity floor, each with the behavior it is MADE OF (FLD-1). */ declare const PARITY_FIELD_TYPES: readonly [{ readonly parity_type: "attachment"; readonly behavior: "relation"; readonly made_of: "REC-31: a File record reached through a relation, target the kernel `File` Table"; }, { readonly parity_type: "checkbox"; readonly behavior: "boolean"; readonly made_of: "a ticked or unticked answer, stored as a REAL boolean — and a record that never answered holds neither, so filters and group-by see three states, not two"; }, { readonly parity_type: "currency"; readonly behavior: "range"; readonly made_of: "FLD-N-1: a number whose UNIT is the currency and whose format is currency — on the Field, never in presentation"; }, { readonly parity_type: "datetime"; readonly behavior: "range"; readonly made_of: "a range of kind date or datetime — the dated modifier says the VALUES are dated, which is a different question"; }, { readonly parity_type: "email"; readonly behavior: "text"; readonly made_of: "text whose format is email"; }, { readonly parity_type: "formula"; readonly behavior: "formula"; readonly made_of: "FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval"; }, { readonly parity_type: "lookup"; readonly behavior: "formula"; readonly made_of: "a Value read THROUGH a relation — config.via names the relation field, config.pick the Value on the far side"; }, { readonly parity_type: "member"; readonly behavior: "relation"; readonly made_of: "a person: a relation whose target is the kernel `Person` Table"; }, { readonly parity_type: "multi_select"; readonly behavior: "list"; readonly made_of: "many choices from the same Table — the multi modifier, never a second behaviour"; }, { readonly parity_type: "percent"; readonly behavior: "range"; readonly made_of: "a number whose unit is % and whose format is percent"; }, { readonly parity_type: "phone"; readonly behavior: "text"; readonly made_of: "text whose format is phone"; }, { readonly parity_type: "rollup"; readonly behavior: "formula"; readonly made_of: "an aggregate ALONG a relation — config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice"; }, { readonly parity_type: "select"; readonly behavior: "list"; readonly made_of: "one choice from a Table shown as a list (FLD-5/FLD-6)"; }, { readonly parity_type: "url"; readonly behavior: "text"; readonly made_of: "text whose format is url, with the pattern Rule that makes the format enforceable"; }]; /** * THE ONE REGISTRY: every kind a column can be DECLARED as, from * `custom.field_kinds()`. `parity` says whether the kind is one of FLD-11's parity * floor; the rest are the behaviors and formats the declaration door answers to and * nothing else enumerated — which is how `signature` came to be a shape * `custom.doc_sign` accepted and no screen could offer. */ declare const DECLARABLE_FIELD_KINDS: readonly [{ readonly kind: "address"; readonly behavior: "text"; readonly parity: false; readonly made_of: "P4: behaviour text, format address; the value is {street, city, region, postal_code, country}, every part optional, at least one filled"; }, { readonly kind: "attachment"; readonly behavior: "relation"; readonly parity: true; readonly made_of: "REC-31: a File record reached through a relation, target the kernel `File` Table"; }, { readonly kind: "barcode"; readonly behavior: "text"; readonly parity: false; readonly made_of: "P4: behaviour text, format barcode; one printable line a scanner reads, config.symbology optional (custom.barcode_symbologies()), EAN/UPC digits and check digit enforced"; }, { readonly kind: "button"; readonly behavior: "text"; readonly parity: false; readonly made_of: "NOTION-PROPS-2: behaviour text, format button; holds no value. config.button says what a press does through custom.button_press: open_url (url, {{field id}} filled from the row), run_automation (one of the table's automations, on this row) or run_action (one of its row actions, which sets fields), or add_row (a new row in this table or table_id's, prefilled from this row by prefill, opened); a button with no do yet is a label only"; }, { readonly kind: "checkbox"; readonly behavior: "boolean"; readonly parity: true; readonly made_of: "a ticked or unticked answer, stored as a REAL boolean — and a record that never answered holds neither, so filters and group-by see three states, not two"; }, { readonly kind: "count"; readonly behavior: "formula"; readonly parity: false; readonly made_of: "P4: a roll-up whose config.agg is count, with format count: how many records a many-relation points at, as a number of its own"; }, { readonly kind: "created_by"; readonly behavior: "formula"; readonly parity: false; readonly made_of: "P4: a formula Field whose config.system is created_by: who made the record, {id, name}, filled by the store from the record's writer on read and never typed"; }, { readonly kind: "currency"; readonly behavior: "range"; readonly parity: true; readonly made_of: "FLD-N-1: a number whose UNIT is the currency and whose format is currency — on the Field, never in presentation"; }, { readonly kind: "datetime"; readonly behavior: "range"; readonly parity: true; readonly made_of: "a range of kind date or datetime — the dated modifier says the VALUES are dated, which is a different question"; }, { readonly kind: "duration"; readonly behavior: "range"; readonly parity: false; readonly made_of: "P4: behaviour range, format duration, unit seconds; a length of time kept as seconds, never below zero"; }, { readonly kind: "email"; readonly behavior: "text"; readonly parity: true; readonly made_of: "text whose format is email"; }, { readonly kind: "entity_reference"; readonly behavior: "relation"; readonly parity: false; readonly made_of: "SC-R / P12: a relation whose target mode is any (REL-8), restricted by config.allowed_types to the platform kinds it may name (custom.entity_reference_kinds() — agents, notes, web sites, workbooks, datasets, conversations …); each value is {token, id}, the edge a platform.associations row record → . File and Person stay relations to their kernel Tables"; }, { readonly kind: "formula"; readonly behavior: "formula"; readonly parity: true; readonly made_of: "FLD-9: a declared computation, on read or on write, evaluated by custom.rule_eval"; }, { readonly kind: "json"; readonly behavior: "text"; readonly parity: false; readonly made_of: "W2-A: behaviour text, format json; any JSON value (object, list, number, words, yes/no) kept as jsonb, shown collapsed"; }, { readonly kind: "long_text"; readonly behavior: "text"; readonly parity: false; readonly made_of: "behaviour text with format long and config.multiline, for several lines rather than one"; }, { readonly kind: "lookup"; readonly behavior: "formula"; readonly parity: true; readonly made_of: "a Value read THROUGH a relation — config.via names the relation field, config.pick the Value on the far side"; }, { readonly kind: "member"; readonly behavior: "relation"; readonly parity: true; readonly made_of: "a person: a relation whose target is the kernel `Person` Table"; }, { readonly kind: "modified_by"; readonly behavior: "formula"; readonly parity: false; readonly made_of: "P4: a formula Field whose config.system is modified_by: who last changed the record, {id, name}, filled by the store on read and never typed"; }, { readonly kind: "multi_select"; readonly behavior: "list"; readonly parity: true; readonly made_of: "many choices from the same Table — the multi modifier, never a second behaviour"; }, { readonly kind: "number"; readonly behavior: "range"; readonly parity: false; readonly made_of: "a plain number: behaviour range with no date kind and neither the currency nor the percent format"; }, { readonly kind: "percent"; readonly behavior: "range"; readonly parity: true; readonly made_of: "a number whose unit is % and whose format is percent"; }, { readonly kind: "phone"; readonly behavior: "text"; readonly parity: true; readonly made_of: "text whose format is phone"; }, { readonly kind: "rating"; readonly behavior: "range"; readonly parity: false; readonly made_of: "P4: behaviour range, format rating; a whole number of stars from 0 to its max Rule (1 to 10, default 5), shown as stars"; }, { readonly kind: "relation"; readonly behavior: "relation"; readonly parity: false; readonly made_of: "REL / FLD-11: a relation a person aims themselves — relation_target names a Table of this organization, and it is a BEHAVIOUR, never a parity type of its own"; }, { readonly kind: "rich_text"; readonly behavior: "text"; readonly parity: false; readonly made_of: "P4: behaviour text, format rich_text; Markdown with no raw HTML and no script links, shown formatted"; }, { readonly kind: "rollup"; readonly behavior: "formula"; readonly parity: true; readonly made_of: "an aggregate ALONG a relation — config.via, config.of, config.agg; far-side ids are taken DISTINCT, so nothing is counted twice"; }, { readonly kind: "select"; readonly behavior: "list"; readonly parity: true; readonly made_of: "one choice from a Table shown as a list (FLD-5/FLD-6)"; }, { readonly kind: "signature"; readonly behavior: "text"; readonly parity: false; readonly made_of: "VAL-10: behaviour text whose format is signature — the one shape custom.doc_sign accepts, sealed by custom.doc_signature_write and checked by custom.doc_signature_intact"; }, { readonly kind: "status"; readonly behavior: "list"; readonly parity: false; readonly made_of: "P4: a single-choice list with format status; config.status_groups puts each choice key in todo, in_progress or done (Notion's Status)"; }, { readonly kind: "text"; readonly behavior: "text"; readonly parity: false; readonly made_of: "plain text: behaviour text with no format — it carries no parity type, which is exactly what custom.parity_type answers for it"; }, { readonly kind: "time"; readonly behavior: "text"; readonly parity: false; readonly made_of: "W2-A: behaviour text, format time; a time of day with no date kept as 24-hour HH:MM or HH:MM:SS (zero-padded, so its text order is its time order); HOUR, MINUTE and SECOND read it"; }, { readonly kind: "url"; readonly behavior: "text"; readonly parity: true; readonly made_of: "text whose format is url, with the pattern Rule that makes the format enforceable"; }]; /** The node kinds `custom.rule_eval` evaluates, and the lane that owns each. */ declare const RULE_NODE_KINDS: readonly [{ readonly node: "actor_at_least"; readonly evaluated_by: "PIPELINES"; }, { readonly node: "add"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "and"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "concat"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "const"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "contains"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "div"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "eq"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "field"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "fx.abs"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.add"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.and"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.arraycompact"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.arrayflatten"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.arrayjoin"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.arrayslice"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.arrayunique"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.at"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.autonumber"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.average"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.blank"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.ceiling"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.concatenate"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.contains"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.count"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.counta"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.countall"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.created_time"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.current"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.current1"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.current2"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.dateadd"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.datediff"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.datestr"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.datetime_diff"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.datetime_format"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.datetime_parse"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.day"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.div"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.encode_url_component"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.eq"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.error"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.even"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.every"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.exp"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.false"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.filter"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.find"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.findfirst"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.first"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.floor"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.fromnow"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.gt"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.gte"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.hour"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.if"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.includes"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.index"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.int"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.is_after"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.is_before"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.is_same"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.isblank"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.iserror"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.join"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.last"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.last_modified_time"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.left"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.len"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.length"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.log"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.lower"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.lt"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.lte"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.map"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.max"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.median"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.mid"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.min"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.minute"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.mod"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.modified_time"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.month"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.mul"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.ne"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.neg"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.not"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.now"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.odd"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.or"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.power"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.record_id"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.recprop"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.regex_extract"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.regex_match"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.regex_replace"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.regexreplace"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.replace"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.rept"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.reverse"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.right"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.round"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.rounddown"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.roundup"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.search"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.second"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.set_locale"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.set_timezone"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.slice"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.some"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.sort"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.split"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.sqrt"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.sub"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.substitute"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.sum"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.switch"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.t"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.timestr"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.today"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.tonow"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.trim"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.true"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.unique"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.upper"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.value"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.weekday"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.weeknum"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.workday"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.workday_diff"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.xor"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "fx.year"; readonly evaluated_by: "GRID-PRIMITIVES G3 (custom.formula_eval)"; }, { readonly node: "gt"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "gte"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "has_all"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "has_any"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "has_none"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "is_empty"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "is_exactly"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "is_not_empty"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "length"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "linked"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "lt"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "lte"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "matches"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "merge_field"; readonly evaluated_by: "W5-MERGE-B"; }, { readonly node: "mul"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "ne"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "not"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "not_contains"; readonly evaluated_by: "NOTION-Q"; }, { readonly node: "or"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "parent_field"; readonly evaluated_by: "W1-RULE-APPLY"; }, { readonly node: "present"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "previous"; readonly evaluated_by: "PIPELINES"; }, { readonly node: "sibling_count"; readonly evaluated_by: "STAGE-RULES"; }, { readonly node: "stage_count"; readonly evaluated_by: "PIPELINES"; }, { readonly node: "sub"; readonly evaluated_by: "W1-RULE"; }, { readonly node: "within"; readonly evaluated_by: "CHAIR-FILTER"; }]; /** * What each formula node answers (`custom.formula_node_kinds()`): number, text, boolean, date or unknown. * Generated, so a function the store adds can never be missing from a screen that types a formula. */ declare const FORMULA_NODE_RESULTS: Readonly>; /** REC-27. The kernel, by name and by id, as the store holds it. */ declare const KERNEL_TABLES: readonly [{ readonly id: "11111111-0000-4000-8000-000000000002"; readonly name: "Field"; }, { readonly id: "11111111-0000-4000-8000-000000000006"; readonly name: "File"; }, { readonly id: "11111111-0000-4000-8000-000000000009"; readonly name: "Merge Field"; }, { readonly id: "11111111-0000-4000-8000-000000000004"; readonly name: "Organization"; }, { readonly id: "11111111-0000-4000-8000-000000000005"; readonly name: "Person"; }, { readonly id: "11111111-0000-4000-8000-000000000007"; readonly name: "Presentation"; }, { readonly id: "11111111-0000-4000-8000-000000000003"; readonly name: "Rule"; }, { readonly id: "11111111-0000-4000-8000-000000000001"; readonly name: "Table"; }, { readonly id: "11111111-0000-4000-8000-000000000008"; readonly name: "Widget"; }]; /** * Every door the store actually has, with the argument list and the result the * catalog reports. A client call whose door is not in this list is answered * `door_absent` by name — never a guess, never a silent no-op. */ declare const STORE_DOORS: readonly [{ readonly name: "absence_reasons"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "action_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_actions jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "action_run"; readonly args: "p_organization_id uuid, p_action_id uuid, p_record_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "actor_vocabulary"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "actor_word"; readonly args: "p_declared text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "addressed_cap"; readonly args: "p_user_id uuid, p_type text, p_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "permission_level"; readonly security: "definer"; }, { readonly name: "addressed_cap_specific"; readonly args: "p_user_id uuid, p_type text, p_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "permission_level"; readonly security: "definer"; }, { readonly name: "admin_all_tables"; readonly args: ""; readonly returns: "TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, updated_at timestamp with time zone, platform_owned boolean, system boolean)"; readonly security: "definer"; }, { readonly name: "agent_change_approval"; readonly args: "p_organization uuid, p_conversation uuid DEFAULT NULL::uuid, p_table uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "agent_change_trust"; readonly args: "p_organization_id uuid, p_approval_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "agent_context"; readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 50"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agent_context_value"; readonly args: "p_doc jsonb, p_key text, p_type text, p_organization_id uuid, p_record_id uuid, p_cap bigint"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agent_context_value_cap"; readonly args: "p_organization_id uuid"; readonly returns: "bigint"; readonly security: "invoker"; }, { readonly name: "agent_table_claim"; readonly args: "p_organization uuid, p_table uuid, p_conversation uuid DEFAULT NULL::uuid"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "agg_assert_key"; readonly args: "p_key text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_bucket_ordinal"; readonly args: "p_by text, p_window_from timestamp without time zone, p_at timestamp without time zone, p_week_start text"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_buckets"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "agg_cadence_normalize"; readonly args: "p_cadence text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_calendar"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agg_compare_kinds"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "agg_compare_windows"; readonly args: "p_organization_id uuid, p_compare jsonb, p_bucket jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agg_deliver"; readonly 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, p_dedupe_suffix text DEFAULT NULL::text"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "agg_deliver_quietly"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_subject_id uuid, p_channel text, p_recipient_user_id uuid, p_event_key text, p_subject text, p_body text, p_payload jsonb, p_quiet_hours jsonb, p_link text, p_dedupe_suffix text DEFAULT NULL::text"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "agg_delta"; readonly args: "p_current jsonb, p_prior jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agg_digest_assemble"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone, p_until timestamp with time zone DEFAULT NULL::timestamp with time zone"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agg_digest_due_at"; readonly args: "p_cadence text, p_schedule text, p_quiet jsonb, p_after timestamp with time zone"; readonly returns: "timestamp with time zone"; readonly security: "invoker"; }, { readonly name: "agg_digest_judged_at"; readonly args: "p_organization_id uuid, p_rule_id uuid"; readonly returns: "timestamp with time zone"; readonly security: "invoker"; }, { readonly name: "agg_digest_run"; readonly args: "p_organization_id uuid, p_rule_id uuid DEFAULT NULL::uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_digest_run_at"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_since timestamp with time zone, p_now timestamp with time zone"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_digest_tick"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_digest_tick_at"; readonly args: "p_now timestamp with time zone, p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_explain"; readonly 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"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "agg_field_kind"; readonly args: "p_organization_id uuid, p_table_id uuid, p_key text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_field_value_sql"; readonly args: "p_organization_id uuid, p_table_id uuid, p_key text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_fields_readable_assert"; readonly args: "p_organization_id uuid, p_table_id uuid, p_keys text[], p_required text DEFAULT 'viewer'::text"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "agg_group_value"; readonly args: "p_value text, p_kind text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agg_last_digest_at"; readonly args: "p_organization_id uuid, p_rule_id uuid"; readonly returns: "timestamp with time zone"; readonly security: "invoker"; }, { readonly name: "agg_local_label"; readonly args: "p_local timestamp without time zone, p_tz text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_moment_sql"; readonly args: "p_key text, p_tz text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_operations"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "agg_parse_moment"; readonly args: "p_raw text, p_tz text, p_what text"; readonly returns: "timestamp with time zone"; readonly security: "invoker"; }, { readonly name: "agg_period_start"; readonly args: "p_local timestamp without time zone, p_by text, p_week_start text DEFAULT 'monday'::text"; readonly returns: "timestamp without time zone"; readonly security: "invoker"; }, { readonly name: "agg_period_step"; readonly args: "p_by text"; readonly returns: "interval"; readonly security: "invoker"; }, { readonly name: "agg_quiet_until"; readonly args: "p_quiet jsonb, p_at timestamp with time zone"; readonly returns: "timestamp with time zone"; readonly security: "invoker"; }, { readonly name: "agg_record_name"; readonly args: "p_organization_id uuid, p_record_id uuid, p_state jsonb DEFAULT NULL::jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_split_parts"; readonly args: "p_organization_id uuid, p_table_id uuid, p_key text, p_alias text"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "agg_sql"; readonly 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, p_window jsonb DEFAULT NULL::jsonb, p_search text DEFAULT NULL::text, p_time_zone text DEFAULT NULL::text, p_split_multi boolean DEFAULT false"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_subscription_cadences"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "agg_subscription_fire"; readonly args: "p_organization_id uuid, p_record_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_changed_field_ids jsonb DEFAULT '[]'::jsonb"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_subscription_fire_entered"; readonly args: "p_organization_id uuid, p_record_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_since timestamp with time zone DEFAULT NULL::timestamp with time zone"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_subscription_tick"; readonly args: "p_window interval DEFAULT '00:15:00'::interval"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "agg_subscriptions"; readonly args: "p_organization_id uuid, p_saved_view_id uuid DEFAULT NULL::uuid, p_cadence text DEFAULT NULL::text"; readonly returns: "TABLE(rule_id uuid, saved_view_id uuid, table_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, name text)"; readonly security: "invoker"; }, { readonly name: "agg_value_sql"; readonly args: "p_key text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_value_text"; readonly args: "p_value jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "agg_view_admits"; readonly args: "p_organization_id uuid, p_saved_view_id uuid, p_record_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "agg_view_admits_state"; readonly args: "p_definition jsonb, p_state jsonb"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "agg_withheld_marker"; readonly args: "p_organization_id uuid, p_table_id uuid, p_key text, p_required text DEFAULT 'viewer'::text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "agg_zero"; readonly args: "p_measures jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "anon_capture"; readonly args: "p_organization_id uuid, p_client_key text, p_table_id uuid, p_payload jsonb, p_device text DEFAULT NULL::text, p_captured_at timestamp with time zone DEFAULT NULL::timestamp with time zone"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "anon_clear"; readonly args: "p_organization_id uuid, p_submission_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "anon_inbound_land"; readonly args: "p_address text, p_secret text, p_payload jsonb, p_raw_payload jsonb DEFAULT '{}'::jsonb, p_client_key text DEFAULT NULL::text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "anon_publish"; readonly args: "p_organization_id uuid, p_form_id uuid, p_published boolean DEFAULT true"; readonly returns: "timestamp with time zone"; readonly security: "definer"; }, { readonly name: "anon_rate_take"; readonly args: "p_organization_id uuid, p_form_id uuid, p_bucket text, p_token_id uuid DEFAULT NULL::uuid"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "anon_submissions"; readonly 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"; readonly 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)"; readonly security: "definer"; }, { readonly name: "anon_token_issue"; readonly 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"; readonly returns: "TABLE(token_id uuid, secret text)"; readonly security: "definer"; }, { readonly name: "anon_token_revoke"; readonly args: "p_organization_id uuid, p_token_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "anon_token_verify"; readonly args: "p_secret text, p_origin text, p_required_mode text"; readonly returns: "TABLE(token_id uuid, organization_id uuid, form_id uuid, saved_view_id uuid, record_id uuid, mode text)"; readonly security: "definer"; }, { readonly name: "anon_write"; readonly args: "p_secret text, p_origin text, p_payload jsonb, p_client_key text DEFAULT NULL::text, p_raw_payload jsonb DEFAULT '{}'::jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "applicable_fields"; readonly args: "p_organization_id uuid, p_table_id uuid, p_record_type text DEFAULT NULL::text"; readonly returns: "SETOF custom.record"; readonly security: "definer"; }, { readonly name: "archive_event_of"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "history.migration_log"; readonly security: "definer"; }, { readonly name: "archive_guard_count"; readonly args: "p_value jsonb"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "archive_guard_decide"; readonly args: "p_organization_id uuid, p_scope text, p_live_before integer, p_ids text[], p_confirm text, p_log jsonb, p_now timestamp with time zone DEFAULT now(), p_share numeric DEFAULT NULL::numeric, p_hours numeric DEFAULT NULL::numeric"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "archive_guard_knob"; readonly args: "p_key text, p_organization_id uuid"; readonly returns: "numeric"; readonly security: "invoker"; }, { readonly name: "archive_guard_log_add"; readonly args: "p_log jsonb, p_entry jsonb, p_organization_id uuid, p_now timestamp with time zone DEFAULT now()"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "archive_guard_when"; readonly args: "p_value jsonb"; readonly returns: "timestamp with time zone"; readonly security: "invoker"; }, { readonly name: "archive_hold_answer"; readonly args: "p_organization_id uuid, p_table_id uuid, p_answer text, p_token text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "archived_tables_everywhere"; readonly args: "p_lane text DEFAULT 'org'::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_sort text DEFAULT 'archived_at'::text, p_desc boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "assert_client_may_change"; readonly 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"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "assert_client_may_open"; readonly 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"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "assert_client_may_reach"; readonly args: "p_organization_id uuid, p_door text"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "assert_columns_are_defined"; readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "assert_entity_door"; readonly args: "p_organization_id uuid, p_door text"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "assert_entity_is_organization_scoped"; readonly args: "p_token text, p_label text, p_scoped boolean"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "assert_may_know_table"; readonly args: "p_organization_id uuid, p_table_id uuid, p_door text"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "assert_organization_admin"; readonly args: "p_organization_id uuid, p_door text, p_what text"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "assert_organization_wall"; readonly args: "p_kind text, p_organization_id uuid, p_row jsonb"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "assert_public_reader_names_a_public_table"; readonly args: "p_organization_id uuid, p_table_id uuid, p_door text"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "assert_scope_door"; readonly args: "p_organization_id uuid, p_door text"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "assert_store_door"; readonly args: "p_organization_id uuid, p_door text"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "automation_app_event"; readonly args: "p_automation_id uuid, p_items jsonb, p_cursor jsonb, p_expected_owner text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_app_may_edit"; readonly args: "p_automation_id uuid, p_user_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "automation_app_note"; readonly args: "p_automation_id uuid, p_says text, p_cursor jsonb, p_expected_owner text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_app_stop"; readonly args: "p_automation_id uuid, p_says text, p_expected_owner text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_app_watch"; readonly args: "p_automation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_archive"; readonly args: "p_organization_id uuid, p_automation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_claim_pending"; readonly args: "p_worker text, p_limit integer DEFAULT 5, p_lease_seconds integer DEFAULT 180"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb, p_automation_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_delivery_tick"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "automation_note"; readonly args: "p_run_id uuid, p_says text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_restore"; readonly args: "p_organization_id uuid, p_automation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_resume"; readonly args: "p_run_id uuid, p_output jsonb, p_error text DEFAULT NULL::text, p_logs jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_revision_restore"; readonly args: "p_organization_id uuid, p_automation_id uuid, p_revision_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_revisions"; readonly args: "p_organization_id uuid, p_automation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_runs"; readonly args: "p_automation_id uuid, p_limit integer DEFAULT 50, p_cursor timestamp with time zone DEFAULT NULL::timestamp with time zone, p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_set_enabled"; readonly args: "p_organization_id uuid, p_automation_id uuid, p_enabled boolean"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_step_mark"; readonly args: "p_run_id uuid, p_n integer, p_state text, p_output jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_test"; readonly args: "p_organization_id uuid, p_automation_id uuid, p_record_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automation_time_tick"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "automation_webhook_receive"; readonly args: "p_automation_id uuid, p_secret text, p_body jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "automations"; readonly args: "p_table_id uuid, p_organization_id uuid DEFAULT NULL::uuid, p_include_archived boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "autonumber_backfill"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "barcode_symbologies"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "base_activity"; readonly args: "p_organization_id uuid, p_subject_id uuid, p_limit integer DEFAULT 50, p_before bigint DEFAULT NULL::bigint"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "base_copy_finish"; readonly args: "p_organization_id uuid, p_pairs jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "base_move"; readonly args: "p_home_id uuid, p_to_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "base_move_access_kept"; readonly args: "p_home_id uuid, p_to_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "base_move_remove_access"; readonly args: "p_home_id uuid, p_user_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "booking_busy_due"; readonly args: "p_form_id uuid"; readonly returns: "TABLE(feed text, due boolean, timezone text, days integer, read_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "booking_busy_set"; readonly args: "p_form_id uuid, p_busy jsonb, p_problem text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "booking_cancel"; readonly args: "p_booking_ref text, p_origin text DEFAULT NULL::text"; readonly returns: "TABLE(booking_ref text, record_id uuid, slot_key text, state text, message text)"; readonly security: "definer"; }, { readonly name: "booking_confirm"; readonly args: "p_form_id uuid, p_hold_id uuid, p_origin text, p_payload jsonb, p_bucket text, p_honeypot text DEFAULT NULL::text, p_client_key text DEFAULT NULL::text"; readonly returns: "TABLE(booking_ref text, record_id uuid, submission_id uuid, slot_key text, slot_at timestamp with time zone, state text, message text)"; readonly security: "definer"; }, { readonly name: "booking_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_availability jsonb DEFAULT '{}'::jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text, p_home_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "booking_hold"; readonly args: "p_form_id uuid, p_slot_key text, p_origin text, p_bucket text, p_client_key text DEFAULT NULL::text"; readonly returns: "TABLE(hold_id uuid, slot_key text, expires_at timestamp with time zone, member_user_id uuid, state text, message text)"; readonly security: "definer"; }, { readonly name: "booking_manage"; readonly args: "p_booking_ref text, p_days integer DEFAULT NULL::integer"; readonly returns: "TABLE(booking_ref text, form_id uuid, title text, slot_key text, slot_at timestamp with time zone, status text, slots jsonb, availability jsonb, state text, message text)"; readonly security: "definer"; }, { readonly name: "booking_messages"; readonly args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid, p_event text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "booking_notify"; readonly args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid, p_event text, p_when text"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "booking_public"; readonly args: "p_form_id uuid, p_days integer DEFAULT NULL::integer"; readonly returns: "TABLE(form_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, honeypot_key text, availability jsonb, slots jsonb, state text, message text)"; readonly security: "definer"; }, { readonly name: "booking_reschedule"; readonly args: "p_booking_ref text, p_slot_key text, p_origin text, p_bucket text DEFAULT NULL::text"; readonly returns: "TABLE(booking_ref text, record_id uuid, slot_key text, slot_at timestamp with time zone, state text, message text)"; readonly security: "definer"; }, { readonly name: "booking_sms_consent"; readonly args: "p_booking_ref text, p_phone text, p_text_shown text, p_origin text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "bookings"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(form_id uuid, table_id uuid, title text, slug text, published_at timestamp with time zone, closed_at timestamp with time zone, slot_minutes integer, timezone text, slot_table_id uuid, booked bigint, cancelled bigint, upcoming bigint, held bigint, next_at timestamp with time zone, state text)"; readonly security: "definer"; }, { readonly name: "bump_epoch"; readonly args: "p_entity_type text, p_entity_id uuid, p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "bigint"; readonly security: "definer"; }, { readonly name: "button_press"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "cache_lookup"; readonly args: "p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid"; readonly returns: "permission_level"; readonly security: "definer"; }, { readonly name: "caller_role"; readonly args: ""; readonly returns: "name"; readonly security: "invoker"; }, { readonly name: "capture_open"; readonly args: "p_organization_id uuid, p_sheet_id uuid"; readonly returns: "TABLE(sheet_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, state text, may_capture boolean, message text)"; readonly security: "definer"; }, { readonly name: "capture_publish"; readonly args: "p_organization_id uuid, p_sheet_id uuid, p_open boolean DEFAULT true"; readonly returns: "timestamp with time zone"; readonly security: "definer"; }, { readonly name: "capture_sheet_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_sheet_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "capture_sheets"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(sheet_id uuid, table_id uuid, title text, slug text, state text, opened_at timestamp with time zone, captures bigint, replays bigint, last_capture_at timestamp with time zone, presentation jsonb)"; readonly security: "definer"; }, { readonly name: "capture_submit"; readonly args: "p_organization_id uuid, p_sheet_id uuid, p_client_key text, p_payload jsonb, p_files jsonb DEFAULT '[]'::jsonb, p_device text DEFAULT NULL::text, p_captured_at timestamp with time zone DEFAULT NULL::timestamp with time zone, p_location jsonb DEFAULT NULL::jsonb"; readonly returns: "TABLE(record_id uuid, state text, message text, replay boolean, file_ids uuid[])"; readonly security: "definer"; }, { readonly name: "carry_unchanged_value_stamps"; readonly args: "p_old jsonb, p_new jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "carrying_edges_in"; readonly args: "p_organization_id uuid"; readonly returns: "TABLE(container_type text, container_id uuid, item_type text, item_id uuid, conveys_max permission_level)"; readonly security: "definer"; }, { readonly name: "carrying_edges_of"; readonly args: "p_item_type text, p_item_id uuid"; readonly returns: "TABLE(container_type text, container_id uuid, conveys_max permission_level)"; readonly security: "definer"; }, { readonly name: "checklist_declare"; readonly args: "p_organization_id uuid, p_spec jsonb, p_template_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "checklist_refusal"; readonly args: "p_spec jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "checklist_run"; readonly args: "p_organization_id uuid, p_run_id uuid"; readonly returns: "TABLE(step_id uuid, step_order integer, ref text, title text, role text, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, finished boolean, requires text, requires_key text, requires_label text, requires_id uuid, evidence jsonb, blocked_by text[], may_complete boolean, refusal text)"; readonly security: "definer"; }, { readonly name: "checklist_runs"; readonly args: "p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_include_closed boolean DEFAULT true, p_limit integer DEFAULT 100"; readonly returns: "TABLE(run_id uuid, name text, template_id uuid, template text, about_record_id uuid, about text, about_table_id uuid, started_at timestamp with time zone, started_by uuid, origin text, step_count integer, done integer, overdue integer, next_step text, next_due timestamp with time zone, closed_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "checklist_start"; readonly args: "p_organization_id uuid, p_template_id uuid, p_about_record_id uuid DEFAULT NULL::uuid, p_roles jsonb DEFAULT '{}'::jsonb, p_starting_at timestamp with time zone DEFAULT NULL::timestamp with time zone"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "checklist_step_complete"; readonly args: "p_organization_id uuid, p_step_id uuid, p_evidence jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "checklist_step_refusal"; readonly args: "p_organization_id uuid, p_step_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "checklist_steps_table"; readonly args: "p_organization_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "checklist_template_shape"; readonly args: "p_organization_id uuid, p_template_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "checklist_templates"; readonly args: "p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100"; readonly returns: "TABLE(template_id uuid, name text, about_table_id uuid, about_table text, steps integer, roles integer, trigger_kind text, trigger_status text, open_runs integer, total_runs integer, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "checklist_templates_archived"; readonly args: "p_organization_id uuid, p_about_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100"; readonly returns: "TABLE(template_id uuid, name text, about_table_id uuid, about_table text, steps integer, archived_at timestamp with time zone, archived_by uuid, table_archived boolean)"; readonly security: "definer"; }, { readonly name: "choice_census"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "choice_field_map"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_filter_normalize"; readonly args: "p_map jsonb, p_filter jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_key_for"; readonly args: "p_organization_id uuid, p_options_table_id uuid, p_title text, p_exclude uuid DEFAULT NULL::uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "choice_key_of"; readonly args: "p_field jsonb, p_token text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "choice_nudge"; readonly args: "p_organization_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "choice_options"; readonly args: "p_organization_id uuid, p_options_table_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_render"; readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_render_groups"; readonly args: "p_map jsonb, p_groups jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_render_note"; readonly args: "p_field jsonb, p_value jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_render_plan"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_render_value"; readonly args: "p_field jsonb, p_value jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_render_with"; readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_plan jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "choice_slug"; readonly args: "p_word text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "choice_synonyms"; readonly args: "p_organization_id uuid, p_table_id uuid, p_token text"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "choice_synonyms_in"; readonly args: "p_map jsonb, p_token text"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "choice_value_keys"; readonly args: "p_field jsonb, p_value jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "choice_words"; readonly args: "p_field jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "choice_words_normalize"; readonly args: "p_field jsonb, p_const jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "client_write_grants"; readonly args: ""; readonly returns: "TABLE(role_name text, object_name text, privilege text)"; readonly security: "invoker"; }, { readonly name: "comment_counts"; readonly args: "p_organization_id uuid, p_record_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "comment_mention_deliver"; readonly args: "p_organization_id uuid, p_record_id uuid, p_table_id uuid, p_comment_id uuid, p_recipient uuid, p_author_name text, p_record_title text, p_body text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "comment_thread"; readonly args: "p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "comment_write"; readonly args: "p_organization_id uuid, p_record_id uuid, p_body text, p_anchor jsonb DEFAULT '{}'::jsonb, p_parent_comment_id uuid DEFAULT NULL::uuid, p_mentions uuid[] DEFAULT NULL::uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "computed_block"; readonly args: "p_block jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "computed_provenance"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "computed_refresh"; readonly args: "p_org uuid, p_table uuid, p_ids uuid[]"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "computed_refresh"; readonly args: "p_table_id uuid, p_max_rows integer DEFAULT 200"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "computed_refresh_drain"; readonly args: "p_ms integer DEFAULT 8000"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "computed_refresh_progress"; readonly args: "p_org uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "computed_sort_ceiling"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "computed_warm"; readonly args: "p_table_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "confidential_anchor"; readonly args: "p_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "confidential_answer"; readonly args: "p_user uuid, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "confidential_header"; readonly args: "p_user uuid, p_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "confidential_names"; readonly args: "p_organization_id uuid, p_value jsonb, p_user uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "containment_chain"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(ancestor_id uuid, depth integer)"; readonly security: "invoker"; }, { readonly name: "containment_depth_ceiling"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "containment_edges"; readonly args: "p_organization_id uuid"; readonly returns: "TABLE(parent_id uuid, child_id uuid, via text)"; readonly security: "invoker"; }, { readonly name: "containment_parent"; readonly args: "p_data jsonb"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "context_archived_types"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_class_for_checkout"; readonly args: "p_scope_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_compare_facts"; readonly args: "p_user_id uuid, p_record_ids uuid[], p_item_ids uuid[] DEFAULT NULL::uuid[], p_cells jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_item_archive"; readonly args: "p_item_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_item_restore"; readonly args: "p_item_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_item_row_of"; readonly args: "p_field custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "context_item_write"; readonly args: "p_item_id uuid, p_scope_type_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_items"; readonly args: "p_scope_type_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_policy_rank"; readonly args: "p_policy text"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "context_resolve"; readonly args: "p_bindings jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_scope_archive"; readonly args: "p_scope_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_scope_restore"; readonly args: "p_scope_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_scope_write"; readonly args: "p_organization_id uuid, p_scope_id uuid, p_type_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_scopes"; readonly args: "p_scope_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_system_items"; readonly args: ""; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_tags_set"; readonly args: "p_entity_type text, p_entity_id uuid, p_scope_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_template_define"; readonly args: "p_organization_id uuid, p_definition jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "context_templates"; readonly args: ""; readonly returns: "SETOF jsonb"; readonly security: "invoker"; }, { readonly name: "context_tree"; readonly args: "p_organization_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_tree_search"; readonly args: "p_organization_ids uuid[], p_query text, p_limit integer DEFAULT 100"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_tree_type_scopes"; readonly args: "p_scope_type_id uuid, p_offset integer DEFAULT 0, p_limit integer DEFAULT 200"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_tree_types"; readonly args: "p_organization_ids uuid[], p_with_counts boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_type_archive"; readonly args: "p_type_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_type_restore"; readonly args: "p_type_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_type_write"; readonly args: "p_organization_id uuid, p_type_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "context_value_write"; readonly args: "p_payload jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "context_values"; readonly args: "p_scope_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "conversation_scope"; readonly args: "p_organization_id uuid, p_conversation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "conversation_scope_bind"; readonly args: "p_organization_id uuid, p_conversation_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "conversation_scope_context"; readonly args: "p_organization_id uuid, p_conversation_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "conversation_scope_unbind"; readonly args: "p_organization_id uuid, p_conversation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "copy_table_extras"; readonly args: "p_organization_id uuid, p_pairs jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "count_records_archived"; readonly args: "p_organization_id uuid, p_table_ids uuid[], p_lane text DEFAULT 'org'::text"; readonly returns: "TABLE(table_id uuid, n integer)"; readonly security: "definer"; }, { readonly name: "cross_organization_links_open"; readonly args: "p_source_organization_id uuid, p_target_organization_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "custom_fields_on"; readonly args: "p_organization_id uuid, p_table_token text"; readonly returns: "TABLE(field_id uuid, field_key text, field_label text, field_type text, field_source text, field_required boolean, field_sort numeric, table_label text)"; readonly security: "definer"; }, { readonly name: "custom_fields_tables"; readonly args: ""; readonly returns: "TABLE(token text, schema_name text, table_name text)"; readonly security: "invoker"; }, { readonly name: "dashboard_block_normalize"; readonly args: "p_organization_id uuid, p_subject_table_id uuid, p_block jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "dashboard_class"; readonly args: ""; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "dashboard_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_name text, p_blocks jsonb DEFAULT '[]'::jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_dashboard_id uuid DEFAULT NULL::uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "dashboard_delete"; readonly args: "p_organization_id uuid, p_dashboard_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "dashboard_field_keys"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "text[]"; readonly security: "definer"; }, { readonly name: "dashboard_kinds"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "dashboard_moment_sql"; readonly args: "p_key text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "dashboard_restore"; readonly args: "p_organization_id uuid, p_dashboard_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "dashboard_run"; readonly args: "p_organization_id uuid, p_dashboard_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_compare jsonb DEFAULT NULL::jsonb, p_grain text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "dashboard_stuck"; readonly args: "p_organization_id uuid, p_table_id uuid, p_state_key text, p_days integer DEFAULT 14, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 50, p_required text DEFAULT 'viewer'::text"; readonly returns: "TABLE(record_id uuid, title text, state text, last_changed_at timestamp with time zone, days_unchanged numeric, measured_from text)"; readonly security: "definer"; }, { readonly name: "dashboard_target_field_assert"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "dashboard_window_sql"; readonly args: "p_key text, p_window jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "dashboards"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(dashboard_id uuid, table_id uuid, name text, blocks jsonb, presentation jsonb, block_count integer, version integer, created_at timestamp with time zone, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "data_home"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_platform_tables boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "data_home_changed_by"; readonly args: "p_asks jsonb"; readonly returns: "TABLE(organization_id uuid, id uuid, at timestamp with time zone, who text)"; readonly security: "definer"; }, { readonly name: "data_home_custom_fields"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(organization_id uuid, organization_name text, table_token text, table_label text, field_count integer, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "data_home_first"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_include_platform_tables boolean DEFAULT false, p_limit integer DEFAULT 100"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "data_home_items"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(kind text, organization_id uuid, organization_name text, item_id uuid, table_id uuid, table_name text, item_row jsonb)"; readonly security: "definer"; }, { readonly name: "data_home_slim"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_search text DEFAULT NULL::text, p_include_platform_tables boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "data_home_tables"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, platform_owned boolean, kind text, team boolean, system boolean, created_by uuid)"; readonly security: "definer"; }, { readonly name: "data_home_tables"; readonly args: "p_organization_id uuid, p_include_platform_tables boolean"; readonly returns: "TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone, mine boolean, shared_with_me boolean, platform_owned boolean, kind text, team boolean, system boolean, created_by uuid)"; readonly security: "invoker"; }, { readonly name: "day_zone"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "declared_conversation"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "decoration_colors"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "decoration_rule_ops"; readonly args: ""; readonly returns: "TABLE(op text, takes_value boolean, label text)"; readonly security: "invoker"; }, { readonly name: "delete_cascade_closure"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "uuid[]"; readonly security: "invoker"; }, { readonly name: "delete_preview"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "delete_rule"; readonly args: "p_organization_id uuid, p_record_id uuid, p_apply boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "dependency_cycle"; readonly args: "p_organization_id uuid, p_row custom.record"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "dependency_label"; readonly args: "p_organization_id uuid, p_node text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "derive_visibility"; readonly args: "p_container_type text, p_container_id uuid"; readonly returns: "TABLE(item_type text, item_id uuid, depth integer, max_level permission_level)"; readonly security: "definer"; }, { readonly name: "derived_value"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "derived_values"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "derived_values_of"; readonly args: "v_rec custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "display_format_ids"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "doc_content_hash"; readonly args: "p_body text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "doc_format_value"; readonly args: "p_field_data jsonb, p_value jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "doc_letterhead"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "doc_name_token_pattern"; readonly args: ""; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "doc_name_tokens"; readonly args: "p_body text"; readonly returns: "TABLE(ordinal integer, raw text)"; readonly security: "invoker"; }, { readonly name: "doc_render_body"; readonly args: "p_organization_id uuid, p_template_id uuid, p_record_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "doc_render_delete"; readonly args: "p_organization_id uuid, p_render_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "doc_render_document"; readonly args: "p_organization_id uuid, p_template_id uuid, p_record_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "doc_render_read"; readonly args: "p_organization_id uuid, p_render_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "doc_render_restore"; readonly args: "p_organization_id uuid, p_render_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "doc_render_write"; readonly args: "p_organization_id uuid, p_template_id uuid, p_record_id uuid, p_table_id uuid, p_template_version integer, p_body text, p_content_hash text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "doc_renders"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(render_id uuid, template_id uuid, record_id uuid, table_id uuid, template_version integer, body text, content_hash text, rendered_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "doc_sign"; readonly args: "p_organization_id uuid, p_render_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid DEFAULT NULL::uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "doc_signature_field_ok"; readonly args: "p_field_data jsonb"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "doc_signature_intact"; readonly args: "p_organization_id uuid, p_signature_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "doc_signature_read"; readonly args: "p_organization_id uuid, p_signature_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "doc_signature_write"; readonly args: "p_organization_id uuid, p_render_id uuid, p_record_id uuid, p_field_key text, p_signer_name text, p_signer_user_id uuid, p_document_hash text, p_document_version integer"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "doc_signatures"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(signature_id uuid, render_id uuid, record_id uuid, field_key text, signer_name text, signer_user_id uuid, signed_at timestamp with time zone, document_hash text, document_version integer)"; readonly security: "definer"; }, { readonly name: "doc_template_delete"; readonly args: "p_organization_id uuid, p_template_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "doc_template_read"; readonly args: "p_organization_id uuid, p_template_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "doc_template_restore"; readonly args: "p_organization_id uuid, p_template_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "doc_template_save"; readonly args: "p_organization_id uuid, p_table_id uuid, p_name text, p_body text, p_template_id uuid DEFAULT NULL::uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "doc_templates"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(template_id uuid, renders_table_id uuid, name text, body text, template_version integer, token_count bigint, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "doc_token_pattern"; readonly args: ""; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "doc_tokens"; readonly args: "p_body text"; readonly returns: "TABLE(ordinal integer, raw text, field_id uuid)"; readonly security: "invoker"; }, { readonly name: "doc_unresolved_tokens"; readonly args: "p_organization_id uuid, p_table_id uuid, p_body text"; readonly returns: "TABLE(raw text, field_id uuid, why text)"; readonly security: "invoker"; }, { readonly name: "door_reads_only"; readonly args: "p_door text"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "doors_not_deciding_the_caller"; readonly args: ""; readonly returns: "TABLE(function_name text, identity_args text)"; readonly security: "invoker"; }, { readonly name: "doors_not_deciding_the_record"; readonly args: ""; readonly returns: "TABLE(function_name text, identity_args text, why text)"; readonly security: "invoker"; }, { readonly name: "doors_not_masking_fields"; readonly args: ""; readonly returns: "TABLE(function_name text, identity_args text, why text)"; readonly security: "invoker"; }, { readonly name: "doors_not_on_one_ladder"; readonly args: ""; readonly returns: "TABLE(function_name text, identity_args text, why text)"; readonly security: "invoker"; }, { readonly name: "doors_refusing_in_another_doors_name"; readonly args: ""; readonly returns: "TABLE(function_name text, identity_args text, why text)"; readonly security: "invoker"; }, { readonly name: "drill_resolve"; readonly args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb, p_measures jsonb, p_bucket jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "effective_level"; readonly args: "p_user_id uuid, p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text"; readonly returns: "permission_level"; readonly security: "definer"; }, { readonly name: "effective_level_many"; readonly args: "p_user_id uuid, p_ids uuid[], p_type text DEFAULT 'record'::text"; readonly returns: "TABLE(id uuid, level permission_level)"; readonly security: "definer"; }, { readonly name: "enrich_cells"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_keys text[] DEFAULT NULL::text[], p_record_ids uuid[] DEFAULT NULL::uuid[]"; readonly returns: "TABLE(record_id uuid, field_key text, agent_owned boolean, value jsonb, value_version integer, actor text, on_behalf_of text, written_at timestamp with time zone, source jsonb, absent_reason text, alternates jsonb, pinned boolean, stale boolean, due_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "enrich_data_source"; readonly args: "p_ds jsonb, p_inputs jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "enrich_declare"; readonly args: "p_organization_id uuid, p_field_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "enrich_due"; readonly args: "p_organization_id uuid, p_field_id uuid, p_limit integer DEFAULT 50, p_include_fresh boolean DEFAULT false, p_record_ids uuid[] DEFAULT NULL::uuid[]"; readonly returns: "TABLE(record_id uuid, title text, inputs jsonb, current_value jsonb, written_at timestamp with time zone, reason text, trimmed_to integer)"; readonly security: "definer"; }, { readonly name: "enrich_land"; readonly args: "p_organization_id uuid, p_field_id uuid, p_results jsonb, p_run jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "enrich_normalize"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "enrich_pin"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_pinned boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "enrich_refill_due_tick"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "enrich_run_class"; readonly args: ""; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "enrich_runs"; readonly args: "p_organization_id uuid, p_field_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50"; readonly returns: "TABLE(run_id uuid, field_id uuid, field_key text, model text, trigger_word text, rows_seen integer, rows_written integer, rows_absent integer, rows_below_floor integer, rows_pinned integer, rows_refused integer, cost_cents numeric, cost_per_row_cents numeric, ran_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "enrich_sensitivity_rank"; readonly args: "p_word text"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "enrich_triggers"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "enrichments"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(field_id uuid, table_id uuid, field_key text, label text, enrichment jsonb, enabled boolean, review_interval_days integer, rows_total integer, rows_filled integer, rows_stale integer, rows_pinned integer, rows_absent integer, runs integer, cost_cents numeric, cost_per_row_cents numeric, last_run_at timestamp with time zone, last_run jsonb)"; readonly security: "definer"; }, { readonly name: "entity_back_links"; readonly args: "p_organization_id uuid, p_token text, p_record_id uuid, p_limit integer DEFAULT 50, p_cursor text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_custom_value_apply"; readonly args: "p_organization_id uuid, p_token text, p_record_id uuid, p_clear text[], p_patch jsonb, p_expected_version integer DEFAULT NULL::integer"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "entity_custom_values_lock"; readonly args: "p_token text"; readonly returns: "TABLE(locked boolean, reason text)"; readonly security: "definer"; }, { readonly name: "entity_field_declare"; readonly args: "p_organization_id uuid, p_token text, p_spec jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "entity_field_protect_arman_explicitly_approved"; readonly args: "p_field_id uuid, p_readers jsonb, p_arman_words text, p_approved_on date"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_field_retire"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "entity_field_rights"; readonly args: "p_organization_id uuid, p_token text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_field_update"; readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "entity_fields"; readonly args: "p_organization_id uuid, p_token text, p_include_retired boolean DEFAULT false"; readonly returns: "SETOF custom.record"; readonly security: "definer"; }, { readonly name: "entity_fields_across"; readonly args: "p_token text, p_organization_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_read_mask"; readonly args: "p_organization_id uuid, p_token text, p_level permission_level, p_action text DEFAULT 'read'::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_record_home"; readonly args: "p_token text, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_record_read"; readonly args: "p_organization_id uuid, p_token text, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_records_find"; readonly args: "p_organization_id uuid, p_token text, p_key text, p_value jsonb DEFAULT NULL::jsonb, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_reference_fields"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_reference_kinds"; readonly args: ""; readonly returns: "TABLE(token text, label text, category text)"; readonly security: "definer"; }, { readonly name: "entity_reference_render"; readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_reference_render_with"; readonly args: "p_organization_id uuid, p_table_id uuid, p_doc jsonb, p_fields jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_reference_rows"; readonly args: "p_organization_id uuid, p_token text, p_ids uuid[]"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_reference_search"; readonly args: "p_organization_id uuid, p_tokens text[], p_search text DEFAULT NULL::text, p_limit integer DEFAULT 20"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_reference_target"; readonly args: "p_token text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_reference_words"; readonly args: "p_organization_id uuid, p_refs jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "entity_row_propose"; readonly args: "p_organization_id uuid, p_token text, p_record_id uuid, p_columns jsonb DEFAULT '{}'::jsonb, p_custom jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer, p_archive boolean DEFAULT NULL::boolean, p_note text DEFAULT NULL::text, p_conversation_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_row_write"; readonly args: "p_organization_id uuid, p_token text, p_record_id uuid, p_columns jsonb DEFAULT '{}'::jsonb, p_custom jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer, p_archive boolean DEFAULT NULL::boolean"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "entity_seat_level"; readonly args: "p_organization_id uuid, p_token text, p_record_id uuid"; readonly returns: "permission_level"; readonly security: "invoker"; }, { readonly name: "entity_table"; readonly args: "p_token text"; readonly returns: "TABLE(token text, schema_name text, table_name text, type text, title_column text, label text, has_organization boolean, has_deleted_at boolean)"; readonly security: "definer"; }, { readonly name: "entity_value_write"; readonly args: "p_organization_id uuid, p_token text, p_record_id uuid, p_patch jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "export_ceiling"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "export_records"; readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000"; readonly returns: "TABLE(id uuid, document jsonb)"; readonly security: "invoker"; }, { readonly name: "external_foreign_table_findings"; readonly args: ""; readonly returns: "SETOF text"; readonly security: "definer"; }, { readonly name: "external_history_event"; readonly args: "p_organization_id uuid, p_link_id uuid, p_operation text"; readonly returns: "bigint"; readonly security: "definer"; }, { readonly name: "external_rows"; readonly args: "p_organization_id uuid, p_source_id uuid"; readonly returns: "SETOF jsonb"; readonly security: "definer"; }, { readonly name: "external_source_declare"; readonly args: "p_organization_id uuid, p_tier text, p_connection_token text, p_external_schema text, p_external_table text, p_link_template text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "external_stub_upsert"; readonly args: "p_organization_id uuid, p_source_id uuid, p_table_id uuid, p_external_key text, p_link_url text, p_cached_title text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "external_tier_contract"; readonly args: ""; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "external_write_through"; readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "external_writes_set"; readonly args: "p_organization_id uuid, p_source_id uuid, p_enabled boolean"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "far_value"; readonly args: "p_organization_id uuid, p_record_id uuid, p_key text, p_reader jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "field_access"; readonly args: "p_user uuid, p_field_id uuid, p_token text, p_row_id uuid, p_action text, p_audit boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_access_set"; readonly args: "p_field_id uuid, p_part text, p_word text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_access_setup"; readonly args: "p_field_id uuid, p_proposed jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_add_rung"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "permission_level"; readonly security: "invoker"; }, { readonly name: "field_behaviour"; readonly args: "p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "field_choice_usage"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_context_policy_floor"; readonly args: "p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(context_policy text, reads jsonb)"; readonly security: "definer"; }, { readonly name: "field_cycle"; readonly args: "p_organization_id uuid, p_field_data jsonb, p_self uuid"; readonly returns: "text[]"; readonly security: "definer"; }, { readonly name: "field_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "field_declare_many"; readonly args: "p_organization_id uuid, p_table_id uuid, p_specs jsonb"; readonly returns: "uuid[]"; readonly security: "invoker"; }, { readonly name: "field_dependants"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "TABLE(kind text, dependant_id uuid, label text, how text)"; readonly security: "definer"; }, { readonly name: "field_duplicate"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_history"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0, p_record_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(record_id uuid, record_title text, version integer, occurred_at timestamp with time zone, operation_label text, actor jsonb, before jsonb, after jsonb)"; readonly security: "definer"; }, { readonly name: "field_input_closure"; readonly args: "p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(input_id uuid, input_key text, input_label text, input_table uuid, sensitivity text, retired boolean, depth integer)"; readonly security: "definer"; }, { readonly name: "field_input_closure_many"; readonly args: "p_organization_id uuid, p_ids uuid[]"; readonly returns: "TABLE(root_id uuid, input_id uuid, retired boolean, depth integer)"; readonly security: "definer"; }, { readonly name: "field_inputs_of"; readonly args: "p_organization_id uuid, p_field_data jsonb"; readonly returns: "TABLE(input_id uuid, input_key text, input_label text, input_table uuid, sensitivity text, retired boolean, how text)"; readonly security: "definer"; }, { readonly name: "field_is_protected"; readonly args: "p_data jsonb"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "field_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "field_kind_of"; readonly args: "p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "field_kinds"; readonly args: ""; readonly returns: "TABLE(kind text, behavior text, parity boolean, made_of text)"; readonly security: "invoker"; }, { readonly name: "field_make_automatic"; readonly args: "p_organization_id uuid, p_field_id uuid, p_kind text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_notify_on_assign"; readonly args: "p_organization_id uuid, p_field_id uuid, p_on boolean"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_options"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "SETOF custom.record"; readonly security: "definer"; }, { readonly name: "field_protection_refusal"; readonly args: "p_op text, p_old jsonb, p_new jsonb, p_field_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "field_restore"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "field_retire"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "field_retype_preview"; readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_rules"; readonly args: "p_field_data jsonb"; readonly returns: "TABLE(kind text, spec jsonb)"; readonly security: "invoker"; }, { readonly name: "field_sensitivity_floor"; readonly args: "p_organization_id uuid, p_field_data jsonb, p_self uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(sensitivity text, reads jsonb)"; readonly security: "definer"; }, { readonly name: "field_source_archived"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_update"; readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "field_update_rehoming_choices"; readonly args: "p_organization_id uuid, p_field_id uuid, p_patch jsonb, p_rehome jsonb DEFAULT NULL::jsonb, p_cells_back jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "field_value_convert"; readonly args: "p_to jsonb, p_value jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "field_value_kind"; readonly args: "p_organization_id uuid, p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "field_words"; readonly args: "p_organization_id uuid, p_field_id uuid, p_value jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "file_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "filter_is_rule"; readonly args: "p_filter jsonb"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "filter_list_op"; readonly args: "p_op text, p_a jsonb, p_b jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "filter_list_op_words"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "find_duplicates"; readonly args: "p_organization_id uuid, p_table_id uuid, p_fields text[], p_limit integer DEFAULT 50"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_archive"; readonly args: "p_organization_id uuid, p_form_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_title text, p_questions jsonb, p_presentation jsonb DEFAULT '{}'::jsonb, p_submission_cap integer DEFAULT NULL::integer, p_quarantine_rule_id uuid DEFAULT NULL::uuid, p_notify_rule_id uuid DEFAULT NULL::uuid, p_form_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "form_draft_read"; readonly args: "p_form_id uuid, p_secret text"; readonly returns: "TABLE(answers jsonb, saved_at timestamp with time zone, expires_at timestamp with time zone, state text, message text)"; readonly security: "definer"; }, { readonly name: "form_draft_save"; readonly args: "p_form_id uuid, p_answers jsonb, p_secret text DEFAULT NULL::text, p_bucket text DEFAULT NULL::text, p_origin text DEFAULT NULL::text"; readonly returns: "TABLE(draft_secret text, saved_at timestamp with time zone, expires_at timestamp with time zone, state text, message text)"; readonly security: "definer"; }, { readonly name: "form_knobs"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_look_options"; readonly args: "p_organization_id uuid, p_presentation jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_notify"; readonly args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "form_preview_asks"; readonly args: "p_organization_id uuid, p_table_id uuid, p_questions jsonb, p_values jsonb"; readonly returns: "TABLE(field_key text, asked boolean, decided boolean, said text)"; readonly security: "definer"; }, { readonly name: "form_preview_route"; readonly args: "p_organization_id uuid, p_table_id uuid, p_questions jsonb, p_endings jsonb, p_values jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_public"; readonly args: "p_form_id uuid"; readonly returns: "TABLE(form_id uuid, organization_id uuid, table_id uuid, title text, presentation jsonb, fields jsonb, honeypot_key text, state text, message text)"; readonly security: "definer"; }, { readonly name: "form_public_asks"; readonly args: "p_form_id uuid, p_values jsonb, p_secret text DEFAULT NULL::text, p_origin text DEFAULT NULL::text"; readonly returns: "TABLE(field_key text, asked boolean, decided boolean, said text)"; readonly security: "definer"; }, { readonly name: "form_public_options"; readonly args: "p_form_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_public_route"; readonly args: "p_form_id uuid, p_values jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_redirect_domains"; readonly args: "p_organization_id uuid"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "form_redirect_refusal"; readonly args: "p_organization_id uuid, p_url text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "form_respondent_copy"; readonly args: "p_organization_id uuid, p_form_id uuid, p_record_id uuid, p_submission_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_response_read"; readonly args: "p_form_id uuid, p_edit text, p_unlock text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_response_update"; readonly args: "p_form_id uuid, p_edit text, p_origin text, p_payload jsonb, p_bucket text"; readonly returns: "TABLE(submission_id uuid, record_id uuid, state text, message text)"; readonly security: "definer"; }, { readonly name: "form_restore"; readonly args: "p_organization_id uuid, p_form_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_results"; readonly args: "p_organization_id uuid, p_form_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_set_password"; readonly args: "p_organization_id uuid, p_form_id uuid, p_password text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_slug"; readonly args: "p_organization_id uuid, p_title text, p_form_id uuid DEFAULT NULL::uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "form_submit"; readonly args: "p_form_id uuid, p_origin text, p_payload jsonb, p_bucket text, p_honeypot text DEFAULT NULL::text, p_client_key text DEFAULT NULL::text"; readonly returns: "TABLE(submission_id uuid, record_id uuid, state text, message text)"; readonly security: "definer"; }, { readonly name: "form_theme_options"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "form_unlock"; readonly args: "p_form_id uuid, p_password text DEFAULT NULL::text, p_unlock text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "form_visit"; readonly args: "p_form_id uuid, p_visit text, p_event text, p_field text DEFAULT NULL::text"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "form_visit_admit"; readonly args: "p_form_id uuid, p_bucket text"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "forms"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(form_id uuid, table_id uuid, title text, slug text, published_at timestamp with time zone, closed_at timestamp with time zone, submission_cap integer, responses bigint, in_table bigint, held bigint, rejected bigint, state text, quarantine_rule_id uuid, notify_rule_id uuid, presentation jsonb)"; readonly security: "definer"; }, { readonly name: "forms_archived"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100"; readonly returns: "TABLE(form_id uuid, table_id uuid, table_name text, kind text, title text, slug text, archived_at timestamp with time zone, archived_by uuid, table_archived boolean, can_restore boolean)"; readonly security: "definer"; }, { readonly name: "forms_archived_everywhere"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "formula_compile_sql"; readonly args: "p_organization_id uuid, p_expr jsonb, p_values_sql text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "formula_eval"; readonly args: "p_organization_id uuid, p_expr jsonb, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "formula_field_keys"; readonly args: "p_organization_id uuid, p_expr jsonb"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "formula_history"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_limit integer DEFAULT 100"; readonly returns: "TABLE(occurred_at timestamp with time zone, cause text, record_version integer, formula_version integer, formula_text text, value jsonb, refused text, actor jsonb)"; readonly security: "definer"; }, { readonly name: "formula_node_kinds"; readonly args: ""; readonly returns: "TABLE(node text, min_args integer, max_args integer, result text, signature text, says text)"; readonly security: "invoker"; }, { readonly name: "formula_parse"; readonly args: "p_organization_id uuid, p_table_id uuid, p_text text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "formula_preview"; readonly args: "p_organization_id uuid, p_table_id uuid, p_record_id uuid, p_text text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "formula_result_kind"; readonly args: "p_organization_id uuid, p_expr jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "formula_translate_notion"; readonly args: "p_text text, p_types jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "formula_value"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb, p_values jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "freshness_verdict"; readonly args: "p_written_at timestamp with time zone, p_ceiling_seconds numeric"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "grid_layout"; readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "grid_layout_check"; readonly args: "p_layout jsonb, p_scope text DEFAULT 'view'::text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "guard_refusals_are_complete"; readonly args: ""; readonly returns: "TABLE(guard text, said text)"; readonly security: "invoker"; }, { readonly name: "has_visibility"; readonly args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "has_visibility_at"; readonly 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"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "hidden_field_notice"; readonly args: "p_field custom.record, p_action text DEFAULT 'read'::text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "history_actor"; readonly args: "p_tier text, p_document jsonb, p_actor_id uuid, p_people jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "history_changes"; readonly args: "p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "history_people"; readonly args: "p_organization_id uuid, p_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "history_prune"; readonly args: "p_organization_id uuid, p_scope text DEFAULT 'values'::text, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "history_restore_body"; readonly args: "p_current jsonb, p_target jsonb, p_field_key text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "history_restore_body"; readonly args: "p_current jsonb, p_target jsonb, p_field_key text, p_author jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "history_retention"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "history_retention_floor_raise"; readonly args: "p_organization_id uuid, p_days integer"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "history_retention_set"; readonly args: "p_organization_id uuid, p_table_id uuid, p_days integer"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "home_add"; readonly args: "p_organization_id uuid, p_table_id uuid, p_home_record_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "home_relations"; readonly args: ""; readonly returns: "TABLE(table_id uuid, home_record_id uuid, organization_id uuid, relation_id uuid)"; readonly security: "invoker"; }, { readonly name: "hot_doors_6_on"; readonly args: "p_person uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "hot_doors_7_on"; readonly args: "p_person uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "hub_changed_by"; readonly args: "p_organization_id uuid, p_kind text, p_ids uuid[]"; readonly returns: "TABLE(id uuid, at timestamp with time zone, who text)"; readonly security: "definer"; }, { readonly name: "hub_changed_by_many"; readonly args: "p_asks jsonb, p_door text DEFAULT NULL::text"; readonly returns: "TABLE(organization_id uuid, id uuid, at timestamp with time zone, who text)"; readonly security: "definer"; }, { readonly name: "hub_row_asked_alone"; readonly args: "p_org uuid, p_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "inbound_addresses"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "inbound_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_label text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "inbound_domain"; readonly args: "p_organization_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "inbound_mail_land"; readonly args: "p_address text, p_mail jsonb, p_secret text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "inbound_mail_map"; readonly args: "p_organization_id uuid, p_table_id uuid, p_mail jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "inbound_set"; readonly args: "p_organization_id uuid, p_inbound_id uuid, p_enabled boolean"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "inbox_clear"; readonly args: "p_organization_id uuid, p_item_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "inbox_counts"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(organization_id uuid, organization_name text, waiting integer, snoozed integer, cleared integer, overdue integer, oldest_waiting_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "inbox_remind_tick"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "inbox_snooze"; readonly args: "p_organization_id uuid, p_item_id uuid, p_until timestamp with time zone"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "inbox_unclear"; readonly args: "p_organization_id uuid, p_item_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "inbox_unsnooze"; readonly args: "p_organization_id uuid, p_item_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "index_payload"; readonly args: "p_organization_id uuid, p_table_id uuid, p_limit integer DEFAULT 1000"; readonly returns: "TABLE(id uuid, searchable text)"; readonly security: "invoker"; }, { readonly name: "interface_chart"; readonly args: "p_interface_id uuid, p_chart_id text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "interface_chart_formula_ok"; readonly args: "p_org uuid, p_table uuid, p_key text, p_allowed text[], p_depth integer"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "interface_read"; readonly args: "p_interface_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "interface_rows"; readonly args: "p_interface_id uuid, p_element_id text, p_record_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "intern_provenance"; readonly args: "p_data jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "io_cell"; readonly args: "p_organization_id uuid, p_field jsonb, p_word text, p_date_order text DEFAULT 'mdy'::text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "io_change_actor"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "io_change_fields"; readonly args: "p_keys text[], p_old jsonb, p_new jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "io_change_via"; readonly args: ""; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "io_changed_field_ids"; readonly args: "p_organization_id uuid, p_table_id uuid, p_old jsonb, p_new jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "io_changed_keys"; readonly args: "p_old jsonb, p_new jsonb"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "io_comment_resolve"; readonly args: "p_organization_id uuid, p_comment_id uuid, p_resolved boolean DEFAULT true"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "io_comment_write"; readonly args: "p_organization_id uuid, p_record_id uuid, p_body text, p_anchor jsonb DEFAULT '{}'::jsonb, p_parent_comment_id uuid DEFAULT NULL::uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "io_comments"; readonly args: "p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false"; readonly returns: "TABLE(id uuid, body text, anchor jsonb, parent_comment_id uuid, created_by uuid, created_at timestamp with time zone, resolved_at timestamp with time zone, resolved_by uuid)"; readonly security: "definer"; }, { readonly name: "io_csv_escape"; readonly args: "p_value text, p_delimiter text DEFAULT ','::text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "io_csv_parse"; readonly args: "p_text text, p_delimiter text DEFAULT NULL::text"; readonly returns: "TABLE(row_number integer, cells text[])"; readonly security: "invoker"; }, { readonly name: "io_export"; readonly 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"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_export_csv"; readonly 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"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "io_import_begin"; readonly 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, p_file_hash text DEFAULT NULL::text, p_policy jsonb DEFAULT '{}'::jsonb, p_dedupe_key text DEFAULT NULL::text, p_file_bytes bigint DEFAULT NULL::bigint, p_force boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_import_declare_columns"; readonly args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_import_finish"; readonly args: "p_organization_id uuid, p_import_id uuid, p_unmapped text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_import_forget"; readonly args: "p_organization_id uuid, p_import_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "io_import_open"; readonly 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"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "io_import_plan"; readonly args: "p_organization_id uuid, p_table_id uuid, p_columns jsonb DEFAULT '[]'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_import_report"; readonly args: "p_organization_id uuid, p_import_id uuid, p_state text DEFAULT NULL::text, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_import_rows"; readonly args: "p_organization_id uuid, p_import_id uuid, p_rows jsonb, p_mapping jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_imports"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 25"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_infer_column"; readonly args: "p_organization_id uuid, p_table_id uuid, p_header text, p_samples jsonb DEFAULT '[]'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "io_infer_type"; readonly args: "p_samples jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "io_money_unit"; readonly args: "p_word text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "io_outbox_announce"; readonly args: ""; readonly returns: "trigger"; readonly security: "definer"; }, { readonly name: "io_outbox_backlog"; readonly args: "p_consumer text, p_event_key text, p_older_than interval DEFAULT '00:00:00'::interval"; readonly returns: "TABLE(organization_id uuid, waiting bigint, oldest timestamp with time zone, last_carried timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "io_outbox_broadcast_stmt"; readonly args: ""; readonly returns: "trigger"; readonly security: "definer"; }, { readonly name: "io_outbox_consumed_by"; readonly args: "p_event_id uuid, p_consumer text, p_consumed_at timestamp with time zone"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "io_outbox_drain"; readonly args: "p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100, p_event_key text DEFAULT 'records.changed'::text"; readonly returns: "TABLE(outbox_id uuid, record_id uuid, table_id uuid, operation text, changed_field_ids jsonb, actor jsonb, occurred_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "io_outbox_last_consumed"; readonly args: "p_consumer text, p_event_key text, p_organization_id uuid"; readonly returns: "timestamp with time zone"; readonly security: "invoker"; }, { readonly name: "io_outbox_pending_organizations"; readonly args: "p_consumer text, p_event_key text"; readonly returns: "SETOF uuid"; readonly security: "definer"; }, { readonly name: "io_outbox_per_consumer"; readonly args: ""; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "io_outbox_rearm"; readonly args: "p_organization_id uuid, p_dedupe_key text"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "io_outbox_release"; readonly args: "p_organization_id uuid, p_consumer text, p_older_than interval DEFAULT '00:15:00'::interval"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "io_outbox_release_claimed"; readonly args: "p_organization_id uuid, p_consumer text, p_ids uuid[]"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "io_outbox_subscribe"; readonly args: "p_consumer text, p_event_key text"; readonly returns: "timestamp with time zone"; readonly security: "definer"; }, { readonly name: "io_proposal_accept"; readonly args: "p_organization_id uuid, p_import_id uuid, p_column text, p_type text DEFAULT NULL::text, p_label text DEFAULT NULL::text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "io_proposal_reject"; readonly args: "p_organization_id uuid, p_import_id uuid, p_column text"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "io_proposal_spec"; readonly args: "p_proposal jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "io_record_changed"; readonly args: ""; readonly returns: "trigger"; readonly security: "definer"; }, { readonly name: "io_record_changed_stmt_delete"; readonly args: ""; readonly returns: "trigger"; readonly security: "definer"; }, { readonly name: "io_record_changed_stmt_insert"; readonly args: ""; readonly returns: "trigger"; readonly security: "definer"; }, { readonly name: "io_record_changed_stmt_update"; readonly args: ""; readonly returns: "trigger"; readonly security: "definer"; }, { readonly name: "io_relation_candidate"; readonly args: "p_organization_id uuid, p_table_id uuid, p_words text[]"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "io_restore"; readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "io_restore"; readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "io_revisions"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(version integer, changed_at timestamp with time zone, changed_by uuid, summary text, operation text, changed_fields jsonb)"; readonly security: "definer"; }, { readonly name: "io_sample_words"; readonly args: "p_samples jsonb"; readonly returns: "TABLE(word text)"; readonly security: "invoker"; }, { readonly name: "io_value_shape"; readonly args: "p_envelope jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "io_workflow_chain"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "is_a_retirement"; readonly 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"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "kernel_viewer_sets"; readonly args: "p_user uuid, p_orgs uuid[]"; readonly returns: "TABLE(organization_id uuid, fallback boolean, all_visible boolean, granted_all uuid[], carried_visible uuid[])"; readonly security: "definer"; }, { readonly name: "ladder_replanners"; readonly args: "p_roots text[] DEFAULT ARRAY['custom.has_visibility'::text, 'custom.effective_level'::text, 'custom.reaches_directly'::text, 'custom.visible_set'::text]"; readonly returns: "TABLE(fn text, lang text, why text, remedy text)"; readonly security: "definer"; }, { readonly name: "level_floor"; readonly args: ""; readonly returns: "permission_level"; readonly security: "definer"; }, { readonly name: "levels_of"; readonly args: "p_user_id uuid, p_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "levels_raised_by_a_less_specific_rung"; readonly args: ""; readonly returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, member_email text, record_id uuid, addressed_level permission_level, answered_level permission_level)"; readonly security: "definer"; }, { readonly name: "list_door_disagreements"; readonly args: "p_pretend text DEFAULT NULL::text, p_only_organization uuid DEFAULT NULL::uuid, p_sample integer DEFAULT 200"; readonly returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)"; readonly security: "invoker"; }, { readonly name: "list_door_disagreements"; readonly args: "p_pretend text, p_only_organization uuid, p_sample integer, p_exhaustive boolean"; readonly returns: "TABLE(organization_id uuid, organization_name text, member_id uuid, table_id uuid, record_id uuid, door text, why text)"; readonly security: "invoker"; }, { readonly name: "list_portals"; readonly args: "p_organization_id uuid, p_archived text DEFAULT 'active'::text"; readonly returns: "TABLE(portal_id uuid, title text, slug text, client_table_id uuid, client_table text, is_active boolean, tables integer, invited integer, signed_in integer, sign_in_method text, opened_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "list_portals_everywhere"; readonly args: "p_archived text DEFAULT 'active'::text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "listed_predicate_sql"; readonly 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"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "lookup_value"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "mask_document"; readonly args: "p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "mask_document"; readonly 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[]"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "mask_history_data"; readonly args: "p_data jsonb, p_mask jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "mask_says_withheld"; readonly args: "p_mask jsonb, p_key text"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "may_invite_outside"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "may_see_table_structure"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "member_personal_tables"; readonly args: "p_organization_id uuid, p_person uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "member_records_take_over"; readonly args: "p_organization_id uuid, p_from uuid, p_to uuid, p_reason text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "merge_field_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "migrate_choice_keys"; readonly args: "p_organization_id uuid, p_table_id uuid, p_dry_run boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_delete"; readonly args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_demote"; readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_extract_parent"; readonly args: "p_organization_id uuid, p_id uuid, p_parent_table_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_merge"; readonly args: "p_organization_id uuid, p_winner_id uuid, p_loser_id uuid, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_promote"; readonly args: "p_organization_id uuid, p_table_id uuid, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_purge"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_purge_hard"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_compliance_reason text DEFAULT NULL::text, p_chunk integer DEFAULT 200, p_dry_run boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_purge_hard_request"; readonly args: "p_organization_id uuid, p_table_id uuid, p_compliance_reason text"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "migrate_reclass"; readonly args: "p_organization_id uuid, p_id uuid, p_to text DEFAULT 'field'::text, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_rename"; readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_reparent"; readonly args: "p_organization_id uuid, p_id uuid, p_parent_id uuid, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_retype"; readonly args: "p_organization_id uuid, p_id uuid, p_to text, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_split"; readonly args: "p_organization_id uuid, p_record_id uuid, p_moved_keys text[], p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrate_undo"; readonly args: "p_organization_id uuid, p_log_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "migrations"; readonly args: "p_organization_id uuid, p_target_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 100"; readonly 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)"; readonly security: "definer"; }, { readonly name: "mirror_asks_the_whole_database"; readonly args: ""; readonly returns: "TABLE(schema_name text, table_name text, policy_name text, why text)"; readonly security: "invoker"; }, { readonly name: "my_level"; readonly args: "p_organization_id uuid, p_id uuid, p_type text DEFAULT 'record'::text"; readonly returns: "permission_level"; readonly security: "definer"; }, { readonly name: "my_levels"; readonly args: "p_organization_id uuid, p_ids jsonb, p_type text DEFAULT 'record'::text"; readonly returns: "TABLE(id uuid, level permission_level)"; readonly security: "definer"; }, { readonly name: "my_levels_across"; readonly args: "p_asks jsonb"; readonly returns: "TABLE(organization_id uuid, id uuid, level permission_level, refused text)"; readonly security: "definer"; }, { readonly name: "opening_view_shape"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "organization_clear"; readonly args: "p_organization_id uuid, p_confirm text, p_and_destroy boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "organization_contents"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "organization_has_a_public_table"; readonly args: "p_organization_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "organization_home_id"; readonly args: "p_organization_id uuid"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "organization_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "organization_pick_lists"; readonly args: "p_organization_id uuid"; readonly returns: "TABLE(id uuid, list_name text, description text, updated_at timestamp with time zone, lives_in text)"; readonly security: "definer"; }, { readonly name: "organization_references"; readonly args: "p_kind text, p_organization_id uuid, p_row jsonb"; readonly returns: "TABLE(site text, what text, ref_id uuid, openable boolean)"; readonly security: "invoker"; }, { readonly name: "owning_table"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "owning_table_gone"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "page_ceiling"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "page_contract"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "page_size"; readonly args: "p_organization_id uuid, p_door text, p_limit integer, p_default integer DEFAULT NULL::integer, p_ceiling integer DEFAULT NULL::integer"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "parity_field_types"; readonly args: ""; readonly returns: "TABLE(parity_type text, behavior text, made_of text)"; readonly security: "invoker"; }, { readonly name: "parity_type"; readonly args: "p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "parity_values"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly 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)"; readonly security: "invoker"; }, { readonly name: "per_value_access_words"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "person_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "phone_canonical"; readonly args: "p_text text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "phone_display"; readonly args: "p_text text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "phone_pattern"; readonly args: ""; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "pick_list_create"; readonly args: "p_organization_id uuid, p_list_name text, p_description text DEFAULT NULL::text, p_items jsonb DEFAULT '[]'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pick_list_for_selection"; readonly args: "p_list_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pick_list_get"; readonly args: "p_list_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pick_list_index"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pick_list_index_everywhere"; readonly args: ""; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pick_list_update"; readonly args: "p_list_id uuid, p_list_name text DEFAULT NULL::text, p_description text DEFAULT NULL::text, p_items jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pin_agent_cells"; readonly args: "p_new jsonb, p_old jsonb, p_agent_keys text[]"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "pipeline_board"; readonly args: "p_organization_id uuid, p_table_id uuid, p_measure text DEFAULT NULL::text"; readonly returns: "TABLE(stage_key text, stage_label text, stage_position integer, cards bigint, total numeric, wip_limit integer, over_limit boolean)"; readonly security: "definer"; }, { readonly name: "pipeline_board"; readonly args: "p_organization_id uuid, p_table_id uuid, p_measure text, p_filter jsonb"; readonly returns: "TABLE(stage_key text, stage_label text, stage_position integer, cards bigint, total numeric, wip_limit integer, over_limit boolean)"; readonly security: "definer"; }, { readonly name: "pipeline_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pipeline_gate_preview"; readonly args: "p_organization_id uuid, p_table_id uuid, p_stage text, p_gate jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pipeline_move"; readonly args: "p_organization_id uuid, p_record_id uuid, p_to text, p_also jsonb DEFAULT '{}'::jsonb, p_expected_version integer DEFAULT NULL::integer"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pipeline_move_many"; readonly args: "p_organization_id uuid, p_moves jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pipeline_pending"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pipeline_read"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pipeline_transition_refusal"; readonly args: "p_organization_id uuid, p_record_id uuid, p_to text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "pipelines"; readonly args: "p_organization_id uuid"; readonly returns: "TABLE(table_id uuid, table_name text, stage_field text, stage_label text, stages integer, rules integer, broken text, updated_at timestamp with time zone, updated_by uuid)"; readonly security: "definer"; }, { readonly name: "plural_of"; readonly args: "p_word text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "portal_accents"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "portal_admits"; readonly args: "p_organization_id uuid, p_user_id uuid DEFAULT NULL::uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "portal_archive"; readonly args: "p_organization_id uuid, p_portal_id uuid, p_confirm_title text, p_reason text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_card"; readonly args: "p_organization_id uuid, p_portal_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_declare"; readonly args: "p_organization_id uuid, p_title text, p_client_table_id uuid, p_tables jsonb, p_portal_id uuid DEFAULT NULL::uuid, p_slug text DEFAULT NULL::text, p_sign_in_method text DEFAULT 'magic_link'::text, p_config jsonb DEFAULT NULL::jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "portal_field_map"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(field_id uuid, field_key text, field_type text, points_at uuid)"; readonly security: "definer"; }, { readonly name: "portal_form"; readonly args: "p_organization_id uuid, p_portal_id uuid, p_form_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_form_submit"; readonly args: "p_organization_id uuid, p_portal_id uuid, p_form_id uuid, p_payload jsonb, p_client_key text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_invitation"; readonly args: "p_slug text, p_email text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_invite"; readonly args: "p_organization_id uuid, p_portal_id uuid, p_client_record_id uuid, p_email text, p_user_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_invite_accept"; readonly args: "p_token text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_me"; readonly args: ""; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_preview"; readonly args: "p_organization_id uuid, p_portal_id uuid, p_principal_id uuid, p_table_id uuid"; readonly returns: "TABLE(record_id uuid, title text)"; readonly security: "definer"; }, { readonly name: "portal_principal_bind"; readonly args: "p_organization_id uuid, p_principal_id uuid, p_user_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_public"; readonly args: "p_slug text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_record_title"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "portal_restore"; readonly args: "p_organization_id uuid, p_portal_id uuid, p_confirm_title text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_revoke"; readonly args: "p_organization_id uuid, p_portal_id uuid, p_principal_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_self_signup"; readonly args: "p_slug text, p_email text, p_name text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "portal_slug"; readonly args: "p_organization_id uuid, p_title text, p_portal_id uuid DEFAULT NULL::uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "portal_tables"; readonly args: "p_organization_id uuid"; readonly returns: "TABLE(portal_id uuid, table_id uuid, name text)"; readonly security: "definer"; }, { readonly name: "portals"; readonly args: "p_organization_id uuid"; readonly returns: "TABLE(portal_id uuid, title text, slug text, client_table_id uuid, client_table text, is_active boolean, tables integer, invited integer, signed_in integer, sign_in_method text, opened_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "presentation_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "promote_field"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "promote_table"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "promoted_field_cap"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "promoted_fields"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(field_id uuid, field_key text, parity_type text, is_unique boolean, value_path text, index_arm text, index_expr text, index_name text, indexable boolean, why_not text)"; readonly security: "invoker"; }, { readonly name: "promoted_index_arm"; readonly args: "p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "promoted_index_ddl"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(step integer, purpose text, statement text)"; readonly security: "invoker"; }, { readonly name: "promoted_index_expr"; readonly args: "p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "promoted_index_name"; readonly args: "p_table_id uuid, p_field_key text, p_unique boolean"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "promoted_query_sql"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "promoted_read"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_key text, p_value text"; readonly returns: "SETOF uuid"; readonly security: "invoker"; }, { readonly name: "promoted_value_path"; readonly args: "p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "promotion_inline_ceiling"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "protected_field_notice"; readonly args: "p_field custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "protected_field_query_refusal"; readonly args: "p_field_id uuid, p_verb text"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "protected_field_rule"; readonly args: "p_token text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "protected_matches"; readonly args: "p_field_id uuid, p_value jsonb DEFAULT NULL::jsonb"; readonly returns: "TABLE(row_id uuid, value jsonb)"; readonly security: "definer"; }, { readonly name: "protected_readers_problem"; readonly args: "p_token text, p_readers jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "protected_value"; readonly args: "p_token text, p_row_id uuid, p_field_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "protected_value_leaks"; readonly args: "p_field_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(place text, table_token text, field_key text, row_id uuid, ref text)"; readonly security: "definer"; }, { readonly name: "protected_values"; readonly args: "p_organization_id uuid, p_token text, p_row_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "provenance_prune"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_dry_run boolean DEFAULT true, p_limit integer DEFAULT 200000"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "provenance_retention_days"; readonly args: "p_organization_id uuid"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "provenance_write"; readonly args: "p_organization_id uuid, p_conversation_id uuid, p_turn_id text, p_rows jsonb"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "public_definition_owner"; readonly args: "p_organization_id uuid, p_table_id uuid, p_record_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "publish_bind"; readonly args: "p_organization_id uuid, p_kind text, p_resource_id uuid, p_slug text, p_render_mode text DEFAULT 'page'::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "published_view_read"; readonly args: "p_slug text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "query_access_ids"; readonly args: "p_organization_id uuid, p_required text DEFAULT 'viewer'::text"; readonly returns: "uuid[]"; readonly security: "invoker"; }, { readonly name: "query_across_homes"; readonly 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"; readonly returns: "TABLE(record_id uuid, home_record_id uuid, data jsonb, created_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "query_by_coordinates"; readonly 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"; readonly returns: "TABLE(record_id uuid, table_id uuid, data jsonb, coordinates_matched integer)"; readonly security: "definer"; }, { readonly name: "query_can_see"; readonly args: "p_organization_id uuid, p_record_id uuid, p_required text DEFAULT 'viewer'::text"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "query_hot_paths"; readonly args: ""; readonly returns: "TABLE(name text, statement text)"; readonly security: "invoker"; }, { readonly name: "query_hot_paths_prepared"; readonly args: ""; readonly returns: "TABLE(name text, prepared boolean, generic_plans bigint)"; readonly security: "invoker"; }, { readonly name: "query_is_store_owner"; readonly args: ""; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "query_prepare_hot"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "query_principal"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "query_record_as_of"; readonly 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"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "query_record_document"; readonly args: "p_principal uuid, p_row custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "query_relation_edges"; readonly args: "p_organization_id uuid, p_flavor text DEFAULT NULL::text, p_role text DEFAULT NULL::text"; readonly returns: "TABLE(parent_id uuid, child_id uuid, role text, flavor text)"; readonly security: "definer"; }, { readonly name: "query_rollup"; readonly 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"; readonly returns: "TABLE(record_id uuid, depth integer)"; readonly security: "definer"; }, { readonly name: "query_rollup_sum"; readonly 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"; readonly returns: "numeric"; readonly security: "definer"; }, { readonly name: "query_table_as_of"; readonly 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"; readonly returns: "TABLE(record_id uuid, data jsonb)"; readonly security: "definer"; }, { readonly name: "query_table_homes"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "SETOF uuid"; readonly security: "definer"; }, { readonly name: "query_visibility_parity"; readonly args: "p_organization_id uuid"; readonly 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)"; readonly security: "definer"; }, { readonly name: "query_visible_ids"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid, p_required text DEFAULT 'viewer'::text"; readonly returns: "SETOF uuid"; readonly security: "definer"; }, { readonly name: "reachable_from"; readonly args: "p_organization_id uuid, p_roots uuid[]"; readonly returns: "TABLE(record_id uuid, depth integer, via text)"; readonly security: "invoker"; }, { readonly name: "reaches_directly"; readonly args: "p_user_id uuid, p_type text, p_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "reaches_directly_many"; readonly args: "p_user_id uuid, p_targets uuid[], p_type text DEFAULT 'record'::text, p_required permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "TABLE(target uuid, reaches boolean)"; readonly security: "definer"; }, { readonly name: "read_door_carried_ids"; readonly args: "p_user uuid, p_organization_id uuid, p_table_id uuid, p_required permission_level, OUT o_ids uuid[], OUT o_containers integer"; readonly returns: "record"; readonly security: "definer"; }, { readonly name: "read_door_granted_ids"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "uuid[]"; readonly security: "definer"; }, { readonly name: "read_door_ladder_ceiling"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "read_door_parity"; readonly args: "p_organization_id uuid, p_table_id uuid, p_user uuid, p_required permission_level, p_sample integer"; readonly returns: "TABLE(record_id uuid, set_based boolean, per_row boolean, verdict text)"; readonly security: "definer"; }, { readonly name: "read_mask"; readonly args: "p_organization_id uuid, p_record_id uuid, p_action text DEFAULT 'read'::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "read_mask_at"; readonly args: "p_record_id uuid, p_level_given boolean, p_level permission_level, p_action text DEFAULT 'read'::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "read_mask_for"; readonly args: "p_user_id uuid, p_organization_id uuid, p_table_id uuid, p_level permission_level, p_action text DEFAULT 'read'::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "read_paths_outside_the_door"; readonly args: ""; readonly returns: "TABLE(object_name text, why text)"; readonly security: "invoker"; }, { readonly name: "read_record"; readonly args: "p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "read_records"; readonly 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"; readonly returns: "TABLE(id uuid, document jsonb, level permission_level)"; readonly security: "definer"; }, { readonly name: "read_records_archived"; readonly args: "p_organization_id uuid, p_table_id uuid, p_lane text DEFAULT 'org'::text, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0"; readonly returns: "TABLE(id uuid, document jsonb, level permission_level, archived_at timestamp with time zone, archived_by uuid, archived_by_name text)"; readonly security: "definer"; }, { readonly name: "read_records_by_ids"; readonly args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false"; readonly returns: "TABLE(id uuid, document jsonb, level permission_level)"; readonly security: "definer"; }, { readonly name: "read_records_in_view_order"; readonly args: "p_organization_id uuid, p_view_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0, p_filter jsonb DEFAULT NULL::jsonb"; readonly returns: "TABLE(id uuid, document jsonb, level permission_level, \"position\" numeric)"; readonly security: "definer"; }, { readonly name: "read_records_keyset"; readonly args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_after jsonb DEFAULT NULL::jsonb, p_limit integer DEFAULT 50, p_time_zone text DEFAULT NULL::text, p_ids uuid[] DEFAULT NULL::uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "read_records_matching"; readonly args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0"; readonly returns: "TABLE(id uuid, document jsonb, level permission_level)"; readonly security: "definer"; }, { readonly name: "read_records_page"; readonly args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb DEFAULT '{}'::jsonb, p_search text DEFAULT NULL::text, p_sort jsonb DEFAULT '[]'::jsonb, p_view_id uuid DEFAULT NULL::uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_time_zone text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "realtime_presence_topic_admits"; readonly args: "p_topic text"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "realtime_topic_admits"; readonly args: "p_topic text"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "record_aggregate"; readonly 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, p_compare jsonb DEFAULT NULL::jsonb, p_search text DEFAULT NULL::text, p_time_zone text DEFAULT NULL::text, p_split_multi boolean DEFAULT false"; readonly returns: "TABLE(groups jsonb, measures jsonb, row_count bigint, prior_groups jsonb, prior_measures jsonb, prior_row_count bigint, delta jsonb, compare jsonb)"; readonly security: "definer"; }, { readonly name: "record_aggregate_as_of"; readonly args: "p_organization_id uuid, p_table_id uuid, p_recorded_at timestamp with time zone, p_measure text DEFAULT 'count'::text, p_field_key text DEFAULT NULL::text, p_group_by text DEFAULT NULL::text, p_match jsonb DEFAULT '{}'::jsonb"; readonly returns: "TABLE(bucket text, result numeric, row_count bigint, not_numbers bigint, a_non_number text)"; readonly security: "definer"; }, { readonly name: "record_applicability"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)"; readonly security: "invoker"; }, { readonly name: "record_archiver"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "record_as_of"; readonly args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone"; readonly returns: "TABLE(state jsonb, replayed boolean)"; readonly security: "definer"; }, { readonly name: "record_card"; readonly args: "p_viewer uuid, p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_carrying_edges"; readonly args: "p_id uuid, p_data_class text, p_data jsonb, p_deleted_at timestamp with time zone"; readonly returns: "TABLE(container_id uuid, item_id uuid, edge_role text)"; readonly security: "invoker"; }, { readonly name: "record_change_actions"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_change_many"; readonly args: "p_organization_id uuid, p_table_id uuid, p_changes jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_changes_drain"; readonly args: "p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100"; readonly returns: "TABLE(event_id uuid, organization_id uuid, table_id uuid, record_id uuid, kind text, operation text, version integer, fields jsonb, changed_field_ids jsonb, actor jsonb, chain jsonb, op_id uuid, occurred_at timestamp with time zone, via text)"; readonly security: "definer"; }, { readonly name: "record_delete"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "timestamp with time zone"; readonly security: "definer"; }, { readonly name: "record_drill"; readonly args: "p_organization_id uuid, p_table_id uuid, p_question jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_entity_edges"; readonly 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"; readonly returns: "TABLE(target_type text, target_id uuid, edge_role text, field_id uuid, ord integer)"; readonly security: "invoker"; }, { readonly name: "record_filter_sql"; readonly args: "p_filter jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "record_filter_sql"; readonly args: "p_organization_id uuid, p_table_id uuid, p_filter jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "record_follow_set"; readonly args: "p_organization_id uuid, p_record_id uuid, p_follow boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_followers"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_headers"; readonly args: "p_organization_id uuid, p_ids uuid[]"; readonly returns: "TABLE(id uuid, table_id uuid, created_at timestamp with time zone, updated_at timestamp with time zone, version integer, deleted_at timestamp with time zone, mine boolean, created_by uuid)"; readonly security: "definer"; }, { readonly name: "record_history"; readonly args: "p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0"; readonly returns: "TABLE(version integer, occurred_at timestamp with time zone, operation text, operation_label text, actor jsonb, changes jsonb, migration_id uuid, undoable boolean)"; readonly security: "definer"; }, { readonly name: "record_org_hint"; readonly args: "p_id uuid, p_organization_id uuid"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "record_page_bundle"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "record_platform_keys"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "record_relation_edges"; readonly 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"; readonly returns: "TABLE(target_id uuid, edge_role text, field_id uuid, ord integer)"; readonly security: "invoker"; }, { readonly name: "record_reparent"; readonly args: "p_organization_id uuid, p_record_id uuid, p_parent_id uuid"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "record_resolve"; readonly args: "p_organization_id uuid, p_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_restore"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_restore_preview"; readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_field_key text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_restore_version"; readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_restore_version"; readonly args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_row_controls"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_row_controls_set"; readonly args: "p_organization_id uuid, p_record_id uuid, p_controls jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_runs"; readonly args: "p_organization_id uuid, p_record_id uuid, p_limit integer DEFAULT 50"; readonly returns: "TABLE(run_id uuid, kind text, name text, trigger_name text, status text, started_at timestamp with time zone, finished_at timestamp with time zone, steps integer, says text, ran_by uuid)"; readonly security: "definer"; }, { readonly name: "record_scope_context"; readonly args: "p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_search_sql"; readonly args: "p_organization_id uuid, p_table_id uuid, p_search text, p_alias text DEFAULT 'r'::text, p_time_zone text DEFAULT NULL::text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "record_source_key"; readonly args: "p_table_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "record_source_keys"; readonly args: "p_table_id uuid"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "record_source_table"; readonly args: "p_key text"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "record_stage_pending"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_state_as_of"; readonly args: "p_record_id uuid, p_at timestamp with time zone"; readonly returns: "TABLE(state jsonb, replayed boolean)"; readonly security: "definer"; }, { readonly name: "record_table"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "record_triggers"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(trigger_id uuid, name text, definition_id uuid, definition_name text, table_id uuid, event text, operations jsonb, field_ids jsonb, via jsonb, is_active boolean, last_fired_at timestamp with time zone, fire_count integer, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "record_update"; readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_expected_version integer DEFAULT NULL::integer"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "record_update_adding_choices"; readonly args: "p_organization_id uuid, p_record_id uuid, p_patch jsonb, p_add jsonb, p_expected_version integer DEFAULT NULL::integer"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "record_upsert"; readonly args: "p_organization_id uuid, p_table_id uuid, p_key text[], p_data jsonb, p_expected_version integer DEFAULT NULL::integer"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "record_value_one"; readonly args: "p_organization_id uuid, p_record_id uuid, p_key text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "record_values"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "record_values_of"; readonly args: "p_row custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "record_values_step"; readonly args: "p_row custom.record, p_cache jsonb DEFAULT '{}'::jsonb, OUT o_doc jsonb, OUT o_cache jsonb"; readonly returns: "record"; readonly security: "invoker"; }, { readonly name: "record_values_versioned"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly 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)"; readonly security: "definer"; }, { readonly name: "record_words"; readonly args: "p_organization_id uuid, p_record_id uuid, p_noun text DEFAULT NULL::text"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "record_write"; readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "record_write_graph"; readonly args: "p_organization_id uuid, p_table_id uuid, p_parent jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_write_graph_superseding"; readonly args: "p_organization_id uuid, p_table_id uuid, p_lock_key text, p_idempotence jsonb DEFAULT NULL::jsonb, p_parent jsonb DEFAULT NULL::jsonb, p_edges jsonb DEFAULT '[]'::jsonb, p_children jsonb DEFAULT '[]'::jsonb, p_chain jsonb DEFAULT '{\"mode\": \"first\"}'::jsonb, p_rows_state jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "record_write_many"; readonly args: "p_organization_id uuid, p_table_id uuid, p_rows jsonb[], p_ids uuid[] DEFAULT NULL::uuid[]"; readonly returns: "uuid[]"; readonly security: "definer"; }, { readonly name: "records_limits"; readonly args: "p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "records_search"; readonly args: "p_search text, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_table_ids uuid[] DEFAULT NULL::uuid[], p_organization_ids uuid[] DEFAULT NULL::uuid[], p_include_platform_tables boolean DEFAULT false"; readonly returns: "TABLE(record_id uuid, table_id uuid, table_name text, name text, organization_id uuid, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "refusals_claiming_a_level_never_asked"; readonly args: ""; readonly returns: "TABLE(function_name text, identity_args text, why text)"; readonly security: "invoker"; }, { readonly name: "relation_carry"; readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "relation_edges_withdraw"; readonly args: "p_organization_id uuid, p_field_ids uuid[], p_why text"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "relation_halves_disagreements"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_record_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(organization_id uuid, record_id uuid, field_key text, field_id uuid, target_id uuid, direction text, remedy text, why text)"; readonly security: "definer"; }, { readonly name: "relation_halves_repair"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "relation_kernel_record"; readonly args: "p_organization_id uuid, p_kernel_table_id uuid, p_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "relation_name_key"; readonly args: "p_text text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "relation_names_match"; readonly args: "p_organization_id uuid, p_table_id uuid, p_names text[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "relation_own"; readonly args: "p_organization_id uuid, p_owner_id uuid, p_target_id uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "relation_restore"; readonly args: "p_organization_id uuid, p_relation_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "relation_reverse_field"; readonly args: "p_organization_id uuid, p_field_id uuid, p_label text DEFAULT NULL::text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "relation_reverse_set"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_id uuid, p_add uuid[] DEFAULT '{}'::uuid[], p_remove uuid[] DEFAULT '{}'::uuid[]"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "relation_target_card"; readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text DEFAULT NULL::text"; readonly returns: "TABLE(target_id uuid, target_organization_id uuid, is_foreign boolean, masked boolean, reader_level permission_level, card jsonb, why text)"; readonly security: "definer"; }, { readonly name: "relation_target_external"; readonly args: "p_connection_token text, p_external_table text, p_external_key text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "relation_target_ours"; readonly args: "p_entity_token text, p_row_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "relation_targets"; readonly args: "p_organization_id uuid, p_record_id uuid, p_via_key text"; readonly returns: "SETOF uuid"; readonly security: "definer"; }, { readonly name: "relation_uncarry"; readonly args: "p_organization_id uuid, p_container_id uuid, p_item_id uuid"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "relation_value_target_ok"; readonly args: "p_organization_id uuid, p_field_id uuid, p_field_data jsonb, p_target_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "relation_words"; readonly args: "p_organization_id uuid, p_field_id uuid, p_value text"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "relation_words_many"; readonly args: "p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]"; readonly returns: "TABLE(record_id uuid, words text, archived boolean)"; readonly security: "definer"; }, { readonly name: "relation_words_with_icons_many"; readonly args: "p_organization_id uuid, p_field_id uuid, p_record_ids uuid[]"; readonly returns: "TABLE(record_id uuid, words text, archived boolean, icon text, table_icon text)"; readonly security: "definer"; }, { readonly name: "relative_window_for_reader"; readonly args: "p_window jsonb, p_organization_id uuid, p_instants boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "relative_window_resolve"; readonly args: "p_window jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "reopen_declared_doors"; readonly args: ""; readonly returns: "TABLE(reopened text)"; readonly security: "definer"; }, { readonly name: "required_epoch"; readonly args: "p_container_type text, p_container_id uuid, p_item_type text, p_item_id uuid"; readonly returns: "bigint"; readonly security: "definer"; }, { readonly name: "resolve_context"; readonly args: "p_entity_type text, p_entity_id uuid, p_record_ids uuid[] DEFAULT NULL::uuid[], p_table_ids uuid[] DEFAULT NULL::uuid[], p_system_item_refs text[] DEFAULT NULL::text[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "resolve_first_match"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "resolve_id"; readonly args: "p_organization_id uuid, p_id uuid"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "retired_actor_words"; readonly args: ""; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "reverse_columns"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(key text, label text, source_field_id uuid, source_field_key text, source_field_label text, source_table_id uuid, source_table_name text, cardinality text, read_only boolean)"; readonly security: "definer"; }, { readonly name: "reverse_links_many"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_id uuid, p_record_ids uuid[], p_limit integer DEFAULT 10, p_offset integer DEFAULT 0"; readonly returns: "TABLE(record_id uuid, total integer, links jsonb)"; readonly security: "definer"; }, { readonly name: "reverse_links_many_fields"; readonly args: "p_organization_id uuid, p_table_id uuid, p_field_ids uuid[], p_record_ids uuid[], p_limit integer DEFAULT 10, p_offset integer DEFAULT 0"; readonly returns: "TABLE(field_id uuid, record_id uuid, total integer, links jsonb)"; readonly security: "invoker"; }, { readonly name: "revoke_view_share_link"; readonly args: "p_link_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "rollup_value"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_data jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "row_actions"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "row_sits_in_a_personal_table"; readonly args: "p_type text, p_organization_id uuid, p_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "row_template_bodies"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(template_id uuid, body jsonb)"; readonly security: "definer"; }, { readonly name: "row_template_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "row_template_default"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(template_id uuid, name text, \"values\" jsonb, body jsonb)"; readonly security: "definer"; }, { readonly name: "row_templates"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(template_id uuid, name text, table_id uuid, \"values\" jsonb, created_at timestamp with time zone, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "rule_applies"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_context"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_declare"; readonly args: "p_organization_id uuid, p_spec jsonb, p_rule_id uuid DEFAULT NULL::uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "rule_dependency_edges"; readonly args: "p_organization_id uuid, p_row custom.record DEFAULT NULL::custom.record"; readonly returns: "TABLE(needs text, needed text)"; readonly security: "invoker"; }, { readonly name: "rule_eval"; readonly args: "p_organization_id uuid, p_expr jsonb, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_field_key"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "rule_field_label"; readonly args: "p_organization_id uuid, p_field_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "rule_filter_node_sql"; readonly args: "p_organization_id uuid, p_table_id uuid, p_node jsonb, p_map jsonb, p_visible text[]"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "rule_filter_skip_withheld"; readonly args: "p_organization_id uuid, p_table_id uuid, p_node jsonb, p_visible text[]"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_is_me"; readonly args: "p_op text, p_a jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_is_me"; readonly args: "p_op text, p_a jsonb, p_organization_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "rule_members"; readonly args: "p_organization_id uuid, p_rule_id uuid"; readonly returns: "SETOF custom.record"; readonly security: "invoker"; }, { readonly name: "rule_members_visible"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0"; readonly returns: "TABLE(id uuid, document jsonb, level permission_level)"; readonly security: "definer"; }, { readonly name: "rule_membership"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_record_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_node_kinds"; readonly args: ""; readonly returns: "TABLE(node text, evaluated_by text, note text)"; readonly security: "invoker"; }, { readonly name: "rule_restore"; readonly args: "p_organization_id uuid, p_rule_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "rule_run"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_values jsonb, p_context jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_sql_op"; readonly args: "p_op text, p_a jsonb, p_b jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "rule_truth"; readonly args: "p_answer jsonb"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "rule_uses"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "rule_version"; readonly args: "p_organization_id uuid, p_rule_id uuid"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "said"; readonly args: "p_value text, p_when_there_is_none text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "scope_item_row_of"; readonly args: "p_field custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "scope_item_value_type"; readonly args: "p_field jsonb, p_carried jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "scope_items_of"; readonly args: "p_org uuid, p_table uuid"; readonly returns: "SETOF custom.record"; readonly security: "invoker"; }, { readonly name: "scope_member_reaches"; readonly args: "p_user_id uuid, p_record_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "scope_row_of"; readonly args: "p_rec custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "scope_rows_of"; readonly args: "p_org uuid, p_types uuid[] DEFAULT NULL::uuid[]"; readonly returns: "TABLE(id uuid, table_id uuid, type_sort integer, sort_order integer, name text, type_doc jsonb, row_doc jsonb)"; readonly security: "invoker"; }, { readonly name: "scope_setting_back"; readonly args: "p_value jsonb, p_behavior text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "scope_table_provision"; readonly args: "p_organization_id uuid, p_item_id uuid, p_scope_id uuid, p_home_id uuid DEFAULT NULL::uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "scope_type_row_of"; readonly args: "p_table custom.record"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "scope_value_columns"; readonly args: "p_org uuid, p_field jsonb, p_value_type text, p_value jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "seen_among"; readonly args: "p_user_id uuid, p_ids uuid[]"; readonly returns: "uuid[]"; readonly security: "definer"; }, { readonly name: "sensitivity_rank"; readonly args: "p_sensitivity text"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "set_table_confidential"; readonly args: "p_table_id uuid, p_readers jsonb, p_reason text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "set_table_confidential_arman_explicitly_approved"; readonly args: "p_table_id uuid, p_readers jsonb, p_arman_words text, p_approved_on date, p_maker_is_reader boolean DEFAULT NULL::boolean"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "set_table_organization"; readonly args: "p_table_id uuid, p_reason text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "set_view_share_link_copy"; readonly args: "p_link_id uuid, p_restrict boolean"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "set_view_share_link_protection"; readonly args: "p_link_id uuid, p_password text DEFAULT NULL::text, p_change_expiry boolean DEFAULT false, p_expires_at timestamp with time zone DEFAULT NULL::timestamp with time zone"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "share_access"; readonly args: "p_organization_id uuid, p_subject_id uuid"; readonly 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)"; readonly security: "definer"; }, { readonly name: "share_grant"; readonly 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"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "share_lane_set"; readonly args: "p_organization_id uuid, p_subject_id uuid, p_choice text, p_level permission_level DEFAULT NULL::permission_level"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "share_lanes"; readonly args: ""; readonly returns: "TABLE(choice text, lane text, discoverable boolean, label text, means text)"; readonly security: "definer"; }, { readonly name: "share_levels"; readonly args: ""; readonly returns: "TABLE(level permission_level, ordinal integer, label text, means text)"; readonly security: "definer"; }, { readonly name: "share_lists_row"; readonly args: "p_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "share_people"; readonly args: "p_organization_id uuid, p_subject_id uuid DEFAULT NULL::uuid, p_query text DEFAULT NULL::text, p_limit integer DEFAULT 25"; readonly returns: "TABLE(user_id uuid, email text, display_name text, membership text, already_at permission_level, already_why text)"; readonly security: "definer"; }, { readonly name: "share_revoke"; readonly args: "p_organization_id uuid, p_subject_id uuid, p_principal_kind text, p_principal_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "share_subject_name"; readonly args: "p_organization_id uuid, p_type text, p_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "shared_only_disagreements"; readonly args: "p_pretend text DEFAULT NULL::text"; readonly 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)"; readonly security: "invoker"; }, { readonly name: "shared_view_read"; readonly args: "p_token text, p_password text DEFAULT NULL::text, p_unlock text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "shares_outside"; readonly args: "p_organization_id uuid"; readonly returns: "TABLE(invitation_id uuid, table_id uuid, table_name text, email text, level text, level_label text, status text, joined boolean, expired boolean, invited_at timestamp with time zone, expires_at timestamp with time zone, say text)"; readonly security: "definer"; }, { readonly name: "sign_request_sentence"; readonly args: "p_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "sign_request_state"; readonly args: "p_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "sign_requests"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(request_id uuid, render_id uuid, record_id uuid, field_key text, document_title text, signer_name text, signer_email text, signer_has_account boolean, state text, sentence text, document_version integer, document_hash text, sent_at timestamp with time zone, expires_at timestamp with time zone, viewed_at timestamp with time zone, signed_at timestamp with time zone, declined_at timestamp with time zone, invalidated_at timestamp with time zone, signature_id uuid, signature_mark text, reminder_count integer)"; readonly security: "definer"; }, { readonly name: "silent_page_doors"; readonly args: ""; readonly returns: "TABLE(door text, why text)"; readonly security: "definer"; }, { readonly name: "size_refusal"; readonly args: "p_organization_id uuid, p_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "source_next_pointer"; readonly args: "p_sources jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "source_pointer"; readonly args: "p_sources jsonb, p_source jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "space_templates"; readonly args: "p_filter jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "stage_rule_enforcement"; readonly args: "p_organization_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "stage_rule_on_fail_kinds"; readonly args: ""; readonly returns: "TABLE(behaviour text, note text)"; readonly security: "invoker"; }, { readonly name: "stamp_value_envelopes"; readonly args: "p_data jsonb, p_actor text, p_on_behalf_of text, p_at timestamp with time zone"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "status_groups_keyed"; readonly args: "p_organization_id uuid, p_options_table_id uuid, p_groups jsonb, p_kept jsonb, p_label text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "status_groups_of"; readonly args: "p_groups jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "storage_modes"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "store_census_pair_ceiling"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "store_field_part"; readonly args: "p_field_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "store_is_open"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "store_off_sentence"; readonly args: "p_organization_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "store_part_notice"; readonly args: "p_field custom.record, p_action text DEFAULT 'read'::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "store_part_who"; readonly args: "p_cells jsonb, p_action text DEFAULT 'read'::text"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "store_row_visible"; readonly args: "p_person uuid, p_table uuid, p_row custom.record, p_visible text[]"; readonly returns: "text[]"; readonly security: "definer"; }, { readonly name: "store_row_visible_with"; readonly args: "p_reveals jsonb, p_person uuid, p_row custom.record, p_visible text[]"; readonly returns: "text[]"; readonly security: "definer"; }, { readonly name: "store_seat_fallback"; readonly args: "p_org uuid"; readonly returns: "SETOF uuid"; readonly security: "definer"; }, { readonly name: "store_seat_has"; readonly args: "p_person uuid, p_record uuid, p_seat jsonb"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "store_seat_holders"; readonly args: "p_record uuid, p_seat jsonb"; readonly returns: "TABLE(user_id uuid, source text)"; readonly security: "definer"; }, { readonly name: "store_seat_invalid"; readonly args: "p_seat jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "store_seat_records"; readonly args: "p_person uuid, p_table uuid, p_seat jsonb"; readonly returns: "SETOF uuid"; readonly security: "definer"; }, { readonly name: "subscription_cadences"; readonly args: "p_organization_id uuid"; readonly returns: "text[]"; readonly security: "definer"; }, { readonly name: "subscription_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "subscription_mute"; readonly args: "p_organization_id uuid, p_rule_id uuid, p_muted boolean DEFAULT true"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "subscription_preview"; readonly args: "p_organization_id uuid, p_rule_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "subscriptions"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(rule_id uuid, name text, table_id uuid, saved_view_id uuid, cadence text, schedule text, quiet_hours jsonb, channel text, recipient_user_id uuid, event_key text, muted boolean, mine boolean, i_may_mute boolean, last_sent_at timestamp with time zone, next_digest_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "synced_source_archive_log"; readonly args: "p_id uuid, p_job text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "synced_source_archive_log_add"; readonly args: "p_id uuid, p_job text, p_entry jsonb, p_now timestamp with time zone DEFAULT now()"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "synced_source_by_ref"; readonly args: "p_organization_id uuid, p_source_kinds text[], p_source_ref text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "synced_source_finish"; readonly args: "p_id uuid, p_cursor jsonb, p_synced_at timestamp with time zone, p_report jsonb, p_mapping jsonb, p_run_id uuid"; readonly returns: "void"; readonly security: "definer"; }, { readonly name: "synced_source_read"; readonly args: "p_organization_id uuid, p_source_kind text, p_target uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "synced_source_save"; readonly args: "p_organization_id uuid, p_source_kind text, p_source_ref text, p_title text, p_target uuid, p_owner uuid, p_connector jsonb, p_actor uuid"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "synced_sources_for"; readonly args: "p_source_ref text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_access_setup"; readonly args: "p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_access_setup_preview"; readonly args: "p_table_id uuid, p_setup jsonb, p_moves jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_access_setup_revert"; readonly args: "p_table_id uuid, p_audit_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_access_setup_set"; readonly args: "p_table_id uuid, p_setup jsonb, p_moves jsonb DEFAULT '{}'::jsonb, p_reason text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_add_rung"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "permission_level"; readonly security: "invoker"; }, { readonly name: "table_agent_writable_set"; readonly args: "p_organization_id uuid, p_table_id uuid, p_agent_writable boolean"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_archive"; readonly args: "p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 50, p_include_table boolean DEFAULT true"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_archive_deliberately"; readonly args: "p_organization_id uuid, p_table_id uuid, p_typed_slug text, p_reason text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_capacity"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_carries_its_rows"; readonly args: "p_user_id uuid, p_table_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "table_column_source"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "table_contents"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(record_id uuid, kind text, goes_at integer)"; readonly security: "invoker"; }, { readonly name: "table_copies_in_progress"; readonly args: ""; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_copy_sync"; readonly args: "p_organization_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_create"; readonly args: "p_organization_id uuid, p_spec jsonb, p_fields jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "table_declare"; readonly args: "p_organization_id uuid, p_spec jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "table_decorate"; readonly args: "p_organization_id uuid, p_table_id uuid, p_path text[], p_value jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_decorations"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_dimensions"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_dimensions_set"; readonly args: "p_organization_id uuid, p_table_id uuid, p_overrides jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_duplicate"; readonly args: "p_table_id uuid, p_with_records boolean DEFAULT false, p_name text DEFAULT NULL::text, p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_duplicate_continue"; readonly args: "p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_ensure"; readonly args: "p_organization_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_facts"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(table_id uuid, visibility text, mine boolean, platform_owned boolean, kept_for text, offered_as_context boolean, keeper_group text, keeper_says text, used_in_kind text, used_in_id uuid, used_in_table_id uuid, foundation boolean)"; readonly security: "definer"; }, { readonly name: "table_find"; readonly args: "p_organization_id uuid, p_slug text DEFAULT NULL::text, p_name text DEFAULT NULL::text, p_kept_for text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_find_many"; readonly args: "p_organization_ids uuid[], p_slug text, p_kept_for text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_from_example"; readonly args: "p_organization_id uuid, p_home_id uuid, p_example jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_has_a_visible_record"; readonly args: "p_user uuid, p_organization_id uuid, p_table_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "table_home"; readonly args: "p_table_id uuid, p_to_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_homes_named"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(home_id uuid, name text, declared boolean)"; readonly security: "definer"; }, { readonly name: "table_is_foundation"; readonly args: "p_data jsonb"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "table_is_live"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "table_is_options_table"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "table_is_platform_context"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "table_kept_for_derived"; readonly args: "p_data jsonb, p_is_kernel boolean, p_is_options boolean"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "table_kept_out_of_lists"; readonly args: "p_kept_for text"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "table_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "table_kind_facts"; readonly args: "p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_level_facts"; readonly args: "p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_list_everywhere"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_list_everywhere"; readonly args: "p_organization_id uuid, p_include_platform_tables boolean"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "table_map_fields"; readonly args: "p_organization_id uuid, p_table_ids uuid[]"; readonly returns: "TABLE(table_id uuid, field_key text, field_label text, field_type text, relation_target uuid, inverse_key text, field_sort numeric, is_link boolean)"; readonly security: "definer"; }, { readonly name: "table_move"; readonly args: "p_table_id uuid, p_to_organization_id uuid, p_expected_version integer DEFAULT NULL::integer"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_page_bundle"; readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "table_placement"; readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb, p_is_kernel boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "table_record_ceiling"; readonly args: ""; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "table_record_ceiling"; readonly args: "p_organization_id uuid"; readonly returns: "integer"; readonly security: "invoker"; }, { readonly name: "table_restore"; readonly args: "p_organization_id uuid, p_table_id uuid, p_chunk integer DEFAULT 20"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_row_counts"; readonly args: "p_organization_id uuid, p_table_ids uuid[]"; readonly returns: "TABLE(table_id uuid, visible_rows bigint)"; readonly security: "definer"; }, { readonly name: "table_row_defaults"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_row_defaults_apply"; readonly args: "p_organization_id uuid, p_table_id uuid, p_after uuid DEFAULT NULL::uuid, p_budget_ms integer DEFAULT 4000"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_row_defaults_set"; readonly args: "p_organization_id uuid, p_table_id uuid, p_defaults jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_row_label"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_row_label_set"; readonly args: "p_organization_id uuid, p_table_id uuid, p_formula text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_rules"; readonly args: "p_organization_id uuid, p_table_id uuid, p_use text, p_record_type text DEFAULT NULL::text"; readonly returns: "SETOF custom.record"; readonly security: "invoker"; }, { readonly name: "table_share_outside"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_share_outside_accept"; readonly args: "p_token text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_share_outside_for_me"; readonly args: ""; readonly returns: "TABLE(invitation_id uuid, organization_id uuid, organization text, table_id uuid, table_name text, level text, level_label text, token text, expires_at timestamp with time zone, say text)"; readonly security: "definer"; }, { readonly name: "table_share_outside_grant"; readonly args: "p_organization_id uuid, p_table_id uuid, p_person text, p_level permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_share_outside_invite"; readonly args: "p_organization_id uuid, p_table_id uuid, p_email text, p_level permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_share_outside_resend"; readonly args: "p_organization_id uuid, p_invitation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_share_outside_revoke"; readonly args: "p_organization_id uuid, p_invitation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_stage_field"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "table_storage"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "table_sync"; readonly args: "p_organization_id uuid, p_home_id uuid, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_sync_cell"; readonly args: "p_organization_id uuid, p_record_id uuid, p_key text, p_land jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_sync_due_tick"; readonly args: ""; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_sync_settings_set"; readonly args: "p_organization_id uuid, p_table_id uuid, p_settings jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_template_declare"; readonly args: "p_org_id uuid, p_name text, p_description text, p_fields jsonb"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "table_templates"; readonly args: "p_org_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_transfer_owner"; readonly args: "p_table_id uuid, p_to_person uuid, p_reason text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_type_field"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "table_unique_rule_fields"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "table_webhook_archive"; readonly args: "p_organization_id uuid, p_webhook_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "table_webhook_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_target_url text, p_events text[] DEFAULT NULL::text[], p_description text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "table_webhooks"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(webhook_id uuid, target_url text, description text, events text[], is_active boolean, last_attempt_at timestamp with time zone, last_success_at timestamp with time zone, consecutive_failures integer, owner_id uuid, created_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "table_work_kind"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "tables_at_home"; readonly args: "p_organization_id uuid, p_home_ids uuid[]"; readonly returns: "TABLE(table_id uuid, home_record_id uuid, kind text)"; readonly security: "definer"; }, { readonly name: "tables_described_without_asking"; readonly args: ""; readonly returns: "TABLE(function_name text, identity_args text, why text)"; readonly security: "invoker"; }, { readonly name: "tables_i_can_open"; readonly args: ""; readonly returns: "TABLE(table_id uuid, table_name text, organization_id uuid, organization_name text, member boolean, visibility text, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "tables_listed_among"; readonly args: "p_organization_id uuid, p_tables uuid[]"; readonly returns: "SETOF uuid"; readonly security: "invoker"; }, { readonly name: "tables_seen_among"; readonly args: "p_user_id uuid, p_organization_ids uuid[], p_among uuid[]"; readonly returns: "TABLE(organization_id uuid, id uuid, seen boolean)"; readonly security: "definer"; }, { readonly name: "tables_seen_once_per_group"; readonly args: "p_user_id uuid, p_organization_ids uuid[]"; readonly returns: "TABLE(organization_id uuid, id uuid, seen boolean)"; readonly security: "definer"; }, { readonly name: "tables_shared_with_me"; readonly args: ""; readonly returns: "TABLE(table_id uuid, organization_id uuid, organization text, table_name text, level text, level_label text, shared_at timestamp with time zone, opens boolean, say text)"; readonly security: "definer"; }, { readonly name: "template_archive"; readonly args: "p_template_id uuid, p_restore boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_declare"; readonly args: "p_scope text, p_spec jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_from_tables"; readonly args: "p_organization_id uuid, p_table_ids uuid[], p_include_rows boolean DEFAULT false, p_rows_per_table integer DEFAULT 25"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_install"; readonly args: "p_organization_id uuid, p_template_id uuid, p_budget_ms integer DEFAULT 4000"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_install_claim"; readonly args: "p_organization_id uuid, p_install_id uuid, p_kind text, p_label text, p_source_id uuid DEFAULT NULL::uuid, p_lease_seconds integer DEFAULT NULL::integer"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_install_fresh"; readonly args: "p_organization_id uuid, p_template_id uuid, p_title text DEFAULT NULL::text, p_install_id uuid DEFAULT NULL::uuid, p_budget_ms integer DEFAULT 4000"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_install_note"; readonly args: "p_organization_id uuid, p_install_id uuid, p_kind text, p_id uuid, p_label text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_instance_of_page"; readonly args: "p_organization_id uuid, p_page_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_instances"; readonly args: "p_organization_id uuid, p_catalogue_id text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_keep"; readonly args: "p_template_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_restore"; readonly args: "p_organization_id uuid, p_install_id uuid, p_budget_ms integer DEFAULT 4000"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_uninstall"; readonly args: "p_organization_id uuid, p_install_id uuid, p_budget_ms integer DEFAULT 4000"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "template_upgrade"; readonly args: "p_organization_id uuid, p_install_id uuid, p_template_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "templates"; readonly args: "p_filter jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "text_head_bytes"; readonly args: "p_text text, p_bytes bigint"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "timeline_dependency_shift"; readonly args: "p_organization_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "trg_associations_bump_visibility"; readonly args: ""; readonly returns: "trigger"; readonly security: "definer"; }, { readonly name: "undeclared_keys"; readonly args: "p_organization_id uuid, p_table_id uuid, p_data jsonb"; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "unmatched_people_resolve"; readonly args: "p_organization_id uuid, p_user_id uuid"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "unresolved_sources_of"; readonly args: "p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "validate_custom_fields"; readonly args: "p_token text, p_organization_id uuid, p_values jsonb"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "validate_value_envelope"; readonly args: "p_organization_id uuid, p_fields custom.record[], p_data jsonb"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "validate_values"; readonly args: "p_organization_id uuid, p_fields custom.record[], p_values jsonb, p_record_type text DEFAULT NULL::text"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "value_alternate_keys"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "value_envelope_keys"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "value_envelope_ok"; readonly args: "p_data jsonb"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "value_envelope_refusal"; readonly args: "p_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "value_read"; readonly args: "p_organization_id uuid, p_record_id uuid, p_key text"; readonly 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)"; readonly security: "definer"; }, { readonly name: "value_restore"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "value_restore"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_version integer, p_author jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "value_versions"; readonly args: "p_old jsonb, p_new jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "view_declare"; readonly args: "p_organization_id uuid, p_table_id uuid, p_spec jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "view_designate"; readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_layout text DEFAULT NULL::text"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "view_keys"; readonly args: ""; readonly returns: "TABLE(path text, shape text, layouts text[], writer text, sentence text)"; readonly security: "invoker"; }, { readonly name: "view_keys_check"; readonly args: "p_organization_id uuid, p_table_id uuid, p_set jsonb, p_old jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "view_look_read"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "view_look_set"; readonly args: "p_organization_id uuid, p_table_id uuid, p_view_id uuid, p_look jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "view_record_order_set"; readonly args: "p_organization_id uuid, p_view_id uuid, p_record_ids uuid[]"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "view_share_links"; readonly args: "p_view_id uuid"; readonly returns: "TABLE(id uuid, token text, permission_level text, label text, expires_at timestamp with time zone, use_count integer, last_used_at timestamp with time zone, created_at timestamp with time zone, created_by uuid, created_by_name text, made_by_me boolean, has_password boolean, restrict_copy boolean)"; readonly security: "definer"; }, { readonly name: "views"; readonly args: "p_organization_id uuid, p_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(view_id uuid, name text, table_id uuid, filters jsonb, definition jsonb, created_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "visibility_ancestors"; readonly args: "p_item_type text, p_item_id uuid"; readonly returns: "TABLE(container_type text, container_id uuid, depth integer, max_level permission_level)"; readonly security: "definer"; }, { readonly name: "visibility_as_of"; readonly args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone"; readonly 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)"; readonly security: "definer"; }, { readonly name: "visibility_cache_rebuild"; readonly args: ""; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "visibility_parity"; readonly args: ""; readonly 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)"; readonly security: "definer"; }, { readonly name: "visibility_warm"; readonly args: "p_container_type text, p_container_id uuid"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "visible_predicate_sql"; readonly 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"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "visible_record_ids"; readonly args: "p_user_id uuid, p_required permission_level DEFAULT 'viewer'::permission_level"; readonly returns: "TABLE(id uuid)"; readonly security: "definer"; }, { readonly name: "visible_set"; readonly 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"; readonly returns: "record"; readonly security: "definer"; }, { readonly name: "where_id_opens"; readonly args: "p_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "where_lists_live"; readonly args: "p_list_ids uuid[]"; readonly returns: "TABLE(list_id uuid, lives_in text, address text, why text)"; readonly security: "definer"; }, { readonly name: "where_tables_live"; readonly args: "p_table_ids uuid[]"; readonly returns: "TABLE(table_id uuid, lives_in text, why text)"; readonly security: "definer"; }, { readonly name: "who_could_see_on"; readonly args: "p_record_id uuid, p_at timestamp with time zone"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "whole_value_ceiling"; readonly args: "p_organization_id uuid"; readonly returns: "bigint"; readonly security: "invoker"; }, { readonly name: "whole_value_complete"; readonly args: "p_organization_id uuid, p_record_id uuid, p_field_key text, p_file_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "whole_value_head"; readonly args: "p_text text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "whole_value_park"; readonly args: "p_organization_id uuid, p_table_id uuid, p_record_id uuid, p_owner_id uuid, p_visibility platform.visibility, p_data jsonb, p_park jsonb"; readonly returns: "void"; readonly security: "invoker"; }, { readonly name: "whole_value_pointer_of"; readonly args: "p_values jsonb, p_sources jsonb, p_key text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "whole_value_source"; readonly args: "p_text text, p_writer_src jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "whole_values_waiting"; readonly args: "p_organization_id uuid, p_record_ids uuid[]"; readonly returns: "TABLE(record_id uuid, field_key text, pointer text, value_version integer, sha256 text, bytes bigint, chars bigint, owner_id uuid, record_visibility text, table_id uuid, table_name text)"; readonly security: "definer"; }, { readonly name: "widget_kernel_id"; readonly args: ""; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "with_retired"; readonly args: "p_doc jsonb, p_retired jsonb, p_visible text[], p_declared text[]"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "with_whole_value_pointers"; readonly args: "p_document jsonb, p_values jsonb, p_sources jsonb, p_visible text[], p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "withheld_marker"; readonly args: "p_mask jsonb, p_key text"; readonly returns: "jsonb"; readonly security: "invoker"; }, { readonly name: "withheld_sentence"; readonly args: "p_mask jsonb, p_key text"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "work_approval_approvers"; readonly args: "p_organization_id uuid, p_subject_id uuid, p_approver_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(user_id uuid, name text, why text)"; readonly security: "definer"; }, { readonly name: "work_approval_decide"; readonly args: "p_organization_id uuid, p_approval_id uuid, p_approve boolean, p_note text DEFAULT NULL::text"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_approval_host_run"; readonly args: "p_organization_id uuid, p_fingerprint text, p_conversation_id uuid DEFAULT NULL::uuid, p_approval_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_approval_host_run_done"; readonly args: "p_organization_id uuid, p_approval_id uuid, p_ok boolean, p_outcome text, p_report jsonb DEFAULT NULL::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_approval_is_approver"; readonly args: "p_organization_id uuid, p_subject_id uuid, p_approver_id uuid, p_user_id uuid"; readonly returns: "boolean"; readonly security: "invoker"; }, { readonly name: "work_approval_kinds"; readonly args: ""; readonly returns: "text[]"; readonly security: "invoker"; }, { readonly name: "work_approval_may_decide"; readonly args: "p_organization_id uuid, p_approval_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "work_approval_read"; readonly args: "p_organization_id uuid, p_approval_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_approval_request"; readonly args: "p_organization_id uuid, p_subject_id uuid, p_change jsonb, p_note text DEFAULT NULL::text, p_approver_id uuid DEFAULT NULL::uuid, p_origin text DEFAULT 'person'::text, p_conversation_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_approval_withdrawal"; readonly args: "p_organization_id uuid, p_data jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "work_assign"; readonly args: "p_organization_id uuid, p_record_id uuid, p_assignee_user_id uuid, p_due_date timestamp with time zone DEFAULT NULL::timestamp with time zone, p_clear_due boolean DEFAULT false"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_assignment_fields"; readonly args: "p_options_table_id uuid DEFAULT NULL::uuid"; readonly returns: "TABLE(key text, label text, spec jsonb)"; readonly security: "invoker"; }, { readonly name: "work_decide_many"; readonly args: "p_organization_id uuid, p_decisions jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_has_assignment"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "work_inbox"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false, p_view text DEFAULT 'inbox'::text"; readonly returns: "TABLE(item_id uuid, kind text, origin text, title text, subject_id uuid, subject_kind text, summary text, state text, due_on timestamp with time zone, due_state text, actionable boolean, requested_by uuid, requested_by_name text, at timestamp with time zone, table_id uuid, table_name text, decided_by uuid, decided_by_name text, decided_at timestamp with time zone, outcome text, snoozed_until timestamp with time zone, cleared_at timestamp with time zone, snoozed_count integer, cleared_count integer, undo_seconds integer, undo_refusal text)"; readonly security: "definer"; }, { readonly name: "work_instantiation_shape"; readonly args: "p_organization_id uuid, p_instantiation_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_list"; readonly args: "p_organization_id uuid DEFAULT NULL::uuid, p_flavour text DEFAULT 'mine'::text, p_include_finished boolean DEFAULT false, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0"; readonly returns: "TABLE(record_id uuid, table_id uuid, table_name text, title text, assignee_id uuid, assignee_name text, assignee_user_id uuid, due_on timestamp with time zone, due_state text, status text, terminal boolean, assigned_by uuid, updated_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "work_person"; readonly args: "p_organization_id uuid, p_user_id uuid, p_create boolean DEFAULT true"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "work_record_states"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "TABLE(state_id uuid, name text, sort integer, terminal boolean, is_current boolean, allowed boolean, refusal text)"; readonly security: "definer"; }, { readonly name: "work_relation_kinds"; readonly args: ""; readonly returns: "TABLE(kind text, available boolean, why text)"; readonly security: "invoker"; }, { readonly name: "work_set_state"; readonly args: "p_organization_id uuid, p_record_id uuid, p_state_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_slot_expire"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "integer"; readonly security: "definer"; }, { readonly name: "work_slot_hold"; readonly args: "p_organization_id uuid, p_table_id uuid, p_slot_key text, p_holder text, p_ttl interval DEFAULT '00:15:00'::interval"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_slot_holds"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "TABLE(hold_id uuid, slot_key text, holder text, expires_at timestamp with time zone, expired boolean)"; readonly security: "definer"; }, { readonly name: "work_slot_index_name"; readonly args: "p_table_id uuid"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "work_slot_release"; readonly args: "p_organization_id uuid, p_hold_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "work_slots_declare"; readonly args: "p_organization_id uuid, p_name text, p_slug text, p_home_id uuid DEFAULT NULL::uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_state_id"; readonly args: "p_organization_id uuid, p_table_id uuid, p_value text"; readonly returns: "uuid"; readonly security: "invoker"; }, { readonly name: "work_states"; readonly args: ""; readonly returns: "TABLE(sort integer, name text, terminal boolean, next text[])"; readonly security: "invoker"; }, { readonly name: "work_take_assignment"; readonly args: "p_organization_id uuid, p_table_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_template_declare"; readonly args: "p_organization_id uuid, p_name text, p_graph jsonb"; readonly returns: "uuid"; readonly security: "definer"; }, { readonly name: "work_template_instantiate"; readonly args: "p_organization_id uuid, p_template_id uuid, p_overrides jsonb DEFAULT '{}'::jsonb"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_template_refusal"; readonly args: "p_graph jsonb"; readonly returns: "text"; readonly security: "invoker"; }, { readonly name: "work_template_shape"; readonly args: "p_organization_id uuid, p_template_id uuid"; readonly returns: "jsonb"; readonly security: "definer"; }, { readonly name: "work_templates"; readonly args: "p_organization_id uuid, p_limit integer DEFAULT 100"; readonly returns: "TABLE(template_id uuid, name text, nodes integer, relations integer, created_at timestamp with time zone)"; readonly security: "definer"; }, { readonly name: "work_transition_refusal"; readonly args: "p_organization_id uuid, p_from_state_id uuid, p_to_state_id uuid"; readonly returns: "text"; readonly security: "definer"; }, { readonly name: "work_whose_turn"; readonly args: "p_organization_id uuid, p_table_id uuid, p_include_finished boolean DEFAULT false"; readonly returns: "TABLE(record_id uuid, title text, assignee_id uuid, turn text, due_on timestamp with time zone, state text, status text, terminal boolean)"; readonly security: "definer"; }, { readonly name: "world_reader_may_know_row"; readonly args: "p_organization_id uuid, p_record_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "world_reader_only"; readonly args: "p_organization_id uuid"; readonly returns: "boolean"; readonly security: "definer"; }, { readonly name: "world_reader_reads_public_definition"; readonly args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[]"; readonly returns: "boolean"; readonly security: "definer"; }]; /** The campaign's own knobs, with the value the store resolves them to today. */ declare const STORE_KNOBS: readonly [{ readonly key: "accessible_entity_ids_guard"; readonly value: "true"; readonly type: "boolean"; }, { readonly key: "action_run_records_max"; readonly value: "5000"; readonly type: "integer"; }, { readonly key: "agent_context_value_cap_bytes"; readonly value: "0"; readonly type: "integer"; }, { readonly key: "agent_schema_changes"; readonly value: "\"never_ask\""; readonly type: "string"; }, { readonly key: "ai_column_decision_engine"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "ai_fill_default_rows"; readonly value: "3"; readonly type: "integer"; }, { readonly key: "ai_fill_rows_max"; readonly value: "50"; readonly type: "integer"; }, { readonly key: "ai_fill_try_max"; readonly value: "10"; readonly type: "integer"; }, { readonly key: "archive_confirm_over"; readonly value: "1000"; readonly type: "integer"; }, { readonly key: "automation_catch_up_hours"; readonly value: "48"; readonly type: "integer"; }, { readonly key: "back_links"; readonly value: "true"; readonly type: "boolean"; }, { readonly key: "base_snapshot_keep"; readonly value: "30"; readonly type: "integer"; }, { readonly key: "batch_items_max"; readonly value: "500"; readonly type: "integer"; }, { readonly key: "choice_nudge"; readonly value: "\"ask\""; readonly type: "string"; }, { readonly key: "closed_custom_field_tables"; readonly value: "[\"party\"]"; readonly type: "json"; }, { readonly key: "code_paths_enabled"; readonly value: "true"; readonly type: "boolean"; }, { readonly key: "consumer_chat_seeding_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_checkout_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_context_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_education_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_extension_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_grid_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_retirement_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_saved_ai_outputs_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "consumer_scopes_enabled"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "containment_depth_ceiling"; readonly value: "16"; readonly type: "integer"; }, { readonly key: "copy_stall_passes"; readonly value: "20"; readonly type: "integer"; }, { readonly key: "cross_organization_links"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "data_home_default_kind"; readonly value: "\"all\""; readonly type: "string"; }, { readonly key: "data_home_default_order"; readonly value: "\"updated\""; readonly type: "enum"; }, { readonly key: "data_home_default_scope"; readonly value: "\"all\""; readonly type: "enum"; }, { readonly key: "data_home_default_view"; readonly value: "\"table\""; readonly type: "enum"; }, { readonly key: "decision_undo_seconds"; readonly value: "5"; readonly type: "integer"; }, { readonly key: "decoration_rules_max"; readonly value: "50"; readonly type: "integer"; }, { readonly key: "decorations_max_bytes"; readonly value: "262144"; readonly type: "integer"; }, { readonly key: "document_letterhead"; readonly value: "{}"; readonly type: "json"; }, { readonly key: "document_max_bytes"; readonly value: "1048576"; readonly type: "integer"; }, { readonly key: "enrichment_batch_ceiling"; readonly value: "200"; readonly type: "integer"; }, { readonly key: "enrichment_confidence_floor"; readonly value: "0.6"; readonly type: "number"; }, { readonly key: "enrichment_cost_cap_cents"; readonly value: "2000"; readonly type: "integer"; }, { readonly key: "enrichment_estimate_output_tokens"; readonly value: "200"; readonly type: "integer"; }, { readonly key: "enrichment_sensitivity_ceiling"; readonly value: "\"internal\""; readonly type: "string"; }, { readonly key: "entity_types_guard"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "example_rows_max"; readonly value: "500"; readonly type: "integer"; }, { readonly key: "export_rows_ceiling"; readonly value: "100000"; readonly type: "integer"; }, { readonly key: "external_principal_enabled"; readonly value: "true"; readonly type: "boolean"; }, { readonly key: "field_sensitivity_levels"; readonly value: "{\"edit\": {\"public\": \"edit_content\", \"internal\": \"edit_content\", \"restricted\": \"admin\", \"confidential\": \"admin\"}, \"read\": {\"public\": \"viewer\", \"internal\": \"viewer\", \"restricted\": \"admin\", \"confidential\": \"admin\"}}"; readonly type: "json"; }, { readonly key: "form_draft_days"; readonly value: "30"; readonly type: "integer"; }, { readonly key: "form_draft_max_bytes"; readonly value: "65536"; readonly type: "integer"; }, { readonly key: "form_draft_saves_per_hour"; readonly value: "240"; readonly type: "integer"; }, { readonly key: "form_redirect_domains"; readonly value: "[]"; readonly type: "json"; }, { readonly key: "grid_layout"; readonly value: "{\"mode\": \"auto\", \"wrap\": false, \"row_height\": \"normal\", \"fit_max_columns\": 8, \"freeze_first_column\": false}"; readonly type: "json"; }, { readonly key: "host_run_approval_days"; readonly value: "7"; readonly type: "integer"; }, { readonly key: "inbound_domain"; readonly value: "\"inbound.matrxserver.com\""; readonly type: "string"; }, { readonly key: "inbox_reminder_after_days"; readonly value: "3"; readonly type: "integer"; }, { readonly key: "member_default_level"; readonly value: "\"editor\""; readonly type: "enum"; }, { readonly key: "outside_invite_who"; readonly value: "\"org_admins_and_table_owners\""; readonly type: "string"; }, { readonly key: "page_size_ceiling"; readonly value: "1000"; readonly type: "integer"; }, { readonly key: "protected_field_rules"; readonly value: "{\"hr_employee\": {\"arm\": \"hr.arm_write\", \"rule\": \"hr.custom_field_access\", \"readers\": [{\"field\": \"subject\"}, {\"capability\": \"hr.identity.read\"}, {\"capability\": \"hr.working_record.write\"}, {\"level\": \"editor\", \"capability\": \"hr.identity.write\"}]}, \"hr_candidate\": {\"arm\": \"hr.arm_write\", \"rule\": \"hr.custom_field_access\", \"readers\": [{\"field\": \"subject\"}, {\"capability\": \"hr.identity.read\"}, {\"capability\": \"hr.working_record.write\"}, {\"level\": \"editor\", \"capability\": \"hr.identity.write\"}]}, \"hr_position_assignment\": {\"arm\": \"hr.arm_write\", \"rule\": \"hr.custom_field_access\", \"readers\": [{\"field\": \"subject\"}, {\"capability\": \"hr.identity.read\"}, {\"capability\": \"hr.working_record.write\"}, {\"level\": \"editor\", \"capability\": \"hr.identity.write\"}]}, \"hr_training_assignment\": {\"arm\": \"hr.arm_write\", \"rule\": \"hr.custom_field_access\", \"readers\": [{\"field\": \"subject\"}, {\"capability\": \"hr.identity.read\"}, {\"capability\": \"hr.working_record.write\"}, {\"level\": \"editor\", \"capability\": \"hr.identity.write\"}]}}"; readonly type: "json"; }, { readonly key: "provenance_retention_days"; readonly value: "30"; readonly type: "number"; }, { readonly key: "retype_preview_bytes_max"; readonly value: "2000000"; readonly type: "integer"; }, { readonly key: "retype_preview_values_max"; readonly value: "100"; readonly type: "integer"; }, { readonly key: "row_action_steps_max"; readonly value: "60"; readonly type: "integer"; }, { readonly key: "row_actions_max"; readonly value: "24"; readonly type: "integer"; }, { readonly key: "sandbox_message_bytes"; readonly value: "65536"; readonly type: "integer"; }, { readonly key: "sandbox_org_components"; readonly value: "true"; readonly type: "boolean"; }, { readonly key: "scope_members_admitted"; readonly value: "true"; readonly type: "boolean"; }, { readonly key: "sheets_write_through"; readonly value: "true"; readonly type: "boolean"; }, { readonly key: "signup_provisioning_guard"; readonly value: "false"; readonly type: "boolean"; }, { readonly key: "stage_rule_enforcement"; readonly value: "\"refuse\""; readonly type: "enum"; }, { readonly key: "table_record_ceiling"; readonly value: "150000"; readonly type: "integer"; }, { readonly key: "table_sync_rows_max"; readonly value: "20000"; readonly type: "integer"; }, { readonly key: "table_webhooks_max"; readonly value: "10"; readonly type: "integer"; }, { readonly key: "time_zone"; readonly value: "\"UTC\""; readonly type: "string"; }, { readonly key: "value_max_bytes"; readonly value: "100000"; readonly type: "integer"; }, { readonly key: "view_record_order_max"; readonly value: "20000"; readonly type: "integer"; }, { readonly key: "week_start"; readonly value: "\"monday\""; readonly type: "enum"; }, { readonly key: "world_publish_enabled"; readonly value: "true"; readonly type: "boolean"; }]; /** * Every SQLSTATE the store's own function bodies raise, with the functions that * raise it. This is the list the client's refusal mapper is checked against: a * code the store can raise and the package cannot name is a hole, and the * real-door suite says so by name. */ declare const STORE_REFUSAL_CODES: readonly [{ readonly code: "02000"; readonly raised_by: "_checklist_instantiate,_entity_change_file,_org_admin_table_gate,_portal_config_judge,_portal_invite_payload,_read_record_with,_record_restore_one,_share_write_person,_table_share_invite_payload,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_restore,dashboard_run,doc_letterhead,doc_render_body,doc_render_delete,doc_render_document,doc_render_read,doc_render_restore,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_restore,doc_template_save,enrich_pin,entity_back_links,entity_custom_value_apply,entity_field_protect_arman_explicitly_approved,entity_field_retire,entity_field_update,entity_record_read,entity_row_propose,entity_row_write,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,field_choice_usage,field_duplicate,field_restore,field_retype_preview,field_update_rehoming_choices,form_archive,form_response_update,form_restore,form_set_password,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,pick_list_update,portal_archive,portal_card,portal_declare,portal_form,portal_form_submit,portal_invite,portal_invite_accept,portal_preview,portal_principal_bind,portal_restore,portal_revoke,record_change_many,record_delete,record_restore_preview,record_row_controls,record_row_controls_set,record_table,record_update,record_write_graph_superseding,relation_halves_repair,relation_restore,relation_uncarry,rule_restore,set_table_confidential_arman_explicitly_approved,share_access,share_grant,share_lane_set,share_people,share_revoke,table_agent_writable_set,table_archive,table_archive_deliberately,table_restore,table_row_defaults,table_row_defaults_apply,table_row_defaults_set,table_row_label,table_row_label_set,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,template_from_tables,visibility_as_of,work_approval_decide,work_approval_host_run,work_approval_host_run_done,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state"; }, { readonly code: "0A000"; readonly raised_by: "checklist_step_complete,entity_custom_value_apply,entity_row_write,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,read_records_keyset,rule_eval,rule_filter_node_sql,template_restore,work_assign"; }, { readonly code: "22003"; readonly raised_by: "context_resolve"; }, { readonly code: "22004"; readonly raised_by: "_entity_change_file,_entity_custom_fields_guard,_io_outbox_claim,_org_admin_table_gate,_portal_config_judge,_record_restore_one,_share_write_person,_value_envelope,actor_word,agg_assert_key,agg_compare_windows,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,assert_scope_door,base_copy_finish,base_move,booking_declare,capture_submit,checklist_declare,context_resolve,context_template_define,context_type_write,copy_table_extras,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,entity_field_protect_arman_explicitly_approved,entity_row_propose,entity_row_write,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_look_options,form_response_update,form_submit,home_add,inbox_snooze,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_outbox_release_claimed,io_outbox_subscribe,io_restore,migrate_choice_keys,migrate_purge,migrate_purge_hard,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_form_submit,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_aggregate_as_of,record_delete,record_reparent,record_resolve,record_restore,record_update,record_upsert,record_write,record_write_graph,record_write_graph_superseding,record_write_many,relation_carry,relation_halves_repair,relation_own,row_template_declare,rule_declare,set_table_confidential_arman_explicitly_approved,share_grant,subscription_declare,table_agent_writable_set,table_archive,table_archive_deliberately,table_declare,table_duplicate,table_move,table_restore,table_share_outside_grant,table_share_outside_invite,template_declare,value_restore,view_declare,view_designate,view_look_read,view_look_set,whole_value_complete,work_approval_decide,work_approval_host_run,work_approval_request,work_template_declare"; }, { readonly code: "22007"; readonly raised_by: "_template_date,agg_parse_moment,dashboard_window_sql"; }, { readonly code: "22012"; readonly raised_by: "formula_eval,rule_eval,rule_sql_op"; }, { readonly code: "22023"; readonly raised_by: "_action_check,_automation_advance,_automation_cond_norm,_automation_step,_booking_availability,_ctx_reference_value_holds,_ctx_store_scope,_ctx_table_template_field_holds,_ctx_tree_part,_decorations_check,_entity_change_file,_entity_custom_fields_guard,_form_flow_judge,_form_look_judge,_fx_date,_fx_datetime_parse,_fx_dl,_fx_ext,_fx_listop,_fx_num,_fx_recprop,_fx_regex,_fx_unit,_fx_unit_norm,_fxp_level,_fxp_resolve,_fxp_tokens,_nfx_arglist,_nfx_bin,_nfx_call,_nfx_expr,_nfx_primary,_nfx_tokens,_nfx_unary,_portal_config_judge,_rule_eval_seated,_schedules_stand_down,_stamp_check,_table_dimensions_check,_take_op_id,_template_bind,_template_install_core,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,_write_via_mark,action_run,actor_word,agent_change_trust,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,archive_guard_decide,archive_hold_answer,automation_test,base_activity,base_move,booking_busy_set,booking_declare,booking_sms_consent,button_press,containment_parent,context_scope_archive,context_scope_write,context_scopes,context_template_define,context_type_archive,context_type_write,context_values,count_records_archived,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,data_home,data_home_changed_by,doc_render_body,doc_render_write,doc_signature_write,drill_resolve,enrich_data_source,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_back_links,entity_custom_value_apply,entity_fields_across,entity_read_mask,entity_reference_rows,entity_reference_search,entity_reference_words,entity_row_write,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_access,field_access_set,field_declare_many,field_duplicate,field_history,field_notify_on_assign,field_update,filter_list_op,find_duplicates,form_declare,form_draft_save,form_response_update,form_set_password,form_visit,formula_eval,formula_history,formula_parse,formula_preview,formula_translate_notion,grid_layout_check,hub_changed_by,hub_changed_by_many,inbound_domain,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,listed_predicate_sql,member_records_take_over,migrate_merge,migrate_reclass,my_levels,my_levels_across,organization_clear,page_size,pick_list_create,pick_list_update,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,publish_bind,query_by_coordinates,query_rollup,query_rollup_sum,read_records_archived,read_records_in_view_order,read_records_keyset,read_records_page,record_aggregate_as_of,record_change_many,record_drill,record_filter_sql,record_row_controls_set,record_search_sql,record_update,record_upsert,record_write_graph,record_write_graph_superseding,record_write_many,records_search,relation_carry,relation_names_match,relation_reverse_field,relation_reverse_set,relative_window_for_reader,relative_window_resolve,reverse_links_many_fields,row_template_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,set_table_confidential,set_table_organization,share_grant,share_lane_set,subscription_declare,table_access_setup_set,table_archive_deliberately,table_copy_sync,table_create,table_ensure,table_find,table_find_many,table_from_example,table_move,table_row_defaults_set,table_row_label_set,table_rules,table_share_outside_grant,table_sync,table_sync_cell,table_sync_settings_set,table_template_declare,table_transfer_owner,table_webhook_declare,template_declare,template_from_tables,template_install_claim,template_install_note,template_upgrade,templates,view_declare,view_designate,view_keys_check,view_look_set,view_record_order_set,visibility_as_of,where_lists_live,where_tables_live,work_approval_host_run,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold"; }, { readonly code: "23502"; readonly raised_by: "synced_source_save"; }, { readonly code: "23503"; readonly raised_by: "_action_check,_automation_advance,_automation_flip,_automation_step,_automation_time_item,_automation_view_rule,_booking_availability,_checklist_instantiate,_containment_guard,_ctx_store_value,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_form_flow_judge,_pipeline_stage_key,_record_rule_uses,action_declare,action_run,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,automation_declare,automation_revision_restore,automation_revisions,automation_runs,automation_test,automations,autonumber_backfill,booking_busy_set,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,booking_sms_consent,button_press,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,field_make_automatic,field_notify_on_assign,field_update,form_declare,form_draft_save,form_response_update,form_results,form_submit,grid_layout,home_add,inbound_declare,inbound_mail_land,inbound_set,io_comment_write,io_import_begin,io_import_finish,io_import_report,io_import_rows,io_proposal_accept,migrate_demote,migrate_promote,migrate_purge_hard,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,read_records_page,record_applicability,record_reparent,record_write_graph_superseding,relation_carry,relation_own,resolve_first_match,row_template_declare,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,subscription_mute,subscription_preview,table_decorate,table_dimensions_set,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_designate,view_look_set,view_record_order_set,whole_value_complete,work_set_state,work_take_assignment,work_template_instantiate"; }, { readonly code: "23505"; readonly raised_by: "_booking_seat_take,_ctx_store_item,_ctx_store_scope,_ctx_store_type,_portal_config_judge,_restore_guard_one,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,field_restore,field_update,form_restore,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,relation_restore,table_share_outside_resend,work_approval_decide,work_slot_hold"; }, { readonly code: "23514"; readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_ctx_scope_parent_holds,_ctx_store_item,_ctx_table_template_field_holds,_ctx_value_fits_its_scope,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_choice_keys,_entity_custom_fields_guard,_field_choices_save,_field_class_guard,_field_default_fitted,_field_document_for,_field_kind_shape_ok,_field_shape_guard,_field_type_parity_guard,_kind_value_ok,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_restore_one,_record_rule_uses,_record_source_key_is_record,_relation_halves_agree,_relation_kernel_targets,_resolve_choice_words,_rule_shape_guard,_rule_topology_guard,_store_relation_edge_names_its_field,_table_columns_word_guard,_table_shape_guard,_undeclared_key_guard,_value_envelope,_with_display,_work_shape_guard,_workdoors_approval_guard,action_run,assert_columns_are_defined,assert_entity_is_organization_scoped,booking_declare,capture_publish,capture_sheet_declare,checklist_declare,checklist_step_complete,dashboard_restore,doc_sign,doc_signature_write,doc_template_restore,doc_template_save,entity_field_protect_arman_explicitly_approved,entity_field_retire,entity_field_update,entity_records_find,entity_table,entity_value_write,field_declare,field_make_automatic,field_restore,field_retire,field_update,field_update_rehoming_choices,form_restore,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_reparent,record_update_adding_choices,record_upsert,record_write_graph,record_write_graph_superseding,relation_carry,relation_halves_repair,relation_own,relation_restore,rollup_value,row_template_declare,rule_restore,status_groups_keyed,status_groups_of,table_access_setup_set,table_from_example,table_restore,template_upgrade,validate_value_envelope,validate_values,whole_value_complete,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate"; }, { readonly code: "42501"; readonly raised_by: "_agent_change_gate,_computed_door_org,_context_copy_fence,_copy_evaluation_note,_copy_evaluation_reimage,_copy_in_progress_guard,_doc_render_immutable,_doc_signature_immutable,_entity_change_file,_entity_custom_fields_guard,_field_definition_write,_field_write_door,_io_outbox_server_only,_not_a_member_refusal,_org_admin_table_gate,_portal_config_judge,_portal_principal_here,_read_record_with,_rule_definition_write,_share_write_person,_stamp_token,_store_door,_table_dimensions_infer,_table_duplicate_step,_table_shape_guard,_template_bind,_template_call,_template_install_core,_value_envelope,_withdraw_approvals_for_batch,_workdoors_approval_guard,admin_all_tables,agent_change_trust,agent_table_claim,agg_fields_readable_assert,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_may_know_table,assert_organization_admin,assert_scope_door,assert_store_door,automation_app_watch,automation_claim_pending,automation_note,automation_resume,automation_step_mark,automation_webhook_receive,base_copy_finish,base_move,base_move_access_kept,base_move_remove_access,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,computed_refresh,context_item_archive,context_item_restore,context_item_write,context_resolve,context_scope_archive,context_scope_restore,context_scope_write,context_tags_set,context_type_archive,context_type_restore,context_type_write,conversation_scope_bind,conversation_scope_unbind,copy_table_extras,count_records_archived,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_custom_value_apply,entity_field_declare,entity_field_retire,entity_field_update,entity_row_propose,entity_row_write,entity_value_write,external_write_through,field_access_set,field_restore,field_update,form_declare,form_draft_save,form_public_asks,form_response_update,form_set_password,form_submit,formula_history,inbound_mail_land,inbox_clear,inbox_snooze,inbox_unclear,inbox_unsnooze,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,member_personal_tables,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,my_levels_across,organization_clear,organization_contents,pick_list_get,pick_list_update,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,portal_self_signup,promote_table,protected_matches,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_keyset,read_records_matching,read_records_page,record_delete,record_follow_set,record_row_controls,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,reverse_links_many,scope_table_provision,share_grant,share_lane_set,space_templates,subscription_mute,subscription_preview,table_access_setup_set,table_agent_writable_set,table_archive_deliberately,table_copies_in_progress,table_copy_sync,table_duplicate,table_duplicate_continue,table_kind_facts,table_level_facts,table_move,table_row_defaults_apply,table_row_defaults_set,table_row_label_set,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_sync,table_sync_cell,table_templates,table_transfer_owner,table_webhook_declare,template_declare,template_from_tables,template_instances,template_restore,template_upgrade,templates,view_declare,view_look_set,view_record_order_set,visibility_as_of,where_lists_live,where_tables_live,whole_value_complete,work_approval_decide,work_approval_host_run,work_approval_host_run_done,work_approval_read,work_approval_request,work_person"; }, { readonly code: "42703"; readonly raised_by: "entity_table,portal_declare"; }, { readonly code: "42883"; readonly raised_by: "_template_call"; }, { readonly code: "42P17"; readonly raised_by: "_field_reads_what_it_reads,far_value"; }, { readonly code: "53400"; readonly raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field"; }, { readonly code: "54000"; readonly raised_by: "_table_dimensions_check,action_run,comment_counts,data_home_changed_by,form_draft_save,hub_changed_by,hub_changed_by_many,pipeline_move_many,read_records_page,record_change_many,record_headers,relation_names_match,reverse_links_many,table_copy_sync,table_decorate,table_from_example,table_map_fields,table_row_counts,table_sync,table_webhook_declare,view_record_order_set,work_decide_many"; }, { readonly code: "54001"; readonly raised_by: "record_delete"; }, { readonly code: "55000"; readonly raised_by: "_code_depends_refuse,_io_outbox_claim,_template_install_core,base_move,entity_field_protect_arman_explicitly_approved,inbox_clear,inbox_snooze,io_outbox_release,io_outbox_subscribe,table_duplicate,table_ensure,table_move,template_restore,template_upgrade,work_approval_decide,work_approval_host_run_done,work_approval_request"; }, { readonly code: "57014"; readonly raised_by: "formula_eval"; }, { readonly code: "MXD01"; readonly raised_by: "_held_change_refusal"; }, { readonly code: "MXD02"; readonly raised_by: "entity_row_propose"; }, { readonly code: "MXPV1"; readonly raised_by: "field_retype_preview"; }, { readonly code: "P0001"; readonly raised_by: "_guest_record_ceiling,action_run,context_scope_write"; }, { readonly code: "P0002"; readonly raised_by: "_template_install_core,inbox_clear,inbox_snooze,publish_bind,template_archive,template_install_claim,template_install_note,template_keep,template_restore,template_uninstall,template_upgrade,whole_value_complete"; }, { readonly code: "P0R01"; readonly raised_by: "template_upgrade"; }, { readonly code: "PT409"; readonly raised_by: "entity_row_write,has_visibility_at,record_change_many,record_update,record_upsert,record_write_graph_superseding,table_move,whole_value_complete"; }, { readonly code: "PT428"; readonly raised_by: "_record_rule_uses"; }]; /** `platform.entity_types` — the registered tokens a Table or relation may name. */ declare const ENTITY_TOKENS: readonly ["access_delta_probe", "access_delta_run", "access_request", "access_shadow_log", "access_version", "access_version_event", "account_addon", "account_closure", "account_facts", "acquisition_block", "activity", "admin_audit_log", "admin_email_log", "admin_markdown_sample", "admin_user", "admin_user_owned_resources_cache", "admission_config", "agent", "agent_card", "agent_definition_version", "agent_drift_alert", "agent_exemplar", "agent_mandate_note", "agent_prompt_block", "agent_prompt_block_variant", "agent_prompt_remediation", "agent_required_flag_change", "agent_run", "agent_run_stage", "agent_schedule", "agent_schedule_claim", "agent_shortcut", "agent_surface_binding", "agent_template", "agent_term_list", "agent_test_result", "agent_test_run", "agent_usage", "agent_user_kv", "ai_api", "ai_calls", "ai_device_model_file", "ai_device_model_root", "ai_endpoint", "ai_media_generation_cache", "ai_model", "ai_model_alias", "ai_model_artifact", "ai_model_candidate", "ai_model_presentation", "ai_model_upstream", "ai_model_variant", "ai_model_verification_run", "ai_model_want", "ai_offering", "ai_person_model_want", "ai_provider", "ai_request_latency", "ai_runtime", "ai_runtime_build", "ai_runtime_compat", "ai_setting", "ai_setting_profile", "ai_translation_cell", "ai_usage_execution_facts", "ai_usage_executions", "ai_usage_hourly", "ai_usage_hourly_watermark", "analysis_result", "anon_form", "anon_form_password", "anon_form_visit", "anon_function_birth_grandfather", "anon_hit", "anon_inbound", "anon_replay", "anon_submission", "anon_token", "api_field_warning", "api_request_log", "app", "app_config", "app_config_history", "app_definition_version", "app_error", "app_execution", "app_instance", "app_log", "app_log_hourly", "app_log_hourly_watermark", "app_log_lines", "app_log_muted_pattern", "app_log_norm_exception", "app_log_requests_hourly", "app_rate_limit", "app_setting", "app_sync_status", "applet_visitor_binding", "approach", "artifact", "assessment", "assessment_item", "assessment_result", "assignment_session", "assist", "assist_producer_policy", "assist_producer_policy_history", "association_type", "assurance_level", "attempt", "attention_audience_rule", "attention_audit", "attention_item_state", "attention_showing", "audit_broken_functions", "audit_canonical_findings", "audit_exemption", "audit_function_deps", "audit_function_runtime_probe", "audit_m2m_candidates", "audit_refresh_log", "audit_stale_registry", "audit_unregistered_candidates", "automation_delivery", "automation_fired", "base_entity_template", "batch_cost_event", "batch_provider_batch", "batch_work_item", "billing_capability", "billing_capability_limit", "billing_ci_package_build", "billing_connect_account", "billing_coupon", "billing_coupon_redemption", "billing_customer", "billing_external_call_vendor", "billing_free_network_counter", "billing_free_period_grant", "billing_free_use_counter", "billing_hard_cost_reconciliation", "billing_held_run", "billing_org_payment_account", "billing_payment", "billing_payment_ask", "billing_plan", "billing_plan_limit", "billing_price", "billing_product", "billing_provider_balance_snapshot", "billing_spend_alarm", "billing_spend_alarm_occurrence", "billing_spend_approval", "billing_spend_guardrail", "billing_spend_hold", "billing_stripe_event", "billing_subscription", "billing_usage_ledger", "billing_usage_reset", "billing_user_plan", "block_state", "board", "browser_account_binding", "browser_action_event", "browser_authenticator_window", "browser_capture", "browser_control_request", "browser_handoff", "browser_login_attempt", "browser_login_recipe", "browser_profile", "browser_profile_checkpoint", "browser_run", "browser_site_observation", "browser_site_policy", "browser_stream_ticket", "build_lock", "calendar_event", "campaign_watch_ramp_gate_run", "campaign_watch_switch_outbox", "campaign_watch_switch_window", "canvas_comment", "canvas_comment_like", "canvas_item", "canvas_item_state", "canvas_like", "canvas_score", "canvas_view", "capture_window", "carrying_rule", "catalog_entries_history", "catalog_entry", "category", "change_item", "change_job", "change_job_row", "change_plan", "change_type_default", "change_work", "chat_user_usage_summary", "citations", "class_purchase", "classifier_revision_ledger", "client_callable_door", "client_callable_door_retirement", "client_excluded_column_unregistered", "cmp_entry", "cmp_feedback", "code_file", "code_folder", "code_repository", "coding_session", "coding_session_entry", "collab_checkpoint", "collab_op", "collab_room", "comment", "commerce_asset_allocation", "commerce_asset_grading", "commerce_asset_identifier", "commerce_asset_lot_event", "commerce_asset_mandate_result", "commerce_asset_price_factor", "commerce_asset_reshoot_request", "commerce_asset_review", "commerce_asset_unknown", "commerce_certified_printer", "commerce_cloud_sync_connection", "commerce_ebay_business_policy", "commerce_ebay_category", "commerce_ebay_category_aspect", "commerce_ebay_category_tree", "commerce_ebay_custom_policy", "commerce_ebay_inventory_item", "commerce_ebay_inventory_item_group", "commerce_ebay_inventory_item_group_member", "commerce_ebay_inventory_location", "commerce_ebay_listing", "commerce_ebay_marketplace_policy", "commerce_ebay_media_asset", "commerce_ebay_notification_destination", "commerce_ebay_notification_event", "commerce_ebay_notification_subscription", "commerce_ebay_notification_topic", "commerce_ebay_offer", "commerce_ebay_order", "commerce_ebay_order_line_item", "commerce_ebay_shipping_fulfillment", "commerce_ebay_store_category", "commerce_human_correction", "commerce_intake_artifact", "commerce_intake_asset", "commerce_intake_batch", "commerce_label_batch", "commerce_label_code", "commerce_marketplace_account", "commerce_marketplace_account_deletion_audit", "commerce_marketplace_api_call", "commerce_marketplace_rate_budget", "commerce_marketplace_site", "commerce_marketplace_sync_run", "commerce_prediction_outcome", "commerce_print_order", "commerce_product", "commerce_product_channel_ref", "commerce_product_media", "commerce_product_variant", "commerce_recall_audit", "communication_calendar_selected_snapshot_state", "communication_channel_readiness", "comparison_set", "component_group", "computed_org_mark", "computed_reader_cols", "computed_reader_judgement", "config_manifest", "config_read_bucket", "contact_medium", "contact_submission", "content_certification", "content_ir_converter_definition", "content_ir_converter_run", "content_ir_kind", "content_ir_kind_component", "content_ir_kind_component_incident", "content_ir_kind_component_layer", "content_ir_kind_conformance", "content_ir_kind_edge", "content_ir_kind_example", "content_ir_kind_instance", "content_ir_kind_surface", "content_ir_render_inspection", "content_lane", "context_access_log", "context_item", "context_item_suggestion", "context_item_value", "context_value_refs", "conversation", "conversation_value", "courts", "credential_attachment", "credential_item", "credential_mutation_receipt", "crm_address", "crm_affiliation", "crm_blocklist_entry", "crm_contact_candidate", "crm_deal", "crm_deal_stage_event", "crm_enrichment_call", "crm_interaction", "crm_merge_candidate", "crm_outreach_list", "crm_outreach_list_member", "crm_party_merge", "crm_party_research", "crm_registry_ingest_run", "crm_registry_source", "crm_sending_claim", "crm_sending_event", "crm_sending_identity", "crm_sending_identity_check", "crm_sending_policy", "custom_agent_table_origin", "custom_agent_table_trust", "custom_agg_digest_checked", "custom_anon_form_draft", "custom_base", "custom_base_snapshot", "custom_entity_definition", "custom_field_definition", "custom_field_target", "custom_inbox_item_state", "custom_io_outbox_consumer", "custom_io_outbox_consumption", "custom_portal", "custom_portal_principal", "custom_portal_table", "custom_record", "custom_share_tails_mine_repair", "custom_synced_source", "custom_template", "custom_template_install", "custom_whole_value_parked", "cx_agent_memory", "cx_agent_plan", "cx_agent_task", "cx_code_edit", "cx_code_message_file", "cx_conversation_documents", "cx_media", "cx_observational_memory", "cx_observational_memory_event", "cx_pending_injection", "cx_request", "cx_request_snapshot", "cx_request_values", "cx_tool_trace", "cx_user_request", "cx_user_todo", "dashboard_saved_view", "data_rights_event", "data_store", "data_store_members", "dataset", "ddl_guard_log", "deck_suggestion", "definer_class_exemption", "definer_client_grant_grandfather", "definer_grant_baseline", "deprecated_relation", "derive_run", "desktop_app_account", "desktop_app_instance", "desktop_app_profile", "dev_login_audit", "device_handoff", "dict_entry", "dict_provider_publication", "dict_setting", "dm_conversation", "dm_message", "dm_participant", "dm_session_member", "doc_render", "doc_signature", "dockets", "document", "document_version", "domain_classification", "edge_payload_kind", "egress_device", "egress_pairing", "egress_ticket", "emails", "embedding_cache", "embeddings_google_gemini_2_1536", "embeddings_oai_3_small_1536", "embeddings_voyage_4_large_1024", "embeddings_voyage_code_3_1024", "endpoint_family_sweep_state", "engine_owner_task", "entity_grant", "entity_protected_value", "entity_protected_value_version", "entity_relationship", "entity_type", "esign_campaign", "esign_campaign_member", "esign_consent_disclosure", "esign_envelope", "esign_envelope_certificate", "esign_envelope_document", "esign_envelope_draft", "esign_envelope_event", "esign_envelope_external_ref", "esign_envelope_signer", "esign_provider", "esign_provider_binding", "esign_saved_signature", "esign_signing_key", "esign_template", "execution_event_cursor", "extension_auth_code", "external_api_reservation", "external_conversation", "external_delivery_event", "external_inbox", "external_link", "external_message", "external_provider_receipt", "external_source", "extract_sweep_state", "fc_card", "fc_detail", "fc_set", "feature_doc", "feature_knob", "feedback_comments", "feedback_user_messages", "field_component", "file", "file_analysis", "file_entities", "file_overrides", "file_page_annotations", "file_pages", "file_rag_job", "file_template", "file_version", "files_account_tier", "files_machine_written_prefix", "files_sync_mapping", "files_user_account", "flashcard_data", "flashcard_history", "flashcard_sets", "flexible_data", "folder", "function_contract", "game_badge", "game_result", "game_room", "global_execution", "global_execution_checkpoint", "global_execution_control", "global_execution_event", "global_meter_entry", "global_origin", "global_request", "google_document", "growth_loop_event", "growth_loop_run", "growth_loop_stage_run", "guardian_link", "guest_conversion_audit", "guest_execution_log", "guest_executions", "guided_checklist_run", "heatmap_save", "hindsight_enrollment", "hindsight_finding", "hindsight_regression_case", "hindsight_replay", "hindsight_replay_step", "hindsight_review", "hr_access_audit", "hr_access_role", "hr_accommodation_request", "hr_ai_evidence", "hr_alert_routing_rule", "hr_application", "hr_approval_authority", "hr_approval_delegation", "hr_asset", "hr_asset_assignment", "hr_attendance_exception", "hr_auto_close_rule", "hr_availability", "hr_background_check", "hr_benefits_event", "hr_calculation_snapshot", "hr_candidate", "hr_candidate_conversion", "hr_candidate_message", "hr_careers_portal", "hr_checklist_item", "hr_checklist_run", "hr_checklist_template", "hr_checklist_template_item", "hr_compensation", "hr_corrective_action", "hr_course", "hr_course_version", "hr_credential", "hr_crew", "hr_deduction_code", "hr_department", "hr_derived_grant", "hr_disposition_event", "hr_earning_code", "hr_eeo_response", "hr_emergency_contact", "hr_employee", "hr_employee_private", "hr_employer_profile", "hr_employment", "hr_employment_pin", "hr_engagement", "hr_establishment", "hr_external_identity", "hr_field_policy", "hr_goal", "hr_holiday", "hr_holiday_calendar", "hr_i9", "hr_i9_document", "hr_incident", "hr_incident_party", "hr_interview", "hr_interview_kit", "hr_job_title", "hr_jurisdiction", "hr_jurisdiction_rule", "hr_jurisdiction_rule_class", "hr_jurisdiction_rule_org_decision", "hr_jurisdiction_rule_test", "hr_kiosk_device", "hr_kiosk_session", "hr_labor_target", "hr_leave_case", "hr_leave_enrollment", "hr_leave_ledger", "hr_leave_policy", "hr_leave_request", "hr_legal_hold", "hr_legal_hold_item", "hr_location", "hr_new_hire_report", "hr_offer", "hr_opening", "hr_overtime_alert", "hr_overtime_alert_rule", "hr_overtime_preapproval", "hr_pay_group", "hr_pay_period", "hr_pay_period_employment", "hr_payroll_export", "hr_payroll_export_line", "hr_position_assignment", "hr_posting", "hr_posting_publication", "hr_provider_binding", "hr_provider_event", "hr_provisioning_result", "hr_punch", "hr_recalculation_batch", "hr_record_class", "hr_records_request", "hr_reference_check", "hr_reporting_line", "hr_requisition", "hr_restricted_note", "hr_retention_rule", "hr_review", "hr_review_cycle", "hr_review_peer_nomination", "hr_review_response", "hr_review_template", "hr_role_assignment", "hr_schedule", "hr_schedule_change", "hr_schedule_guidance", "hr_schedule_template", "hr_schedule_template_shift", "hr_scorecard", "hr_separation", "hr_shift", "hr_shift_claim", "hr_staffing_requirement", "hr_survey", "hr_survey_invitation", "hr_survey_question", "hr_survey_response", "hr_tax_registration", "hr_tax_withholding", "hr_time_adjustment", "hr_training_assignment", "hr_training_attempt", "hr_transcript_entry", "hr_verification_letter_request", "hr_work_interval", "hr_workflow_binding", "hr_workflow_decision", "hr_workflow_definition", "hr_workflow_event", "hr_workflow_failure", "hr_workflow_flow_type", "hr_workflow_instance", "hr_workflow_step", "hr_workflow_step_definition", "hr_workweek", "html_extraction", "iam_access_audit", "iam_access_setup", "iam_api_key", "iam_emergency_door_request", "iam_oauth_app", "iam_org_availability_key", "iam_org_domain", "iam_org_domain_route", "iam_publish_binding", "iam_publisher_verification", "iam_read_lane_v2_rollout", "iam_record_seat_change", "iam_sign_in_event", "iam_world_namespace", "iam_world_publish_admission", "idempotency", "industry", "industry_curator", "infra_status", "ingest_runs", "integration_connection", "integration_connection_resource", "interview_decision_interview", "interview_decision_question", "interview_document_revision", "interview_hole", "interview_question", "interview_session", "interview_turn", "invitation", "invitation_code", "invitation_request", "io_comment", "io_contract", "io_import", "io_outbox", "item", "item_mastery", "judge_verdict", "jurisdiction_policy", "keyword_classification_queue", "kg_alert", "kg_chunk_entities", "kg_chunks", "kg_clusters", "kg_edges", "kg_entities", "kg_entity_aliases", "kg_suggestion_ack", "kg_sweep_queue", "kg_sweep_run", "kg_sweep_state", "kg_value_match", "knob_override", "knob_override_audit", "knob_rung_lock", "knob_scope_kind", "knob_write_door", "league_membership", "learn_doc", "library_doc", "lifecycle_archive", "lifecycle_archive_row", "lifecycle_audit", "lifecycle_entity_plan", "lifecycle_map_build", "lifecycle_reference_map", "lifecycle_run", "lifecycle_tier_ledger", "location", "mandate", "mandate_advance_batch_row", "mandate_binding", "mandate_candidate", "mandate_candidate_run", "mandate_candidate_run_payload", "mandate_goal_clauses", "mandate_observation", "mandate_proposal", "mandate_readiness_verdict", "mandate_reference", "mandate_scan", "mandate_treatment", "marketing_initiative", "masterwork_corpus_item", "masterwork_run", "masterwork_run_kind", "masterwork_source", "math_course_structure", "math_problem", "matrx_action_ledger", "mcp_config", "mcp_server", "mcp_user_conn", "media_capture_handoff", "media_catalog_setting", "media_library_item", "media_selection_item", "media_selection_job", "media_source_library", "meet_call_invite", "meet_chat_message", "meet_connection", "meet_invitee", "meet_meeting", "meet_note", "meet_occurrence_override", "meet_participant", "meet_recording", "meet_session", "meet_transcript_segment", "membership", "membership_grant", "memory_trial", "memory_trial_step", "merge_field_provenance", "message", "message_template", "message_template_detail", "meta_excluded_schema", "meta_table_stats_history", "metadata_reserved_keys", "microservice_project", "migration_log", "mtx_media_heal_queue", "mtx_public_url_guard", "ner_shadow", "note", "note_folder", "notification", "notification_channel_preference", "notification_event_override", "notification_event_type", "notification_preference", "notification_submission", "notify_outsider_door_baseline", "oauth_handoff_claim", "opinion_clusters", "opinions", "ops_auth_lock_watchdog_log", "ops_check_item", "ops_check_run", "ops_db_host_sample", "ops_issue_class", "ops_issue_event", "ops_perf_client_event", "ops_perf_sample", "ops_perf_statement_snapshot", "ops_proof_check", "ops_proof_run", "ops_proof_scenario", "ops_source_read_cache", "ops_test_replay_cache", "org_admin_audit", "org_change_policy", "org_chart_publication", "org_context_ledger", "org_industries", "org_member_control", "org_module_config", "org_move_txn", "org_plan", "org_sweep_list", "organization", "organization_preferences", "organization_visibility_version", "output_feedback", "outreach_acceptance", "page_extraction_job", "page_extraction_page_run", "page_extraction_results", "page_extraction_runs", "page_intent_queue", "page_mapping_queue", "page_vitals", "part_config", "part_config_sub", "party", "party_contact_point", "passkey_credential", "pb_claim_appeals_fd31de", "pb_insurance_claims_fd31de", "pc_article", "pc_episode", "pc_show", "pc_studio_run", "pc_studio_run_asset", "pdf_consolidation_log", "pdf_redaction_audit", "pdf_redaction_key_escrow", "permission_grant", "personal_data_column", "plan_cms_fill_item", "plan_cms_fill_job", "plan_entity", "plan_node", "plan_node_artifact", "plan_node_step", "plan_profile", "platform_action_request", "platform_actor_session", "platform_actor_token", "platform_actor_token_event", "platform_class_approval_by_arman", "platform_class_approval_by_org_admin", "platform_continued_access", "platform_cutover_census_run", "platform_cutover_evaluation_replaced", "platform_cutover_evaluation_write", "platform_cutover_seam", "platform_cutover_seam_measure", "platform_cutover_seam_press", "platform_dated_change", "platform_doors_only_pending_cutover", "platform_google_calendar_event_create_intent", "platform_google_task_create_intent", "platform_hidden_item", "platform_kernel_fingerprint_record", "platform_org_knob_override", "platform_outcome_event", "platform_outsider_consumer", "platform_provision_base_contract_pending", "platform_reachability", "platform_reachability_rebuild_pending", "platform_realtime_topic_prefix", "platform_reference_category", "platform_reference_declaration", "platform_repo", "platform_saved_view", "platform_schema", "platform_secure_delivery", "platform_share_link", "platform_strict_class_probe", "platform_user_knob_override", "podcast_race", "position", "presentation", "processed_document", "processed_document_page", "product_capture_file", "product_capture_item", "product_capture_payload", "product_capture_product", "product_capture_question", "profile", "project", "prompt", "provider_account", "provider_account_credential", "provision", "provision_generate_target", "provision_grant", "provision_marker", "provision_rule_message", "provision_schema", "provision_shape_debt", "provision_snapshot", "provision_spec", "provision_spec_grandfather", "provision_vocabulary", "provlock_recall_visits_all8u5", "public_compat_wrapper", "public_placement_baseline", "public_placement_census", "public_placement_domain", "public_restore_permit", "purpose", "quiz_session", "rag_ingest_run", "rag_library_audit_log", "rate_limit_buckets", "reachability_pending", "read_mask_kept", "recompute_queue", "record", "record_alias", "record_computed", "record_follow", "redaction_mapping", "relationship_rule", "research_analysis", "research_content", "research_context_bundle", "research_document", "research_intent", "research_keyword", "research_media", "research_source", "research_synthesis", "research_tag", "research_template", "research_topic", "retention_policy", "retrieval_audit", "review_queue", "route_manifest_entry", "row_version", "rulebook", "run_approval", "run_approval_event", "runtime_operation_stream", "runtime_operation_stream_batch", "sandbox_instance", "sch_agent_task", "sch_run", "sch_task", "sch_trigger", "scheduler_automation_run_subject", "schema_client_exposure", "schema_migration_ledger", "schema_migration_legacy", "schema_migration_slot_grandfather", "schema_templates", "scope", "scope_association_suggestion", "scope_dataset_instance", "scope_door_registry", "scope_item_value_suggestion", "scope_suggestion", "scope_type", "scrape_domain", "scrape_domain_settings", "scrape_failure_log", "scrape_parsed_page", "scrape_path_override", "scrape_path_pattern", "scrape_retry_queue", "scraper_comparison_run", "scraper_data_fetch_job", "scraper_data_fetch_job_row", "scraper_data_source", "search_item", "seo_ai_capability", "seo_ai_visibility_brand_check", "seo_ai_visibility_citation", "seo_ai_visibility_claim", "seo_ai_visibility_design_artifact", "seo_ai_visibility_panel", "seo_ai_visibility_panel_version", "seo_ai_visibility_response", "seo_ai_visibility_signal", "seo_backlink", "seo_backlink_change_event", "seo_backlink_dimension_snapshot", "seo_backlink_observation", "seo_backlink_snapshot", "seo_change_assessment", "seo_change_event", "seo_change_item", "seo_change_metric", "seo_change_set", "seo_change_theory", "seo_collection_run", "seo_competitor", "seo_competitor_observation", "seo_competitor_opportunity", "seo_coverage_mention", "seo_coverage_tracker", "seo_dimension_value_matcher", "seo_engine_schedule", "seo_geo_place", "seo_gsc_dig_rule", "seo_keyword", "seo_keyword_class_rule", "seo_keyword_edge", "seo_keyword_facet", "seo_keyword_market", "seo_keyword_market_observation", "seo_keyword_place", "seo_keyword_saved_view", "seo_keyword_topic", "seo_landscape_brief", "seo_link_gap_domain", "seo_link_gap_match", "seo_map_facet", "seo_map_facet_value", "seo_map_topic", "seo_page_measurement_health", "seo_page_performance", "seo_pr_moment", "seo_provider_call", "seo_provider_task", "seo_rank_observation", "seo_rank_target", "seo_raw_payload", "seo_referring_domain_profile", "seo_reputation_case", "seo_search_performance_daily", "seo_serp_mention", "seo_serp_opportunity", "seo_serp_result", "seo_serp_snapshot", "seo_site_geo_area", "seo_site_keyword_offering", "seo_site_keyword_value", "seo_site_offering_value", "seo_site_topic_value", "seo_site_value_combo", "seo_site_value_worth", "seo_site_vocabulary", "seo_source_request", "seo_starter_pack", "seo_starter_pack_item", "seo_story_angle", "seo_topic", "seo_topical_map", "seo_tracker_story", "seo_web_analytics_daily", "share_link", "share_link_password", "shareable_resource_registry", "shared_canvas_item", "short_link", "shortcut_category", "sign_in_fk_legacy", "skill", "skill_category", "skill_detail", "skill_render_definition", "sms_consent", "sms_conversation", "sms_message", "sms_message_media", "sms_notification", "sms_notification_preference", "sms_phone_number", "sms_rate_limits", "sms_webhook_logs", "social_account_insight_daily", "social_ad", "social_captured_post", "social_kpi_goal", "social_own_post_metric", "social_post", "social_post_analysis", "social_post_comment", "social_post_metric_snapshot", "social_post_stat", "social_post_transcript", "social_profile", "social_profile_snapshot", "social_remix_output", "social_swipe_collection", "social_tracked_account", "social_video_composition_version", "social_video_project", "social_video_variant", "social_watchlist_hit", "soft_delete_cascade_job", "soft_delete_edge", "source_authority", "space_payload", "stage_ref_kind", "stamped_write_table", "structure", "structured_list", "studio_cleaned_segments", "studio_concept_items", "studio_documents", "studio_module_segments", "studio_raw_segments", "studio_recording_chunks", "studio_recording_segments", "studio_run", "studio_session", "studio_session_settings", "study_attempt", "study_goal", "study_media", "study_plan", "study_plan_block", "study_plan_day", "study_reminder_context", "study_reminder_delivery", "study_session", "study_source_chunk", "study_streak", "study_structured_section", "superseded_policy", "support_session", "support_session_event", "surface", "system_announcement", "system_context_item", "system_context_item_org_value", "system_error", "system_orgs", "system_write_failure", "t13_backfill_ledger", "t13_default_ledger", "t13_row_column_events", "tag", "task", "task_user_state", "taxonomy_node", "team", "template_context_items", "template_scope_types", "templates", "test_handset_inbox", "test_handset_verification", "thread", "tool", "tool_battle", "tool_battle_cell", "tool_binding", "tool_bundle", "tool_call", "tool_call_facts", "tool_canary_run", "tool_catalog_cache", "tool_catalog_call", "tool_catalog_call_attempt", "tool_catalog_call_detail", "tool_catalog_endpoint", "tool_catalog_entry", "tool_catalog_provider", "tool_definition_version", "tool_executor", "tool_feature_scorecard", "tool_surface_defaults", "tool_test_sample", "tool_ui", "tool_ui_incident", "tool_ui_version", "topic_placement_queue", "transcript", "trigger_event", "udt_dataset_fields", "udt_dataset_row_versions", "udt_dataset_rows", "udt_dataset_template", "udt_dataset_template_fields", "udt_document", "udt_document_snapshot", "udt_structured_list_items", "udt_workbook_snapshot", "ui_client", "ui_decision_pick", "ui_surface_action", "ui_surface_agent_pref", "ui_surface_agent_role", "ui_surface_client_tool", "ui_surface_config", "ui_surface_item_type", "ui_surface_value", "ui_surface_write_target", "univer_payload", "unsubscribe_token", "uploads_inflight", "user", "user_achievement", "user_acquisition_facts", "user_acquisition_facts_stored", "user_acquisition_facts_stored_watermark", "user_active_context", "user_analysis_preference", "user_email_preference", "user_entity_state", "user_feedback", "user_follows", "user_form_profile", "user_markdown_sample", "user_memory", "user_preference", "user_profile", "user_secret", "user_secret_audit", "user_secret_grant", "user_stat", "user_storage_usage", "user_surface_state", "users_calendar_feed", "users_notion_sync_source", "vault_fill_approvals", "vault_fill_devices", "vault_fill_nonces", "visibility_cache", "visibility_epoch", "voice", "war_room", "wbx_demo", "wbx_guidance", "wbx_highlight", "wbx_pattern", "wbx_recipe", "wbx_screenshot", "wbx_seo_audit", "wc_claim", "wc_impairment_definition", "wc_injury", "wc_report", "web_analysis_item", "web_brand", "web_brand_asset", "web_brand_choice", "web_brand_exclusion", "web_brand_offering", "web_brand_persona", "web_brand_relation_kind", "web_brand_review", "web_brand_testimony", "web_business_fact", "web_business_location", "web_channel_analytics_daily", "web_crawl_event", "web_crawl_preset", "web_crawl_schedule", "web_crawl_session", "web_crawl_url", "web_discovered_item", "web_domain_category", "web_domain_category_observation", "web_finding", "web_gsc_page_stat", "web_link_edge", "web_listing_publisher", "web_location_listing", "web_news_item", "web_offering_template", "web_page", "web_page_content", "web_page_evidence", "web_page_sitemap", "web_property", "web_provider", "web_result", "web_screenshot", "web_site", "web_site_endpoint_rule", "web_site_item_config", "web_site_offering", "web_sitemap", "web_snapshot", "web_tag_manager_snapshot", "web_temp_brand_firmographic", "web_temp_brand_presence", "web_temp_brand_recognition", "web_voice_fingerprint", "web_youtube_video", "webhook_deliveries", "webhook_dispatch_state", "webhook_test_receipt", "webhooks", "wf_node_data_slot", "work_claim", "work_item", "workbook", "worker_heartbeat", "workflow", "workflow_card", "workflow_checkpoint", "workflow_checkpoint_value", "workflow_comparison", "workflow_definition_overview", "workflow_definition_version", "workflow_idempotency", "workflow_job", "workflow_node_events", "workflow_node_outcome", "workflow_plan", "workflow_plan_event", "workflow_plan_sample", "workflow_recovery_audit", "workflow_review_issue", "workflow_run", "workflow_run_cost", "workflow_run_facts", "workflow_run_log", "workflow_runtime_surface", "workflow_template", "workflow_trigger", "workflow_trigger_fire", "workflow_work_item", "working_document", "write_guard_key", "youtube_quota_day", "youtube_search", "youtube_video"]; type StoreRefusalCode = (typeof STORE_REFUSAL_CODES)[number]["code"]; type StoreDoorName = (typeof STORE_DOORS)[number]["name"]; type EntityToken = (typeof ENTITY_TOKENS)[number]; type KernelTableName = (typeof KERNEL_TABLES)[number]["name"]; /** * VAL-8. Who wrote a value. `user`, `agent`, `system` — enforced by every write * door, and the three retired words (`human`, `ai`, `code`) are translated by * the store's own `custom.actor_word`, never by a caller. */ type Actor = (typeof ACTOR_VOCABULARY)[number]; /** The words the store still accepts and rewrites, mapped to what they become. */ type RetiredActorWord = keyof typeof RETIRED_ACTOR_WORDS; /** * VAL-2. Why a value is missing. A value is never blank for an unexplained * reason: it either holds something or it says one of these four words. */ type AbsenceReason = (typeof ABSENCE_REASONS)[number]; /** The closed key set of one value envelope (VAL-1 … VAL-4). */ type ValueEnvelopeKey = (typeof VALUE_ENVELOPE_KEYS)[number]; /** The closed key set of one ranked alternate (VAL-3). */ type ValueAlternateKey = (typeof VALUE_ALTERNATE_KEYS)[number]; /** * REC-4. `heavy` is indexed storage with Rules on write; `light` is * whole-document storage with Rules on read. Per Table, one store. */ type StorageMode = (typeof STORAGE_MODES)[number]; /** REC-15. One Rule object, four uses. */ type RuleUse = (typeof RULE_USES)[number]; /** * VAL-5 / VAL-6. The words that may NOT appear inside a value envelope: * Visibility and access belong to a Field and to a Record, never to a value. * The store refuses each of them by name and so does this package's mirror. */ type PerValueAccessWord = (typeof PER_VALUE_ACCESS_WORDS)[number]; /** FLD-11. The parity floor: the field type a person picks in the UI. */ type ParityFieldType = (typeof PARITY_FIELD_TYPES)[number]["parity_type"]; /** * THE ONE REGISTRY, as a type: every kind a column can be DECLARED as. * * `ParityFieldType` above is the parity FLOOR — the answer to "which of the fourteen * is this field". It is not the answer to "what may somebody pick", and reading it as * though it were is exactly how `signature` came to be a field shape the store accepted * (`custom.doc_sign` takes no other) and no screen could offer: VERIFIER-10, F6. * `custom.field_kinds()` is the registry, and this is generated from it. */ type DeclarableFieldKind = (typeof DECLARABLE_FIELD_KINDS)[number]["kind"]; /** FLD-1. The five behaviors a Field can have. One, exactly, and closed. */ type FieldBehavior = (typeof PARITY_FIELD_TYPES)[number]["behavior"]; /** The node kinds `custom.rule_eval` evaluates. */ type RuleNodeKind = (typeof RULE_NODE_KINDS)[number]["node"]; /** * REC-32. The seven table types, closed. The parenthesised names are the * retired ones the doctrine records; never coin an eighth. */ declare const TABLE_TYPES: readonly ["entity", "detail", "reference", "ledger", "restricted", "system", "deprecated"]; type TableType = (typeof TABLE_TYPES)[number]; /** REC-33. The two origins. A table we ship in schema `custom` is `standard`. */ declare const TABLE_ORIGINS: readonly ["standard", "custom"]; type TableOrigin = (typeof TABLE_ORIGINS)[number]; /** REL-1. Ownership is one fact, stored once, read from the field's side. */ declare const RELATION_FLAVORS: readonly ["owned", "referenced"]; type RelationFlavor = (typeof RELATION_FLAVORS)[number]; /** REL-2. What happens to the far side, separate from flavour. */ declare const ON_DELETE: readonly ["cascade", "set_null", "restrict"]; type OnDelete = (typeof ON_DELETE)[number]; /** REL-3. A snapshot is a frozen copy in the relation's payload, never a pointer. */ declare const RELATION_BINDINGS: readonly ["live", "snapshot"]; type RelationBinding = (typeof RELATION_BINDINGS)[number]; /** REL-7. */ declare const RELATION_CARDINALITIES: readonly ["one", "many"]; type RelationCardinality = (typeof RELATION_CARDINALITIES)[number]; /** FLD-7. Where a Field's values come from. */ declare const FIELD_SOURCES: readonly ["manual", "formula", "agent", "synced"]; type FieldSource = (typeof FIELD_SOURCES)[number]; /** FLD-9. A Formula declares whether it computes on read or on write. */ declare const COMPUTE_ON: readonly ["read", "write"]; type ComputeOn = (typeof COMPUTE_ON)[number]; /** * AGT-7 / FLD-12. A Field's sensitivity sets a ceiling a merge field can never * widen — and these are THE STORE'S four words, checked against its own guard. * * This list used to read `standard · sensitive · secret`, which the store has * never accepted: writing a Field with `sensitivity: "standard"` is refused * with "the field has to say how sensitive its values are, and it says * standard". The knob `custom/field_sensitivity_levels` keys off these same * four words to decide which level may read and edit each one, so a package * carrying three different words could never have agreed with it. Corrected * against the live store, 2026-09-18. */ declare const FIELD_SENSITIVITIES: readonly ["public", "internal", "confidential", "restricted"]; type FieldSensitivity = (typeof FIELD_SENSITIVITIES)[number]; /** DYN-17 / §D. Which tier a MERGE FIELD's value is delivered in. */ declare const DELIVERIES: readonly ["inline", "on_demand", "auto"]; type Delivery = (typeof DELIVERIES)[number]; /** * FLD-12. WHETHER AN AGENT MAY SEE A FIELD'S VALUES, and these are the STORE'S * four words — not the merge field's delivery tiers. * * `Field.context_policy` used to be typed as `Delivery` here, which is a * different question with a different vocabulary: writing a Field with * `context_policy: "inline"` is refused with "the field has to say * whether an agent may see its values, and it says inline". Delivery is about * HOW MUCH of a value a merge field carries into a turn; this is about WHETHER * the value reaches an agent at all, and conflating them let a screen offer a * word the store has never accepted. Corrected against the live store, * 2026-09-18. */ declare const CONTEXT_POLICIES: readonly ["include", "summarize", "exclude", "on_request"]; type ContextPolicy = (typeof CONTEXT_POLICIES)[number]; /** DYN-3. The eight sources, closed. Relationships and rules are not sources. */ declare const MERGE_FIELD_SOURCES: readonly ["literal", "record", "state", "actor", "platform", "user_input", "tool", "derived"]; type MergeFieldSource = (typeof MERGE_FIELD_SOURCES)[number]; /** DYN-4. What a merge field resolves INTO. The consumer never learns which. */ declare const MERGE_FIELD_SEMANTIC_TYPES: readonly ["value", "reference", "resolver", "computed", "collection"]; type MergeFieldSemanticType = (typeof MERGE_FIELD_SEMANTIC_TYPES)[number]; /** DYNAMIC-VALUES §A. Any number of these; never fused into the source. */ declare const MERGE_FIELD_MODIFIERS: readonly ["scoped", "temporal", "collection", "live", "fallback", "formatted", "required"]; type MergeFieldModifier = (typeof MERGE_FIELD_MODIFIERS)[number]; /** DYN-12. The five override policies. Exactly one, and it outranks the ladder. */ declare const OVERRIDE_POLICIES: readonly ["must_supply", "shown_overridable", "shown_locked", "server_fixed", "derived"]; type OverridePolicy = (typeof OVERRIDE_POLICIES)[number]; /** DYNAMIC-VALUES §C. What a resolved merge field's freshness was. */ declare const FRESHNESS: readonly ["live", "cached", "snapshot"]; type Freshness = (typeof FRESHNESS)[number]; /** REC-1. How a Table shows itself. */ declare const TABLE_DISPLAYS: readonly ["list", "grid", "board", "calendar", "timeline"]; type TableDisplay = (typeof TABLE_DISPLAYS)[number]; /** * What KIND of refusal it was. The mapping from SQLSTATE to code lives in * `/core`, and it is checked against `STORE_REFUSAL_CODES` — the list of every * SQLSTATE the store's own bodies raise, generated from the live catalog. A * code the store can raise and this union cannot name is a hole, and the * real-door suite fails on it. */ type RecordsErrorCode = /** `PT409` — somebody else's write won. The record clock moved under you. */ "stale_write" /** * The call needs an organization and none was carried (the platform's `organization_required`; the entity * doors' MX002). Never resolved by guessing one: the person is shown their memberships and picks. */ | "organization_required" /** `42501` — a door. Either the schema is revoked, or the store is switched off, or this principal may not pass. */ | "door" /** `23514` — a Rule, a shape guard, or a validation the store enforces refused it. */ | "refused_by_rule" /** * `22004` / `22023` / `22P02` — the call itself was malformed: a missing id, a * patch that is not an object, or a value that does not fit the type the * store holds for that Field. The store's own message names the value and the * type it could not be read as. */ | "invalid_argument" /** `02000` — the record is not here (deleted, never existed, or another organization's). */ | "not_found" /** `23503` — something it points at is not there. */ | "missing_reference" /** `23505` — that thing is already here. */ | "already_exists" /** `0A000` — the store does not do this yet, and says which part. */ | "not_supported" /** `53400` / `22012` — the store ran out of something, or the arithmetic could not be done. */ | "store_limit" /** * `40001` — the read-access snapshot this connection carries is older than a * write the reader has already observed, so the store refused to answer at * all rather than hand back something they just lost. Retry on a fresh * connection; it is the one refusal in this list that is worth repeating. */ | "stale_read" /** * `57014` — the store cancelled the statement at its own timeout. Nothing was * refused on its merits and nothing was written; the same call can succeed on * a smaller page or a quieter moment. With `stale_read`, one of the only two * refusals in this list worth repeating. */ | "timed_out" /** * THE DOOR THAT DOES NOT EXIST YET. Not an error condition in the database — * this package asked for a door that is not in the live catalogue, so it * refused to guess. `door_absent` always names the door and the lane that * owns it; it is never a silent no-op and never an empty list. */ | "door_absent" /** * `PGRST202` / `PGRST205` — PostgREST could not find the function or the * schema. The database this client is pointed at is not serving the record * store: the schema is not exposed, or the grants are not there. */ | "store_not_served" /** * `PT428` — the move was not refused and it did not happen: a stage gate whose * `on_fail` is `require_approval` filed a request with the people who can * answer it, and left the record exactly where it was. The store's own * sentence is the gate's own sentence, and the DETAIL carries the approval. * * It is the one code in this list that is not a failure. A screen that drew it * as one would tell somebody their work was rejected when it is being * considered; a screen that drew it as success would move the card while * somebody is still deciding. `custom.pipeline_move` answers an object on this * path rather than raising, so a caller only meets PT428 when the move went * through the ORDINARY write door — which is most of them. */ | "needs_approval" /** * THE CALL NEVER REACHED THE STORE. Not a refusal — a transport failure: the * browser lost the network, the gateway answered with an HTTP status and no * body, the request was cancelled. supabase-js hands these back with an EMPTY * `code` (a `FetchError`) or with the HTTP status in it (`"404"`, `"502"`), * neither of which is a SQLSTATE, and until 2026-09-22 they all landed in * `internal` — which is the one classification that tells a screen nothing, * and which made the package print a sentence about ITSELF to the person * (lane TAILS-6). Nothing was written, and the same call can simply be made * again, which is what separates it from `internal`. */ | "unreachable" /** Anything the mapper could not place. It still carries the store's own words. */ | "internal"; /** A refusal, in the store's own words. */ interface RecordsError { code: RecordsErrorCode; /** THE STORE'S message, verbatim. Never paraphrased. */ message: string; /** THE STORE'S hint, verbatim — this is where the remedy is written. */ hint?: string; /** The SQLSTATE, so a caller can be exact when a code is not exact enough. */ sqlstate?: string; /** Whatever the store put in DETAIL, parsed when it was json. */ detail?: unknown; /** * TRUE when this package did not recognize the class it was handed, so a * caller can say so instead of reading the silence as "handled". * * 🚨 IT IS A FLAG AND A SEPARATE SENTENCE, NEVER AN APPENDIX TO `hint` * (lane TAILS-6, 2026-09-22). `mapPgError` used to append "@ai-matrx/records * did not recognize SQLSTATE … from checklistTemplates" ONTO `hint`, and * `hint` is the field every screen treats as THE REMEDY — the sentence a * person is told to act on. So a dropped connection on the Checklists tab * showed a plumbing company "Something went wrong at our end" over a line * about a TypeScript package and a SQLSTATE. A note this package writes about * ITSELF is for whoever debugs it and belongs nowhere a person reads. */ unmapped?: boolean; /** * THIS PACKAGE'S OWN NOTE, for an engineer. Never the store's words and never * a person's: screens render it out of sight (a `title` attribute, a * screen-reader line) or not at all. */ diagnostic?: string; } type RecordsResult = { ok: true; data: T; } | { ok: false; error: RecordsError; }; /** Narrowing helper for hosts compiled without `strictNullChecks`. */ declare function isRecordsErr(result: RecordsResult): result is { ok: false; error: RecordsError; }; /** * A result's data, or THROW its refusal as an `Error` carrying the store's sentence — for the places * a throw is the contract (a `createAsyncThunk` body, a loader whose caller catches and shows it). */ declare function unwrapRecords(result: RecordsResult): T; declare const ok: (data: T) => RecordsResult; declare const err: (error: RecordsError) => RecordsResult; /** * A `stale_write` carries everything the screen needs to show the conflict * rather than a toast: which version you wrote against, which one won, and the * value of every field you touched as it stands now. The store builds this and * this type is its shape — nothing is reconstructed on the client. */ interface StaleWriteDetail { expected_version: number; current_version: number; contested_fields: Record; } /** The parsed form of a `stale_write`, for `useRecordMutation`'s conflict state. */ interface WriteConflict extends StaleWriteDetail { record_id: Uuid; /** The store's own sentence — what the screen shows. */ message: string; /** The store's own remedy. */ hint: string; } /** * The structural shape of a PostgREST failure as supabase-js resolves it: a * PLAIN OBJECT parsed from the response body, NOT an `Error`. Reading * `.message` off `instanceof Error` discards the real database message on every * genuine failure. */ interface PgError { code?: string | null; message: string; details?: string | null; hint?: string | null; } /** What the validation mirror answers: the same sentence the trigger would raise. */ interface PredictedRefusal { /** The field key the store would name, when it names one. */ field_key?: string; /** The message the store's own body would raise, word for word. */ message: string; hint?: string; /** The store's structured detail, when its refusal carries one (e.g. `{ example }`). */ detail?: Record; sqlstate: string; /** * Which of the store's bodies would raise it, so a reader can go and check * that this mirror still tells the truth. */ predicted_by: string; } /** VAL-5 / VAL-6, named so a caller can say which word was the problem. */ interface ForbiddenEnvelopeWord { field_key: string; word: PerValueAccessWord; } /** A `uuid` as the store writes it. */ type Uuid = string; /** An ISO-8601 timestamp, as jsonb carries it. */ type Timestamp = string; /** * VAL-1. WHERE a value came from, addressed by a pointer the STORE interns — * `s1`, `s2`, `s3`. A writer supplies the source itself and the store interns * it; a writer that invents a pointer is refused by name. Interned once per * save: two pointers holding the same description is the defect the word * "interned" exists to prevent, and the store refuses that too. */ type ProvenancePointer = string; /** The description a pointer resolves to. Free-shaped by design: the store checks that it is an object, and the organization decides what it says. */ type ValueSource = Record; /** * VAL-3 / VAL-4. Another candidate for the same value, with the source it came * from and the RANK — the order an organization trusts its sources in, never a * score or a confidence a machine invented. Ranks are whole, start at 1, and * two alternates never claim the same one. They live INSIDE this record's * document; there is never a row per value. */ interface ValueAlternate { value: unknown; /** A pointer this record's `_sources` block resolves. */ src?: ProvenancePointer | null; rank: number; } /** * The value envelope. One per field key, in the record's `_values` block, with * the value itself sitting at the top level under the same key. * * The key set is CLOSED (`custom.value_envelope_keys()`). In particular it can * never carry any of the per-value access words (`PER_VALUE_ACCESS_WORDS`): VAL-5 puts those on the Field and on the Record, and VAL-6 says a * value that must be secret goes in a contained record with its own access. * The store refuses each of those words by name. */ interface ValueEnvelope { /** The per-value version, 1 or more. THE STORE WRITES IT — no caller sets it. */ ver: number; /** A provenance pointer this record's `_sources` block resolves. */ src?: ProvenancePointer | null; /** VAL-8. Who wrote it. */ actor: Actor; /** Only an agent acts on behalf of a person; a person's id. */ on_behalf_of?: Uuid | null; at?: Timestamp | null; /** VAL-2. Why it is missing. A value either holds something or says this. */ absent?: AbsenceReason | null; alternates?: ValueAlternate[] | null; /** * FLD-2's `dated` modifier: the WORLD clock for this value — when it was true * of the world, which is a different question from when it was written. Added * to the store's closed key set after this package's first generation, and * caught by `pnpm check:store-registry` rather than by anybody noticing. */ dated?: string | null; } /** * The one jsonb document. Field keys sit at the top level; the store's own * blocks are underscore-prefixed and are never a writer's value. */ interface RecordDocument { /** The store's interned provenance table: pointer -> source. */ _sources?: Record; /** The envelopes, keyed by field key. */ _values?: Record; /** FLD-10. Which type of record this is, selecting the Fields and Rules that apply. */ _type?: string; /** REC-7. Zero or one parent. Never two. */ _parent?: Uuid | null; [fieldKey: string]: unknown; } /** `custom.record` as the store holds it — the row around the document. */ /** * What `custom.record_write_graph` wrote — a parent, the rows that belong to it, and the * edges it stands on, all in one transaction. * * `edges` counts BOTH writers: the edges written through `public.assoc_add` (whose ids are * in `edge_ids`) and the relation targets written through `platform.relation_set`, which * answers a count rather than ids because a relation is one field's worth of targets and * not a list of independent edges. `relations` is that second number on its own, so a * caller can tell them apart instead of subtracting. */ interface RecordGraphWritten { parent_id: Uuid; table_id: Uuid | null; child_ids: Uuid[]; edge_ids: Uuid[]; children: number; edges: number; relations: number; /** The door's own sentence about what it did. Shown, never re-worded. */ how: string; } interface StoredRecord { id: Uuid; organization_id: Uuid; table_id: Uuid | null; /** `record` for ordinary rows, `kernel` for the nine kernel Tables (REC-27). */ data_class: string; data: RecordDocument; created_by: Uuid | null; updated_by: Uuid | null; created_at: Timestamp; updated_at: Timestamp; /** REC-23: soft, and reversible within `retention`. */ deleted_at: Timestamp | null; /** The RECORD clock. `recordUpdate` writes against it (optimistic concurrency). */ version: number; metadata: Record; custom_fields: Record; visibility: string; } /** * One value read back with everything the store knows about it — the shape * `custom.record_values_versioned` and `custom.value_read` answer in. This is * what a screen needs to explain a value (DYN-24) without a second query. */ interface ReadValue { field_key: string; field_id: Uuid | null; value: unknown; value_version: number | null; source: ValueSource | null; absent_reason: AbsenceReason | null; actor: Actor | null; on_behalf_of: Uuid | null; written_at: Timestamp | null; alternates: ValueAlternate[] | null; } /** * Why one field of a record came back empty — `custom.hidden_field_notice`, as * the read door attaches it under `_hidden`. It is the store's own sentence, so * a screen says "you need X to see this" instead of drawing a blank cell. */ interface HiddenFieldNotice { /** The field's sensitivity word. */ reason: string | null; /** The level this person would need. */ needs: string | null; /** The other way in — "a share of this one field with you". */ or: string | null; } /** * One row as the read door `custom.read_records` answers it: the id, the * document the store decided this reader may see, and the reader's level on the * Table. A field this reader may not see is PRESENT and null, with its reason * in `hidden` — the masking is the store's, never this client's. */ interface ReadRow { id: Uuid; document: RecordDocument; /** `public.permission_level` — the caller's level on the Table. */ level: string; hidden: Record; /** * A kept table's device copy holds a change to this row that has not reached the store yet (made * offline, or not sent so far). Only the offline data source sets it; a read from the store never does. */ waiting?: true; } /** * A ROW THE PERSON CANNOT OPEN (CHAIR-ACCESS b, by design): a row of a Confidential Table that the * reader is not named on comes back from the list doors as a bare header `{id, exists: true, * submitted_at}`, no values and no level. It is a fact ("it exists"), never a record to draw: a * screen that drew it painted a blank row. The client splits these out of `rows` and counts them in * `locked`; this is the one test for "is this the header". */ declare function isLockedStub(row: { document?: unknown; level?: unknown; } | null | undefined): boolean; /** Split a read page into the rows a person can open and the count of header-only stubs. */ declare function splitLockedRows(rows: readonly R[]): { rows: R[]; locked: number; }; /** * DOOR-SPEED. One key of a page's order, as `custom.read_records_page` takes it. `as` is the * column's own type — `number` sorts numerically (text that is not a number sorts last), * `date` sorts ISO dates and instants, `text` (the default) sorts by lower-cased text. A choice * column always sorts by the WORD a person sees; the store knows which columns are choices. * NULLS LAST both ways, record id as the tie-breaker. */ interface RecordPageSort { field: string; direction?: "asc" | "desc"; as?: "text" | "number" | "date"; } /** One page the store sorted, searched and counted: `total` is the matching set this reader may see. */ interface RecordPage { /** The rows this person can open. Header-only stubs of rows they cannot open are never in here. */ rows: ReadRow[]; /** * The matching set this reader can OPEN (stubs left out). Absent `locked` and `total` agree with * the old meaning. */ total: number; /** Rows the store listed only as a header (a Confidential row this person is not named on), across the whole table. */ locked?: number; limit: number; offset: number; /** * Sort keys the store SKIPPED because this reader cannot see that column (removed, or masked * from their seat). The page is still read; the screen says the sort was not applied. */ sort_ignored: string[]; /** * Columns of a SAVED VIEW's own filter the store SKIPPED because this reader cannot see them (WITHHELD-HONEST-2). * Only a filter marked `skip_withheld` is skipped; an explicit filter on such a column is refused by name. */ filter_ignored?: string[]; } /** * A row as the keyset door answers it: the read row plus the `version` and `organization_id` the * store read it at, in the same statement as its values (so a document and its version never * disagree). `version` is null only on a Confidential header row, which says nothing but "it exists". */ type KeysetRow = ReadRow & { version: number | null; organization_id: Uuid; }; /** * AP3-KEYSET-DOOR. One page of `custom.read_records_keyset`: the same rows and order as `RecordPage`, * paged by an opaque `cursor` (null on the last page) instead of an offset, so nothing is skipped or * repeated while others write. Re-reading named rows (`ids`) answers `total: null` and no cursor. */ interface RecordKeysetPage { rows: KeysetRow[]; total: number | null; /** Header-only stubs this page carried (rows this person cannot open); never in `rows`. */ locked?: number; limit: number; cursor: string | null; /** As on `RecordPage`: sort keys skipped because this reader cannot see that column. */ sort_ignored: string[]; /** As on `RecordPage`: filter columns of a saved view skipped because this reader cannot see them. */ filter_ignored?: string[]; } /** DOOR-SPEED. One change in a `recordChangeMany` batch. */ type RecordChange = { op: "insert"; data: RecordDocument; } | { op: "update"; record_id: Uuid; patch: RecordDocument; expected_version?: number | null; } | { op: "archive"; record_id: Uuid; }; /** What one change did, in the order the changes were handed in. */ type RecordChangeResult = { op: "insert"; id: Uuid; } | { op: "update"; id: Uuid; version: number; } | { op: "archive"; id: Uuid; archived_at: string; }; /** * One revision of one record, as `custom.io_revisions` answers it, newest * first. `version` is the record's own version at that point — the number a * screen hands back as `expectedVersion` so the store, not the screen, decides * whether someone else got there first. */ interface RecordRevision { version: number; changed_at: string; changed_by: Uuid | null; summary: string | null; } /** A whole record as `recordRead` answers it, through `custom.read_record`. */ interface RecordRead { record_id: Uuid; /** The masked document. A hidden field is present and null. */ document: RecordDocument; /** Why each masked field is masked, in the store's words. */ hidden: Record; /** * FLD-9 / REC-19. Which Rule version produced each computed value. Present * only where the store has computed provenance for this record. */ computed: Array<{ field_key: string; field_id: Uuid; value: unknown; rule_id: Uuid; rule_version: number; computed_at: Timestamp; }>; /** * WHY `computed` IS EMPTY, when it is empty because nobody could read it. * * `custom.computed_provenance` is a footnote beside the record and its door is not * open to a person's seat (no EXECUTE for `authenticated`, measured 2026-09-21). It * used to fail the WHOLE read, so an organization's own owner was told "You do not * have access to this" about a record he could read — see `core/client.ts`. The * record comes back now, and this carries what the footnote's door said, so a screen * that draws rule provenance can say it could not read it rather than draw nothing * and mean two different things by it. `null` means the footnote was read fine (or * was never asked for). */ computedUnavailable?: RecordsError | null; /** * Asked with `withVersion: true`: the version this read saw, so a safe edit (`recordUpdate` with `expected_version`) needs no * second call. Read beside the document in the same round of requests; `null` when the store * could not answer it (a write then refuses as "version unread", never as last-write-wins). */ version?: number | null; } export { ENTITY_TOKENS as E, FIELD_SENSITIVITIES as G, FIELD_SOURCES as I, FORMULA_NODE_RESULTS as J, FRESHNESS as K, KERNEL_TABLES as N, MERGE_FIELD_MODIFIERS as W, MERGE_FIELD_SEMANTIC_TYPES as X, MERGE_FIELD_SOURCES as Y, ON_DELETE as a0, OVERRIDE_POLICIES as a1, PARITY_FIELD_TYPES as a3, PER_VALUE_ACCESS_WORDS as a4, RELATION_BINDINGS as a7, RELATION_CARDINALITIES as a8, RELATION_FLAVORS as a9, err as aF, isLockedStub as aG, isRecordsErr as aH, ok as aI, splitLockedRows as aJ, unwrapRecords as aK, RETIRED_ACTOR_WORDS as aa, RULE_NODE_KINDS as ab, RULE_USES as ac, STORAGE_MODES as al, STORE_DOORS as am, STORE_KNOBS as an, STORE_REFUSAL_CODES as ao, TABLE_DISPLAYS as at, TABLE_ORIGINS as au, TABLE_TYPES as av, VALUE_ALTERNATE_KEYS as ax, VALUE_ENVELOPE_KEYS as ay, ABSENCE_REASONS as s, ACTOR_VOCABULARY as t, COMPUTE_ON as v, CONTEXT_POLICIES as w, DECLARABLE_FIELD_KINDS as x, DELIVERIES as y }; export type { MergeFieldSource as $, Actor as A, EntityToken as B, ComputeOn as C, DeclarableFieldKind as D, FieldSource as F, HiddenFieldNotice as H, ForbiddenEnvelopeWord as L, Freshness as M, OnDelete as O, PgError as P, KernelTableName as Q, RecordsResult as R, StorageMode as S, TableType as T, Uuid as U, KeysetRow as V, MergeFieldModifier as Z, MergeFieldSemanticType as _, TableDisplay as a, OverridePolicy as a2, PerValueAccessWord as a5, ProvenancePointer as a6, ValueAlternateKey as aA, ValueEnvelope as aB, ValueEnvelopeKey as aC, ValueSource as aD, WriteConflict as aE, RecordChange as ad, RecordChangeResult as ae, RecordGraphWritten as af, RecordKeysetPage as ag, RecordPage as ah, RecordRead as ai, RecordRevision as aj, RetiredActorWord as ak, StaleWriteDetail as ap, StoreDoorName as aq, StoreRefusalCode as ar, StoredRecord as as, TableOrigin as aw, ValueAlternate as az, FieldSensitivity as b, ContextPolicy as c, RelationFlavor as d, RelationCardinality as e, RelationBinding as f, Timestamp as g, RuleNodeKind as h, RuleUse as i, RecordsError as j, RecordsErrorCode as k, RecordDocument as l, RecordPageSort as m, ReadRow as n, FieldBehavior as o, ParityFieldType as p, PredictedRefusal as q, ReadValue as r, AbsenceReason as u, Delivery as z };