@rippling/rippling-sdk 0.2.0-alpha.34 → 0.2.0-alpha.35

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.
Files changed (230) hide show
  1. package/lib/manifest/app.d.mts +81 -13
  2. package/lib/manifest/app.d.mts.map +1 -1
  3. package/lib/manifest/app.d.ts +81 -13
  4. package/lib/manifest/app.d.ts.map +1 -1
  5. package/lib/manifest/app.js +37 -16
  6. package/lib/manifest/app.js.map +1 -1
  7. package/lib/manifest/app.mjs +37 -16
  8. package/lib/manifest/app.mjs.map +1 -1
  9. package/lib/manifest/category.d.mts +63 -7
  10. package/lib/manifest/category.d.mts.map +1 -1
  11. package/lib/manifest/category.d.ts +63 -7
  12. package/lib/manifest/category.d.ts.map +1 -1
  13. package/lib/manifest/category.js +45 -10
  14. package/lib/manifest/category.js.map +1 -1
  15. package/lib/manifest/category.mjs +43 -8
  16. package/lib/manifest/category.mjs.map +1 -1
  17. package/lib/manifest/custom-object-field-section.d.mts +56 -6
  18. package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
  19. package/lib/manifest/custom-object-field-section.d.ts +56 -6
  20. package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
  21. package/lib/manifest/custom-object-field-section.js +41 -14
  22. package/lib/manifest/custom-object-field-section.js.map +1 -1
  23. package/lib/manifest/custom-object-field-section.mjs +39 -12
  24. package/lib/manifest/custom-object-field-section.mjs.map +1 -1
  25. package/lib/manifest/custom-object-page-layout.d.mts +201 -41
  26. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  27. package/lib/manifest/custom-object-page-layout.d.ts +201 -41
  28. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  29. package/lib/manifest/custom-object-page-layout.js +76 -30
  30. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  31. package/lib/manifest/custom-object-page-layout.mjs +74 -28
  32. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  33. package/lib/manifest/custom-object.d.mts +128 -15
  34. package/lib/manifest/custom-object.d.mts.map +1 -1
  35. package/lib/manifest/custom-object.d.ts +128 -15
  36. package/lib/manifest/custom-object.d.ts.map +1 -1
  37. package/lib/manifest/custom-object.js +61 -26
  38. package/lib/manifest/custom-object.js.map +1 -1
  39. package/lib/manifest/custom-object.mjs +61 -26
  40. package/lib/manifest/custom-object.mjs.map +1 -1
  41. package/lib/manifest/field.d.mts +265 -54
  42. package/lib/manifest/field.d.mts.map +1 -1
  43. package/lib/manifest/field.d.ts +265 -54
  44. package/lib/manifest/field.d.ts.map +1 -1
  45. package/lib/manifest/field.js +100 -57
  46. package/lib/manifest/field.js.map +1 -1
  47. package/lib/manifest/field.mjs +100 -57
  48. package/lib/manifest/field.mjs.map +1 -1
  49. package/lib/manifest/list-view.d.mts +105 -14
  50. package/lib/manifest/list-view.d.mts.map +1 -1
  51. package/lib/manifest/list-view.d.ts +105 -14
  52. package/lib/manifest/list-view.d.ts.map +1 -1
  53. package/lib/manifest/list-view.js +50 -14
  54. package/lib/manifest/list-view.js.map +1 -1
  55. package/lib/manifest/list-view.mjs +48 -12
  56. package/lib/manifest/list-view.mjs.map +1 -1
  57. package/lib/manifest/manifest-builder.d.mts +77 -11
  58. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  59. package/lib/manifest/manifest-builder.d.ts +77 -11
  60. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  61. package/lib/manifest/manifest-builder.js +46 -24
  62. package/lib/manifest/manifest-builder.js.map +1 -1
  63. package/lib/manifest/manifest-builder.mjs +44 -22
  64. package/lib/manifest/manifest-builder.mjs.map +1 -1
  65. package/lib/manifest/manifest-function.d.mts +92 -12
  66. package/lib/manifest/manifest-function.d.mts.map +1 -1
  67. package/lib/manifest/manifest-function.d.ts +92 -12
  68. package/lib/manifest/manifest-function.d.ts.map +1 -1
  69. package/lib/manifest/manifest-function.js +40 -11
  70. package/lib/manifest/manifest-function.js.map +1 -1
  71. package/lib/manifest/manifest-function.mjs +38 -9
  72. package/lib/manifest/manifest-function.mjs.map +1 -1
  73. package/lib/manifest/rule.d.mts +94 -16
  74. package/lib/manifest/rule.d.mts.map +1 -1
  75. package/lib/manifest/rule.d.ts +94 -16
  76. package/lib/manifest/rule.d.ts.map +1 -1
  77. package/lib/manifest/rule.js +36 -15
  78. package/lib/manifest/rule.js.map +1 -1
  79. package/lib/manifest/rule.mjs +36 -15
  80. package/lib/manifest/rule.mjs.map +1 -1
  81. package/lib/manifest/sdui-page.d.mts +67 -11
  82. package/lib/manifest/sdui-page.d.mts.map +1 -1
  83. package/lib/manifest/sdui-page.d.ts +67 -11
  84. package/lib/manifest/sdui-page.d.ts.map +1 -1
  85. package/lib/manifest/sdui-page.js +44 -13
  86. package/lib/manifest/sdui-page.js.map +1 -1
  87. package/lib/manifest/sdui-page.mjs +42 -11
  88. package/lib/manifest/sdui-page.mjs.map +1 -1
  89. package/lib/manifest/validation.d.mts +87 -12
  90. package/lib/manifest/validation.d.mts.map +1 -1
  91. package/lib/manifest/validation.d.ts +87 -12
  92. package/lib/manifest/validation.d.ts.map +1 -1
  93. package/lib/manifest/validation.js +41 -15
  94. package/lib/manifest/validation.js.map +1 -1
  95. package/lib/manifest/validation.mjs +39 -13
  96. package/lib/manifest/validation.mjs.map +1 -1
  97. package/lib/sdui/actions.d.mts +25 -0
  98. package/lib/sdui/actions.d.mts.map +1 -0
  99. package/lib/sdui/actions.d.ts +25 -0
  100. package/lib/sdui/actions.d.ts.map +1 -0
  101. package/lib/sdui/actions.js +53 -0
  102. package/lib/sdui/actions.js.map +1 -0
  103. package/lib/sdui/actions.mjs +42 -0
  104. package/lib/sdui/actions.mjs.map +1 -0
  105. package/lib/sdui/component.d.mts +41 -0
  106. package/lib/sdui/component.d.mts.map +1 -0
  107. package/lib/sdui/component.d.ts +41 -0
  108. package/lib/sdui/component.d.ts.map +1 -0
  109. package/lib/sdui/component.js +95 -0
  110. package/lib/sdui/component.js.map +1 -0
  111. package/lib/sdui/component.mjs +91 -0
  112. package/lib/sdui/component.mjs.map +1 -0
  113. package/lib/sdui/components.d.mts +149 -0
  114. package/lib/sdui/components.d.mts.map +1 -0
  115. package/lib/sdui/components.d.ts +149 -0
  116. package/lib/sdui/components.d.ts.map +1 -0
  117. package/lib/sdui/components.js +303 -0
  118. package/lib/sdui/components.js.map +1 -0
  119. package/lib/sdui/components.mjs +298 -0
  120. package/lib/sdui/components.mjs.map +1 -0
  121. package/lib/sdui/conditions.d.mts +25 -0
  122. package/lib/sdui/conditions.d.mts.map +1 -0
  123. package/lib/sdui/conditions.d.ts +25 -0
  124. package/lib/sdui/conditions.d.ts.map +1 -0
  125. package/lib/sdui/conditions.js +47 -0
  126. package/lib/sdui/conditions.js.map +1 -0
  127. package/lib/sdui/conditions.mjs +35 -0
  128. package/lib/sdui/conditions.mjs.map +1 -0
  129. package/lib/sdui/directives.d.mts +18 -0
  130. package/lib/sdui/directives.d.mts.map +1 -0
  131. package/lib/sdui/directives.d.ts +18 -0
  132. package/lib/sdui/directives.d.ts.map +1 -0
  133. package/lib/sdui/directives.js +28 -0
  134. package/lib/sdui/directives.js.map +1 -0
  135. package/lib/sdui/directives.mjs +21 -0
  136. package/lib/sdui/directives.mjs.map +1 -0
  137. package/lib/sdui/index.d.mts +362 -0
  138. package/lib/sdui/index.d.mts.map +1 -0
  139. package/lib/sdui/index.d.ts +362 -0
  140. package/lib/sdui/index.d.ts.map +1 -0
  141. package/lib/sdui/index.js +375 -0
  142. package/lib/sdui/index.js.map +1 -0
  143. package/lib/sdui/index.mjs +199 -0
  144. package/lib/sdui/index.mjs.map +1 -0
  145. package/lib/sdui/props.d.mts +12 -0
  146. package/lib/sdui/props.d.mts.map +1 -0
  147. package/lib/sdui/props.d.ts +12 -0
  148. package/lib/sdui/props.d.ts.map +1 -0
  149. package/lib/sdui/props.js +25 -0
  150. package/lib/sdui/props.js.map +1 -0
  151. package/lib/sdui/props.mjs +21 -0
  152. package/lib/sdui/props.mjs.map +1 -0
  153. package/lib/sdui/render.d.mts +23 -0
  154. package/lib/sdui/render.d.mts.map +1 -0
  155. package/lib/sdui/render.d.ts +23 -0
  156. package/lib/sdui/render.d.ts.map +1 -0
  157. package/lib/sdui/render.js +40 -0
  158. package/lib/sdui/render.js.map +1 -0
  159. package/lib/sdui/render.mjs +37 -0
  160. package/lib/sdui/render.mjs.map +1 -0
  161. package/lib/sdui/state.d.mts +22 -0
  162. package/lib/sdui/state.d.mts.map +1 -0
  163. package/lib/sdui/state.d.ts +22 -0
  164. package/lib/sdui/state.d.ts.map +1 -0
  165. package/lib/sdui/state.js +57 -0
  166. package/lib/sdui/state.js.map +1 -0
  167. package/lib/sdui/state.mjs +53 -0
  168. package/lib/sdui/state.mjs.map +1 -0
  169. package/package.json +1 -1
  170. package/resources/draft-hires.d.mts +4 -0
  171. package/resources/draft-hires.d.mts.map +1 -1
  172. package/resources/draft-hires.d.ts +4 -0
  173. package/resources/draft-hires.d.ts.map +1 -1
  174. package/resources/files.d.mts +16 -1
  175. package/resources/files.d.mts.map +1 -1
  176. package/resources/files.d.ts +16 -1
  177. package/resources/files.d.ts.map +1 -1
  178. package/resources/headcount-positions.d.mts +2 -2
  179. package/resources/headcount-positions.d.mts.map +1 -1
  180. package/resources/headcount-positions.d.ts +2 -2
  181. package/resources/headcount-positions.d.ts.map +1 -1
  182. package/resources/legal-entities.d.mts +1 -1
  183. package/resources/legal-entities.d.mts.map +1 -1
  184. package/resources/legal-entities.d.ts +1 -1
  185. package/resources/legal-entities.d.ts.map +1 -1
  186. package/resources/location-factors.d.mts +2 -2
  187. package/resources/location-factors.d.mts.map +1 -1
  188. package/resources/location-factors.d.ts +2 -2
  189. package/resources/location-factors.d.ts.map +1 -1
  190. package/resources/shared.d.mts +1 -1
  191. package/resources/shared.d.mts.map +1 -1
  192. package/resources/shared.d.ts +1 -1
  193. package/resources/shared.d.ts.map +1 -1
  194. package/resources/workers.d.mts +2 -2
  195. package/resources/workers.d.mts.map +1 -1
  196. package/resources/workers.d.ts +2 -2
  197. package/resources/workers.d.ts.map +1 -1
  198. package/src/lib/manifest/app.ts +81 -26
  199. package/src/lib/manifest/category.ts +63 -14
  200. package/src/lib/manifest/custom-object-field-section.ts +56 -17
  201. package/src/lib/manifest/custom-object-page-layout.ts +201 -66
  202. package/src/lib/manifest/custom-object.ts +128 -37
  203. package/src/lib/manifest/field.ts +265 -75
  204. package/src/lib/manifest/list-view.ts +105 -25
  205. package/src/lib/manifest/manifest-builder.ts +75 -32
  206. package/src/lib/manifest/manifest-function.ts +92 -22
  207. package/src/lib/manifest/rule.ts +95 -29
  208. package/src/lib/manifest/sdui-page.ts +67 -21
  209. package/src/lib/manifest/validation.ts +87 -24
  210. package/src/lib/sdui/actions.ts +58 -0
  211. package/src/lib/sdui/component.ts +122 -0
  212. package/src/lib/sdui/components.ts +308 -0
  213. package/src/lib/sdui/conditions.ts +59 -0
  214. package/src/lib/sdui/directives.ts +42 -0
  215. package/src/lib/sdui/index.ts +365 -0
  216. package/src/lib/sdui/props.ts +32 -0
  217. package/src/lib/sdui/render.ts +58 -0
  218. package/src/lib/sdui/state.ts +60 -0
  219. package/src/resources/draft-hires.ts +5 -0
  220. package/src/resources/files.ts +18 -1
  221. package/src/resources/headcount-positions.ts +2 -0
  222. package/src/resources/legal-entities.ts +1 -0
  223. package/src/resources/location-factors.ts +2 -0
  224. package/src/resources/shared.ts +1 -0
  225. package/src/resources/workers.ts +2 -0
  226. package/src/version.ts +1 -1
  227. package/version.d.mts +1 -1
  228. package/version.d.ts +1 -1
  229. package/version.js +1 -1
  230. package/version.mjs +1 -1
