@nivaro/sdk 0.1.25 → 0.1.27

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/README.md CHANGED
@@ -1889,6 +1889,81 @@ When SLA rules, scheduled flows, or other time-tracking systems are active:
1889
1889
 
1890
1890
  ---
1891
1891
 
1892
+ ## SDK — Layout Editor
1893
+
1894
+ The layout editor saves through a bundle + ops model: read the layout as `{ layout, groups, placements, rev }`, send a batch of small ops with the `rev` you read, and get the new bundle back. A batch applies all or nothing. Every call below except the picker and scheduled-change tools is admin only.
1895
+
1896
+ ```typescript
1897
+ import {
1898
+ readLayoutBundle, submitLayoutOps,
1899
+ readLayoutOverview, explainLayout,
1900
+ createCollectionLayout, cloneLayout, readActiveLayout
1901
+ } from '@nivaro/sdk'
1902
+
1903
+ const bundle = await nivaro.request(readLayoutBundle(42))
1904
+
1905
+ try {
1906
+ const next = await nivaro.request(
1907
+ submitLayoutOps(42, {
1908
+ base_rev: bundle.rev,
1909
+ note: 'Move Status into the header',
1910
+ ops: [
1911
+ { op: 'move', from: { field: 'status', group_key: 'details' }, to_group_key: null, index: 0 },
1912
+ { op: 'update_placement', at: { field: 'owner', group_key: null }, patch: { col_span: 6 } },
1913
+ { op: 'layout_update', patch: { disable_clone: true } }
1914
+ ]
1915
+ })
1916
+ )
1917
+ } catch (err) {
1918
+ // 409 { error: 'stale', bundle }: the layout changed since base_rev. Re-apply on err.response.bundle.
1919
+ // 400 { error, op_index }: the op at op_index was refused; nothing was saved.
1920
+ }
1921
+ ```
1922
+
1923
+ The op union (`LayoutOp`), `LayoutBundle`, `PlacementPatch`, `GroupPatch` and `LayoutPatch` are exported as types, with `PLACEMENT_PATCH_KEYS`, `GROUP_PATCH_KEYS` and `LAYOUT_PATCH_KEYS` as runtime lists. A batch holds at most 500 ops.
1924
+
1925
+ #### Commands
1926
+
1927
+ | Command | Route | Notes |
1928
+ | --- | --- | --- |
1929
+ | readLayoutBundle(id) | GET /collection-layouts/:id/bundle | Returns the bundle itself (no `data` wrapper). |
1930
+ | submitLayoutOps(id, { ops, base_rev, note? }) | POST /collection-layouts/:id/ops | Returns the new bundle; 409 stale carries the current bundle, 400 carries `op_index`. |
1931
+ | readLayoutOverview(collection) | GET /collection-layouts/overview | Every layout, sectioned the way the active-layout resolution checks them, with references and warnings. |
1932
+ | explainLayout({ collection, item?, role_id?, slug? }) | GET /collection-layouts/explain | Which layout a record opens with, why, and each candidate's check. |
1933
+ | createCollectionLayout(collection, name, { slug?, layout_type?, seed_fields? }) | POST /collection-layouts | `seed_fields` starts the layout with one Main section holding every visible field. |
1934
+ | cloneLayout(id, name, { slug?, layout_type? }) | POST /collection-layouts/:id/clone | The copy starts hidden from the New menu (`create_hidden`); an admin opts it in. |
1935
+ | readActiveLayout(collection, { slug?, item? }) | GET /collection-layouts/active | Placements carry `col_span`; the result includes `ungrouped_sort`. |
1936
+ | updateCollectionLayout(id, patch) | PATCH /collection-layouts/:id | Any `LayoutPatch` setting. |
1937
+ | readLayoutVersion / diffLayoutVersion / restoreLayoutVersion | /collection-layouts/:id/versions/... | A restore snapshots the current state first, so it is reversible. |
1938
+ | projectFieldConfig(collection, placements) | POST /field-config/:collection/project | The field-config rows a draft would produce. A read; writes nothing. |
1939
+ | listInternalWidgetPlacements(widgetId) | GET /widgets-internal/:id/placements | The layouts that place a widget. |
1940
+
1941
+ #### Layout-gated record tools
1942
+
1943
+ Disabling a record in pickers and scheduling a change accept `layout`, the `?layout=` slug of the form the record was opened with. A non-admin may use them only when that form grants it (`allow_disable_pickers`, `allow_schedule`) and they may update the record. Scheduled changes for non-admins are limited to real, writable columns they may update; a read-only, computed or alias field is refused with 400.
1944
+
1945
+ ```typescript
1946
+ import { excludeFromPickers, includeInPickers, createScheduledChange } from '@nivaro/sdk'
1947
+
1948
+ await nivaro.request(excludeFromPickers({ collection: 'vendors', item_id: 17, layout: 'intake' }))
1949
+ await nivaro.request(includeInPickers({ collection: 'vendors', item_id: 17, layout: 'intake' }))
1950
+
1951
+ await nivaro.request(
1952
+ createScheduledChange({
1953
+ collection: 'vendors',
1954
+ item_id: '17',
1955
+ change_type: 'field_update',
1956
+ changes: { status: 'inactive' },
1957
+ scheduled_at: '2026-12-01T09:00:00Z',
1958
+ layout: 'intake'
1959
+ })
1960
+ )
1961
+ ```
1962
+
1963
+ > **Note:** Retired layout settings are no longer writable: `summary_show_all`, `allow_clone` (use `disable_clone`), `addendum_lock_fields` and `hide_actions_when_collapsed`. They stay optional and deprecated on the `CollectionLayout` read type.
1964
+
1965
+ ---
1966
+
1892
1967
  ## SDK — Schema Snapshots
1893
1968
 
1894
1969
  Capture point-in-time snapshots of your entire metadata registry (collections, fields, relations). Useful for version control, environment promotion, and disaster recovery.
package/dist/index.d.ts CHANGED
@@ -3149,6 +3149,12 @@ declare function createScheduledChange(body: {
3149
3149
  changes: Record<string, unknown>;
3150
3150
  /** ISO date string. */
3151
3151
  scheduled_at: string;
3152
+ /**
3153
+ * The ?layout= slug of the form the record was opened with. A non-admin may
3154
+ * schedule only when that form grants it (allow_schedule) and only fields
3155
+ * they may update that are real, writable columns.
3156
+ */
3157
+ layout?: string | null;
3152
3158
  }): Command<{
3153
3159
  data: ScheduledChange;
3154
3160
  }>;
@@ -3198,8 +3204,12 @@ interface FieldConfig {
3198
3204
  repeater_schema: unknown | null;
3199
3205
  is_translatable: boolean;
3200
3206
  }
