@ai-matrx/records 0.39.0 → 0.41.0
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 +53 -27
- package/dist/core/index.cjs +28 -5
- package/dist/core/index.cjs.map +1 -1
- package/dist/core/index.d.cts +22 -2
- package/dist/core/index.d.ts +22 -2
- package/dist/core/index.js +28 -5
- package/dist/core/index.js.map +1 -1
- package/dist/{field-C5vJ0Kqv.d.cts → field-CVn0-HKo.d.cts} +54 -5
- package/dist/{field-C5vJ0Kqv.d.ts → field-CVn0-HKo.d.ts} +54 -5
- package/dist/index.cjs +15 -5
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +15 -5
- package/dist/index.js.map +1 -1
- package/dist/react/index.cjs +28 -5
- package/dist/react/index.cjs.map +1 -1
- package/dist/react/index.d.cts +73 -5
- package/dist/react/index.d.ts +73 -5
- package/dist/react/index.js +28 -5
- package/dist/react/index.js.map +1 -1
- package/dist/use-cases/index.cjs.map +1 -1
- package/dist/use-cases/index.d.cts +1 -1
- package/dist/use-cases/index.d.ts +1 -1
- package/dist/use-cases/index.js.map +1 -1
- package/package.json +1 -1
package/dist/react/index.d.cts
CHANGED
|
@@ -692,7 +692,7 @@ declare const STORE_DOORS: readonly [{
|
|
|
692
692
|
readonly name: "computed_provenance";
|
|
693
693
|
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
694
694
|
readonly returns: "TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)";
|
|
695
|
-
readonly security: "
|
|
695
|
+
readonly security: "definer";
|
|
696
696
|
}, {
|
|
697
697
|
readonly name: "containment_chain";
|
|
698
698
|
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
@@ -1458,6 +1458,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1458
1458
|
readonly args: "";
|
|
1459
1459
|
readonly returns: "trigger";
|
|
1460
1460
|
readonly security: "definer";
|
|
1461
|
+
}, {
|
|
1462
|
+
readonly name: "io_outbox_broadcast_stmt";
|
|
1463
|
+
readonly args: "";
|
|
1464
|
+
readonly returns: "trigger";
|
|
1465
|
+
readonly security: "definer";
|
|
1461
1466
|
}, {
|
|
1462
1467
|
readonly name: "io_outbox_drain";
|
|
1463
1468
|
readonly args: "p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100, p_event_key text DEFAULT 'records.changed'::text";
|
|
@@ -1583,6 +1588,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1583
1588
|
readonly args: "p_mask jsonb, p_key text";
|
|
1584
1589
|
readonly returns: "boolean";
|
|
1585
1590
|
readonly security: "invoker";
|
|
1591
|
+
}, {
|
|
1592
|
+
readonly name: "may_invite_outside";
|
|
1593
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
1594
|
+
readonly returns: "boolean";
|
|
1595
|
+
readonly security: "definer";
|
|
1586
1596
|
}, {
|
|
1587
1597
|
readonly name: "merge_field_kernel_id";
|
|
1588
1598
|
readonly args: "";
|
|
@@ -2068,6 +2078,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2068
2078
|
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";
|
|
2069
2079
|
readonly returns: "TABLE(id uuid, document jsonb, level permission_level)";
|
|
2070
2080
|
readonly security: "definer";
|
|
2081
|
+
}, {
|
|
2082
|
+
readonly name: "realtime_topic_admits";
|
|
2083
|
+
readonly args: "p_topic text";
|
|
2084
|
+
readonly returns: "boolean";
|
|
2085
|
+
readonly security: "definer";
|
|
2071
2086
|
}, {
|
|
2072
2087
|
readonly name: "record_aggregate";
|
|
2073
2088
|
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";
|
|
@@ -2578,6 +2593,36 @@ declare const STORE_DOORS: readonly [{
|
|
|
2578
2593
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_use text, p_record_type text DEFAULT NULL::text";
|
|
2579
2594
|
readonly returns: "SETOF custom.record";
|
|
2580
2595
|
readonly security: "invoker";
|
|
2596
|
+
}, {
|
|
2597
|
+
readonly name: "table_share_outside";
|
|
2598
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2599
|
+
readonly returns: "jsonb";
|
|
2600
|
+
readonly security: "definer";
|
|
2601
|
+
}, {
|
|
2602
|
+
readonly name: "table_share_outside_accept";
|
|
2603
|
+
readonly args: "p_token text";
|
|
2604
|
+
readonly returns: "jsonb";
|
|
2605
|
+
readonly security: "definer";
|
|
2606
|
+
}, {
|
|
2607
|
+
readonly name: "table_share_outside_for_me";
|
|
2608
|
+
readonly args: "";
|
|
2609
|
+
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)";
|
|
2610
|
+
readonly security: "definer";
|
|
2611
|
+
}, {
|
|
2612
|
+
readonly name: "table_share_outside_invite";
|
|
2613
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_email text, p_level permission_level DEFAULT 'viewer'::permission_level";
|
|
2614
|
+
readonly returns: "jsonb";
|
|
2615
|
+
readonly security: "definer";
|
|
2616
|
+
}, {
|
|
2617
|
+
readonly name: "table_share_outside_resend";
|
|
2618
|
+
readonly args: "p_organization_id uuid, p_invitation_id uuid";
|
|
2619
|
+
readonly returns: "jsonb";
|
|
2620
|
+
readonly security: "definer";
|
|
2621
|
+
}, {
|
|
2622
|
+
readonly name: "table_share_outside_revoke";
|
|
2623
|
+
readonly args: "p_organization_id uuid, p_invitation_id uuid";
|
|
2624
|
+
readonly returns: "jsonb";
|
|
2625
|
+
readonly security: "definer";
|
|
2581
2626
|
}, {
|
|
2582
2627
|
readonly name: "table_stage_field";
|
|
2583
2628
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
@@ -3027,6 +3072,10 @@ declare const STORE_KNOBS: readonly [{
|
|
|
3027
3072
|
readonly key: "member_default_visibility";
|
|
3028
3073
|
readonly value: "\"all_records\"";
|
|
3029
3074
|
readonly type: "enum";
|
|
3075
|
+
}, {
|
|
3076
|
+
readonly key: "outside_invite_who";
|
|
3077
|
+
readonly value: "\"org_admins_and_table_owners\"";
|
|
3078
|
+
readonly type: "string";
|
|
3030
3079
|
}, {
|
|
3031
3080
|
readonly key: "page_size_ceiling";
|
|
3032
3081
|
readonly value: "1000";
|
|
@@ -3092,7 +3141,7 @@ declare const STORE_KNOBS: readonly [{
|
|
|
3092
3141
|
*/
|
|
3093
3142
|
declare const STORE_REFUSAL_CODES: readonly [{
|
|
3094
3143
|
readonly code: "02000";
|
|
3095
|
-
readonly raised_by: "_checklist_instantiate,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
|
|
3144
|
+
readonly raised_by: "_checklist_instantiate,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
|
|
3096
3145
|
}, {
|
|
3097
3146
|
readonly code: "0A000";
|
|
3098
3147
|
readonly raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign";
|
|
@@ -3101,7 +3150,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3101
3150
|
readonly raised_by: "context_resolve";
|
|
3102
3151
|
}, {
|
|
3103
3152
|
readonly code: "22004";
|
|
3104
|
-
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3153
|
+
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3105
3154
|
}, {
|
|
3106
3155
|
readonly code: "22007";
|
|
3107
3156
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -3116,7 +3165,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3116
3165
|
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,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_submit,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,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate";
|
|
3117
3166
|
}, {
|
|
3118
3167
|
readonly code: "23505";
|
|
3119
|
-
readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,work_approval_decide,work_slot_hold";
|
|
3168
|
+
readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold";
|
|
3120
3169
|
}, {
|
|
3121
3170
|
readonly code: "23514";
|
|
3122
3171
|
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,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_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
@@ -3125,7 +3174,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3125
3174
|
readonly raised_by: "has_visibility_at";
|
|
3126
3175
|
}, {
|
|
3127
3176
|
readonly code: "42501";
|
|
3128
|
-
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3177
|
+
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3129
3178
|
}, {
|
|
3130
3179
|
readonly code: "42703";
|
|
3131
3180
|
readonly raised_by: "entity_table,portal_declare";
|
|
@@ -6698,6 +6747,25 @@ interface RecordsClient {
|
|
|
6698
6747
|
table_id: Uuid;
|
|
6699
6748
|
data: RecordDocument;
|
|
6700
6749
|
}): Promise<RecordsResult<Uuid>>;
|
|
6750
|
+
/**
|
|
6751
|
+
* Write MANY new records of one Table in one call.
|
|
6752
|
+
*
|
|
6753
|
+
* `custom.record_write_many` asks the switch, the organization and the Table
|
|
6754
|
+
* ONCE for the whole batch and inserts the rows in one statement — which is
|
|
6755
|
+
* why a paste of 120 lines is one round trip per chunk instead of 120. It
|
|
6756
|
+
* CREATES only: there is no bulk update door, because an update carries a
|
|
6757
|
+
* per-row optimistic version and a batch would have to either drop that or
|
|
6758
|
+
* fail the whole batch for one stale row.
|
|
6759
|
+
*
|
|
6760
|
+
* It returns the new ids IN THE ORDER THE ROWS WERE HANDED IN, so a caller
|
|
6761
|
+
* can tie each id back to the line of the spreadsheet it came from. Hand in
|
|
6762
|
+
* `ids` to choose them yourself; hand in none and the door mints them.
|
|
6763
|
+
*/
|
|
6764
|
+
recordWriteMany(args: {
|
|
6765
|
+
table_id: Uuid;
|
|
6766
|
+
rows: RecordDocument[];
|
|
6767
|
+
ids?: Uuid[];
|
|
6768
|
+
}): Promise<RecordsResult<Uuid[]>>;
|
|
6701
6769
|
recordUpdate(args: {
|
|
6702
6770
|
record_id: Uuid;
|
|
6703
6771
|
patch: Record<string, unknown>;
|
package/dist/react/index.d.ts
CHANGED
|
@@ -692,7 +692,7 @@ declare const STORE_DOORS: readonly [{
|
|
|
692
692
|
readonly name: "computed_provenance";
|
|
693
693
|
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
694
694
|
readonly returns: "TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)";
|
|
695
|
-
readonly security: "
|
|
695
|
+
readonly security: "definer";
|
|
696
696
|
}, {
|
|
697
697
|
readonly name: "containment_chain";
|
|
698
698
|
readonly args: "p_organization_id uuid, p_record_id uuid";
|
|
@@ -1458,6 +1458,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1458
1458
|
readonly args: "";
|
|
1459
1459
|
readonly returns: "trigger";
|
|
1460
1460
|
readonly security: "definer";
|
|
1461
|
+
}, {
|
|
1462
|
+
readonly name: "io_outbox_broadcast_stmt";
|
|
1463
|
+
readonly args: "";
|
|
1464
|
+
readonly returns: "trigger";
|
|
1465
|
+
readonly security: "definer";
|
|
1461
1466
|
}, {
|
|
1462
1467
|
readonly name: "io_outbox_drain";
|
|
1463
1468
|
readonly args: "p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100, p_event_key text DEFAULT 'records.changed'::text";
|
|
@@ -1583,6 +1588,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
1583
1588
|
readonly args: "p_mask jsonb, p_key text";
|
|
1584
1589
|
readonly returns: "boolean";
|
|
1585
1590
|
readonly security: "invoker";
|
|
1591
|
+
}, {
|
|
1592
|
+
readonly name: "may_invite_outside";
|
|
1593
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
1594
|
+
readonly returns: "boolean";
|
|
1595
|
+
readonly security: "definer";
|
|
1586
1596
|
}, {
|
|
1587
1597
|
readonly name: "merge_field_kernel_id";
|
|
1588
1598
|
readonly args: "";
|
|
@@ -2068,6 +2078,11 @@ declare const STORE_DOORS: readonly [{
|
|
|
2068
2078
|
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";
|
|
2069
2079
|
readonly returns: "TABLE(id uuid, document jsonb, level permission_level)";
|
|
2070
2080
|
readonly security: "definer";
|
|
2081
|
+
}, {
|
|
2082
|
+
readonly name: "realtime_topic_admits";
|
|
2083
|
+
readonly args: "p_topic text";
|
|
2084
|
+
readonly returns: "boolean";
|
|
2085
|
+
readonly security: "definer";
|
|
2071
2086
|
}, {
|
|
2072
2087
|
readonly name: "record_aggregate";
|
|
2073
2088
|
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";
|
|
@@ -2578,6 +2593,36 @@ declare const STORE_DOORS: readonly [{
|
|
|
2578
2593
|
readonly args: "p_organization_id uuid, p_table_id uuid, p_use text, p_record_type text DEFAULT NULL::text";
|
|
2579
2594
|
readonly returns: "SETOF custom.record";
|
|
2580
2595
|
readonly security: "invoker";
|
|
2596
|
+
}, {
|
|
2597
|
+
readonly name: "table_share_outside";
|
|
2598
|
+
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
2599
|
+
readonly returns: "jsonb";
|
|
2600
|
+
readonly security: "definer";
|
|
2601
|
+
}, {
|
|
2602
|
+
readonly name: "table_share_outside_accept";
|
|
2603
|
+
readonly args: "p_token text";
|
|
2604
|
+
readonly returns: "jsonb";
|
|
2605
|
+
readonly security: "definer";
|
|
2606
|
+
}, {
|
|
2607
|
+
readonly name: "table_share_outside_for_me";
|
|
2608
|
+
readonly args: "";
|
|
2609
|
+
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)";
|
|
2610
|
+
readonly security: "definer";
|
|
2611
|
+
}, {
|
|
2612
|
+
readonly name: "table_share_outside_invite";
|
|
2613
|
+
readonly args: "p_organization_id uuid, p_table_id uuid, p_email text, p_level permission_level DEFAULT 'viewer'::permission_level";
|
|
2614
|
+
readonly returns: "jsonb";
|
|
2615
|
+
readonly security: "definer";
|
|
2616
|
+
}, {
|
|
2617
|
+
readonly name: "table_share_outside_resend";
|
|
2618
|
+
readonly args: "p_organization_id uuid, p_invitation_id uuid";
|
|
2619
|
+
readonly returns: "jsonb";
|
|
2620
|
+
readonly security: "definer";
|
|
2621
|
+
}, {
|
|
2622
|
+
readonly name: "table_share_outside_revoke";
|
|
2623
|
+
readonly args: "p_organization_id uuid, p_invitation_id uuid";
|
|
2624
|
+
readonly returns: "jsonb";
|
|
2625
|
+
readonly security: "definer";
|
|
2581
2626
|
}, {
|
|
2582
2627
|
readonly name: "table_stage_field";
|
|
2583
2628
|
readonly args: "p_organization_id uuid, p_table_id uuid";
|
|
@@ -3027,6 +3072,10 @@ declare const STORE_KNOBS: readonly [{
|
|
|
3027
3072
|
readonly key: "member_default_visibility";
|
|
3028
3073
|
readonly value: "\"all_records\"";
|
|
3029
3074
|
readonly type: "enum";
|
|
3075
|
+
}, {
|
|
3076
|
+
readonly key: "outside_invite_who";
|
|
3077
|
+
readonly value: "\"org_admins_and_table_owners\"";
|
|
3078
|
+
readonly type: "string";
|
|
3030
3079
|
}, {
|
|
3031
3080
|
readonly key: "page_size_ceiling";
|
|
3032
3081
|
readonly value: "1000";
|
|
@@ -3092,7 +3141,7 @@ declare const STORE_KNOBS: readonly [{
|
|
|
3092
3141
|
*/
|
|
3093
3142
|
declare const STORE_REFUSAL_CODES: readonly [{
|
|
3094
3143
|
readonly code: "02000";
|
|
3095
|
-
readonly raised_by: "_checklist_instantiate,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
|
|
3144
|
+
readonly raised_by: "_checklist_instantiate,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state";
|
|
3096
3145
|
}, {
|
|
3097
3146
|
readonly code: "0A000";
|
|
3098
3147
|
readonly raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign";
|
|
@@ -3101,7 +3150,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3101
3150
|
readonly raised_by: "context_resolve";
|
|
3102
3151
|
}, {
|
|
3103
3152
|
readonly code: "22004";
|
|
3104
|
-
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3153
|
+
readonly raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare";
|
|
3105
3154
|
}, {
|
|
3106
3155
|
readonly code: "22007";
|
|
3107
3156
|
readonly raised_by: "dashboard_window_sql";
|
|
@@ -3116,7 +3165,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3116
3165
|
readonly raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,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_submit,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,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate";
|
|
3117
3166
|
}, {
|
|
3118
3167
|
readonly code: "23505";
|
|
3119
|
-
readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,work_approval_decide,work_slot_hold";
|
|
3168
|
+
readonly raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold";
|
|
3120
3169
|
}, {
|
|
3121
3170
|
readonly code: "23514";
|
|
3122
3171
|
readonly raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,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_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate";
|
|
@@ -3125,7 +3174,7 @@ declare const STORE_REFUSAL_CODES: readonly [{
|
|
|
3125
3174
|
readonly raised_by: "has_visibility_at";
|
|
3126
3175
|
}, {
|
|
3127
3176
|
readonly code: "42501";
|
|
3128
|
-
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3177
|
+
readonly raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person";
|
|
3129
3178
|
}, {
|
|
3130
3179
|
readonly code: "42703";
|
|
3131
3180
|
readonly raised_by: "entity_table,portal_declare";
|
|
@@ -6698,6 +6747,25 @@ interface RecordsClient {
|
|
|
6698
6747
|
table_id: Uuid;
|
|
6699
6748
|
data: RecordDocument;
|
|
6700
6749
|
}): Promise<RecordsResult<Uuid>>;
|
|
6750
|
+
/**
|
|
6751
|
+
* Write MANY new records of one Table in one call.
|
|
6752
|
+
*
|
|
6753
|
+
* `custom.record_write_many` asks the switch, the organization and the Table
|
|
6754
|
+
* ONCE for the whole batch and inserts the rows in one statement — which is
|
|
6755
|
+
* why a paste of 120 lines is one round trip per chunk instead of 120. It
|
|
6756
|
+
* CREATES only: there is no bulk update door, because an update carries a
|
|
6757
|
+
* per-row optimistic version and a batch would have to either drop that or
|
|
6758
|
+
* fail the whole batch for one stale row.
|
|
6759
|
+
*
|
|
6760
|
+
* It returns the new ids IN THE ORDER THE ROWS WERE HANDED IN, so a caller
|
|
6761
|
+
* can tie each id back to the line of the spreadsheet it came from. Hand in
|
|
6762
|
+
* `ids` to choose them yourself; hand in none and the door mints them.
|
|
6763
|
+
*/
|
|
6764
|
+
recordWriteMany(args: {
|
|
6765
|
+
table_id: Uuid;
|
|
6766
|
+
rows: RecordDocument[];
|
|
6767
|
+
ids?: Uuid[];
|
|
6768
|
+
}): Promise<RecordsResult<Uuid[]>>;
|
|
6701
6769
|
recordUpdate(args: {
|
|
6702
6770
|
record_id: Uuid;
|
|
6703
6771
|
patch: Record<string, unknown>;
|
package/dist/react/index.js
CHANGED
|
@@ -208,7 +208,7 @@ var STORE_DOORS = [
|
|
|
208
208
|
{ name: "comment_thread", args: "p_organization_id uuid, p_record_id uuid, p_include_resolved boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
209
209
|
{ name: "comment_write", 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[]", returns: "jsonb", security: "definer" },
|
|
210
210
|
{ name: "computed_block", args: "p_block jsonb", returns: "jsonb", security: "invoker" },
|
|
211
|
-
{ name: "computed_provenance", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)", security: "
|
|
211
|
+
{ name: "computed_provenance", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(field_key text, field_id uuid, value jsonb, rule_id uuid, rule_version integer, computed_at timestamp with time zone)", security: "definer" },
|
|
212
212
|
{ name: "containment_chain", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(ancestor_id uuid, depth integer)", security: "invoker" },
|
|
213
213
|
{ name: "containment_depth_ceiling", args: "p_organization_id uuid DEFAULT NULL::uuid", returns: "integer", security: "invoker" },
|
|
214
214
|
{ name: "containment_edges", args: "p_organization_id uuid", returns: "TABLE(parent_id uuid, child_id uuid, via text)", security: "invoker" },
|
|
@@ -362,6 +362,7 @@ var STORE_DOORS = [
|
|
|
362
362
|
{ name: "io_infer_type", args: "p_samples jsonb", returns: "text", security: "invoker" },
|
|
363
363
|
{ name: "io_money_unit", args: "p_word text", returns: "text", security: "invoker" },
|
|
364
364
|
{ name: "io_outbox_announce", args: "", returns: "trigger", security: "definer" },
|
|
365
|
+
{ name: "io_outbox_broadcast_stmt", args: "", returns: "trigger", security: "definer" },
|
|
365
366
|
{ name: "io_outbox_drain", args: "p_organization_id uuid, p_consumer text, p_limit integer DEFAULT 100, p_event_key text DEFAULT 'records.changed'::text", 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)", security: "definer" },
|
|
366
367
|
{ name: "io_outbox_release", args: "p_organization_id uuid, p_consumer text, p_older_than interval DEFAULT '00:15:00'::interval", returns: "integer", security: "definer" },
|
|
367
368
|
{ name: "io_proposal_accept", args: "p_organization_id uuid, p_import_id uuid, p_column text, p_type text DEFAULT NULL::text, p_label text DEFAULT NULL::text", returns: "uuid", security: "definer" },
|
|
@@ -387,6 +388,7 @@ var STORE_DOORS = [
|
|
|
387
388
|
{ name: "mask_document", args: "p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb", returns: "jsonb", security: "invoker" },
|
|
388
389
|
{ name: "mask_document", args: "p_document jsonb, p_visible_keys text[], p_notices jsonb, p_by_id boolean DEFAULT false, p_key_ids jsonb DEFAULT '{}'::jsonb, p_declared_keys text[] DEFAULT NULL::text[]", returns: "jsonb", security: "invoker" },
|
|
389
390
|
{ name: "mask_says_withheld", args: "p_mask jsonb, p_key text", returns: "boolean", security: "invoker" },
|
|
391
|
+
{ name: "may_invite_outside", args: "p_organization_id uuid, p_table_id uuid", returns: "boolean", security: "definer" },
|
|
390
392
|
{ name: "merge_field_kernel_id", args: "", returns: "uuid", security: "invoker" },
|
|
391
393
|
{ name: "migrate_choice_keys", args: "p_organization_id uuid, p_table_id uuid, p_dry_run boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
392
394
|
{ name: "migrate_delete", args: "p_organization_id uuid, p_record_id uuid, p_note text DEFAULT NULL::text", returns: "jsonb", security: "definer" },
|
|
@@ -484,6 +486,7 @@ var STORE_DOORS = [
|
|
|
484
486
|
{ name: "read_paths_outside_the_door", args: "", returns: "TABLE(object_name text, why text)", security: "invoker" },
|
|
485
487
|
{ name: "read_record", args: "p_organization_id uuid, p_record_id uuid, p_by_id boolean DEFAULT false", returns: "jsonb", security: "definer" },
|
|
486
488
|
{ 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" },
|
|
489
|
+
{ name: "realtime_topic_admits", args: "p_topic text", returns: "boolean", security: "definer" },
|
|
487
490
|
{ name: "record_aggregate", args: "p_organization_id uuid, p_table_id uuid, p_group_by jsonb DEFAULT '[]'::jsonb, p_measures jsonb DEFAULT '[]'::jsonb, p_bucket jsonb DEFAULT NULL::jsonb, p_filter jsonb DEFAULT '{}'::jsonb, p_limit integer DEFAULT 200, p_required text DEFAULT 'viewer'::text", returns: "TABLE(groups jsonb, measures jsonb, row_count bigint)", security: "definer" },
|
|
488
491
|
{ name: "record_applicability", args: "p_organization_id uuid, p_record_id uuid", returns: "TABLE(rule_id uuid, rule_name text, rule_version integer, applies boolean, answer jsonb)", security: "invoker" },
|
|
489
492
|
{ name: "record_as_of", args: "p_organization_id uuid, p_record_id uuid, p_at timestamp with time zone", returns: "TABLE(state jsonb, replayed boolean)", security: "definer" },
|
|
@@ -586,6 +589,12 @@ var STORE_DOORS = [
|
|
|
586
589
|
{ name: "table_record_ceiling", args: "", returns: "integer", security: "invoker" },
|
|
587
590
|
{ name: "table_record_ceiling", args: "p_organization_id uuid", returns: "integer", security: "invoker" },
|
|
588
591
|
{ name: "table_rules", args: "p_organization_id uuid, p_table_id uuid, p_use text, p_record_type text DEFAULT NULL::text", returns: "SETOF custom.record", security: "invoker" },
|
|
592
|
+
{ name: "table_share_outside", args: "p_organization_id uuid, p_table_id uuid", returns: "jsonb", security: "definer" },
|
|
593
|
+
{ name: "table_share_outside_accept", args: "p_token text", returns: "jsonb", security: "definer" },
|
|
594
|
+
{ name: "table_share_outside_for_me", args: "", 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)", security: "definer" },
|
|
595
|
+
{ name: "table_share_outside_invite", args: "p_organization_id uuid, p_table_id uuid, p_email text, p_level permission_level DEFAULT 'viewer'::permission_level", returns: "jsonb", security: "definer" },
|
|
596
|
+
{ name: "table_share_outside_resend", args: "p_organization_id uuid, p_invitation_id uuid", returns: "jsonb", security: "definer" },
|
|
597
|
+
{ name: "table_share_outside_revoke", args: "p_organization_id uuid, p_invitation_id uuid", returns: "jsonb", security: "definer" },
|
|
589
598
|
{ name: "table_stage_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
590
599
|
{ name: "table_storage", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "invoker" },
|
|
591
600
|
{ name: "table_type_field", args: "p_organization_id uuid, p_table_id uuid", returns: "text", security: "definer" },
|
|
@@ -684,6 +693,7 @@ var STORE_KNOBS = [
|
|
|
684
693
|
{ key: "inbound_domain", value: '"inbound.matrxserver.com"', type: "string" },
|
|
685
694
|
{ key: "member_default_level", value: '"viewer"', type: "enum" },
|
|
686
695
|
{ key: "member_default_visibility", value: '"all_records"', type: "enum" },
|
|
696
|
+
{ key: "outside_invite_who", value: '"org_admins_and_table_owners"', type: "string" },
|
|
687
697
|
{ key: "page_size_ceiling", value: "1000", type: "integer" },
|
|
688
698
|
{ key: "provenance_retention_days", value: "30", type: "number" },
|
|
689
699
|
{ key: "records_tool_default", value: "true", type: "boolean" },
|
|
@@ -700,18 +710,18 @@ var STORE_KNOBS = [
|
|
|
700
710
|
{ key: "world_publish_enabled", value: "false", type: "boolean" }
|
|
701
711
|
];
|
|
702
712
|
var STORE_REFUSAL_CODES = [
|
|
703
|
-
{ code: "02000", raised_by: "_checklist_instantiate,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
|
|
713
|
+
{ code: "02000", raised_by: "_checklist_instantiate,checklist_declare,checklist_run,checklist_step_complete,checklist_step_refusal,checklist_template_shape,conversation_scope_bind,dashboard_delete,dashboard_run,doc_letterhead,doc_render_body,doc_render_document,doc_render_read,doc_sign,doc_signature_intact,doc_signature_read,doc_template_delete,doc_template_read,doc_template_save,enrich_pin,entity_field_retire,entity_field_update,entity_record_read,entity_value_write,external_history_event,external_rows,external_stub_upsert,external_writes_set,io_restore,migrate_delete,migrate_extract_parent,migrate_merge,migrate_reclass,migrate_rename,migrate_reparent,migrate_retype,migrate_split,migrate_undo,organization_clear,portal_card,portal_declare,portal_invite,portal_preview,portal_principal_bind,portal_revoke,read_record,record_delete,record_restore,record_restore_preview,record_table,record_update,relation_uncarry,share_access,share_grant,share_lane_set,share_people,share_revoke,sign_request_cancel,sign_request_create,sign_request_remind,sign_request_unchanged,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,table_share_outside_revoke,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_assign,work_record_states,work_set_state" },
|
|
704
714
|
{ code: "0A000", raised_by: "checklist_step_complete,external_rows,external_source_declare,external_write_through,promote_field,promoted_index_expr,promoted_query_sql,promoted_read,rule_eval,work_assign" },
|
|
705
715
|
{ code: "22003", raised_by: "context_resolve" },
|
|
706
|
-
{ code: "22004", raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
|
|
716
|
+
{ code: "22004", raised_by: "_entity_custom_fields_guard,_value_envelope,actor_word,agg_assert_key,agg_sql,anon_capture,anon_token_issue,anon_write,assert_client_may_reach,booking_declare,capture_submit,checklist_declare,context_resolve,dashboard_block_normalize,dashboard_declare,dashboard_window_sql,doc_render_write,doc_sign,doc_signature_write,doc_template_save,enrich_land,enrich_normalize,external_history_event,external_rows,external_source_declare,external_stub_upsert,external_write_through,external_writes_set,field_history,form_declare,form_submit,home_add,io_comment_write,io_import_begin,io_infer_column,io_outbox_drain,io_restore,migrate_choice_keys,migrate_purge,migrate_reclass,migrate_split,migrate_undo,organization_clear,organization_contents,pipeline_declare,pipeline_gate_preview,portal_declare,portal_invite,portal_principal_bind,provenance_retention_days,provenance_write,query_across_homes,query_by_coordinates,query_rollup,record_delete,record_reparent,record_resolve,record_restore,record_update,record_write,record_write_many,relation_carry,relation_own,rule_declare,share_grant,sign_request_create,sign_request_sign,subscription_declare,table_declare,table_share_outside_invite,value_restore,view_declare,work_approval_decide,work_approval_request,work_template_declare" },
|
|
707
717
|
{ code: "22007", raised_by: "dashboard_window_sql" },
|
|
708
718
|
{ code: "22012", raised_by: "rule_eval" },
|
|
709
719
|
{ code: "22023", raised_by: "_booking_availability,_entity_custom_fields_guard,_value_envelope,_work_shape_guard,actor_word,agg_assert_key,agg_sql,anon_token_issue,booking_declare,containment_parent,dashboard_block_normalize,dashboard_window_sql,doc_render_body,doc_render_write,doc_signature_write,enrich_declare,enrich_land,enrich_normalize,enrich_pin,entity_value_write,external_history_event,external_source_declare,external_stub_upsert,external_write_through,field_history,io_export,io_import_begin,io_import_finish,io_import_plan,io_import_report,io_proposal_accept,migrate_merge,migrate_reclass,my_levels,organization_clear,page_size,pin_agent_cells,pipeline_move,portal_declare,provenance_write,query_by_coordinates,query_rollup,record_update,record_write_many,relation_carry,rule_eval,rule_members,share_grant,share_lane_set,sign_request_create,sign_request_sign,subscription_declare,table_rules,visibility_as_of,work_approval_request,work_list,work_slot_hold" },
|
|
710
720
|
{ code: "23503", raised_by: "_booking_availability,_checklist_instantiate,_containment_guard,_field_document_for,_pipeline_stage_key,_record_rule_uses,agg_digest_assemble,anon_publish,anon_rate_take,anon_token_issue,anon_write,assert_organization_wall,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_submit,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,record_applicability,record_reparent,relation_carry,relation_own,resolve_first_match,rule_applies,rule_declare,rule_eval,rule_members,rule_run,sign_request_create,subscription_mute,subscription_preview,view_declare,work_set_state,work_take_assignment,work_template_instantiate" },
|
|
711
|
-
{ code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,work_approval_decide,work_slot_hold" },
|
|
721
|
+
{ code: "23505", raised_by: "_unique_rule_holds,doc_sign,doc_signature_write,entity_field_declare,field_declare,home_add,inbound_declare,io_proposal_accept,relation_carry,relation_own,share_grant,sign_request_cancel,sign_request_create,table_share_outside_invite,table_share_outside_resend,work_approval_decide,work_slot_hold" },
|
|
712
722
|
{ code: "23514", raised_by: "_checklist_instantiate,_checklist_step_guard,_containment_guard,_dated_values_guard,_derived_fields,_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,_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,_work_shape_guard,_workdoors_approval_guard,assert_columns_are_defined,assert_entity_is_organization_scoped,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_import_rows,migrate_merge,relation_carry,relation_own,sign_request_create,sign_request_sign,table_declare,validate_value_envelope,validate_values,work_set_state,work_slots_declare,work_take_assignment,work_template_instantiate" },
|
|
713
723
|
{ code: "40001", raised_by: "has_visibility_at" },
|
|
714
|
-
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
724
|
+
{ code: "42501", raised_by: "_doc_render_immutable,_doc_signature_immutable,_field_definition_write,_field_write_door,_rule_definition_write,_store_door,anon_capture,anon_inbound_land,anon_publish,anon_token_issue,anon_token_verify,anon_write,assert_client_may_change,assert_client_may_open,assert_client_may_reach,assert_may_know_table,assert_organization_admin,assert_store_door,booking_confirm,booking_declare,booking_hold,capture_submit,checklist_run,comment_write,conversation_scope_bind,conversation_scope_unbind,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_submit,inbound_mail_land,io_comment_resolve,io_comment_write,io_import_begin,io_import_finish,io_restore,migrate_purge,migrate_reclass,my_levels,organization_clear,portal_declare,portal_invitation,portal_invite,portal_principal_bind,promote_table,query_visibility_parity,read_record,read_records,record_table,share_grant,subscription_mute,subscription_preview,table_share_outside_accept,table_share_outside_invite,table_share_outside_resend,visibility_as_of,work_approval_decide,work_approval_read,work_approval_request,work_person" },
|
|
715
725
|
{ code: "42703", raised_by: "entity_table,portal_declare" },
|
|
716
726
|
{ code: "53400", raised_by: "anon_rate_take,delete_cascade_closure,enrich_due,enrich_land,promote_field" },
|
|
717
727
|
{ code: "54001", raised_by: "record_delete" },
|
|
@@ -1800,6 +1810,7 @@ var DOORS = {
|
|
|
1800
1810
|
queryRecordAsOf: "query_record_as_of",
|
|
1801
1811
|
queryTableAsOf: "query_table_as_of",
|
|
1802
1812
|
recordWrite: "record_write",
|
|
1813
|
+
recordWriteMany: "record_write_many",
|
|
1803
1814
|
recordUpdate: "record_update",
|
|
1804
1815
|
recordDelete: "record_delete",
|
|
1805
1816
|
recordRestore: "record_restore",
|
|
@@ -2373,6 +2384,18 @@ function createRecordsClient(config) {
|
|
|
2373
2384
|
"recordWrite"
|
|
2374
2385
|
);
|
|
2375
2386
|
},
|
|
2387
|
+
async recordWriteMany({ table_id, rows, ids }) {
|
|
2388
|
+
return callDoor(
|
|
2389
|
+
DOORS.recordWriteMany,
|
|
2390
|
+
{
|
|
2391
|
+
p_organization_id: org,
|
|
2392
|
+
p_table_id: table_id,
|
|
2393
|
+
p_rows: rows,
|
|
2394
|
+
...ids === void 0 ? {} : { p_ids: ids }
|
|
2395
|
+
},
|
|
2396
|
+
"recordWriteMany"
|
|
2397
|
+
);
|
|
2398
|
+
},
|
|
2376
2399
|
async recordUpdate({ record_id, patch, expectedVersion }) {
|
|
2377
2400
|
const result = await callDoor(
|
|
2378
2401
|
DOORS.recordUpdate,
|