@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.
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/core/platform/custom-objects/category.d.mts +125 -0
- package/core/platform/custom-objects/category.d.mts.map +1 -0
- package/core/platform/custom-objects/category.d.ts +125 -0
- package/core/platform/custom-objects/category.d.ts.map +1 -0
- package/core/platform/custom-objects/category.js +188 -0
- package/core/platform/custom-objects/category.js.map +1 -0
- package/core/platform/custom-objects/category.mjs +178 -0
- package/core/platform/custom-objects/category.mjs.map +1 -0
- package/core/platform/custom-objects/definition.d.mts +147 -0
- package/core/platform/custom-objects/definition.d.mts.map +1 -0
- package/core/platform/custom-objects/definition.d.ts +147 -0
- package/core/platform/custom-objects/definition.d.ts.map +1 -0
- package/core/platform/custom-objects/definition.js +200 -0
- package/core/platform/custom-objects/definition.js.map +1 -0
- package/core/platform/custom-objects/definition.mjs +190 -0
- package/core/platform/custom-objects/definition.mjs.map +1 -0
- package/core/platform/custom-objects/fields.d.mts +302 -0
- package/core/platform/custom-objects/fields.d.mts.map +1 -0
- package/core/platform/custom-objects/fields.d.ts +302 -0
- package/core/platform/custom-objects/fields.d.ts.map +1 -0
- package/core/platform/custom-objects/fields.js +369 -0
- package/core/platform/custom-objects/fields.js.map +1 -0
- package/core/platform/custom-objects/fields.mjs +347 -0
- package/core/platform/custom-objects/fields.mjs.map +1 -0
- package/core/platform/custom-objects/function-runtime.d.mts +42 -0
- package/core/platform/custom-objects/function-runtime.d.mts.map +1 -0
- package/core/platform/custom-objects/function-runtime.d.ts +42 -0
- package/core/platform/custom-objects/function-runtime.d.ts.map +1 -0
- package/core/platform/custom-objects/function-runtime.js +38 -0
- package/core/platform/custom-objects/function-runtime.js.map +1 -0
- package/core/platform/custom-objects/function-runtime.mjs +35 -0
- package/core/platform/custom-objects/function-runtime.mjs.map +1 -0
- package/core/platform/custom-objects/lifecycle.d.mts +83 -0
- package/core/platform/custom-objects/lifecycle.d.mts.map +1 -0
- package/core/platform/custom-objects/lifecycle.d.ts +83 -0
- package/core/platform/custom-objects/lifecycle.d.ts.map +1 -0
- package/core/platform/custom-objects/lifecycle.js +372 -0
- package/core/platform/custom-objects/lifecycle.js.map +1 -0
- package/core/platform/custom-objects/lifecycle.mjs +367 -0
- package/core/platform/custom-objects/lifecycle.mjs.map +1 -0
- package/core/platform/custom-objects/manager.d.mts +354 -0
- package/core/platform/custom-objects/manager.d.mts.map +1 -0
- package/core/platform/custom-objects/manager.d.ts +354 -0
- package/core/platform/custom-objects/manager.d.ts.map +1 -0
- package/core/platform/custom-objects/manager.js +646 -0
- package/core/platform/custom-objects/manager.js.map +1 -0
- package/core/platform/custom-objects/manager.mjs +637 -0
- package/core/platform/custom-objects/manager.mjs.map +1 -0
- package/core/platform/custom-objects/provisioning.d.mts +138 -0
- package/core/platform/custom-objects/provisioning.d.mts.map +1 -0
- package/core/platform/custom-objects/provisioning.d.ts +138 -0
- package/core/platform/custom-objects/provisioning.d.ts.map +1 -0
- package/core/platform/custom-objects/provisioning.js +455 -0
- package/core/platform/custom-objects/provisioning.js.map +1 -0
- package/core/platform/custom-objects/provisioning.mjs +447 -0
- package/core/platform/custom-objects/provisioning.mjs.map +1 -0
- package/core/platform/custom-objects/rql.d.mts +122 -0
- package/core/platform/custom-objects/rql.d.mts.map +1 -0
- package/core/platform/custom-objects/rql.d.ts +122 -0
- package/core/platform/custom-objects/rql.d.ts.map +1 -0
- package/core/platform/custom-objects/rql.js +225 -0
- package/core/platform/custom-objects/rql.js.map +1 -0
- package/core/platform/custom-objects/rql.mjs +222 -0
- package/core/platform/custom-objects/rql.mjs.map +1 -0
- package/core/platform/custom-objects/schema-manager.d.mts +203 -0
- package/core/platform/custom-objects/schema-manager.d.mts.map +1 -0
- package/core/platform/custom-objects/schema-manager.d.ts +203 -0
- package/core/platform/custom-objects/schema-manager.d.ts.map +1 -0
- package/core/platform/custom-objects/schema-manager.js +256 -0
- package/core/platform/custom-objects/schema-manager.js.map +1 -0
- package/core/platform/custom-objects/schema-manager.mjs +249 -0
- package/core/platform/custom-objects/schema-manager.mjs.map +1 -0
- package/core/platform/custom-objects/typed-rql.d.mts +157 -0
- package/core/platform/custom-objects/typed-rql.d.mts.map +1 -0
- package/core/platform/custom-objects/typed-rql.d.ts +157 -0
- package/core/platform/custom-objects/typed-rql.d.ts.map +1 -0
- package/core/platform/custom-objects/typed-rql.js +583 -0
- package/core/platform/custom-objects/typed-rql.js.map +1 -0
- package/core/platform/custom-objects/typed-rql.mjs +580 -0
- package/core/platform/custom-objects/typed-rql.mjs.map +1 -0
- package/core/platform/custom-objects/types.d.mts +549 -0
- package/core/platform/custom-objects/types.d.mts.map +1 -0
- package/core/platform/custom-objects/types.d.ts +549 -0
- package/core/platform/custom-objects/types.d.ts.map +1 -0
- package/core/platform/custom-objects/types.js +20 -0
- package/core/platform/custom-objects/types.js.map +1 -0
- package/core/platform/custom-objects/types.mjs +17 -0
- package/core/platform/custom-objects/types.mjs.map +1 -0
- package/core/platform/custom-objects/validation.d.mts +97 -0
- package/core/platform/custom-objects/validation.d.mts.map +1 -0
- package/core/platform/custom-objects/validation.d.ts +97 -0
- package/core/platform/custom-objects/validation.d.ts.map +1 -0
- package/core/platform/custom-objects/validation.js +477 -0
- package/core/platform/custom-objects/validation.js.map +1 -0
- package/core/platform/custom-objects/validation.mjs +465 -0
- package/core/platform/custom-objects/validation.mjs.map +1 -0
- package/core/platform/custom-objects.d.mts +67 -0
- package/core/platform/custom-objects.d.mts.map +1 -0
- package/core/platform/custom-objects.d.ts +67 -0
- package/core/platform/custom-objects.d.ts.map +1 -0
- package/core/platform/custom-objects.js +118 -0
- package/core/platform/custom-objects.js.map +1 -0
- package/core/platform/custom-objects.mjs +45 -0
- package/core/platform/custom-objects.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/action.d.mts +58 -0
- package/core/platform/manifest/custom-objects/action.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/action.d.ts +58 -0
- package/core/platform/manifest/custom-objects/action.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/action.js +44 -0
- package/core/platform/manifest/custom-objects/action.js.map +1 -0
- package/core/platform/manifest/custom-objects/action.mjs +40 -0
- package/core/platform/manifest/custom-objects/action.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.d.mts +240 -0
- package/core/platform/manifest/custom-objects/conditions.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.d.ts +240 -0
- package/core/platform/manifest/custom-objects/conditions.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.js +326 -0
- package/core/platform/manifest/custom-objects/conditions.js.map +1 -0
- package/core/platform/manifest/custom-objects/conditions.mjs +321 -0
- package/core/platform/manifest/custom-objects/conditions.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/existing.d.mts +87 -0
- package/core/platform/manifest/custom-objects/existing.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/existing.d.ts +87 -0
- package/core/platform/manifest/custom-objects/existing.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/existing.js +113 -0
- package/core/platform/manifest/custom-objects/existing.js.map +1 -0
- package/core/platform/manifest/custom-objects/existing.mjs +109 -0
- package/core/platform/manifest/custom-objects/existing.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.mts +48 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.ts +48 -0
- package/core/platform/manifest/custom-objects/field-resolution.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.js +61 -0
- package/core/platform/manifest/custom-objects/field-resolution.js.map +1 -0
- package/core/platform/manifest/custom-objects/field-resolution.mjs +58 -0
- package/core/platform/manifest/custom-objects/field-resolution.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.d.mts +87 -0
- package/core/platform/manifest/custom-objects/function-file.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.d.ts +87 -0
- package/core/platform/manifest/custom-objects/function-file.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.js +76 -0
- package/core/platform/manifest/custom-objects/function-file.js.map +1 -0
- package/core/platform/manifest/custom-objects/function-file.mjs +69 -0
- package/core/platform/manifest/custom-objects/function-file.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.d.mts +65 -0
- package/core/platform/manifest/custom-objects/list-view.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.d.ts +65 -0
- package/core/platform/manifest/custom-objects/list-view.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.js +33 -0
- package/core/platform/manifest/custom-objects/list-view.js.map +1 -0
- package/core/platform/manifest/custom-objects/list-view.mjs +30 -0
- package/core/platform/manifest/custom-objects/list-view.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.mts +43 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.ts +43 -0
- package/core/platform/manifest/custom-objects/object-list-page.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.js +54 -0
- package/core/platform/manifest/custom-objects/object-list-page.js.map +1 -0
- package/core/platform/manifest/custom-objects/object-list-page.mjs +50 -0
- package/core/platform/manifest/custom-objects/object-list-page.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.d.mts +142 -0
- package/core/platform/manifest/custom-objects/page-layout.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.d.ts +142 -0
- package/core/platform/manifest/custom-objects/page-layout.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.js +184 -0
- package/core/platform/manifest/custom-objects/page-layout.js.map +1 -0
- package/core/platform/manifest/custom-objects/page-layout.mjs +180 -0
- package/core/platform/manifest/custom-objects/page-layout.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/register.d.mts +87 -0
- package/core/platform/manifest/custom-objects/register.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/register.d.ts +87 -0
- package/core/platform/manifest/custom-objects/register.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/register.js +395 -0
- package/core/platform/manifest/custom-objects/register.js.map +1 -0
- package/core/platform/manifest/custom-objects/register.mjs +391 -0
- package/core/platform/manifest/custom-objects/register.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/rule.d.mts +113 -0
- package/core/platform/manifest/custom-objects/rule.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/rule.d.ts +113 -0
- package/core/platform/manifest/custom-objects/rule.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/rule.js +49 -0
- package/core/platform/manifest/custom-objects/rule.js.map +1 -0
- package/core/platform/manifest/custom-objects/rule.mjs +45 -0
- package/core/platform/manifest/custom-objects/rule.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.mts +214 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.ts +214 -0
- package/core/platform/manifest/custom-objects/sdui-page.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.js +194 -0
- package/core/platform/manifest/custom-objects/sdui-page.js.map +1 -0
- package/core/platform/manifest/custom-objects/sdui-page.mjs +182 -0
- package/core/platform/manifest/custom-objects/sdui-page.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.mts +28 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.ts +28 -0
- package/core/platform/manifest/custom-objects/typed-condition.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.js +434 -0
- package/core/platform/manifest/custom-objects/typed-condition.js.map +1 -0
- package/core/platform/manifest/custom-objects/typed-condition.mjs +431 -0
- package/core/platform/manifest/custom-objects/typed-condition.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/types.d.mts +29 -0
- package/core/platform/manifest/custom-objects/types.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/types.d.ts +29 -0
- package/core/platform/manifest/custom-objects/types.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/types.js +3 -0
- package/core/platform/manifest/custom-objects/types.js.map +1 -0
- package/core/platform/manifest/custom-objects/types.mjs +2 -0
- package/core/platform/manifest/custom-objects/types.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/validation.d.mts +44 -0
- package/core/platform/manifest/custom-objects/validation.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/validation.d.ts +44 -0
- package/core/platform/manifest/custom-objects/validation.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/validation.js +30 -0
- package/core/platform/manifest/custom-objects/validation.js.map +1 -0
- package/core/platform/manifest/custom-objects/validation.mjs +27 -0
- package/core/platform/manifest/custom-objects/validation.mjs.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.d.mts +47 -0
- package/core/platform/manifest/custom-objects/workflow.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.d.ts +47 -0
- package/core/platform/manifest/custom-objects/workflow.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.js +38 -0
- package/core/platform/manifest/custom-objects/workflow.js.map +1 -0
- package/core/platform/manifest/custom-objects/workflow.mjs +34 -0
- package/core/platform/manifest/custom-objects/workflow.mjs.map +1 -0
- package/core/platform/manifest/custom-objects.d.mts +85 -0
- package/core/platform/manifest/custom-objects.d.mts.map +1 -0
- package/core/platform/manifest/custom-objects.d.ts +85 -0
- package/core/platform/manifest/custom-objects.d.ts.map +1 -0
- package/core/platform/manifest/custom-objects.js +84 -0
- package/core/platform/manifest/custom-objects.js.map +1 -0
- package/core/platform/manifest/custom-objects.mjs +55 -0
- package/core/platform/manifest/custom-objects.mjs.map +1 -0
- package/examples/manifest/custom-object-creation-workflow/custom-object-creation-workflow.ts +26 -44
- package/examples/manifest/custom-object-creation-workflow/functions/intake-request-created.ts +20 -0
- package/examples/manifest/custom-object-creation-workflow/schema.ts +29 -0
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +142 -470
- package/examples/manifest/dental-practice-management/functions/chair-schedule.ts +13 -23
- package/examples/manifest/dental-practice-management/functions/complete-visit.ts +32 -55
- package/examples/manifest/dental-practice-management/functions/operatory-list.ts +13 -23
- package/examples/manifest/dental-practice-management/functions/patient-list.ts +13 -23
- package/examples/manifest/dental-practice-management/functions/treatment-plan-list.ts +13 -23
- package/examples/manifest/dental-practice-management/schema.ts +298 -0
- package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +68 -23
- package/examples/manifest/field-service-dispatch/field-service-dispatch.ts +102 -375
- package/examples/manifest/field-service-dispatch/schema.ts +248 -0
- package/examples/manifest/grant-program-management/grant-program-management.ts +125 -419
- package/examples/manifest/grant-program-management/schema.ts +269 -0
- package/examples/manifest/gym-membership-management/functions/check-in-desk.ts +13 -23
- package/examples/manifest/gym-membership-management/functions/member-list.ts +13 -23
- package/examples/manifest/gym-membership-management/functions/today-schedule.ts +13 -23
- package/examples/manifest/gym-membership-management/functions/trainer-list.ts +13 -23
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +92 -442
- package/examples/manifest/gym-membership-management/schema.ts +266 -0
- package/examples/manifest/procurement-approval-hub/functions/route-purchase-request.ts +20 -0
- package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +122 -408
- package/examples/manifest/procurement-approval-hub/schema.ts +256 -0
- package/examples/manifest/simple-todo-app/functions/mark-done.ts +16 -12
- package/examples/manifest/simple-todo-app/functions/todo-list.ts +13 -23
- package/examples/manifest/simple-todo-app/schema.ts +60 -0
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +40 -109
- package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +166 -193
- package/examples/manifest/todo-app-without-object-list-view/schema.ts +28 -0
- package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +24 -47
- package/package.json +7 -13
- package/resources/custom-objects/custom-objects.d.mts +7 -0
- package/resources/custom-objects/custom-objects.d.mts.map +1 -1
- package/resources/custom-objects/custom-objects.d.ts +7 -0
- package/resources/custom-objects/custom-objects.d.ts.map +1 -1
- package/resources/custom-objects/custom-objects.js.map +1 -1
- package/resources/custom-objects/custom-objects.mjs.map +1 -1
- package/resources/custom-objects/fields.d.mts +170 -15
- package/resources/custom-objects/fields.d.mts.map +1 -1
- package/resources/custom-objects/fields.d.ts +170 -15
- package/resources/custom-objects/fields.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/leave-program-evaluations.d.mts +510 -3
- package/resources/leave-program-evaluations.d.mts.map +1 -1
- package/resources/leave-program-evaluations.d.ts +510 -3
- package/resources/leave-program-evaluations.d.ts.map +1 -1
- package/resources/levels.d.mts +64 -2
- package/resources/levels.d.mts.map +1 -1
- package/resources/levels.d.ts +64 -2
- package/resources/levels.d.ts.map +1 -1
- package/resources/levels.js +22 -0
- package/resources/levels.js.map +1 -1
- package/resources/levels.mjs +22 -0
- package/resources/levels.mjs.map +1 -1
- package/resources/tracks.d.mts +45 -1
- package/resources/tracks.d.mts.map +1 -1
- package/resources/tracks.d.ts +45 -1
- package/resources/tracks.d.ts.map +1 -1
- package/resources/tracks.js +22 -0
- package/resources/tracks.js.map +1 -1
- package/resources/tracks.mjs +22 -0
- package/resources/tracks.mjs.map +1 -1
- package/src/client.ts +8 -0
- package/src/core/platform/README.md +20 -0
- package/src/core/platform/custom-objects/category.ts +294 -0
- package/src/core/platform/custom-objects/definition.ts +373 -0
- package/src/core/platform/custom-objects/fields.ts +653 -0
- package/src/core/platform/custom-objects/function-runtime.ts +76 -0
- package/src/core/platform/custom-objects/lifecycle.ts +557 -0
- package/src/core/platform/custom-objects/manager.ts +959 -0
- package/src/core/platform/custom-objects/provisioning.ts +672 -0
- package/src/core/platform/custom-objects/rql.ts +375 -0
- package/src/core/platform/custom-objects/schema-manager.ts +351 -0
- package/src/core/platform/custom-objects/typed-rql.ts +1273 -0
- package/src/core/platform/custom-objects/types.ts +753 -0
- package/src/core/platform/custom-objects/validation.ts +573 -0
- package/src/core/platform/custom-objects.ts +269 -0
- package/src/core/platform/manifest/README.md +26 -0
- package/src/core/platform/manifest/custom-objects/action.ts +87 -0
- package/src/core/platform/manifest/custom-objects/conditions.ts +762 -0
- package/src/core/platform/manifest/custom-objects/existing.ts +221 -0
- package/src/core/platform/manifest/custom-objects/field-resolution.ts +116 -0
- package/src/core/platform/manifest/custom-objects/function-file.ts +149 -0
- package/src/core/platform/manifest/custom-objects/list-view.ts +95 -0
- package/src/core/platform/manifest/custom-objects/object-list-page.ts +87 -0
- package/src/core/platform/manifest/custom-objects/page-layout.ts +380 -0
- package/src/core/platform/manifest/custom-objects/register.ts +555 -0
- package/src/core/platform/manifest/custom-objects/rule.ts +192 -0
- package/src/core/platform/manifest/custom-objects/sdui-page.ts +515 -0
- package/src/core/platform/manifest/custom-objects/typed-condition.ts +617 -0
- package/src/core/platform/manifest/custom-objects/types.ts +92 -0
- package/src/core/platform/manifest/custom-objects/validation.ts +70 -0
- package/src/core/platform/manifest/custom-objects/workflow.ts +71 -0
- package/src/core/platform/manifest/custom-objects.ts +203 -0
- package/src/pebble-sdui-web-custom-apps-shim.d.ts +3 -0
- package/src/resources/custom-objects/custom-objects.ts +8 -0
- package/src/resources/custom-objects/fields.ts +239 -14
- package/src/resources/index.ts +4 -0
- package/src/resources/leave-program-evaluations.ts +610 -3
- package/src/resources/levels.ts +93 -1
- package/src/resources/tracks.ts +70 -0
- package/src/tsconfig.json +1 -1
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
/*
|
|
2
|
-
* Procurement Approval Hub - vendors, contracts, purchase requests, approvals,
|
|
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
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
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:
|
|
43
|
+
apiName: toCustomCategoryApiName(PROCUREMENT_CATEGORY),
|
|
46
44
|
name: 'Procurement',
|
|
47
45
|
description: 'Procurement workflow and vendor governance records',
|
|
48
46
|
});
|
|
49
47
|
|
|
50
|
-
const
|
|
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
|
-
|
|
50
|
+
definitions: [
|
|
51
|
+
vendorDefinition,
|
|
52
|
+
contractDefinition,
|
|
53
|
+
requestDefinition,
|
|
54
|
+
approvalDefinition,
|
|
55
|
+
invoiceDefinition,
|
|
56
|
+
] as const,
|
|
166
57
|
});
|
|
167
58
|
|
|
168
|
-
const
|
|
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:
|
|
62
|
+
aggregates: contract.fields.status,
|
|
331
63
|
using: 'COUNT',
|
|
332
|
-
lookup:
|
|
64
|
+
lookup: contract.fields.vendor_ref,
|
|
333
65
|
description: 'Contracts for this vendor',
|
|
334
|
-
section:
|
|
66
|
+
section: vendor.sections.vendor,
|
|
335
67
|
});
|
|
336
68
|
|
|
337
|
-
const approvalCountOnRequest = new SummaryField(
|
|
69
|
+
const approvalCountOnRequest = new SummaryField(request.object, {
|
|
338
70
|
apiName: 'approval_step_count__c',
|
|
339
71
|
displayName: 'Approval steps',
|
|
340
|
-
aggregates:
|
|
72
|
+
aggregates: approval.fields.approval_role,
|
|
341
73
|
using: 'COUNT',
|
|
342
|
-
lookup:
|
|
74
|
+
lookup: approval.fields.purchase_request_ref,
|
|
343
75
|
description: 'Approval steps attached to this request',
|
|
344
|
-
section:
|
|
76
|
+
section: request.sections.request,
|
|
345
77
|
});
|
|
346
78
|
|
|
347
|
-
const invoicedAmountOnContract = new SummaryField(
|
|
79
|
+
const invoicedAmountOnContract = new SummaryField(contract.object, {
|
|
348
80
|
apiName: 'invoiced_amount_cents__c',
|
|
349
81
|
displayName: 'Invoiced amount (cents)',
|
|
350
|
-
aggregates:
|
|
82
|
+
aggregates: invoice.fields.amount_cents,
|
|
351
83
|
using: 'SUM',
|
|
352
|
-
lookup:
|
|
84
|
+
lookup: invoice.fields.contract_ref,
|
|
353
85
|
description: 'Total invoice amount billed against this contract',
|
|
354
|
-
section:
|
|
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
|
-
|
|
89
|
+
// ── Validations & defaults ────────────────────────────────────────────────
|
|
90
|
+
defineTypedValidation(contract, {
|
|
368
91
|
ruleId: 'pa_contract_end_after_start',
|
|
369
92
|
displayName: 'Contract end must be after start',
|
|
370
|
-
|
|
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
|
-
|
|
98
|
+
field: 'end_date',
|
|
376
99
|
});
|
|
377
100
|
|
|
378
|
-
|
|
101
|
+
defineTypedValidation(request, {
|
|
379
102
|
ruleId: 'pa_request_amount_positive',
|
|
380
103
|
displayName: 'Request amount must be positive',
|
|
381
|
-
|
|
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
|
-
|
|
109
|
+
field: 'amount_cents',
|
|
387
110
|
});
|
|
388
111
|
|
|
389
|
-
|
|
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:
|
|
117
|
+
actions: (rules) => [rules.setField('status').toValue('Draft')],
|
|
395
118
|
});
|
|
396
119
|
|
|
397
|
-
|
|
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:
|
|
125
|
+
actions: (rules) => [rules.setField('status').toValue('Pending')],
|
|
403
126
|
});
|
|
404
127
|
|
|
405
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
146
|
+
'vendor_ref',
|
|
147
|
+
'status',
|
|
148
|
+
'start_date',
|
|
149
|
+
'end_date',
|
|
150
|
+
'spend_ceiling_cents',
|
|
434
151
|
invoicedAmountOnContract,
|
|
435
152
|
],
|
|
436
|
-
orderBy:
|
|
153
|
+
orderBy: 'end_date',
|
|
437
154
|
sortOrder: 'ASC',
|
|
438
155
|
isPublic: true,
|
|
439
156
|
objectScope: 'all',
|
|
440
157
|
});
|
|
441
158
|
|
|
442
|
-
|
|
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
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
165
|
+
'vendor_ref',
|
|
166
|
+
'contract_ref',
|
|
167
|
+
'amount_cents',
|
|
168
|
+
'status',
|
|
169
|
+
'need_by',
|
|
453
170
|
approvalCountOnRequest,
|
|
454
|
-
|
|
171
|
+
'approval_label',
|
|
455
172
|
],
|
|
456
|
-
orderBy:
|
|
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
|
-
|
|
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',
|
|
467
|
-
orderBy:
|
|
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
|
-
|
|
192
|
+
defineTypedListView(invoice, {
|
|
474
193
|
viewId: 'view_pa_invoices',
|
|
475
194
|
name: 'Invoices',
|
|
476
195
|
description: 'Invoices received against contracts',
|
|
477
|
-
fields: ['name',
|
|
478
|
-
orderBy:
|
|
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
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
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
|
-
|
|
497
|
-
section:
|
|
209
|
+
defineBasicTypedPageLayout(contract, {
|
|
210
|
+
section: contract.sections.contract,
|
|
498
211
|
fields: [
|
|
499
212
|
'name',
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
213
|
+
'vendor_ref',
|
|
214
|
+
'status',
|
|
215
|
+
'start_date',
|
|
216
|
+
'end_date',
|
|
217
|
+
'spend_ceiling_cents',
|
|
505
218
|
invoicedAmountOnContract,
|
|
506
|
-
|
|
219
|
+
'key_terms',
|
|
507
220
|
],
|
|
508
221
|
});
|
|
509
222
|
|
|
510
|
-
|
|
511
|
-
section:
|
|
223
|
+
defineBasicTypedPageLayout(request, {
|
|
224
|
+
section: request.sections.request,
|
|
512
225
|
fields: [
|
|
513
226
|
'name',
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
227
|
+
'vendor_ref',
|
|
228
|
+
'contract_ref',
|
|
229
|
+
'amount_cents',
|
|
230
|
+
'status',
|
|
231
|
+
'need_by',
|
|
519
232
|
approvalCountOnRequest,
|
|
520
|
-
|
|
521
|
-
|
|
233
|
+
'approval_label',
|
|
234
|
+
'business_justification',
|
|
522
235
|
],
|
|
523
236
|
});
|
|
524
237
|
|
|
525
|
-
|
|
526
|
-
section:
|
|
527
|
-
fields: ['name',
|
|
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
|
-
|
|
536
|
-
|
|
537
|
-
|
|
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
|
-
|
|
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
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
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());
|