3201
- declare function readFieldConfig(collection: string): Command<{
3207
+ /** Field config overlaid with a layout's placements (`layout_id`, else the active layout). */
3208
+ declare function readFieldConfig(collection: string, opts?: {
3209
+ layout_id?: number;
3210
+ }): Command<{
3202
3211
  data: FieldConfig[];
3212
+ ungrouped_sort?: number | null;
3203
3213
  }>;
3204
3214
  /** Update one field's behavioral config (admin). */
3205
3215
  declare function updateFieldConfig(collection: string, field: string, body: Partial<Omit<FieldConfig, 'field'>>): Command<{
@@ -3667,6 +3677,376 @@ declare function readDistinctValues(collection: string, field: string, options?:
3667
3677
  data: unknown[];
3668
3678
  }>;
3669
3679
 
3680
+ /**
3681
+ * Layout editor commands: the bundle + atomic ops save model, the overview and
3682
+ * "which form opens" explain reads, the editor's read-only canvas projection,
3683
+ * and the layout-gated record tools (picker toggle, scheduled changes).
3684
+ *
3685
+ * The block between the BEGIN/END markers mirrors
3686
+ * packages/shared/src/lib/layout-ops.ts (types and patch-key lists) so the SDK
3687
+ * needs no runtime dependency on @nivaro/shared. It must stay byte-identical:
3688
+ * packages/shared/src/lib/layout-ops-sdk.test.ts fails when the two drift.
3689
+ */
3690
+
3691
+ type PlacementKey = {
3692
+ field: string;
3693
+ group_key: string | null;
3694
+ };
3695
+ interface PlacementPatch {
3696
+ label_override?: string | null;
3697
+ is_visible?: boolean;
3698
+ default_expanded?: boolean;
3699
+ col_span?: number | null;
3700
+ overrides?: unknown;
3701
+ show_row_revisions?: boolean;
3702
+ allow_revision_restore?: boolean | null;
3703
+ lock_conditions?: string | null;
3704
+ input_bindings?: unknown;
3705
+ widget_id?: number | null;
3706
+ show_approval_chain?: boolean;
3707
+ }
3708
+ interface PlacementRow {
3709
+ id?: number;
3710
+ field: string;
3711
+ group_key: string | null;
3712
+ sort: number;
3713
+ label_override: string | null;
3714
+ is_visible: boolean;
3715
+ default_expanded: boolean;
3716
+ col_span: number | null;
3717
+ overrides: unknown;
3718
+ show_row_revisions: boolean;
3719
+ allow_revision_restore: boolean | null;
3720
+ lock_conditions: string | null;
3721
+ input_bindings: unknown;
3722
+ widget_id: number | null;
3723
+ show_approval_chain: boolean;
3724
+ }
3725
+ /** Group JSON settings (summary_fields, swap_config, …) travel as their stored JSON text. */
3726
+ interface GroupPatch {
3727
+ label?: string;
3728
+ type?: string;
3729
+ icon?: string | null;
3730
+ is_collapsed?: boolean;
3731
+ tab_mode?: string | null;
3732
+ hide_when_empty?: boolean;
3733
+ visibility_mode?: string | null;
3734
+ summary_fields?: string | null;
3735
+ summary_hide_empty?: boolean;
3736
+ swap_config?: string | null;
3737
+ skip_if_filled?: string | null;
3738
+ content?: string | null;
3739
+ content_tone?: string | null;
3740
+ visible_when?: string | null;
3741
+ hidden_for_roles?: string | null;
3742
+ locked_for_roles?: string | null;
3743
+ read_width?: string | null;
3744
+ /** #2608: an editor-only note, JSON {text, by, by_name, at}. Never sent to record pages. */
3745
+ editor_note?: string | null;
3746
+ /** Label translations per locale, JSON `{ "es": { "label": "…" } }` (#2665). */
3747
+ i18n?: string | null;
3748
+ }
3749
+ interface GroupRow {
3750
+ id?: number;
3751
+ key: string;
3752
+ parent_key: string | null;
3753
+ sort: number;
3754
+ label: string;
3755
+ type: string;
3756
+ icon: string | null;
3757
+ is_collapsed: boolean;
3758
+ tab_mode: string | null;
3759
+ hide_when_empty: boolean;
3760
+ visibility_mode: string | null;
3761
+ summary_fields: string | null;
3762
+ summary_hide_empty: boolean;
3763
+ swap_config: string | null;
3764
+ skip_if_filled: string | null;
3765
+ content: string | null;
3766
+ content_tone: string | null;
3767
+ visible_when: string | null;
3768
+ hidden_for_roles: string | null;
3769
+ locked_for_roles: string | null;
3770
+ read_width: string | null;
3771
+ /** #2608 — absent on databases without the column (migration 460). */
3772
+ editor_note?: string | null;
3773
+ /** Label translations per locale (#2665); absent before migration 465. */
3774
+ i18n?: string | null;
3775
+ }
3776
+ /** The layout settings PATCH /collection-layouts/:id accepts. */
3777
+ type LayoutPatch = Partial<{
3778
+ name: string;
3779
+ slug: string | null;
3780
+ create_label: string | null;
3781
+ create_hidden: boolean;
3782
+ sort: number;
3783
+ is_active: boolean;
3784
+ disable_comments: boolean;
3785
+ disable_tasks: boolean;
3786
+ tab_mode: string;
3787
+ validate_before_next: boolean;
3788
+ summary_enabled: boolean;
3789
+ summary_hide_empty: boolean;
3790
+ ai_enabled: boolean;
3791
+ accordion_mode: boolean;
3792
+ disable_revisions: boolean;
3793
+ disable_clone: boolean;
3794
+ disable_delete: boolean;
3795
+ row_order_field: string | null;
3796
+ pdf_theme: string | null;
3797
+ pdf_template_id: number | null;
3798
+ pdf_cover_enabled: boolean;
3799
+ pdf_cover_title_field: string | null;
3800
+ pdf_cover_subtitle: string | null;
3801
+ pdf_show_logo: boolean;
3802
+ pdf_page_size: string;
3803
+ pdf_orientation: string;
3804
+ pdf_button_label: string | null;
3805
+ conditions: {
3806
+ role_ids?: string[];
3807
+ } | null;
3808
+ allow_schedule: boolean;
3809
+ allow_disable_pickers: boolean;
3810
+ layout_type: string;
3811
+ addendum_layout_id: number | null;
3812
+ workflow_template_id: string | null;
3813
+ single_active_addendum: boolean;
3814
+ addendum_default_view: boolean;
3815
+ record_conditions: Array<{
3816
+ field: string;
3817
+ op: string;
3818
+ value?: unknown;
3819
+ }> | null;
3820
+ default_values: Record<string, unknown> | null;
3821
+ display_mode: string | null;
3822
+ parent_layout_id: number | null;
3823
+ hide_integrity_banner: boolean;
3824
+ hide_sla_banner: boolean;
3825
+ changes_tray: boolean;
3826
+ dossier_enabled: boolean;
3827
+ dossier_label: string | null;
3828
+ quick_picker: string[] | null;
3829
+ sheet_width: number | null;
3830
+ header_fields: string[] | null;
3831
+ hide_empty: boolean;
3832
+ /** Required change note (#2654): null = off, 'note' = a reason, 'note_ticket' = reason + ticket. */
3833
+ change_note: 'note' | 'note_ticket' | null;
3834
+ }>;
3835
+ type LayoutRow = Record<string, unknown> & {
3836
+ id: number;
3837
+ collection: string;
3838
+ };
3839
+ type LayoutOp = {
3840
+ op: 'place';
3841
+ field: string;
3842
+ group_key: string | null;
3843
+ index: number;
3844
+ patch?: PlacementPatch;
3845
+ } | {
3846
+ op: 'move';
3847
+ from: PlacementKey;
3848
+ to_group_key: string | null;
3849
+ index: number;
3850
+ } | {
3851
+ op: 'update_placement';
3852
+ at: PlacementKey;
3853
+ patch: PlacementPatch;
3854
+ } | {
3855
+ op: 'remove';
3856
+ at: PlacementKey;
3857
+ } | {
3858
+ op: 'group_create';
3859
+ key: string;
3860
+ label: string;
3861
+ group_type: string;
3862
+ parent_key: string | null;
3863
+ index: number;
3864
+ patch?: GroupPatch;
3865
+ } | {
3866
+ op: 'group_update';
3867
+ key: string;
3868
+ patch: GroupPatch;
3869
+ } | {
3870
+ op: 'group_move';
3871
+ key: string;
3872
+ parent_key: string | null;
3873
+ index: number;
3874
+ } | {
3875
+ op: 'group_remove';
3876
+ key: string;
3877
+ placements: 'ungroup' | 'delete';
3878
+ } | {
3879
+ op: 'layout_update';
3880
+ patch: LayoutPatch;
3881
+ };
3882
+ interface LayoutBundle {
3883
+ layout: LayoutRow;
3884
+ groups: GroupRow[];
3885
+ placements: PlacementRow[];
3886
+ rev: string;
3887
+ }
3888
+ declare const PLACEMENT_PATCH_KEYS: readonly ["label_override", "is_visible", "default_expanded", "col_span", "overrides", "show_row_revisions", "allow_revision_restore", "lock_conditions", "input_bindings", "widget_id", "show_approval_chain"];
3889
+ /** #2608: the longest stored editor note (the JSON around its text included). */
3890
+ declare const EDITOR_NOTE_MAX = 4000;
3891
+ declare const GROUP_PATCH_KEYS: readonly ["label", "type", "icon", "is_collapsed", "tab_mode", "hide_when_empty", "visibility_mode", "summary_fields", "summary_hide_empty", "swap_config", "skip_if_filled", "content", "content_tone", "visible_when", "hidden_for_roles", "locked_for_roles", "read_width", "editor_note", "i18n"];
3892
+ declare const LAYOUT_PATCH_KEYS: readonly ["name", "slug", "create_label", "create_hidden", "sort", "is_active", "disable_comments", "disable_tasks", "tab_mode", "validate_before_next", "summary_enabled", "summary_hide_empty", "ai_enabled", "accordion_mode", "disable_revisions", "disable_clone", "disable_delete", "row_order_field", "pdf_theme", "pdf_template_id", "pdf_cover_enabled", "pdf_cover_title_field", "pdf_cover_subtitle", "pdf_show_logo", "pdf_page_size", "pdf_orientation", "pdf_button_label", "conditions", "allow_schedule", "allow_disable_pickers", "layout_type", "addendum_layout_id", "workflow_template_id", "single_active_addendum", "addendum_default_view", "record_conditions", "default_values", "display_mode", "parent_layout_id", "hide_integrity_banner", "hide_sla_banner", "changes_tray", "dossier_enabled", "dossier_label", "quick_picker", "sheet_width", "header_fields", "hide_empty", "change_note"];
3893
+ /** Why a layout won resolution. */
3894
+ interface LayoutPickReason {
3895
+ kind: 'record_rule' | 'role' | 'default' | 'fallback' | 'slug' | 'type_use';
3896
+ rules?: Array<{
3897
+ field: string;
3898
+ op: string;
3899
+ value?: unknown;
3900
+ }>;
3901
+ role_ids?: string[];
3902
+ role_names?: string[];
3903
+ type_use?: string;
3904
+ }
3905
+ interface LayoutOverviewRow {
3906
+ layout_id: number;
3907
+ name: string;
3908
+ layout_type: string;
3909
+ slug: string | null;
3910
+ section: 'forms' | 'link_only' | 'other_views' | 'unused';
3911
+ reason: LayoutPickReason;
3912
+ is_default: boolean;
3913
+ new_menu: {
3914
+ label: string;
3915
+ hidden: boolean;
3916
+ } | null;
3917
+ shape: {
3918
+ groups: number;
3919
+ steps_or_tabs: number;
3920
+ fields: number;
3921
+ container_mode: 'tabs' | 'steps' | null;
3922
+ };
3923
+ references: Array<{
3924
+ kind: string;
3925
+ id: string | number;
3926
+ label: string;
3927
+ }>;
3928
+ warnings: string[];
3929
+ }
3930
+ /**
3931
+ * "Which form does each kind of record get?" Every layout of a collection,
3932
+ * sectioned and ordered as the active-layout resolution checks them. Admin only.
3933
+ */
3934
+ declare function readLayoutOverview(collection: string): Command<{
3935
+ data: {
3936
+ rows: LayoutOverviewRow[];
3937
+ warning: string | null;
3938
+ };
3939
+ }>;
3940
+ /**
3941
+ * Which layout a saved record opens with, and why: the resolution itself, with
3942
+ * each candidate's check. `role_id` tests as that role (none = as an admin);
3943
+ * `slug` pins a layout by its link name. Admin only.
3944
+ */
3945
+ declare function explainLayout(query: {
3946
+ collection: string;
3947
+ item?: string | number;
3948
+ role_id?: string;
3949
+ slug?: string;
3950
+ }): Command<{
3951
+ data: {
3952
+ layout_id: number | null;
3953
+ reason: LayoutPickReason | null;
3954
+ checked: Array<{
3955
+ layout_id: number;
3956
+ matched: boolean;
3957
+ why: string;
3958
+ }>;
3959
+ };
3960
+ }>;
3961
+ /**
3962
+ * The layout, its groups and placements as the editor edits them, with the
3963
+ * `rev` the next ops batch must name. Not wrapped in `data`. Admin only.
3964
+ */
3965
+ declare function readLayoutBundle(layoutId: number): Command<LayoutBundle>;
3966
+ /**
3967
+ * Apply a batch of ops (at most 500) all or nothing and get the new bundle.
3968
+ * Rejections arrive as thrown errors carrying `status` and `response`:
3969
+ * 409 `{ error: 'stale', bundle }` when the layout changed since `base_rev`
3970
+ * (re-apply on `response.bundle`), 400 `{ error, op_index }` when an op is
3971
+ * refused, 400 `{ error, code: 'CHANGE_NOTE_REQUIRED' }` when the layout's
3972
+ * `change_note` asks for a `reason` (and `ticket`) the batch lacks. Admin only.
3973
+ */
3974
+ declare function submitLayoutOps(layoutId: number, body: {
3975
+ ops: LayoutOp[];
3976
+ base_rev: string;
3977
+ note?: string | null;
3978
+ reason?: string | null;
3979
+ ticket?: string | null;
3980
+ }): Command<LayoutBundle>;
3981
+ /** One saved version of a layout (the snapshot itself). Admin only. */
3982
+ declare function readLayoutVersion(layoutId: number, versionId: number): Command<{
3983
+ data: Record<string, unknown>;
3984
+ }>;
3985
+ /**
3986
+ * What changed between a version and now (`against` omitted or 'current') or
3987
+ * another version id. `versionId` 'newest' answers "what did the last save change".
3988
+ */
3989
+ declare function diffLayoutVersion(layoutId: number, versionId: number | 'newest', against?: number | 'current'): Command<{
3990
+ data: Record<string, unknown>;
3991
+ }>;
3992
+ /** Layouts whose last save shows a data-losing shape. Admin only. */
3993
+ declare function readLayoutDrift(): Command<{
3994
+ data: unknown[];
3995
+ }>;
3996
+ /** A placement as the projection route takes it: `field` plus any placement columns. */
3997
+ type ProjectedPlacement = {
3998
+ field: string;
3999
+ } & Partial<Omit<PlacementRow, 'field' | 'id'>>;
4000
+ /**
4001
+ * The field-config rows the saved layout would answer if these placements
4002
+ * were it (at most 2000): the editor's canvas renders its unsaved draft
4003
+ * through this. A read; writes nothing. Admin only.
4004
+ */
4005
+ declare function projectFieldConfig(collection: string, assignments: ProjectedPlacement[]): Command<{
4006
+ data: Array<Record<string, unknown>>;
4007
+ ungrouped_sort: number | null;
4008
+ }>;
4009
+ /** The layouts that place an internal widget: a config change reaches every one. Admin only. */
4010
+ declare function listInternalWidgetPlacements(widgetId: number): Command<{
4011
+ data: Array<{
4012
+ layout_id: number;
4013
+ name: string;
4014
+ collection: string;
4015
+ }>;
4016
+ }>;
4017
+ /** Is a record excluded from relation pickers? */
4018
+ declare function readPickerExclusion(collection: string, itemId: string | number): Command<{
4019
+ data: {
4020
+ excluded: boolean;
4021
+ };
4022
+ }>;
4023
+ /** Which of these ids are excluded from pickers? */
4024
+ declare function readPickerExclusions(collection: string, ids: Array<string | number>): Command<{
4025
+ data: {
4026
+ excluded: string[];
4027
+ };
4028
+ }>;
4029
+ /** Exclude a record from relation pickers. */
4030
+ declare function excludeFromPickers(body: {
4031
+ collection: string;
4032
+ item_id: string | number;
4033
+ layout?: string | null;
4034
+ }): Command<{
4035
+ data: {
4036
+ excluded: true;
4037
+ };
4038
+ }>;
4039
+ /** Put a record back into relation pickers. */
4040
+ declare function includeInPickers(body: {
4041
+ collection: string;
4042
+ item_id: string | number;
4043
+ layout?: string | null;
4044
+ }): Command<{
4045
+ data: {
4046
+ excluded: false;
4047
+ };
4048
+ }>;
4049
+
3670
4050
  /**
3671
4051
  * Developer-experience commands: dev-tools exports, webhook deliveries,
3672
4052
  * persisted GraphQL queries, saved views, global search, API keys,
@@ -4000,20 +4380,34 @@ declare function retryDeadLetter(runId: string): Command<{
4000
4380
  retried: string;
4001
4381
  };
4002
4382
  }>;
4383
+ type CollectionLayoutType = 'grouped' | 'summary' | 'detail' | 'file' | 'addendum' | 'table';
4003
4384
  interface CollectionLayout {
4004
4385
  id: number;
4005
4386
  collection: string;
4006
4387
  name: string;
4388
+ slug?: string | null;
4389
+ layout_type?: CollectionLayoutType | (string & {});
4007
4390
  is_active: boolean | number;
4008
4391
  sort: number;
4009
4392
  created_at: string;
4393
+ /** Show in the New-item menu; clones start hidden until an admin opts in. */
4394
+ create_hidden?: boolean | number;
4395
+ create_label?: string | null;
4010
4396
  tab_mode?: 'tabs' | 'steps';
4011
4397
  validate_before_next?: boolean | number;
4012
4398
  summary_enabled?: boolean | number;
4399
+ /** @deprecated Retired: no longer writable; the API may still return it. */
4013
4400
  summary_show_all?: boolean | number;
4014
4401
  ai_enabled?: boolean | number;
4015
4402
  disable_comments?: boolean | number;
4016
4403
  disable_tasks?: boolean | number;
4404
+ disable_clone?: boolean | number;
4405
+ /** @deprecated Retired: replaced by `disable_clone`; no longer writable. */
4406
+ allow_clone?: boolean | number;
4407
+ /** @deprecated Retired: no longer writable. */
4408
+ addendum_lock_fields?: unknown;
4409
+ /** @deprecated Retired: no longer writable. */
4410
+ hide_actions_when_collapsed?: boolean | number;
4017
4411
  conditions?: {
4018
4412
  role_ids?: string[];
4019
4413
  } | null;
@@ -4025,6 +4419,15 @@ interface LayoutAssignment {
4025
4419
  label_override?: string | null;
4026
4420
  is_visible?: boolean | number;
4027
4421
  default_expanded?: boolean | number;
4422
+ /** Column span on the record page (slot cards size by it). */
4423
+ col_span?: number | null;
4424
+ lock_conditions?: string | null;
4425
+ overrides?: unknown;
4426
+ show_row_revisions?: boolean | number;
4427
+ show_approval_chain?: boolean | number;
4428
+ allow_revision_restore?: boolean | number | null;
4429
+ widget_id?: number | null;
4430
+ input_bindings?: unknown;
4028
4431
  }
4029
4432
  interface LayoutGroup {
4030
4433
  id: number;
@@ -4047,11 +4450,17 @@ declare function readCollectionLayouts(collection: string): Command<{
4047
4450
  data: CollectionLayout[];
4048
4451
  }>;
4049
4452
  /** Read the active layout for a collection with groups + assignments. */
4050
- declare function readActiveLayout(collection: string): Command<{
4453
+ declare function readActiveLayout(collection: string,
4454
+ /** `slug` pins a layout by link name; `item` resolves record-conditional layouts. */
4455
+ opts?: {
4456
+ slug?: string;
4457
+ item?: string | number;
4458
+ }): Command<{
4051
4459
  data: {
4052
4460
  layout: CollectionLayout;
4053
4461
  groups: LayoutGroup[];
4054
4462
  assignments: LayoutAssignment[];
4463
+ ungrouped_sort: number | null;
4055
4464
  };
4056
4465
  }>;
4057
4466
  /** Read groups for a specific layout by collection + layout id. */
@@ -4066,28 +4475,41 @@ declare function readLayoutAssignments(layoutId: number): Command<{
4066
4475
  declare function activateLayout(layoutId: number): Command<{
4067
4476
  data: CollectionLayout;
4068
4477
  }>;
4069
- /** Clone a layout under a new name. */
4070
- declare function cloneLayout(layoutId: number, name: string): Command<{
4478
+ /**
4479
+ * Clone a layout under a new name. The copy lands hidden from the New menu
4480
+ * (`create_hidden`) until an admin opts in; `layout_type` may differ from the source.
4481
+ */
4482
+ declare function cloneLayout(layoutId: number, name: string, opts?: {
4483
+ slug?: string | null;
4484
+ layout_type?: CollectionLayoutType;
4485
+ }): Command<{
4071
4486
  data: CollectionLayout;
4072
4487
  }>;
4073
- /** Create a new layout for a collection. */
4074
- declare function createCollectionLayout(collection: string, name: string): Command<{
4488
+ /**
4489
+ * Create a new layout for a collection. `seed_fields` starts it with one
4490
+ * "Main" section holding every visible field.
4491
+ */
4492
+ declare function createCollectionLayout(collection: string, name: string, opts?: {
4493
+ slug?: string | null;
4494
+ layout_type?: CollectionLayoutType;
4495
+ seed_fields?: boolean;
4496
+ }): Command<{
4075
4497
  data: CollectionLayout;
4076
4498
  }>;
4077
- /** Update layout behaviour/metadata. */
4078
- declare function updateCollectionLayout(layoutId: number, patch: Partial<Pick<CollectionLayout, 'name' | 'sort' | 'tab_mode' | 'validate_before_next' | 'summary_enabled' | 'summary_show_all' | 'ai_enabled' | 'disable_comments' | 'disable_tasks' | 'conditions'>>): Command<{
4499
+ /** Update layout behaviour/metadata (any of the settings in `LayoutPatch`). */
4500
+ declare function updateCollectionLayout(layoutId: number, patch: LayoutPatch): Command<{
4079
4501
  data: CollectionLayout;
4080
4502
  }>;
4081
4503
  declare function deleteCollectionLayout(layoutId: number): Command<void>;
4082
- /** Bulk-replace a layout's field→group assignments (and slot sentinels). */
4504
+ /**
4505
+ * Bulk-replace a layout's field→group assignments (and slot sentinels).
4506
+ * The layout editor saves through `submitLayoutOps` instead.
4507
+ */
4083
4508
  declare function updateLayoutAssignments(layoutId: number, assignments: Array<{
4084
4509
  field: string;
4085
4510
  group_key: string | null;
4086
4511
  sort: number;
4087
- label_override?: string | null;
4088
- is_visible?: boolean;
4089
- default_expanded?: boolean;
4090
- }>): Command<{
4512
+ } & PlacementPatch>): Command<{
4091
4513
  data: LayoutAssignment[];
4092
4514
  }>;
4093
4515
  interface InternalWidget {
@@ -5453,6 +5875,146 @@ declare function listRetentionRuns(policyId: number): Command<{
5453
5875
  data: RetentionRun[];
5454
5876
  }>;
5455
5877
 
5878
+ /**
5879
+ * Layout AI helpers (#2694 #2695 #2676 #2693) under /ai-design/layouts. Admin
5880
+ * only. The reads describe forms in plain terms; a proposal stores layout ops
5881
+ * for an administrator to review in the layout editor and never changes a
5882
+ * layout by itself.
5883
+ */
5884
+
5885
+ /** A form as an admin reads it: who gets it, settings that are on, sections and fields. */
5886
+ interface LayoutDescription {
5887
+ id: number;
5888
+ name: string;
5889
+ collection: string;
5890
+ kind: string;
5891
+ slug: string | null;
5892
+ default: boolean;
5893
+ who: string;
5894
+ record_rule: string | null;
5895
+ parent_layout_id: number | null;
5896
+ settings_on: string[];
5897
+ groups: Array<{
5898
+ key: string;
5899
+ label: string;
5900
+ type: string;
5901
+ parent: string | null;
5902
+ collapsed?: true;
5903
+ shows_when?: string;
5904
+ hidden_for?: string[];
5905
+ read_only_for?: string[];
5906
+ fields: Array<{
5907
+ field: string;
5908
+ label: string;
5909
+ width?: string;
5910
+ required?: true;
5911
+ readonly?: true;
5912
+ hidden?: true;
5913
+ inherited?: true;
5914
+ }>;
5915
+ }>;
5916
+ field_count: number;
5917
+ not_on_layout: Array<{
5918
+ field: string;
5919
+ label: string;
5920
+ }>;
5921
+ draft: boolean;
5922
+ truncated?: true;
5923
+ }
5924
+ interface WhichLayoutForm {
5925
+ as: string;
5926
+ record: string | null;
5927
+ layout: {
5928
+ id: number;
5929
+ name: string;
5930
+ } | null;
5931
+ why: string;
5932
+ checked: Array<{
5933
+ layout: string;
5934
+ matched: boolean;
5935
+ why: string;
5936
+ }>;
5937
+ }
5938
+ interface LayoutFieldExplanation {
5939
+ field: string;
5940
+ label: string;
5941
+ as: string;
5942
+ record: string | null;
5943
+ layout: {
5944
+ id: number;
5945
+ name: string;
5946
+ } | null;
5947
+ verdict: 'shown' | 'shown read-only' | 'hidden' | 'not on the form' | 'cannot open the record';
5948
+ reasons: string[];
5949
+ draft: boolean;
5950
+ }
5951
+ interface LayoutProposal {
5952
+ id: string;
5953
+ layout_id: number;
5954
+ note: string | null;
5955
+ status: 'proposed' | 'applied' | 'rejected' | 'expired';
5956
+ created_at: string;
5957
+ proposer: {
5958
+ name: string;
5959
+ via: string;
5960
+ };
5961
+ ops: LayoutOp[];
5962
+ sentences: string[];
5963
+ dropped: string[];
5964
+ /** Why it would not apply to the layout as it is now, or null. */
5965
+ conflict: string | null;
5966
+ }
5967
+ /** A layout described for a reader (or an assistant). Admin only. */
5968
+ declare function describeLayoutForm(layoutId: number): Command<{
5969
+ data: LayoutDescription;
5970
+ }>;
5971
+ /** Which form a record opens with for a role, and why. Admin only. */
5972
+ declare function whichLayoutForm(query: {
5973
+ collection: string;
5974
+ item?: string | number;
5975
+ role?: string;
5976
+ }): Command<{
5977
+ data: WhichLayoutForm;
5978
+ }>;
5979
+ /** Why a field shows, hides or is read-only for a role on a record. Admin only. */
5980
+ declare function explainLayoutField(query: {
5981
+ collection: string;
5982
+ field: string;
5983
+ role?: string;
5984
+ item?: string | number;
5985
+ layout_id?: number;
5986
+ }): Command<{
5987
+ data: LayoutFieldExplanation;
5988
+ }>;
5989
+ /**
5990
+ * Propose layout ops for an administrator to review in the layout editor.
5991
+ * Nothing changes until they apply it. Unknown fields and settings are left
5992
+ * out (`dropped`); ops that would not apply are refused with 400.
5993
+ */
5994
+ declare function proposeLayoutOps(layoutId: number, body: {
5995
+ ops: LayoutOp[] | unknown[];
5996
+ note?: string;
5997
+ }): Command<{
5998
+ data: {
5999
+ id: string;
6000
+ status: 'proposed';
6001
+ changes: string[];
6002
+ dropped: string[];
6003
+ note: string;
6004
+ };
6005
+ }>;
6006
+ /** Open proposals for a layout (`status: 'all'` adds applied, rejected and expired). */
6007
+ declare function readLayoutProposals(layoutId: number, status?: 'all'): Command<{
6008
+ data: LayoutProposal[];
6009
+ }>;
6010
+ /** Mark a proposal applied (after the editor applied it to its draft) or rejected. */
6011
+ declare function resolveLayoutProposal(layoutId: number, proposalId: string, outcome: 'applied' | 'rejected'): Command<{
6012
+ data: {
6013
+ id: string;
6014
+ status: string;
6015
+ };
6016
+ }>;
6017
+
5456
6018
  /**
5457
6019
  * Operations reads (admin): readiness, detailed health, this process's runtime
5458
6020
  * stats, the instance roster, the DB connection pool, expensive SQL, the
@@ -6962,12 +7524,15 @@ interface PickerExclusionStatus {
6962
7524
  }
6963
7525
  /**
6964
7526
  * Check whether a specific item is excluded from relation pickers.
7527
+ * @deprecated Use `readPickerExclusion` (commands/layout-editor).
6965
7528
  */
6966
7529
  declare function getPickerExclusionStatus(collection: string, itemId: string): Command<{
6967
7530
  data: PickerExclusionStatus;
6968
7531
  }>;
6969
7532
  /**
6970
7533
  * Exclude an item from appearing in relation pickers across the admin UI.
7534
+ * @deprecated Use `excludeFromPickers`, which can pass the record's `layout` so a
7535
+ * non-admin whose form grants it may call it.
6971
7536
  */
6972
7537
  declare function excludeFromPicker(collection: string, itemId: string): Command<{
6973
7538
  data: {
@@ -6976,6 +7541,7 @@ declare function excludeFromPicker(collection: string, itemId: string): Command<
6976
7541
  }>;
6977
7542
  /**
6978
7543
  * Remove a picker exclusion — the item will appear in relation pickers again.
7544
+ * @deprecated Use `includeInPickers`, which can pass the record's `layout`.
6979
7545
  */
6980
7546
  declare function includeInPicker(collection: string, itemId: string): Command<{
6981
7547
  data: {
@@ -6985,6 +7551,7 @@ declare function includeInPicker(collection: string, itemId: string): Command<{
6985
7551
  /**
6986
7552
  * Check exclusion status for multiple items in one call.
6987
7553
  * Returns the list of ids that ARE excluded.
7554
+ * @deprecated Use `readPickerExclusions` (commands/layout-editor).
6988
7555
  */
6989
7556
  declare function batchPickerExclusionStatus(collection: string, ids: string[]): Command<{
6990
7557
  data: {
@@ -7940,4 +8507,4 @@ declare function submitFormItem(collection: string, values: Record<string, unkno
7940
8507
  data: Record<string, unknown>;
7941
8508
  }>;
7942
8509
 
7943
- export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BatchRead, type BatchReadResult, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionPresetSummary, type Command, type Comment, type CommentVersion, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CpuProfileSummary, type CronJob, type CustomQuery, type CustomQueryCatalogEntry, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DmvResult, type DraftPublishConfig, type DraftStatus, type DryRunReport, type ErpSubmission, type ErpSubmissionStatus, type ExpensiveStatement, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type HealthDetailed, type HelpVideo, type HelpVideoClick, type HelpVideoContext, type HelpVideoDownloadUrls, type HelpVideoFinalizedUpload, type HelpVideoProgress, type HelpVideoUploadSession, type HelpVideoVersion, type HelpVideoVisibility, type HelpVideoWalkStep, type HelpVideoWhatsNew, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InstanceOwner, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type JobRegistryCron, type JobRun, type LastTouch, type LayoutAssignment, type LayoutGroup, type LayoutVersion, type ListResponse, type ManagedUser, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PluginSlots, type Policy, type PoolStats, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, READ_MANY_MAX, type ReadyReport, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type RuntimeStats, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type SessionReplayMasking, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SyncJob, type Task, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TrafficSnapshot, type TrafficSnapshotEntity, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, abandonHelpVideoUpload, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyHelpVideoPackageImport, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, archiveHelpVideo, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, cancelScheduledChange, cancelStagedImport, captureCpuProfile, cascadeFieldDependencies, checkBlackoutDate, claimQueueItem, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHelpVideo, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, disableTwoFactor, discardHelpVideoPackageImport, drillReportRow, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportHelpVideoPackage, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, finalizeHelpVideoUpload, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getCommentHistory, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, helpVideosFor, importExternalApiSpec, importSchemaSnapshot, includeInPicker, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listCustomQueryCatalog, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHelpVideoPages, listHelpVideoVersions, listHelpVideos, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listJobRuns, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyHelpVideoUploads, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSyncJobs, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, openHelpVideoPackageImport, openHelpVideoUpload, presignFileUpload, previewContentBundle, previewHelpVideoPackageImport, previewImportJob, previewReportWidget, publishHelpVideo, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDataQualityRun, readDbPool, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readExpensiveSql, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readFilesByIds, readHealthDetailed, readHelpVideo, readHelpVideoAnalytics, readHelpVideoDownloadLink, readHelpVideoDraft, readHelpVideoWalk, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInstanceOwners, readInstanceRoster, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readJobRegistry, readLastTouch, readLayoutAssignments, readLayoutGroups, readMany, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readReadiness, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRequiredHelpVideos, readRevision, readRevisions, readRole, readRuntimeStats, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTrafficSnapshot, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, recordHelpVideoProgress, registerHelpVideoPage, rehearseCreateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, reportClientError, requestRecordAccess, requeueStagedImport, rerecordHelpVideo, rerenderHelpVideo, resetReportCache, resolveReportAlert, restoreHelpVideoVersion, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveHelpVideoDraft, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setHelpVideoContexts, setHelpVideoRequirements, setMyDelegate, setQueueDefaultView, setReportSubscription, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHelpVideo, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor };
8510
+ export { type AccessAudit, type AccessAuditFinding, type AccessAuditRun, type AccessAuditSubject, type AccessReason, type ActivityEntry, type ActivityQuery, type ActivityReportQuery, type ActivityReportRow, type ActivityReportSummary, type Addendum, type AddendumStatus, type AggregateQuery, type AggregateRow, type AiChatTraceEntry, type AiCollectionSettings, type AiColumnMapping, type AiDuplicateMatch, type AiQueryFilter, type AiQueryResult, type AiReviewFinding, type AiViolation, type AlertDefinition, type AlertLogEntry, type AlertSubscription, type AnomalyDefinition, type AnomalyRule, type ApiAnalyticsBucket, type ApiAnalyticsCollection, type ApiAnalyticsPath, type ApiAnalyticsSummary, type ApiErrorLog, type ApiKey, type ApiKeyScope, type ApprovalBrief, type ApprovalChain, type ApprovalChainStep, type ApprovalDecision, type ApprovalInstance, type ApprovalInstanceDetail, type ApprovalStatus, type ApprovalStepInput, type AtRiskCondition, type AtRiskOp, type AtRiskResult, type AtRiskRule, type AtRiskSummaryEntry, type AttributeDefinition, type AttributeValue, type BatchRead, type BatchReadResult, type BlackoutDate, type BoolFilterOps, type CMSCollection, type CascadeFilterRule, type ChangeOrder, type ChatChannel, type ChatChannelMember, type ChatDirectoryChannel, type ChatMessage, type ChatPin, type ChatReaction, type ChatRoomKind, type ChatRoomSummary, type ChatRoomType, type ChatSearchHit, type CollectionLayout, type CollectionLayoutType, type CollectionPresetSummary, type Command, type Comment, type CommentVersion, type ConfigSnapshot, type ConfigTableClassification, type ContentBundle, type ContentExportFormat, type ContentExportOptions, type CoverageGapItem, type CoverageGapOwner, type CoverageGapReport, type CpuProfileSummary, type CronJob, type CustomQuery, type CustomQueryCatalogEntry, type DataQualityRule, type DataQualityRuleResult, type DataQualityRuleType, type DataQualityRun, type DataQualitySeverity, type DeadLetter, type DmvResult, type DraftPublishConfig, type DraftStatus, type DryRunReport, EDITOR_NOTE_MAX, type ErpSubmission, type ErpSubmissionStatus, type ExpensiveStatement, type ExtensionManifest, type ExternalApi, type ExternalApiEndpoint, type ExternalApiSchema, type ExternalApiSlotContext, type ExternalApiSpecImportResult, type ExternalApiTestResult, type FieldChangeEntry, type FieldCondition, type FieldConfig, type FieldDependencyConfig, type FieldFilter, type FieldGroup, type FieldTranslations, type FieldVisibilityRules, type FieldWatch, type FileRecord, type FileUploadResult, type FileUsageEntry, type Filter, type FlowReplayResult, type FlowRun, type FlowTestStep, type FormFieldDescriptor, type FormFieldRelation, type FormGroupDescriptor, type FormLockCondition, type FormSchema, type FormValidationRule, type FormVisibilityRule, GROUP_PATCH_KEYS, type GlobalSearchRecord, type GlobalSearchResults, type GraphQLResponse, type GroupPatch, type GroupRow, type HealthDetailed, type HelpVideo, type HelpVideoClick, type HelpVideoContext, type HelpVideoDownloadUrls, type HelpVideoFinalizedUpload, type HelpVideoProgress, type HelpVideoUploadSession, type HelpVideoVersion, type HelpVideoVisibility, type HelpVideoWalkStep, type HelpVideoWhatsNew, type HierarchyConfigDef, type HierarchyFlatNode, type HierarchyLevelDef, type HierarchyNestedNode, type IDFilterOps, type ISODate, type ImportDefinition, type ImportJob, type ImportParseResponse, type ImportPreview, type ImportPreviewDiff, type ImportTemplateSummary, type InstanceOwner, type IntegrationApiHealth, type InternalWidget, type Issue, type IssueSeverity, type IssueStatus, type IssueSummary, type ItemLock, type JobRegistryCron, type JobRun, LAYOUT_PATCH_KEYS, type LastTouch, type LayoutAssignment, type LayoutBundle, type LayoutDescription, type LayoutFieldExplanation, type LayoutGroup, type LayoutOp, type LayoutOverviewRow, type LayoutPatch, type LayoutPickReason, type LayoutProposal, type LayoutRow, type LayoutVersion, type ListResponse, type ManagedUser, type MetricAlertRule, type MetricAlertSubscription, type MetricDefinition, type MyTask, type MyWorkOwnedEntry, type MyWorkSla, type MyWorkSummary, type NivaroClient, type NivaroClientOptions, type NivaroExtensionPlugin, type NivaroRealtime, type NivaroRuntime, type NotificationItem, type NotificationPage, type NotificationSubscription, type NumberFilterOps, type OmniSearchHit, type OnlinePresenceConfig, type OnlinePresenceUser, PLACEMENT_PATCH_KEYS, type Page, type PageLayout, type PageSlotKey, type PageWidget, type PdfTemplate, type PermissionSimulation, type PersistedQuery, type PickerExclusionStatus, type PipelineFlowEdge, type PipelineFlowState, type PipelineImpactResult, type PipelineOwnerGroup, type PipelineOwnerGroupUser, type PipelineSimulation, type PipelineState, type PipelineVersionEntry, type PlacementKey, type PlacementPatch, type PlacementRow, type PluginSlots, type Policy, type PoolStats, type PreflightCheck, type PreflightReport, type PreflightSeverity, type PresenceClient, type PresenceOptions, type PresenceSession, type PresenceSessionInfo, type PresenceViewer, type ProjectedPlacement, type PromotionApplyResult, type PromotionPreview, type Query, type Queue, type QueueColumnPrefs, type QueueCondition, type QueueDetail, type QueueDisplayConfig, type QueueItem, type QueueItemsResult, type QueueOwner, type QueueRowClickMode, type QueueScope, type QueueSource, type QueueSourceType, type QueueStats, type QueueTrendPoint, type QueueView, type QueueViewKind, type QueueWorkloadRow, READ_MANY_MAX, type ReadyReport, type RealtimeEvent, type RecordGraphEdge, type RecordGraphNode, type RecordLink, type RecordLinkType, type RecordTemplate, type RecordViewRecap, type RegisteredAction, type RelatedCommentEntry, type RelationFilter, type RelationOption, type ReportAlert, type ReportAlertCondition, type ReportAlertLogEntry, type ReportAnnotation, type ReportColumnFormat, type ReportDateRange, type ReportDef, type ReportEntityFilter, type ReportFilterPreset, type ReportQueryColumn, type ReportQueryWidgetConfig, type ReportSnapshotEntry, type ReportSubscription, type ReportTemplateEntry, type ReportVersionEntry, type ReportWidget, type ReportWidgetConfig, type ReportWidgetData, type ReportWidgetPreset, type ReportWidgetType, type RequestTrace, type ResolvedOwner, type RetentionPolicy, type RetentionRun, type RetentionRunResult, type Revision, type Role, type Rule, type RuntimeStats, type SavedView, type ScheduledChange, type ScheduledReport, type ScopeDimension, type ScopeDimensionInfo, type SemanticSearchMatch, type SessionRecording, type SessionReplayMasking, type ShareLink, type SlaBatchStatus, type SlaRule, type SlaStatus, type StagedImportRun, type StagedImportStats, type StringFilterOps, type SubRow, type SubRowTemplate, type SyncJob, type Task, type TaskDoneWhenRule, type TaskPriority, type TaskStatus, type TimelineEvent, type TraceSpan, type TrafficSnapshot, type TrafficSnapshotEntity, type TreeFlatNode, type TreeNestedNode, type TreeNodeConfig, type TreePermission, type TreePermissionAction, type UUID, type UserActivityEntry, type UserActivitySummary, type UserScopesInfo, type ViewSubscription, type VirtualCollection, type Webhook, type WebhookDelivery, type WhichLayoutForm, type WidgetFeed, type WorkflowBinding, type WorkflowHistoryEntry, type WorkflowInstance, type WorkflowInstanceData, type WorkflowState, type WorkflowTransition, type Workspace, type WorkspaceQuotas, type WorkspaceTemplate, type WorkspaceUsage, _and, _contains, _ends_with, _eq, _gt, _gte, _in, _lt, _lte, _ncontains, _neq, _nin, _nnull, _none, _null, _or, _some, _starts_with, abandonHelpVideoUpload, acquireItemLock, activateLayout, addChatChannelMember, addInstanceOwner, addSubRow, aggregateItems, aiBrief, aiBuildReport, aiChat, aiCheckDuplicates, aiGenerate, aiMapColumns, aiQuery, aiReportFilters, aiReview, aiSummarize, aiValidate, appendSessionRecordingEvents, applyContentBundle, applyHelpVideoPackageImport, applyRecordTemplate, applySubRowTemplate, approveAddendum, approveAiProposal, archiveHelpVideo, asc, backupExportPath, batchPickerExclusionStatus, bulkPickerExclusion, callExternalApi, callExternalApiEndpoint, cancelScheduledChange, cancelStagedImport, captureCpuProfile, cascadeFieldDependencies, checkBlackoutDate, claimQueueItem, claimTask, clearTraces, cloneItem, cloneLayout, cloneReport, compareConfigSnapshot, completeTask, copyReportWidget, createAccessAudit, createAddendum, createAlertDefinition, createAlertSubscription, createAnomalyRule, createApiKey, createApprovalChain, createAtRiskRule, createAttributeDefinition, createBlackoutDate, createChatChannel, createChatRoomType, createCollectionLayout, createComment, createDataQualityRule, createExternalApi, createExternalApiEndpoint, createFieldGroup, createFieldWatch, createGroupDm, createHelpVideo, createHierarchyConfig, createImportDefinition, createImportJob, createImportJobFromUrl, createInternalWidget, createIssue, createItem, createMetricAlertRule, createNivaro, createNotification, createNotificationSubscription, createPage, createPdfTemplate, createPersistedQuery, createPresence, createQueue, createQueueView, createRealtime, createRecordLink, createRecordTemplate, createReport, createReportAlert, createReportAnnotation, createReportFromTemplate, createReportSnapshot, createReportWidgetPreset, createRetentionPolicy, createRole, createRolePolicy, createRule, createSavedView, createScheduledChange, createScheduledReport, createShareLink, createSlaRule, createSubRowTemplate, createSyncJob, createTask, createTreePermission, createUser, createViewSubscription, createVirtualCollection, createWebhook, createWidgetFeed, createWorkspace, createWorkspaceTemplate, decideApproval, deleteAccessAudit, deleteAddendum, deleteAlertDefinition, deleteAlertSubscription, deleteAnomalyRule, deleteApiKey, deleteApprovalChain, deleteAtRiskRule, deleteAttributeDefinition, deleteBlackoutDate, deleteChatMessage, deleteCollectionLayout, deleteComment, deleteDataQualityRule, deleteExternalApi, deleteExternalApiEndpoint, deleteExternalApiSchema, deleteFieldGroup, deleteFieldTranslations, deleteFieldWatch, deleteFile, deleteHierarchyConfig, deleteImportJob, deleteInternalWidget, deleteIssue, deleteItem, deleteMetricAlertRule, deleteNotification, deleteNotificationSubscription, deletePage, deletePdfTemplate, deletePersistedQuery, deleteQueue, deleteQueueView, deleteRecordLink, deleteRecordTemplate, deleteReport, deleteReportAlert, deleteReportAnnotation, deleteReportFilterPreset, deleteReportSnapshot, deleteReportTemplate, deleteReportWidgetPreset, deleteRetentionPolicy, deleteRole, deleteRolePolicy, deleteRule, deleteSavedView, deleteScheduledReport, deleteSessionRecording, deleteSlaRule, deleteSubRow, deleteSubRowTemplate, deleteSyncJob, deleteTask, deleteTreePermission, deleteUser, deleteViewSubscription, deleteVirtualCollection, deleteWebhook, deleteWidgetFeed, deleteWorkspace, deleteWorkspaceTemplate, deployImportProcedure, desc, describeLayoutForm, diffLayoutVersion, disableTwoFactor, discardHelpVideoPackageImport, drillReportRow, editChatMessage, endSessionRecording, evaluateAlerts, evaluateAtRisk, evaluateFieldDefaults, evaluateFieldLock, evaluateFieldRules, evaluateFieldVisibility, excludeFromPicker, excludeFromPickers, executeBulkAction, executeCustomQuery, executeImportTemplate, executeItemAction, executeScheduledChange, explainLayout, explainLayoutField, explainRecordAccess, explainReportTrend, exportBlueprint, exportConfigSnapshot, exportContent, exportContentBundle, exportHelpVideoPackage, exportSchemaSnapshot, fetchFormSchema, fileDownloadPath, fileTransformPath, finalizeHelpVideoUpload, generateToken, generateUserToken, getAlertDefinition, getAttributeValues, getBrunoCollection, getCommentHistory, getExternalApi, getExternalApiEndpoint, getFieldTranslations, getFlowRun, getLocales, getOpenApi, getPickerExclusionStatus, getPostmanCollection, getPresence, getRetentionPolicy, getSlaRule, getSlaStatus, getTranslations, getTypes, getWebhook, globalSearch, heartbeatItemLock, helpVideosFor, importExternalApiSpec, importSchemaSnapshot, includeInPicker, includeInPickers, installBlueprint, installCollectionPreset, invokeInternalWidgetAction, isPageSlot, joinChatRoom, leaveChatRoom, listAccessAuditRuns, listAccessAudits, listActiveAtRiskRules, listActivePresence, listAddendums, listAlertDefinitions, listAlertSubscriptions, listAllNotificationSubscriptions, listAnomalyDefinitions, listAnomalyRules, listApiKeys, listApprovalChains, listApprovalInstances, listAtRiskRules, listAttributeDefinitions, listBlackoutDates, listBulkActions, listChangeOrders, listChatChannelMembers, listChatMessages, listChatPins, listChatRoles, listChatRoomTypes, listChatRooms, listCollectionPresets, listCollectionRecordTemplates, listComments, listCronJobs, listCustomQueries, listCustomQueryCatalog, listDataQualityRules, listDataQualityRuns, listDeadLetters, listExternalApiEndpoints, listExternalApiSchemas, listExternalApis, listFieldGroups, listFieldWatches, listFiles, listFlowRuns, listHelpVideoPages, listHelpVideoVersions, listHelpVideos, listHierarchyConfigs, listImportDefinitionVersions, listImportDefinitions, listImportJobs, listImportTemplates, listInternalWidgetPlacements, listInternalWidgets, listIssues, listItemActions, listItemScheduledChanges, listJobRuns, listLayoutVersions, listMetricAlertRules, listMetricAlertSubscriptions, listMetricDefinitions, listMyHelpVideoUploads, listMyTasks, listNotificationSubscriptions, listNotifications, listOrphanFiles, listPages, listPdfTemplates, listPersistedQueries, listPinnedItems, listPipelineVersions, listQueueViews, listQueues, listRecordLinks, listRecordTemplates, listRegisteredExtensions, listRegisteredFlowOperations, listRegisteredFlowTriggers, listRelatedComments, listReportAlerts, listReportAnnotations, listReportFilterPresets, listReportSnapshots, listReportTemplates, listReportVersions, listReportWidgetPresets, listReports, listRequestedTasks, listRetentionPolicies, listRetentionRuns, listRolePolicies, listRoleUsers, listRoles, listRules, listSavedViews, listScheduledChanges, listScheduledReports, listScopeDimensions, listSessionRecordings, listShareLinks, listSlaRules, listStagedImports, listSubRowTemplates, listSubRows, listSyncJobs, listTasks, listTeamTasks, listThroughputCollections, listTraces, listTreePermissions, listViewSubscriptions, listVirtualCollections, listWebhookDeliveries, listWebhooks, listWidgetFeeds, listWorkspaceTemplates, listWorkspaces, markAllNotificationsRead, markChatRoomRead, markNotificationRead, markNotificationsRead, moveTreeNode, nudgeTask, omniSearch, openHelpVideoPackageImport, openHelpVideoUpload, presignFileUpload, previewContentBundle, previewHelpVideoPackageImport, previewImportJob, previewReportWidget, projectFieldConfig, proposeLayoutOps, publishHelpVideo, publishItem, queryVirtualCollection, readAccessAuditFindings, readActiveLayout, readActivity, readActivityReportSummary, readAddendum, readAiSettings, readAlertLog, readAllStateOwners, readAnomalyLog, readApiAnalyticsErrors, readApiAnalyticsSummary, readApiAnalyticsTimeseries, readApiAnalyticsTopCollections, readApiAnalyticsTopPaths, readApiKey, readApprovalBrief, readApprovalChain, readAtRiskSummary, readBackupManifest, readChatConfig, readChatDirectory, readChatPeerRead, readCollection, readCollectionLayout, readCollectionLayouts, readCollections, readConfigInventory, readCoverageGaps, readDataQualityRun, readDbPool, readDetailLayout, readDistinctValues, readDraftPublishConfig, readErpSubmissionHistory, readExpensiveSql, readFieldChangeHistory, readFieldConfig, readFieldImpact, readFieldWatch, readFileMeta, readFileUsage, readFilesByIds, readHealthDetailed, readHelpVideo, readHelpVideoAnalytics, readHelpVideoDownloadLink, readHelpVideoDraft, readHelpVideoWalk, readHierarchyConfig, readHierarchyNodeAncestors, readHierarchyNodeChildren, readHierarchyNodes, readHierarchyTree, readImportJob, readImportProcedure, readInstanceOwners, readInstanceRoster, readIntegrationHealth, readInternalWidget, readIssue, readIssueSummary, readItem, readItemLock, readItemLockConfig, readItems, readJobRegistry, readLastTouch, readLayoutAssignments, readLayoutBundle, readLayoutDrift, readLayoutGroups, readLayoutOverview, readLayoutProposals, readLayoutVersion, readMany, readMe, readMetricAlertLog, readMyScopes, readMyWork, readNotificationCount, readNotificationSubscriptionStats, readOnlinePresence, readOwnerGroups, readPage, readPageWidgetData, readPdfTemplate, readPersistedQuery, readPickerExclusion, readPickerExclusions, readPipelineFlowMap, readPipelineReplay, readPipelineTemplate, readPipelineTemplates, readPipelineVersion, readPreflight, readQueue, readQueueCollectionStates, readQueueColumnPrefs, readQueueItems, readQueueTrends, readQueueWorkload, readReadiness, readRecordGraph, readRelationOptions, readReport, readReportAlertLog, readReportAlertsLog, readReportFilterOptions, readReportFiring, readReportSnapshot, readReportSubscription, readReportUsage, readReportWidgetData, readRequiredHelpVideos, readRevision, readRevisions, readRole, readRuntimeStats, readScopeDimensionCoverage, readSessionRecordingEvents, readSettings, readSingleton, readSlaStatusBatch, readStagedImport, readStagedImportStats, readStateOwnerGroups, readStateOwners, readStateOwnersBatch, readSyncJob, readTask, readTaskCounts, readTaskHistory, readThroughputReport, readTimeline, readTrace, readTrafficSnapshot, readTreeAncestors, readTreeChildren, readTreeConfig, readTreeDescendants, readTreeNested, readTreeNodes, readTwoFactorStatus, readUnreadNotificationCount, readUser, readUserActivity, readUserActivitySummary, readUserCard, readUserScopes, readUsers, readWorkflowBindings, readWorkflowInstance, readWorkflowInstances, readWorkspace, readWorkspaceUsage, rebuildTreePaths, recordHelpVideoProgress, registerHelpVideoPage, rehearseCreateItem, reindexSemanticSearch, rejectAddendum, rejectAiProposal, releaseItemLock, releaseQueueItem, rematerializeQueue, removeChatChannelMember, removeInstanceOwner, renderInternalWidget, renderPdfTemplate, reorderFieldGroups, reorderSubRows, reorderTreeSiblings, replaceSubRows, replayActivityEvent, replayFlow, reportClientError, requestRecordAccess, requeueStagedImport, rerecordHelpVideo, rerenderHelpVideo, resetReportCache, resolveLayoutProposal, resolveReportAlert, restoreHelpVideoVersion, restoreImportDefinitionVersion, restoreLayoutVersion, restorePipelineVersion, restoreReportVersion, retryDeadLetter, retryErpSubmission, retryWebhookDelivery, revokeApiKey, revokeShareLink, revokeToken, revokeUserToken, rollbackRevision, rotateWidgetFeedToken, runAccessAudit, runActivityReport, runActivityReportCsv, runCronJob, runDataQuality, runRetentionPolicy, runScheduledReport, runSyncJob, saveHelpVideoDraft, saveMyScopeDefaults, saveReportFilterPreset, saveReportTemplate, saveReportWidgets, saveUserScope, searchChatMessages, semanticSearch, sendBulkNotification, sendChatMessage, sendTestMail, sessionRecordingEnabled, setHelpVideoContexts, setHelpVideoRequirements, setMyDelegate, setQueueDefaultView, setReportSubscription, setTranslations, setupTwoFactor, simulatePermissions, simulatePipeline, simulatePipelineImpact, startApproval, startMasquerade, startSessionRecording, startWorkflow, stopMasquerade, submitAddendum, submitFormItem, submitItemForReview, submitLayoutOps, submitToErp, subscribeFieldWatch, subscribeMetricAlert, suggestImportValidation, suggestQueueLabels, switchWorkspace, testExternalApi, testFlow, testWebhook, toggleChatPin, toggleChatReaction, togglePinnedItem, toggleReportAlert, touchRecordView, transitionWorkflow, unpublishItem, unsubscribeFieldWatch, unsubscribeMetricAlert, updateAccessAudit, updateAddendum, updateAiSettings, updateAlertDefinition, updateAnomalyLogEntry, updateAnomalyRule, updateApiKey, updateApprovalChain, updateAtRiskRule, updateAttributeDefinition, updateAttributeValues, updateChatChannel, updateChatRoom, updateChatRoomType, updateCollectionLayout, updateComment, updateDataQualityRule, updateDraftPublishConfig, updateErpSubmissionStatus, updateExternalApi, updateExternalApiEndpoint, updateFieldConfig, updateFieldGroup, updateFieldWatch, updateFileMeta, updateHelpVideo, updateHierarchyConfig, updateImportDefinition, updateInternalWidget, updateIssue, updateItem, updateItemLockConfig, updateLayoutAssignments, updateLayoutUngroupedSort, updateMe, updateMetricAlertRule, updateMetricAlertSubscription, updateNotificationSubscription, updatePage, updatePdfTemplate, updatePersistedQuery, updateQueue, updateQueueSources, updateQueueView, updateRecordTemplate, updateReport, updateReportAlert, updateReportWidgetPreset, updateRetentionPolicy, updateRole, updateRolePolicy, updateRoleUiPermissions, updateRule, updateSavedView, updateScheduledReport, updateSettings, updateSingleton, updateSlaRule, updateSyncJob, updateTask, updateTreePermission, updateUser, updateVirtualCollection, updateWebhook, updateWidgetFeed, updateWorkflowBinding, updateWorkspace, validateVirtualCollectionSql, verifyTwoFactor, whichLayoutForm };
package/dist/index.js CHANGED
@@ -907,8 +907,8 @@ function cancelScheduledChange(id) {
907
907
  function executeScheduledChange(id) {
908
908
  return cmd("POST", `/scheduled-changes/${id}/execute`);
909
909
  }
910
- function readFieldConfig(collection) {
911
- return cmd("GET", `/field-config/${collection}`);
910
+ function readFieldConfig(collection, opts) {
911
+ return cmd("GET", `/field-config/${collection}`, opts);
912
912
  }
913
913
  function updateFieldConfig(collection, field, body) {
914
914
  return cmd("PATCH", `/field-config/${collection}/${field}`, void 0, body);
@@ -1216,8 +1216,8 @@ function isPageSlot(assignment) {
1216
1216
  function readCollectionLayouts(collection) {
1217
1217
  return cmd("GET", "/collection-layouts", { collection });
1218
1218
  }
1219
- function readActiveLayout(collection) {
1220
- return cmd("GET", "/collection-layouts/active", { collection });
1219
+ function readActiveLayout(collection, opts) {
1220
+ return cmd("GET", "/collection-layouts/active", { collection, ...opts });
1221
1221
  }
1222
1222
  function readLayoutGroups(collection, layoutId) {
1223
1223
  return cmd("GET", `/field-groups/${collection}`, { layout_id: layoutId });
@@ -1228,11 +1228,11 @@ function readLayoutAssignments(layoutId) {
1228
1228
  function activateLayout(layoutId) {
1229
1229
  return cmd("POST", `/collection-layouts/${layoutId}/activate`);
1230
1230
  }
1231
- function cloneLayout(layoutId, name) {
1232
- return cmd("POST", `/collection-layouts/${layoutId}/clone`, void 0, { name });
1231
+ function cloneLayout(layoutId, name, opts) {
1232
+ return cmd("POST", `/collection-layouts/${layoutId}/clone`, void 0, { name, ...opts });
1233
1233
  }
1234
- function createCollectionLayout(collection, name) {
1235
- return cmd("POST", "/collection-layouts", void 0, { collection, name });
1234
+ function createCollectionLayout(collection, name, opts) {
1235
+ return cmd("POST", "/collection-layouts", void 0, { collection, name, ...opts });
1236
1236
  }
1237
1237
  function updateCollectionLayout(layoutId, patch) {
1238
1238
  return cmd("PATCH", `/collection-layouts/${layoutId}`, void 0, patch);
@@ -1640,6 +1640,159 @@ function listRetentionRuns(policyId) {
1640
1640
  return cmd("GET", `/retention/${policyId}/runs`);
1641
1641
  }
1642
1642
 
1643
+ // src/commands/layout-ai.ts
1644
+ function describeLayoutForm(layoutId) {
1645
+ return cmd("GET", `/ai-design/layouts/${layoutId}/describe`);
1646
+ }
1647
+ function whichLayoutForm(query) {
1648
+ return cmd("GET", "/ai-design/layouts/which-form", query);
1649
+ }
1650
+ function explainLayoutField(query) {
1651
+ return cmd("GET", "/ai-design/layouts/explain-field", query);
1652
+ }
1653
+ function proposeLayoutOps(layoutId, body) {
1654
+ return cmd("POST", `/ai-design/layouts/${layoutId}/proposals`, void 0, body);
1655
+ }
1656
+ function readLayoutProposals(layoutId, status) {
1657
+ return cmd("GET", `/ai-design/layouts/${layoutId}/proposals`, status ? { status } : void 0);
1658
+ }
1659
+ function resolveLayoutProposal(layoutId, proposalId, outcome) {
1660
+ return cmd("POST", `/ai-design/layouts/${layoutId}/proposals/${proposalId}/resolve`, void 0, {
1661
+ outcome
1662
+ });
1663
+ }
1664
+
1665
+ // src/commands/layout-editor.ts
1666
+ var PLACEMENT_PATCH_KEYS = [
1667
+ "label_override",
1668
+ "is_visible",
1669
+ "default_expanded",
1670
+ "col_span",
1671
+ "overrides",
1672
+ "show_row_revisions",
1673
+ "allow_revision_restore",
1674
+ "lock_conditions",
1675
+ "input_bindings",
1676
+ "widget_id",
1677
+ "show_approval_chain"
1678
+ ];
1679
+ var EDITOR_NOTE_MAX = 4e3;
1680
+ var GROUP_PATCH_KEYS = [
1681
+ "label",
1682
+ "type",
1683
+ "icon",
1684
+ "is_collapsed",
1685
+ "tab_mode",
1686
+ "hide_when_empty",
1687
+ "visibility_mode",
1688
+ "summary_fields",
1689
+ "summary_hide_empty",
1690
+ "swap_config",
1691
+ "skip_if_filled",
1692
+ "content",
1693
+ "content_tone",
1694
+ "visible_when",
1695
+ "hidden_for_roles",
1696
+ "locked_for_roles",
1697
+ "read_width",
1698
+ "editor_note",
1699
+ "i18n"
1700
+ ];
1701
+ var LAYOUT_PATCH_KEYS = [
1702
+ "name",
1703
+ "slug",
1704
+ "create_label",
1705
+ "create_hidden",
1706
+ "sort",
1707
+ "is_active",
1708
+ "disable_comments",
1709
+ "disable_tasks",
1710
+ "tab_mode",
1711
+ "validate_before_next",
1712
+ "summary_enabled",
1713
+ "summary_hide_empty",
1714
+ "ai_enabled",
1715
+ "accordion_mode",
1716
+ "disable_revisions",
1717
+ "disable_clone",
1718
+ "disable_delete",
1719
+ "row_order_field",
1720
+ "pdf_theme",
1721
+ "pdf_template_id",
1722
+ "pdf_cover_enabled",
1723
+ "pdf_cover_title_field",
1724
+ "pdf_cover_subtitle",
1725
+ "pdf_show_logo",
1726
+ "pdf_page_size",
1727
+ "pdf_orientation",
1728
+ "pdf_button_label",
1729
+ "conditions",
1730
+ "allow_schedule",
1731
+ "allow_disable_pickers",
1732
+ "layout_type",
1733
+ "addendum_layout_id",
1734
+ "workflow_template_id",
1735
+ "single_active_addendum",
1736
+ "addendum_default_view",
1737
+ "record_conditions",
1738
+ "default_values",
1739
+ "display_mode",
1740
+ "parent_layout_id",
1741
+ "hide_integrity_banner",
1742
+ "hide_sla_banner",
1743
+ "changes_tray",
1744
+ "dossier_enabled",
1745
+ "dossier_label",
1746
+ "quick_picker",
1747
+ "sheet_width",
1748
+ "header_fields",
1749
+ "hide_empty",
1750
+ "change_note"
1751
+ ];
1752
+ function readLayoutOverview(collection) {
1753
+ return cmd("GET", "/collection-layouts/overview", { collection });
1754
+ }
1755
+ function explainLayout(query) {
1756
+ return cmd("GET", "/collection-layouts/explain", query);
1757
+ }
1758
+ function readLayoutBundle(layoutId) {
1759
+ return cmd("GET", `/collection-layouts/${layoutId}/bundle`);
1760
+ }
1761
+ function submitLayoutOps(layoutId, body) {
1762
+ return cmd("POST", `/collection-layouts/${layoutId}/ops`, void 0, body);
1763
+ }
1764
+ function readLayoutVersion(layoutId, versionId) {
1765
+ return cmd("GET", `/collection-layouts/${layoutId}/versions/${versionId}`);
1766
+ }
1767
+ function diffLayoutVersion(layoutId, versionId, against) {
1768
+ return cmd(
1769
+ "GET",
1770
+ `/collection-layouts/${layoutId}/versions/${versionId}/diff`,
1771
+ against !== void 0 ? { against } : void 0
1772
+ );
1773
+ }
1774
+ function readLayoutDrift() {
1775
+ return cmd("GET", "/collection-layouts/drift");
1776
+ }
1777
+ function projectFieldConfig(collection, assignments) {
1778
+ return cmd("POST", `/field-config/${collection}/project`, void 0, { assignments });
1779
+ }
1780
+ function listInternalWidgetPlacements(widgetId) {
1781
+ return cmd("GET", `/widgets-internal/${widgetId}/placements`);
1782
+ }
1783
+ function readPickerExclusion(collection, itemId) {
1784
+ return cmd("GET", `/picker-exclusions/status/${collection}/${itemId}`);
1785
+ }
1786
+ function readPickerExclusions(collection, ids) {
1787
+ return cmd("POST", "/picker-exclusions/batch-status", void 0, { collection, ids });
1788
+ }
1789
+ function excludeFromPickers(body) {
1790
+ return cmd("POST", "/picker-exclusions", void 0, body);
1791
+ }
1792
+ function includeInPickers(body) {
1793
+ return cmd("DELETE", "/picker-exclusions", void 0, body);
1794
+ }
1795
+
1643
1796
  // src/commands/ops.ts
1644
1797
  function readReadiness() {
1645
1798
  return cmd("GET", "/ready");
@@ -1954,7 +2107,16 @@ function aggregateItems(collection, query) {
1954
2107
  if (query.filter) params.filter = JSON.stringify(query.filter);
1955
2108
  if (query.search) params.search = query.search;
1956
2109
  if (query.countAll) params.countAll = 1;
1957
- for (const key of ["groupBy", "count", "countDistinct", "sum", "avg", "min", "max", "sort"]) {
2110
+ for (const key of [
2111
+ "groupBy",
2112
+ "count",
2113
+ "countDistinct",
2114
+ "sum",
2115
+ "avg",
2116
+ "min",
2117
+ "max",
2118
+ "sort"
2119
+ ]) {
1958
2120
  const list = query[key];
1959
2121
  if (list?.length) params[key] = list.join(",");
1960
2122
  }
@@ -2705,6 +2867,10 @@ function submitFormItem(collection, values, options) {
2705
2867
  return cmd("POST", `/items/${collection}`, void 0, values);
2706
2868
  }
2707
2869
  export {
2870
+ EDITOR_NOTE_MAX,
2871
+ GROUP_PATCH_KEYS,
2872
+ LAYOUT_PATCH_KEYS,
2873
+ PLACEMENT_PATCH_KEYS,
2708
2874
  READ_MANY_MAX,
2709
2875
  _and,
2710
2876
  _contains,
@@ -2903,6 +3069,8 @@ export {
2903
3069
  deleteWorkspaceTemplate,
2904
3070
  deployImportProcedure,
2905
3071
  desc,
3072
+ describeLayoutForm,
3073
+ diffLayoutVersion,
2906
3074
  disableTwoFactor,
2907
3075
  discardHelpVideoPackageImport,
2908
3076
  drillReportRow,
@@ -2915,11 +3083,14 @@ export {
2915
3083
  evaluateFieldRules,
2916
3084
  evaluateFieldVisibility,
2917
3085
  excludeFromPicker,
3086
+ excludeFromPickers,
2918
3087
  executeBulkAction,
2919
3088
  executeCustomQuery,
2920
3089
  executeImportTemplate,
2921
3090
  executeItemAction,
2922
3091
  executeScheduledChange,
3092
+ explainLayout,
3093
+ explainLayoutField,
2923
3094
  explainRecordAccess,
2924
3095
  explainReportTrend,
2925
3096
  exportBlueprint,
@@ -2959,6 +3130,7 @@ export {
2959
3130
  importExternalApiSpec,
2960
3131
  importSchemaSnapshot,
2961
3132
  includeInPicker,
3133
+ includeInPickers,
2962
3134
  installBlueprint,
2963
3135
  installCollectionPreset,
2964
3136
  invokeInternalWidgetAction,
@@ -3013,6 +3185,7 @@ export {
3013
3185
  listImportDefinitions,
3014
3186
  listImportJobs,
3015
3187
  listImportTemplates,
3188
+ listInternalWidgetPlacements,
3016
3189
  listInternalWidgets,
3017
3190
  listIssues,
3018
3191
  listItemActions,
@@ -3092,6 +3265,8 @@ export {
3092
3265
  previewHelpVideoPackageImport,
3093
3266
  previewImportJob,
3094
3267
  previewReportWidget,
3268
+ projectFieldConfig,
3269
+ proposeLayoutOps,
3095
3270
  publishHelpVideo,
3096
3271
  publishItem,
3097
3272
  queryVirtualCollection,
@@ -3163,7 +3338,12 @@ export {
3163
3338
  readJobRegistry,
3164
3339
  readLastTouch,
3165
3340
  readLayoutAssignments,
3341
+ readLayoutBundle,
3342
+ readLayoutDrift,
3166
3343
  readLayoutGroups,
3344
+ readLayoutOverview,
3345
+ readLayoutProposals,
3346
+ readLayoutVersion,
3167
3347
  readMany,
3168
3348
  readMe,
3169
3349
  readMetricAlertLog,
@@ -3177,6 +3357,8 @@ export {
3177
3357
  readPageWidgetData,
3178
3358
  readPdfTemplate,
3179
3359
  readPersistedQuery,
3360
+ readPickerExclusion,
3361
+ readPickerExclusions,
3180
3362
  readPipelineFlowMap,
3181
3363
  readPipelineReplay,
3182
3364
  readPipelineTemplate,
@@ -3269,6 +3451,7 @@ export {
3269
3451
  rerecordHelpVideo,
3270
3452
  rerenderHelpVideo,
3271
3453
  resetReportCache,
3454
+ resolveLayoutProposal,
3272
3455
  resolveReportAlert,
3273
3456
  restoreHelpVideoVersion,
3274
3457
  restoreImportDefinitionVersion,
@@ -3322,6 +3505,7 @@ export {
3322
3505
  submitAddendum,
3323
3506
  submitFormItem,
3324
3507
  submitItemForReview,
3508
+ submitLayoutOps,
3325
3509
  submitToErp,
3326
3510
  subscribeFieldWatch,
3327
3511
  subscribeMetricAlert,
@@ -3408,5 +3592,6 @@ export {
3408
3592
  updateWorkflowBinding,
3409
3593
  updateWorkspace,
3410
3594
  validateVirtualCollectionSql,
3411
- verifyTwoFactor
3595
+ verifyTwoFactor,
3596
+ whichLayoutForm
3412
3597
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nivaro/sdk",
3
- "version": "0.1.25",
3
+ "version": "0.1.27",
4
4
  "description": "TypeScript SDK for Nivaro CMS — typed REST client, GraphQL, realtime subscriptions, and presence.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",