@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
@@ -1,5 +1,6 @@
1
1
  /*
2
- * Procurement Approval Hub - vendors, contracts, purchase requests, approvals, and invoices.
2
+ * Procurement Approval Hub - vendors, contracts, purchase requests, approvals,
3
+ * and invoices.
3
4
  *
4
5
  * pa_vendor__c <- vendor profile and risk tier
5
6
  * pa_contract__c <- vendor agreement and spend ceiling
@@ -12,28 +13,25 @@
12
13
  * > examples/manifest/procurement-approval-hub/manifest.json
13
14
  */
14
15
 
16
+ import { toCustomCategoryApiName } from '@rippling/rippling-sdk/core/platform/custom-objects';
15
17
  import {
16
- Category,
17
- CustomObject,
18
- CustomObjectFieldSection,
19
- CustomObjectPageLayout,
20
- DateField,
21
- EmailField,
22
- FormulaField,
23
- ListViewDef,
24
- LongTextField,
25
- LookupField,
26
- ManifestBuilder,
27
- ManifestFunction,
28
- NumberField,
29
- ParentChildField,
30
- Rule,
31
- RadioField,
32
- SummaryField,
33
- TextField,
34
- Validation,
35
- Workflow,
36
- } from '@rippling/rippling-sdk/lib/manifest';
18
+ customObjectLifecycle,
19
+ defineBasicTypedPageLayout,
20
+ defineTypedListView,
21
+ defineTypedRule,
22
+ defineTypedValidation,
23
+ defineTypedWorkflowFromFunctionFile,
24
+ registerManifestCustomObjects,
25
+ } from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
26
+ import { Category, ManifestBuilder, SummaryField } from '@rippling/rippling-sdk/lib/manifest';
27
+ import {
28
+ approvalDefinition,
29
+ contractDefinition,
30
+ invoiceDefinition,
31
+ PROCUREMENT_CATEGORY,
32
+ requestDefinition,
33
+ vendorDefinition,
34
+ } from './schema';
37
35
 