@@ -2,135 +2,265 @@ import type { CustomObject } from "./custom-object.mjs";
2
2
  import type { Field } from "./field.mjs";
3
3
  /** Edit to a built-in (system) header field. */
4
4
  export interface SystemHeaderFieldEdit {
5
+ /** Replace the system field's RQL field reference. Optional. */
5
6
  newRqlField?: string;
7
+ /** Remove this system field from the header. Optional. */
6
8
  deleted?: boolean;
7
9
  }
8
- /** Custom header field added via newFields. `key` is required + non-empty. */
10
+ /**
11
+ * Custom header field added via `newFields`.
12
+ *
13
+ * `key` is required and must be non-empty — it is used as the stable identity
14
+ * for this field in `headerFieldsOrder` and visibility conditions.
15
+ */
9
16
  export interface NewHeaderField {
17
+ /** RQL field name to display. Required. */
10
18
  rqlName: string;
19
+ /** Stable key for this field. Required. */
11
20
  key: string;
21
+ /** Whether the user can remove this field. Optional. */
12
22
  canBeDeleted?: boolean;
23
+ /** Whether the user can swap this field for another. Optional. */
13
24
  canBeChanged?: boolean;
25
+ /** Whether the user can reorder this field. Optional. */
14
26
  canBeMoved?: boolean;
15
27
  }
