@rippling/rippling-sdk 0.2.0-alpha.82 → 0.2.0-alpha.83

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 (351) hide show
  1. package/client.d.mts +4 -4
  2. package/client.d.mts.map +1 -1
  3. package/client.d.ts +4 -4
  4. package/client.d.ts.map +1 -1
  5. package/client.js.map +1 -1
  6. package/client.mjs.map +1 -1
  7. package/core/platform/custom-objects/category.d.mts +125 -0
  8. package/core/platform/custom-objects/category.d.mts.map +1 -0
  9. package/core/platform/custom-objects/category.d.ts +125 -0
  10. package/core/platform/custom-objects/category.d.ts.map +1 -0
  11. package/core/platform/custom-objects/category.js +188 -0
  12. package/core/platform/custom-objects/category.js.map +1 -0
  13. package/core/platform/custom-objects/category.mjs +178 -0
  14. package/core/platform/custom-objects/category.mjs.map +1 -0
  15. package/core/platform/custom-objects/definition.d.mts +147 -0
  16. package/core/platform/custom-objects/definition.d.mts.map +1 -0
  17. package/core/platform/custom-objects/definition.d.ts +147 -0
  18. package/core/platform/custom-objects/definition.d.ts.map +1 -0
  19. package/core/platform/custom-objects/definition.js +200 -0
  20. package/core/platform/custom-objects/definition.js.map +1 -0
  21. package/core/platform/custom-objects/definition.mjs +190 -0
  22. package/core/platform/custom-objects/definition.mjs.map +1 -0
  23. package/core/platform/custom-objects/fields.d.mts +302 -0
  24. package/core/platform/custom-objects/fields.d.mts.map +1 -0
  25. package/core/platform/custom-objects/fields.d.ts +302 -0
  26. package/core/platform/custom-objects/fields.d.ts.map +1 -0
  27. package/core/platform/custom-objects/fields.js +369 -0
  28. package/core/platform/custom-objects/fields.js.map +1 -0
  29. package/core/platform/custom-objects/fields.mjs +347 -0
  30. package/core/platform/custom-objects/fields.mjs.map +1 -0
  31. package/core/platform/custom-objects/function-runtime.d.mts +42 -0
  32. package/core/platform/custom-objects/function-runtime.d.mts.map +1 -0
  33. package/core/platform/custom-objects/function-runtime.d.ts +42 -0
  34. package/core/platform/custom-objects/function-runtime.d.ts.map +1 -0
  35. package/core/platform/custom-objects/function-runtime.js +38 -0
  36. package/core/platform/custom-objects/function-runtime.js.map +1 -0
  37. package/core/platform/custom-objects/function-runtime.mjs +35 -0
  38. package/core/platform/custom-objects/function-runtime.mjs.map +1 -0
  39. package/core/platform/custom-objects/lifecycle.d.mts +83 -0
  40. package/core/platform/custom-objects/lifecycle.d.mts.map +1 -0
  41. package/core/platform/custom-objects/lifecycle.d.ts +83 -0
  42. package/core/platform/custom-objects/lifecycle.d.ts.map +1 -0
  43. package/core/platform/custom-objects/lifecycle.js +372 -0
  44. package/core/platform/custom-objects/lifecycle.js.map +1 -0
  45. package/core/platform/custom-objects/lifecycle.mjs +367 -0
  46. package/core/platform/custom-objects/lifecycle.mjs.map +1 -0
  47. package/core/platform/custom-objects/manager.d.mts +354 -0
  48. package/core/platform/custom-objects/manager.d.mts.map +1 -0
  49. package/core/platform/custom-objects/manager.d.ts +354 -0
  50. package/core/platform/custom-objects/manager.d.ts.map +1 -0
  51. package/core/platform/custom-objects/manager.js +646 -0
  52. package/core/platform/custom-objects/manager.js.map +1 -0
  53. package/core/platform/custom-objects/manager.mjs +637 -0
  54. package/core/platform/custom-objects/manager.mjs.map +1 -0
  55. package/core/platform/custom-objects/provisioning.d.mts +138 -0
  56. package/core/platform/custom-objects/provisioning.d.mts.map +1 -0
  57. package/core/platform/custom-objects/provisioning.d.ts +138 -0
  58. package/core/platform/custom-objects/provisioning.d.ts.map +1 -0
  59. package/core/platform/custom-objects/provisioning.js +455 -0
  60. package/core/platform/custom-objects/provisioning.js.map +1 -0
  61. package/core/platform/custom-objects/provisioning.mjs +447 -0
  62. package/core/platform/custom-objects/provisioning.mjs.map +1 -0
  63. package/core/platform/custom-objects/rql.d.mts +122 -0
  64. package/core/platform/custom-objects/rql.d.mts.map +1 -0
  65. package/core/platform/custom-objects/rql.d.ts +122 -0
  66. package/core/platform/custom-objects/rql.d.ts.map +1 -0
  67. package/core/platform/custom-objects/rql.js +225 -0
  68. package/core/platform/custom-objects/rql.js.map +1 -0
  69. package/core/platform/custom-objects/rql.mjs +222 -0
  70. package/core/platform/custom-objects/rql.mjs.map +1 -0
  71. package/core/platform/custom-objects/schema-manager.d.mts +203 -0
  72. package/core/platform/custom-objects/schema-manager.d.mts.map +1 -0
  73. package/core/platform/custom-objects/schema-manager.d.ts +203 -0
  74. package/core/platform/custom-objects/schema-manager.d.ts.map +1 -0
  75. package/core/platform/custom-objects/schema-manager.js +256 -0
  76. package/core/platform/custom-objects/schema-manager.js.map +1 -0
  77. package/core/platform/custom-objects/schema-manager.mjs +249 -0
  78. package/core/platform/custom-objects/schema-manager.mjs.map +1 -0
  79. package/core/platform/custom-objects/typed-rql.d.mts +157 -0
  80. package/core/platform/custom-objects/typed-rql.d.mts.map +1 -0
  81. package/core/platform/custom-objects/typed-rql.d.ts +157 -0
  82. package/core/platform/custom-objects/typed-rql.d.ts.map +1 -0
  83. package/core/platform/custom-objects/typed-rql.js +583 -0
  84. package/core/platform/custom-objects/typed-rql.js.map +1 -0
  85. package/core/platform/custom-objects/typed-rql.mjs +580 -0
  86. package/core/platform/custom-objects/typed-rql.mjs.map +1 -0
  87. package/core/platform/custom-objects/types.d.mts +549 -0
  88. package/core/platform/custom-objects/types.d.mts.map +1 -0
  89. package/core/platform/custom-objects/types.d.ts +549 -0
  90. package/core/platform/custom-objects/types.d.ts.map +1 -0
  91. package/core/platform/custom-objects/types.js +20 -0
  92. package/core/platform/custom-objects/types.js.map +1 -0
  93. package/core/platform/custom-objects/types.mjs +17 -0
  94. package/core/platform/custom-objects/types.mjs.map +1 -0
  95. package/core/platform/custom-objects/validation.d.mts +97 -0
  96. package/core/platform/custom-objects/validation.d.mts.map +1 -0
  97. package/core/platform/custom-objects/validation.d.ts +97 -0
  98. package/core/platform/custom-objects/validation.d.ts.map +1 -0
  99. package/core/platform/custom-objects/validation.js +477 -0
  100. package/core/platform/custom-objects/validation.js.map +1 -0
  101. package/core/platform/custom-objects/validation.mjs +465 -0
  102. package/core/platform/custom-objects/validation.mjs.map +1 -0
  103. package/core/platform/custom-objects.d.mts +67 -0
  104. package/core/platform/custom-objects.d.mts.map +1 -0
  105. package/core/platform/custom-objects.d.ts +67 -0
  106. package/core/platform/custom-objects.d.ts.map +1 -0
  107. package/core/platform/custom-objects.js +118 -0
  108. package/core/platform/custom-objects.js.map +1 -0
  109. package/core/platform/custom-objects.mjs +45 -0
  110. package/core/platform/custom-objects.mjs.map +1 -0
  111. package/core/platform/manifest/custom-objects/action.d.mts +58 -0
  112. package/core/platform/manifest/custom-objects/action.d.mts.map +1 -0
  113. package/core/platform/manifest/custom-objects/action.d.ts +58 -0
  114. package/core/platform/manifest/custom-objects/action.d.ts.map +1 -0
  115. package/core/platform/manifest/custom-objects/action.js +44 -0
  116. package/core/platform/manifest/custom-objects/action.js.map +1 -0
  117. package/core/platform/manifest/custom-objects/action.mjs +40 -0
  118. package/core/platform/manifest/custom-objects/action.mjs.map +1 -0
  119. package/core/platform/manifest/custom-objects/conditions.d.mts +240 -0
  120. package/core/platform/manifest/custom-objects/conditions.d.mts.map +1 -0
  121. package/core/platform/manifest/custom-objects/conditions.d.ts +240 -0
  122. package/core/platform/manifest/custom-objects/conditions.d.ts.map +1 -0
  123. package/core/platform/manifest/custom-objects/conditions.js +326 -0
  124. package/core/platform/manifest/custom-objects/conditions.js.map +1 -0
  125. package/core/platform/manifest/custom-objects/conditions.mjs +321 -0
  126. package/core/platform/manifest/custom-objects/conditions.mjs.map +1 -0
  127. package/core/platform/manifest/custom-objects/existing.d.mts +87 -0
  128. package/core/platform/manifest/custom-objects/existing.d.mts.map +1 -0
  129. package/core/platform/manifest/custom-objects/existing.d.ts +87 -0
  130. package/core/platform/manifest/custom-objects/existing.d.ts.map +1 -0
  131. package/core/platform/manifest/custom-objects/existing.js +113 -0
  132. package/core/platform/manifest/custom-objects/existing.js.map +1 -0
  133. package/core/platform/manifest/custom-objects/existing.mjs +109 -0
  134. package/core/platform/manifest/custom-objects/existing.mjs.map +1 -0
  135. package/core/platform/manifest/custom-objects/field-resolution.d.mts +48 -0
  136. package/core/platform/manifest/custom-objects/field-resolution.d.mts.map +1 -0
  137. package/core/platform/manifest/custom-objects/field-resolution.d.ts +48 -0
  138. package/core/platform/manifest/custom-objects/field-resolution.d.ts.map +1 -0
  139. package/core/platform/manifest/custom-objects/field-resolution.js +61 -0
  140. package/core/platform/manifest/custom-objects/field-resolution.js.map +1 -0
  141. package/core/platform/manifest/custom-objects/field-resolution.mjs +58 -0
  142. package/core/platform/manifest/custom-objects/field-resolution.mjs.map +1 -0
  143. package/core/platform/manifest/custom-objects/function-file.d.mts +87 -0
  144. package/core/platform/manifest/custom-objects/function-file.d.mts.map +1 -0
  145. package/core/platform/manifest/custom-objects/function-file.d.ts +87 -0
  146. package/core/platform/manifest/custom-objects/function-file.d.ts.map +1 -0
  147. package/core/platform/manifest/custom-objects/function-file.js +76 -0
  148. package/core/platform/manifest/custom-objects/function-file.js.map +1 -0
  149. package/core/platform/manifest/custom-objects/function-file.mjs +69 -0
  150. package/core/platform/manifest/custom-objects/function-file.mjs.map +1 -0
  151. package/core/platform/manifest/custom-objects/list-view.d.mts +65 -0
  152. package/core/platform/manifest/custom-objects/list-view.d.mts.map +1 -0
  153. package/core/platform/manifest/custom-objects/list-view.d.ts +65 -0
  154. package/core/platform/manifest/custom-objects/list-view.d.ts.map +1 -0
  155. package/core/platform/manifest/custom-objects/list-view.js +33 -0
  156. package/core/platform/manifest/custom-objects/list-view.js.map +1 -0
  157. package/core/platform/manifest/custom-objects/list-view.mjs +30 -0
  158. package/core/platform/manifest/custom-objects/list-view.mjs.map +1 -0
  159. package/core/platform/manifest/custom-objects/object-list-page.d.mts +43 -0
  160. package/core/platform/manifest/custom-objects/object-list-page.d.mts.map +1 -0
  161. package/core/platform/manifest/custom-objects/object-list-page.d.ts +43 -0
  162. package/core/platform/manifest/custom-objects/object-list-page.d.ts.map +1 -0
  163. package/core/platform/manifest/custom-objects/object-list-page.js +54 -0
  164. package/core/platform/manifest/custom-objects/object-list-page.js.map +1 -0
  165. package/core/platform/manifest/custom-objects/object-list-page.mjs +50 -0
  166. package/core/platform/manifest/custom-objects/object-list-page.mjs.map +1 -0
  167. package/core/platform/manifest/custom-objects/page-layout.d.mts +142 -0
  168. package/core/platform/manifest/custom-objects/page-layout.d.mts.map +1 -0
  169. package/core/platform/manifest/custom-objects/page-layout.d.ts +142 -0
  170. package/core/platform/manifest/custom-objects/page-layout.d.ts.map +1 -0
  171. package/core/platform/manifest/custom-objects/page-layout.js +184 -0
  172. package/core/platform/manifest/custom-objects/page-layout.js.map +1 -0
  173. package/core/platform/manifest/custom-objects/page-layout.mjs +180 -0
  174. package/core/platform/manifest/custom-objects/page-layout.mjs.map +1 -0
  175. package/core/platform/manifest/custom-objects/register.d.mts +87 -0
  176. package/core/platform/manifest/custom-objects/register.d.mts.map +1 -0
  177. package/core/platform/manifest/custom-objects/register.d.ts +87 -0
  178. package/core/platform/manifest/custom-objects/register.d.ts.map +1 -0
  179. package/core/platform/manifest/custom-objects/register.js +395 -0
  180. package/core/platform/manifest/custom-objects/register.js.map +1 -0
  181. package/core/platform/manifest/custom-objects/register.mjs +391 -0
  182. package/core/platform/manifest/custom-objects/register.mjs.map +1 -0
  183. package/core/platform/manifest/custom-objects/rule.d.mts +113 -0
  184. package/core/platform/manifest/custom-objects/rule.d.mts.map +1 -0
  185. package/core/platform/manifest/custom-objects/rule.d.ts +113 -0
  186. package/core/platform/manifest/custom-objects/rule.d.ts.map +1 -0
  187. package/core/platform/manifest/custom-objects/rule.js +49 -0
  188. package/core/platform/manifest/custom-objects/rule.js.map +1 -0
  189. package/core/platform/manifest/custom-objects/rule.mjs +45 -0
  190. package/core/platform/manifest/custom-objects/rule.mjs.map +1 -0
  191. package/core/platform/manifest/custom-objects/sdui-page.d.mts +214 -0
  192. package/core/platform/manifest/custom-objects/sdui-page.d.mts.map +1 -0
  193. package/core/platform/manifest/custom-objects/sdui-page.d.ts +214 -0
  194. package/core/platform/manifest/custom-objects/sdui-page.d.ts.map +1 -0
  195. package/core/platform/manifest/custom-objects/sdui-page.js +194 -0
  196. package/core/platform/manifest/custom-objects/sdui-page.js.map +1 -0
  197. package/core/platform/manifest/custom-objects/sdui-page.mjs +182 -0
  198. package/core/platform/manifest/custom-objects/sdui-page.mjs.map +1 -0
  199. package/core/platform/manifest/custom-objects/typed-condition.d.mts +28 -0
  200. package/core/platform/manifest/custom-objects/typed-condition.d.mts.map +1 -0
  201. package/core/platform/manifest/custom-objects/typed-condition.d.ts +28 -0
  202. package/core/platform/manifest/custom-objects/typed-condition.d.ts.map +1 -0
  203. package/core/platform/manifest/custom-objects/typed-condition.js +434 -0
  204. package/core/platform/manifest/custom-objects/typed-condition.js.map +1 -0
  205. package/core/platform/manifest/custom-objects/typed-condition.mjs +431 -0
  206. package/core/platform/manifest/custom-objects/typed-condition.mjs.map +1 -0
  207. package/core/platform/manifest/custom-objects/types.d.mts +29 -0
  208. package/core/platform/manifest/custom-objects/types.d.mts.map +1 -0
  209. package/core/platform/manifest/custom-objects/types.d.ts +29 -0
  210. package/core/platform/manifest/custom-objects/types.d.ts.map +1 -0
  211. package/core/platform/manifest/custom-objects/types.js +3 -0
  212. package/core/platform/manifest/custom-objects/types.js.map +1 -0
  213. package/core/platform/manifest/custom-objects/types.mjs +2 -0
  214. package/core/platform/manifest/custom-objects/types.mjs.map +1 -0
  215. package/core/platform/manifest/custom-objects/validation.d.mts +44 -0
  216. package/core/platform/manifest/custom-objects/validation.d.mts.map +1 -0
  217. package/core/platform/manifest/custom-objects/validation.d.ts +44 -0
  218. package/core/platform/manifest/custom-objects/validation.d.ts.map +1 -0
  219. package/core/platform/manifest/custom-objects/validation.js +30 -0
  220. package/core/platform/manifest/custom-objects/validation.js.map +1 -0
  221. package/core/platform/manifest/custom-objects/validation.mjs +27 -0
  222. package/core/platform/manifest/custom-objects/validation.mjs.map +1 -0
  223. package/core/platform/manifest/custom-objects/workflow.d.mts +47 -0
  224. package/core/platform/manifest/custom-objects/workflow.d.mts.map +1 -0
  225. package/core/platform/manifest/custom-objects/workflow.d.ts +47 -0
  226. package/core/platform/manifest/custom-objects/workflow.d.ts.map +1 -0
  227. package/core/platform/manifest/custom-objects/workflow.js +38 -0
  228. package/core/platform/manifest/custom-objects/workflow.js.map +1 -0
  229. package/core/platform/manifest/custom-objects/workflow.mjs +34 -0
  230. package/core/platform/manifest/custom-objects/workflow.mjs.map +1 -0
  231. package/core/platform/manifest/custom-objects.d.mts +85 -0
  232. package/core/platform/manifest/custom-objects.d.mts.map +1 -0
  233. package/core/platform/manifest/custom-objects.d.ts +85 -0
  234. package/core/platform/manifest/custom-objects.d.ts.map +1 -0
  235. package/core/platform/manifest/custom-objects.js +84 -0
  236. package/core/platform/manifest/custom-objects.js.map +1 -0
  237. package/core/platform/manifest/custom-objects.mjs +55 -0
  238. package/core/platform/manifest/custom-objects.mjs.map +1 -0
  239. package/examples/manifest/custom-object-creation-workflow/custom-object-creation-workflow.ts +26 -44
  240. package/examples/manifest/custom-object-creation-workflow/functions/intake-request-created.ts +20 -0
  241. package/examples/manifest/custom-object-creation-workflow/schema.ts +29 -0
  242. package/examples/manifest/dental-practice-management/dental-practice-management.ts +142 -470
  243. package/examples/manifest/dental-practice-management/functions/chair-schedule.ts +13 -23
  244. package/examples/manifest/dental-practice-management/functions/complete-visit.ts +32 -55
  245. package/examples/manifest/dental-practice-management/functions/operatory-list.ts +13 -23
  246. package/examples/manifest/dental-practice-management/functions/patient-list.ts +13 -23
  247. package/examples/manifest/dental-practice-management/functions/treatment-plan-list.ts +13 -23
  248. package/examples/manifest/dental-practice-management/schema.ts +298 -0
  249. package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +68 -23
  250. package/examples/manifest/field-service-dispatch/field-service-dispatch.ts +102 -375
  251. package/examples/manifest/field-service-dispatch/schema.ts +248 -0
  252. package/examples/manifest/grant-program-management/grant-program-management.ts +125 -419
  253. package/examples/manifest/grant-program-management/schema.ts +269 -0
  254. package/examples/manifest/gym-membership-management/functions/check-in-desk.ts +13 -23
  255. package/examples/manifest/gym-membership-management/functions/member-list.ts +13 -23
  256. package/examples/manifest/gym-membership-management/functions/today-schedule.ts +13 -23
  257. package/examples/manifest/gym-membership-management/functions/trainer-list.ts +13 -23
  258. package/examples/manifest/gym-membership-management/gym-membership-management.ts +92 -442
  259. package/examples/manifest/gym-membership-management/schema.ts +266 -0
  260. package/examples/manifest/procurement-approval-hub/functions/route-purchase-request.ts +20 -0
  261. package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +122 -408
  262. package/examples/manifest/procurement-approval-hub/schema.ts +256 -0
  263. package/examples/manifest/simple-todo-app/functions/mark-done.ts +16 -12
  264. package/examples/manifest/simple-todo-app/functions/todo-list.ts +13 -23
  265. package/examples/manifest/simple-todo-app/schema.ts +60 -0
  266. package/examples/manifest/simple-todo-app/simple-todo-app.ts +40 -109
  267. package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +166 -193
  268. package/examples/manifest/todo-app-without-object-list-view/schema.ts +28 -0
  269. package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +24 -47
  270. package/package.json +7 -13
  271. package/resources/custom-objects/custom-objects.d.mts +7 -0
  272. package/resources/custom-objects/custom-objects.d.mts.map +1 -1
  273. package/resources/custom-objects/custom-objects.d.ts +7 -0
  274. package/resources/custom-objects/custom-objects.d.ts.map +1 -1
  275. package/resources/custom-objects/custom-objects.js.map +1 -1
  276. package/resources/custom-objects/custom-objects.mjs.map +1 -1
  277. package/resources/custom-objects/fields.d.mts +170 -15
  278. package/resources/custom-objects/fields.d.mts.map +1 -1
  279. package/resources/custom-objects/fields.d.ts +170 -15
  280. package/resources/custom-objects/fields.d.ts.map +1 -1
  281. package/resources/index.d.mts +2 -2
  282. package/resources/index.d.mts.map +1 -1
  283. package/resources/index.d.ts +2 -2
  284. package/resources/index.d.ts.map +1 -1
  285. package/resources/index.js.map +1 -1
  286. package/resources/index.mjs.map +1 -1
  287. package/resources/leave-program-evaluations.d.mts +510 -3
  288. package/resources/leave-program-evaluations.d.mts.map +1 -1
  289. package/resources/leave-program-evaluations.d.ts +510 -3
  290. package/resources/leave-program-evaluations.d.ts.map +1 -1
  291. package/resources/levels.d.mts +64 -2
  292. package/resources/levels.d.mts.map +1 -1
  293. package/resources/levels.d.ts +64 -2
  294. package/resources/levels.d.ts.map +1 -1
  295. package/resources/levels.js +22 -0
  296. package/resources/levels.js.map +1 -1
  297. package/resources/levels.mjs +22 -0
  298. package/resources/levels.mjs.map +1 -1
  299. package/resources/tracks.d.mts +45 -1
  300. package/resources/tracks.d.mts.map +1 -1
  301. package/resources/tracks.d.ts +45 -1
  302. package/resources/tracks.d.ts.map +1 -1
  303. package/resources/tracks.js +22 -0
  304. package/resources/tracks.js.map +1 -1
  305. package/resources/tracks.mjs +22 -0
  306. package/resources/tracks.mjs.map +1 -1
  307. package/src/client.ts +8 -0
  308. package/src/core/platform/README.md +20 -0
  309. package/src/core/platform/custom-objects/category.ts +294 -0
  310. package/src/core/platform/custom-objects/definition.ts +373 -0
  311. package/src/core/platform/custom-objects/fields.ts +653 -0
  312. package/src/core/platform/custom-objects/function-runtime.ts +76 -0
  313. package/src/core/platform/custom-objects/lifecycle.ts +557 -0
  314. package/src/core/platform/custom-objects/manager.ts +959 -0
  315. package/src/core/platform/custom-objects/provisioning.ts +672 -0
  316. package/src/core/platform/custom-objects/rql.ts +375 -0
  317. package/src/core/platform/custom-objects/schema-manager.ts +351 -0
  318. package/src/core/platform/custom-objects/typed-rql.ts +1273 -0
  319. package/src/core/platform/custom-objects/types.ts +753 -0
  320. package/src/core/platform/custom-objects/validation.ts +573 -0
  321. package/src/core/platform/custom-objects.ts +269 -0
  322. package/src/core/platform/manifest/README.md +26 -0
  323. package/src/core/platform/manifest/custom-objects/action.ts +87 -0
  324. package/src/core/platform/manifest/custom-objects/conditions.ts +762 -0
  325. package/src/core/platform/manifest/custom-objects/existing.ts +221 -0
  326. package/src/core/platform/manifest/custom-objects/field-resolution.ts +116 -0
  327. package/src/core/platform/manifest/custom-objects/function-file.ts +149 -0
  328. package/src/core/platform/manifest/custom-objects/list-view.ts +95 -0
  329. package/src/core/platform/manifest/custom-objects/object-list-page.ts +87 -0
  330. package/src/core/platform/manifest/custom-objects/page-layout.ts +380 -0
  331. package/src/core/platform/manifest/custom-objects/register.ts +555 -0
  332. package/src/core/platform/manifest/custom-objects/rule.ts +192 -0
  333. package/src/core/platform/manifest/custom-objects/sdui-page.ts +515 -0
  334. package/src/core/platform/manifest/custom-objects/typed-condition.ts +617 -0
  335. package/src/core/platform/manifest/custom-objects/types.ts +92 -0
  336. package/src/core/platform/manifest/custom-objects/validation.ts +70 -0
  337. package/src/core/platform/manifest/custom-objects/workflow.ts +71 -0
  338. package/src/core/platform/manifest/custom-objects.ts +203 -0
  339. package/src/pebble-sdui-web-custom-apps-shim.d.ts +3 -0
  340. package/src/resources/custom-objects/custom-objects.ts +8 -0
  341. package/src/resources/custom-objects/fields.ts +239 -14
  342. package/src/resources/index.ts +4 -0
  343. package/src/resources/leave-program-evaluations.ts +610 -3
  344. package/src/resources/levels.ts +93 -1
  345. package/src/resources/tracks.ts +70 -0
  346. package/src/tsconfig.json +1 -1
  347. package/src/version.ts +1 -1
  348. package/version.d.mts +1 -1
  349. package/version.d.ts +1 -1
  350. package/version.js +1 -1
  351. package/version.mjs +1 -1
