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

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 (270) hide show
  1. package/client.d.mts +6 -0
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +6 -0
  4. package/client.d.ts.map +1 -1
  5. package/client.js +6 -0
  6. package/client.js.map +1 -1
  7. package/client.mjs +6 -0
  8. package/client.mjs.map +1 -1
  9. package/examples/.keep +4 -0
  10. package/examples/manifest/dental-practice-management/dental-practice-management.ts +651 -0
  11. package/examples/manifest/dental-practice-management/manifest.json +1870 -0
  12. package/examples/manifest/gym-membership-management/gym-membership-management.ts +757 -0
  13. package/examples/manifest/gym-membership-management/manifest.json +1975 -0
  14. package/examples/sdui/sdui-crud-todo/rippling-function.ts +367 -0
  15. package/examples/sdui/sdui-crud-todo/sdui-crud-todo.ts +282 -0
  16. package/examples/sdui/sdui-showcase/rippling-function.ts +381 -0
  17. package/examples/sdui/sdui-showcase/sdui-showcase.ts +351 -0
  18. package/examples/sdui/sdui-tab-multi-view/rippling-function.ts +1061 -0
  19. package/examples/sdui/sdui-tab-multi-view/sdui-tab-multi-view.ts +924 -0
  20. package/examples/sdui/vote/rippling-function.ts +330 -0
  21. package/examples/sdui/vote/vote.ts +298 -0
  22. package/lib/manifest/app.d.mts +81 -13
  23. package/lib/manifest/app.d.mts.map +1 -1
  24. package/lib/manifest/app.d.ts +81 -13
  25. package/lib/manifest/app.d.ts.map +1 -1
  26. package/lib/manifest/app.js +37 -16
  27. package/lib/manifest/app.js.map +1 -1
  28. package/lib/manifest/app.mjs +37 -16
  29. package/lib/manifest/app.mjs.map +1 -1
  30. package/lib/manifest/category.d.mts +63 -7
  31. package/lib/manifest/category.d.mts.map +1 -1
  32. package/lib/manifest/category.d.ts +63 -7
  33. package/lib/manifest/category.d.ts.map +1 -1
  34. package/lib/manifest/category.js +45 -10
  35. package/lib/manifest/category.js.map +1 -1
  36. package/lib/manifest/category.mjs +43 -8
  37. package/lib/manifest/category.mjs.map +1 -1
  38. package/lib/manifest/custom-object-field-section.d.mts +56 -6
  39. package/lib/manifest/custom-object-field-section.d.mts.map +1 -1
  40. package/lib/manifest/custom-object-field-section.d.ts +56 -6
  41. package/lib/manifest/custom-object-field-section.d.ts.map +1 -1
  42. package/lib/manifest/custom-object-field-section.js +41 -14
  43. package/lib/manifest/custom-object-field-section.js.map +1 -1
  44. package/lib/manifest/custom-object-field-section.mjs +39 -12
  45. package/lib/manifest/custom-object-field-section.mjs.map +1 -1
  46. package/lib/manifest/custom-object-page-layout.d.mts +201 -41
  47. package/lib/manifest/custom-object-page-layout.d.mts.map +1 -1
  48. package/lib/manifest/custom-object-page-layout.d.ts +201 -41
  49. package/lib/manifest/custom-object-page-layout.d.ts.map +1 -1
  50. package/lib/manifest/custom-object-page-layout.js +76 -30
  51. package/lib/manifest/custom-object-page-layout.js.map +1 -1
  52. package/lib/manifest/custom-object-page-layout.mjs +74 -28
  53. package/lib/manifest/custom-object-page-layout.mjs.map +1 -1
  54. package/lib/manifest/custom-object.d.mts +128 -15
  55. package/lib/manifest/custom-object.d.mts.map +1 -1
  56. package/lib/manifest/custom-object.d.ts +128 -15
  57. package/lib/manifest/custom-object.d.ts.map +1 -1
  58. package/lib/manifest/custom-object.js +61 -26
  59. package/lib/manifest/custom-object.js.map +1 -1
  60. package/lib/manifest/custom-object.mjs +61 -26
  61. package/lib/manifest/custom-object.mjs.map +1 -1
  62. package/lib/manifest/field.d.mts +265 -54
  63. package/lib/manifest/field.d.mts.map +1 -1
  64. package/lib/manifest/field.d.ts +265 -54
  65. package/lib/manifest/field.d.ts.map +1 -1
  66. package/lib/manifest/field.js +100 -57
  67. package/lib/manifest/field.js.map +1 -1
  68. package/lib/manifest/field.mjs +100 -57
  69. package/lib/manifest/field.mjs.map +1 -1
  70. package/lib/manifest/list-view.d.mts +105 -14
  71. package/lib/manifest/list-view.d.mts.map +1 -1
  72. package/lib/manifest/list-view.d.ts +105 -14
  73. package/lib/manifest/list-view.d.ts.map +1 -1
  74. package/lib/manifest/list-view.js +50 -14
  75. package/lib/manifest/list-view.js.map +1 -1
  76. package/lib/manifest/list-view.mjs +48 -12
  77. package/lib/manifest/list-view.mjs.map +1 -1
  78. package/lib/manifest/manifest-builder.d.mts +77 -11
  79. package/lib/manifest/manifest-builder.d.mts.map +1 -1
  80. package/lib/manifest/manifest-builder.d.ts +77 -11
  81. package/lib/manifest/manifest-builder.d.ts.map +1 -1
  82. package/lib/manifest/manifest-builder.js +46 -24
  83. package/lib/manifest/manifest-builder.js.map +1 -1
  84. package/lib/manifest/manifest-builder.mjs +44 -22
  85. package/lib/manifest/manifest-builder.mjs.map +1 -1
  86. package/lib/manifest/manifest-function.d.mts +92 -12
  87. package/lib/manifest/manifest-function.d.mts.map +1 -1
  88. package/lib/manifest/manifest-function.d.ts +92 -12
  89. package/lib/manifest/manifest-function.d.ts.map +1 -1
  90. package/lib/manifest/manifest-function.js +40 -11
  91. package/lib/manifest/manifest-function.js.map +1 -1
  92. package/lib/manifest/manifest-function.mjs +38 -9
  93. package/lib/manifest/manifest-function.mjs.map +1 -1
  94. package/lib/manifest/rule.d.mts +94 -16
  95. package/lib/manifest/rule.d.mts.map +1 -1
  96. package/lib/manifest/rule.d.ts +94 -16
  97. package/lib/manifest/rule.d.ts.map +1 -1
  98. package/lib/manifest/rule.js +36 -15
  99. package/lib/manifest/rule.js.map +1 -1
  100. package/lib/manifest/rule.mjs +36 -15
  101. package/lib/manifest/rule.mjs.map +1 -1
  102. package/lib/manifest/sdui-page.d.mts +67 -11
  103. package/lib/manifest/sdui-page.d.mts.map +1 -1
  104. package/lib/manifest/sdui-page.d.ts +67 -11
  105. package/lib/manifest/sdui-page.d.ts.map +1 -1
  106. package/lib/manifest/sdui-page.js +44 -13
  107. package/lib/manifest/sdui-page.js.map +1 -1
  108. package/lib/manifest/sdui-page.mjs +42 -11
  109. package/lib/manifest/sdui-page.mjs.map +1 -1
  110. package/lib/manifest/validation.d.mts +87 -12
  111. package/lib/manifest/validation.d.mts.map +1 -1
  112. package/lib/manifest/validation.d.ts +87 -12
  113. package/lib/manifest/validation.d.ts.map +1 -1
  114. package/lib/manifest/validation.js +41 -15
  115. package/lib/manifest/validation.js.map +1 -1
  116. package/lib/manifest/validation.mjs +39 -13
  117. package/lib/manifest/validation.mjs.map +1 -1
  118. package/lib/sdui/actions.d.mts +25 -0
  119. package/lib/sdui/actions.d.mts.map +1 -0
  120. package/lib/sdui/actions.d.ts +25 -0
  121. package/lib/sdui/actions.d.ts.map +1 -0
  122. package/lib/sdui/actions.js +53 -0
  123. package/lib/sdui/actions.js.map +1 -0
  124. package/lib/sdui/actions.mjs +42 -0
  125. package/lib/sdui/actions.mjs.map +1 -0
  126. package/lib/sdui/component.d.mts +41 -0
  127. package/lib/sdui/component.d.mts.map +1 -0
  128. package/lib/sdui/component.d.ts +41 -0
  129. package/lib/sdui/component.d.ts.map +1 -0
  130. package/lib/sdui/component.js +95 -0
  131. package/lib/sdui/component.js.map +1 -0
  132. package/lib/sdui/component.mjs +91 -0
  133. package/lib/sdui/component.mjs.map +1 -0
  134. package/lib/sdui/components.d.mts +149 -0
  135. package/lib/sdui/components.d.mts.map +1 -0
  136. package/lib/sdui/components.d.ts +149 -0
  137. package/lib/sdui/components.d.ts.map +1 -0
  138. package/lib/sdui/components.js +303 -0
  139. package/lib/sdui/components.js.map +1 -0
  140. package/lib/sdui/components.mjs +298 -0
  141. package/lib/sdui/components.mjs.map +1 -0
  142. package/lib/sdui/conditions.d.mts +25 -0
  143. package/lib/sdui/conditions.d.mts.map +1 -0
  144. package/lib/sdui/conditions.d.ts +25 -0
  145. package/lib/sdui/conditions.d.ts.map +1 -0
  146. package/lib/sdui/conditions.js +47 -0
  147. package/lib/sdui/conditions.js.map +1 -0
  148. package/lib/sdui/conditions.mjs +35 -0
  149. package/lib/sdui/conditions.mjs.map +1 -0
  150. package/lib/sdui/directives.d.mts +18 -0
  151. package/lib/sdui/directives.d.mts.map +1 -0
  152. package/lib/sdui/directives.d.ts +18 -0
  153. package/lib/sdui/directives.d.ts.map +1 -0
  154. package/lib/sdui/directives.js +28 -0
  155. package/lib/sdui/directives.js.map +1 -0
  156. package/lib/sdui/directives.mjs +21 -0
  157. package/lib/sdui/directives.mjs.map +1 -0
  158. package/lib/sdui/index.d.mts +362 -0
  159. package/lib/sdui/index.d.mts.map +1 -0
  160. package/lib/sdui/index.d.ts +362 -0
  161. package/lib/sdui/index.d.ts.map +1 -0
  162. package/lib/sdui/index.js +375 -0
  163. package/lib/sdui/index.js.map +1 -0
  164. package/lib/sdui/index.mjs +199 -0
  165. package/lib/sdui/index.mjs.map +1 -0
  166. package/lib/sdui/props.d.mts +12 -0
  167. package/lib/sdui/props.d.mts.map +1 -0
  168. package/lib/sdui/props.d.ts +12 -0
  169. package/lib/sdui/props.d.ts.map +1 -0
  170. package/lib/sdui/props.js +25 -0
  171. package/lib/sdui/props.js.map +1 -0
  172. package/lib/sdui/props.mjs +21 -0
  173. package/lib/sdui/props.mjs.map +1 -0
  174. package/lib/sdui/render.d.mts +23 -0
  175. package/lib/sdui/render.d.mts.map +1 -0
  176. package/lib/sdui/render.d.ts +23 -0
  177. package/lib/sdui/render.d.ts.map +1 -0
  178. package/lib/sdui/render.js +40 -0
  179. package/lib/sdui/render.js.map +1 -0
  180. package/lib/sdui/render.mjs +37 -0
  181. package/lib/sdui/render.mjs.map +1 -0
  182. package/lib/sdui/state.d.mts +22 -0
  183. package/lib/sdui/state.d.mts.map +1 -0
  184. package/lib/sdui/state.d.ts +22 -0
  185. package/lib/sdui/state.d.ts.map +1 -0
  186. package/lib/sdui/state.js +57 -0
  187. package/lib/sdui/state.js.map +1 -0
  188. package/lib/sdui/state.mjs +53 -0
  189. package/lib/sdui/state.mjs.map +1 -0
  190. package/package.json +11 -1
  191. package/resources/company-legal-entity-workers.d.mts +79 -0
  192. package/resources/company-legal-entity-workers.d.mts.map +1 -0
  193. package/resources/company-legal-entity-workers.d.ts +79 -0
  194. package/resources/company-legal-entity-workers.d.ts.map +1 -0
  195. package/resources/company-legal-entity-workers.js +30 -0
  196. package/resources/company-legal-entity-workers.js.map +1 -0
  197. package/resources/company-legal-entity-workers.mjs +26 -0
  198. package/resources/company-legal-entity-workers.mjs.map +1 -0
  199. package/resources/draft-hires.d.mts +4 -0
  200. package/resources/draft-hires.d.mts.map +1 -1
  201. package/resources/draft-hires.d.ts +4 -0
  202. package/resources/draft-hires.d.ts.map +1 -1
  203. package/resources/files.d.mts +16 -1
  204. package/resources/files.d.mts.map +1 -1
  205. package/resources/files.d.ts +16 -1
  206. package/resources/files.d.ts.map +1 -1
  207. package/resources/headcount-positions.d.mts +2 -2
  208. package/resources/headcount-positions.d.mts.map +1 -1
  209. package/resources/headcount-positions.d.ts +2 -2
  210. package/resources/headcount-positions.d.ts.map +1 -1
  211. package/resources/index.d.mts +1 -0
  212. package/resources/index.d.mts.map +1 -1
  213. package/resources/index.d.ts +1 -0
  214. package/resources/index.d.ts.map +1 -1
  215. package/resources/index.js +4 -2
  216. package/resources/index.js.map +1 -1
  217. package/resources/index.mjs +1 -0
  218. package/resources/index.mjs.map +1 -1
  219. package/resources/legal-entities.d.mts +1 -1
  220. package/resources/legal-entities.d.mts.map +1 -1
  221. package/resources/legal-entities.d.ts +1 -1
  222. package/resources/legal-entities.d.ts.map +1 -1
  223. package/resources/location-factors.d.mts +2 -2
  224. package/resources/location-factors.d.mts.map +1 -1
  225. package/resources/location-factors.d.ts +2 -2
  226. package/resources/location-factors.d.ts.map +1 -1
  227. package/resources/shared.d.mts +1 -1
  228. package/resources/shared.d.mts.map +1 -1
  229. package/resources/shared.d.ts +1 -1
  230. package/resources/shared.d.ts.map +1 -1
  231. package/resources/workers.d.mts +2 -2
  232. package/resources/workers.d.mts.map +1 -1
  233. package/resources/workers.d.ts +2 -2
  234. package/resources/workers.d.ts.map +1 -1
  235. package/src/client.ts +20 -0
  236. package/src/lib/manifest/app.ts +81 -26
  237. package/src/lib/manifest/category.ts +63 -14
  238. package/src/lib/manifest/custom-object-field-section.ts +56 -17
  239. package/src/lib/manifest/custom-object-page-layout.ts +201 -66
  240. package/src/lib/manifest/custom-object.ts +128 -37
  241. package/src/lib/manifest/field.ts +265 -75
  242. package/src/lib/manifest/list-view.ts +105 -25
  243. package/src/lib/manifest/manifest-builder.ts +75 -32
  244. package/src/lib/manifest/manifest-function.ts +92 -22
  245. package/src/lib/manifest/rule.ts +95 -29
  246. package/src/lib/manifest/sdui-page.ts +67 -21
  247. package/src/lib/manifest/validation.ts +87 -24
  248. package/src/lib/sdui/actions.ts +58 -0
  249. package/src/lib/sdui/component.ts +122 -0
  250. package/src/lib/sdui/components.ts +308 -0
  251. package/src/lib/sdui/conditions.ts +59 -0
  252. package/src/lib/sdui/directives.ts +42 -0
  253. package/src/lib/sdui/index.ts +365 -0
  254. package/src/lib/sdui/props.ts +32 -0
  255. package/src/lib/sdui/render.ts +58 -0
  256. package/src/lib/sdui/state.ts +60 -0
  257. package/src/resources/company-legal-entity-workers.ts +115 -0
  258. package/src/resources/draft-hires.ts +5 -0
  259. package/src/resources/files.ts +18 -1
  260. package/src/resources/headcount-positions.ts +2 -0
  261. package/src/resources/index.ts +7 -0
  262. package/src/resources/legal-entities.ts +1 -0
  263. package/src/resources/location-factors.ts +2 -0
  264. package/src/resources/shared.ts +1 -0
  265. package/src/resources/workers.ts +2 -0
  266. package/src/version.ts +1 -1
  267. package/version.d.mts +1 -1
  268. package/version.d.ts +1 -1
  269. package/version.js +1 -1
  270. package/version.mjs +1 -1