16
28
  /**
17
- * Strict shape for header_edits. Only the keys listed here are accepted by
18
- * HeaderEditsDTO — anything else is dropped on the wire. Pass `{}` for an
19
- * empty header.
29
+ * Header configuration for a page layout (`header_edits`).
30
+ *
31
+ * Only the keys listed here are accepted — anything else is silently dropped
32
+ * on the wire. Pass `{}` for an unchanged header.
33
+ *
34
+ * > **Caution:** key names are camelCase on the wire. Snake_case keys are
35
+ * > silently dropped and produce an empty header on deploy.
20
36
  */
21
37
  export interface HeaderEdits {
38
+ /** Replace the record title field (pass the field's api_name). Optional. */
22
39
  newTitleField?: string | null;
40
+ /** Remove the title field from the header. Optional. */
23
41
  titleFieldDeleted?: boolean;
42
+ /** Replace the record description field. Optional. */
24
43
  newDescriptionField?: string | null;
44
+ /** Remove the description field from the header. Optional. */
25
45
  descriptionFieldDeleted?: boolean;
26
- /** Map of system field key → edit. */
46
+ /** Edits to built-in system header fields, keyed by system field key. Optional. */
27
47
  systemFieldEdits?: Record<string, SystemHeaderFieldEdit>;
48
+ /** Additional custom fields to add to the header. Optional. */
28
49
  newFields?: NewHeaderField[];
29
- /** Sort order of header field `key` values (custom + system). */
50
+ /** Ordered list of header field `key` values (custom + system). Optional. */
30
51
  headerFieldsOrder?: string[];
52
+ /** Action button keys to show in the header. Optional. */
31
53
  buttons?: string[];
32
54
  }