38
36
  const manifest = new ManifestBuilder({
39
37
  key: 'procurement_approval_hub',
@@ -42,513 +40,229 @@ const manifest = new ManifestBuilder({
42
40
  });
43
41
 
44
42
  const category = new Category(manifest, {
45
- apiName: 'procurement__c',
43
+ apiName: toCustomCategoryApiName(PROCUREMENT_CATEGORY),
46
44
  name: 'Procurement',
47
45
  description: 'Procurement workflow and vendor governance records',
48
46
  });
49
47
 
50
- const vendorObj = new CustomObject(manifest, {
51
- apiName: 'pa_vendor__c',
52
- name: 'Vendor',
53
- pluralLabel: 'Vendors',
54
- category,
55
- description: 'Vendor profile, risk tier, and compliance owner',
56
- });
57
-
58
- const vendorSection = new CustomObjectFieldSection(vendorObj, {
59
- name: 'Vendor',
60
- sectionId: 'sec_pa_vendor',
61
- });
62
-
63
- const vendorLegalNameField = new TextField(vendorObj, {
64
- apiName: 'legal_name__c',
65
- displayName: 'Legal name',
66
- description: 'Registered legal vendor name',
67
- required: true,
68
- maxLength: 200,
69
- section: vendorSection,
70
- });
71
-
72
- const vendorCategoryField = new RadioField(vendorObj, {
73
- apiName: 'vendor_category__c',
74
- displayName: 'Vendor category',
75
- description: 'Primary spend category',
76
- options: ['Software', 'Facilities', 'Professional services', 'Marketing', 'Hardware', 'Other'],
77
- required: true,
78
- section: vendorSection,
79
- });
80
-
81
- const vendorRiskField = new RadioField(vendorObj, {
82
- apiName: 'risk_tier__c',
83
- displayName: 'Risk tier',
84
- description: 'Risk tier from diligence review',
85
- options: ['Low', 'Medium', 'High', 'Critical'],
86
- required: true,
87
- section: vendorSection,
88
- });
89
-
90
- const vendorContactEmailField = new EmailField(vendorObj, {
91
- apiName: 'contact_email__c',
92
- displayName: 'Contact email',
93
- description: 'Primary vendor contact email',
94
- section: vendorSection,
95
- });
96
-
97
- const contractObj = new CustomObject(manifest, {
98
- apiName: 'pa_contract__c',
99
- name: 'Contract',
100
- pluralLabel: 'Contracts',
101
- category,
102
- description: 'Vendor contract with dates, status, and spend ceiling',
103
- });
104
-
105
- const contractSection = new CustomObjectFieldSection(contractObj, {
106
- name: 'Contract',
107
- sectionId: 'sec_pa_contract',
108
- });
109
-
110
- const contractVendorRef = new ParentChildField(contractObj, {
111
- apiName: 'vendor_ref__c',
112
- displayName: 'Vendor',
113
- target: vendorObj,
114
- relatedDataLabel: 'Contracts',
115
- parentChildType: 'PRIMARY',
116
- enableParentOwnerInheritance: false,
117
- description: 'Vendor this contract belongs to',
118
- section: contractSection,
119
- });
120
-
121
- const contractStatusField = new RadioField(contractObj, {
122
- apiName: 'status__c',
123
- displayName: 'Status',
124
- description: 'Contract lifecycle status',
125
- options: ['Draft', 'In review', 'Active', 'Expired', 'Terminated'],
126
- required: true,
127
- section: contractSection,
128
- });
129
-
130
- const contractStartDateField = new DateField(contractObj, {
131
- apiName: 'start_date__c',
132
- displayName: 'Start date',
133
- description: 'Contract effective date',
134
- section: contractSection,
135
- });
136
-
137
- const contractEndDateField = new DateField(contractObj, {
138
- apiName: 'end_date__c',
139
- displayName: 'End date',
140
- description: 'Contract expiration date',
141
- section: contractSection,
142
- });
143
-
144
- const contractCeilingCentsField = new NumberField(contractObj, {
145
- apiName: 'spend_ceiling_cents__c',
146
- displayName: 'Spend ceiling (cents)',
147
- description: 'Approved maximum spend in cents',
148
- decimalPlaces: 0,
149
- section: contractSection,
150
- });
151
-
152
- const contractTermsField = new LongTextField(contractObj, {
153
- apiName: 'key_terms__c',
154
- displayName: 'Key terms',
155
- description: 'Renewal, data processing, and termination notes',
156
- maxLength: 6000,
157
- section: contractSection,
158
- });
159
-
160
- const requestObj = new CustomObject(manifest, {
161
- apiName: 'pa_purchase_request__c',
162
- name: 'Purchase request',
163
- pluralLabel: 'Purchase requests',
48
+ const [vendor, contract, request, approval, invoice] = registerManifestCustomObjects(manifest, {
164
49
  category,
165
- description: 'Purchase request with business justification and approval state',
50
+ definitions: [
51
+ vendorDefinition,
52
+ contractDefinition,
53
+ requestDefinition,
54
+ approvalDefinition,
55
+ invoiceDefinition,
56
+ ] as const,
166
57
  });
167
58
 
168
- const requestSection = new CustomObjectFieldSection(requestObj, {
169
- name: 'Purchase request',
170
- sectionId: 'sec_pa_request',
171
- });
172
-
173
- const requestVendorRef = new LookupField(requestObj, {
174
- apiName: 'vendor_ref__c',
175
- displayName: 'Vendor',
176
- target: vendorObj,
177
- relatedDataLabel: 'Purchase requests',
178
- description: 'Preferred or selected vendor',
179
- required: true,
180
- section: requestSection,
181
- });
182
-
183
- const requestContractRef = new LookupField(requestObj, {
184
- apiName: 'contract_ref__c',
185
- displayName: 'Contract',
186
- target: contractObj,
187
- relatedDataLabel: 'Purchase requests',
188
- description: 'Contract used for this request, if any',
189
- section: requestSection,
190
- });
191
-
192
- const requestAmountCentsField = new NumberField(requestObj, {
193
- apiName: 'amount_cents__c',
194
- displayName: 'Amount (cents)',
195
- description: 'Requested spend amount in cents',
196
- decimalPlaces: 0,
197
- required: true,
198
- section: requestSection,
199
- });
200
-
201
- const requestStatusField = new RadioField(requestObj, {
202
- apiName: 'status__c',
203
- displayName: 'Status',
204
- description: 'Approval status',
205
- options: ['Draft', 'Submitted', 'In approval', 'Approved', 'Rejected', 'Ordered'],
206
- required: true,
207
- section: requestSection,
208
- });
209
-
210
- const requestNeedByField = new DateField(requestObj, {
211
- apiName: 'need_by__c',
212
- displayName: 'Need by',
213
- description: 'Requested delivery or purchase date',
214
- section: requestSection,
215
- });
216
-
217
- const requestJustificationField = new LongTextField(requestObj, {
218
- apiName: 'business_justification__c',
219
- displayName: 'Business justification',
220
- description: 'Why the purchase is needed',
221
- maxLength: 6000,
222
- section: requestSection,
223
- });
224
-
225
- const approvalObj = new CustomObject(manifest, {
226
- apiName: 'pa_approval_step__c',
227
- name: 'Approval step',
228
- pluralLabel: 'Approval steps',
229
- category,
230
- description: 'Approval routing line tied to a purchase request',
231
- });
232
-
233
- const approvalSection = new CustomObjectFieldSection(approvalObj, {
234
- name: 'Approval step',
235
- sectionId: 'sec_pa_approval',
236
- });
237
-
238
- const approvalRequestRef = new ParentChildField(approvalObj, {
239
- apiName: 'purchase_request_ref__c',
240
- displayName: 'Purchase request',
241
- target: requestObj,
242
- relatedDataLabel: 'Approval steps',
243
- parentChildType: 'PRIMARY',
244
- enableParentOwnerInheritance: true,
245
- description: 'Purchase request this approval belongs to',
246
- section: approvalSection,
247
- });
248
-
249
- const approvalSequenceField = new NumberField(approvalObj, {
250
- apiName: 'sequence__c',
251
- displayName: 'Sequence',
252
- description: 'Approval sequence number',
253
- decimalPlaces: 0,
254
- required: true,
255
- section: approvalSection,
256
- });
257
-
258
- const approvalRoleField = new RadioField(approvalObj, {
259
- apiName: 'approval_role__c',
260
- displayName: 'Approval role',
261
- description: 'Approval lane',
262
- options: ['Budget owner', 'Finance', 'Security', 'Legal', 'Procurement'],
263
- required: true,
264
- section: approvalSection,
265
- });
266
-
267
- const approvalStatusField = new RadioField(approvalObj, {
268
- apiName: 'status__c',
269
- displayName: 'Status',
270
- description: 'Approval step status',
271
- options: ['Pending', 'Approved', 'Rejected', 'Skipped'],
272
- required: true,
273
- section: approvalSection,
274
- });
275
-
276
- const invoiceObj = new CustomObject(manifest, {
277
- apiName: 'pa_invoice__c',
278
- name: 'Invoice',
279
- pluralLabel: 'Invoices',
280
- category,
281
- description: 'Invoice received against a vendor contract',
282
- });
283
-
284
- const invoiceSection = new CustomObjectFieldSection(invoiceObj, {
285
- name: 'Invoice',
286
- sectionId: 'sec_pa_invoice',
287
- });
288
-
289
- const invoiceContractRef = new ParentChildField(invoiceObj, {
290
- apiName: 'contract_ref__c',
291
- displayName: 'Contract',
292
- target: contractObj,
293
- relatedDataLabel: 'Invoices',
294
- parentChildType: 'PRIMARY',
295
- enableParentOwnerInheritance: false,
296
- description: 'Contract this invoice is billed against',
297
- section: invoiceSection,
298
- });
299
-
300
- const invoiceNumberField = new TextField(invoiceObj, {
301
- apiName: 'invoice_number__c',
302
- displayName: 'Invoice number',
303
- description: 'Vendor invoice number',
304
- maxLength: 120,
305
- required: true,
306
- section: invoiceSection,
307
- });
308
-
309
- const invoiceAmountCentsField = new NumberField(invoiceObj, {
310
- apiName: 'amount_cents__c',
311
- displayName: 'Amount (cents)',
312
- description: 'Invoice amount in cents',
313
- decimalPlaces: 0,
314
- required: true,
315
- section: invoiceSection,
316
- });
317
-
318
- const invoiceStatusField = new RadioField(invoiceObj, {
319
- apiName: 'status__c',
320
- displayName: 'Status',
321
- description: 'Invoice processing status',
322
- options: ['Received', 'Matched', 'Approved', 'Paid', 'Exception'],
323
- required: true,
324
- section: invoiceSection,
325
- });
326
-
327
- const contractCountOnVendor = new SummaryField(vendorObj, {
59
+ const contractCountOnVendor = new SummaryField(vendor.object, {
328
60
  apiName: 'contract_count__c',
329
61
  displayName: 'Contracts',
330
- aggregates: contractStatusField,
62
+ aggregates: contract.fields.status,
331
63
  using: 'COUNT',
332
- lookup: contractVendorRef,
64
+ lookup: contract.fields.vendor_ref,
333
65
  description: 'Contracts for this vendor',
334
- section: vendorSection,
66
+ section: vendor.sections.vendor,
335
67
  });
336
68
 
337
- const approvalCountOnRequest = new SummaryField(requestObj, {
69
+ const approvalCountOnRequest = new SummaryField(request.object, {
338
70
  apiName: 'approval_step_count__c',
339
71
  displayName: 'Approval steps',
340
- aggregates: approvalRoleField,
72
+ aggregates: approval.fields.approval_role,
341
73
  using: 'COUNT',
342
- lookup: approvalRequestRef,
74
+ lookup: approval.fields.purchase_request_ref,
343
75
  description: 'Approval steps attached to this request',
344
- section: requestSection,
76
+ section: request.sections.request,
345
77
  });
346
78
 
347
- const invoicedAmountOnContract = new SummaryField(contractObj, {
79
+ const invoicedAmountOnContract = new SummaryField(contract.object, {
348
80
  apiName: 'invoiced_amount_cents__c',
349
81
  displayName: 'Invoiced amount (cents)',
350
- aggregates: invoiceAmountCentsField,
82
+ aggregates: invoice.fields.amount_cents,
351
83
  using: 'SUM',
352
- lookup: invoiceContractRef,
84
+ lookup: invoice.fields.contract_ref,
353
85
  description: 'Total invoice amount billed against this contract',
354
- section: contractSection,
355
- });
356
-
357
- const requestLabelField = new FormulaField(requestObj, {
358
- apiName: 'approval_label__c',
359
- displayName: 'Approval label',
360
- description: 'Status and amount for approval queues',
361
- fieldType: 'TEXT',
362
- maxLength: 240,
363
- formula: "CONCATENATE(status__c, ' - ', amount_cents__c)",
364
- section: requestSection,
86
+ section: contract.sections.contract,
365
87
  });
366
88
 
367
- new Validation(contractObj, {
89
+ // ── Validations & defaults ────────────────────────────────────────────────
90
+ defineTypedValidation(contract, {
368
91
  ruleId: 'pa_contract_end_after_start',
369
92
  displayName: 'Contract end must be after start',
370
- rqlFormula: '(end_date__c <= start_date__c)',
93
+ whenInvalid: (c) => c.where('end_date').lte(c.fields.start_date),
371
94
  errorMessage: 'Contract end date must be after start date.',
372
95
  ruleDescription: 'Prevents inverted contract terms',
373
96
  state: 'ACTIVE',
374
97
  level: 'FIELD',
375
- fieldRef: contractEndDateField,
98
+ field: 'end_date',
376
99
  });
377
100
 
378
- new Validation(requestObj, {
101
+ defineTypedValidation(request, {
379
102
  ruleId: 'pa_request_amount_positive',
380
103
  displayName: 'Request amount must be positive',
381
- rqlFormula: '(amount_cents__c <= 0)',
104
+ whenInvalid: (c) => c.where('amount_cents').lte(0),
382
105
  errorMessage: 'Amount must be greater than zero.',
383
106
  ruleDescription: 'Blocks zero-value purchase requests',
384
107
  state: 'ACTIVE',
385
108
  level: 'FIELD',
386
- fieldRef: requestAmountCentsField,
109
+ field: 'amount_cents',
387
110
  });
388
111
 
389
- new Rule(requestObj, {
112
+ defineTypedRule(request, {
390
113
  flowId: 'pa_default_request_status',
391
114
  flowName: 'Default purchase request status',
392
115
  triggerType: 'CREATE',
393
116
  description: 'New purchase requests start as Draft',
394
- actions: [{ targetField: requestStatusField, fixedValue: 'Draft' }],
117
+ actions: (rules) => [rules.setField('status').toValue('Draft')],
395
118
  });
396
119
 
397
- new Rule(approvalObj, {
120
+ defineTypedRule(approval, {
398
121
  flowId: 'pa_default_approval_status',
399
122
  flowName: 'Default approval step status',
400
123
  triggerType: 'CREATE',
401
124
  description: 'New approval steps start Pending',
402
- actions: [{ targetField: approvalStatusField, fixedValue: 'Pending' }],
125
+ actions: (rules) => [rules.setField('status').toValue('Pending')],
403
126
  });
404
127
 
405
- new ListViewDef(vendorObj, {
128
+ // ── List views ─────────────────────────────────────────────────────────────
129
+ defineTypedListView(vendor, {
406
130
  viewId: 'view_pa_vendors',
407
131
  name: 'Vendors',
408
132
  description: 'Vendor directory with risk and contract count',
409
- fields: [
410
- 'name',
411
- vendorLegalNameField,
412
- vendorCategoryField,
413
- vendorRiskField,
414
- vendorContactEmailField,
415
- contractCountOnVendor,
416
- ],
417
- orderBy: vendorLegalNameField,
133
+ fields: ['name', 'legal_name', 'vendor_category', 'risk_tier', 'contact_email', contractCountOnVendor],
134
+ orderBy: 'legal_name',
418
135
  sortOrder: 'ASC',
419
136
  isPublic: true,
420
137
  objectScope: 'all',
421
138
  });
422
139
 
423
- new ListViewDef(contractObj, {
140
+ defineTypedListView(contract, {
424
141
  viewId: 'view_pa_contracts',
425
142
  name: 'Contracts',
426
143
  description: 'Contract inventory with dates and invoiced amount',
427
144
  fields: [
428
145
  'name',
429
- contractVendorRef,
430
- contractStatusField,
431
- contractStartDateField,
432
- contractEndDateField,
433
- contractCeilingCentsField,
146
+ 'vendor_ref',
147
+ 'status',
148
+ 'start_date',
149
+ 'end_date',
150
+ 'spend_ceiling_cents',
434
151
  invoicedAmountOnContract,
435
152
  ],
436
- orderBy: contractEndDateField,
153
+ orderBy: 'end_date',
437
154
  sortOrder: 'ASC',
438
155
  isPublic: true,
439
156
  objectScope: 'all',
440
157
  });
441
158
 
442
- new ListViewDef(requestObj, {
159
+ defineTypedListView(request, {
443
160
  viewId: 'view_pa_purchase_requests',
444
161
  name: 'Purchase requests',
445
162
  description: 'Approval queue for purchase requests',
446
163
  fields: [
447
164
  'name',
448
- requestVendorRef,
449
- requestContractRef,
450
- requestAmountCentsField,
451
- requestStatusField,
452
- requestNeedByField,
165
+ 'vendor_ref',
166
+ 'contract_ref',
167
+ 'amount_cents',
168
+ 'status',
169
+ 'need_by',
453
170
  approvalCountOnRequest,
454
- requestLabelField,
171
+ 'approval_label',
455
172
  ],
456
- orderBy: requestNeedByField,
173
+ orderBy: 'need_by',
457
174
  sortOrder: 'ASC',
458
175
  isPublic: true,
459
176
  objectScope: 'all',
177
+ filter: (c) => c.where('status').in(['Submitted', 'In approval']),
460
178
  });
461
179
 
462
- new ListViewDef(approvalObj, {
180
+ defineTypedListView(approval, {
463
181
  viewId: 'view_pa_approval_steps',
464
182
  name: 'Approval steps',
465
183
  description: 'Approval routing lines by request',
466
- fields: ['name', approvalRequestRef, approvalSequenceField, approvalRoleField, approvalStatusField],
467
- orderBy: approvalSequenceField,
184
+ fields: ['name', 'purchase_request_ref', 'sequence', 'approval_role', 'status'],
185
+ orderBy: 'sequence',
468
186
  sortOrder: 'ASC',
469
187
  isPublic: true,
470
188
  objectScope: 'all',
189
+ filter: (c) => c.where('status').eq('Pending'),
471
190
  });
472
191
 
473
- new ListViewDef(invoiceObj, {
192
+ defineTypedListView(invoice, {
474
193
  viewId: 'view_pa_invoices',
475
194
  name: 'Invoices',
476
195
  description: 'Invoices received against contracts',
477
- fields: ['name', invoiceContractRef, invoiceNumberField, invoiceAmountCentsField, invoiceStatusField],
478
- orderBy: invoiceContractRef,
196
+ fields: ['name', 'contract_ref', 'invoice_number', 'amount_cents', 'status'],
197
+ orderBy: 'contract_ref',
479
198
  sortOrder: 'ASC',
480
199
  isPublic: true,
481
200
  objectScope: 'all',
482
201
  });
483
202
 
484
- CustomObjectPageLayout.basic(vendorObj, {
485
- section: vendorSection,
486
- fields: [
487
- 'name',
488
- vendorLegalNameField,
489
- vendorCategoryField,
490
- vendorRiskField,
491
- vendorContactEmailField,
492
- contractCountOnVendor,
493
- ],
203
+ // ── Page layouts ───────────────────────────────────────────────────────────
204
+ defineBasicTypedPageLayout(vendor, {
205
+ section: vendor.sections.vendor,
206
+ fields: ['name', 'legal_name', 'vendor_category', 'risk_tier', 'contact_email', contractCountOnVendor],
494
207
  });
495
208
 
496
- CustomObjectPageLayout.basic(contractObj, {
497
- section: contractSection,
209
+ defineBasicTypedPageLayout(contract, {
210
+ section: contract.sections.contract,
498
211
  fields: [
499
212
  'name',
500
- contractVendorRef,
501
- contractStatusField,
502
- contractStartDateField,
503
- contractEndDateField,
504
- contractCeilingCentsField,
213
+ 'vendor_ref',
214
+ 'status',
215
+ 'start_date',
216
+ 'end_date',
217
+ 'spend_ceiling_cents',
505
218
  invoicedAmountOnContract,
506
- contractTermsField,
219
+ 'key_terms',
507
220
  ],
508
221
  });
509
222
 
510
- CustomObjectPageLayout.basic(requestObj, {
511
- section: requestSection,
223
+ defineBasicTypedPageLayout(request, {
224
+ section: request.sections.request,
512
225
  fields: [
513
226
  'name',
514
- requestVendorRef,
515
- requestContractRef,
516
- requestAmountCentsField,
517
- requestStatusField,
518
- requestNeedByField,
227
+ 'vendor_ref',
228
+ 'contract_ref',
229
+ 'amount_cents',
230
+ 'status',
231
+ 'need_by',
519
232
  approvalCountOnRequest,
520
- requestLabelField,
521
- requestJustificationField,
233
+ 'approval_label',
234
+ 'business_justification',
522
235
  ],
523
236
  });
524
237
 
525
- CustomObjectPageLayout.basic(approvalObj, {
526
- section: approvalSection,
527
- fields: ['name', approvalRequestRef, approvalSequenceField, approvalRoleField, approvalStatusField],
528
- });
529
-
530
- CustomObjectPageLayout.basic(invoiceObj, {
531
- section: invoiceSection,
532
- fields: ['name', invoiceContractRef, invoiceNumberField, invoiceAmountCentsField, invoiceStatusField],
238
+ defineBasicTypedPageLayout(approval, {
239
+ section: approval.sections.approval,
240
+ fields: ['name', 'purchase_request_ref', 'sequence', 'approval_role', 'status'],
533
241
  });
534
242
 
535
- const routeApprovalFunction = new ManifestFunction(manifest, {
536
- apiName: 'pa_route_purchase_request_fn',
537
- name: 'Route purchase request approvals',
538
- description: 'Function invoked by workflow when a purchase request is submitted',
243
+ defineBasicTypedPageLayout(invoice, {
244
+ section: invoice.sections.invoice,
245
+ fields: ['name', 'contract_ref', 'invoice_number', 'amount_cents', 'status'],
539
246
  });
540
247
 
541
- new Workflow(manifest, {
248
+ // ── Workflow ───────────────────────────────────────────────────────────────
249
+ defineTypedWorkflowFromFunctionFile(manifest, {
250
+ function: {
251
+ apiName: 'pa_route_purchase_request_fn',
252
+ name: 'Route purchase request approvals',
253
+ description: 'Function invoked by workflow when a purchase request is submitted',
254
+ codeDirectory: __dirname,
255
+ codeFilename: 'functions/route-purchase-request.ts',
256
+ dependencies: {
257
+ '@rippling/rippling-sdk': '^0.2.0-alpha.78',
258
+ },
259
+ },
542
260
  definitionId: 'pa_purchase_request_submitted_workflow',
543
261
  title: 'Purchase request submitted',
544
- description: 'Routes purchase requests into approval steps when request records are created',
545
- function: routeApprovalFunction,
546
- trigger: {
547
- automation_event_type: 'AUTOMATION_EVENT_TYPE_RECORD_CHANGE',
548
- og_module: 'custom_objects',
549
- base_model: requestObj.getApiName(),
550
- record_change_operation_type: 'RECORD_CHANGE_OPERATION_TYPE_CREATE',
551
- },
262
+ description: 'Routes purchase requests into approval steps when request records are submitted',
263
+ trigger: customObjectLifecycle(request)
264
+ .onCreateOrUpdate()
265
+ .when((c) => c.where('status').eq('Submitted')),
552
266
  });
553
267
 
554
268
  console.log(manifest.preview());