@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
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed custom-object schema definitions for the procurement approval hub example.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
date,
|
|
7
|
+
defineCustomObject,
|
|
8
|
+
email,
|
|
9
|
+
formula,
|
|
10
|
+
longText,
|
|
11
|
+
lookup,
|
|
12
|
+
number,
|
|
13
|
+
parentChild,
|
|
14
|
+
radio,
|
|
15
|
+
section,
|
|
16
|
+
text,
|
|
17
|
+
} from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
18
|
+
|
|
19
|
+
/** Logical category shared by the procurement approval hub example. */
|
|
20
|
+
export const PROCUREMENT_CATEGORY = 'procurement';
|
|
21
|
+
|
|
22
|
+
/** Vendor profile schema used for contract and request relationships. */
|
|
23
|
+
export const vendorDefinition = defineCustomObject({
|
|
24
|
+
name: 'pa_vendor',
|
|
25
|
+
displayName: 'Vendor',
|
|
26
|
+
pluralLabel: 'Vendors',
|
|
27
|
+
category: PROCUREMENT_CATEGORY,
|
|
28
|
+
description: 'Vendor profile, risk tier, and compliance owner',
|
|
29
|
+
sections: {
|
|
30
|
+
vendor: section('Vendor', { sectionId: 'sec_pa_vendor' }),
|
|
31
|
+
},
|
|
32
|
+
fields: {
|
|
33
|
+
legal_name: text({
|
|
34
|
+
displayName: 'Legal name',
|
|
35
|
+
description: 'Registered legal vendor name',
|
|
36
|
+
required: true,
|
|
37
|
+
maxLength: 200,
|
|
38
|
+
section: 'vendor',
|
|
39
|
+
}),
|
|
40
|
+
vendor_category: radio({
|
|
41
|
+
displayName: 'Vendor category',
|
|
42
|
+
description: 'Primary spend category',
|
|
43
|
+
options: ['Software', 'Facilities', 'Professional services', 'Marketing', 'Hardware', 'Other'],
|
|
44
|
+
required: true,
|
|
45
|
+
section: 'vendor',
|
|
46
|
+
}),
|
|
47
|
+
risk_tier: radio({
|
|
48
|
+
displayName: 'Risk tier',
|
|
49
|
+
description: 'Risk tier from diligence review',
|
|
50
|
+
options: ['Low', 'Medium', 'High', 'Critical'],
|
|
51
|
+
required: true,
|
|
52
|
+
section: 'vendor',
|
|
53
|
+
}),
|
|
54
|
+
contact_email: email({
|
|
55
|
+
displayName: 'Contact email',
|
|
56
|
+
description: 'Primary vendor contact email',
|
|
57
|
+
section: 'vendor',
|
|
58
|
+
}),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
/** Contract schema tied to a parent vendor. */
|
|
63
|
+
export const contractDefinition = defineCustomObject({
|
|
64
|
+
name: 'pa_contract',
|
|
65
|
+
displayName: 'Contract',
|
|
66
|
+
pluralLabel: 'Contracts',
|
|
67
|
+
category: PROCUREMENT_CATEGORY,
|
|
68
|
+
description: 'Vendor contract with dates, status, and spend ceiling',
|
|
69
|
+
sections: {
|
|
70
|
+
contract: section('Contract', { sectionId: 'sec_pa_contract' }),
|
|
71
|
+
},
|
|
72
|
+
fields: {
|
|
73
|
+
vendor_ref: parentChild(vendorDefinition, {
|
|
74
|
+
displayName: 'Vendor',
|
|
75
|
+
description: 'Vendor this contract belongs to',
|
|
76
|
+
relatedDataLabel: 'Contracts',
|
|
77
|
+
parentChildType: 'PRIMARY',
|
|
78
|
+
enableParentOwnerInheritance: false,
|
|
79
|
+
section: 'contract',
|
|
80
|
+
}),
|
|
81
|
+
status: radio({
|
|
82
|
+
displayName: 'Status',
|
|
83
|
+
description: 'Contract lifecycle status',
|
|
84
|
+
options: ['Draft', 'In review', 'Active', 'Expired', 'Terminated'],
|
|
85
|
+
required: true,
|
|
86
|
+
section: 'contract',
|
|
87
|
+
}),
|
|
88
|
+
start_date: date({
|
|
89
|
+
displayName: 'Start date',
|
|
90
|
+
description: 'Contract effective date',
|
|
91
|
+
section: 'contract',
|
|
92
|
+
}),
|
|
93
|
+
end_date: date({
|
|
94
|
+
displayName: 'End date',
|
|
95
|
+
description: 'Contract expiration date',
|
|
96
|
+
section: 'contract',
|
|
97
|
+
}),
|
|
98
|
+
spend_ceiling_cents: number({
|
|
99
|
+
displayName: 'Spend ceiling (cents)',
|
|
100
|
+
description: 'Approved maximum spend in cents',
|
|
101
|
+
decimalPlaces: 0,
|
|
102
|
+
section: 'contract',
|
|
103
|
+
}),
|
|
104
|
+
key_terms: longText({
|
|
105
|
+
displayName: 'Key terms',
|
|
106
|
+
description: 'Renewal, data processing, and termination notes',
|
|
107
|
+
maxLength: 6000,
|
|
108
|
+
section: 'contract',
|
|
109
|
+
}),
|
|
110
|
+
},
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
/** Purchase-request schema tied to a vendor and optional contract. */
|
|
114
|
+
export const requestDefinition = defineCustomObject({
|
|
115
|
+
name: 'pa_purchase_request',
|
|
116
|
+
displayName: 'Purchase request',
|
|
117
|
+
pluralLabel: 'Purchase requests',
|
|
118
|
+
category: PROCUREMENT_CATEGORY,
|
|
119
|
+
description: 'Purchase request with business justification and approval state',
|
|
120
|
+
sections: {
|
|
121
|
+
request: section('Purchase request', { sectionId: 'sec_pa_request' }),
|
|
122
|
+
},
|
|
123
|
+
fields: {
|
|
124
|
+
vendor_ref: lookup(vendorDefinition, {
|
|
125
|
+
displayName: 'Vendor',
|
|
126
|
+
description: 'Preferred or selected vendor',
|
|
127
|
+
relatedDataLabel: 'Purchase requests',
|
|
128
|
+
required: true,
|
|
129
|
+
section: 'request',
|
|
130
|
+
}),
|
|
131
|
+
contract_ref: lookup(contractDefinition, {
|
|
132
|
+
displayName: 'Contract',
|
|
133
|
+
description: 'Contract used for this request, if any',
|
|
134
|
+
relatedDataLabel: 'Purchase requests',
|
|
135
|
+
section: 'request',
|
|
136
|
+
}),
|
|
137
|
+
amount_cents: number({
|
|
138
|
+
displayName: 'Amount (cents)',
|
|
139
|
+
description: 'Requested spend amount in cents',
|
|
140
|
+
decimalPlaces: 0,
|
|
141
|
+
required: true,
|
|
142
|
+
section: 'request',
|
|
143
|
+
}),
|
|
144
|
+
status: radio({
|
|
145
|
+
displayName: 'Status',
|
|
146
|
+
description: 'Approval status',
|
|
147
|
+
options: ['Draft', 'Submitted', 'In approval', 'Approved', 'Rejected', 'Ordered'],
|
|
148
|
+
required: true,
|
|
149
|
+
section: 'request',
|
|
150
|
+
}),
|
|
151
|
+
need_by: date({
|
|
152
|
+
displayName: 'Need by',
|
|
153
|
+
description: 'Requested delivery or purchase date',
|
|
154
|
+
section: 'request',
|
|
155
|
+
}),
|
|
156
|
+
business_justification: longText({
|
|
157
|
+
displayName: 'Business justification',
|
|
158
|
+
description: 'Why the purchase is needed',
|
|
159
|
+
maxLength: 6000,
|
|
160
|
+
section: 'request',
|
|
161
|
+
}),
|
|
162
|
+
approval_label: formula.text({
|
|
163
|
+
displayName: 'Approval label',
|
|
164
|
+
description: 'Status and amount for approval queues',
|
|
165
|
+
formula: "CONCATENATE(status__c, ' - ', amount_cents__c)",
|
|
166
|
+
maxLength: 240,
|
|
167
|
+
section: 'request',
|
|
168
|
+
}),
|
|
169
|
+
},
|
|
170
|
+
});
|
|
171
|
+
|
|
172
|
+
/** Approval-step schema tied to a parent purchase request. */
|
|
173
|
+
export const approvalDefinition = defineCustomObject({
|
|
174
|
+
name: 'pa_approval_step',
|
|
175
|
+
displayName: 'Approval step',
|
|
176
|
+
pluralLabel: 'Approval steps',
|
|
177
|
+
category: PROCUREMENT_CATEGORY,
|
|
178
|
+
description: 'Approval routing line tied to a purchase request',
|
|
179
|
+
sections: {
|
|
180
|
+
approval: section('Approval step', { sectionId: 'sec_pa_approval' }),
|
|
181
|
+
},
|
|
182
|
+
fields: {
|
|
183
|
+
purchase_request_ref: parentChild(requestDefinition, {
|
|
184
|
+
displayName: 'Purchase request',
|
|
185
|
+
description: 'Purchase request this approval belongs to',
|
|
186
|
+
relatedDataLabel: 'Approval steps',
|
|
187
|
+
parentChildType: 'PRIMARY',
|
|
188
|
+
enableParentOwnerInheritance: true,
|
|
189
|
+
section: 'approval',
|
|
190
|
+
}),
|
|
191
|
+
sequence: number({
|
|
192
|
+
displayName: 'Sequence',
|
|
193
|
+
description: 'Approval sequence number',
|
|
194
|
+
decimalPlaces: 0,
|
|
195
|
+
required: true,
|
|
196
|
+
section: 'approval',
|
|
197
|
+
}),
|
|
198
|
+
approval_role: radio({
|
|
199
|
+
displayName: 'Approval role',
|
|
200
|
+
description: 'Approval lane',
|
|
201
|
+
options: ['Budget owner', 'Finance', 'Security', 'Legal', 'Procurement'],
|
|
202
|
+
required: true,
|
|
203
|
+
section: 'approval',
|
|
204
|
+
}),
|
|
205
|
+
status: radio({
|
|
206
|
+
displayName: 'Status',
|
|
207
|
+
description: 'Approval step status',
|
|
208
|
+
options: ['Pending', 'Approved', 'Rejected', 'Skipped'],
|
|
209
|
+
required: true,
|
|
210
|
+
section: 'approval',
|
|
211
|
+
}),
|
|
212
|
+
},
|
|
213
|
+
});
|
|
214
|
+
|
|
215
|
+
/** Invoice schema tied to a parent contract. */
|
|
216
|
+
export const invoiceDefinition = defineCustomObject({
|
|
217
|
+
name: 'pa_invoice',
|
|
218
|
+
displayName: 'Invoice',
|
|
219
|
+
pluralLabel: 'Invoices',
|
|
220
|
+
category: PROCUREMENT_CATEGORY,
|
|
221
|
+
description: 'Invoice received against a vendor contract',
|
|
222
|
+
sections: {
|
|
223
|
+
invoice: section('Invoice', { sectionId: 'sec_pa_invoice' }),
|
|
224
|
+
},
|
|
225
|
+
fields: {
|
|
226
|
+
contract_ref: parentChild(contractDefinition, {
|
|
227
|
+
displayName: 'Contract',
|
|
228
|
+
description: 'Contract this invoice is billed against',
|
|
229
|
+
relatedDataLabel: 'Invoices',
|
|
230
|
+
parentChildType: 'PRIMARY',
|
|
231
|
+
enableParentOwnerInheritance: false,
|
|
232
|
+
section: 'invoice',
|
|
233
|
+
}),
|
|
234
|
+
invoice_number: text({
|
|
235
|
+
displayName: 'Invoice number',
|
|
236
|
+
description: 'Vendor invoice number',
|
|
237
|
+
maxLength: 120,
|
|
238
|
+
required: true,
|
|
239
|
+
section: 'invoice',
|
|
240
|
+
}),
|
|
241
|
+
amount_cents: number({
|
|
242
|
+
displayName: 'Amount (cents)',
|
|
243
|
+
description: 'Invoice amount in cents',
|
|
244
|
+
decimalPlaces: 0,
|
|
245
|
+
required: true,
|
|
246
|
+
section: 'invoice',
|
|
247
|
+
}),
|
|
248
|
+
status: radio({
|
|
249
|
+
displayName: 'Status',
|
|
250
|
+
description: 'Invoice processing status',
|
|
251
|
+
options: ['Received', 'Matched', 'Approved', 'Paid', 'Exception'],
|
|
252
|
+
required: true,
|
|
253
|
+
section: 'invoice',
|
|
254
|
+
}),
|
|
255
|
+
},
|
|
256
|
+
});
|
|
@@ -1,28 +1,33 @@
|
|
|
1
|
-
import
|
|
1
|
+
import {
|
|
2
2
|
DetailViewActionFunctionEvent,
|
|
3
3
|
FunctionContext,
|
|
4
4
|
FunctionResponse,
|
|
5
5
|
ListViewActionFunctionEvent,
|
|
6
6
|
} from '@rippling/rippling-sdk';
|
|
7
|
+
import { createCustomObjectFunctionRuntime } from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
8
|
+
import { todoDefinition } from '../schema';
|
|
7
9
|
|
|
8
|
-
const TODO_OBJECT_API_NAME = 'simple_todo__c';
|
|
9
10
|
const ACTION_BUTTON = 'Mark done';
|
|
10
11
|
|
|
11
12
|
type DetailEvent = DetailViewActionFunctionEvent<
|
|
12
13
|
{},
|
|
13
|
-
typeof
|
|
14
|
+
typeof todoDefinition.apiName,
|
|
14
15
|
typeof ACTION_BUTTON,
|
|
15
16
|
'layout_simple_todo'
|
|
16
17
|
>;
|
|
17
18
|
|
|
18
|
-
type ListEvent = ListViewActionFunctionEvent<{}, typeof
|
|
19
|
+
type ListEvent = ListViewActionFunctionEvent<{}, typeof todoDefinition.apiName, typeof ACTION_BUTTON>;
|
|
19
20
|
|
|
20
|
-
type
|
|
21
|
+
export type Input = DetailEvent | ListEvent;
|
|
22
|
+
|
|
23
|
+
export type Output = {
|
|
24
|
+
updatedRecordIds: string[];
|
|
25
|
+
};
|
|
21
26
|
|
|
22
27
|
export async function onRipplingEvent(
|
|
23
|
-
event:
|
|
28
|
+
event: Input,
|
|
24
29
|
context: FunctionContext,
|
|
25
|
-
): Promise<FunctionResponse<
|
|
30
|
+
): Promise<FunctionResponse<Output>> {
|
|
26
31
|
const recordIds = event.trigger_type === 'record view' ? [event.record_id] : event.record_ids;
|
|
27
32
|
if (recordIds.length === 0) {
|
|
28
33
|
return new FunctionResponse({
|
|
@@ -31,13 +36,12 @@ export async function onRipplingEvent(
|
|
|
31
36
|
});
|
|
32
37
|
}
|
|
33
38
|
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
});
|
|
39
|
+
const runtime = createCustomObjectFunctionRuntime(context);
|
|
40
|
+
const manager = runtime.for(todoDefinition);
|
|
37
41
|
|
|
38
42
|
for (const recordId of recordIds) {
|
|
39
|
-
await
|
|
40
|
-
|
|
43
|
+
await manager.update(recordId, {
|
|
44
|
+
status: 'Done',
|
|
41
45
|
});
|
|
42
46
|
}
|
|
43
47
|
|
|
@@ -1,28 +1,18 @@
|
|
|
1
|
-
import { FunctionContext, FunctionResponse
|
|
2
|
-
import {
|
|
1
|
+
import { FunctionContext, FunctionResponse } from '@rippling/rippling-sdk';
|
|
2
|
+
import {
|
|
3
|
+
handleTypedObjectListPageEvent,
|
|
4
|
+
type TypedObjectListPageInput,
|
|
5
|
+
type TypedObjectListPageOutput,
|
|
6
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
7
|
+
import { todoDefinition } from '../schema';
|
|
3
8
|
|
|
4
|
-
|
|
9
|
+
export type Input = TypedObjectListPageInput;
|
|
10
|
+
|
|
11
|
+
export type Output = TypedObjectListPageOutput;
|
|
5
12
|
|
|
6
13
|
export async function onRipplingEvent(
|
|
7
|
-
event:
|
|
14
|
+
event: Input,
|
|
8
15
|
context: FunctionContext,
|
|
9
|
-
): Promise<FunctionResponse
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
if (action === 'init') {
|
|
13
|
-
const spec = render({
|
|
14
|
-
root: ObjectListView({
|
|
15
|
-
props: { objectApiName: OBJECT },
|
|
16
|
-
}),
|
|
17
|
-
state: {},
|
|
18
|
-
});
|
|
19
|
-
return new FunctionResponse({
|
|
20
|
-
body: { spec: JSON.stringify(spec) },
|
|
21
|
-
statusCode: 200,
|
|
22
|
-
headers: {},
|
|
23
|
-
message: '',
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return new FunctionResponse({ body: {}, statusCode: 200, headers: {}, message: '' });
|
|
16
|
+
): Promise<FunctionResponse<Output>> {
|
|
17
|
+
return handleTypedObjectListPageEvent(event, context, todoDefinition);
|
|
28
18
|
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Typed custom-object schema for the simple todo example.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import {
|
|
6
|
+
date,
|
|
7
|
+
defineCustomObject,
|
|
8
|
+
longText,
|
|
9
|
+
radio,
|
|
10
|
+
section,
|
|
11
|
+
select,
|
|
12
|
+
} from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
13
|
+
|
|
14
|
+
/** Logical category shared by the simple todo custom-object example. */
|
|
15
|
+
export const SIMPLE_TODO_CATEGORY = 'simple_todo';
|
|
16
|
+
|
|
17
|
+
/** Typed schema used by the simple todo manifest and action functions. */
|
|
18
|
+
export const todoDefinition = defineCustomObject({
|
|
19
|
+
name: 'simple_todo',
|
|
20
|
+
displayName: 'Todo',
|
|
21
|
+
pluralLabel: 'Todos',
|
|
22
|
+
category: SIMPLE_TODO_CATEGORY,
|
|
23
|
+
description: 'A single task with status, priority, due date, and notes.',
|
|
24
|
+
icon: { emoji: '✅' },
|
|
25
|
+
sections: {
|
|
26
|
+
details: section('Details', { sectionId: 'sec_todo_details' }),
|
|
27
|
+
},
|
|
28
|
+
fields: {
|
|
29
|
+
status: radio({
|
|
30
|
+
displayName: 'Status',
|
|
31
|
+
description: 'Status field',
|
|
32
|
+
options: ['To Do', 'In Progress', 'Done'],
|
|
33
|
+
required: true,
|
|
34
|
+
section: 'details',
|
|
35
|
+
}),
|
|
36
|
+
priority: radio({
|
|
37
|
+
displayName: 'Priority',
|
|
38
|
+
description: 'Priority field',
|
|
39
|
+
options: ['Low', 'Medium', 'High'],
|
|
40
|
+
section: 'details',
|
|
41
|
+
}),
|
|
42
|
+
labels: select({
|
|
43
|
+
displayName: 'Labels',
|
|
44
|
+
description: 'One or more labels for organizing the task',
|
|
45
|
+
options: ['Personal', 'Work', 'Urgent', 'Follow-up'],
|
|
46
|
+
section: 'details',
|
|
47
|
+
}),
|
|
48
|
+
due_date: date({
|
|
49
|
+
displayName: 'Due date',
|
|
50
|
+
description: 'Due date field',
|
|
51
|
+
section: 'details',
|
|
52
|
+
}),
|
|
53
|
+
notes: longText({
|
|
54
|
+
displayName: 'Notes',
|
|
55
|
+
description: 'Notes field',
|
|
56
|
+
maxLength: 4000,
|
|
57
|
+
section: 'details',
|
|
58
|
+
}),
|
|
59
|
+
},
|
|
60
|
+
});
|
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
/*
|
|
2
2
|
* Simple Todo — minimal CRUD example.
|
|
3
3
|
*
|
|
4
|
-
* One Custom Object (`simple_todo__c`) with name / status / priority /
|
|
5
|
-
*
|
|
6
|
-
* renders the records via ObjectListView. No SDUI beyond
|
|
4
|
+
* One typed Custom Object (`simple_todo__c`) with name / status / priority /
|
|
5
|
+
* due date / notes, one list view ("Open todos"), one page layout, and one
|
|
6
|
+
* SDUI page that renders the records via ObjectListView. No SDUI beyond
|
|
7
|
+
* ObjectListView.
|
|
7
8
|
*
|
|
8
9
|
* simple_todo__c ← name, status, priority, due_date, notes
|
|
9
10
|
*
|
|
@@ -12,107 +13,48 @@
|
|
|
12
13
|
* > examples/manifest/simple-todo-app/manifest.json
|
|
13
14
|
*/
|
|
14
15
|
|
|
15
|
-
import * as fs from 'node:fs';
|
|
16
16
|
import * as path from 'node:path';
|
|
17
|
+
import { toCustomCategoryApiName } from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
17
18
|
import {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
LongTextField,
|
|
27
|
-
ManifestBuilder,
|
|
28
|
-
ManifestFunction,
|
|
29
|
-
RadioField,
|
|
30
|
-
SduiPage,
|
|
31
|
-
SelectField,
|
|
32
|
-
} from '@rippling/rippling-sdk/lib/manifest';
|
|
19
|
+
defineSduiPageFromFunctionFile,
|
|
20
|
+
defineTypedCustomObjectActionFromFunctionFile,
|
|
21
|
+
defineTypedListView,
|
|
22
|
+
defineTypedPageLayout,
|
|
23
|
+
registerManifestCustomObject,
|
|
24
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
25
|
+
import { App, Category, ManifestBuilder } from '@rippling/rippling-sdk/lib/manifest';
|
|
26
|
+
import { SIMPLE_TODO_CATEGORY, todoDefinition } from './schema';
|
|
33
27
|
|
|
34
28
|
const manifest = new ManifestBuilder({
|
|
35
29
|
key: 'simple_todo_app',
|
|
36
30
|
name: 'Simple Todo',
|
|
37
|
-
description: 'A minimal CRUD todo app: one
|
|
31
|
+
description: 'A minimal CRUD todo app: one typed custom object rendered as an SDUI ObjectListView',
|
|
38
32
|
});
|
|
39
33
|
|
|
40
34
|
const todoCategory = new Category(manifest, {
|
|
41
|
-
apiName:
|
|
35
|
+
apiName: toCustomCategoryApiName(SIMPLE_TODO_CATEGORY),
|
|
42
36
|
name: 'Tasks',
|
|
43
37
|
description: 'Container for todo records',
|
|
44
38
|
});
|
|
45
39
|
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
apiName: 'simple_todo__c',
|
|
49
|
-
name: 'Todo',
|
|
50
|
-
pluralLabel: 'Todos',
|
|
40
|
+
const todo = registerManifestCustomObject(manifest, {
|
|
41
|
+
definition: todoDefinition,
|
|
51
42
|
category: todoCategory,
|
|
52
|
-
description: 'A single task with status, priority, and due date',
|
|
53
|
-
icon: { emoji: '✅' },
|
|
54
|
-
});
|
|
55
|
-
|
|
56
|
-
const detailsSection = new CustomObjectFieldSection(todoObj, {
|
|
57
|
-
name: 'Details',
|
|
58
|
-
sectionId: 'sec_todo_details',
|
|
59
|
-
});
|
|
60
|
-
|
|
61
|
-
const statusField = new RadioField(todoObj, {
|
|
62
|
-
apiName: 'status__c',
|
|
63
|
-
displayName: 'Status',
|
|
64
|
-
description: 'Status field',
|
|
65
|
-
options: ['To Do', 'In Progress', 'Done'],
|
|
66
|
-
required: true,
|
|
67
|
-
section: detailsSection,
|
|
68
43
|
});
|
|
69
44
|
|
|
70
|
-
|
|
71
|
-
apiName: 'priority__c',
|
|
72
|
-
displayName: 'Priority',
|
|
73
|
-
description: 'Priority field',
|
|
74
|
-
options: ['Low', 'Medium', 'High'],
|
|
75
|
-
section: detailsSection,
|
|
76
|
-
});
|
|
77
|
-
|
|
78
|
-
const labelsField = new SelectField(todoObj, {
|
|
79
|
-
apiName: 'labels__c',
|
|
80
|
-
displayName: 'Labels',
|
|
81
|
-
description: 'One or more labels for organizing the task',
|
|
82
|
-
options: ['Personal', 'Work', 'Urgent', 'Follow-up'],
|
|
83
|
-
section: detailsSection,
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
const dueDateField = new DateField(todoObj, {
|
|
87
|
-
apiName: 'due_date__c',
|
|
88
|
-
displayName: 'Due date',
|
|
89
|
-
description: 'Due date field',
|
|
90
|
-
section: detailsSection,
|
|
91
|
-
});
|
|
92
|
-
|
|
93
|
-
const notesField = new LongTextField(todoObj, {
|
|
94
|
-
apiName: 'notes__c',
|
|
95
|
-
displayName: 'Notes',
|
|
96
|
-
description: 'Notes field',
|
|
97
|
-
maxLength: 4000,
|
|
98
|
-
section: detailsSection,
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// ── List view: Open todos ───────────────────────────────────────────────────
|
|
102
|
-
new ListViewDef(todoObj, {
|
|
45
|
+
defineTypedListView(todo, {
|
|
103
46
|
viewId: 'view_simple_todo_open',
|
|
104
47
|
name: 'Open todos',
|
|
105
48
|
description: 'Everything that is not Done, ordered by due date',
|
|
106
|
-
fields: ['name',
|
|
107
|
-
orderBy:
|
|
49
|
+
fields: ['name', 'status', 'priority', 'labels', 'due_date'],
|
|
50
|
+
orderBy: 'due_date',
|
|
108
51
|
sortOrder: 'ASC',
|
|
109
52
|
isPublic: true,
|
|
110
53
|
objectScope: 'all',
|
|
111
|
-
|
|
54
|
+
filter: (c) => c.ne(c.fields.status, 'Done'),
|
|
112
55
|
});
|
|
113
56
|
|
|
114
|
-
|
|
115
|
-
new CustomObjectPageLayout(todoObj, {
|
|
57
|
+
defineTypedPageLayout(todo, {
|
|
116
58
|
apiName: 'default',
|
|
117
59
|
name: 'Todo',
|
|
118
60
|
layoutId: 'layout_simple_todo',
|
|
@@ -126,15 +68,8 @@ new CustomObjectPageLayout(todoObj, {
|
|
|
126
68
|
{
|
|
127
69
|
name: 'Details',
|
|
128
70
|
type: 'fields_section',
|
|
129
|
-
section:
|
|
130
|
-
fields: [
|
|
131
|
-
{ field: 'name', editable: true },
|
|
132
|
-
statusField,
|
|
133
|
-
priorityField,
|
|
134
|
-
labelsField,
|
|
135
|
-
dueDateField,
|
|
136
|
-
notesField,
|
|
137
|
-
],
|
|
71
|
+
section: todo.sections.details,
|
|
72
|
+
fields: [{ field: 'name', editable: true }, 'status', 'priority', 'labels', 'due_date', 'notes'],
|
|
138
73
|
},
|
|
139
74
|
],
|
|
140
75
|
},
|
|
@@ -146,41 +81,37 @@ new CustomObjectPageLayout(todoObj, {
|
|
|
146
81
|
});
|
|
147
82
|
|
|
148
83
|
// ── SDUI page (ObjectListView) ──────────────────────────────────────────────
|
|
149
|
-
const todoListFn =
|
|
84
|
+
const { function: todoListFn, page: todoListPage } = defineSduiPageFromFunctionFile(manifest, {
|
|
150
85
|
apiName: 'simple_todo_list_fn',
|
|
151
86
|
name: 'renderTodos',
|
|
152
87
|
description: 'SDUI ObjectListView for todo records',
|
|
153
|
-
|
|
88
|
+
codeDirectory: path.join(__dirname, 'functions'),
|
|
89
|
+
codeFilename: 'todo-list.ts',
|
|
154
90
|
dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.65', '@rippling/pebble-sdui-web': '^0.9.2' },
|
|
155
91
|
isAsync: false,
|
|
92
|
+
pageId: 'simple_todo_page',
|
|
93
|
+
pageName: 'Todos',
|
|
156
94
|
});
|
|
157
95
|
|
|
158
|
-
|
|
159
|
-
sduiPageId: 'simple_todo_page',
|
|
160
|
-
name: 'Todos',
|
|
161
|
-
function: todoListFn,
|
|
162
|
-
});
|
|
163
|
-
|
|
164
|
-
const markDoneFn = new ManifestFunction(manifest, {
|
|
165
|
-
apiName: 'simple_todo_mark_done_fn',
|
|
166
|
-
name: 'markDone',
|
|
167
|
-
description: 'Marks one todo from its detail view or selected todos from the list view as done',
|
|
168
|
-
code: fs.readFileSync(path.join(__dirname, 'functions', 'mark-done.ts'), 'utf-8'),
|
|
169
|
-
dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.76' },
|
|
170
|
-
isAsync: false,
|
|
171
|
-
});
|
|
172
|
-
|
|
173
|
-
new CustomObjectAction(todoObj, {
|
|
96
|
+
defineTypedCustomObjectActionFromFunctionFile(manifest, todo, {
|
|
174
97
|
actionId: 'action_simple_todo_mark_done',
|
|
175
98
|
name: 'Mark done',
|
|
176
|
-
function: markDoneFn,
|
|
177
99
|
visibilityPreferences: ['DETAIL_VIEW', 'LIST_VIEW'],
|
|
100
|
+
function: {
|
|
101
|
+
apiName: 'simple_todo_mark_done_fn',
|
|
102
|
+
name: 'markDone',
|
|
103
|
+
description: 'Marks one todo from its detail view or selected todos from the list view as done',
|
|
104
|
+
codeDirectory: path.join(__dirname, 'functions'),
|
|
105
|
+
codeFilename: 'mark-done.ts',
|
|
106
|
+
dependencies: { '@rippling/rippling-sdk': '^0.2.0-alpha.76' },
|
|
107
|
+
isAsync: false,
|
|
108
|
+
},
|
|
178
109
|
});
|
|
179
110
|
|
|
180
111
|
new App(manifest, {
|
|
181
112
|
apiName: 'simple_todo_app',
|
|
182
113
|
name: 'Simple Todo',
|
|
183
|
-
description: 'Minimal todo app: one
|
|
114
|
+
description: 'Minimal todo app: one typed custom object with an SDUI ObjectListView page',
|
|
184
115
|
appType: 'custom',
|
|
185
116
|
pages: [todoListPage],
|
|
186
117
|
});
|