33
- /** SectionFieldDTO one field inside a fields_section. */
55
+ /** One field entry inside a `fields_section`. */
34
56
  export interface SectionField {
57
+ /** RQL name of the field to display. Required. */
35
58
  fieldRqlName: string;
59
+ /** Hide this field from view. Optional. */
36
60
  hidden?: boolean;
61
+ /** Allow inline editing of this field. Optional. */
37
62
  editable?: boolean;
63
+ /** Controls how the field can be moved in the UI. Optional. */
38
64
  movementOption?: 'tab' | 'free';
39
65
  }
40
- /** FieldsSectionDTO standard field grid section. */
66
+ /** A standard field-grid section inside a tab. */
41
67
  export interface FieldsSection {
42
68
  type: 'fields_section';
69
+ /** Stable key for this section. Required. */
43
70
  key: string;
71
+ /** Display name of the section. Required. */
44
72
  name: string;
73
+ /** Fields to display in this section. Required. */
45
74
  fields: SectionField[];
46
75
  }
47
- /** Only `fields_section` is modeled today (most common). Add other section
48
- * types (related_object_section, custom_section, …) explicitly as needed. */
76
+ /**
77
+ * A section inside a page layout tab.
78
+ *
79
+ * Only `fields_section` is modeled today. Add other section types
80
+ * (`related_object_section`, `custom_section`, …) explicitly as needed.
81
+ */
49
82
  export type PageLayoutSection = FieldsSection;