@@ -1,34 +1,99 @@
1
1
  import { type TriggerType, type UpdateTriggerType } from "./_helpers.mjs";
2
2
  import type { CustomObject } from "./custom-object.mjs";
3
3
  import type { Field } from "./field.mjs";
4
+ /**
5
+ * A single action performed when a {@link Rule} fires.
6
+ */
4
7
  export interface RuleAction {
5
- /** Target field — live `Field` ref. */
8
+ /**
9
+ * The field to set when this action runs.
10
+ *
11
+ * Required.
12
+ */
6
13
  targetField: Field;
7
14
  /**
8
- * Set the target to a fixed value. Mutually exclusive with `rqlFormula`.
9
- * For `SELECT` / `RADIO` targets, the wire payload uses a list (multichoice
10
- * shape); pass a string/one value or an array — both are normalized to an array.
15
+ * Set the target field to a fixed value. Mutually exclusive with `rqlFormula`.
16
+ *
17
+ * Optional. For `SELECT` / `RADIO` fields, pass a string or single-element array —
18
+ * both are normalized to an array on the wire.
11
19
  */
12
20
  fixedValue?: any;
13
- /** Set the target to the result of an RQL formula. */
21
+ /**
22
+ * Set the target field to the result of an RQL formula. Mutually exclusive with `fixedValue`.
23
+ *
24
+ * Optional.
25
+ */
14
26
  rqlFormula?: string;
15
27
  }