@@ -2,46 +2,43 @@
2
2
  * Dental Practice Management — patient charts, operatories (chairs), appointments
3
3
  * with status, treatment plans, rollups, and an SDUI ObjectListView tab for appointments.
4
4
  *
5
- * dental_patient__c ← chart: demographics, allergies, notes
6
- * dental_provider__c ← providers selectable for appointments
7
- * dental_operatory__c ← chair / room (parent for same-day board rollups)
8
- * dental_appointment__c ← child of operatory; patient lookup, time, status, visit type
9
- * dental_treatment_plan__c ← child of patient; plan status, procedures, estimates
5
+ * This example demonstrates the typed custom-object schema layer under
6
+ * `@rippling/rippling-sdk/core/platform/custom-objects` and then compiles those
7
+ * structural definitions back into the existing manifest class model.
10
8
  *
11
9
  * Run:
12
10
  * yarn tsn examples/manifest/dental-practice-management/dental-practice-management.ts \
13
11
  * > examples/manifest/dental-practice-management/manifest.json
14
12
  */
15
13
 
16
- import * as fs from 'node:fs';
17
14
  import * as path from 'node:path';
15
+ import { toCustomCategoryApiName } from '@rippling/rippling-sdk/core/platform/custom-objects';
16
+ import {
17
+ defineSduiPageFromFunctionFile,
18
+ defineTypedCustomObjectActionFromFunctionFile,
19
+ defineTypedListView,
20
+ defineTypedPageLayout,
21
+ defineTypedRule,
22
+ defineTypedValidation,
23
+ registerManifestCustomObject,
24
+ } from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
18
25
  import {
19
26
  App,
20
- BooleanField,
21
27
  Category,
22
- CustomObject,
23
- CustomObjectAction,
24
- CustomObjectFieldSection,
25
- CustomObjectPageLayout,
26
- DatetimeField,
27
- DateField,
28
- EmailField,
29
- FormulaField,
30
- ListViewDef,
31
- LongTextField,
32
- LookupField,
28
+ type CustomObject,
33
29
  ManifestBuilder,
34
- ManifestFunction,
35
- NumberField,
36
- ParentChildField,
37
- PhoneField,
38
- Rule,
39
- RadioField,
40
30
  SduiPage,
41
31
  SummaryField,
42
- TextField,
43
- Validation,
44
32
  } from '@rippling/rippling-sdk/lib/manifest';