50
- /** PageLayoutTabWithSectionsDTO. */
83
+ /** A tab that contains one or more field-grid sections. */
51
84
  export interface TabWithSections {
52
85
  type: 'tab_with_sections';
86
+ /** Stable key for this tab. Required. */
53
87
  key: string;
88
+ /** Display name of the tab. Required. */
54
89
  name: string;
90
+ /** Sections inside this tab. Required. */
55
91
  sections: PageLayoutSection[];
56
92
  }
57
- /** CustomTabDTO host a custom component as a tab. */
93
+ /** A tab that hosts a custom UI component. */
58
94
  export interface CustomTab {
59
95
  type: 'custom_tab';
96
+ /** Stable key for this tab. Required. */
60
97
  key: string;
98
+ /** Display name of the tab. Required. */
61
99
  name: string;
100
+ /** Key of the custom component to render. Required. */
62
101
  componentKey: string;
63
102
  }
103
+ /** A tab entry in a page layout — either a sections-based tab or a custom component tab. */
64
104
  export type PageLayoutTab = TabWithSections | CustomTab;
65
- /** Layout of fields inside a fields_section. */
105
+ /** Column layout for a `fields_section`. */
66
106
  export type SectionFieldsLayout = 'one_column' | 'two_column' | 'three_column' | 'responsive';