28
+ /**
29
+ * Initialization properties for {@link Rule}.
30
+ */
16
31
  export interface RuleProps {
17
- /** Required. Display name of the flow. */
32
+ /**
33
+ * Display name of this automation rule shown in the UI.
34
+ *
35
+ * Required.
36
+ */
18
37
  flowName: string;
19
- /** Required. When the flow fires. */
38
+ /**
39
+ * When this rule fires. One of `'CREATE'` | `'UPDATE'` | `'CREATE_OR_UPDATE'`.
40
+ *
41
+ * Required. The constructor throws if an invalid value is passed.
42
+ */
20
43
  triggerType: TriggerType;
21
- /** Identity override. Override the flow identifier. @default generateId('flow') */
44
+ /**
45
+ * Stable identifier for this rule. Pass a human-readable slug
46
+ * (e.g. `'gym_default_enrollment_status'`) to keep it stable across regenerations.
47
+ *
48
+ * Optional. Auto-generated when omitted. @default generateId('flow')
49
+ */
22
50
  flowId?: string;
23
- /** Optional. RQL formula guard — fires only when truthy. @default null */
51
+ /**
52
+ * RQL formula guard — the rule fires only when this expression is truthy.
53
+ *
54
+ * Optional. @default null
55
+ */
24
56
  rqlCondition?: string;
25
- /** Conditional. Update-trigger condition type. @default 'MEETS_CONDITION_AFTER_ONLY' */
57
+ /**
58
+ * Controls when an `UPDATE` trigger fires relative to the condition.
59
+ * One of `'MEETS_CONDITION_AFTER_ONLY'` | `'MEETS_CONDITION_BEFORE_OR_AFTER'`.
60
+ *
61
+ * Conditional. Only meaningful when `triggerType` is `'UPDATE'` or `'CREATE_OR_UPDATE'`.
62
+ * @default `'MEETS_CONDITION_AFTER_ONLY'`
63
+ */
26
64
  updateTriggerType?: UpdateTriggerType;
27
- /** Optional. Internal description. @default null */
65
+ /**
66
+ * Internal description of this rule (for developer reference only).
67
+ *
68
+ * Optional. @default null
69
+ */
28
70
  description?: string;
29
- /** Optional. Actions to run when the flow fires. @default [] */
71
+ /**
72
+ * Actions to run when the rule fires. Each action sets one field to a fixed value
73
+ * or RQL formula result.
74
+ *
75
+ * Optional. @default `[]`
76
+ */
30
77
  actions?: RuleAction[];
31
78
  }