33
+ import {
34
+ appointmentDefinition,
35
+ DENTAL_CATEGORY_NAME,
36
+ operatoryDefinition,
37
+ patientDefinition,
38
+ providerDefinition,
39
+ treatmentPlanDefinition,
40
+ } from './schema';
41
+
45
42
  const manifest = new ManifestBuilder({
46
43
  key: 'dental_practice_management',
47
44
  name: 'Dental Practice Management',
@@ -50,477 +47,165 @@ const manifest = new ManifestBuilder({
50
47
  });
51
48
 
52
49
  const dentalCategory = new Category(manifest, {
53
- apiName: 'dental__c',
50
+ apiName: toCustomCategoryApiName(DENTAL_CATEGORY_NAME),
54
51
  name: 'Dental',
55
52
  description: 'Patients, chairs, visits, and treatment plans',
56
53
  });
57
54
 
58
- // ── Patient (chart) ─────────────────────────────────────────────────────────
59
- const patientObj = new CustomObject(manifest, {
60
- apiName: 'dental_patient__c',
61
- name: 'Patient',
62
- pluralLabel: 'Patients',
63
- category: dentalCategory,
64
- description: 'Clinical chart, demographics, and care preferences',
65
- icon: { emoji: '🦷' },
66
- });
67
-
68
- const patientIdentitySection = new CustomObjectFieldSection(patientObj, {
69
- name: 'Demographics',
70
- sectionId: 'sec_pt_identity',
71
- });
72
-
73
- const patientClinicalSection = new CustomObjectFieldSection(patientObj, {
74
- name: 'Clinical',
75
- sectionId: 'sec_pt_clinical',
76
- });
77
-
78
- const patientNameField = new TextField(patientObj, {
79
- apiName: 'legal_name__c',
80
- displayName: 'Full legal name',
81
- description: 'Full legal name field',
82
- required: true,
83
- maxLength: 160,
84
- section: patientIdentitySection,
85
- });
86
-
87
- const patientDobField = new DateField(patientObj, {
88
- apiName: 'date_of_birth__c',
89
- displayName: 'Date of birth',
90
- description: 'Date of birth field',
91
- section: patientIdentitySection,
92
- });
93
-
94
- const patientPhoneField = new PhoneField(patientObj, {
95
- apiName: 'phone__c',
96
- displayName: 'Phone',
97
- description: 'Phone field',
98
- section: patientIdentitySection,
99
- });
100
-
101
- const patientEmailField = new EmailField(patientObj, {
102
- apiName: 'email__c',
103
- displayName: 'Email',
104
- description: 'Email field',
105
- unique: true,
106
- section: patientIdentitySection,
107
- });
108
-
109
- const patientActiveField = new BooleanField(patientObj, {
110
- apiName: 'active_patient__c',
111
- displayName: 'Active patient',
112
- description: 'Whether the patient is currently active in the practice',
113
- required: true,
114
- section: patientIdentitySection,
115
- });
116
-
117
- const patientAllergiesField = new LongTextField(patientObj, {
118
- apiName: 'allergies_and_alerts__c',
119
- displayName: 'Allergies & medical alerts',
120
- maxLength: 2000,
121
- description: 'Drug allergies, bisphosphonates, anticoagulants, latex, etc.',
122
- section: patientClinicalSection,
123
- });
124
-
125
- const patientInsuranceField = new TextField(patientObj, {
126
- apiName: 'insurance_plan__c',
127
- displayName: 'Insurance / payer',
128
- description: 'Insurance / payer field',
129
- maxLength: 120,
130
- section: patientClinicalSection,
131
- });
132
-
133
- const patientChartNotesField = new LongTextField(patientObj, {
134
- apiName: 'chart_summary__c',
135
- displayName: 'Chart summary & preferences',
136
- maxLength: 4000,
137
- description: 'Narrative, anxiety notes, perio class, last prophy, family history',
138
- section: patientClinicalSection,
139
- });
55
+ const registeredObjects = new Map<string, { object: CustomObject }>();
140
56
 
141
- const patientLabelField = new FormulaField(patientObj, {
142
- apiName: 'patient_label__c',
143
- displayName: 'Chart label',
144
- fieldType: 'TEXT',
145
- maxLength: 220,
146
- formula: "CONCATENATE(legal_name__c, ' (b. ', YEAR(date_of_birth__c), ')')",
147
- description: 'Quick list label (name and birth year)',
148
- section: patientIdentitySection,
149
- });
57
+ function resolveCustomObjectTarget(apiName: string): CustomObject {
58
+ const target = registeredObjects.get(apiName);
59
+ if (target == null) {
60
+ throw new Error(`Custom object target "${apiName}" must be registered before dependents.`);
61
+ }
62
+ return target.object;
63
+ }
150
64
 
151
- // ── Provider ────────────────────────────────────────────────────────────────
152
- const providerObj = new CustomObject(manifest, {
153
- apiName: 'dental_provider__c',
154
- name: 'Provider',
155
- pluralLabel: 'Providers',
65
+ const patient = registerManifestCustomObject(manifest, {
66
+ definition: patientDefinition,
156
67
  category: dentalCategory,
157
- description: 'Clinicians who can be assigned to appointment blocks',
158
- icon: { emoji: '🧑‍⚕️' },
159
- });
160
-
161
- const providerSection = new CustomObjectFieldSection(providerObj, {
162
- name: 'Provider',
163
- sectionId: 'sec_provider_info',
164
- });
165
-
166
- const providerNameField = providerObj.standardFields.name;
167
-
168
- const providerStatusField = new RadioField(providerObj, {
169
- apiName: 'provider_status__c',
170
- displayName: 'Status',
171
- description: 'Whether this provider is active in the practice',
172
- options: ['Active', 'On leave', 'Inactive'],
173
- required: true,
174
- section: providerSection,
175
- });
176
-
177
- const providerBookingStatusField = new RadioField(providerObj, {
178
- apiName: 'booking_status__c',
179
- displayName: 'Booking status',
180
- description: 'Whether scheduling should offer this provider for new appointments',
181
- options: ['Open', 'Limited', 'Closed'],
182
- required: true,
183
- section: providerSection,
184
- });
185
-
186
- const providerNextAvailableDaysField = new NumberField(providerObj, {
187
- apiName: 'next_available_days__c',
188
- displayName: 'Next available (days)',
189
- description: 'Estimated days until this provider has an open appointment slot',
190
- decimalPlaces: 0,
191
- required: true,
192
- section: providerSection,
68
+ resolveCustomObjectTarget,
193
69
  });
70
+ registeredObjects.set(patient.definition.apiName, patient);
194
71
 
195
- // ── Operatory (chair) ─────────────────────────────────────────────────────────
196
- const operatoryObj = new CustomObject(manifest, {
197
- apiName: 'dental_operatory__c',
198
- name: 'Operatory',
199
- pluralLabel: 'Operatories',
72
+ const provider = registerManifestCustomObject(manifest, {
73
+ definition: providerDefinition,
200
74
  category: dentalCategory,
201
- description: 'A chair, bay, or room you book on the daily board',
202
- icon: { emoji: '🪥' },
203
- });
204
-
205
- const operatorySection = new CustomObjectFieldSection(operatoryObj, {
206
- name: 'Operatory',
207
- sectionId: 'sec_op_info',
208
- });
209
-
210
- const opNameField = operatoryObj.standardFields.name;
211
-
212
- const opCodeField = new TextField(operatoryObj, {
213
- apiName: 'room_code__c',
214
- displayName: 'Room code',
215
- maxLength: 20,
216
- description: 'Short code for whiteboards and schedules',
217
- section: operatorySection,
75
+ resolveCustomObjectTarget,
218
76
  });
77
+ registeredObjects.set(provider.definition.apiName, provider);
219
78
 
220
- // ── Appointment (child of operatory) ─────────────────────────────────────────
221
- const apptObj = new CustomObject(manifest, {
222
- apiName: 'dental_appointment__c',
223
- name: 'Appointment',
224
- pluralLabel: 'Appointments',
79
+ const operatory = registerManifestCustomObject(manifest, {
80
+ definition: operatoryDefinition,
225
81
  category: dentalCategory,
226
- description: 'Chair booking with visit type and real-time visit status',
227
- icon: { emoji: '📅' },
228
- });
229
-
230
- const apptOperatorySection = new CustomObjectFieldSection(apptObj, {
231
- name: 'Operatory & time',
232
- sectionId: 'sec_appt_op',
233
- });
234
-
235
- const apptPatientSection = new CustomObjectFieldSection(apptObj, {
236
- name: 'Patient & visit',
237
- sectionId: 'sec_appt_patient',
82
+ resolveCustomObjectTarget,
238
83
  });
84
+ registeredObjects.set(operatory.definition.apiName, operatory);
239
85
 
240
- const apptOperatoryRef = new ParentChildField(apptObj, {
241
- apiName: 'operatory_ref__c',
242
- displayName: 'Operatory (chair)',
243
- target: operatoryObj,
244
- relatedDataLabel: 'Appointments',
245
- parentChildType: 'PRIMARY',
246
- enableParentOwnerInheritance: false,
247
- description: 'Which chair or bay this visit is booked on',
248
- section: apptOperatorySection,
249
- });
250
-
251
- const apptStartField = new DatetimeField(apptObj, {
252
- apiName: 'start_time__c',
253
- displayName: 'Start (local)',
254
- required: true,
255
- description: 'Planned or actual start; board sorts by this',
256
- section: apptOperatorySection,
257
- });
258
-
259
- const apptDurationMins = new NumberField(apptObj, {
260
- apiName: 'duration_minutes__c',
261
- displayName: 'Duration (minutes)',
262
- required: true,
263
- decimalPlaces: 0,
264
- description: 'Expected chair time for the procedure block',
265
- section: apptOperatorySection,
266
- });
267
-
268
- const apptPatientRef = new LookupField(apptObj, {
269
- apiName: 'patient_ref__c',
270
- displayName: 'Patient',
271
- target: patientObj,
272
- relatedDataLabel: 'Appointments',
273
- required: true,
274
- lookup_filter_rql_condition: '(active_patient__c == True)',
275
- description: 'Chart to open for this visit (active patients only)',
276
- section: apptPatientSection,
277
- });
278
-
279
- const apptProviderRef = new LookupField(apptObj, {
280
- apiName: 'provider_ref__c',
281
- displayName: 'Provider',
282
- target: providerObj,
283
- relatedDataLabel: 'Appointments',
284
- required: true,
285
- lookup_filter_rql_condition:
286
- "((provider_status__c IN ['Active']) AND (next_available_days__c <= 14) AND (booking_status__c NOT_IN ['Closed']))",
287
- description: 'Provider assigned to this visit (active and bookable within two weeks)',
288
- section: apptPatientSection,
289
- });
290
-
291
- const apptVisitTypeField = new RadioField(apptObj, {
292
- apiName: 'visit_type__c',
293
- displayName: 'Visit type',
294
- description: 'Visit type field',
295
- options: [
296
- 'New patient exam',
297
- 'Periodic / recall exam',
298
- 'Prophy / cleaning',
299
- 'Restorative',
300
- 'Endodontic',
301
- 'Perio / SRP',
302
- 'Oral surgery / extraction',
303
- 'Orthodontic',
304
- 'Emergency / pain',
305
- 'Other',
306
- ],
307
- required: true,
308
- section: apptPatientSection,
309
- });
310
-
311
- const apptStatusField = new RadioField(apptObj, {
312
- apiName: 'appointment_status__c',
313
- displayName: 'Visit status',
314
- options: ['Scheduled', 'Checked in', 'In treatment', 'Completed', 'Cancelled', 'No-show'],
315
- required: true,
316
- description: 'Front-desk and clinical workflow status',
317
- section: apptPatientSection,
318
- });
319
-
320
- const apptClinicalNotes = new LongTextField(apptObj, {
321
- apiName: 'visit_notes__c',
322
- displayName: 'Visit notes',
323
- maxLength: 4000,
324
- description: 'Chairside notes for this block (sync with EDR as needed)',
325
- section: apptPatientSection,
326
- });
327
-
328
- const apptBoardLabel = new FormulaField(apptObj, {
329
- apiName: 'board_label__c',
330
- displayName: 'Board label',
331
- description: 'Board label field',
332
- fieldType: 'TEXT',
333
- maxLength: 260,
334
- formula: "CONCATENATE(visit_type__c, ' · ', appointment_status__c)",
335
- section: apptPatientSection,
336
- });
337
-
338
- // ── Treatment plan (child of patient) ─────────────────────────────────────────
339
- const planObj = new CustomObject(manifest, {
340
- apiName: 'dental_treatment_plan__c',
341
- name: 'Treatment plan',
342
- pluralLabel: 'Treatment plans',
86
+ const appointment = registerManifestCustomObject(manifest, {
87
+ definition: appointmentDefinition,
343
88
  category: dentalCategory,
344
- description: 'Staged work sequenced for a patient',
345
- icon: { emoji: '📋' },
346
- });
347
-
348
- const planLinkSection = new CustomObjectFieldSection(planObj, {
349
- name: 'Link',
350
- sectionId: 'sec_plan_link',
89
+ resolveCustomObjectTarget,
351
90
  });
91
+ registeredObjects.set(appointment.definition.apiName, appointment);
352
92
 
353
- const planBodySection = new CustomObjectFieldSection(planObj, {
354
- name: 'Plan',
355
- sectionId: 'sec_plan_body',
356
- });
357
-
358
- const planNameField = planObj.standardFields.name;
359
-
360
- const planPatientRef = new ParentChildField(planObj, {
361
- apiName: 'plan_patient_ref__c',
362
- displayName: 'Patient',
363
- target: patientObj,
364
- relatedDataLabel: 'Treatment plans',
365
- parentChildType: 'PRIMARY',
366
- enableParentOwnerInheritance: false,
367
- description: 'Which chart owns this plan',
368
- section: planLinkSection,
369
- });
370
-
371
- const planStatusField = new RadioField(planObj, {
372
- apiName: 'plan_status__c',
373
- displayName: 'Status',
374
- description: 'Status field',
375
- options: ['Draft', 'Presented', 'Accepted', 'In progress', 'Completed', 'Declined / on hold'],
376
- required: true,
377
- section: planBodySection,
378
- });
379
-
380
- const planTargetField = new DateField(planObj, {
381
- apiName: 'target_completion__c',
382
- displayName: 'Target completion',
383
- description: 'Goal to finish or next review',
384
- section: planBodySection,
385
- });
386
-
387
- const planProceduresField = new LongTextField(planObj, {
388
- apiName: 'procedures_summary__c',
389
- displayName: 'Procedures & sequence',
390
- maxLength: 8000,
391
- description: 'Tooth numbers, codes, and staging',
392
- section: planBodySection,
393
- });
394
-
395
- const planFeeCents = new NumberField(planObj, {
396
- apiName: 'fee_estimate_cents__c',
397
- displayName: 'Fee estimate (cents)',
398
- decimalPlaces: 0,
399
- description: 'Rough office fee total for planning; adjust per office policy',
400
- section: planBodySection,
93
+ const treatmentPlan = registerManifestCustomObject(manifest, {
94
+ definition: treatmentPlanDefinition,
95
+ category: dentalCategory,
96
+ resolveCustomObjectTarget,
401
97
  });
98
+ registeredObjects.set(treatmentPlan.definition.apiName, treatmentPlan);
402
99
 
403
100
  // ── Rollups ────────────────────────────────────────────────────────────────
404
- const apptCountOnOperatory = new SummaryField(operatoryObj, {
101
+ const apptCountOnOperatory = new SummaryField(operatory.object, {
405
102
  apiName: 'appointment_count__c',
406
103
  displayName: 'Appointments (count)',
407
- aggregates: apptPatientRef,
104
+ aggregates: appointment.object.standardFields.name,
408
105
  using: 'COUNT',
409
- lookup: apptOperatoryRef,
106
+ lookup: appointment.fields.operatory_ref,
410
107
  description: 'Rows in this operatory (filter by day in the chair board function)',
411
- section: operatorySection,
108
+ section: operatory.sections.operatory,
412
109
  });
413
110
 
414
- const planCountOnPatient = new SummaryField(patientObj, {
111
+ const planCountOnPatient = new SummaryField(patient.object, {
415
112
  apiName: 'treatment_plan_count__c',
416
113
  displayName: 'Treatment plans',
417
- aggregates: planNameField,
114
+ aggregates: treatmentPlan.object.standardFields.name,
418
115
  using: 'COUNT',
419
- lookup: planPatientRef,
116
+ lookup: treatmentPlan.fields.plan_patient_ref,
420
117
  description: 'Active plans tied to the chart',
421
- section: patientClinicalSection,
118
+ section: patient.sections.clinical,
422
119
  });
423
120
 
424
- // ── Validations & defaults ──────────────────────────────────────────────────
425
- new Validation(apptObj, {
121
+ // ── Validations & defaults ────────────────────────────────────────────────
122
+ defineTypedValidation(appointment, {
426
123
  ruleId: 'dental_appt_duration_positive',
427
124
  displayName: 'Duration must be positive',
428
- rqlFormula: '(duration_minutes__c <= 0)',
125
+ whenInvalid: (c) => c.lte(c.fields.duration_minutes, 0),
429
126
  errorMessage: 'Duration must be at least 1 minute.',
430
127
  ruleDescription: 'Blocks empty or zero chair blocks',
431
128
  state: 'ACTIVE',
432
129
  level: 'FIELD',
433
- fieldRef: apptDurationMins,
130
+ field: 'duration_minutes',
434
131
  });
435
132
 
436
- new Rule(apptObj, {
133
+ defineTypedRule(appointment, {
437
134
  flowId: 'dental_default_appt_status',
438
135
  flowName: 'Default visit status to Scheduled',
439
136
  triggerType: 'CREATE',
440
137
  description: 'New bookings start as Scheduled unless the team changes it',
441
- actions: [{ targetField: apptStatusField, fixedValue: 'Scheduled' }],
138
+ actions: (rules) => [rules.setField('appointment_status').toValue('Scheduled')],
442
139
  });
443
140
 
444
141
  // ── List views ─────────────────────────────────────────────────────────────
445
- new ListViewDef(patientObj, {
142
+ defineTypedListView(patient, {
446
143
  viewId: 'view_dental_all_patients',
447
144
  name: 'All patients',
448
145
  description: 'Full chart list with plan counts',
449
- fields: [
450
- 'name',
451
- patientDobField,
452
- patientPhoneField,
453
- patientActiveField,
454
- patientLabelField,
455
- planCountOnPatient,
456
- ],
146
+ fields: ['name', 'date_of_birth', 'phone', 'active_patient', 'patient_label', planCountOnPatient],
457
147
  orderBy: 'name',
458
148
  sortOrder: 'ASC',
459
149
  isPublic: true,
460
150
  objectScope: 'all',
461
151
  });
462
152
 
463
- new ListViewDef(providerObj, {
153
+ defineTypedListView(provider, {
464
154
  viewId: 'view_dental_providers',
465
155
  name: 'All providers',
466
156
  description: 'Provider directory with appointment booking fields',
467
- fields: [
468
- providerNameField,
469
- providerStatusField,
470
- providerBookingStatusField,
471
- providerNextAvailableDaysField,
472
- ],
157
+ fields: ['name', 'provider_status', 'booking_status', 'next_available_days'],
473
158
  orderBy: 'name',
474
159
  sortOrder: 'ASC',
475
160
  isPublic: true,
476
161
  objectScope: 'all',
477
162
  });
478
163
 
479
- new ListViewDef(operatoryObj, {
164
+ defineTypedListView(operatory, {
480
165
  viewId: 'view_dental_all_operatories',
481
166
  name: 'All operatories',
482
167
  description: 'Chairs and daily volume rollups',
483
- fields: [opNameField, opCodeField, apptCountOnOperatory],
168
+ fields: ['name', 'room_code', apptCountOnOperatory],
484
169
  orderBy: 'name',
485
170
  sortOrder: 'ASC',
486
171
  isPublic: true,
487
172
  objectScope: 'all',
488
173
  });
489
174
 
490
- new ListViewDef(apptObj, {
175
+ defineTypedListView(appointment, {
491
176
  viewId: 'view_dental_appointments_all',
492
177
  name: 'All appointments',
493
178
  description: 'Chronological board with chair and status',
494
179
  fields: [
495
180
  'name',
496
- apptOperatoryRef,
497
- apptStartField,
498
- apptDurationMins,
499
- apptPatientRef,
500
- apptProviderRef,
501
- apptVisitTypeField,
502
- apptStatusField,
503
- apptBoardLabel,
181
+ 'operatory_ref',
182
+ 'start_time',
183
+ 'duration_minutes',
184
+ 'patient_ref',
185
+ 'provider_ref',
186
+ 'visit_type',
187
+ 'appointment_status',
188
+ 'board_label',
504
189
  ],
505
- orderBy: apptStartField,
190
+ orderBy: 'start_time',
506
191
  sortOrder: 'ASC',
507
192
  isPublic: true,
508
193
  objectScope: 'all',
509
194
  });
510
195
 
511
- new ListViewDef(planObj, {
196
+ defineTypedListView(treatmentPlan, {
512
197
  viewId: 'view_dental_treatment_plans',
513
198
  name: 'All treatment plans',
514
199
  description: 'Case tracking by status',
515
- fields: [planNameField, planPatientRef, planStatusField, planTargetField, planFeeCents],
516
- orderBy: planTargetField,
200
+ fields: ['name', 'plan_patient_ref', 'plan_status', 'target_completion', 'fee_estimate_cents'],
201
+ orderBy: 'target_completion',
517
202
  sortOrder: 'ASC',
518
203
  isPublic: true,
519
204
  objectScope: 'all',
520
205
  });
521
206
 
522
- // ── Page layouts ─────────────────────────────────────────────────────────────
523
- new CustomObjectPageLayout(patientObj, {
207
+ // ── Page layouts ───────────────────────────────────────────────────────────
208
+ defineTypedPageLayout(patient, {
524
209
  apiName: 'default',
525
210
  name: 'Patient chart',
526
211
  layoutId: 'layout_dental_patient',
@@ -534,27 +219,22 @@ new CustomObjectPageLayout(patientObj, {
534
219
  {
535
220
  name: 'Profile',
536
221
  type: 'fields_section',
537
- section: patientIdentitySection,
222
+ section: patient.sections.identity,
538
223
  fields: [
539
224
  { field: 'name', editable: true },
540
- patientNameField,
541
- patientDobField,
542
- patientPhoneField,
543
- patientEmailField,
544
- patientActiveField,
545
- patientLabelField,
225
+ 'legal_name',
226
+ 'date_of_birth',
227
+ 'phone',
228
+ 'email',
229
+ 'active_patient',
230
+ 'patient_label',
546
231
  ],
547
232
  },
548
233
  {
549
234
  name: 'Clinical & billing',
550
235
  type: 'fields_section',
551
- section: patientClinicalSection,
552
- fields: [
553
- patientAllergiesField,
554
- patientInsuranceField,
555
- patientChartNotesField,
556
- planCountOnPatient,
557
- ],
236
+ section: patient.sections.clinical,
237
+ fields: ['allergies_and_alerts', 'insurance_plan', 'chart_summary', planCountOnPatient],
558
238
  },
559
239
  ],
560
240
  },
@@ -565,7 +245,7 @@ new CustomObjectPageLayout(patientObj, {
565
245
  visibilityConditions: {},
566
246
  });
567
247
 
568
- new CustomObjectPageLayout(providerObj, {
248
+ defineTypedPageLayout(provider, {
569
249
  apiName: 'default',
570
250
  name: 'Provider',
571
251
  layoutId: 'layout_dental_provider',
@@ -579,12 +259,12 @@ new CustomObjectPageLayout(providerObj, {
579
259
  {
580
260
  name: 'Booking',
581
261
  type: 'fields_section',
582
- section: providerSection,
262
+ section: provider.sections.provider,
583
263
  fields: [
584
- { field: providerNameField, editable: true },
585
- providerStatusField,
586
- providerBookingStatusField,
587
- providerNextAvailableDaysField,
264
+ { field: 'name', editable: true },
265
+ 'provider_status',
266
+ 'booking_status',
267
+ 'next_available_days',
588
268
  ],
589
269
  },
590
270
  ],
@@ -596,7 +276,7 @@ new CustomObjectPageLayout(providerObj, {
596
276
  visibilityConditions: {},
597
277
  });
598
278
 
599
- new CustomObjectPageLayout(operatoryObj, {
279
+ defineTypedPageLayout(operatory, {
600
280
  apiName: 'default',
601
281
  name: 'Operatory',
602
282
  layoutId: 'layout_dental_operatory',
@@ -610,8 +290,8 @@ new CustomObjectPageLayout(operatoryObj, {
610
290
  {
611
291
  name: 'Room',
612
292
  type: 'fields_section',
613
- section: operatorySection,
614
- fields: [{ field: opNameField, editable: true }, opCodeField, apptCountOnOperatory],
293
+ section: operatory.sections.operatory,
294
+ fields: [{ field: 'name', editable: true }, 'room_code', apptCountOnOperatory],
615
295
  },
616
296
  ],
617
297
  },
@@ -622,23 +302,22 @@ new CustomObjectPageLayout(operatoryObj, {
622
302
  visibilityConditions: {},
623
303
  });
624
304
 
625
- const completeVisitFn = new ManifestFunction(manifest, {
626
- apiName: 'dental_complete_visit_fn',
627
- name: 'completeVisit',
628
- description: 'Detail-view action that completes an appointment and drafts follow-up treatment',
629
- code: fs.readFileSync(path.join(__dirname, 'functions', 'complete-visit.ts'), 'utf-8'),
630
- dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.65' },
631
- isAsync: false,
632
- });
633
-
634
- new CustomObjectAction(apptObj, {
305
+ defineTypedCustomObjectActionFromFunctionFile(manifest, appointment, {
635
306
  actionId: 'action_dental_complete_visit',
636
307
  name: 'Complete visit',
637
- function: completeVisitFn,
638
308
  visibilityPreferences: ['DETAIL_VIEW'],
309
+ function: {
310
+ apiName: 'dental_complete_visit_fn',
311
+ name: 'completeVisit',
312
+ description: 'Detail-view action that completes an appointment and drafts follow-up treatment',
313
+ codeDirectory: path.join(__dirname, 'functions'),
314
+ codeFilename: 'complete-visit.ts',
315
+ dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.65' },
316
+ isAsync: false,
317
+ },
639
318
  });
640
319
 
641
- new CustomObjectPageLayout(apptObj, {
320
+ defineTypedPageLayout(appointment, {
642
321
  apiName: 'default',
643
322
  name: 'Appointment',
644
323
  layoutId: 'layout_dental_appointment',
@@ -652,20 +331,20 @@ new CustomObjectPageLayout(apptObj, {
652
331
  {
653
332
  name: 'Chair & schedule',
654
333
  type: 'fields_section',
655
- section: apptOperatorySection,
656
- fields: [{ field: 'name', editable: true }, apptOperatoryRef, apptStartField, apptDurationMins],
334
+ section: appointment.sections.operatory_and_time,
335
+ fields: [{ field: 'name', editable: true }, 'operatory_ref', 'start_time', 'duration_minutes'],
657
336
  },
658
337
  {
659
338
  name: 'Patient & status',
660
339
  type: 'fields_section',
661
- section: apptPatientSection,
340
+ section: appointment.sections.patient_and_visit,
662
341
  fields: [
663
- apptPatientRef,
664
- apptProviderRef,
665
- apptVisitTypeField,
666
- apptStatusField,
667
- apptBoardLabel,
668
- apptClinicalNotes,
342
+ 'patient_ref',
343
+ 'provider_ref',
344
+ 'visit_type',
345
+ 'appointment_status',
346
+ 'board_label',
347
+ 'visit_notes',
669
348
  ],
670
349
  },
671
350
  ],
@@ -678,7 +357,7 @@ new CustomObjectPageLayout(apptObj, {
678
357
  visibilityConditions: {},
679
358
  });
680
359
 
681
- new CustomObjectPageLayout(planObj, {
360
+ defineTypedPageLayout(treatmentPlan, {
682
361
  apiName: 'default',
683
362
  name: 'Treatment plan',
684
363
  layoutId: 'layout_dental_treatment_plan',
@@ -692,19 +371,19 @@ new CustomObjectPageLayout(planObj, {
692
371
  {
693
372
  name: 'Patient',
694
373
  type: 'fields_section',
695
- section: planLinkSection,
696
- fields: [planPatientRef],
374
+ section: treatmentPlan.sections.link,
375
+ fields: ['plan_patient_ref'],
697
376
  },
698
377
  {
699
378
  name: 'Planned work',
700
379
  type: 'fields_section',
701
- section: planBodySection,
380
+ section: treatmentPlan.sections.plan,
702
381
  fields: [
703
- { field: planNameField, editable: true },
704
- planStatusField,
705
- planTargetField,
706
- planProceduresField,
707
- planFeeCents,
382
+ { field: 'name', editable: true },
383
+ 'plan_status',
384
+ 'target_completion',
385
+ 'procedures_summary',
386
+ 'fee_estimate_cents',
708
387
  ],
709
388
  },
710
389
  ],
@@ -716,16 +395,12 @@ new CustomObjectPageLayout(planObj, {
716
395
  visibilityConditions: {},
717
396
  });
718
397
 
719
- // ── SDUI object-list tabs ───────────────────────────────────────────────────
398
+ // ── SDUI object-list tabs ─────────────────────────────────────────────────
720
399
  const sduiObjectListDependencies = {
721
400
  '@rippling/rippling-sdk': '^0.2.0-alpha.65',
722
401
  '@rippling/pebble-sdui-web': '^0.9.2',
723
402
  };
724
403
 
725
- function loadFunctionCode(filename: string): string {
726
- return fs.readFileSync(path.join(__dirname, 'functions', filename), 'utf-8');
727
- }
728
-
729
404
  function createObjectListPage(props: {
730
405
  codeFilename: string;
731
406
  functionApiName: string;
@@ -734,20 +409,17 @@ function createObjectListPage(props: {
734
409
  pageId: string;
735
410
  pageName: string;
736
411
  }): SduiPage {
737
- const listFn = new ManifestFunction(manifest, {
412
+ return defineSduiPageFromFunctionFile(manifest, {
738
413
  apiName: props.functionApiName,
739
414
  name: props.functionName,
740
415
  description: props.functionDescription,
741
- code: loadFunctionCode(props.codeFilename),
416
+ codeDirectory: path.join(__dirname, 'functions'),
417
+ codeFilename: props.codeFilename,
742
418
  dependencies: sduiObjectListDependencies,
743
419
  isAsync: false,
744
- });
745
-
746
- return new SduiPage(manifest, {
747
- sduiPageId: props.pageId,
748
- name: props.pageName,
749
- function: listFn,
750
- });
420
+ pageId: props.pageId,
421
+ pageName: props.pageName,
422
+ }).page;
751
423
  }
752
424
 
753
425
  const patientListPage = createObjectListPage({