67
- /** SystemSectionEditDTO — edits to a built-in section inside a system tab. */
107
+ /** Edits to a built-in section inside a system tab. */
68
108
  export interface SystemSectionEdit {
109
+ /** Rename this section. Optional. */
69
110
  newName?: string;
111
+ /** Remove this section. Optional. */
70
112
  deleted?: boolean;
113
+ /** Change the column layout. Optional. */
71
114
  newLayout?: SectionFieldsLayout;
115
+ /** Add fields to this section. Optional. */
72
116
  newFields?: SectionField[];
117
+ /** Hide the section name header. Optional. */
73
118
  newHideName?: boolean;
74
119
  }
75
- /** SystemTabEditDTO — edits to a built-in tab (rename, delete, add sections, …). */
120
+ /** Edits to a built-in (system) tab. */
76
121
  export interface SystemTabEdit {
122
+ /** Rename this tab. Optional. */
77
123
  newName?: string;
124
+ /** Remove this tab. Optional. */
78
125
  deleted?: boolean;
126
+ /** Add new sections to this tab. Optional. */
79
127
  newSections?: PageLayoutSection[];
128
+ /** Edits to built-in sections inside this tab, keyed by section key. Optional. */
80
129
  systemSectionEdits?: Record<string, SystemSectionEdit>;
130
+ /** Reorder sections by key. Optional. */
81
131
  sectionsOrder?: string[];
82
132
  }
83
133
  /**
84
- * Strict shape for tab_edits. Only TabEditsDTO keys allowed.
134
+ * Tab structure configuration for a page layout (`tab_edits`).
85
135
  *
86
- * All fields are optional to match `TabEditsDTO`'s `default_factory` (empty
87
- * list / empty dict). An omitted `tabEdits` defaults to `{}` in the
88
- * constructor; partial objects rely on backend per-field defaults.
136
+ * All fields are optional. An omitted `tabEdits` defaults to `{}`.
89
137
  *
90
- * - newTabs: tabs to create (each needs a `type` discriminator)
91
- * - systemTabEdits: edits keyed by built-in tab key
92
- * - tabsOrder: ordered list of tab `key` values (new + system)
93
- * - newTabLayout: optional orientation
138
+ * > **Caution:** key names are camelCase on the wire. Snake_case keys are
139
+ * > silently dropped and produce an empty layout on deploy.
94
140
  */
95
141
  export interface TabEdits {
142
+ /** New tabs to add to this layout. Each must include a `type` discriminator. Optional. */
96
143
  newTabs?: PageLayoutTab[];
144
+ /** Edits to existing system tabs, keyed by tab key. Optional. */
97
145
  systemTabEdits?: Record<string, SystemTabEdit>;
146
+ /** Ordered list of tab `key` values (new + system). Optional. */
98
147
  tabsOrder?: string[];
148
+ /** Tab strip orientation. Optional. */
99
149
  newTabLayout?: 'vertical' | 'horizontal';
100
150
  }
101
151
  /**
102
- * VisibilityConditionDTO. Both fields are required on the Python type — pass
103
- * empty string / empty object if you genuinely have no formula or AST.
152
+ * A single visibility condition applied to a section or tab.
153
+ *
154
+ * Both fields are required by the backend — pass an empty string / empty object
155
+ * if you have no formula or condition tree.
104
156
  */
105
157
  export interface VisibilityCondition {
158
+ /** RQL formula that controls visibility. Required. */
106
159
  rqlFormula: string;
160
+ /** Layered conditions tree (AST). Required. */
107
161
  layeredConditionsTree: Record<string, any>;
108
162
  }
