@ai-matrx/records 0.58.8 → 0.58.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +47 -0
- package/dist/core/index.cjs +77 -6
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +51 -4
- package/dist/core/index.d.ts +51 -4
- package/dist/core/index.js +77 -6
- package/dist/core/index.js.map +1 -1
- package/dist/index.cjs +7 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +10 -2
- package/dist/index.d.ts +10 -2
- package/dist/index.js +7 -3
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +17 -5
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +38 -4
- package/dist/react/index.d.ts +38 -4
- package/dist/react/index.js +17 -5
- package/dist/react/index.js.map +1 -1
- package/dist/{types-FXtEsU7W.d.cts → types-BeDeDL6g.d.cts} +22 -3
- package/dist/{types-FXtEsU7W.d.ts → types-BeDeDL6g.d.ts} +22 -3
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +2 -2
- package/dist/use-cases/index.d.ts +2 -2
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# Changelog — @ai-matrx/records
|
|
2
2
|
|
|
3
|
+
## 0.58.11 (2026-09-25 — published by PUBLISH-SWEEP-6)
|
|
4
|
+
|
|
5
|
+
0.58.10 was tagged but never reached npm: its publish gate (`real-doors.test.ts`, "no signed-out caller
|
|
6
|
+
reaches the store") counted `custom._older_table_copy_refusal(uuid)`, an anonymous door lane
|
|
7
|
+
WHERE-LIVES-SWITCH declared in `platform.client_callable_door`. The gate now counts only UNDECLARED
|
|
8
|
+
anon grants and also asserts anon holds no USAGE on schema `custom`. Everything under 0.58.10 below
|
|
9
|
+
ships here.
|
|
10
|
+
|
|
11
|
+
## 0.58.10 (2026-09-25 — tagged by PUBLISH-SWEEP-5; never published, see 0.58.11)
|
|
12
|
+
|
|
13
|
+
Carries S5-PRIME-2's decision hold (`WorkInboxItem.undo_seconds` / `undo_refusal`, `3e2c93da3c`; registry
|
|
14
|
+
689 doors), which records-ui 0.85.12 reads, so it publishes first. ORDER-FILTER shipped in 0.58.9 (below).
|
|
15
|
+
|
|
16
|
+
### Lane MOVER-BIG-VALUES (2026-09-25)
|
|
17
|
+
|
|
18
|
+
* **A value kept as a file** (`core/wholeValue.ts`): a value over the organization's ceiling for one
|
|
19
|
+
value is kept as a file and the cell holds its first 1000 characters, its envelope pointing at a
|
|
20
|
+
`whole_value_in_file` provenance entry. `wholeValueOf(document, key)` / `wholeValueOfRead(value)`
|
|
21
|
+
recognise it; `withWholeValues(rows, readFileText)` makes an export write the file's whole content;
|
|
22
|
+
`cellText` never passes the words off as the whole value (it says where the rest is).
|
|
23
|
+
|
|
24
|
+
### Lane S5-PRIME-2, VERIFIER-20 (2026-09-25)
|
|
25
|
+
|
|
26
|
+
* **`WorkInboxItem.undo_seconds` / `undo_refusal`** (uichamp_s5c, applied to production
|
|
27
|
+
2026-09-25): how long a decision on the row is held with Undo — the organization's
|
|
28
|
+
`custom/decision_undo_seconds` (default 5) for a pending approval or proposal, 0 with the store's
|
|
29
|
+
sentence when a run already waits on the answer, null for work and closed rows. Registry
|
|
30
|
+
regenerated (689 doors).
|
|
31
|
+
|
|
32
|
+
## 0.58.9
|
|
33
|
+
|
|
34
|
+
Automatic changed-only republish (docs/metadata drift since the last tag — see
|
|
35
|
+
`git diff npm/records/v0.58.8..npm/records/v0.58.9 -- apps/shared/records`).
|
|
36
|
+
No source changes intended and no consumer action required.
|
|
37
|
+
|
|
38
|
+
### Lane ORDER-FILTER (2026-09-25)
|
|
39
|
+
|
|
40
|
+
* **The order door takes the view's filter.** `readInViewOrder({ view_id, filter, limit, offset })`
|
|
41
|
+
now takes `filter` (`StoreFilter`: the flat map or a nested Rule — the view's own `where`, or a
|
|
42
|
+
number clicked on a dashboard) and sends it as `p_filter` to `custom.read_records_in_view_order`
|
|
43
|
+
(store file `orderfilter_a_hand_ordered_view_reads_exactly_its_filtered_rows.sql`, applied to
|
|
44
|
+
production). The store reads exactly the matching rows in their places and pages THAT order; each
|
|
45
|
+
row answers its stored position, and rows the filter hides keep theirs. No filter (absent, `null`
|
|
46
|
+
or `{}`) sends no `p_filter`, the unfiltered door as before. `store.generated.ts` regenerated.
|
|
47
|
+
**Consumer action:** a host that read the door without a filter and narrowed the rows afterwards
|
|
48
|
+
(the Sheet, records-ui before this) passes the filter instead.
|
|
49
|
+
|
|
3
50
|
## 0.58.8 (2026-09-25 — published by PUBLISH-SWEEP-5)
|
|
4
51
|
|
|
5
52
|
Carries UI-FIX-19's `TableHomeDestination.slug` (`461302fbf7`), which records-ui 0.85.10 reads to tell
|
package/dist/core/index.cjs
CHANGED
|
@@ -2247,6 +2247,7 @@ __export(core_exports, {
|
|
|
2247
2247
|
TABLE_TYPES: () => TABLE_TYPES,
|
|
2248
2248
|
VALUE_ALTERNATE_KEYS: () => VALUE_ALTERNATE_KEYS,
|
|
2249
2249
|
VALUE_ENVELOPE_KEYS: () => VALUE_ENVELOPE_KEYS,
|
|
2250
|
+
WHOLE_VALUE_SOURCE_KIND: () => WHOLE_VALUE_SOURCE_KIND,
|
|
2250
2251
|
actionRefusals: () => actionRefusals,
|
|
2251
2252
|
addFields: () => addFields,
|
|
2252
2253
|
allowsOtherValues: () => allowsOtherValues,
|
|
@@ -2343,9 +2344,14 @@ __export(core_exports, {
|
|
|
2343
2344
|
supabaseDataSource: () => supabaseDataSource,
|
|
2344
2345
|
toAoa: () => toAoa,
|
|
2345
2346
|
tokenFor: () => tokenFor,
|
|
2347
|
+
wholeValueNotRead: () => wholeValueNotRead,
|
|
2348
|
+
wholeValueOf: () => wholeValueOf,
|
|
2349
|
+
wholeValueOfRead: () => wholeValueOfRead,
|
|
2350
|
+
wholeValueSize: () => wholeValueSize,
|
|
2346
2351
|
withRowCounts: () => withRowCounts,
|
|
2347
2352
|
withTableFacts: () => withTableFacts,
|
|
2348
|
-
withTablePlacement: () => withTablePlacement
|
|
2353
|
+
withTablePlacement: () => withTablePlacement,
|
|
2354
|
+
withWholeValues: () => withWholeValues
|
|
2349
2355
|
});
|
|
2350
2356
|
module.exports = __toCommonJS(core_exports);
|
|
2351
2357
|
|
|
@@ -4194,7 +4200,7 @@ var STORE_DOORS = [
|
|
|
4194
4200
|
{ name: "read_records", args: "p_organization_id uuid, p_table_id uuid, p_by_id boolean DEFAULT false, p_limit integer DEFAULT 200, p_offset integer DEFAULT 0", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
4195
4201
|
{ name: "read_records_archived", 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", returns: "TABLE(id uuid, document jsonb, level permission_level, archived_at timestamp with time zone, archived_by uuid, archived_by_name text)", security: "definer" },
|
|
4196
4202
|
{ name: "read_records_by_ids", args: "p_organization_id uuid, p_table_id uuid, p_record_ids uuid[], p_by_id boolean DEFAULT false", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
4197
|
-
{ name: "read_records_in_view_order", 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", returns: 'TABLE(id uuid, document jsonb, level permission_level, "position" numeric)', security: "definer" },
|
|
4203
|
+
{ name: "read_records_in_view_order", 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", returns: 'TABLE(id uuid, document jsonb, level permission_level, "position" numeric)', security: "definer" },
|
|
4198
4204
|
{ name: "read_records_matching", 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", returns: "TABLE(id uuid, document jsonb, level permission_level)", security: "definer" },
|
|
4199
4205
|
{ name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
|
|
4200
4206
|
{ name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text, p_compare jsonb DEFAULT NULL::jsonb", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint, prior_groups jsonb, prior_measures jsonb, prior_row_count bigint, delta jsonb, compare jsonb)", security: "definer" },
|
|
@@ -4219,6 +4225,9 @@ var STORE_DOORS = [
|
|
|
4219
4225
|
{ name: "record_restore_version", args: "p_organization_id uuid, p_record_id uuid, p_version integer", returns: "jsonb", security: "definer" },
|
|
4220
4226
|
{ name: "record_restore_version", args: "p_organization_id uuid, p_record_id uuid, p_version integer, p_author jsonb", returns: "jsonb", security: "definer" },
|
|
4221
4227
|
{ name: "record_scope_context", args: "p_organization_id uuid, p_record_id uuid, p_relations integer DEFAULT 12, p_history integer DEFAULT 15, p_siblings integer DEFAULT 8", returns: "jsonb", security: "definer" },
|
|
4228
|
+
{ name: "record_source_key", args: "p_table_id uuid", returns: "text", security: "invoker" },
|
|
4229
|
+
{ name: "record_source_keys", args: "p_table_id uuid", returns: "text[]", security: "invoker" },
|
|
4230
|
+
{ name: "record_source_table", args: "p_key text", returns: "uuid", security: "invoker" },
|
|
4222
4231
|
{ name: "record_stage_pending", args: "p_organization_id uuid, p_record_id uuid", returns: "jsonb", security: "definer" },
|
|
4223
4232
|
{ name: "record_state_as_of", args: "p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
|
|
4224
4233
|
{ name: "record_table", args: "p_organization_id uuid, p_record_id uuid", returns: "uuid", security: "definer" },
|
|
@@ -4398,7 +4407,7 @@ var STORE_DOORS = [
|
|
|
4398
4407
|
{ name: "work_assignment_fields", args: "p_options_table_id uuid DEFAULT NULL::uuid", returns: "TABLE(key text, label text, spec jsonb)", security: "invoker" },
|
|
4399
4408
|
{ name: "work_decide_many", args: "p_organization_id uuid, p_decisions jsonb", returns: "jsonb", security: "definer" },
|
|
4400
4409
|
{ name: "work_has_assignment", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
4401
|
-
{ name: "work_inbox", args: "p_organization_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false, p_view text DEFAULT 'inbox'::text", 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)", security: "definer" },
|
|
4410
|
+
{ name: "work_inbox", args: "p_organization_id uuid, p_limit integer DEFAULT 50, p_offset integer DEFAULT 0, p_include_decided boolean DEFAULT false, p_view text DEFAULT 'inbox'::text", 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)", security: "definer" },
|
|
4402
4411
|
{ name: "work_instantiation_shape", args: "p_organization_id uuid, p_instantiation_id uuid", returns: "jsonb", security: "definer" },
|
|
4403
4412
|
{ name: "work_list", args: "p_organization_id uuid, p_flavour text DEFAULT 'mine'::text, p_include_finished boolean DEFAULT false, p_limit integer DEFAULT 100, p_offset integer DEFAULT 0", 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)", security: "definer" },
|
|
4404
4413
|
{ name: "work_person", args: "p_organization_id uuid, p_user_id uuid, p_create boolean DEFAULT true", returns: "uuid", security: "definer" },
|
|
@@ -4442,6 +4451,7 @@ var STORE_KNOBS = [
|
|
|
4442
4451
|
{ key: "containment_depth_ceiling", value: "16", type: "integer" },
|
|
4443
4452
|
{ key: "context_copy_following", value: "true", type: "boolean" },
|
|
4444
4453
|
{ key: "cross_organization_links", value: "false", type: "boolean" },
|
|
4454
|
+
{ key: "decision_undo_seconds", value: "5", type: "integer" },
|
|
4445
4455
|
{ key: "decoration_rules_max", value: "50", type: "integer" },
|
|
4446
4456
|
{ key: "decorations_max_bytes", value: "262144", type: "integer" },
|
|
4447
4457
|
{ key: "document_letterhead", value: "{}", type: "json" },
|
|
@@ -4503,7 +4513,7 @@ var STORE_REFUSAL_CODES = [
|
|
|
4503
4513
|
{ code: "22023", raised_by: "_action_check,_booking_availability,_decorations_check,_entity_custom_fields_guard,_fx_date,_fx_num,_fx_unit,_fxp_level,_fxp_resolve,_fxp_tokens,_portal_config_judge,_take_op_id,_value_envelope,_view_field_key,_view_key_value,_work_shape_guard,action_run,actor_word,agg_assert_key,agg_calendar,agg_compare_windows,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_run,dashboard_target_field_assert,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_reference_words,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,field_update,form_declare,form_draft_save,formula_eval,formula_parse,grid_layout_check,hub_changed_by,inbox_snooze,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,list_portals,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,pipeline_move_many,portal_declare,portal_form_submit,provenance_write,query_by_coordinates,query_rollup,read_records_archived,read_records_in_view_order,record_filter_sql,record_update,record_write_graph,record_write_many,relation_carry,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_sql_op,scope_table_provision,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_from_example,table_move,table_rules,table_share_outside_grant,table_sync,table_webhook_declare,view_declare,view_keys_check,view_record_order_set,visibility_as_of,work_approval_request,work_decide_many,work_inbox,work_list,work_slot_hold" },
|
|
4504
4514
|
{ code: "23503", raised_by: "_action_check,_booking_availability,_checklist_instantiate,_containment_guard,_decorations_check,_display_spec_for,_field_document_for,_field_type_parity_guard,_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,autonumber_backfill,booking_cancel,booking_confirm,booking_declare,booking_hold,booking_reschedule,capture_publish,checklist_declare,checklist_steps_table,comment_write,dashboard_declare,delete_rule,doc_sign,doc_template_save,enrich_declare,enrich_due,enrich_land,form_declare,form_draft_save,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,pipeline_board,pipeline_declare,pipeline_move,pipeline_read,pipeline_transition_refusal,promote_field,promote_table,read_records_in_view_order,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_filter_node_sql,rule_members,rule_members_visible,rule_run,sign_request_create,subscription_mute,subscription_preview,table_decorate,table_from_example,table_webhook_archive,table_webhook_declare,view_declare,view_record_order_set,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
4505
4515
|
{ code: "23505", raised_by: "_portal_config_judge,_share_write_person,_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,sign_request_cancel,sign_request_create,table_share_outside_resend,work_approval_decide,work_slot_hold" },
|
|
4506
|
-
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_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,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
4516
|
+
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_display_format_check,_display_spec_for,_entity_custom_fields_guard,_field_class_guard,_field_document_for,_field_shape_guard,_field_type_parity_guard,_merge_field_shape_guard,_merge_field_temporal_guard,_promoted_field_cap_guard,_record_rule_uses,_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,doc_sign,doc_signature_write,doc_template_save,entity_field_declare,entity_field_retire,entity_field_update,entity_records_find,entity_table,field_declare,field_retire,field_update,home_add,io_comment_write,io_import_rows,migrate_merge,migrate_purge_hard,portal_archive,portal_restore,record_restore,record_write_graph,relation_carry,relation_halves_repair,relation_own,sign_request_create,sign_request_sign,table_declare,table_from_example,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
4507
4517
|
{ code: "40001", raised_by: "has_visibility_at,table_move" },
|
|
4508
4518
|
{ code: "42501", raised_by: "_context_copy_fence,_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_portal_config_judge,_portal_principal_here,_rule_definition_write,_store_door,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_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,context_resolve,conversation_scope_bind,conversation_scope_unbind,dashboard_target_field_assert,doc_sign,enrich_declare,enrich_due,enrich_land,enrich_normalize,entity_field_declare,entity_field_retire,entity_field_update,entity_value_write,external_write_through,form_declare,form_draft_save,form_public_asks,form_submit,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,migrate_purge,migrate_purge_hard,migrate_purge_hard_request,migrate_reclass,my_levels,organization_clear,organization_contents,portal_declare,portal_form,portal_form_submit,portal_invitation,portal_invite,portal_invite_accept,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,read_records_archived,read_records_by_ids,read_records_matching,record_table,record_write_graph,relation_halves_disagreements,relation_halves_repair,resolve_context,scope_table_provision,share_grant,subscription_mute,subscription_preview,table_move,table_share_outside_accept,table_share_outside_grant,table_share_outside_invite,table_share_outside_resend,table_webhook_declare,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
4509
4519
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
@@ -8453,10 +8463,18 @@ function createRecordsClient(config) {
|
|
|
8453
8463
|
"viewRecordOrderSet"
|
|
8454
8464
|
);
|
|
8455
8465
|
},
|
|
8456
|
-
async readInViewOrder({ view_id, limit, offset }) {
|
|
8466
|
+
async readInViewOrder({ view_id, filter, limit, offset }) {
|
|
8467
|
+
const asked = filter && Object.keys(filter).length > 0 ? filter : null;
|
|
8457
8468
|
const door = await callDoor(
|
|
8458
8469
|
DOORS.readRecordsInViewOrder,
|
|
8459
|
-
{
|
|
8470
|
+
{
|
|
8471
|
+
p_organization_id: org,
|
|
8472
|
+
p_view_id: view_id,
|
|
8473
|
+
p_by_id: false,
|
|
8474
|
+
p_limit: limit ?? 200,
|
|
8475
|
+
p_offset: offset ?? 0,
|
|
8476
|
+
...asked ? { p_filter: asked } : {}
|
|
8477
|
+
},
|
|
8460
8478
|
"readInViewOrder"
|
|
8461
8479
|
);
|
|
8462
8480
|
if (!door.ok) return err(door.error);
|
|
@@ -9021,6 +9039,57 @@ function predictWriteRefusals(args) {
|
|
|
9021
9039
|
return found;
|
|
9022
9040
|
}
|
|
9023
9041
|
|
|
9042
|
+
// src/core/wholeValue.ts
|
|
9043
|
+
var WHOLE_VALUE_SOURCE_KIND = "whole_value_in_file";
|
|
9044
|
+
function asPointer(source) {
|
|
9045
|
+
if (!source || typeof source !== "object") return null;
|
|
9046
|
+
const s = source;
|
|
9047
|
+
if (s.kind !== WHOLE_VALUE_SOURCE_KIND || typeof s.file_id !== "string" || !s.file_id) return null;
|
|
9048
|
+
return s;
|
|
9049
|
+
}
|
|
9050
|
+
function wholeValueOf(document, key) {
|
|
9051
|
+
if (!document) return null;
|
|
9052
|
+
const envelope = (document._values ?? {})[key];
|
|
9053
|
+
const pointer = envelope?.src;
|
|
9054
|
+
if (typeof pointer !== "string") return null;
|
|
9055
|
+
return asPointer((document._sources ?? {})[pointer]);
|
|
9056
|
+
}
|
|
9057
|
+
function wholeValueOfRead(value) {
|
|
9058
|
+
return asPointer(value?.source ?? null);
|
|
9059
|
+
}
|
|
9060
|
+
function wholeValueSize(pointer) {
|
|
9061
|
+
const kb = pointer.bytes / 1024;
|
|
9062
|
+
return kb >= 1024 ? `${(kb / 1024).toFixed(1)} MB` : `${Math.round(kb)} KB`;
|
|
9063
|
+
}
|
|
9064
|
+
function wholeValueNotRead(words, pointer, why) {
|
|
9065
|
+
return `${words}\u2026 [This is the start of a ${wholeValueSize(pointer)} text kept as file ${pointer.file_id}` + (why ? `; it could not be read for this export: ${why}` : "") + "]";
|
|
9066
|
+
}
|
|
9067
|
+
async function withWholeValues(rows, read) {
|
|
9068
|
+
const texts = /* @__PURE__ */ new Map();
|
|
9069
|
+
const out = [];
|
|
9070
|
+
for (const row of rows) {
|
|
9071
|
+
const next = { ...row };
|
|
9072
|
+
for (const [key, value] of Object.entries(row)) {
|
|
9073
|
+
const pointer = wholeValueOfRead(value);
|
|
9074
|
+
if (!pointer || !value) continue;
|
|
9075
|
+
const words = typeof value.value === "string" ? value.value : "";
|
|
9076
|
+
if (!read) {
|
|
9077
|
+
next[key] = { ...value, value: wholeValueNotRead(words, pointer, "this screen has no way to read files"), source: null };
|
|
9078
|
+
continue;
|
|
9079
|
+
}
|
|
9080
|
+
if (!texts.has(pointer.file_id)) texts.set(pointer.file_id, read(pointer.file_id));
|
|
9081
|
+
try {
|
|
9082
|
+
next[key] = { ...value, value: await texts.get(pointer.file_id), source: null };
|
|
9083
|
+
} catch (thrown) {
|
|
9084
|
+
const why = thrown instanceof Error ? thrown.message : String(thrown);
|
|
9085
|
+
next[key] = { ...value, value: wholeValueNotRead(words, pointer, why), source: null };
|
|
9086
|
+
}
|
|
9087
|
+
}
|
|
9088
|
+
out.push(next);
|
|
9089
|
+
}
|
|
9090
|
+
return out;
|
|
9091
|
+
}
|
|
9092
|
+
|
|
9024
9093
|
// src/core/io.ts
|
|
9025
9094
|
var escape = (value) => /[",\n\r]/.test(value) ? `"${value.replace(/"/g, '""')}"` : value;
|
|
9026
9095
|
function cellText(value) {
|
|
@@ -9028,6 +9097,8 @@ function cellText(value) {
|
|
|
9028
9097
|
if (value.absent_reason) return `(${value.absent_reason})`;
|
|
9029
9098
|
const raw = value.value;
|
|
9030
9099
|
if (raw === null || raw === void 0) return "";
|
|
9100
|
+
const pointer = wholeValueOfRead(value);
|
|
9101
|
+
if (pointer && typeof raw === "string") return wholeValueNotRead(raw, pointer);
|
|
9031
9102
|
if (typeof raw === "string") return raw;
|
|
9032
9103
|
return JSON.stringify(raw);
|
|
9033
9104
|
}
|