@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,58 @@
|
|
|
1
|
+
const STANDARD_TYPED_MANIFEST_FIELD_NAMES = [
|
|
2
|
+
'id',
|
|
3
|
+
'name',
|
|
4
|
+
'created_at',
|
|
5
|
+
'updated_at',
|
|
6
|
+
'system_updated_at',
|
|
7
|
+
'external_id',
|
|
8
|
+
'owner_role',
|
|
9
|
+
'created_by',
|
|
10
|
+
'last_modified_by',
|
|
11
|
+
];
|
|
12
|
+
const STANDARD_TYPED_MANIFEST_FIELD_NAME_SET = new Set(STANDARD_TYPED_MANIFEST_FIELD_NAMES);
|
|
13
|
+
/**
|
|
14
|
+
* Type-safe `hasOwnProperty` helper for typed manifest field resolution.
|
|
15
|
+
*
|
|
16
|
+
* @param value - Object whose own properties should be checked.
|
|
17
|
+
* @param key - Candidate property key.
|
|
18
|
+
* @returns Whether the object owns that property.
|
|
19
|
+
* @typeParam TObject - Object type being narrowed.
|
|
20
|
+
*/
|
|
21
|
+
function hasOwn(value, key) {
|
|
22
|
+
return Object.prototype.hasOwnProperty.call(value, key);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Resolves one typed manifest field input into the concrete manifest {@link Field} instance.
|
|
26
|
+
*
|
|
27
|
+
* Assumptions:
|
|
28
|
+
* - standard field names should autocomplete as snake_case strings
|
|
29
|
+
* - custom typed fields should resolve from the manifest registration returned by
|
|
30
|
+
* the typed manifest registration helper
|
|
31
|
+
* - computed fields like summary fields may still be passed directly as manifest field objects
|
|
32
|
+
*
|
|
33
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
34
|
+
* @param field - Typed field input to resolve.
|
|
35
|
+
* @returns Concrete manifest field instance suitable for low-level manifest APIs.
|
|
36
|
+
* @typeParam TDefinition - Object definition whose field reference is being resolved.
|
|
37
|
+
*/
|
|
38
|
+
export function resolveTypedManifestField(registration, field) {
|
|
39
|
+
if (typeof field !== 'string')
|
|
40
|
+
return field;
|
|
41
|
+
const matchesCustomField = hasOwn(registration.fields, field);
|
|
42
|
+
const matchesStandardField = STANDARD_TYPED_MANIFEST_FIELD_NAME_SET.has(field);
|
|
43
|
+
if (matchesCustomField && matchesStandardField) {
|
|
44
|
+
throw new Error(`Field name "${field}" is ambiguous on "${registration.definition.apiName}" because it matches both a standard field and a custom field. ` +
|
|
45
|
+
'Pass an explicit manifest field reference instead.');
|
|
46
|
+
}
|
|
47
|
+
if (matchesCustomField)
|
|
48
|
+
return registration.fields[field];
|
|
49
|
+
if (matchesStandardField) {
|
|
50
|
+
return registration.object.standardField(field);
|
|
51
|
+
}
|
|
52
|
+
const validFieldNames = [
|
|
53
|
+
...STANDARD_TYPED_MANIFEST_FIELD_NAMES,
|
|
54
|
+
...Object.keys(registration.fields).sort(),
|
|
55
|
+
];
|
|
56
|
+
throw new Error(`Unknown field name "${field}" for "${registration.definition.apiName}". Valid field names: ${validFieldNames.join(', ')}.`);
|
|
57
|
+
}
|
|
58
|
+
//# sourceMappingURL=field-resolution.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"field-resolution.mjs","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/field-resolution.ts"],"names":[],"mappings":"AAIA,MAAM,mCAAmC,GAAG;IAC1C,IAAI;IACJ,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,mBAAmB;IACnB,aAAa;IACb,YAAY;IACZ,YAAY;IACZ,kBAAkB;CACgE,CAAC;AAErF,MAAM,sCAAsC,GAAG,IAAI,GAAG,CAAS,mCAAmC,CAAC,CAAC;AAyCpG;;;;;;;GAOG;AACH,SAAS,MAAM,CACb,KAAc,EACd,GAAgB;IAEhB,OAAO,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,CAAC,CAAC;AAC1D,CAAC;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,UAAU,yBAAyB,CACvC,YAA+C,EAC/C,KAA2C;IAE3C,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAE5C,MAAM,kBAAkB,GAAG,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;IAC9D,MAAM,oBAAoB,GAAG,sCAAsC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;IAE/E,IAAI,kBAAkB,IAAI,oBAAoB,EAAE,CAAC;QAC/C,MAAM,IAAI,KAAK,CACb,eAAe,KAAK,sBAAsB,YAAY,CAAC,UAAU,CAAC,OAAO,iEAAiE;YACxI,oDAAoD,CACvD,CAAC;IACJ,CAAC;IACD,IAAI,kBAAkB;QAAE,OAAO,YAAY,CAAC,MAAM,CAAC,KAAgC,CAAqB,CAAC;IACzG,IAAI,oBAAoB,EAAE,CAAC;QACzB,OAAO,YAAY,CAAC,MAAM,CAAC,aAAa,CAAC,KAAyC,CAAC,CAAC;IACtF,CAAC;IAED,MAAM,eAAe,GAAG;QACtB,GAAG,mCAAmC;QACtC,GAAG,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE;KAC3C,CAAC;IACF,MAAM,IAAI,KAAK,CACb,uBAAuB,KAAK,UAC1B,YAAY,CAAC,UAAU,CAAC,OAC1B,yBAAyB,eAAe,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,CACvD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ManifestFunction, type ManifestFunctionProps, SduiPage, type SduiPageProps, type Workflow } from "../../../../lib/manifest.mjs";
|
|
2
|
+
import type { ManifestScope } from "../../../../lib/manifest/manifest-builder.mjs";
|
|
3
|
+
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.mjs";
|
|
4
|
+
import { type TypedWorkflowProps } from "./workflow.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Shared properties for helpers that load manifest function source code from a
|
|
7
|
+
* file on disk.
|
|
8
|
+
*/
|
|
9
|
+
export interface ManifestFunctionFileSource {
|
|
10
|
+
/** Directory containing the function source file. */
|
|
11
|
+
readonly codeDirectory: string;
|
|
12
|
+
/** File name to read from {@link codeDirectory}. */
|
|
13
|
+
readonly codeFilename: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Initialization properties for {@link defineManifestFunctionFromFile}.
|
|
17
|
+
*/
|
|
18
|
+
export interface ManifestFunctionFromFileProps extends Omit<ManifestFunctionProps, 'code'>, ManifestFunctionFileSource {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Initialization properties for {@link defineSduiPageFromFunctionFile}.
|
|
22
|
+
*/
|
|
23
|
+
export interface SduiPageFromFunctionFileProps extends Omit<SduiPageProps, 'function' | 'name' | 'sduiPageId'>, ManifestFunctionFromFileProps {
|
|
24
|
+
/** Unique identifier for the SDUI page. */
|
|
25
|
+
readonly pageId: string;
|
|
26
|
+
/** Display name shown as the app tab label. */
|
|
27
|
+
readonly pageName: string;
|
|
28
|
+
}
|
|
29
|
+
/** Result returned by {@link defineSduiPageFromFunctionFile}. */
|
|
30
|
+
export interface SduiPageFromFunctionFileResult {
|
|
31
|
+
/** Manifest function created from the provided source file. */
|
|
32
|
+
readonly function: ManifestFunction;
|
|
33
|
+
/** SDUI page wired to the created manifest function. */
|
|
34
|
+
readonly page: SduiPage;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Initialization properties for {@link defineTypedWorkflowFromFunctionFile}.
|
|
38
|
+
*
|
|
39
|
+
* @typeParam TDefinition - Typed custom-object definition carried by the workflow trigger.
|
|
40
|
+
*/
|
|
41
|
+
export interface TypedWorkflowFromFunctionFileProps<TDefinition extends AnyCustomObjectDefinition = AnyCustomObjectDefinition> extends Omit<TypedWorkflowProps<TDefinition>, 'function'> {
|
|
42
|
+
/** Function metadata and source-file location for the workflow handler. */
|
|
43
|
+
readonly function: ManifestFunctionFromFileProps;
|
|
44
|
+
}
|
|
45
|
+
/** Result returned by {@link defineTypedWorkflowFromFunctionFile}. */
|
|
46
|
+
export interface TypedWorkflowFromFunctionFileResult {
|
|
47
|
+
/** Manifest function created from the provided source file. */
|
|
48
|
+
readonly function: ManifestFunction;
|
|
49
|
+
/** Workflow wired to the created manifest function. */
|
|
50
|
+
readonly workflow: Workflow;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Loads one manifest function source file from disk.
|
|
54
|
+
*
|
|
55
|
+
* @param source - Directory + file-name pair describing the source file to read.
|
|
56
|
+
* @returns UTF-8 TypeScript handler source.
|
|
57
|
+
*/
|
|
58
|
+
export declare function loadManifestFunctionCode(source: ManifestFunctionFileSource): string;
|
|
59
|
+
/**
|
|
60
|
+
* Defines one manifest function by loading its handler source code from disk.
|
|
61
|
+
*
|
|
62
|
+
* @param scope - Manifest scope that should own the function.
|
|
63
|
+
* @param props - Function properties plus the source-file location.
|
|
64
|
+
* @returns Manifest function registered in the provided scope.
|
|
65
|
+
*/
|
|
66
|
+
export declare function defineManifestFunctionFromFile(scope: ManifestScope, props: ManifestFunctionFromFileProps): ManifestFunction;
|
|
67
|
+
/**
|
|
68
|
+
* Defines one SDUI page and its backing manifest function from a source file.
|
|
69
|
+
*
|
|
70
|
+
* @param scope - Manifest scope that should own the function and page.
|
|
71
|
+
* @param props - Function properties, source-file location, and page wiring metadata.
|
|
72
|
+
* @returns Created manifest function plus the SDUI page wired to it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function defineSduiPageFromFunctionFile(scope: ManifestScope, props: SduiPageFromFunctionFileProps): SduiPageFromFunctionFileResult;
|
|
75
|
+
/**
|
|
76
|
+
* Defines one workflow and its backing manifest function from a source file.
|
|
77
|
+
*
|
|
78
|
+
* Prefer this helper when one workflow owns one colocated handler file and the
|
|
79
|
+
* caller wants the file loading plus workflow wiring in one step.
|
|
80
|
+
*
|
|
81
|
+
* @param scope - Manifest scope that should own the function and workflow.
|
|
82
|
+
* @param props - Workflow properties plus the function source-file location.
|
|
83
|
+
* @returns Created manifest function plus the workflow wired to it.
|
|
84
|
+
* @typeParam TDefinition - Typed custom-object definition carried by the workflow trigger.
|
|
85
|
+
*/
|
|
86
|
+
export declare function defineTypedWorkflowFromFunctionFile<TDefinition extends AnyCustomObjectDefinition = AnyCustomObjectDefinition>(scope: ManifestScope, props: TypedWorkflowFromFunctionFileProps<TDefinition>): TypedWorkflowFromFunctionFileResult;
|
|
87
|
+
//# sourceMappingURL=function-file.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-file.d.mts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/function-file.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,QAAQ,EACd,qCAAiC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,sDAAkD;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,uCAAmC;AAC5E,OAAO,EAAuB,KAAK,kBAAkB,EAAE,uBAAmB;AAE1E;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,qDAAqD;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,oDAAoD;IACpD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,6BACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,EACzC,0BAA0B;CAAG;AAEjC;;GAEG;AACH,MAAM,WAAW,6BACf,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,MAAM,GAAG,YAAY,CAAC,EAC7D,6BAA6B;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,iEAAiE;AACjE,MAAM,WAAW,8BAA8B;IAC7C,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,kCAAkC,CACjD,WAAW,SAAS,yBAAyB,GAAG,yBAAyB,CACzE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACzD,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;CAClD;AAED,sEAAsE;AACtE,MAAM,WAAW,mCAAmC;IAClD,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,0BAA0B,GAAG,MAAM,CAEnF;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,6BAA6B,GACnC,gBAAgB,CAMlB;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,6BAA6B,GACnC,8BAA8B,CAWhC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mCAAmC,CACjD,WAAW,SAAS,yBAAyB,GAAG,yBAAyB,EAEzE,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,kCAAkC,CAAC,WAAW,CAAC,GACrD,mCAAmC,CAUrC"}
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ManifestFunction, type ManifestFunctionProps, SduiPage, type SduiPageProps, type Workflow } from "../../../../lib/manifest.js";
|
|
2
|
+
import type { ManifestScope } from "../../../../lib/manifest/manifest-builder.js";
|
|
3
|
+
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.js";
|
|
4
|
+
import { type TypedWorkflowProps } from "./workflow.js";
|
|
5
|
+
/**
|
|
6
|
+
* Shared properties for helpers that load manifest function source code from a
|
|
7
|
+
* file on disk.
|
|
8
|
+
*/
|
|
9
|
+
export interface ManifestFunctionFileSource {
|
|
10
|
+
/** Directory containing the function source file. */
|
|
11
|
+
readonly codeDirectory: string;
|
|
12
|
+
/** File name to read from {@link codeDirectory}. */
|
|
13
|
+
readonly codeFilename: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Initialization properties for {@link defineManifestFunctionFromFile}.
|
|
17
|
+
*/
|
|
18
|
+
export interface ManifestFunctionFromFileProps extends Omit<ManifestFunctionProps, 'code'>, ManifestFunctionFileSource {
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Initialization properties for {@link defineSduiPageFromFunctionFile}.
|
|
22
|
+
*/
|
|
23
|
+
export interface SduiPageFromFunctionFileProps extends Omit<SduiPageProps, 'function' | 'name' | 'sduiPageId'>, ManifestFunctionFromFileProps {
|
|
24
|
+
/** Unique identifier for the SDUI page. */
|
|
25
|
+
readonly pageId: string;
|
|
26
|
+
/** Display name shown as the app tab label. */
|
|
27
|
+
readonly pageName: string;
|
|
28
|
+
}
|
|
29
|
+
/** Result returned by {@link defineSduiPageFromFunctionFile}. */
|
|
30
|
+
export interface SduiPageFromFunctionFileResult {
|
|
31
|
+
/** Manifest function created from the provided source file. */
|
|
32
|
+
readonly function: ManifestFunction;
|
|
33
|
+
/** SDUI page wired to the created manifest function. */
|
|
34
|
+
readonly page: SduiPage;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Initialization properties for {@link defineTypedWorkflowFromFunctionFile}.
|
|
38
|
+
*
|
|
39
|
+
* @typeParam TDefinition - Typed custom-object definition carried by the workflow trigger.
|
|
40
|
+
*/
|
|
41
|
+
export interface TypedWorkflowFromFunctionFileProps<TDefinition extends AnyCustomObjectDefinition = AnyCustomObjectDefinition> extends Omit<TypedWorkflowProps<TDefinition>, 'function'> {
|
|
42
|
+
/** Function metadata and source-file location for the workflow handler. */
|
|
43
|
+
readonly function: ManifestFunctionFromFileProps;
|
|
44
|
+
}
|
|
45
|
+
/** Result returned by {@link defineTypedWorkflowFromFunctionFile}. */
|
|
46
|
+
export interface TypedWorkflowFromFunctionFileResult {
|
|
47
|
+
/** Manifest function created from the provided source file. */
|
|
48
|
+
readonly function: ManifestFunction;
|
|
49
|
+
/** Workflow wired to the created manifest function. */
|
|
50
|
+
readonly workflow: Workflow;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* Loads one manifest function source file from disk.
|
|
54
|
+
*
|
|
55
|
+
* @param source - Directory + file-name pair describing the source file to read.
|
|
56
|
+
* @returns UTF-8 TypeScript handler source.
|
|
57
|
+
*/
|
|
58
|
+
export declare function loadManifestFunctionCode(source: ManifestFunctionFileSource): string;
|
|
59
|
+
/**
|
|
60
|
+
* Defines one manifest function by loading its handler source code from disk.
|
|
61
|
+
*
|
|
62
|
+
* @param scope - Manifest scope that should own the function.
|
|
63
|
+
* @param props - Function properties plus the source-file location.
|
|
64
|
+
* @returns Manifest function registered in the provided scope.
|
|
65
|
+
*/
|
|
66
|
+
export declare function defineManifestFunctionFromFile(scope: ManifestScope, props: ManifestFunctionFromFileProps): ManifestFunction;
|
|
67
|
+
/**
|
|
68
|
+
* Defines one SDUI page and its backing manifest function from a source file.
|
|
69
|
+
*
|
|
70
|
+
* @param scope - Manifest scope that should own the function and page.
|
|
71
|
+
* @param props - Function properties, source-file location, and page wiring metadata.
|
|
72
|
+
* @returns Created manifest function plus the SDUI page wired to it.
|
|
73
|
+
*/
|
|
74
|
+
export declare function defineSduiPageFromFunctionFile(scope: ManifestScope, props: SduiPageFromFunctionFileProps): SduiPageFromFunctionFileResult;
|
|
75
|
+
/**
|
|
76
|
+
* Defines one workflow and its backing manifest function from a source file.
|
|
77
|
+
*
|
|
78
|
+
* Prefer this helper when one workflow owns one colocated handler file and the
|
|
79
|
+
* caller wants the file loading plus workflow wiring in one step.
|
|
80
|
+
*
|
|
81
|
+
* @param scope - Manifest scope that should own the function and workflow.
|
|
82
|
+
* @param props - Workflow properties plus the function source-file location.
|
|
83
|
+
* @returns Created manifest function plus the workflow wired to it.
|
|
84
|
+
* @typeParam TDefinition - Typed custom-object definition carried by the workflow trigger.
|
|
85
|
+
*/
|
|
86
|
+
export declare function defineTypedWorkflowFromFunctionFile<TDefinition extends AnyCustomObjectDefinition = AnyCustomObjectDefinition>(scope: ManifestScope, props: TypedWorkflowFromFunctionFileProps<TDefinition>): TypedWorkflowFromFunctionFileResult;
|
|
87
|
+
//# sourceMappingURL=function-file.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-file.d.ts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/function-file.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,QAAQ,EACR,KAAK,aAAa,EAClB,KAAK,QAAQ,EACd,oCAAiC;AAClC,OAAO,KAAK,EAAE,aAAa,EAAE,qDAAkD;AAC/E,OAAO,KAAK,EAAE,yBAAyB,EAAE,sCAAmC;AAC5E,OAAO,EAAuB,KAAK,kBAAkB,EAAE,sBAAmB;AAE1E;;;GAGG;AACH,MAAM,WAAW,0BAA0B;IACzC,qDAAqD;IACrD,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,oDAAoD;IACpD,QAAQ,CAAC,YAAY,EAAE,MAAM,CAAC;CAC/B;AAED;;GAEG;AACH,MAAM,WAAW,6BACf,SAAQ,IAAI,CAAC,qBAAqB,EAAE,MAAM,CAAC,EACzC,0BAA0B;CAAG;AAEjC;;GAEG;AACH,MAAM,WAAW,6BACf,SAAQ,IAAI,CAAC,aAAa,EAAE,UAAU,GAAG,MAAM,GAAG,YAAY,CAAC,EAC7D,6BAA6B;IAC/B,2CAA2C;IAC3C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,+CAA+C;IAC/C,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;CAC3B;AAED,iEAAiE;AACjE,MAAM,WAAW,8BAA8B;IAC7C,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,kCAAkC,CACjD,WAAW,SAAS,yBAAyB,GAAG,yBAAyB,CACzE,SAAQ,IAAI,CAAC,kBAAkB,CAAC,WAAW,CAAC,EAAE,UAAU,CAAC;IACzD,2EAA2E;IAC3E,QAAQ,CAAC,QAAQ,EAAE,6BAA6B,CAAC;CAClD;AAED,sEAAsE;AACtE,MAAM,WAAW,mCAAmC;IAClD,+DAA+D;IAC/D,QAAQ,CAAC,QAAQ,EAAE,gBAAgB,CAAC;IACpC,uDAAuD;IACvD,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B;AAED;;;;;GAKG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,0BAA0B,GAAG,MAAM,CAEnF;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,6BAA6B,GACnC,gBAAgB,CAMlB;AAED;;;;;;GAMG;AACH,wBAAgB,8BAA8B,CAC5C,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,6BAA6B,GACnC,8BAA8B,CAWhC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mCAAmC,CACjD,WAAW,SAAS,yBAAyB,GAAG,yBAAyB,EAEzE,KAAK,EAAE,aAAa,EACpB,KAAK,EAAE,kCAAkC,CAAC,WAAW,CAAC,GACrD,mCAAmC,CAUrC"}
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.loadManifestFunctionCode = loadManifestFunctionCode;
|
|
4
|
+
exports.defineManifestFunctionFromFile = defineManifestFunctionFromFile;
|
|
5
|
+
exports.defineSduiPageFromFunctionFile = defineSduiPageFromFunctionFile;
|
|
6
|
+
exports.defineTypedWorkflowFromFunctionFile = defineTypedWorkflowFromFunctionFile;
|
|
7
|
+
const tslib_1 = require("../../../../internal/tslib.js");
|
|
8
|
+
const fs = tslib_1.__importStar(require("node:fs"));
|
|
9
|
+
const path = tslib_1.__importStar(require("node:path"));
|
|
10
|
+
const manifest_1 = require("../../../../lib/manifest.js");
|
|
11
|
+
const workflow_1 = require("./workflow.js");
|
|
12
|
+
/**
|
|
13
|
+
* Loads one manifest function source file from disk.
|
|
14
|
+
*
|
|
15
|
+
* @param source - Directory + file-name pair describing the source file to read.
|
|
16
|
+
* @returns UTF-8 TypeScript handler source.
|
|
17
|
+
*/
|
|
18
|
+
function loadManifestFunctionCode(source) {
|
|
19
|
+
return fs.readFileSync(path.join(source.codeDirectory, source.codeFilename), 'utf-8');
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Defines one manifest function by loading its handler source code from disk.
|
|
23
|
+
*
|
|
24
|
+
* @param scope - Manifest scope that should own the function.
|
|
25
|
+
* @param props - Function properties plus the source-file location.
|
|
26
|
+
* @returns Manifest function registered in the provided scope.
|
|
27
|
+
*/
|
|
28
|
+
function defineManifestFunctionFromFile(scope, props) {
|
|
29
|
+
const { codeDirectory, codeFilename, ...rest } = props;
|
|
30
|
+
return new manifest_1.ManifestFunction(scope, {
|
|
31
|
+
...rest,
|
|
32
|
+
code: loadManifestFunctionCode({ codeDirectory, codeFilename }),
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Defines one SDUI page and its backing manifest function from a source file.
|
|
37
|
+
*
|
|
38
|
+
* @param scope - Manifest scope that should own the function and page.
|
|
39
|
+
* @param props - Function properties, source-file location, and page wiring metadata.
|
|
40
|
+
* @returns Created manifest function plus the SDUI page wired to it.
|
|
41
|
+
*/
|
|
42
|
+
function defineSduiPageFromFunctionFile(scope, props) {
|
|
43
|
+
const { pageId, pageName, ...functionProps } = props;
|
|
44
|
+
const createdFunction = defineManifestFunctionFromFile(scope, functionProps);
|
|
45
|
+
return {
|
|
46
|
+
function: createdFunction,
|
|
47
|
+
page: new manifest_1.SduiPage(scope, {
|
|
48
|
+
sduiPageId: pageId,
|
|
49
|
+
name: pageName,
|
|
50
|
+
function: createdFunction,
|
|
51
|
+
}),
|
|
52
|
+
};
|
|
53
|
+
}
|
|
54
|
+
/**
|
|
55
|
+
* Defines one workflow and its backing manifest function from a source file.
|
|
56
|
+
*
|
|
57
|
+
* Prefer this helper when one workflow owns one colocated handler file and the
|
|
58
|
+
* caller wants the file loading plus workflow wiring in one step.
|
|
59
|
+
*
|
|
60
|
+
* @param scope - Manifest scope that should own the function and workflow.
|
|
61
|
+
* @param props - Workflow properties plus the function source-file location.
|
|
62
|
+
* @returns Created manifest function plus the workflow wired to it.
|
|
63
|
+
* @typeParam TDefinition - Typed custom-object definition carried by the workflow trigger.
|
|
64
|
+
*/
|
|
65
|
+
function defineTypedWorkflowFromFunctionFile(scope, props) {
|
|
66
|
+
const { function: functionProps, ...workflowProps } = props;
|
|
67
|
+
const createdFunction = defineManifestFunctionFromFile(scope, functionProps);
|
|
68
|
+
return {
|
|
69
|
+
function: createdFunction,
|
|
70
|
+
workflow: (0, workflow_1.defineTypedWorkflow)(scope, {
|
|
71
|
+
...workflowProps,
|
|
72
|
+
function: createdFunction,
|
|
73
|
+
}),
|
|
74
|
+
};
|
|
75
|
+
}
|
|
76
|
+
//# sourceMappingURL=function-file.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-file.js","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/function-file.ts"],"names":[],"mappings":";;AA6EA,4DAEC;AASD,wEASC;AASD,wEAcC;AAaD,kFAeC;;AApJD,oDAA8B;AAC9B,wDAAkC;AAClC,0DAMkC;AAGlC,4CAA0E;AA4D1E;;;;;GAKG;AACH,SAAgB,wBAAwB,CAAC,MAAkC;IACzE,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,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fs from 'node:fs';
|
|
2
|
+
import * as path from 'node:path';
|
|
3
|
+
import { ManifestFunction, SduiPage, } from "../../../../lib/manifest.mjs";
|
|
4
|
+
import { defineTypedWorkflow } from "./workflow.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* Loads one manifest function source file from disk.
|
|
7
|
+
*
|
|
8
|
+
* @param source - Directory + file-name pair describing the source file to read.
|
|
9
|
+
* @returns UTF-8 TypeScript handler source.
|
|
10
|
+
*/
|
|
11
|
+
export function loadManifestFunctionCode(source) {
|
|
12
|
+
return fs.readFileSync(path.join(source.codeDirectory, source.codeFilename), 'utf-8');
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Defines one manifest function by loading its handler source code from disk.
|
|
16
|
+
*
|
|
17
|
+
* @param scope - Manifest scope that should own the function.
|
|
18
|
+
* @param props - Function properties plus the source-file location.
|
|
19
|
+
* @returns Manifest function registered in the provided scope.
|
|
20
|
+
*/
|
|
21
|
+
export function defineManifestFunctionFromFile(scope, props) {
|
|
22
|
+
const { codeDirectory, codeFilename, ...rest } = props;
|
|
23
|
+
return new ManifestFunction(scope, {
|
|
24
|
+
...rest,
|
|
25
|
+
code: loadManifestFunctionCode({ codeDirectory, codeFilename }),
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Defines one SDUI page and its backing manifest function from a source file.
|
|
30
|
+
*
|
|
31
|
+
* @param scope - Manifest scope that should own the function and page.
|
|
32
|
+
* @param props - Function properties, source-file location, and page wiring metadata.
|
|
33
|
+
* @returns Created manifest function plus the SDUI page wired to it.
|
|
34
|
+
*/
|
|
35
|
+
export function defineSduiPageFromFunctionFile(scope, props) {
|
|
36
|
+
const { pageId, pageName, ...functionProps } = props;
|
|
37
|
+
const createdFunction = defineManifestFunctionFromFile(scope, functionProps);
|
|
38
|
+
return {
|
|
39
|
+
function: createdFunction,
|
|
40
|
+
page: new SduiPage(scope, {
|
|
41
|
+
sduiPageId: pageId,
|
|
42
|
+
name: pageName,
|
|
43
|
+
function: createdFunction,
|
|
44
|
+
}),
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Defines one workflow and its backing manifest function from a source file.
|
|
49
|
+
*
|
|
50
|
+
* Prefer this helper when one workflow owns one colocated handler file and the
|
|
51
|
+
* caller wants the file loading plus workflow wiring in one step.
|
|
52
|
+
*
|
|
53
|
+
* @param scope - Manifest scope that should own the function and workflow.
|
|
54
|
+
* @param props - Workflow properties plus the function source-file location.
|
|
55
|
+
* @returns Created manifest function plus the workflow wired to it.
|
|
56
|
+
* @typeParam TDefinition - Typed custom-object definition carried by the workflow trigger.
|
|
57
|
+
*/
|
|
58
|
+
export function defineTypedWorkflowFromFunctionFile(scope, props) {
|
|
59
|
+
const { function: functionProps, ...workflowProps } = props;
|
|
60
|
+
const createdFunction = defineManifestFunctionFromFile(scope, functionProps);
|
|
61
|
+
return {
|
|
62
|
+
function: createdFunction,
|
|
63
|
+
workflow: defineTypedWorkflow(scope, {
|
|
64
|
+
...workflowProps,
|
|
65
|
+
function: createdFunction,
|
|
66
|
+
}),
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
//# sourceMappingURL=function-file.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"function-file.mjs","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/function-file.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAClC,OAAO,EACL,gBAAgB,EAEhB,QAAQ,GAGT,qCAAiC;AAGlC,OAAO,EAAE,mBAAmB,EAA2B,uBAAmB;AA4D1E;;;;;GAKG;AACH,MAAM,UAAU,wBAAwB,CAAC,MAAkC;IACzE,OAAO,EAAE,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,YAAY,CAAC,EAAE,OAA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+
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.mjs";
|
|
3
|
+
import type { ManifestConditionInput } from "./conditions.mjs";
|
|
4
|
+
import type { ManifestRegistration } from "./types.mjs";
|
|
5
|
+
import type { StandardManifestFieldName, TypedManifestFieldInput, TypedManifestFieldName } from "./field-resolution.mjs";
|
|
6
|
+
/**
|
|
7
|
+
* Standard field-name strings accepted by the typed list-view helper.
|
|
8
|
+
*
|
|
9
|
+
* @typeParam TDefinition - Object definition whose standard field-name strings should be exposed.
|
|
10
|
+
*/
|
|
11
|
+
export type StandardListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = StandardManifestFieldName<TDefinition>;
|
|
12
|
+
/**
|
|
13
|
+
* Field-name strings accepted by the typed list-view helper.
|
|
14
|
+
*
|
|
15
|
+
* @typeParam TDefinition - Object definition whose valid list-view field-name strings should be exposed.
|
|
16
|
+
*/
|
|
17
|
+
export type TypedListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldName<TDefinition>;
|
|
18
|
+
/**
|
|
19
|
+
* Field inputs accepted by the typed list-view helper.
|
|
20
|
+
*
|
|
21
|
+
* @typeParam TDefinition - Object definition whose list-view field inputs are being authored.
|
|
22
|
+
*/
|
|
23
|
+
export type TypedListViewFieldInput<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldInput<TDefinition>;
|
|
24
|
+
/**
|
|
25
|
+
* Initialization properties for {@link defineTypedListView}.
|
|
26
|
+
*
|
|
27
|
+
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
28
|
+
*/
|
|
29
|
+
export interface TypedListViewDefProps<TDefinition extends AnyCustomObjectDefinition> extends Omit<ListViewDefProps, 'fields' | 'orderBy' | 'rqlFilter'> {
|
|
30
|
+
/**
|
|
31
|
+
* Optional typed manifest-condition used to filter the list view.
|
|
32
|
+
*
|
|
33
|
+
* This is rendered into the underlying low-level `rqlFilter` string.
|
|
34
|
+
*/
|
|
35
|
+
readonly filter?: ManifestConditionInput<TDefinition>;
|
|
36
|
+
/**
|
|
37
|
+
* Optional low-level filter string retained for escape hatches.
|
|
38
|
+
*
|
|
39
|
+
* Prefer `filter` for typed custom-object conditions when possible.
|
|
40
|
+
*/
|
|
41
|
+
readonly rqlFilter?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Columns to display, expressed as typed field-name strings or concrete manifest field references.
|
|
44
|
+
*/
|
|
45
|
+
readonly fields: readonly TypedListViewFieldInput<TDefinition>[];
|
|
46
|
+
/**
|
|
47
|
+
* Optional field used for sorting. Accepts the same typed field inputs as `fields`.
|
|
48
|
+
*/
|
|
49
|
+
readonly orderBy?: TypedListViewFieldInput<TDefinition>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Registers a typed list view for a manifest custom object.
|
|
53
|
+
*
|
|
54
|
+
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
55
|
+
* It preserves the runtime behavior of that class while replacing the untyped
|
|
56
|
+
* `Field | string` authoring surface with an object-specific string-literal
|
|
57
|
+
* union that powers IntelliSense for valid field names.
|
|
58
|
+
*
|
|
59
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
60
|
+
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
61
|
+
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
62
|
+
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
63
|
+
*/
|
|
64
|
+
export declare function defineTypedListView<TDefinition extends AnyCustomObjectDefinition>(registration: ManifestRegistration<TDefinition>, props: TypedListViewDefProps<TDefinition>): ListViewDef;
|
|
65
|
+
//# sourceMappingURL=list-view.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-view.d.mts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,qCAAiC;AAC9E,OAAO,KAAK,EAAE,yBAAyB,EAAE,uCAA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|
|
2
|
+
import type { AnyCustomObjectDefinition } from "../../custom-objects/types.js";
|
|
3
|
+
import type { ManifestConditionInput } from "./conditions.js";
|
|
4
|
+
import type { ManifestRegistration } from "./types.js";
|
|
5
|
+
import type { StandardManifestFieldName, TypedManifestFieldInput, TypedManifestFieldName } from "./field-resolution.js";
|
|
6
|
+
/**
|
|
7
|
+
* Standard field-name strings accepted by the typed list-view helper.
|
|
8
|
+
*
|
|
9
|
+
* @typeParam TDefinition - Object definition whose standard field-name strings should be exposed.
|
|
10
|
+
*/
|
|
11
|
+
export type StandardListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = StandardManifestFieldName<TDefinition>;
|
|
12
|
+
/**
|
|
13
|
+
* Field-name strings accepted by the typed list-view helper.
|
|
14
|
+
*
|
|
15
|
+
* @typeParam TDefinition - Object definition whose valid list-view field-name strings should be exposed.
|
|
16
|
+
*/
|
|
17
|
+
export type TypedListViewFieldName<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldName<TDefinition>;
|
|
18
|
+
/**
|
|
19
|
+
* Field inputs accepted by the typed list-view helper.
|
|
20
|
+
*
|
|
21
|
+
* @typeParam TDefinition - Object definition whose list-view field inputs are being authored.
|
|
22
|
+
*/
|
|
23
|
+
export type TypedListViewFieldInput<TDefinition extends AnyCustomObjectDefinition> = TypedManifestFieldInput<TDefinition>;
|
|
24
|
+
/**
|
|
25
|
+
* Initialization properties for {@link defineTypedListView}.
|
|
26
|
+
*
|
|
27
|
+
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
28
|
+
*/
|
|
29
|
+
export interface TypedListViewDefProps<TDefinition extends AnyCustomObjectDefinition> extends Omit<ListViewDefProps, 'fields' | 'orderBy' | 'rqlFilter'> {
|
|
30
|
+
/**
|
|
31
|
+
* Optional typed manifest-condition used to filter the list view.
|
|
32
|
+
*
|
|
33
|
+
* This is rendered into the underlying low-level `rqlFilter` string.
|
|
34
|
+
*/
|
|
35
|
+
readonly filter?: ManifestConditionInput<TDefinition>;
|
|
36
|
+
/**
|
|
37
|
+
* Optional low-level filter string retained for escape hatches.
|
|
38
|
+
*
|
|
39
|
+
* Prefer `filter` for typed custom-object conditions when possible.
|
|
40
|
+
*/
|
|
41
|
+
readonly rqlFilter?: string;
|
|
42
|
+
/**
|
|
43
|
+
* Columns to display, expressed as typed field-name strings or concrete manifest field references.
|
|
44
|
+
*/
|
|
45
|
+
readonly fields: readonly TypedListViewFieldInput<TDefinition>[];
|
|
46
|
+
/**
|
|
47
|
+
* Optional field used for sorting. Accepts the same typed field inputs as `fields`.
|
|
48
|
+
*/
|
|
49
|
+
readonly orderBy?: TypedListViewFieldInput<TDefinition>;
|
|
50
|
+
}
|
|
51
|
+
/**
|
|
52
|
+
* Registers a typed list view for a manifest custom object.
|
|
53
|
+
*
|
|
54
|
+
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
55
|
+
* It preserves the runtime behavior of that class while replacing the untyped
|
|
56
|
+
* `Field | string` authoring surface with an object-specific string-literal
|
|
57
|
+
* union that powers IntelliSense for valid field names.
|
|
58
|
+
*
|
|
59
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
60
|
+
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
61
|
+
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
62
|
+
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
63
|
+
*/
|
|
64
|
+
export declare function defineTypedListView<TDefinition extends AnyCustomObjectDefinition>(registration: ManifestRegistration<TDefinition>, props: TypedListViewDefProps<TDefinition>): ListViewDef;
|
|
65
|
+
//# sourceMappingURL=list-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-view.d.ts","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,KAAK,gBAAgB,EAAE,oCAAiC;AAC9E,OAAO,KAAK,EAAE,yBAAyB,EAAE,sCAA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value: true });
|
|
3
|
+
exports.defineTypedListView = defineTypedListView;
|
|
4
|
+
const manifest_1 = require("../../../../lib/manifest.js");
|
|
5
|
+
const conditions_1 = require("./conditions.js");
|
|
6
|
+
const field_resolution_1 = require("./field-resolution.js");
|
|
7
|
+
/**
|
|
8
|
+
* Registers a typed list view for a manifest custom object.
|
|
9
|
+
*
|
|
10
|
+
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
11
|
+
* It preserves the runtime behavior of that class while replacing the untyped
|
|
12
|
+
* `Field | string` authoring surface with an object-specific string-literal
|
|
13
|
+
* union that powers IntelliSense for valid field names.
|
|
14
|
+
*
|
|
15
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
16
|
+
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
17
|
+
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
18
|
+
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
19
|
+
*/
|
|
20
|
+
function defineTypedListView(registration, props) {
|
|
21
|
+
const { fields, orderBy, filter, rqlFilter, ...rest } = props;
|
|
22
|
+
if (filter != null && rqlFilter != null) {
|
|
23
|
+
throw new Error('defineTypedListView(...): use either filter or rqlFilter, not both.');
|
|
24
|
+
}
|
|
25
|
+
return new manifest_1.ListViewDef(registration.object, {
|
|
26
|
+
...rest,
|
|
27
|
+
fields: fields.map((field) => (0, field_resolution_1.resolveTypedManifestField)(registration, field)),
|
|
28
|
+
...(orderBy != null ? { orderBy: (0, field_resolution_1.resolveTypedManifestField)(registration, orderBy) } : {}),
|
|
29
|
+
...(filter != null ? { rqlFilter: (0, conditions_1.resolveManifestConditionInput)(registration, filter) } : {}),
|
|
30
|
+
...(rqlFilter != null ? { rqlFilter } : {}),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=list-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-view.js","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":";;AA8EA,kDAgBC;AA9FD,0DAA8E;AAG9E,gDAA6D;AAO7D,4DAA+D;AAuD/D;;;;;;;;;;;;GAYG;AACH,SAAgB,mBAAmB,CACjC,YAA+C,EAC/C,KAAyC;IAEzC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC9D,IAAI,MAAM,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,IAAI,sBAAW,CAAC,YAAY,CAAC,MAAM,EAAE;QAC1C,GAAG,IAAI;QACP,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,IAAA,4CAAyB,EAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC7E,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,IAAA,4CAAyB,EAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,IAAA,0CAA6B,EAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { ListViewDef } from "../../../../lib/manifest.mjs";
|
|
2
|
+
import { resolveManifestConditionInput } from "./conditions.mjs";
|
|
3
|
+
import { resolveTypedManifestField } from "./field-resolution.mjs";
|
|
4
|
+
/**
|
|
5
|
+
* Registers a typed list view for a manifest custom object.
|
|
6
|
+
*
|
|
7
|
+
* This helper sits on top of the low-level {@link ListViewDef} manifest class.
|
|
8
|
+
* It preserves the runtime behavior of that class while replacing the untyped
|
|
9
|
+
* `Field | string` authoring surface with an object-specific string-literal
|
|
10
|
+
* union that powers IntelliSense for valid field names.
|
|
11
|
+
*
|
|
12
|
+
* @param registration - Manifest registration produced from the typed object definition.
|
|
13
|
+
* @param props - Typed list-view properties to materialize into the manifest class.
|
|
14
|
+
* @returns Low-level manifest list-view instance with typed fields resolved.
|
|
15
|
+
* @typeParam TDefinition - Object definition whose valid list-view fields should be enforced.
|
|
16
|
+
*/
|
|
17
|
+
export function defineTypedListView(registration, props) {
|
|
18
|
+
const { fields, orderBy, filter, rqlFilter, ...rest } = props;
|
|
19
|
+
if (filter != null && rqlFilter != null) {
|
|
20
|
+
throw new Error('defineTypedListView(...): use either filter or rqlFilter, not both.');
|
|
21
|
+
}
|
|
22
|
+
return new ListViewDef(registration.object, {
|
|
23
|
+
...rest,
|
|
24
|
+
fields: fields.map((field) => resolveTypedManifestField(registration, field)),
|
|
25
|
+
...(orderBy != null ? { orderBy: resolveTypedManifestField(registration, orderBy) } : {}),
|
|
26
|
+
...(filter != null ? { rqlFilter: resolveManifestConditionInput(registration, filter) } : {}),
|
|
27
|
+
...(rqlFilter != null ? { rqlFilter } : {}),
|
|
28
|
+
});
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=list-view.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"list-view.mjs","sourceRoot":"","sources":["../../../../src/core/platform/manifest/custom-objects/list-view.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAyB,qCAAiC;AAG9E,OAAO,EAAE,6BAA6B,EAAE,yBAAqB;AAO7D,OAAO,EAAE,yBAAyB,EAAE,+BAA2B;AAuD/D;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,mBAAmB,CACjC,YAA+C,EAC/C,KAAyC;IAEzC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC9D,IAAI,MAAM,IAAI,IAAI,IAAI,SAAS,IAAI,IAAI,EAAE,CAAC;QACxC,MAAM,IAAI,KAAK,CAAC,qEAAqE,CAAC,CAAC;IACzF,CAAC;IAED,OAAO,IAAI,WAAW,CAAC,YAAY,CAAC,MAAM,EAAE;QAC1C,GAAG,IAAI;QACP,MAAM,EAAE,MAAM,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,yBAAyB,CAAC,YAAY,EAAE,KAAK,CAAC,CAAC;QAC7E,GAAG,CAAC,OAAO,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,yBAAyB,CAAC,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QACzF,GAAG,CAAC,MAAM,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,6BAA6B,CAAC,YAAY,EAAE,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC7F,GAAG,CAAC,SAAS,IAAI,IAAI,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAC5C,CAAC,CAAC;AACL,CAAC"}
|