109
- /** Pass `{}` for "no conditions" — both maps default empty. */
163
+ /**
164
+ * Visibility conditions for sections and tabs on a page layout.
165
+ *
166
+ * Pass `{}` for no conditions.
167
+ */
110
168
  export interface VisibilityConditions {
169
+ /** Per-section visibility conditions, keyed by section key. Optional. */
111
170
  sections?: Record<string, VisibilityCondition>;
171
+ /** Per-tab visibility conditions, keyed by tab key. Optional. */
112
172
  tabs?: Record<string, VisibilityCondition>;
113
173
  }
174
+ /**
175
+ * Initialization properties for {@link CustomObjectPageLayout}.
176
+ */
114
177
  export interface CustomObjectPageLayoutProps {
115
178
  /**
116
- * Required. Stable `api_name` for the layout. Use `'default'` for the layout
117
- * that drives **Add** and the default object detail view (per Custom Object
118
- * one `default` per object).
179
+ * Stable identifier for this layout (e.g. `'default'`).
180
+ *
181
+ * Required. Use `'default'` for the layout that drives the **Add** form and
182
+ * the default record detail view. Each custom object supports one `'default'`
183
+ * layout.
119
184
  */
120
185
  apiName: string;
121
- /** Required. Display name of the layout. */
186
+ /**
187
+ * Display name of this layout shown in the layout selector.
188
+ *
189
+ * Required.
190
+ */
122
191
  name: string;
123
- /** Optional. Tab structure (TabEditsDTO). Defaults to empty. */
192
+ /**
193
+ * Tab structure — which tabs and sections to show on the detail page.
194
+ *
195
+ * Optional. @default `{}`
196
+ */
124
197
  tabEdits?: TabEdits;
125
- /** Optional. Header configuration (HeaderEditsDTO). Defaults to empty. */
198
+ /**
199
+ * Header configuration — title field, description field, and action buttons.
200
+ *
201
+ * Optional. @default `{}`
202
+ */
126
203
  headerEdits?: HeaderEdits;
127
- /** Optional. Visibility conditions. Defaults to empty (no conditions). */
204
+ /**
205
+ * Visibility conditions for individual tabs and sections.
206
+ *
207
+ * Optional. @default `{}`
208
+ */
128
209
  visibilityConditions?: VisibilityConditions;
129
- /** Identity override. Override the layout identifier. @default generateId('layout') */
210
+ /**
211
+ * Stable identifier for this layout record. Pass a human-readable slug
212
+ * to keep it stable across regenerations.
213
+ *
214
+ * Optional. Auto-generated when omitted. @default generateId('layout')
215
+ */
130
216
  layoutId?: string;
131
- /** Optional. Overwritten at install; defaults to object api_name. */
217
+ /**
218
+ * Blueprint key used during install. Defaults to the parent object's api_name.
219
+ *
220
+ * Optional.
221
+ */
132
222
  blueprintKey?: string;
133
223
  }