79
+ /**
80
+ * Defines a record-triggered automation rule and registers it with the manifest.
81
+ *
82
+ * A rule fires automatically when a record on the parent custom object is created,
83
+ * updated, or both — depending on `triggerType`. Each rule runs a list of actions
84
+ * that set field values, optionally guarded by an RQL condition.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * new Rule(enrollmentObj, {
89
+ * flowId: 'gym_default_enrollment_status',
90
+ * flowName: 'Default attendance to Registered',
91
+ * triggerType: 'CREATE',
92
+ * description: 'New roster rows start as Registered unless changed',
93
+ * actions: [{ targetField: enrollmentAttendanceField, fixedValue: ['Registered'] }],
94
+ * });
95
+ * ```
96
+ */
32
97
  export declare class Rule {
33
98
  private readonly _flowId;
34
99
  private readonly _customObjectApiName;
@@ -38,13 +103,26 @@ export declare class Rule {
38
103
  private readonly _updateTriggerType;
39
104
  private readonly _description;
40
105
  private readonly _actions;
41
- /** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
106
+ /**
107
+ * @param customObject - The custom object this rule is attached to.
108
+ * @param props - Initialization properties.
109
+ * @throws {Error} If `props.triggerType` is not one of `'CREATE'`, `'UPDATE'`, `'CREATE_OR_UPDATE'`.
110
+ */
42
111
  constructor(customObject: CustomObject, props: RuleProps);
43
- /** Backend flow_id used as this rule's identifier. */
112
+ /**
113
+ * Returns the stable identifier for this rule (e.g. `'gym_default_enrollment_status'`).
114
+ */
44
115
  getFlowId(): string;
45
- /** api_name of the CustomObject this rule lives on. */
116
+ /**
117
+ * Returns the api_name of the custom object this rule is attached to.
118
+ */
46
119
  getCustomObjectApiName(): string;
47
- /** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
120
+ /**
121
+ * Serializes this rule to the wire format consumed by the manifest install endpoint.
122
+ *
123
+ * @returns A plain object with `type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW'`.
124
+ * Optional fields are omitted when unset; `actions` is omitted when empty.
125
+ */
48
126
  toDict(): Record<string, any>;
49
127
  }
50
128
  //# sourceMappingURL=rule.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rule.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/rule.ts"],"names":[],"mappings":"OAWO,EAAc,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE;OACxD,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;AAIrB,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,WAAW,EAAE,KAAK,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,WAAW,EAAE,WAAW,CAAC;IACzB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AA0BD,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,OAA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WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AA0BD;;;;;;;;;;;;;;;;;GAiBG;AACH,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAgC;IACnE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IAExC;;;;OAIG;gBACS,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS;IAkBxD;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;OAEG;IACH,sBAAsB,IAAI,MAAM;IAIhC;;;;;OAKG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
@@ -1,34 +1,99 @@
1
1
  import { type TriggerType, type UpdateTriggerType } from "./_helpers.js";
2
2
  import type { CustomObject } from "./custom-object.js";
3
3
  import type { Field } from "./field.js";
4
+ /**
5
+ * A single action performed when a {@link Rule} fires.
6
+ */
4
7
  export interface RuleAction {
5
- /** Target field — live `Field` ref. */
8
+ /**
9
+ * The field to set when this action runs.
10
+ *
11
+ * Required.
12
+ */
6
13
  targetField: Field;
7
14
  /**
8
- * Set the target to a fixed value. Mutually exclusive with `rqlFormula`.
9
- * For `SELECT` / `RADIO` targets, the wire payload uses a list (multichoice
10
- * shape); pass a string/one value or an array — both are normalized to an array.
15
+ * Set the target field to a fixed value. Mutually exclusive with `rqlFormula`.
16
+ *
17
+ * Optional. For `SELECT` / `RADIO` fields, pass a string or single-element array —
18
+ * both are normalized to an array on the wire.
11
19
  */
12
20
  fixedValue?: any;
13
- /** Set the target to the result of an RQL formula. */
21
+ /**
22
+ * Set the target field to the result of an RQL formula. Mutually exclusive with `fixedValue`.
23
+ *
24
+ * Optional.
25
+ */
14
26
  rqlFormula?: string;
15
27
  }
28
+ /**
29
+ * Initialization properties for {@link Rule}.
30
+ */
16
31
  export interface RuleProps {
17
- /** Required. Display name of the flow. */
32
+ /**
33
+ * Display name of this automation rule shown in the UI.
34
+ *
35
+ * Required.
36
+ */
18
37
  flowName: string;
19
- /** Required. When the flow fires. */
38
+ /**
39
+ * When this rule fires. One of `'CREATE'` | `'UPDATE'` | `'CREATE_OR_UPDATE'`.
40
+ *
41
+ * Required. The constructor throws if an invalid value is passed.
42
+ */
20
43
  triggerType: TriggerType;
21
- /** Identity override. Override the flow identifier. @default generateId('flow') */
44
+ /**
45
+ * Stable identifier for this rule. Pass a human-readable slug
46
+ * (e.g. `'gym_default_enrollment_status'`) to keep it stable across regenerations.
47
+ *
48
+ * Optional. Auto-generated when omitted. @default generateId('flow')
49
+ */
22
50
  flowId?: string;
23
- /** Optional. RQL formula guard — fires only when truthy. @default null */
51
+ /**
52
+ * RQL formula guard — the rule fires only when this expression is truthy.
53
+ *
54
+ * Optional. @default null
55
+ */
24
56
  rqlCondition?: string;
25
- /** Conditional. Update-trigger condition type. @default 'MEETS_CONDITION_AFTER_ONLY' */
57
+ /**
58
+ * Controls when an `UPDATE` trigger fires relative to the condition.
59
+ * One of `'MEETS_CONDITION_AFTER_ONLY'` | `'MEETS_CONDITION_BEFORE_OR_AFTER'`.
60
+ *
61
+ * Conditional. Only meaningful when `triggerType` is `'UPDATE'` or `'CREATE_OR_UPDATE'`.
62
+ * @default `'MEETS_CONDITION_AFTER_ONLY'`
63
+ */
26
64
  updateTriggerType?: UpdateTriggerType;
27
- /** Optional. Internal description. @default null */
65
+ /**
66
+ * Internal description of this rule (for developer reference only).
67
+ *
68
+ * Optional. @default null
69
+ */
28
70
  description?: string;
29
- /** Optional. Actions to run when the flow fires. @default [] */
71
+ /**
72
+ * Actions to run when the rule fires. Each action sets one field to a fixed value
73
+ * or RQL formula result.
74
+ *
75
+ * Optional. @default `[]`
76
+ */
30
77
  actions?: RuleAction[];
31
78
  }
79
+ /**
80
+ * Defines a record-triggered automation rule and registers it with the manifest.
81
+ *
82
+ * A rule fires automatically when a record on the parent custom object is created,
83
+ * updated, or both — depending on `triggerType`. Each rule runs a list of actions
84
+ * that set field values, optionally guarded by an RQL condition.
85
+ *
86
+ * @example
87
+ * ```ts
88
+ * new Rule(enrollmentObj, {
89
+ * flowId: 'gym_default_enrollment_status',
90
+ * flowName: 'Default attendance to Registered',
91
+ * triggerType: 'CREATE',
92
+ * description: 'New roster rows start as Registered unless changed',
93
+ * actions: [{ targetField: enrollmentAttendanceField, fixedValue: ['Registered'] }],
94
+ * });
95
+ * ```
96
+ */
32
97
  export declare class Rule {
33
98
  private readonly _flowId;
34
99
  private readonly _customObjectApiName;
@@ -38,13 +103,26 @@ export declare class Rule {
38
103
  private readonly _updateTriggerType;
39
104
  private readonly _description;
40
105
  private readonly _actions;
41
- /** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
106
+ /**
107
+ * @param customObject - The custom object this rule is attached to.
108
+ * @param props - Initialization properties.
109
+ * @throws {Error} If `props.triggerType` is not one of `'CREATE'`, `'UPDATE'`, `'CREATE_OR_UPDATE'`.
110
+ */
42
111
  constructor(customObject: CustomObject, props: RuleProps);
43
- /** Backend flow_id used as this rule's identifier. */
112
+ /**
113
+ * Returns the stable identifier for this rule (e.g. `'gym_default_enrollment_status'`).
114
+ */
44
115
  getFlowId(): string;
45
- /** api_name of the CustomObject this rule lives on. */
116
+ /**
117
+ * Returns the api_name of the custom object this rule is attached to.
118
+ */
46
119
  getCustomObjectApiName(): string;
47
- /** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
120
+ /**
121
+ * Serializes this rule to the wire format consumed by the manifest install endpoint.
122
+ *
123
+ * @returns A plain object with `type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW'`.
124
+ * Optional fields are omitted when unset; `actions` is omitted when empty.
125
+ */
48
126
  toDict(): Record<string, any>;
49
127
  }
50
128
  //# sourceMappingURL=rule.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"rule.d.ts","sourceRoot":"","sources":["../../src/lib/manifest/rule.ts"],"names":[],"mappings":"OAWO,EAAc,KAAK,WAAW,EAAE,KAAK,iBAAiB,EAAE;OACxD,KAAK,EAAE,YAAY,EAAE;OACrB,KAAK,EAAE,KAAK,EAAE;AAIrB,MAAM,WAAW,UAAU;IACzB,uCAAuC;IACvC,WAAW,EAAE,KAAK,CAAC;IACnB;;;;OAIG;IACH,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,sDAAsD;IACtD,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,SAAS;IACxB,0CAA0C;IAC1C,QAAQ,EAAE,MAAM,CAAC;IACjB,qCAAqC;IACrC,WAAW,EAAE,WAAW,CAAC;IACzB,mFAAmF;IACnF,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,0EAA0E;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,wFAAwF;IACxF,iBAAiB,CAAC,EAAE,iBAAiB,CAAC;IACtC,oDAAoD;IACpD,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,OAAO,CAAC,EAAE,UAAU,EAAE,CAAC;CACxB;AA0BD,qBAAa,IAAI;IACf,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,oBAAoB,CAAS;IAC9C,OAAO,CAAC,QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAgC;IACnE,OAAO,CAAC,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QAAQ,CAAC,SAAS,CAAS;IACnC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAc;IAC3C,OAAO,CAAC,QAAQ,CAAC,aAAa,CAAqB;IACnD,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAgC;IACnE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAqB;IAClD,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAe;IAExC;;;;OAIG;gBACS,YAAY,EAAE,YAAY,EAAE,KAAK,EAAE,SAAS;IAkBxD;;OAEG;IACH,SAAS,IAAI,MAAM;IAInB;;OAEG;IACH,sBAAsB,IAAI,MAAM;IAIhC;;;;;OAKG;IACH,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAc9B"}
@@ -1,18 +1,7 @@
1
1
  "use strict";
2
- /*
3
- * The contents of this file were inserted manually and are not generated by Stainless.
4
- *
5
- * Record-triggered flows (automation rules) for custom objects.
6
- * Backend schema: CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW (v2)
7
- *
8
- * Construction is CDK-style: `new Rule(customObject, props)` — the CO is
9
- * the first positional arg, and the rule auto-registers with the manifest
10
- * via the CO's scope chain.
11
- */
12
2
  Object.defineProperty(exports, "__esModule", { value: true });
13
3
  exports.Rule = void 0;
14
4
  const _helpers_1 = require("./_helpers.js");
15
- const VALID_TRIGGERS = ['CREATE', 'UPDATE', 'CREATE_OR_UPDATE'];
16
5
  /** SELECT / RADIO rule actions use list `fixed_value` (Rippling rule builder). */
17
6
  function fixedValueToWire(targetField, value) {
18
7
  const ft = targetField.getFieldType();
@@ -36,9 +25,32 @@ function actionToDict(action) {
36
25
  }
37
26
  return out;
38
27
  }
28
+ /**
29
+ * Defines a record-triggered automation rule and registers it with the manifest.
30
+ *
31
+ * A rule fires automatically when a record on the parent custom object is created,
32
+ * updated, or both — depending on `triggerType`. Each rule runs a list of actions
33
+ * that set field values, optionally guarded by an RQL condition.
34
+ *
35
+ * @example
36
+ * ```ts
37
+ * new Rule(enrollmentObj, {
38
+ * flowId: 'gym_default_enrollment_status',
39
+ * flowName: 'Default attendance to Registered',
40
+ * triggerType: 'CREATE',
41
+ * description: 'New roster rows start as Registered unless changed',
42
+ * actions: [{ targetField: enrollmentAttendanceField, fixedValue: ['Registered'] }],
43
+ * });
44
+ * ```
45
+ */
39
46
  class Rule {
40
- /** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
47
+ /**
48
+ * @param customObject - The custom object this rule is attached to.
49
+ * @param props - Initialization properties.
50
+ * @throws {Error} If `props.triggerType` is not one of `'CREATE'`, `'UPDATE'`, `'CREATE_OR_UPDATE'`.
51
+ */
41
52
  constructor(customObject, props) {
53
+ const VALID_TRIGGERS = ['CREATE', 'UPDATE', 'CREATE_OR_UPDATE'];
42
54
  if (!VALID_TRIGGERS.includes(props.triggerType)) {
43
55
  throw new Error(`Invalid trigger_type: ${props.triggerType}. Must be one of: ${VALID_TRIGGERS.join(', ')}`);
44
56
  }
@@ -52,15 +64,24 @@ class Rule {
52
64
  this._actions = [...(props.actions ?? [])];
53
65
  customObject._register(this);
54
66
  }
55
- /** Backend flow_id used as this rule's identifier. */
67
+ /**
68
+ * Returns the stable identifier for this rule (e.g. `'gym_default_enrollment_status'`).
69
+ */
56
70
  getFlowId() {
57
71
  return this._flowId;
58
72
  }
59
- /** api_name of the CustomObject this rule lives on. */
73
+ /**
74
+ * Returns the api_name of the custom object this rule is attached to.
75
+ */
60
76
  getCustomObjectApiName() {
61
77
  return this._customObjectApiName;
62
78
  }
63
- /** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
79
+ /**
80
+ * Serializes this rule to the wire format consumed by the manifest install endpoint.
81
+ *
82
+ * @returns A plain object with `type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW'`.
83
+ * Optional fields are omitted when unset; `actions` is omitted when empty.
84
+ */
64
85
  toDict() {
65
86
  const component = {
66
87
  type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLO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oBAAoB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;QACF,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI;YAAE,SAAS,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAChG,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,SAAS,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QAChF,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACrF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF;AAnED,oBAmEC"}
@@ -1,15 +1,4 @@
1
- /*
2
- * The contents of this file were inserted manually and are not generated by Stainless.
3
- *
4
- * Record-triggered flows (automation rules) for custom objects.
5
- * Backend schema: CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW (v2)
6
- *
7
- * Construction is CDK-style: `new Rule(customObject, props)` — the CO is
8
- * the first positional arg, and the rule auto-registers with the manifest
9
- * via the CO's scope chain.
10
- */
11
1
  import { generateId } from "./_helpers.mjs";
12
- const VALID_TRIGGERS = ['CREATE', 'UPDATE', 'CREATE_OR_UPDATE'];
13
2
  /** SELECT / RADIO rule actions use list `fixed_value` (Rippling rule builder). */
14
3
  function fixedValueToWire(targetField, value) {
15
4
  const ft = targetField.getFieldType();
@@ -33,9 +22,32 @@ function actionToDict(action) {
33
22
  }
34
23
  return out;
35
24
  }
25
+ /**
26
+ * Defines a record-triggered automation rule and registers it with the manifest.
27
+ *
28
+ * A rule fires automatically when a record on the parent custom object is created,
29
+ * updated, or both — depending on `triggerType`. Each rule runs a list of actions
30
+ * that set field values, optionally guarded by an RQL condition.
31
+ *
32
+ * @example
33
+ * ```ts
34
+ * new Rule(enrollmentObj, {
35
+ * flowId: 'gym_default_enrollment_status',
36
+ * flowName: 'Default attendance to Registered',
37
+ * triggerType: 'CREATE',
38
+ * description: 'New roster rows start as Registered unless changed',
39
+ * actions: [{ targetField: enrollmentAttendanceField, fixedValue: ['Registered'] }],
40
+ * });
41
+ * ```
42
+ */
36
43
  export class Rule {
37
- /** Build a new rule and auto-register with the CO's scope; validates `triggerType`. */
44
+ /**
45
+ * @param customObject - The custom object this rule is attached to.
46
+ * @param props - Initialization properties.
47
+ * @throws {Error} If `props.triggerType` is not one of `'CREATE'`, `'UPDATE'`, `'CREATE_OR_UPDATE'`.
48
+ */
38
49
  constructor(customObject, props) {
50
+ const VALID_TRIGGERS = ['CREATE', 'UPDATE', 'CREATE_OR_UPDATE'];
39
51
  if (!VALID_TRIGGERS.includes(props.triggerType)) {
40
52
  throw new Error(`Invalid trigger_type: ${props.triggerType}. Must be one of: ${VALID_TRIGGERS.join(', ')}`);
41
53
  }
@@ -49,15 +61,24 @@ export class Rule {
49
61
  this._actions = [...(props.actions ?? [])];
50
62
  customObject._register(this);
51
63
  }
52
- /** Backend flow_id used as this rule's identifier. */
64
+ /**
65
+ * Returns the stable identifier for this rule (e.g. `'gym_default_enrollment_status'`).
66
+ */
53
67
  getFlowId() {
54
68
  return this._flowId;
55
69
  }
56
- /** api_name of the CustomObject this rule lives on. */
70
+ /**
71
+ * Returns the api_name of the custom object this rule is attached to.
72
+ */
57
73
  getCustomObjectApiName() {
58
74
  return this._customObjectApiName;
59
75
  }
60
- /** Serialize to the backend `CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW` wire shape. */
76
+ /**
77
+ * Serializes this rule to the wire format consumed by the manifest install endpoint.
78
+ *
79
+ * @returns A plain object with `type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW'`.
80
+ * Optional fields are omitted when unset; `actions` is omitted when empty.
81
+ */
61
82
  toDict() {
62
83
  const component = {
63
84
  type: 'CUSTOM_OBJECT_RECORD_TRIGGERED_FLOW',
@@ -1 +1 @@
1
- {"version":3,"file":"rule.mjs","sourceRoot":"","sources":["../../src/lib/manifest/rule.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;OAEI,EAAE,UAAU,EAA4C;AAI/D,MAAM,cAAc,GAAkB,CAAC,QAAQ,EAAE,QAAQ,EAAE,kBAAkB,CAAC,CAAC;AAgC/E,kFAAkF;AAClF,SAAS,gBAAgB,CAAC,WAAkB,EAAE,KAAU;IACtD,MAAM,EAAE,GAAG,WAAW,CAAC,YAAY,EAAE,CAAC;IACtC,IAAI,EAAE,KAAK,QAAQ,IAAI,EAAE,KAAK,OAAO,EAAE,CAAC;QACtC,OAAO,KAAK,CAAC;IACf,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC;QACzB,OAAO,KAAK,CAAC;IACf,CAAC;IACD,OAAO,CAAC,KAAK,CAAC,CAAC;AACjB,CAAC;AAED,SAAS,YAAY,CAAC,MAAkB;IACtC,MAAM,GAAG,GAAwB;QAC/B,YAAY,EAAE,MAAM,CAAC,WAAW,CAAC,UAAU,EAAE;KAC9C,CAAC;IACF,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;QAC9B,GAAG,CAAC,aAAa,CAAC,GAAG,gBAAgB,CAAC,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,UAAU,CAAC,CAAC;IAC/E,CAAC;SAAM,IAAI,MAAM,CAAC,UAAU,IAAI,IAAI,EAAE,CAAC;QACrC,GAAG,CAAC,aAAa,CAAC,GAAG,MAAM,CAAC,UAAU,CAAC;IACzC,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC;AAED,MAAM,OAAO,IAAI;IAUf,uFAAuF;IACvF,YAAY,YAA0B,EAAE,KAAgB;QACtD,IAAI,CAAC,cA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AC;IAED;;;;;OAKG;IACH,MAAM;QACJ,MAAM,SAAS,GAAwB;YACrC,IAAI,EAAE,qCAAqC;YAC3C,cAAc,EAAE,IAAI,CAAC,oBAAoB;YACzC,OAAO,EAAE,IAAI,CAAC,OAAO;YACrB,SAAS,EAAE,IAAI,CAAC,SAAS;YACzB,YAAY,EAAE,IAAI,CAAC,YAAY;SAChC,CAAC;QACF,IAAI,IAAI,CAAC,YAAY,IAAI,IAAI;YAAE,SAAS,CAAC,aAAa,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC;QAC5E,IAAI,IAAI,CAAC,kBAAkB,IAAI,IAAI;YAAE,SAAS,CAAC,qBAAqB,CAAC,GAAG,IAAI,CAAC,kBAAkB,CAAC;QAChG,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI;YAAE,SAAS,CAAC,eAAe,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC;QAChF,IAAI,IAAI,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC;YAAE,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;QACrF,OAAO,SAAS,CAAC;IACnB,CAAC;CACF"}
@@ -1,33 +1,89 @@
1
1
  import type { ManifestFunction } from "./manifest-function.mjs";
2
2
  import type { ManifestScope } from "./manifest-builder.mjs";
3
+ /**
4
+ * Initialization properties for {@link SduiPage}.
5
+ */
3
6
  export interface SduiPageProps {
4
- /** Required. Unique ID for this page within the package. */
7
+ /**
8
+ * Unique identifier for this page within the package (e.g. `'gym_today_schedule'`).
9
+ *
10
+ * Required.
11
+ */
5
12
  sduiPageId: string;
6
- /** Required. Display name shown as the tab label. */
13
+ /**
14
+ * Display name shown as the tab label in the app (e.g. `'Today\'s schedule'`).
15
+ *
16
+ * Required.
17
+ */
7
18
  name: string;
8
19
  /**
9
- * Required. Backing function. Pass a live `ManifestFunction` ref (the SDK
10
- * reads its api_name) or a raw api_name string for functions authored
11
- * outside this manifest.
20
+ * The function that renders this page. Pass a live {@link ManifestFunction} reference,
21
+ * or a raw api_name string for functions defined outside this manifest.
22
+ *
23
+ * Required.
12
24
  */
13
25
  function: ManifestFunction | string;
14
- /** Optional. Human-readable description. */
26
+ /**
27
+ * Human-readable description of what this page shows.
28
+ *
29
+ * Optional. @default `''`
30
+ */
15
31
  description?: string;
16
32
  }
33
+ /**
34
+ * Defines an SDUI page and registers it with the manifest.
35
+ *
36
+ * An SDUI page is a custom UI surface backed by a {@link ManifestFunction}. It appears
37
+ * as a tab in a Rippling {@link App}. You would normally define SDUI pages after the
38
+ * functions they reference, then pass them to an `App` via `pages`.
39
+ *
40
+ * @example
41
+ * ```ts
42
+ * const todaySchedulePage = new SduiPage(manifest, {
43
+ * sduiPageId: 'gym_today_schedule',
44
+ * name: 'Today\'s schedule',
45
+ * function: todayScheduleFn,
46
+ * description: 'SDUI list of class sessions for front desk',
47
+ * });
48
+ *
49
+ * new App(manifest, {
50
+ * apiName: 'gym_membership_management_app',
51
+ * name: 'Gym Membership Management',
52
+ * pages: [memberObj, trainerObj, todaySchedulePage],
53
+ * });
54
+ * ```
55
+ *
56
+ * @see {@link ManifestFunction} — provides the handler that renders this page.
57
+ * @see {@link App} — hosts this page as a tab via `pages`.
58
+ */
17
59
  export declare class SduiPage {
18
60
  private readonly _sduiPageId;
19
61
  private readonly _name;
20
62
  private readonly _functionApiName;
21
63
  private readonly _description;
22
- /** Build a new SDUI page and auto-register with `scope`; resolves the function api_name eagerly. */
64
+ /**
65
+ * @param scope - The manifest to register this page with.
66
+ * @param props - Initialization properties.
67
+ * @throws {Error} If `sduiPageId`, `name`, or `function` is missing.
68
+ */
23
69
  constructor(scope: ManifestScope, props: SduiPageProps);
24
- /** Identifier slug for this page within the package. */
70
+ /**
71
+ * Returns the unique page identifier (e.g. `'gym_today_schedule'`).
72
+ */
25
73
  getSduiPageId(): string;
26
- /** Display name (tab label). */
74
+ /**
75
+ * Returns the display name (tab label) of this page.
76
+ */
27
77
  getName(): string;
28
- /** api_name of the function backing this page. */
78
+ /**
79
+ * Returns the api_name of the function backing this page.
80
+ */
29
81
  getFunctionApiName(): string;
30
- /** Serialize to the backend `SDUI_PAGE` wire shape. */
82
+ /**
83
+ * Serializes this SDUI page to the wire format consumed by the manifest install endpoint.
84
+ *
85
+ * @returns A plain object with `type: 'SDUI_PAGE'`.
86
+ */
31
87
  toDict(): Record<string, any>;
32
88
  }
33
89
  //# sourceMappingURL=sdui-page.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdui-page.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/sdui-page.ts"],"names":[],"mappings":"OAUO,KAAK,EAAE,gBAAgB,EAAE;OACzB,KAAK,EAAE,aAAa,EAAE;AAE7B,MAAM,WAAW,aAAa;IAC5B,4DAA4D;IAC5D,UAAU,EAAE,MAAM,CAAC;IACnB,qDAAqD;IACrD,IAAI,EAAE,MAAM,CAAC;IACb;;;;OAIG;IACH,QAAQ,EAAE,gBAAgB,GAAG,MAAM,CAAC;IACpC,4CAA4C;IAC5C,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,qBAAa,QAAQ;IACnB,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;IACrC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAS;IAC/B,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IAEtC,oGAAoG;gBACxF,KAAK,EAAE,aAAa,EAAE,KAAK,EAAE,aAAa;IAWtD,wDAAwD;IACxD,aAAa,IAAI,MAAM;IAIvB,gCAAgC;IAChC,OAAO,IAAI,MAAM;IAIjB,kDAAkD;IAClD,kBAAkB,IAAI,MAAM;IAI5B,uDAAuD;IACvD,MAAM,IAAI,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;CAS9B"}
1
+ {"version":3,"file":"sdui-page.d.mts","sourceRoot":"","sources":["../../src/lib/manifest/sdui-page.ts"],"names":[],"mapp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