@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
|
@@ -14,34 +14,25 @@
|
|
|
14
14
|
* (With npx, use `2>/dev/null` before `>` if npm prints warnings into the file.)
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import * as fs from 'node:fs';
|
|
18
17
|
import * as path from 'node:path';
|
|
18
|
+
import { toCustomCategoryApiName } from '@rippling/rippling-sdk/core/platform/custom-objects';
|
|
19
19
|
import {
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
PhoneField,
|
|
37
|
-
RadioField,
|
|
38
|
-
Rule,
|
|
39
|
-
SelectField,
|
|
40
|
-
SduiPage,
|
|
41
|
-
SummaryField,
|
|
42
|
-
TextField,
|
|
43
|
-
Validation,
|
|
44
|
-
} from '@rippling/rippling-sdk/lib/manifest';
|
|
20
|
+
createTypedRuleHelpers,
|
|
21
|
+
defineSduiPageFromFunctionFile,
|
|
22
|
+
defineTypedListView,
|
|
23
|
+
defineTypedPageLayout,
|
|
24
|
+
defineTypedValidation,
|
|
25
|
+
defineTypedRule,
|
|
26
|
+
registerManifestCustomObjects,
|
|
27
|
+
} from '@rippling/rippling-sdk/core/platform/manifest/custom-objects';
|
|
28
|
+
import { App, Category, ManifestBuilder, SduiPage, SummaryField } from '@rippling/rippling-sdk/lib/manifest';
|
|
29
|
+
import {
|
|
30
|
+
enrollmentDefinition,
|
|
31
|
+
GYM_CATEGORY,
|
|
32
|
+
memberDefinition,
|
|
33
|
+
sessionDefinition,
|
|
34
|
+
trainerDefinition,
|
|
35
|
+
} from './schema';
|
|
45
36
|
|
|
46
37
|
const manifest = new ManifestBuilder({
|
|
47
38
|
key: 'gym_membership_management',
|
|
@@ -51,455 +42,138 @@ const manifest = new ManifestBuilder({
|
|
|
51
42
|
});
|
|
52
43
|
|
|
53
44
|
const gymCategory = new Category(manifest, {
|
|
54
|
-
apiName:
|
|
45
|
+
apiName: toCustomCategoryApiName(GYM_CATEGORY),
|
|
55
46
|
name: 'Gym',
|
|
56
47
|
description: 'Memberships, staff, schedules, and attendance',
|
|
57
48
|
});
|
|
58
49
|
|
|
59
|
-
|
|
60
|
-
const memberObj = new CustomObject(manifest, {
|
|
61
|
-
apiName: 'gym_member__c',
|
|
62
|
-
name: 'Member',
|
|
63
|
-
pluralLabel: 'Members',
|
|
50
|
+
const [member, trainer, session, enrollment] = registerManifestCustomObjects(manifest, {
|
|
64
51
|
category: gymCategory,
|
|
65
|
-
|
|
66
|
-
icon: { emoji: '🏋️' },
|
|
67
|
-
});
|
|
68
|
-
|
|
69
|
-
const memberProfileSection = new CustomObjectFieldSection(memberObj, {
|
|
70
|
-
name: 'Profile',
|
|
71
|
-
sectionId: 'sec_gm_profile',
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
const memberMembershipSection = new CustomObjectFieldSection(memberObj, {
|
|
75
|
-
name: 'Membership',
|
|
76
|
-
sectionId: 'sec_gm_membership',
|
|
77
|
-
});
|
|
78
|
-
|
|
79
|
-
const memberFirstName = new TextField(memberObj, {
|
|
80
|
-
apiName: 'first_name__c',
|
|
81
|
-
displayName: 'First name',
|
|
82
|
-
description: 'First name field',
|
|
83
|
-
required: true,
|
|
84
|
-
maxLength: 80,
|
|
85
|
-
section: memberProfileSection,
|
|
86
|
-
});
|
|
87
|
-
|
|
88
|
-
const memberLastName = new TextField(memberObj, {
|
|
89
|
-
apiName: 'last_name__c',
|
|
90
|
-
displayName: 'Last name',
|
|
91
|
-
description: 'Last name field',
|
|
92
|
-
required: true,
|
|
93
|
-
maxLength: 80,
|
|
94
|
-
section: memberProfileSection,
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
const memberEmail = new EmailField(memberObj, {
|
|
98
|
-
apiName: 'email__c',
|
|
99
|
-
displayName: 'Email',
|
|
100
|
-
description: 'Email field',
|
|
101
|
-
unique: true,
|
|
102
|
-
section: memberProfileSection,
|
|
103
|
-
});
|
|
104
|
-
|
|
105
|
-
const memberPhone = new PhoneField(memberObj, {
|
|
106
|
-
apiName: 'phone__c',
|
|
107
|
-
displayName: 'Phone',
|
|
108
|
-
description: 'Phone field',
|
|
109
|
-
section: memberProfileSection,
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
const memberStatusField = new RadioField(memberObj, {
|
|
113
|
-
apiName: 'membership_status__c',
|
|
114
|
-
displayName: 'Membership status',
|
|
115
|
-
description: 'Membership status field',
|
|
116
|
-
options: ['Active', 'Frozen', 'Cancelled', 'Trial'],
|
|
117
|
-
required: true,
|
|
118
|
-
section: memberMembershipSection,
|
|
119
|
-
});
|
|
120
|
-
|
|
121
|
-
const memberJoinDate = new DateField(memberObj, {
|
|
122
|
-
apiName: 'join_date__c',
|
|
123
|
-
displayName: 'Join date',
|
|
124
|
-
description: 'Join date field',
|
|
125
|
-
section: memberMembershipSection,
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
const memberEmergencyField = new LongTextField(memberObj, {
|
|
129
|
-
apiName: 'emergency_contact__c',
|
|
130
|
-
displayName: 'Emergency contact',
|
|
131
|
-
maxLength: 2000,
|
|
132
|
-
description: 'Name and phone for emergencies',
|
|
133
|
-
section: memberMembershipSection,
|
|
134
|
-
});
|
|
135
|
-
|
|
136
|
-
const memberPreferredClassTypesField = new SelectField(memberObj, {
|
|
137
|
-
apiName: 'preferred_class_types__c',
|
|
138
|
-
displayName: 'Preferred class types',
|
|
139
|
-
description: 'One or more class types the member enjoys',
|
|
140
|
-
options: ['Yoga', 'Spin', 'HIIT', 'Strength', 'Pilates', 'Dance', 'Aquatics'],
|
|
141
|
-
section: memberMembershipSection,
|
|
142
|
-
});
|
|
143
|
-
|
|
144
|
-
// ── Trainer ─────────────────────────────────────────────────────────────────
|
|
145
|
-
const trainerObj = new CustomObject(manifest, {
|
|
146
|
-
apiName: 'gym_trainer__c',
|
|
147
|
-
name: 'Trainer',
|
|
148
|
-
pluralLabel: 'Trainers',
|
|
149
|
-
category: gymCategory,
|
|
150
|
-
description: 'Instructors and coaches who lead scheduled classes',
|
|
151
|
-
icon: { emoji: '🎯' },
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
const trainerSection = new CustomObjectFieldSection(trainerObj, {
|
|
155
|
-
name: 'Trainer',
|
|
156
|
-
sectionId: 'sec_tr_profile',
|
|
157
|
-
});
|
|
158
|
-
|
|
159
|
-
const trainerEmailField = new EmailField(trainerObj, {
|
|
160
|
-
apiName: 'email__c',
|
|
161
|
-
displayName: 'Email',
|
|
162
|
-
description: 'Email field',
|
|
163
|
-
section: trainerSection,
|
|
164
|
-
});
|
|
165
|
-
|
|
166
|
-
const trainerSpecialtyField = new RadioField(trainerObj, {
|
|
167
|
-
apiName: 'specialty__c',
|
|
168
|
-
displayName: 'Primary specialty',
|
|
169
|
-
description: 'Primary specialty field',
|
|
170
|
-
options: ['Yoga', 'Spin', 'HIIT', 'Strength', 'Pilates', 'Dance', 'Aquatics', 'General'],
|
|
171
|
-
section: trainerSection,
|
|
172
|
-
});
|
|
173
|
-
|
|
174
|
-
const trainerBioField = new LongTextField(trainerObj, {
|
|
175
|
-
apiName: 'bio__c',
|
|
176
|
-
displayName: 'Bio & certifications',
|
|
177
|
-
description: 'Bio & certifications field',
|
|
178
|
-
maxLength: 4000,
|
|
179
|
-
section: trainerSection,
|
|
180
|
-
});
|
|
181
|
-
|
|
182
|
-
const trainerLabelField = new FormulaField(trainerObj, {
|
|
183
|
-
apiName: 'trainer_label__c',
|
|
184
|
-
displayName: 'List label',
|
|
185
|
-
description: 'List label field',
|
|
186
|
-
fieldType: 'TEXT',
|
|
187
|
-
maxLength: 220,
|
|
188
|
-
formula: "CONCATENATE(name, ' · ', specialty__c)",
|
|
189
|
-
section: trainerSection,
|
|
190
|
-
});
|
|
191
|
-
|
|
192
|
-
// ── Class session ───────────────────────────────────────────────────────────
|
|
193
|
-
const sessionObj = new CustomObject(manifest, {
|
|
194
|
-
apiName: 'gym_class_session__c',
|
|
195
|
-
name: 'Class session',
|
|
196
|
-
pluralLabel: 'Class sessions',
|
|
197
|
-
category: gymCategory,
|
|
198
|
-
description: 'A scheduled class with assigned trainer, time, and capacity',
|
|
199
|
-
icon: { emoji: '📅' },
|
|
200
|
-
});
|
|
201
|
-
|
|
202
|
-
const sessionScheduleSection = new CustomObjectFieldSection(sessionObj, {
|
|
203
|
-
name: 'Schedule',
|
|
204
|
-
sectionId: 'sec_cs_schedule',
|
|
205
|
-
});
|
|
206
|
-
|
|
207
|
-
const sessionTrainerSection = new CustomObjectFieldSection(sessionObj, {
|
|
208
|
-
name: 'Class & room',
|
|
209
|
-
sectionId: 'sec_cs_class',
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
const sessionTrainerRef = new LookupField(sessionObj, {
|
|
213
|
-
apiName: 'trainer_ref__c',
|
|
214
|
-
displayName: 'Trainer',
|
|
215
|
-
target: trainerObj,
|
|
216
|
-
relatedDataLabel: 'Class sessions',
|
|
217
|
-
required: true,
|
|
218
|
-
description: 'Instructor leading this session',
|
|
219
|
-
section: sessionScheduleSection,
|
|
220
|
-
});
|
|
221
|
-
|
|
222
|
-
const sessionStartField = new DatetimeField(sessionObj, {
|
|
223
|
-
apiName: 'start_time__c',
|
|
224
|
-
displayName: 'Start',
|
|
225
|
-
required: true,
|
|
226
|
-
description: 'Session start (local)',
|
|
227
|
-
section: sessionScheduleSection,
|
|
228
|
-
});
|
|
229
|
-
|
|
230
|
-
const sessionEndField = new DatetimeField(sessionObj, {
|
|
231
|
-
apiName: 'end_time__c',
|
|
232
|
-
displayName: 'End',
|
|
233
|
-
required: true,
|
|
234
|
-
description: 'Session end (local)',
|
|
235
|
-
section: sessionScheduleSection,
|
|
236
|
-
});
|
|
237
|
-
|
|
238
|
-
const sessionClassTypeField = new RadioField(sessionObj, {
|
|
239
|
-
apiName: 'class_type__c',
|
|
240
|
-
displayName: 'Class type',
|
|
241
|
-
description: 'Class type field',
|
|
242
|
-
options: [
|
|
243
|
-
'Yoga',
|
|
244
|
-
'Spin',
|
|
245
|
-
'HIIT',
|
|
246
|
-
'Strength',
|
|
247
|
-
'Pilates',
|
|
248
|
-
'Dance',
|
|
249
|
-
'Aquatics',
|
|
250
|
-
'Recovery / stretch',
|
|
251
|
-
'Other',
|
|
252
|
-
],
|
|
253
|
-
required: true,
|
|
254
|
-
section: sessionTrainerSection,
|
|
255
|
-
});
|
|
256
|
-
|
|
257
|
-
const sessionRoomField = new TextField(sessionObj, {
|
|
258
|
-
apiName: 'room_name__c',
|
|
259
|
-
displayName: 'Studio / room',
|
|
260
|
-
maxLength: 80,
|
|
261
|
-
description: 'E.g. Studio A, Pool lane 2',
|
|
262
|
-
section: sessionTrainerSection,
|
|
263
|
-
});
|
|
264
|
-
|
|
265
|
-
const sessionCapacityField = new NumberField(sessionObj, {
|
|
266
|
-
apiName: 'capacity__c',
|
|
267
|
-
displayName: 'Capacity',
|
|
268
|
-
decimalPlaces: 0,
|
|
269
|
-
description: 'Maximum attendees for this session',
|
|
270
|
-
section: sessionTrainerSection,
|
|
271
|
-
});
|
|
272
|
-
|
|
273
|
-
const sessionNotesField = new LongTextField(sessionObj, {
|
|
274
|
-
apiName: 'session_notes__c',
|
|
275
|
-
displayName: 'Notes',
|
|
276
|
-
description: 'Notes field',
|
|
277
|
-
maxLength: 4000,
|
|
278
|
-
section: sessionTrainerSection,
|
|
279
|
-
});
|
|
280
|
-
|
|
281
|
-
const sessionDayField = new FormulaField(sessionObj, {
|
|
282
|
-
apiName: 'session_date__c',
|
|
283
|
-
displayName: 'Session date',
|
|
284
|
-
fieldType: 'DATE',
|
|
285
|
-
formula: "DATETRUNC('DAY', start_time__c)",
|
|
286
|
-
description: 'Calendar day for filtering “today” views',
|
|
287
|
-
section: sessionScheduleSection,
|
|
288
|
-
});
|
|
289
|
-
|
|
290
|
-
const sessionBoardLabel = new FormulaField(sessionObj, {
|
|
291
|
-
apiName: 'session_board_label__c',
|
|
292
|
-
displayName: 'Board label',
|
|
293
|
-
description: 'Board label field',
|
|
294
|
-
fieldType: 'TEXT',
|
|
295
|
-
maxLength: 260,
|
|
296
|
-
formula: "CONCATENATE(class_type__c, ' · ', room_name__c)",
|
|
297
|
-
section: sessionScheduleSection,
|
|
298
|
-
});
|
|
299
|
-
|
|
300
|
-
// ── Enrollment (child of session) ───────────────────────────────────────────
|
|
301
|
-
const enrollmentObj = new CustomObject(manifest, {
|
|
302
|
-
apiName: 'gym_class_enrollment__c',
|
|
303
|
-
name: 'Class enrollment',
|
|
304
|
-
pluralLabel: 'Class enrollments',
|
|
305
|
-
category: gymCategory,
|
|
306
|
-
description: 'Member registration for a session with attendance and check-in',
|
|
307
|
-
icon: { emoji: '✅' },
|
|
308
|
-
});
|
|
309
|
-
|
|
310
|
-
const enrollmentSessionSection = new CustomObjectFieldSection(enrollmentObj, {
|
|
311
|
-
name: 'Session & member',
|
|
312
|
-
sectionId: 'sec_ce_link',
|
|
313
|
-
});
|
|
314
|
-
|
|
315
|
-
const enrollmentAttendanceSection = new CustomObjectFieldSection(enrollmentObj, {
|
|
316
|
-
name: 'Attendance',
|
|
317
|
-
sectionId: 'sec_ce_att',
|
|
318
|
-
});
|
|
319
|
-
|
|
320
|
-
const enrollmentSessionRef = new ParentChildField(enrollmentObj, {
|
|
321
|
-
apiName: 'class_session_ref__c',
|
|
322
|
-
displayName: 'Class session',
|
|
323
|
-
target: sessionObj,
|
|
324
|
-
relatedDataLabel: 'Enrollments',
|
|
325
|
-
parentChildType: 'PRIMARY',
|
|
326
|
-
enableParentOwnerInheritance: false,
|
|
327
|
-
description: 'Which scheduled class this row belongs to',
|
|
328
|
-
section: enrollmentSessionSection,
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
const enrollmentMemberRef = new LookupField(enrollmentObj, {
|
|
332
|
-
apiName: 'member_ref__c',
|
|
333
|
-
displayName: 'Member',
|
|
334
|
-
description: 'Member field',
|
|
335
|
-
target: memberObj,
|
|
336
|
-
relatedDataLabel: 'Class enrollments',
|
|
337
|
-
required: true,
|
|
338
|
-
section: enrollmentSessionSection,
|
|
339
|
-
});
|
|
340
|
-
|
|
341
|
-
const enrollmentAttendanceField = new RadioField(enrollmentObj, {
|
|
342
|
-
apiName: 'attendance_status__c',
|
|
343
|
-
displayName: 'Attendance',
|
|
344
|
-
options: ['Registered', 'Checked in', 'Late', 'No-show', 'Cancelled'],
|
|
345
|
-
required: true,
|
|
346
|
-
description: 'Front desk: set to Checked in when the member arrives',
|
|
347
|
-
section: enrollmentAttendanceSection,
|
|
348
|
-
});
|
|
349
|
-
|
|
350
|
-
const enrollmentCheckedInAt = new DatetimeField(enrollmentObj, {
|
|
351
|
-
apiName: 'checked_in_at__c',
|
|
352
|
-
displayName: 'Checked in at',
|
|
353
|
-
description: 'Timestamp when staff recorded arrival (optional)',
|
|
354
|
-
section: enrollmentAttendanceSection,
|
|
355
|
-
});
|
|
356
|
-
|
|
357
|
-
const enrollmentNotesField = new LongTextField(enrollmentObj, {
|
|
358
|
-
apiName: 'enrollment_notes__c',
|
|
359
|
-
displayName: 'Notes',
|
|
360
|
-
description: 'Notes field',
|
|
361
|
-
maxLength: 2000,
|
|
362
|
-
section: enrollmentAttendanceSection,
|
|
363
|
-
});
|
|
364
|
-
|
|
365
|
-
const enrollmentRosterTitle = new FormulaField(enrollmentObj, {
|
|
366
|
-
apiName: 'roster_row_label__c',
|
|
367
|
-
displayName: 'Roster row label',
|
|
368
|
-
description: 'Roster row label field',
|
|
369
|
-
fieldType: 'TEXT',
|
|
370
|
-
maxLength: 160,
|
|
371
|
-
formula: "CONCATENATE(attendance_status__c, ' · Enrollment')",
|
|
372
|
-
section: enrollmentAttendanceSection,
|
|
52
|
+
definitions: [memberDefinition, trainerDefinition, sessionDefinition, enrollmentDefinition] as const,
|
|
373
53
|
});
|
|
374
54
|
|
|
375
55
|
// ── Rollups ─────────────────────────────────────────────────────────────────
|
|
376
|
-
const enrollmentCountOnSession = new SummaryField(
|
|
56
|
+
const enrollmentCountOnSession = new SummaryField(session.object, {
|
|
377
57
|
apiName: 'enrollment_count__c',
|
|
378
58
|
displayName: 'Enrolled (count)',
|
|
379
|
-
aggregates:
|
|
59
|
+
aggregates: enrollment.fields.member_ref,
|
|
380
60
|
using: 'COUNT',
|
|
381
|
-
lookup:
|
|
61
|
+
lookup: enrollment.fields.class_session_ref,
|
|
382
62
|
description: 'Rows on this session’s roster',
|
|
383
|
-
section:
|
|
63
|
+
section: session.sections.schedule,
|
|
384
64
|
});
|
|
385
65
|
|
|
386
66
|
// Note: Rollups from session → trainer would require a parent–child edge from
|
|
387
67
|
// session to trainer; trainer is linked via LookupField instead, so session
|
|
388
68
|
// counts per trainer are surfaced via session list views and SDUI, not a rollup.
|
|
389
69
|
|
|
390
|
-
// ── Validations & defaults
|
|
391
|
-
|
|
70
|
+
// ── Validations & defaults ──────────────────────────────────────────────────
|
|
71
|
+
defineTypedValidation(session, {
|
|
392
72
|
ruleId: 'gym_session_end_after_start',
|
|
393
73
|
displayName: 'End time must be after start',
|
|
394
|
-
|
|
74
|
+
whenInvalid: (c) => c.lte(c.fields.end_time, c.fields.start_time),
|
|
395
75
|
errorMessage: 'End time must be after the start time.',
|
|
396
76
|
ruleDescription: 'Prevents zero-length or inverted intervals',
|
|
397
77
|
state: 'ACTIVE',
|
|
398
78
|
level: 'FIELD',
|
|
399
|
-
|
|
79
|
+
field: 'end_time',
|
|
400
80
|
});
|
|
401
81
|
|
|
402
|
-
|
|
82
|
+
const enrollmentRules = createTypedRuleHelpers(enrollment);
|
|
83
|
+
defineTypedRule(enrollment, {
|
|
403
84
|
flowId: 'gym_default_enrollment_status',
|
|
404
85
|
flowName: 'Default attendance to Registered',
|
|
405
86
|
triggerType: 'CREATE',
|
|
406
87
|
description: 'New roster rows start as Registered unless changed',
|
|
407
|
-
actions: [
|
|
88
|
+
actions: [enrollmentRules.setField('attendance_status').toValue('Registered')],
|
|
408
89
|
});
|
|
409
90
|
|
|
410
|
-
// ── List views
|
|
411
|
-
|
|
91
|
+
// ── List views ──────────────────────────────────────────────────────────────
|
|
92
|
+
defineTypedListView(member, {
|
|
412
93
|
viewId: 'view_gym_all_members',
|
|
413
94
|
name: 'All members',
|
|
414
95
|
description: 'Directory with membership status',
|
|
415
|
-
fields: [
|
|
416
|
-
'name',
|
|
417
|
-
memberEmail,
|
|
418
|
-
memberPhone,
|
|
419
|
-
memberStatusField,
|
|
420
|
-
memberPreferredClassTypesField,
|
|
421
|
-
memberJoinDate,
|
|
422
|
-
],
|
|
96
|
+
fields: ['name', 'email', 'phone', 'membership_status', 'preferred_class_types', 'join_date'],
|
|
423
97
|
orderBy: 'name',
|
|
424
98
|
sortOrder: 'ASC',
|
|
425
99
|
isPublic: true,
|
|
426
100
|
objectScope: 'all',
|
|
427
101
|
});
|
|
428
102
|
|
|
429
|
-
|
|
103
|
+
defineTypedListView(trainer, {
|
|
430
104
|
viewId: 'view_gym_all_trainers',
|
|
431
105
|
name: 'All trainers',
|
|
432
106
|
description: 'Staff roster with session counts',
|
|
433
|
-
fields: ['name',
|
|
107
|
+
fields: ['name', 'email', 'specialty', 'trainer_label'],
|
|
434
108
|
orderBy: 'name',
|
|
435
109
|
sortOrder: 'ASC',
|
|
436
110
|
isPublic: true,
|
|
437
111
|
objectScope: 'all',
|
|
438
112
|
});
|
|
439
113
|
|
|
440
|
-
|
|
114
|
+
defineTypedListView(session, {
|
|
441
115
|
viewId: 'view_gym_all_sessions',
|
|
442
116
|
name: 'All class sessions',
|
|
443
117
|
description: 'Chronological schedule with trainer and enrollments',
|
|
444
118
|
fields: [
|
|
445
119
|
'name',
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
449
|
-
|
|
450
|
-
|
|
451
|
-
|
|
120
|
+
'trainer_ref',
|
|
121
|
+
'start_time',
|
|
122
|
+
'end_time',
|
|
123
|
+
'class_type',
|
|
124
|
+
'room_name',
|
|
125
|
+
'capacity',
|
|
452
126
|
enrollmentCountOnSession,
|
|
453
|
-
|
|
127
|
+
'session_board_label',
|
|
454
128
|
],
|
|
455
|
-
orderBy:
|
|
129
|
+
orderBy: 'start_time',
|
|
456
130
|
sortOrder: 'ASC',
|
|
457
131
|
isPublic: true,
|
|
458
132
|
objectScope: 'all',
|
|
459
133
|
});
|
|
460
134
|
|
|
461
|
-
|
|
135
|
+
defineTypedListView(session, {
|
|
462
136
|
viewId: 'view_gym_today_sessions',
|
|
463
137
|
name: 'Today’s class sessions',
|
|
464
138
|
description: 'Sessions whose calendar day is today — use with Today’s schedule SDUI tab',
|
|
465
139
|
fields: [
|
|
466
140
|
'name',
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
141
|
+
'trainer_ref',
|
|
142
|
+
'start_time',
|
|
143
|
+
'end_time',
|
|
144
|
+
'class_type',
|
|
145
|
+
'room_name',
|
|
472
146
|
enrollmentCountOnSession,
|
|
473
|
-
|
|
474
|
-
|
|
147
|
+
'session_board_label',
|
|
148
|
+
'session_date',
|
|
475
149
|
],
|
|
476
|
-
orderBy:
|
|
150
|
+
orderBy: 'start_time',
|
|
477
151
|
sortOrder: 'ASC',
|
|
478
152
|
isPublic: true,
|
|
479
153
|
objectScope: 'all',
|
|
480
|
-
|
|
154
|
+
filter: (c) => c.eq(c.fields.session_date, c.today()),
|
|
481
155
|
});
|
|
482
156
|
|
|
483
|
-
|
|
157
|
+
defineTypedListView(enrollment, {
|
|
484
158
|
viewId: 'view_gym_all_enrollments',
|
|
485
159
|
name: 'All enrollments',
|
|
486
160
|
description: 'Full roster grid',
|
|
487
161
|
fields: [
|
|
488
162
|
'name',
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
163
|
+
'class_session_ref',
|
|
164
|
+
'member_ref',
|
|
165
|
+
'attendance_status',
|
|
166
|
+
'checked_in_at',
|
|
167
|
+
'roster_row_label',
|
|
494
168
|
],
|
|
495
|
-
orderBy:
|
|
169
|
+
orderBy: 'member_ref',
|
|
496
170
|
sortOrder: 'ASC',
|
|
497
171
|
isPublic: true,
|
|
498
172
|
objectScope: 'all',
|
|
499
173
|
});
|
|
500
174
|
|
|
501
|
-
// ── Page layouts
|
|
502
|
-
|
|
175
|
+
// ── Page layouts ────────────────────────────────────────────────────────────
|
|
176
|
+
defineTypedPageLayout(member, {
|
|
503
177
|
apiName: 'default',
|
|
504
178
|
name: 'Member',
|
|
505
179
|
layoutId: 'layout_gym_member',
|
|
@@ -513,20 +187,14 @@ new CustomObjectPageLayout(memberObj, {
|
|
|
513
187
|
{
|
|
514
188
|
name: 'Profile',
|
|
515
189
|
type: 'fields_section',
|
|
516
|
-
section:
|
|
517
|
-
fields: [
|
|
518
|
-
{ field: 'name', editable: true },
|
|
519
|
-
memberFirstName,
|
|
520
|
-
memberLastName,
|
|
521
|
-
memberEmail,
|
|
522
|
-
memberPhone,
|
|
523
|
-
],
|
|
190
|
+
section: member.sections.profile,
|
|
191
|
+
fields: [{ field: 'name', editable: true }, 'first_name', 'last_name', 'email', 'phone'],
|
|
524
192
|
},
|
|
525
193
|
{
|
|
526
194
|
name: 'Membership',
|
|
527
195
|
type: 'fields_section',
|
|
528
|
-
section:
|
|
529
|
-
fields: [
|
|
196
|
+
section: member.sections.membership,
|
|
197
|
+
fields: ['membership_status', 'preferred_class_types', 'join_date', 'emergency_contact'],
|
|
530
198
|
},
|
|
531
199
|
],
|
|
532
200
|
},
|
|
@@ -537,7 +205,7 @@ new CustomObjectPageLayout(memberObj, {
|
|
|
537
205
|
visibilityConditions: {},
|
|
538
206
|
});
|
|
539
207
|
|
|
540
|
-
|
|
208
|
+
defineTypedPageLayout(trainer, {
|
|
541
209
|
apiName: 'default',
|
|
542
210
|
name: 'Trainer',
|
|
543
211
|
layoutId: 'layout_gym_trainer',
|
|
@@ -551,14 +219,8 @@ new CustomObjectPageLayout(trainerObj, {
|
|
|
551
219
|
{
|
|
552
220
|
name: 'Details',
|
|
553
221
|
type: 'fields_section',
|
|
554
|
-
section:
|
|
555
|
-
fields: [
|
|
556
|
-
{ field: 'name', editable: true },
|
|
557
|
-
trainerEmailField,
|
|
558
|
-
trainerSpecialtyField,
|
|
559
|
-
trainerLabelField,
|
|
560
|
-
trainerBioField,
|
|
561
|
-
],
|
|
222
|
+
section: trainer.sections.trainer,
|
|
223
|
+
fields: [{ field: 'name', editable: true }, 'email', 'specialty', 'trainer_label', 'bio'],
|
|
562
224
|
},
|
|
563
225
|
],
|
|
564
226
|
},
|
|
@@ -569,7 +231,7 @@ new CustomObjectPageLayout(trainerObj, {
|
|
|
569
231
|
visibilityConditions: {},
|
|
570
232
|
});
|
|
571
233
|
|
|
572
|
-
|
|
234
|
+
defineTypedPageLayout(session, {
|
|
573
235
|
apiName: 'default',
|
|
574
236
|
name: 'Class session',
|
|
575
237
|
layoutId: 'layout_gym_class_session',
|
|
@@ -583,22 +245,22 @@ new CustomObjectPageLayout(sessionObj, {
|
|
|
583
245
|
{
|
|
584
246
|
name: 'Schedule',
|
|
585
247
|
type: 'fields_section',
|
|
586
|
-
section:
|
|
248
|
+
section: session.sections.schedule,
|
|
587
249
|
fields: [
|
|
588
250
|
{ field: 'name', editable: true },
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
251
|
+
'trainer_ref',
|
|
252
|
+
'start_time',
|
|
253
|
+
'end_time',
|
|
254
|
+
'session_date',
|
|
255
|
+
'session_board_label',
|
|
594
256
|
enrollmentCountOnSession,
|
|
595
257
|
],
|
|
596
258
|
},
|
|
597
259
|
{
|
|
598
260
|
name: 'Class & room',
|
|
599
261
|
type: 'fields_section',
|
|
600
|
-
section:
|
|
601
|
-
fields: [
|
|
262
|
+
section: session.sections.class_and_room,
|
|
263
|
+
fields: ['class_type', 'room_name', 'capacity', 'session_notes'],
|
|
602
264
|
},
|
|
603
265
|
],
|
|
604
266
|
},
|
|
@@ -609,7 +271,7 @@ new CustomObjectPageLayout(sessionObj, {
|
|
|
609
271
|
visibilityConditions: {},
|
|
610
272
|
});
|
|
611
273
|
|
|
612
|
-
|
|
274
|
+
defineTypedPageLayout(enrollment, {
|
|
613
275
|
apiName: 'default',
|
|
614
276
|
name: 'Enrollment',
|
|
615
277
|
layoutId: 'layout_gym_enrollment',
|
|
@@ -623,19 +285,14 @@ new CustomObjectPageLayout(enrollmentObj, {
|
|
|
623
285
|
{
|
|
624
286
|
name: 'Session & member',
|
|
625
287
|
type: 'fields_section',
|
|
626
|
-
section:
|
|
627
|
-
fields: [{ field: 'name', editable: true },
|
|
288
|
+
section: enrollment.sections.session_and_member,
|
|
289
|
+
fields: [{ field: 'name', editable: true }, 'class_session_ref', 'member_ref'],
|
|
628
290
|
},
|
|
629
291
|
{
|
|
630
292
|
name: 'Attendance & check-in',
|
|
631
293
|
type: 'fields_section',
|
|
632
|
-
section:
|
|
633
|
-
fields: [
|
|
634
|
-
enrollmentAttendanceField,
|
|
635
|
-
enrollmentCheckedInAt,
|
|
636
|
-
enrollmentRosterTitle,
|
|
637
|
-
enrollmentNotesField,
|
|
638
|
-
],
|
|
294
|
+
section: enrollment.sections.attendance,
|
|
295
|
+
fields: ['attendance_status', 'checked_in_at', 'roster_row_label', 'enrollment_notes'],
|
|
639
296
|
},
|
|
640
297
|
],
|
|
641
298
|
},
|
|
@@ -646,16 +303,12 @@ new CustomObjectPageLayout(enrollmentObj, {
|
|
|
646
303
|
visibilityConditions: {},
|
|
647
304
|
});
|
|
648
305
|
|
|
649
|
-
// ── SDUI object-list tabs
|
|
306
|
+
// ── SDUI object-list tabs ──────────────────────────────────────────────────
|
|
650
307
|
const sduiObjectListDependencies = {
|
|
651
308
|
'@rippling/rippling-sdk': '^0.2.0-alpha.65',
|
|
652
309
|
'@rippling/pebble-sdui-web': '^0.9.2',
|
|
653
310
|
};
|
|
654
311
|
|
|
655
|
-
function loadFunctionCode(filename: string): string {
|
|
656
|
-
return fs.readFileSync(path.join(__dirname, 'functions', filename), 'utf-8');
|
|
657
|
-
}
|
|
658
|
-
|
|
659
312
|
function createObjectListPage(props: {
|
|
660
313
|
codeFilename: string;
|
|
661
314
|
functionApiName: string;
|
|
@@ -664,20 +317,17 @@ function createObjectListPage(props: {
|
|
|
664
317
|
pageId: string;
|
|
665
318
|
pageName: string;
|
|
666
319
|
}): SduiPage {
|
|
667
|
-
|
|
320
|
+
return defineSduiPageFromFunctionFile(manifest, {
|
|
668
321
|
apiName: props.functionApiName,
|
|
669
322
|
name: props.functionName,
|
|
670
323
|
description: props.functionDescription,
|
|
671
|
-
|
|
324
|
+
codeDirectory: path.join(__dirname, 'functions'),
|
|
325
|
+
codeFilename: props.codeFilename,
|
|
672
326
|
dependencies: sduiObjectListDependencies,
|
|
673
327
|
isAsync: false,
|
|
674
|
-
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
sduiPageId: props.pageId,
|
|
678
|
-
name: props.pageName,
|
|
679
|
-
function: listFn,
|
|
680
|
-
});
|
|
328
|
+
pageId: props.pageId,
|
|
329
|
+
pageName: props.pageName,
|
|
330
|
+
}).page;
|
|
681
331
|
}
|
|
682
332
|
|
|
683
333
|
const memberListPage = createObjectListPage({
|