224
+ /**
225
+ * Defines a page layout and registers it with the manifest.
226
+ *
227
+ * A page layout controls the tab structure, section groupings, header fields,
228
+ * and visibility conditions on a custom object's record detail page. You would
229
+ * normally define one layout per custom object using `apiName: 'default'`.
230
+ *
231
+ * For simple single-tab layouts, use the {@link CustomObjectPageLayout.basic}
232
+ * factory instead of constructing the full props manually.
233
+ *
234
+ * > **Caution:** all keys inside `tabEdits` and `headerEdits` must be camelCase.
235
+ * > Snake_case keys are silently dropped on the wire and produce an empty layout.
236
+ *
237
+ * @example
238
+ * ```ts
239
+ * new CustomObjectPageLayout(memberObj, {
240
+ * apiName: 'default',
241
+ * name: 'Member',
242
+ * layoutId: 'layout_gym_member',
243
+ * headerEdits: { newTitleField: memberDisplayName.getApiName() },
244
+ * tabEdits: {
245
+ * newTabs: [{
246
+ * key: 'member', name: 'Member', type: 'tab_with_sections',
247
+ * sections: [{
248
+ * key: 'profile', name: 'Profile', type: 'fields_section',
249
+ * fields: [
250
+ * { fieldRqlName: memberFirstName.getApiName() },
251
+ * { fieldRqlName: memberEmail.getApiName() },
252
+ * ],
253
+ * }],
254
+ * }],
255
+ * systemTabEdits: {},
256
+ * tabsOrder: ['member'],
257
+ * },
258
+ * visibilityConditions: {},
259
+ * });
260
+ * ```
261
+ *
262
+ * @see {@link CustomObjectPageLayout.basic} — factory for simple single-tab layouts.
263
+ */
134
264
  export declare class CustomObjectPageLayout {
135
265
  private readonly _layoutId;
136
266
  private readonly _apiName;
@@ -140,17 +270,47 @@ export declare class CustomObjectPageLayout {
140
270
  private readonly _headerEdits;
141
271
  private readonly _visibilityConditions;
142
272
  private readonly _blueprintKey;
143
- /** Build a new layout and auto-register with the CO's scope. */
273
+ /**
274
+ * @param customObject - The custom object this layout belongs to.
275
+ * @param props - Initialization properties.
276
+ * @throws {Error} If `apiName` or `name` is empty.
277
+ */
144
278
  constructor(customObject: CustomObject, props: CustomObjectPageLayoutProps);
145
- /** Backend layout_id used as this layout's identifier. */
279
+ /**
280
+ * Returns the stable identifier for this layout record (e.g. `'layout_gym_member'`).
281
+ */
146
282
  getLayoutId(): string;
147
- /** Stable api_name for this layout. */
283
+ /**
284
+ * Returns the api_name of this layout (e.g. `'default'`).
285
+ */
148
286
  getApiName(): string;
149
- /** api_name of the CustomObject this layout lives on. */
287
+ /**
288
+ * Returns the api_name of the custom object this layout belongs to.
289
+ */
150
290
  getCustomObjectApiName(): string;
151
- /** Serialize to the backend `CUSTOM_OBJECT_PAGE_LAYOUT` wire shape. */
291
+ /**
292
+ * Serializes this layout to the wire format consumed by the manifest install endpoint.
293
+ *
294
+ * @returns A plain object with `type: 'CUSTOM_OBJECT_PAGE_LAYOUT'`.
295
+ */
152
296
  toDict(): Record<string, any>;
153
- /** Factory for a single-tab "Details" page listing the given fields. */
297
+ /**
298
+ * Creates a simple single-tab "Details" layout with a single "General" section.
299
+ *
300
+ * Use this factory when you want a straightforward layout without customizing
301
+ * tabs or sections. Always uses `apiName: 'default'`.
302
+ *
303
+ * @param customObject - The custom object to create the layout for.
304
+ * @param props - Optional. Pass `fields` to populate the General section.
305
+ * @returns A new `CustomObjectPageLayout` registered with the manifest.
306
+ *
307
+ * @example
308
+ * ```ts
309
+ * CustomObjectPageLayout.basic(memberObj, {
310
+ * fields: [memberFirstName, memberEmail, memberStatusField],
311
+ * });
312
+ * ```
313
+ */
154
314
  static basic(customObject: CustomObject, props?: {
155
315
  fields?: Field[];
156
316
  }): CustomObjectPageLayout;
@@ -1 +1 @@
1
- {"version":3,"file":"custom-object-page-layout.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/custom-object-page-layout.ts"],"names":[],"mappings":"OA0BO,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;AAMrB,gDAAgD;AAChD,MAAM,WAAW,qBAAqB;IACpC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB;AAED,8EAA8E;AAC9E,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,MAAM,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC;IACZ,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;;GAIG;AACH,MAAM,WAAW,WAAW;IAC1B,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAClC,sCAAsC;IACtC,gBAAgB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,qBAAqB,CAAC,CAAC;IACzD,SAAS,CAAC,EAAE,cAAc,EAAE,CAAC;IAC7B,iEAAiE;IACjE,iBAAiB,CAAC,EAAE,M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