@rippling/rippling-sdk 0.2.0-alpha.82 → 0.2.0-alpha.84
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,380 @@
|
|
|
1
|
+
import {
|
|
2
|
+
CustomObjectPageLayout,
|
|
3
|
+
type CustomObjectFieldSection,
|
|
4
|
+
type CustomObjectPageLayoutProps,
|
|
5
|
+
type CustomTab,
|
|
6
|
+
type FieldsSection,
|
|
7
|
+
type PageLayoutSection,
|
|
8
|
+
type PageLayoutTab,
|
|
9
|
+
type SectionField,
|
|
10
|
+
type SectionFieldInput,
|
|
11
|
+
type SystemSectionEdit,
|
|
12
|
+
type SystemTabEdit,
|
|
13
|
+
type TabEdits,
|
|
14
|
+
type TabWithSections,
|
|
15
|
+
} from '../../../../lib/manifest';
|
|
16
|
+
import type { AnyCustomObjectDefinition } from '../../custom-objects/types';
|
|
17
|
+
import type { ManifestRegistration } from './types';
|
|
18
|
+
import type { TypedManifestFieldInput } from './field-resolution';
|
|
19
|
+
import { resolveTypedManifestField } from './field-resolution';
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Field object accepted inside typed page-layout field arrays.
|
|
23
|
+
*
|
|
24
|
+
* @typeParam TDefinition - Object definition whose valid field inputs should be enforced.
|
|
25
|
+
*/
|
|
26
|
+
export interface TypedSectionField<TDefinition extends AnyCustomObjectDefinition>
|
|
27
|
+
extends Omit<SectionField, 'field'> {
|
|
28
|
+
/** Field to display, expressed as a typed field-name string or manifest field reference. */
|
|
29
|
+
readonly field: TypedManifestFieldInput<TDefinition>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Field-array entry accepted by typed page-layout helpers.
|
|
34
|
+
*
|
|
35
|
+
* @typeParam TDefinition - Object definition whose valid field inputs should be enforced.
|
|
36
|
+
*/
|
|
37
|
+
export type TypedSectionFieldInput<TDefinition extends AnyCustomObjectDefinition> =
|
|
38
|
+
| TypedManifestFieldInput<TDefinition>
|
|
39
|
+
| TypedSectionField<TDefinition>;
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* `fields_section` shape accepted by the typed page-layout helper.
|
|
43
|
+
*
|
|
44
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
45
|
+
*/
|
|
46
|
+
export interface TypedFieldsSection<TDefinition extends AnyCustomObjectDefinition>
|
|
47
|
+
extends Omit<FieldsSection, 'fields'> {
|
|
48
|
+
/** Fields to display in this section, expressed using typed field-name strings or manifest field refs. */
|
|
49
|
+
readonly fields: readonly TypedSectionFieldInput<TDefinition>[];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Page-layout section shape accepted by the typed page-layout helper.
|
|
54
|
+
*
|
|
55
|
+
* Only `fields_section.fields` is specialized in this first pass; other section
|
|
56
|
+
* variants continue to use the low-level manifest shapes unchanged.
|
|
57
|
+
*
|
|
58
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
59
|
+
*/
|
|
60
|
+
export type TypedPageLayoutSection<TDefinition extends AnyCustomObjectDefinition> =
|
|
61
|
+
| TypedFieldsSection<TDefinition>
|
|
62
|
+
| Exclude<PageLayoutSection, FieldsSection>;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Tab-with-sections shape accepted by the typed page-layout helper.
|
|
66
|
+
*
|
|
67
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
68
|
+
*/
|
|
69
|
+
export interface TypedTabWithSections<TDefinition extends AnyCustomObjectDefinition>
|
|
70
|
+
extends Omit<TabWithSections, 'sections'> {
|
|
71
|
+
/** Sections inside this tab. */
|
|
72
|
+
readonly sections: readonly TypedPageLayoutSection<TDefinition>[];
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Tab shape accepted by the typed page-layout helper.
|
|
77
|
+
*
|
|
78
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
79
|
+
*/
|
|
80
|
+
export type TypedPageLayoutTab<TDefinition extends AnyCustomObjectDefinition> =
|
|
81
|
+
| TypedTabWithSections<TDefinition>
|
|
82
|
+
| CustomTab;
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* System-section edit shape accepted by the typed page-layout helper.
|
|
86
|
+
*
|
|
87
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
88
|
+
*/
|
|
89
|
+
export interface TypedSystemSectionEdit<TDefinition extends AnyCustomObjectDefinition>
|
|
90
|
+
extends Omit<SystemSectionEdit, 'newFields'> {
|
|
91
|
+
/** Fields to append to the target system section. */
|
|
92
|
+
readonly newFields?: readonly TypedSectionFieldInput<TDefinition>[];
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/**
|
|
96
|
+
* System-tab edit shape accepted by the typed page-layout helper.
|
|
97
|
+
*
|
|
98
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
99
|
+
*/
|
|
100
|
+
export interface TypedSystemTabEdit<TDefinition extends AnyCustomObjectDefinition>
|
|
101
|
+
extends Omit<SystemTabEdit, 'newSections' | 'systemSectionEdits'> {
|
|
102
|
+
/** New sections to add to the target system tab. */
|
|
103
|
+
readonly newSections?: readonly TypedPageLayoutSection<TDefinition>[];
|
|
104
|
+
/** Edits to built-in sections inside the target system tab. */
|
|
105
|
+
readonly systemSectionEdits?: Readonly<Record<string, TypedSystemSectionEdit<TDefinition>>>;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/**
|
|
109
|
+
* `tabEdits` shape accepted by the typed page-layout helper.
|
|
110
|
+
*
|
|
111
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
112
|
+
*/
|
|
113
|
+
export interface TypedTabEdits<TDefinition extends AnyCustomObjectDefinition>
|
|
114
|
+
extends Omit<TabEdits, 'newTabs' | 'systemTabEdits'> {
|
|
115
|
+
/** New tabs to add to the layout. */
|
|
116
|
+
readonly newTabs?: readonly TypedPageLayoutTab<TDefinition>[];
|
|
117
|
+
/** Edits to existing system tabs. */
|
|
118
|
+
readonly systemTabEdits?: Readonly<Record<string, TypedSystemTabEdit<TDefinition>>>;
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Initialization properties for {@link defineTypedPageLayout}.
|
|
123
|
+
*
|
|
124
|
+
* This first pass focuses on the common field-array surfaces:
|
|
125
|
+
* - `tabEdits.newTabs[].sections[].fields`
|
|
126
|
+
* - `tabEdits.systemTabEdits.*.newSections[].fields`
|
|
127
|
+
* - `tabEdits.systemTabEdits.*.systemSectionEdits.*.newFields`
|
|
128
|
+
*
|
|
129
|
+
* Other page-layout configuration remains identical to the low-level manifest API.
|
|
130
|
+
*
|
|
131
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
132
|
+
*/
|
|
133
|
+
export interface TypedCustomObjectPageLayoutProps<TDefinition extends AnyCustomObjectDefinition>
|
|
134
|
+
extends Omit<CustomObjectPageLayoutProps, 'tabEdits'> {
|
|
135
|
+
/** Typed page-layout tab edits. */
|
|
136
|
+
readonly tabEdits?: TypedTabEdits<TDefinition>;
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
/**
|
|
140
|
+
* Initialization properties for {@link defineBasicTypedPageLayout}.
|
|
141
|
+
*
|
|
142
|
+
* This is the typed equivalent of {@link CustomObjectPageLayout.basic}: a
|
|
143
|
+
* single-tab, single-section layout for the common case where callers do not
|
|
144
|
+
* need to customize tab structure.
|
|
145
|
+
*
|
|
146
|
+
* @typeParam TDefinition - Object definition whose valid field inputs should be enforced.
|
|
147
|
+
*/
|
|
148
|
+
export interface TypedBasicPageLayoutProps<TDefinition extends AnyCustomObjectDefinition> {
|
|
149
|
+
/** Optional existing manifest section that should own every listed field. */
|
|
150
|
+
readonly section?: CustomObjectFieldSection;
|
|
151
|
+
/** Optional fields to place in the generated General section. */
|
|
152
|
+
readonly fields?: readonly TypedManifestFieldInput<TDefinition>[];
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Returns whether one typed page-layout field entry uses the object form with additional section metadata.
|
|
157
|
+
*
|
|
158
|
+
* @param value - Typed section-field input to inspect.
|
|
159
|
+
* @returns Whether the entry is the object-shaped variant.
|
|
160
|
+
* @typeParam TDefinition - Object definition whose field inputs are being inspected.
|
|
161
|
+
*/
|
|
162
|
+
function isTypedSectionField<TDefinition extends AnyCustomObjectDefinition>(
|
|
163
|
+
value: TypedSectionFieldInput<TDefinition>,
|
|
164
|
+
): value is TypedSectionField<TDefinition> {
|
|
165
|
+
return typeof value === 'object' && value != null && 'field' in value;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
/**
|
|
169
|
+
* Resolves one typed page-layout field input into the low-level manifest field representation.
|
|
170
|
+
*
|
|
171
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
172
|
+
* @param entry - Typed page-layout field input to resolve.
|
|
173
|
+
* @returns Low-level manifest section-field input.
|
|
174
|
+
* @typeParam TDefinition - Object definition whose field inputs are being resolved.
|
|
175
|
+
*/
|
|
176
|
+
function resolveTypedSectionFieldInput<TDefinition extends AnyCustomObjectDefinition>(
|
|
177
|
+
registration: ManifestRegistration<TDefinition>,
|
|
178
|
+
entry: TypedSectionFieldInput<TDefinition>,
|
|
179
|
+
): SectionFieldInput {
|
|
180
|
+
if (isTypedSectionField(entry)) {
|
|
181
|
+
return {
|
|
182
|
+
...entry,
|
|
183
|
+
field: resolveTypedManifestField(registration, entry.field),
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
return resolveTypedManifestField(registration, entry);
|
|
187
|
+
}
|
|
188
|
+
|
|
189
|
+
/**
|
|
190
|
+
* Returns whether one page-layout section is the `fields_section` variant handled by the typed helper.
|
|
191
|
+
*
|
|
192
|
+
* @param section - Typed page-layout section to inspect.
|
|
193
|
+
* @returns Whether the section carries a typed `fields` array.
|
|
194
|
+
* @typeParam TDefinition - Object definition whose section is being inspected.
|
|
195
|
+
*/
|
|
196
|
+
function isFieldsSection<TDefinition extends AnyCustomObjectDefinition>(
|
|
197
|
+
section: TypedPageLayoutSection<TDefinition>,
|
|
198
|
+
): section is TypedFieldsSection<TDefinition> {
|
|
199
|
+
return section.type === 'fields_section';
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Resolves one typed page-layout section into the low-level manifest section shape.
|
|
204
|
+
*
|
|
205
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
206
|
+
* @param section - Typed page-layout section to resolve.
|
|
207
|
+
* @returns Low-level manifest page-layout section.
|
|
208
|
+
* @typeParam TDefinition - Object definition whose section is being resolved.
|
|
209
|
+
*/
|
|
210
|
+
function resolveTypedPageLayoutSection<TDefinition extends AnyCustomObjectDefinition>(
|
|
211
|
+
registration: ManifestRegistration<TDefinition>,
|
|
212
|
+
section: TypedPageLayoutSection<TDefinition>,
|
|
213
|
+
): PageLayoutSection {
|
|
214
|
+
if (!isFieldsSection(section)) {
|
|
215
|
+
return section as PageLayoutSection;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
const { fields, ...rest } = section;
|
|
219
|
+
return {
|
|
220
|
+
...rest,
|
|
221
|
+
fields: fields.map((entry) => resolveTypedSectionFieldInput(registration, entry)),
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/**
|
|
226
|
+
* Resolves one typed page-layout tab into the low-level manifest tab shape.
|
|
227
|
+
*
|
|
228
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
229
|
+
* @param tab - Typed page-layout tab to resolve.
|
|
230
|
+
* @returns Low-level manifest page-layout tab.
|
|
231
|
+
* @typeParam TDefinition - Object definition whose tab is being resolved.
|
|
232
|
+
*/
|
|
233
|
+
function resolveTypedPageLayoutTab<TDefinition extends AnyCustomObjectDefinition>(
|
|
234
|
+
registration: ManifestRegistration<TDefinition>,
|
|
235
|
+
tab: TypedPageLayoutTab<TDefinition>,
|
|
236
|
+
): PageLayoutTab {
|
|
237
|
+
if (tab.type !== 'tab_with_sections') return tab;
|
|
238
|
+
return {
|
|
239
|
+
...tab,
|
|
240
|
+
sections: tab.sections.map((section) => resolveTypedPageLayoutSection(registration, section)),
|
|
241
|
+
};
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
/**
|
|
245
|
+
* Resolves one typed system-section edit into the low-level manifest edit shape.
|
|
246
|
+
*
|
|
247
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
248
|
+
* @param edit - Typed system-section edit to resolve.
|
|
249
|
+
* @returns Low-level manifest system-section edit.
|
|
250
|
+
* @typeParam TDefinition - Object definition whose edit is being resolved.
|
|
251
|
+
*/
|
|
252
|
+
function resolveTypedSystemSectionEdit<TDefinition extends AnyCustomObjectDefinition>(
|
|
253
|
+
registration: ManifestRegistration<TDefinition>,
|
|
254
|
+
edit: TypedSystemSectionEdit<TDefinition>,
|
|
255
|
+
): SystemSectionEdit {
|
|
256
|
+
const { newFields, ...rest } = edit;
|
|
257
|
+
return {
|
|
258
|
+
...rest,
|
|
259
|
+
...(newFields != null ?
|
|
260
|
+
{ newFields: newFields.map((entry) => resolveTypedSectionFieldInput(registration, entry)) }
|
|
261
|
+
: {}),
|
|
262
|
+
};
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
/**
|
|
266
|
+
* Resolves one typed system-tab edit into the low-level manifest edit shape.
|
|
267
|
+
*
|
|
268
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
269
|
+
* @param edit - Typed system-tab edit to resolve.
|
|
270
|
+
* @returns Low-level manifest system-tab edit.
|
|
271
|
+
* @typeParam TDefinition - Object definition whose edit is being resolved.
|
|
272
|
+
*/
|
|
273
|
+
function resolveTypedSystemTabEdit<TDefinition extends AnyCustomObjectDefinition>(
|
|
274
|
+
registration: ManifestRegistration<TDefinition>,
|
|
275
|
+
edit: TypedSystemTabEdit<TDefinition>,
|
|
276
|
+
): SystemTabEdit {
|
|
277
|
+
const { newSections, systemSectionEdits: rawSystemSectionEdits, ...rest } = edit;
|
|
278
|
+
const systemSectionEdits =
|
|
279
|
+
rawSystemSectionEdits == null ? undefined : (
|
|
280
|
+
Object.fromEntries(
|
|
281
|
+
Object.entries(rawSystemSectionEdits).map(([sectionKey, sectionEdit]) => [
|
|
282
|
+
sectionKey,
|
|
283
|
+
resolveTypedSystemSectionEdit(registration, sectionEdit),
|
|
284
|
+
]),
|
|
285
|
+
)
|
|
286
|
+
);
|
|
287
|
+
|
|
288
|
+
return {
|
|
289
|
+
...rest,
|
|
290
|
+
...(newSections != null ?
|
|
291
|
+
{ newSections: newSections.map((section) => resolveTypedPageLayoutSection(registration, section)) }
|
|
292
|
+
: {}),
|
|
293
|
+
...(systemSectionEdits != null ? { systemSectionEdits } : {}),
|
|
294
|
+
};
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/**
|
|
298
|
+
* Resolves the typed `tabEdits` surface into the low-level manifest representation.
|
|
299
|
+
*
|
|
300
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
301
|
+
* @param tabEdits - Typed tab edits to resolve.
|
|
302
|
+
* @returns Low-level manifest tab-edits object.
|
|
303
|
+
* @typeParam TDefinition - Object definition whose tab edits are being resolved.
|
|
304
|
+
*/
|
|
305
|
+
function resolveTypedTabEdits<TDefinition extends AnyCustomObjectDefinition>(
|
|
306
|
+
registration: ManifestRegistration<TDefinition>,
|
|
307
|
+
tabEdits: TypedTabEdits<TDefinition>,
|
|
308
|
+
): TabEdits {
|
|
309
|
+
const { newTabs, systemTabEdits: rawSystemTabEdits, ...rest } = tabEdits;
|
|
310
|
+
const systemTabEdits =
|
|
311
|
+
rawSystemTabEdits == null ? undefined : (
|
|
312
|
+
Object.fromEntries(
|
|
313
|
+
Object.entries(rawSystemTabEdits).map(([tabKey, edit]) => [
|
|
314
|
+
tabKey,
|
|
315
|
+
resolveTypedSystemTabEdit(registration, edit),
|
|
316
|
+
]),
|
|
317
|
+
)
|
|
318
|
+
);
|
|
319
|
+
|
|
320
|
+
return {
|
|
321
|
+
...rest,
|
|
322
|
+
...(newTabs != null ?
|
|
323
|
+
{ newTabs: newTabs.map((tab) => resolveTypedPageLayoutTab(registration, tab)) }
|
|
324
|
+
: {}),
|
|
325
|
+
...(systemTabEdits != null ? { systemTabEdits } : {}),
|
|
326
|
+
};
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/**
|
|
330
|
+
* Registers a typed page layout for a manifest custom object.
|
|
331
|
+
*
|
|
332
|
+
* This helper sits on top of the low-level {@link CustomObjectPageLayout}
|
|
333
|
+
* manifest class. It preserves the runtime behavior of that class while adding
|
|
334
|
+
* object-specific string-literal IntelliSense for the most common field-array
|
|
335
|
+
* authoring surfaces.
|
|
336
|
+
*
|
|
337
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
338
|
+
* @param props - Typed page-layout properties to materialize into the manifest class.
|
|
339
|
+
* @returns Low-level manifest page-layout instance with typed field arrays resolved.
|
|
340
|
+
* @typeParam TDefinition - Object definition whose valid field arrays should be enforced.
|
|
341
|
+
*/
|
|
342
|
+
export function defineTypedPageLayout<TDefinition extends AnyCustomObjectDefinition>(
|
|
343
|
+
registration: ManifestRegistration<TDefinition>,
|
|
344
|
+
props: TypedCustomObjectPageLayoutProps<TDefinition>,
|
|
345
|
+
): CustomObjectPageLayout {
|
|
346
|
+
const layoutProps: CustomObjectPageLayoutProps = {
|
|
347
|
+
apiName: props.apiName,
|
|
348
|
+
name: props.name,
|
|
349
|
+
...(props.tabEdits != null ? { tabEdits: resolveTypedTabEdits(registration, props.tabEdits) } : {}),
|
|
350
|
+
...(props.headerEdits != null ? { headerEdits: props.headerEdits } : {}),
|
|
351
|
+
...(props.visibilityConditions != null ? { visibilityConditions: props.visibilityConditions } : {}),
|
|
352
|
+
...(props.layoutId != null ? { layoutId: props.layoutId } : {}),
|
|
353
|
+
...(props.blueprintKey != null ? { blueprintKey: props.blueprintKey } : {}),
|
|
354
|
+
};
|
|
355
|
+
return new CustomObjectPageLayout(registration.object, layoutProps);
|
|
356
|
+
}
|
|
357
|
+
|
|
358
|
+
/**
|
|
359
|
+
* Registers the common single-tab "basic" layout using typed field-name strings.
|
|
360
|
+
*
|
|
361
|
+
* Use this helper when the low-level {@link CustomObjectPageLayout.basic}
|
|
362
|
+
* behavior is sufficient and you want the shortest typed path from schema to a
|
|
363
|
+
* working page layout.
|
|
364
|
+
*
|
|
365
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
366
|
+
* @param props - Optional basic-layout properties.
|
|
367
|
+
* @returns Low-level manifest page-layout instance created through `CustomObjectPageLayout.basic(...)`.
|
|
368
|
+
* @typeParam TDefinition - Object definition whose valid field inputs should be enforced.
|
|
369
|
+
*/
|
|
370
|
+
export function defineBasicTypedPageLayout<TDefinition extends AnyCustomObjectDefinition>(
|
|
371
|
+
registration: ManifestRegistration<TDefinition>,
|
|
372
|
+
props: TypedBasicPageLayoutProps<TDefinition> = {},
|
|
373
|
+
): CustomObjectPageLayout {
|
|
374
|
+
return CustomObjectPageLayout.basic(registration.object, {
|
|
375
|
+
...(props.section != null ? { section: props.section } : {}),
|
|
376
|
+
...(props.fields != null ?
|
|
377
|
+
{ fields: props.fields.map((field) => resolveTypedManifestField(registration, field)) }
|
|
378
|
+
: {}),
|
|
379
|
+
});
|
|
380
|
+
}
|