@rippling/rippling-sdk 0.2.0-alpha.100
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/LICENSE +201 -0
- package/api-promise.d.mts +3 -0
- package/api-promise.d.mts.map +1 -0
- package/api-promise.d.ts +3 -0
- package/api-promise.d.ts.map +1 -0
- package/api-promise.js +6 -0
- package/api-promise.js.map +1 -0
- package/api-promise.mjs +3 -0
- package/api-promise.mjs.map +1 -0
- package/client.d.mts +779 -0
- package/client.d.mts.map +1 -0
- package/client.d.ts +779 -0
- package/client.d.ts.map +1 -0
- package/client.js +1083 -0
- package/client.js.map +1 -0
- package/client.mjs +1079 -0
- package/client.mjs.map +1 -0
- package/core/api-promise.d.mts +46 -0
- package/core/api-promise.d.mts.map +1 -0
- package/core/api-promise.d.ts +46 -0
- package/core/api-promise.d.ts.map +1 -0
- package/core/api-promise.js +74 -0
- package/core/api-promise.js.map +1 -0
- package/core/api-promise.mjs +70 -0
- package/core/api-promise.mjs.map +1 -0
- package/core/error.d.mts +46 -0
- package/core/error.d.mts.map +1 -0
- package/core/error.d.ts +46 -0
- package/core/error.d.ts.map +1 -0
- package/core/error.js +113 -0
- package/core/error.js.map +1 -0
- package/core/error.mjs +97 -0
- package/core/error.mjs.map +1 -0
- package/core/pagination.d.mts +50 -0
- package/core/pagination.d.mts.map +1 -0
- package/core/pagination.d.ts +50 -0
- package/core/pagination.d.ts.map +1 -0
- package/core/pagination.js +104 -0
- package/core/pagination.js.map +1 -0
- package/core/pagination.mjs +98 -0
- package/core/pagination.mjs.map +1 -0
- 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/resource.d.mts +6 -0
- package/core/resource.d.mts.map +1 -0
- package/core/resource.d.ts +6 -0
- package/core/resource.d.ts.map +1 -0
- package/core/resource.js +11 -0
- package/core/resource.js.map +1 -0
- package/core/resource.mjs +7 -0
- package/core/resource.mjs.map +1 -0
- package/core/uploads.d.mts +3 -0
- package/core/uploads.d.mts.map +1 -0
- package/core/uploads.d.ts +3 -0
- package/core/uploads.d.ts.map +1 -0
- package/core/uploads.js +6 -0
- package/core/uploads.js.map +1 -0
- package/core/uploads.mjs +2 -0
- package/core/uploads.mjs.map +1 -0
- package/error.d.mts +3 -0
- package/error.d.mts.map +1 -0
- package/error.d.ts +3 -0
- package/error.d.ts.map +1 -0
- package/error.js +6 -0
- package/error.js.map +1 -0
- package/error.mjs +3 -0
- package/error.mjs.map +1 -0
- package/examples/.keep +4 -0
- package/examples/functions/durable.ts +85 -0
- package/examples/manifest/acp-agent/acp-agent.ts +50 -0
- package/examples/manifest/acp-agent/agent/index.ts +9 -0
- package/examples/manifest/custom-object-creation-workflow/custom-object-creation-workflow.ts +75 -0
- package/examples/manifest/custom-skill/custom-skill.ts +45 -0
- package/examples/manifest/dental-practice-management/dental-practice-management.ts +797 -0
- package/examples/manifest/dental-practice-management/functions/chair-schedule.ts +28 -0
- package/examples/manifest/dental-practice-management/functions/complete-visit.ts +110 -0
- package/examples/manifest/dental-practice-management/functions/operatory-list.ts +28 -0
- package/examples/manifest/dental-practice-management/functions/patient-list.ts +28 -0
- package/examples/manifest/dental-practice-management/functions/treatment-plan-list.ts +28 -0
- package/examples/manifest/existing-manifest-mutations/existing-manifest-mutations.ts +247 -0
- package/examples/manifest/field-service-dispatch/field-service-dispatch.ts +530 -0
- package/examples/manifest/grant-program-management/grant-program-management.ts +594 -0
- package/examples/manifest/gym-membership-management/functions/check-in-desk.ts +28 -0
- package/examples/manifest/gym-membership-management/functions/member-list.ts +28 -0
- package/examples/manifest/gym-membership-management/functions/today-schedule.ts +28 -0
- package/examples/manifest/gym-membership-management/functions/trainer-list.ts +28 -0
- package/examples/manifest/gym-membership-management/gym-membership-management.ts +728 -0
- package/examples/manifest/procurement-approval-hub/procurement-approval-hub.ts +554 -0
- package/examples/manifest/simple-todo-app/functions/mark-done.ts +48 -0
- package/examples/manifest/simple-todo-app/functions/todo-list.ts +28 -0
- package/examples/manifest/simple-todo-app/simple-todo-app.ts +188 -0
- package/examples/manifest/todo-app-without-object-list-view/functions/todo-page.ts +497 -0
- package/examples/manifest/todo-app-without-object-list-view/todo-app-without-object-list-view.ts +111 -0
- package/functions.d.mts +166 -0
- package/functions.d.mts.map +1 -0
- package/functions.d.ts +166 -0
- package/functions.d.ts.map +1 -0
- package/functions.js +60 -0
- package/functions.js.map +1 -0
- package/functions.mjs +51 -0
- package/functions.mjs.map +1 -0
- package/index.d.mts +8 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +8 -0
- package/index.d.ts.map +1 -0
- package/index.js +34 -0
- package/index.js.map +1 -0
- package/index.mjs +9 -0
- package/index.mjs.map +1 -0
- package/internal/builtin-types.d.mts +73 -0
- package/internal/builtin-types.d.mts.map +1 -0
- package/internal/builtin-types.d.ts +73 -0
- package/internal/builtin-types.d.ts.map +1 -0
- package/internal/builtin-types.js +4 -0
- package/internal/builtin-types.js.map +1 -0
- package/internal/builtin-types.mjs +3 -0
- package/internal/builtin-types.mjs.map +1 -0
- package/internal/detect-platform.d.mts +15 -0
- package/internal/detect-platform.d.mts.map +1 -0
- package/internal/detect-platform.d.ts +15 -0
- package/internal/detect-platform.d.ts.map +1 -0
- package/internal/detect-platform.js +162 -0
- package/internal/detect-platform.js.map +1 -0
- package/internal/detect-platform.mjs +157 -0
- package/internal/detect-platform.mjs.map +1 -0
- package/internal/errors.d.mts +3 -0
- package/internal/errors.d.mts.map +1 -0
- package/internal/errors.d.ts +3 -0
- package/internal/errors.d.ts.map +1 -0
- package/internal/errors.js +41 -0
- package/internal/errors.js.map +1 -0
- package/internal/errors.mjs +36 -0
- package/internal/errors.mjs.map +1 -0
- package/internal/headers.d.mts +20 -0
- package/internal/headers.d.mts.map +1 -0
- package/internal/headers.d.ts +20 -0
- package/internal/headers.d.ts.map +1 -0
- package/internal/headers.js +79 -0
- package/internal/headers.js.map +1 -0
- package/internal/headers.mjs +74 -0
- package/internal/headers.mjs.map +1 -0
- package/internal/parse.d.mts +12 -0
- package/internal/parse.d.mts.map +1 -0
- package/internal/parse.d.ts +12 -0
- package/internal/parse.d.ts.map +1 -0
- package/internal/parse.js +40 -0
- package/internal/parse.js.map +1 -0
- package/internal/parse.mjs +37 -0
- package/internal/parse.mjs.map +1 -0
- package/internal/request-options.d.mts +75 -0
- package/internal/request-options.d.mts.map +1 -0
- package/internal/request-options.d.ts +75 -0
- package/internal/request-options.d.ts.map +1 -0
- package/internal/request-options.js +14 -0
- package/internal/request-options.js.map +1 -0
- package/internal/request-options.mjs +10 -0
- package/internal/request-options.mjs.map +1 -0
- package/internal/shim-types.d.mts +17 -0
- package/internal/shim-types.d.mts.map +1 -0
- package/internal/shim-types.d.ts +17 -0
- package/internal/shim-types.d.ts.map +1 -0
- package/internal/shim-types.js +4 -0
- package/internal/shim-types.js.map +1 -0
- package/internal/shim-types.mjs +3 -0
- package/internal/shim-types.mjs.map +1 -0
- package/internal/shims.d.mts +26 -0
- package/internal/shims.d.mts.map +1 -0
- package/internal/shims.d.ts +26 -0
- package/internal/shims.d.ts.map +1 -0
- package/internal/shims.js +92 -0
- package/internal/shims.js.map +1 -0
- package/internal/shims.mjs +85 -0
- package/internal/shims.mjs.map +1 -0
- package/internal/to-file.d.mts +45 -0
- package/internal/to-file.d.mts.map +1 -0
- package/internal/to-file.d.ts +45 -0
- package/internal/to-file.d.ts.map +1 -0
- package/internal/to-file.js +91 -0
- package/internal/to-file.js.map +1 -0
- package/internal/to-file.mjs +88 -0
- package/internal/to-file.mjs.map +1 -0
- package/internal/tslib.js +85 -0
- package/internal/tslib.mjs +17 -0
- package/internal/types.d.mts +69 -0
- package/internal/types.d.mts.map +1 -0
- package/internal/types.d.ts +69 -0
- package/internal/types.d.ts.map +1 -0
- package/internal/types.js +4 -0
- package/internal/types.js.map +1 -0
- package/internal/types.mjs +3 -0
- package/internal/types.mjs.map +1 -0
- package/internal/uploads.d.mts +42 -0
- package/internal/uploads.d.mts.map +1 -0
- package/internal/uploads.d.ts +42 -0
- package/internal/uploads.d.ts.map +1 -0
- package/internal/uploads.js +141 -0
- package/internal/uploads.js.map +1 -0
- package/internal/uploads.mjs +131 -0
- package/internal/uploads.mjs.map +1 -0
- package/internal/utils/base64.d.mts +3 -0
- package/internal/utils/base64.d.mts.map +1 -0
- package/internal/utils/base64.d.ts +3 -0
- package/internal/utils/base64.d.ts.map +1 -0
- package/internal/utils/base64.js +38 -0
- package/internal/utils/base64.js.map +1 -0
- package/internal/utils/base64.mjs +33 -0
- package/internal/utils/base64.mjs.map +1 -0
- package/internal/utils/bytes.d.mts +4 -0
- package/internal/utils/bytes.d.mts.map +1 -0
- package/internal/utils/bytes.d.ts +4 -0
- package/internal/utils/bytes.d.ts.map +1 -0
- package/internal/utils/bytes.js +31 -0
- package/internal/utils/bytes.js.map +1 -0
- package/internal/utils/bytes.mjs +26 -0
- package/internal/utils/bytes.mjs.map +1 -0
- package/internal/utils/env.d.mts +9 -0
- package/internal/utils/env.d.mts.map +1 -0
- package/internal/utils/env.d.ts +9 -0
- package/internal/utils/env.d.ts.map +1 -0
- package/internal/utils/env.js +22 -0
- package/internal/utils/env.js.map +1 -0
- package/internal/utils/env.mjs +18 -0
- package/internal/utils/env.mjs.map +1 -0
- package/internal/utils/log.d.mts +37 -0
- package/internal/utils/log.d.mts.map +1 -0
- package/internal/utils/log.d.ts +37 -0
- package/internal/utils/log.d.ts.map +1 -0
- package/internal/utils/log.js +87 -0
- package/internal/utils/log.js.map +1 -0
- package/internal/utils/log.mjs +81 -0
- package/internal/utils/log.mjs.map +1 -0
- package/internal/utils/path.d.mts +15 -0
- package/internal/utils/path.d.mts.map +1 -0
- package/internal/utils/path.d.ts +15 -0
- package/internal/utils/path.d.ts.map +1 -0
- package/internal/utils/path.js +79 -0
- package/internal/utils/path.js.map +1 -0
- package/internal/utils/path.mjs +74 -0
- package/internal/utils/path.mjs.map +1 -0
- package/internal/utils/query.d.mts +5 -0
- package/internal/utils/query.d.mts.map +1 -0
- package/internal/utils/query.d.ts +5 -0
- package/internal/utils/query.d.ts.map +1 -0
- package/internal/utils/query.js +23 -0
- package/internal/utils/query.js.map +1 -0
- package/internal/utils/query.mjs +20 -0
- package/internal/utils/query.mjs.map +1 -0
- package/internal/utils/sleep.d.mts +2 -0
- package/internal/utils/sleep.d.mts.map +1 -0
- package/internal/utils/sleep.d.ts +2 -0
- package/internal/utils/sleep.d.ts.map +1 -0
- package/internal/utils/sleep.js +7 -0
- package/internal/utils/sleep.js.map +1 -0
- package/internal/utils/sleep.mjs +3 -0
- package/internal/utils/sleep.mjs.map +1 -0
- package/internal/utils/uuid.d.mts +5 -0
- package/internal/utils/uuid.d.mts.map +1 -0
- package/internal/utils/uuid.d.ts +5 -0
- package/internal/utils/uuid.d.ts.map +1 -0
- package/internal/utils/uuid.js +19 -0
- package/internal/utils/uuid.js.map +1 -0
- package/internal/utils/uuid.mjs +15 -0
- package/internal/utils/uuid.mjs.map +1 -0
- package/internal/utils/values.d.mts +18 -0
- package/internal/utils/values.d.mts.map +1 -0
- package/internal/utils/values.d.ts +18 -0
- package/internal/utils/values.d.ts.map +1 -0
- package/internal/utils/values.js +112 -0
- package/internal/utils/values.js.map +1 -0
- package/internal/utils/values.mjs +94 -0
- package/internal/utils/values.mjs.map +1 -0
- package/internal/utils.d.mts +8 -0
- package/internal/utils.d.mts.map +1 -0
- package/internal/utils.d.ts +8 -0
- package/internal/utils.d.ts.map +1 -0
- package/internal/utils.js +12 -0
- package/internal/utils.js.map +1 -0
- package/internal/utils.mjs +9 -0
- package/internal/utils.mjs.map +1 -0
- package/lib/leave-programs/advanced.d.mts +5 -0
- package/lib/leave-programs/advanced.d.mts.map +1 -0
- package/lib/leave-programs/advanced.d.ts +5 -0
- package/lib/leave-programs/advanced.d.ts.map +1 -0
- package/lib/leave-programs/advanced.js +13 -0
- package/lib/leave-programs/advanced.js.map +1 -0
- package/lib/leave-programs/advanced.mjs +4 -0
- package/lib/leave-programs/advanced.mjs.map +1 -0
- package/lib/leave-programs/context.d.mts +3 -0
- package/lib/leave-programs/context.d.mts.map +1 -0
- package/lib/leave-programs/context.d.ts +3 -0
- package/lib/leave-programs/context.d.ts.map +1 -0
- package/lib/leave-programs/context.js +89 -0
- package/lib/leave-programs/context.js.map +1 -0
- package/lib/leave-programs/context.mjs +86 -0
- package/lib/leave-programs/context.mjs.map +1 -0
- package/lib/leave-programs/define-company-leave-program.d.mts +3 -0
- package/lib/leave-programs/define-company-leave-program.d.mts.map +1 -0
- package/lib/leave-programs/define-company-leave-program.d.ts +3 -0
- package/lib/leave-programs/define-company-leave-program.d.ts.map +1 -0
- package/lib/leave-programs/define-company-leave-program.js +47 -0
- package/lib/leave-programs/define-company-leave-program.js.map +1 -0
- package/lib/leave-programs/define-company-leave-program.mjs +44 -0
- package/lib/leave-programs/define-company-leave-program.mjs.map +1 -0
- package/lib/leave-programs/duration.d.mts +5 -0
- package/lib/leave-programs/duration.d.mts.map +1 -0
- package/lib/leave-programs/duration.d.ts +5 -0
- package/lib/leave-programs/duration.d.ts.map +1 -0
- package/lib/leave-programs/duration.js +21 -0
- package/lib/leave-programs/duration.js.map +1 -0
- package/lib/leave-programs/duration.mjs +16 -0
- package/lib/leave-programs/duration.mjs.map +1 -0
- package/lib/leave-programs/pay.d.mts +4 -0
- package/lib/leave-programs/pay.d.mts.map +1 -0
- package/lib/leave-programs/pay.d.ts +4 -0
- package/lib/leave-programs/pay.d.ts.map +1 -0
- package/lib/leave-programs/pay.js +20 -0
- package/lib/leave-programs/pay.js.map +1 -0
- package/lib/leave-programs/pay.mjs +16 -0
- package/lib/leave-programs/pay.mjs.map +1 -0
- package/lib/leave-programs/policy-builder.d.mts +20 -0
- package/lib/leave-programs/policy-builder.d.mts.map +1 -0
- package/lib/leave-programs/policy-builder.d.ts +20 -0
- package/lib/leave-programs/policy-builder.d.ts.map +1 -0
- package/lib/leave-programs/policy-builder.js +89 -0
- package/lib/leave-programs/policy-builder.js.map +1 -0
- package/lib/leave-programs/policy-builder.mjs +85 -0
- package/lib/leave-programs/policy-builder.mjs.map +1 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.d.mts +25 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.d.mts.map +1 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.d.ts +25 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.d.ts.map +1 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.js +56 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.js.map +1 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.mjs +53 -0
- package/lib/leave-programs/recipes/parental-top-up-policy.mjs.map +1 -0
- package/lib/leave-programs/testing.d.mts +8 -0
- package/lib/leave-programs/testing.d.mts.map +1 -0
- package/lib/leave-programs/testing.d.ts +8 -0
- package/lib/leave-programs/testing.d.ts.map +1 -0
- package/lib/leave-programs/testing.js +11 -0
- package/lib/leave-programs/testing.js.map +1 -0
- package/lib/leave-programs/testing.mjs +7 -0
- package/lib/leave-programs/testing.mjs.map +1 -0
- package/lib/leave-programs/types.d.mts +223 -0
- package/lib/leave-programs/types.d.mts.map +1 -0
- package/lib/leave-programs/types.d.ts +223 -0
- package/lib/leave-programs/types.d.ts.map +1 -0
- package/lib/leave-programs/types.js +10 -0
- package/lib/leave-programs/types.js.map +1 -0
- package/lib/leave-programs/types.mjs +7 -0
- package/lib/leave-programs/types.mjs.map +1 -0
- package/lib/leave-programs.d.mts +7 -0
- package/lib/leave-programs.d.mts.map +1 -0
- package/lib/leave-programs.d.ts +7 -0
- package/lib/leave-programs.d.ts.map +1 -0
- package/lib/leave-programs.js +19 -0
- package/lib/leave-programs.js.map +1 -0
- package/lib/leave-programs.mjs +7 -0
- package/lib/leave-programs.mjs.map +1 -0
- package/lib/manifest/_existing-component-fields.d.mts +11 -0
- package/lib/manifest/_existing-component-fields.d.mts.map +1 -0
- package/lib/manifest/_existing-component-fields.d.ts +11 -0
- package/lib/manifest/_existing-component-fields.d.ts.map +1 -0
- package/lib/manifest/_existing-component-fields.js +67 -0
- package/lib/manifest/_existing-component-fields.js.map +1 -0
- package/lib/manifest/_existing-component-fields.mjs +59 -0
- package/lib/manifest/_existing-component-fields.mjs.map +1 -0
- package/lib/manifest/_helpers.d.mts +95 -0
- package/lib/manifest/_helpers.d.mts.map +1 -0
- package/lib/manifest/_helpers.d.ts +95 -0
- package/lib/manifest/_helpers.d.ts.map +1 -0
- package/lib/manifest/_helpers.js +67 -0
- package/lib/manifest/_helpers.js.map +1 -0
- package/lib/manifest/_helpers.mjs +63 -0
- package/lib/manifest/_helpers.mjs.map +1 -0
- package/lib/manifest/acp-agent-source-files.d.mts +10 -0
- package/lib/manifest/acp-agent-source-files.d.mts.map +1 -0
- package/lib/manifest/acp-agent-source-files.d.ts +10 -0
- package/lib/manifest/acp-agent-source-files.d.ts.map +1 -0
- package/lib/manifest/acp-agent-source-files.js +42 -0
- package/lib/manifest/acp-agent-source-files.js.map +1 -0
- package/lib/manifest/acp-agent-source-files.mjs +38 -0
- package/lib/manifest/acp-agent-source-files.mjs.map +1 -0
- package/lib/manifest/acp-agent.d.mts +73 -0
- package/lib/manifest/acp-agent.d.mts.map +1 -0
- package/lib/manifest/acp-agent.d.ts +73 -0
- package/lib/manifest/acp-agent.d.ts.map +1 -0
- package/lib/manifest/acp-agent.js +131 -0
- package/lib/manifest/acp-agent.js.map +1 -0
- package/lib/manifest/acp-agent.mjs +127 -0
- package/lib/manifest/acp-agent.mjs.map +1 -0
- package/lib/manifest/agent.d.mts +60 -0
- package/lib/manifest/agent.d.mts.map +1 -0
- package/lib/manifest/agent.d.ts +60 -0
- package/lib/manifest/agent.d.ts.map +1 -0
- package/lib/manifest/agent.js +94 -0
- package/lib/manifest/agent.js.map +1 -0
- package/lib/manifest/agent.mjs +90 -0
- package/lib/manifest/agent.mjs.map +1 -0
- package/lib/manifest/app.d.mts +126 -0
- package/lib/manifest/app.d.mts.map +1 -0
- package/lib/manifest/app.d.ts +126 -0
- package/lib/manifest/app.d.ts.map +1 -0
- package/lib/manifest/app.js +143 -0
- package/lib/manifest/app.js.map +1 -0
- package/lib/manifest/app.mjs +139 -0
- package/lib/manifest/app.mjs.map +1 -0
- package/lib/manifest/business-event.d.mts +64 -0
- package/lib/manifest/business-event.d.mts.map +1 -0
- package/lib/manifest/business-event.d.ts +64 -0
- package/lib/manifest/business-event.d.ts.map +1 -0
- package/lib/manifest/business-event.js +64 -0
- package/lib/manifest/business-event.js.map +1 -0
- package/lib/manifest/business-event.mjs +60 -0
- package/lib/manifest/business-event.mjs.map +1 -0
- package/lib/manifest/category.d.mts +90 -0
- package/lib/manifest/category.d.mts.map +1 -0
- package/lib/manifest/category.d.ts +90 -0
- package/lib/manifest/category.d.ts.map +1 -0
- package/lib/manifest/category.js +95 -0
- package/lib/manifest/category.js.map +1 -0
- package/lib/manifest/category.mjs +91 -0
- package/lib/manifest/category.mjs.map +1 -0
- package/lib/manifest/custom-field-section.d.mts +30 -0
- package/lib/manifest/custom-field-section.d.mts.map +1 -0
- package/lib/manifest/custom-field-section.d.ts +30 -0
- package/lib/manifest/custom-field-section.d.ts.map +1 -0
- package/lib/manifest/custom-field-section.js +58 -0
- package/lib/manifest/custom-field-section.js.map +1 -0
- package/lib/manifest/custom-field-section.mjs +54 -0
- package/lib/manifest/custom-field-section.mjs.map +1 -0
- package/lib/manifest/custom-field.d.mts +123 -0
- package/lib/manifest/custom-field.d.mts.map +1 -0
- package/lib/manifest/custom-field.d.ts +123 -0
- package/lib/manifest/custom-field.d.ts.map +1 -0
- package/lib/manifest/custom-field.js +211 -0
- package/lib/manifest/custom-field.js.map +1 -0
- package/lib/manifest/custom-field.mjs +207 -0
- package/lib/manifest/custom-field.mjs.map +1 -0
- package/lib/manifest/custom-object-action.d.mts +45 -0
- package/lib/manifest/custom-object-action.d.mts.map +1 -0
- package/lib/manifest/custom-object-action.d.ts +45 -0
- package/lib/manifest/custom-object-action.d.ts.map +1 -0
- package/lib/manifest/custom-object-action.js +72 -0
- package/lib/manifest/custom-object-action.js.map +1 -0
- package/lib/manifest/custom-object-action.mjs +68 -0
- package/lib/manifest/custom-object-action.mjs.map +1 -0
- package/lib/manifest/custom-object-field-section.d.mts +88 -0
- package/lib/manifest/custom-object-field-section.d.mts.map +1 -0
- package/lib/manifest/custom-object-field-section.d.ts +88 -0
- package/lib/manifest/custom-object-field-section.d.ts.map +1 -0
- package/lib/manifest/custom-object-field-section.js +97 -0
- package/lib/manifest/custom-object-field-section.js.map +1 -0
- package/lib/manifest/custom-object-field-section.mjs +93 -0
- package/lib/manifest/custom-object-field-section.mjs.map +1 -0
- package/lib/manifest/custom-object-page-layout.d.mts +694 -0
- package/lib/manifest/custom-object-page-layout.d.mts.map +1 -0
- package/lib/manifest/custom-object-page-layout.d.ts +694 -0
- package/lib/manifest/custom-object-page-layout.d.ts.map +1 -0
- package/lib/manifest/custom-object-page-layout.js +1323 -0
- package/lib/manifest/custom-object-page-layout.js.map +1 -0
- package/lib/manifest/custom-object-page-layout.mjs +1319 -0
- package/lib/manifest/custom-object-page-layout.mjs.map +1 -0
- package/lib/manifest/custom-object.d.mts +329 -0
- package/lib/manifest/custom-object.d.mts.map +1 -0
- package/lib/manifest/custom-object.d.ts +329 -0
- package/lib/manifest/custom-object.d.ts.map +1 -0
- package/lib/manifest/custom-object.js +394 -0
- package/lib/manifest/custom-object.js.map +1 -0
- package/lib/manifest/custom-object.mjs +390 -0
- package/lib/manifest/custom-object.mjs.map +1 -0
- package/lib/manifest/custom-skill.d.mts +115 -0
- package/lib/manifest/custom-skill.d.mts.map +1 -0
- package/lib/manifest/custom-skill.d.ts +115 -0
- package/lib/manifest/custom-skill.d.ts.map +1 -0
- package/lib/manifest/custom-skill.js +127 -0
- package/lib/manifest/custom-skill.js.map +1 -0
- package/lib/manifest/custom-skill.mjs +123 -0
- package/lib/manifest/custom-skill.mjs.map +1 -0
- package/lib/manifest/existing-manifest-context.d.mts +109 -0
- package/lib/manifest/existing-manifest-context.d.mts.map +1 -0
- package/lib/manifest/existing-manifest-context.d.ts +109 -0
- package/lib/manifest/existing-manifest-context.d.ts.map +1 -0
- package/lib/manifest/existing-manifest-context.js +641 -0
- package/lib/manifest/existing-manifest-context.js.map +1 -0
- package/lib/manifest/existing-manifest-context.mjs +636 -0
- package/lib/manifest/existing-manifest-context.mjs.map +1 -0
- package/lib/manifest/field.d.mts +548 -0
- package/lib/manifest/field.d.mts.map +1 -0
- package/lib/manifest/field.d.ts +548 -0
- package/lib/manifest/field.d.ts.map +1 -0
- package/lib/manifest/field.js +645 -0
- package/lib/manifest/field.js.map +1 -0
- package/lib/manifest/field.mjs +622 -0
- package/lib/manifest/field.mjs.map +1 -0
- package/lib/manifest/index.d.mts +24 -0
- package/lib/manifest/index.d.mts.map +1 -0
- package/lib/manifest/index.d.ts +24 -0
- package/lib/manifest/index.d.ts.map +1 -0
- package/lib/manifest/index.js +74 -0
- package/lib/manifest/index.js.map +1 -0
- package/lib/manifest/index.mjs +27 -0
- package/lib/manifest/index.mjs.map +1 -0
- package/lib/manifest/list-view.d.mts +167 -0
- package/lib/manifest/list-view.d.mts.map +1 -0
- package/lib/manifest/list-view.d.ts +167 -0
- package/lib/manifest/list-view.d.ts.map +1 -0
- package/lib/manifest/list-view.js +145 -0
- package/lib/manifest/list-view.js.map +1 -0
- package/lib/manifest/list-view.mjs +141 -0
- package/lib/manifest/list-view.mjs.map +1 -0
- package/lib/manifest/manifest-builder.d.mts +163 -0
- package/lib/manifest/manifest-builder.d.mts.map +1 -0
- package/lib/manifest/manifest-builder.d.ts +163 -0
- package/lib/manifest/manifest-builder.d.ts.map +1 -0
- package/lib/manifest/manifest-builder.js +147 -0
- package/lib/manifest/manifest-builder.js.map +1 -0
- package/lib/manifest/manifest-builder.mjs +143 -0
- package/lib/manifest/manifest-builder.mjs.map +1 -0
- package/lib/manifest/manifest-function.d.mts +127 -0
- package/lib/manifest/manifest-function.d.mts.map +1 -0
- package/lib/manifest/manifest-function.d.ts +127 -0
- package/lib/manifest/manifest-function.d.ts.map +1 -0
- package/lib/manifest/manifest-function.js +127 -0
- package/lib/manifest/manifest-function.js.map +1 -0
- package/lib/manifest/manifest-function.mjs +123 -0
- package/lib/manifest/manifest-function.mjs.map +1 -0
- package/lib/manifest/node.d.mts +4 -0
- package/lib/manifest/node.d.mts.map +1 -0
- package/lib/manifest/node.d.ts +4 -0
- package/lib/manifest/node.d.ts.map +1 -0
- package/lib/manifest/node.js +9 -0
- package/lib/manifest/node.js.map +1 -0
- package/lib/manifest/node.mjs +4 -0
- package/lib/manifest/node.mjs.map +1 -0
- package/lib/manifest/rule.d.mts +147 -0
- package/lib/manifest/rule.d.mts.map +1 -0
- package/lib/manifest/rule.d.ts +147 -0
- package/lib/manifest/rule.d.ts.map +1 -0
- package/lib/manifest/rule.js +170 -0
- package/lib/manifest/rule.js.map +1 -0
- package/lib/manifest/rule.mjs +166 -0
- package/lib/manifest/rule.mjs.map +1 -0
- package/lib/manifest/sdui-page.d.mts +108 -0
- package/lib/manifest/sdui-page.d.mts.map +1 -0
- package/lib/manifest/sdui-page.d.ts +108 -0
- package/lib/manifest/sdui-page.d.ts.map +1 -0
- package/lib/manifest/sdui-page.js +123 -0
- package/lib/manifest/sdui-page.js.map +1 -0
- package/lib/manifest/sdui-page.mjs +119 -0
- package/lib/manifest/sdui-page.mjs.map +1 -0
- package/lib/manifest/validation.d.mts +133 -0
- package/lib/manifest/validation.d.mts.map +1 -0
- package/lib/manifest/validation.d.ts +133 -0
- package/lib/manifest/validation.d.ts.map +1 -0
- package/lib/manifest/validation.js +118 -0
- package/lib/manifest/validation.js.map +1 -0
- package/lib/manifest/validation.mjs +114 -0
- package/lib/manifest/validation.mjs.map +1 -0
- package/lib/manifest/workflow.d.mts +158 -0
- package/lib/manifest/workflow.d.mts.map +1 -0
- package/lib/manifest/workflow.d.ts +158 -0
- package/lib/manifest/workflow.d.ts.map +1 -0
- package/lib/manifest/workflow.js +51 -0
- package/lib/manifest/workflow.js.map +1 -0
- package/lib/manifest/workflow.mjs +47 -0
- package/lib/manifest/workflow.mjs.map +1 -0
- package/lib/manifest.d.mts +2 -0
- package/lib/manifest.d.mts.map +1 -0
- package/lib/manifest.d.ts +2 -0
- package/lib/manifest.d.ts.map +1 -0
- package/lib/manifest.js +5 -0
- package/lib/manifest.js.map +1 -0
- package/lib/manifest.mjs +2 -0
- package/lib/manifest.mjs.map +1 -0
- package/package.json +190 -0
- package/pagination.d.mts +3 -0
- package/pagination.d.mts.map +1 -0
- package/pagination.d.ts +3 -0
- package/pagination.d.ts.map +1 -0
- package/pagination.js +6 -0
- package/pagination.js.map +1 -0
- package/pagination.mjs +3 -0
- package/pagination.mjs.map +1 -0
- package/resource.d.mts +3 -0
- package/resource.d.mts.map +1 -0
- package/resource.d.ts +3 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +6 -0
- package/resource.js.map +1 -0
- package/resource.mjs +3 -0
- package/resource.mjs.map +1 -0
- package/resources/agents/agents.d.mts +208 -0
- package/resources/agents/agents.d.mts.map +1 -0
- package/resources/agents/agents.d.ts +208 -0
- package/resources/agents/agents.d.ts.map +1 -0
- package/resources/agents/agents.js +64 -0
- package/resources/agents/agents.js.map +1 -0
- package/resources/agents/agents.mjs +59 -0
- package/resources/agents/agents.mjs.map +1 -0
- package/resources/agents/deployments.d.mts +180 -0
- package/resources/agents/deployments.d.mts.map +1 -0
- package/resources/agents/deployments.d.ts +180 -0
- package/resources/agents/deployments.d.ts.map +1 -0
- package/resources/agents/deployments.js +32 -0
- package/resources/agents/deployments.js.map +1 -0
- package/resources/agents/deployments.mjs +28 -0
- package/resources/agents/deployments.mjs.map +1 -0
- package/resources/agents/index.d.mts +5 -0
- package/resources/agents/index.d.mts.map +1 -0
- package/resources/agents/index.d.ts +5 -0
- package/resources/agents/index.d.ts.map +1 -0
- package/resources/agents/index.js +13 -0
- package/resources/agents/index.js.map +1 -0
- package/resources/agents/index.mjs +6 -0
- package/resources/agents/index.mjs.map +1 -0
- package/resources/agents/sessions/events.d.mts +80 -0
- package/resources/agents/sessions/events.d.mts.map +1 -0
- package/resources/agents/sessions/events.d.ts +80 -0
- package/resources/agents/sessions/events.d.ts.map +1 -0
- package/resources/agents/sessions/events.js +19 -0
- package/resources/agents/sessions/events.js.map +1 -0
- package/resources/agents/sessions/events.mjs +15 -0
- package/resources/agents/sessions/events.mjs.map +1 -0
- package/resources/agents/sessions/index.d.mts +5 -0
- package/resources/agents/sessions/index.d.mts.map +1 -0
- package/resources/agents/sessions/index.d.ts +5 -0
- package/resources/agents/sessions/index.d.ts.map +1 -0
- package/resources/agents/sessions/index.js +13 -0
- package/resources/agents/sessions/index.js.map +1 -0
- package/resources/agents/sessions/index.mjs +6 -0
- package/resources/agents/sessions/index.mjs.map +1 -0
- package/resources/agents/sessions/messages.d.mts +84 -0
- package/resources/agents/sessions/messages.d.mts.map +1 -0
- package/resources/agents/sessions/messages.d.ts +84 -0
- package/resources/agents/sessions/messages.d.ts.map +1 -0
- package/resources/agents/sessions/messages.js +19 -0
- package/resources/agents/sessions/messages.js.map +1 -0
- package/resources/agents/sessions/messages.mjs +15 -0
- package/resources/agents/sessions/messages.mjs.map +1 -0
- package/resources/agents/sessions/resume-state.d.mts +25 -0
- package/resources/agents/sessions/resume-state.d.mts.map +1 -0
- package/resources/agents/sessions/resume-state.d.ts +25 -0
- package/resources/agents/sessions/resume-state.d.ts.map +1 -0
- package/resources/agents/sessions/resume-state.js +19 -0
- package/resources/agents/sessions/resume-state.js.map +1 -0
- package/resources/agents/sessions/resume-state.mjs +15 -0
- package/resources/agents/sessions/resume-state.mjs.map +1 -0
- package/resources/agents/sessions/sessions.d.mts +248 -0
- package/resources/agents/sessions/sessions.d.mts.map +1 -0
- package/resources/agents/sessions/sessions.d.ts +248 -0
- package/resources/agents/sessions/sessions.d.ts.map +1 -0
- package/resources/agents/sessions/sessions.js +52 -0
- package/resources/agents/sessions/sessions.js.map +1 -0
- package/resources/agents/sessions/sessions.mjs +47 -0
- package/resources/agents/sessions/sessions.mjs.map +1 -0
- package/resources/agents/sessions.d.mts +2 -0
- package/resources/agents/sessions.d.mts.map +1 -0
- package/resources/agents/sessions.d.ts +2 -0
- package/resources/agents/sessions.d.ts.map +1 -0
- package/resources/agents/sessions.js +6 -0
- package/resources/agents/sessions.js.map +1 -0
- package/resources/agents/sessions.mjs +3 -0
- package/resources/agents/sessions.mjs.map +1 -0
- package/resources/agents/source-revisions.d.mts +195 -0
- package/resources/agents/source-revisions.d.mts.map +1 -0
- package/resources/agents/source-revisions.d.ts +195 -0
- package/resources/agents/source-revisions.d.ts.map +1 -0
- package/resources/agents/source-revisions.js +32 -0
- package/resources/agents/source-revisions.js.map +1 -0
- package/resources/agents/source-revisions.mjs +28 -0
- package/resources/agents/source-revisions.mjs.map +1 -0
- package/resources/agents.d.mts +2 -0
- package/resources/agents.d.mts.map +1 -0
- package/resources/agents.d.ts +2 -0
- package/resources/agents.d.ts.map +1 -0
- package/resources/agents.js +6 -0
- package/resources/agents.js.map +1 -0
- package/resources/agents.mjs +3 -0
- package/resources/agents.mjs.map +1 -0
- package/resources/app-users.d.mts +190 -0
- package/resources/app-users.d.mts.map +1 -0
- package/resources/app-users.d.ts +190 -0
- package/resources/app-users.d.ts.map +1 -0
- package/resources/app-users.js +32 -0
- package/resources/app-users.js.map +1 -0
- package/resources/app-users.mjs +28 -0
- package/resources/app-users.mjs.map +1 -0
- package/resources/background-check-candidates.d.mts +337 -0
- package/resources/background-check-candidates.d.mts.map +1 -0
- package/resources/background-check-candidates.d.ts +337 -0
- package/resources/background-check-candidates.d.ts.map +1 -0
- package/resources/background-check-candidates.js +52 -0
- package/resources/background-check-candidates.js.map +1 -0
- package/resources/background-check-candidates.mjs +48 -0
- package/resources/background-check-candidates.mjs.map +1 -0
- package/resources/break-policies.d.mts +95 -0
- package/resources/break-policies.d.mts.map +1 -0
- package/resources/break-policies.d.ts +95 -0
- package/resources/break-policies.d.ts.map +1 -0
- package/resources/break-policies.js +32 -0
- package/resources/break-policies.js.map +1 -0
- package/resources/break-policies.mjs +28 -0
- package/resources/break-policies.mjs.map +1 -0
- package/resources/break-types.d.mts +192 -0
- package/resources/break-types.d.mts.map +1 -0
- package/resources/break-types.d.ts +192 -0
- package/resources/break-types.d.ts.map +1 -0
- package/resources/break-types.js +34 -0
- package/resources/break-types.js.map +1 -0
- package/resources/break-types.mjs +30 -0
- package/resources/break-types.mjs.map +1 -0
- package/resources/business-partner-groups.d.mts +102 -0
- package/resources/business-partner-groups.d.mts.map +1 -0
- package/resources/business-partner-groups.d.ts +102 -0
- package/resources/business-partner-groups.d.ts.map +1 -0
- package/resources/business-partner-groups.js +49 -0
- package/resources/business-partner-groups.js.map +1 -0
- package/resources/business-partner-groups.mjs +45 -0
- package/resources/business-partner-groups.mjs.map +1 -0
- package/resources/business-partners.d.mts +140 -0
- package/resources/business-partners.d.mts.map +1 -0
- package/resources/business-partners.d.ts +140 -0
- package/resources/business-partners.d.ts.map +1 -0
- package/resources/business-partners.js +50 -0
- package/resources/business-partners.js.map +1 -0
- package/resources/business-partners.mjs +46 -0
- package/resources/business-partners.mjs.map +1 -0
- package/resources/business-structure-paths.d.mts +166 -0
- package/resources/business-structure-paths.d.mts.map +1 -0
- package/resources/business-structure-paths.d.ts +166 -0
- package/resources/business-structure-paths.d.ts.map +1 -0
- package/resources/business-structure-paths.js +46 -0
- package/resources/business-structure-paths.js.map +1 -0
- package/resources/business-structure-paths.mjs +42 -0
- package/resources/business-structure-paths.mjs.map +1 -0
- package/resources/candidate-applications.d.mts +75 -0
- package/resources/candidate-applications.d.mts.map +1 -0
- package/resources/candidate-applications.d.ts +75 -0
- package/resources/candidate-applications.d.ts.map +1 -0
- package/resources/candidate-applications.js +23 -0
- package/resources/candidate-applications.js.map +1 -0
- package/resources/candidate-applications.mjs +19 -0
- package/resources/candidate-applications.mjs.map +1 -0
- package/resources/candidates.d.mts +62 -0
- package/resources/candidates.d.mts.map +1 -0
- package/resources/candidates.d.ts +62 -0
- package/resources/candidates.d.ts.map +1 -0
- package/resources/candidates.js +25 -0
- package/resources/candidates.js.map +1 -0
- package/resources/candidates.mjs +21 -0
- package/resources/candidates.mjs.map +1 -0
- package/resources/companies.d.mts +90 -0
- package/resources/companies.d.mts.map +1 -0
- package/resources/companies.d.ts +90 -0
- package/resources/companies.d.ts.map +1 -0
- package/resources/companies.js +23 -0
- package/resources/companies.js.map +1 -0
- package/resources/companies.mjs +19 -0
- package/resources/companies.mjs.map +1 -0
- package/resources/company-legal-entities.d.mts +184 -0
- package/resources/company-legal-entities.d.mts.map +1 -0
- package/resources/company-legal-entities.d.ts +184 -0
- package/resources/company-legal-entities.d.ts.map +1 -0
- package/resources/company-legal-entities.js +30 -0
- package/resources/company-legal-entities.js.map +1 -0
- package/resources/company-legal-entities.mjs +26 -0
- package/resources/company-legal-entities.mjs.map +1 -0
- package/resources/company-legal-entity-workers.d.mts +83 -0
- package/resources/company-legal-entity-workers.d.mts.map +1 -0
- package/resources/company-legal-entity-workers.d.ts +83 -0
- package/resources/company-legal-entity-workers.d.ts.map +1 -0
- package/resources/company-legal-entity-workers.js +30 -0
- package/resources/company-legal-entity-workers.js.map +1 -0
- package/resources/company-legal-entity-workers.mjs +26 -0
- package/resources/company-legal-entity-workers.mjs.map +1 -0
- package/resources/compensation-bands-details.d.mts +102 -0
- package/resources/compensation-bands-details.d.mts.map +1 -0
- package/resources/compensation-bands-details.d.ts +102 -0
- package/resources/compensation-bands-details.d.ts.map +1 -0
- package/resources/compensation-bands-details.js +32 -0
- package/resources/compensation-bands-details.js.map +1 -0
- package/resources/compensation-bands-details.mjs +28 -0
- package/resources/compensation-bands-details.mjs.map +1 -0
- package/resources/compensations.d.mts +258 -0
- package/resources/compensations.d.mts.map +1 -0
- package/resources/compensations.d.ts +258 -0
- package/resources/compensations.d.ts.map +1 -0
- package/resources/compensations.js +30 -0
- package/resources/compensations.js.map +1 -0
- package/resources/compensations.mjs +26 -0
- package/resources/compensations.mjs.map +1 -0
- package/resources/custom-apps.d.mts +341 -0
- package/resources/custom-apps.d.mts.map +1 -0
- package/resources/custom-apps.d.ts +341 -0
- package/resources/custom-apps.d.ts.map +1 -0
- package/resources/custom-apps.js +47 -0
- package/resources/custom-apps.js.map +1 -0
- package/resources/custom-apps.mjs +43 -0
- package/resources/custom-apps.mjs.map +1 -0
- package/resources/custom-fields.d.mts +63 -0
- package/resources/custom-fields.d.mts.map +1 -0
- package/resources/custom-fields.d.ts +63 -0
- package/resources/custom-fields.d.ts.map +1 -0
- package/resources/custom-fields.js +25 -0
- package/resources/custom-fields.js.map +1 -0
- package/resources/custom-fields.mjs +21 -0
- package/resources/custom-fields.mjs.map +1 -0
- package/resources/custom-objects/custom-objects.d.mts +144 -0
- package/resources/custom-objects/custom-objects.d.mts.map +1 -0
- package/resources/custom-objects/custom-objects.d.ts +144 -0
- package/resources/custom-objects/custom-objects.d.ts.map +1 -0
- package/resources/custom-objects/custom-objects.js +62 -0
- package/resources/custom-objects/custom-objects.js.map +1 -0
- package/resources/custom-objects/custom-objects.mjs +57 -0
- package/resources/custom-objects/custom-objects.mjs.map +1 -0
- package/resources/custom-objects/fields.d.mts +305 -0
- package/resources/custom-objects/fields.d.mts.map +1 -0
- package/resources/custom-objects/fields.d.ts +305 -0
- package/resources/custom-objects/fields.d.ts.map +1 -0
- package/resources/custom-objects/fields.js +53 -0
- package/resources/custom-objects/fields.js.map +1 -0
- package/resources/custom-objects/fields.mjs +49 -0
- package/resources/custom-objects/fields.mjs.map +1 -0
- package/resources/custom-objects/index.d.mts +4 -0
- package/resources/custom-objects/index.d.mts.map +1 -0
- package/resources/custom-objects/index.d.ts +4 -0
- package/resources/custom-objects/index.d.ts.map +1 -0
- package/resources/custom-objects/index.js +11 -0
- package/resources/custom-objects/index.js.map +1 -0
- package/resources/custom-objects/index.mjs +5 -0
- package/resources/custom-objects/index.mjs.map +1 -0
- package/resources/custom-objects/records.d.mts +210 -0
- package/resources/custom-objects/records.d.mts.map +1 -0
- package/resources/custom-objects/records.d.ts +210 -0
- package/resources/custom-objects/records.d.ts.map +1 -0
- package/resources/custom-objects/records.js +96 -0
- package/resources/custom-objects/records.js.map +1 -0
- package/resources/custom-objects/records.mjs +92 -0
- package/resources/custom-objects/records.mjs.map +1 -0
- package/resources/custom-objects.d.mts +2 -0
- package/resources/custom-objects.d.mts.map +1 -0
- package/resources/custom-objects.d.ts +2 -0
- package/resources/custom-objects.d.ts.map +1 -0
- package/resources/custom-objects.js +6 -0
- package/resources/custom-objects.js.map +1 -0
- package/resources/custom-objects.mjs +3 -0
- package/resources/custom-objects.mjs.map +1 -0
- package/resources/custom-pages.d.mts +177 -0
- package/resources/custom-pages.d.mts.map +1 -0
- package/resources/custom-pages.d.ts +177 -0
- package/resources/custom-pages.d.ts.map +1 -0
- package/resources/custom-pages.js +47 -0
- package/resources/custom-pages.js.map +1 -0
- package/resources/custom-pages.mjs +43 -0
- package/resources/custom-pages.mjs.map +1 -0
- package/resources/custom-settings.d.mts +274 -0
- package/resources/custom-settings.d.mts.map +1 -0
- package/resources/custom-settings.d.ts +274 -0
- package/resources/custom-settings.d.ts.map +1 -0
- package/resources/custom-settings.js +51 -0
- package/resources/custom-settings.js.map +1 -0
- package/resources/custom-settings.mjs +47 -0
- package/resources/custom-settings.mjs.map +1 -0
- package/resources/departments.d.mts +124 -0
- package/resources/departments.d.mts.map +1 -0
- package/resources/departments.d.ts +124 -0
- package/resources/departments.d.ts.map +1 -0
- package/resources/departments.js +42 -0
- package/resources/departments.js.map +1 -0
- package/resources/departments.mjs +38 -0
- package/resources/departments.mjs.map +1 -0
- package/resources/developer-program-application.d.mts +176 -0
- package/resources/developer-program-application.d.mts.map +1 -0
- package/resources/developer-program-application.d.ts +176 -0
- package/resources/developer-program-application.d.ts.map +1 -0
- package/resources/developer-program-application.js +27 -0
- package/resources/developer-program-application.js.map +1 -0
- package/resources/developer-program-application.mjs +23 -0
- package/resources/developer-program-application.mjs.map +1 -0
- package/resources/developer-users.d.mts +53 -0
- package/resources/developer-users.d.mts.map +1 -0
- package/resources/developer-users.d.ts +53 -0
- package/resources/developer-users.d.ts.map +1 -0
- package/resources/developer-users.js +25 -0
- package/resources/developer-users.js.map +1 -0
- package/resources/developer-users.mjs +21 -0
- package/resources/developer-users.mjs.map +1 -0
- package/resources/device-orders.d.mts +151 -0
- package/resources/device-orders.d.mts.map +1 -0
- package/resources/device-orders.d.ts +151 -0
- package/resources/device-orders.d.ts.map +1 -0
- package/resources/device-orders.js +34 -0
- package/resources/device-orders.js.map +1 -0
- package/resources/device-orders.mjs +30 -0
- package/resources/device-orders.mjs.map +1 -0
- package/resources/devices.d.mts +276 -0
- package/resources/devices.d.mts.map +1 -0
- package/resources/devices.d.ts +276 -0
- package/resources/devices.d.ts.map +1 -0
- package/resources/devices.js +32 -0
- package/resources/devices.js.map +1 -0
- package/resources/devices.mjs +28 -0
- package/resources/devices.mjs.map +1 -0
- package/resources/draft-hires.d.mts +496 -0
- package/resources/draft-hires.d.mts.map +1 -0
- package/resources/draft-hires.d.ts +496 -0
- package/resources/draft-hires.d.ts.map +1 -0
- package/resources/draft-hires.js +18 -0
- package/resources/draft-hires.js.map +1 -0
- package/resources/draft-hires.mjs +14 -0
- package/resources/draft-hires.mjs.map +1 -0
- package/resources/draft-transitions.d.mts +474 -0
- package/resources/draft-transitions.d.mts.map +1 -0
- package/resources/draft-transitions.d.ts +474 -0
- package/resources/draft-transitions.d.ts.map +1 -0
- package/resources/draft-transitions.js +25 -0
- package/resources/draft-transitions.js.map +1 -0
- package/resources/draft-transitions.mjs +21 -0
- package/resources/draft-transitions.mjs.map +1 -0
- package/resources/earning-types.d.mts +50 -0
- package/resources/earning-types.d.mts.map +1 -0
- package/resources/earning-types.d.ts +50 -0
- package/resources/earning-types.d.ts.map +1 -0
- package/resources/earning-types.js +24 -0
- package/resources/earning-types.js.map +1 -0
- package/resources/earning-types.mjs +20 -0
- package/resources/earning-types.mjs.map +1 -0
- package/resources/earnings-inputs.d.mts +244 -0
- package/resources/earnings-inputs.d.mts.map +1 -0
- package/resources/earnings-inputs.d.ts +244 -0
- package/resources/earnings-inputs.d.ts.map +1 -0
- package/resources/earnings-inputs.js +41 -0
- package/resources/earnings-inputs.js.map +1 -0
- package/resources/earnings-inputs.mjs +37 -0
- package/resources/earnings-inputs.mjs.map +1 -0
- package/resources/employee-documents.d.mts +153 -0
- package/resources/employee-documents.d.mts.map +1 -0
- package/resources/employee-documents.d.ts +153 -0
- package/resources/employee-documents.d.ts.map +1 -0
- package/resources/employee-documents.js +18 -0
- package/resources/employee-documents.js.map +1 -0
- package/resources/employee-documents.mjs +14 -0
- package/resources/employee-documents.mjs.map +1 -0
- package/resources/employment-types.d.mts +85 -0
- package/resources/employment-types.d.mts.map +1 -0
- package/resources/employment-types.d.ts +85 -0
- package/resources/employment-types.d.ts.map +1 -0
- package/resources/employment-types.js +32 -0
- package/resources/employment-types.js.map +1 -0
- package/resources/employment-types.mjs +28 -0
- package/resources/employment-types.mjs.map +1 -0
- package/resources/entitlements.d.mts +33 -0
- package/resources/entitlements.d.mts.map +1 -0
- package/resources/entitlements.d.ts +33 -0
- package/resources/entitlements.d.ts.map +1 -0
- package/resources/entitlements.js +21 -0
- package/resources/entitlements.js.map +1 -0
- package/resources/entitlements.mjs +17 -0
- package/resources/entitlements.mjs.map +1 -0
- package/resources/files.d.mts +164 -0
- package/resources/files.d.mts.map +1 -0
- package/resources/files.d.ts +164 -0
- package/resources/files.d.ts.map +1 -0
- package/resources/files.js +25 -0
- package/resources/files.js.map +1 -0
- package/resources/files.mjs +21 -0
- package/resources/files.mjs.map +1 -0
- package/resources/functions/deployments.d.mts +162 -0
- package/resources/functions/deployments.d.mts.map +1 -0
- package/resources/functions/deployments.d.ts +162 -0
- package/resources/functions/deployments.d.ts.map +1 -0
- package/resources/functions/deployments.js +43 -0
- package/resources/functions/deployments.js.map +1 -0
- package/resources/functions/deployments.mjs +39 -0
- package/resources/functions/deployments.mjs.map +1 -0
- package/resources/functions/executions.d.mts +126 -0
- package/resources/functions/executions.d.mts.map +1 -0
- package/resources/functions/executions.d.ts +126 -0
- package/resources/functions/executions.d.ts.map +1 -0
- package/resources/functions/executions.js +45 -0
- package/resources/functions/executions.js.map +1 -0
- package/resources/functions/executions.mjs +41 -0
- package/resources/functions/executions.mjs.map +1 -0
- package/resources/functions/functions.d.mts +143 -0
- package/resources/functions/functions.d.mts.map +1 -0
- package/resources/functions/functions.d.ts +143 -0
- package/resources/functions/functions.d.ts.map +1 -0
- package/resources/functions/functions.js +59 -0
- package/resources/functions/functions.js.map +1 -0
- package/resources/functions/functions.mjs +54 -0
- package/resources/functions/functions.mjs.map +1 -0
- package/resources/functions/index.d.mts +4 -0
- package/resources/functions/index.d.mts.map +1 -0
- package/resources/functions/index.d.ts +4 -0
- package/resources/functions/index.d.ts.map +1 -0
- package/resources/functions/index.js +11 -0
- package/resources/functions/index.js.map +1 -0
- package/resources/functions/index.mjs +5 -0
- package/resources/functions/index.mjs.map +1 -0
- package/resources/functions.d.mts +2 -0
- package/resources/functions.d.mts.map +1 -0
- package/resources/functions.d.ts +2 -0
- package/resources/functions.d.ts.map +1 -0
- package/resources/functions.js +6 -0
- package/resources/functions.js.map +1 -0
- package/resources/functions.mjs +3 -0
- package/resources/functions.mjs.map +1 -0
- package/resources/headcount-positions.d.mts +1097 -0
- package/resources/headcount-positions.d.mts.map +1 -0
- package/resources/headcount-positions.d.ts +1097 -0
- package/resources/headcount-positions.d.ts.map +1 -0
- package/resources/headcount-positions.js +44 -0
- package/resources/headcount-positions.js.map +1 -0
- package/resources/headcount-positions.mjs +40 -0
- package/resources/headcount-positions.mjs.map +1 -0
- package/resources/headcount-priorities.d.mts +73 -0
- package/resources/headcount-priorities.d.mts.map +1 -0
- package/resources/headcount-priorities.d.ts +73 -0
- package/resources/headcount-priorities.d.ts.map +1 -0
- package/resources/headcount-priorities.js +32 -0
- package/resources/headcount-priorities.js.map +1 -0
- package/resources/headcount-priorities.mjs +28 -0
- package/resources/headcount-priorities.mjs.map +1 -0
- package/resources/hire-requirements.d.mts +112 -0
- package/resources/hire-requirements.d.mts.map +1 -0
- package/resources/hire-requirements.d.ts +112 -0
- package/resources/hire-requirements.d.ts.map +1 -0
- package/resources/hire-requirements.js +19 -0
- package/resources/hire-requirements.js.map +1 -0
- package/resources/hire-requirements.mjs +15 -0
- package/resources/hire-requirements.mjs.map +1 -0
- package/resources/hires.d.mts +657 -0
- package/resources/hires.d.mts.map +1 -0
- package/resources/hires.d.ts +657 -0
- package/resources/hires.d.ts.map +1 -0
- package/resources/hires.js +25 -0
- package/resources/hires.js.map +1 -0
- package/resources/hires.mjs +21 -0
- package/resources/hires.mjs.map +1 -0
- package/resources/index.d.mts +102 -0
- package/resources/index.d.mts.map +1 -0
- package/resources/index.d.ts +102 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +208 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +103 -0
- package/resources/index.mjs.map +1 -0
- package/resources/job-assignments.d.mts +268 -0
- package/resources/job-assignments.d.mts.map +1 -0
- package/resources/job-assignments.d.ts +268 -0
- package/resources/job-assignments.d.ts.map +1 -0
- package/resources/job-assignments.js +64 -0
- package/resources/job-assignments.js.map +1 -0
- package/resources/job-assignments.mjs +60 -0
- package/resources/job-assignments.mjs.map +1 -0
- package/resources/job-codes.d.mts +437 -0
- package/resources/job-codes.d.mts.map +1 -0
- package/resources/job-codes.d.ts +437 -0
- package/resources/job-codes.d.ts.map +1 -0
- package/resources/job-codes.js +64 -0
- package/resources/job-codes.js.map +1 -0
- package/resources/job-codes.mjs +60 -0
- package/resources/job-codes.mjs.map +1 -0
- package/resources/job-dimensions.d.mts +173 -0
- package/resources/job-dimensions.d.mts.map +1 -0
- package/resources/job-dimensions.d.ts +173 -0
- package/resources/job-dimensions.d.ts.map +1 -0
- package/resources/job-dimensions.js +52 -0
- package/resources/job-dimensions.js.map +1 -0
- package/resources/job-dimensions.mjs +48 -0
- package/resources/job-dimensions.mjs.map +1 -0
- package/resources/job-functions.d.mts +73 -0
- package/resources/job-functions.d.mts.map +1 -0
- package/resources/job-functions.d.ts +73 -0
- package/resources/job-functions.d.ts.map +1 -0
- package/resources/job-functions.js +32 -0
- package/resources/job-functions.js.map +1 -0
- package/resources/job-functions.mjs +28 -0
- package/resources/job-functions.mjs.map +1 -0
- package/resources/job-pay-rate-exceptions.d.mts +104 -0
- package/resources/job-pay-rate-exceptions.d.mts.map +1 -0
- package/resources/job-pay-rate-exceptions.d.ts +104 -0
- package/resources/job-pay-rate-exceptions.d.ts.map +1 -0
- package/resources/job-pay-rate-exceptions.js +44 -0
- package/resources/job-pay-rate-exceptions.js.map +1 -0
- package/resources/job-pay-rate-exceptions.mjs +40 -0
- package/resources/job-pay-rate-exceptions.mjs.map +1 -0
- package/resources/job-requisitions-write.d.mts +260 -0
- package/resources/job-requisitions-write.d.mts.map +1 -0
- package/resources/job-requisitions-write.d.ts +260 -0
- package/resources/job-requisitions-write.d.ts.map +1 -0
- package/resources/job-requisitions-write.js +18 -0
- package/resources/job-requisitions-write.js.map +1 -0
- package/resources/job-requisitions-write.mjs +14 -0
- package/resources/job-requisitions-write.mjs.map +1 -0
- package/resources/job-requisitions.d.mts +50 -0
- package/resources/job-requisitions.d.mts.map +1 -0
- package/resources/job-requisitions.d.ts +50 -0
- package/resources/job-requisitions.d.ts.map +1 -0
- package/resources/job-requisitions.js +25 -0
- package/resources/job-requisitions.js.map +1 -0
- package/resources/job-requisitions.mjs +21 -0
- package/resources/job-requisitions.mjs.map +1 -0
- package/resources/kiosk-badges.d.mts +255 -0
- package/resources/kiosk-badges.d.mts.map +1 -0
- package/resources/kiosk-badges.d.ts +255 -0
- package/resources/kiosk-badges.d.ts.map +1 -0
- package/resources/kiosk-badges.js +56 -0
- package/resources/kiosk-badges.js.map +1 -0
- package/resources/kiosk-badges.mjs +52 -0
- package/resources/kiosk-badges.mjs.map +1 -0
- package/resources/leave-accruals.d.mts +318 -0
- package/resources/leave-accruals.d.mts.map +1 -0
- package/resources/leave-accruals.d.ts +318 -0
- package/resources/leave-accruals.d.ts.map +1 -0
- package/resources/leave-accruals.js +41 -0
- package/resources/leave-accruals.js.map +1 -0
- package/resources/leave-accruals.mjs +37 -0
- package/resources/leave-accruals.mjs.map +1 -0
- package/resources/leave-balances.d.mts +106 -0
- package/resources/leave-balances.d.mts.map +1 -0
- package/resources/leave-balances.d.ts +106 -0
- package/resources/leave-balances.d.ts.map +1 -0
- package/resources/leave-balances.js +31 -0
- package/resources/leave-balances.js.map +1 -0
- package/resources/leave-balances.mjs +27 -0
- package/resources/leave-balances.mjs.map +1 -0
- package/resources/leave-program-evaluations.d.mts +599 -0
- package/resources/leave-program-evaluations.d.mts.map +1 -0
- package/resources/leave-program-evaluations.d.ts +599 -0
- package/resources/leave-program-evaluations.d.ts.map +1 -0
- package/resources/leave-program-evaluations.js +18 -0
- package/resources/leave-program-evaluations.js.map +1 -0
- package/resources/leave-program-evaluations.mjs +14 -0
- package/resources/leave-program-evaluations.mjs.map +1 -0
- package/resources/leave-requests.d.mts +739 -0
- package/resources/leave-requests.d.mts.map +1 -0
- package/resources/leave-requests.d.ts +739 -0
- package/resources/leave-requests.d.ts.map +1 -0
- package/resources/leave-requests.js +47 -0
- package/resources/leave-requests.js.map +1 -0
- package/resources/leave-requests.mjs +43 -0
- package/resources/leave-requests.mjs.map +1 -0
- package/resources/leave-types.d.mts +75 -0
- package/resources/leave-types.d.mts.map +1 -0
- package/resources/leave-types.d.ts +75 -0
- package/resources/leave-types.d.ts.map +1 -0
- package/resources/leave-types.js +30 -0
- package/resources/leave-types.js.map +1 -0
- package/resources/leave-types.mjs +26 -0
- package/resources/leave-types.mjs.map +1 -0
- package/resources/legal-entities.d.mts +125 -0
- package/resources/legal-entities.d.mts.map +1 -0
- package/resources/legal-entities.d.ts +125 -0
- package/resources/legal-entities.d.ts.map +1 -0
- package/resources/legal-entities.js +30 -0
- package/resources/legal-entities.js.map +1 -0
- package/resources/legal-entities.mjs +26 -0
- package/resources/legal-entities.mjs.map +1 -0
- package/resources/levels.d.mts +182 -0
- package/resources/levels.d.mts.map +1 -0
- package/resources/levels.d.ts +182 -0
- package/resources/levels.d.ts.map +1 -0
- package/resources/levels.js +52 -0
- package/resources/levels.js.map +1 -0
- package/resources/levels.mjs +48 -0
- package/resources/levels.mjs.map +1 -0
- package/resources/listing-submissions.d.mts +86 -0
- package/resources/listing-submissions.d.mts.map +1 -0
- package/resources/listing-submissions.d.ts +86 -0
- package/resources/listing-submissions.d.ts.map +1 -0
- package/resources/listing-submissions.js +31 -0
- package/resources/listing-submissions.js.map +1 -0
- package/resources/listing-submissions.mjs +27 -0
- package/resources/listing-submissions.mjs.map +1 -0
- package/resources/listing-transitions.d.mts +59 -0
- package/resources/listing-transitions.d.mts.map +1 -0
- package/resources/listing-transitions.d.ts +59 -0
- package/resources/listing-transitions.d.ts.map +1 -0
- package/resources/listing-transitions.js +24 -0
- package/resources/listing-transitions.js.map +1 -0
- package/resources/listing-transitions.mjs +20 -0
- package/resources/listing-transitions.mjs.map +1 -0
- package/resources/listing.d.mts +1818 -0
- package/resources/listing.d.mts.map +1 -0
- package/resources/listing.d.ts +1818 -0
- package/resources/listing.d.ts.map +1 -0
- package/resources/listing.js +70 -0
- package/resources/listing.js.map +1 -0
- package/resources/listing.mjs +66 -0
- package/resources/listing.mjs.map +1 -0
- package/resources/location-factors.d.mts +119 -0
- package/resources/location-factors.d.mts.map +1 -0
- package/resources/location-factors.d.ts +119 -0
- package/resources/location-factors.d.ts.map +1 -0
- package/resources/location-factors.js +32 -0
- package/resources/location-factors.js.map +1 -0
- package/resources/location-factors.mjs +28 -0
- package/resources/location-factors.mjs.map +1 -0
- package/resources/metadata/components.d.mts +303 -0
- package/resources/metadata/components.d.mts.map +1 -0
- package/resources/metadata/components.d.ts +303 -0
- package/resources/metadata/components.d.ts.map +1 -0
- package/resources/metadata/components.js +83 -0
- package/resources/metadata/components.js.map +1 -0
- package/resources/metadata/components.mjs +79 -0
- package/resources/metadata/components.mjs.map +1 -0
- package/resources/metadata/deployment-runs.d.mts +143 -0
- package/resources/metadata/deployment-runs.d.mts.map +1 -0
- package/resources/metadata/deployment-runs.d.ts +143 -0
- package/resources/metadata/deployment-runs.d.ts.map +1 -0
- package/resources/metadata/deployment-runs.js +73 -0
- package/resources/metadata/deployment-runs.js.map +1 -0
- package/resources/metadata/deployment-runs.mjs +69 -0
- package/resources/metadata/deployment-runs.mjs.map +1 -0
- package/resources/metadata/index.d.mts +7 -0
- package/resources/metadata/index.d.mts.map +1 -0
- package/resources/metadata/index.d.ts +7 -0
- package/resources/metadata/index.d.ts.map +1 -0
- package/resources/metadata/index.js +17 -0
- package/resources/metadata/index.js.map +1 -0
- package/resources/metadata/index.mjs +8 -0
- package/resources/metadata/index.mjs.map +1 -0
- package/resources/metadata/metadata.d.mts +163 -0
- package/resources/metadata/metadata.d.mts.map +1 -0
- package/resources/metadata/metadata.d.ts +163 -0
- package/resources/metadata/metadata.d.ts.map +1 -0
- package/resources/metadata/metadata.js +65 -0
- package/resources/metadata/metadata.js.map +1 -0
- package/resources/metadata/metadata.mjs +60 -0
- package/resources/metadata/metadata.mjs.map +1 -0
- package/resources/metadata/schema.d.mts +92 -0
- package/resources/metadata/schema.d.mts.map +1 -0
- package/resources/metadata/schema.d.ts +92 -0
- package/resources/metadata/schema.d.ts.map +1 -0
- package/resources/metadata/schema.js +27 -0
- package/resources/metadata/schema.js.map +1 -0
- package/resources/metadata/schema.mjs +23 -0
- package/resources/metadata/schema.mjs.map +1 -0
- package/resources/metadata/types.d.mts +46 -0
- package/resources/metadata/types.d.mts.map +1 -0
- package/resources/metadata/types.d.ts +46 -0
- package/resources/metadata/types.d.ts.map +1 -0
- package/resources/metadata/types.js +26 -0
- package/resources/metadata/types.js.map +1 -0
- package/resources/metadata/types.mjs +22 -0
- package/resources/metadata/types.mjs.map +1 -0
- package/resources/metadata/validation-runs.d.mts +143 -0
- package/resources/metadata/validation-runs.d.mts.map +1 -0
- package/resources/metadata/validation-runs.d.ts +143 -0
- package/resources/metadata/validation-runs.d.ts.map +1 -0
- package/resources/metadata/validation-runs.js +73 -0
- package/resources/metadata/validation-runs.js.map +1 -0
- package/resources/metadata/validation-runs.mjs +69 -0
- package/resources/metadata/validation-runs.mjs.map +1 -0
- package/resources/metadata.d.mts +2 -0
- package/resources/metadata.d.mts.map +1 -0
- package/resources/metadata.d.ts +2 -0
- package/resources/metadata.d.ts.map +1 -0
- package/resources/metadata.js +6 -0
- package/resources/metadata.js.map +1 -0
- package/resources/metadata.mjs +3 -0
- package/resources/metadata.mjs.map +1 -0
- package/resources/object-categories.d.mts +85 -0
- package/resources/object-categories.d.mts.map +1 -0
- package/resources/object-categories.d.ts +85 -0
- package/resources/object-categories.d.ts.map +1 -0
- package/resources/object-categories.js +53 -0
- package/resources/object-categories.js.map +1 -0
- package/resources/object-categories.mjs +49 -0
- package/resources/object-categories.mjs.map +1 -0
- package/resources/package-installs.d.mts +108 -0
- package/resources/package-installs.d.mts.map +1 -0
- package/resources/package-installs.d.ts +108 -0
- package/resources/package-installs.d.ts.map +1 -0
- package/resources/package-installs.js +25 -0
- package/resources/package-installs.js.map +1 -0
- package/resources/package-installs.mjs +21 -0
- package/resources/package-installs.mjs.map +1 -0
- package/resources/package-managed-installs.d.mts +119 -0
- package/resources/package-managed-installs.d.mts.map +1 -0
- package/resources/package-managed-installs.d.ts +119 -0
- package/resources/package-managed-installs.d.ts.map +1 -0
- package/resources/package-managed-installs.js +26 -0
- package/resources/package-managed-installs.js.map +1 -0
- package/resources/package-managed-installs.mjs +22 -0
- package/resources/package-managed-installs.mjs.map +1 -0
- package/resources/package-sandbox-links.d.mts +150 -0
- package/resources/package-sandbox-links.d.mts.map +1 -0
- package/resources/package-sandbox-links.d.ts +150 -0
- package/resources/package-sandbox-links.d.ts.map +1 -0
- package/resources/package-sandbox-links.js +25 -0
- package/resources/package-sandbox-links.js.map +1 -0
- package/resources/package-sandbox-links.mjs +21 -0
- package/resources/package-sandbox-links.mjs.map +1 -0
- package/resources/package-uninstalls.d.mts +128 -0
- package/resources/package-uninstalls.d.mts.map +1 -0
- package/resources/package-uninstalls.d.ts +128 -0
- package/resources/package-uninstalls.d.ts.map +1 -0
- package/resources/package-uninstalls.js +25 -0
- package/resources/package-uninstalls.js.map +1 -0
- package/resources/package-uninstalls.mjs +21 -0
- package/resources/package-uninstalls.mjs.map +1 -0
- package/resources/package-upgrades.d.mts +140 -0
- package/resources/package-upgrades.d.mts.map +1 -0
- package/resources/package-upgrades.d.ts +140 -0
- package/resources/package-upgrades.d.ts.map +1 -0
- package/resources/package-upgrades.js +25 -0
- package/resources/package-upgrades.js.map +1 -0
- package/resources/package-upgrades.mjs +21 -0
- package/resources/package-upgrades.mjs.map +1 -0
- package/resources/package-version-component-updates.d.mts +117 -0
- package/resources/package-version-component-updates.d.mts.map +1 -0
- package/resources/package-version-component-updates.d.ts +117 -0
- package/resources/package-version-component-updates.d.ts.map +1 -0
- package/resources/package-version-component-updates.js +33 -0
- package/resources/package-version-component-updates.js.map +1 -0
- package/resources/package-version-component-updates.mjs +29 -0
- package/resources/package-version-component-updates.mjs.map +1 -0
- package/resources/package-versions/index.d.mts +3 -0
- package/resources/package-versions/index.d.mts.map +1 -0
- package/resources/package-versions/index.d.ts +3 -0
- package/resources/package-versions/index.d.ts.map +1 -0
- package/resources/package-versions/index.js +9 -0
- package/resources/package-versions/index.js.map +1 -0
- package/resources/package-versions/index.mjs +4 -0
- package/resources/package-versions/index.mjs.map +1 -0
- package/resources/package-versions/package-versions.d.mts +114 -0
- package/resources/package-versions/package-versions.d.mts.map +1 -0
- package/resources/package-versions/package-versions.d.ts +114 -0
- package/resources/package-versions/package-versions.d.ts.map +1 -0
- package/resources/package-versions/package-versions.js +33 -0
- package/resources/package-versions/package-versions.js.map +1 -0
- package/resources/package-versions/package-versions.mjs +28 -0
- package/resources/package-versions/package-versions.mjs.map +1 -0
- package/resources/package-versions/publish.d.mts +58 -0
- package/resources/package-versions/publish.d.mts.map +1 -0
- package/resources/package-versions/publish.d.ts +58 -0
- package/resources/package-versions/publish.d.ts.map +1 -0
- package/resources/package-versions/publish.js +19 -0
- package/resources/package-versions/publish.js.map +1 -0
- package/resources/package-versions/publish.mjs +15 -0
- package/resources/package-versions/publish.mjs.map +1 -0
- package/resources/package-versions.d.mts +2 -0
- package/resources/package-versions.d.mts.map +1 -0
- package/resources/package-versions.d.ts +2 -0
- package/resources/package-versions.d.ts.map +1 -0
- package/resources/package-versions.js +6 -0
- package/resources/package-versions.js.map +1 -0
- package/resources/package-versions.mjs +3 -0
- package/resources/package-versions.mjs.map +1 -0
- package/resources/packages/available-upgrades.d.mts +33 -0
- package/resources/packages/available-upgrades.d.mts.map +1 -0
- package/resources/packages/available-upgrades.d.ts +33 -0
- package/resources/packages/available-upgrades.d.ts.map +1 -0
- package/resources/packages/available-upgrades.js +20 -0
- package/resources/packages/available-upgrades.js.map +1 -0
- package/resources/packages/available-upgrades.mjs +16 -0
- package/resources/packages/available-upgrades.mjs.map +1 -0
- package/resources/packages/index.d.mts +5 -0
- package/resources/packages/index.d.mts.map +1 -0
- package/resources/packages/index.d.ts +5 -0
- package/resources/packages/index.d.ts.map +1 -0
- package/resources/packages/index.js +13 -0
- package/resources/packages/index.js.map +1 -0
- package/resources/packages/index.mjs +6 -0
- package/resources/packages/index.mjs.map +1 -0
- package/resources/packages/next-versions.d.mts +70 -0
- package/resources/packages/next-versions.d.mts.map +1 -0
- package/resources/packages/next-versions.d.ts +70 -0
- package/resources/packages/next-versions.d.ts.map +1 -0
- package/resources/packages/next-versions.js +21 -0
- package/resources/packages/next-versions.js.map +1 -0
- package/resources/packages/next-versions.mjs +17 -0
- package/resources/packages/next-versions.mjs.map +1 -0
- package/resources/packages/packages.d.mts +251 -0
- package/resources/packages/packages.d.mts.map +1 -0
- package/resources/packages/packages.d.ts +251 -0
- package/resources/packages/packages.d.ts.map +1 -0
- package/resources/packages/packages.js +68 -0
- package/resources/packages/packages.js.map +1 -0
- package/resources/packages/packages.mjs +63 -0
- package/resources/packages/packages.mjs.map +1 -0
- package/resources/packages/versions.d.mts +123 -0
- package/resources/packages/versions.d.mts.map +1 -0
- package/resources/packages/versions.d.ts +123 -0
- package/resources/packages/versions.d.ts.map +1 -0
- package/resources/packages/versions.js +26 -0
- package/resources/packages/versions.js.map +1 -0
- package/resources/packages/versions.mjs +22 -0
- package/resources/packages/versions.mjs.map +1 -0
- package/resources/packages.d.mts +2 -0
- package/resources/packages.d.mts.map +1 -0
- package/resources/packages.d.ts +2 -0
- package/resources/packages.d.ts.map +1 -0
- package/resources/packages.js +6 -0
- package/resources/packages.js.map +1 -0
- package/resources/packages.mjs +3 -0
- package/resources/packages.mjs.map +1 -0
- package/resources/payroll-runs/index.d.mts +3 -0
- package/resources/payroll-runs/index.d.mts.map +1 -0
- package/resources/payroll-runs/index.d.ts +3 -0
- package/resources/payroll-runs/index.d.ts.map +1 -0
- package/resources/payroll-runs/index.js +9 -0
- package/resources/payroll-runs/index.js.map +1 -0
- package/resources/payroll-runs/index.mjs +4 -0
- package/resources/payroll-runs/index.mjs.map +1 -0
- package/resources/payroll-runs/payroll-runs.d.mts +204 -0
- package/resources/payroll-runs/payroll-runs.d.mts.map +1 -0
- package/resources/payroll-runs/payroll-runs.d.ts +204 -0
- package/resources/payroll-runs/payroll-runs.d.ts.map +1 -0
- package/resources/payroll-runs/payroll-runs.js +40 -0
- package/resources/payroll-runs/payroll-runs.js.map +1 -0
- package/resources/payroll-runs/payroll-runs.mjs +35 -0
- package/resources/payroll-runs/payroll-runs.mjs.map +1 -0
- package/resources/payroll-runs/worker-payroll-records.d.mts +204 -0
- package/resources/payroll-runs/worker-payroll-records.d.mts.map +1 -0
- package/resources/payroll-runs/worker-payroll-records.d.ts +204 -0
- package/resources/payroll-runs/worker-payroll-records.d.ts.map +1 -0
- package/resources/payroll-runs/worker-payroll-records.js +23 -0
- package/resources/payroll-runs/worker-payroll-records.js.map +1 -0
- package/resources/payroll-runs/worker-payroll-records.mjs +19 -0
- package/resources/payroll-runs/worker-payroll-records.mjs.map +1 -0
- package/resources/payroll-runs.d.mts +2 -0
- package/resources/payroll-runs.d.mts.map +1 -0
- package/resources/payroll-runs.d.ts +2 -0
- package/resources/payroll-runs.d.ts.map +1 -0
- package/resources/payroll-runs.js +6 -0
- package/resources/payroll-runs.js.map +1 -0
- package/resources/payroll-runs.mjs +3 -0
- package/resources/payroll-runs.mjs.map +1 -0
- package/resources/platform-capabilities.d.mts +25 -0
- package/resources/platform-capabilities.d.mts.map +1 -0
- package/resources/platform-capabilities.d.ts +25 -0
- package/resources/platform-capabilities.d.ts.map +1 -0
- package/resources/platform-capabilities.js +21 -0
- package/resources/platform-capabilities.js.map +1 -0
- package/resources/platform-capabilities.mjs +17 -0
- package/resources/platform-capabilities.mjs.map +1 -0
- package/resources/report-runs.d.mts +218 -0
- package/resources/report-runs.d.mts.map +1 -0
- package/resources/report-runs.d.ts +218 -0
- package/resources/report-runs.d.ts.map +1 -0
- package/resources/report-runs.js +25 -0
- package/resources/report-runs.js.map +1 -0
- package/resources/report-runs.mjs +21 -0
- package/resources/report-runs.mjs.map +1 -0
- package/resources/reports/available-filters.d.mts +49 -0
- package/resources/reports/available-filters.d.mts.map +1 -0
- package/resources/reports/available-filters.d.ts +49 -0
- package/resources/reports/available-filters.d.ts.map +1 -0
- package/resources/reports/available-filters.js +20 -0
- package/resources/reports/available-filters.js.map +1 -0
- package/resources/reports/available-filters.mjs +16 -0
- package/resources/reports/available-filters.mjs.map +1 -0
- package/resources/reports/index.d.mts +3 -0
- package/resources/reports/index.d.mts.map +1 -0
- package/resources/reports/index.d.ts +3 -0
- package/resources/reports/index.d.ts.map +1 -0
- package/resources/reports/index.js +9 -0
- package/resources/reports/index.js.map +1 -0
- package/resources/reports/index.mjs +4 -0
- package/resources/reports/index.mjs.map +1 -0
- package/resources/reports/reports.d.mts +85 -0
- package/resources/reports/reports.d.mts.map +1 -0
- package/resources/reports/reports.d.ts +85 -0
- package/resources/reports/reports.d.ts.map +1 -0
- package/resources/reports/reports.js +27 -0
- package/resources/reports/reports.js.map +1 -0
- package/resources/reports/reports.mjs +22 -0
- package/resources/reports/reports.mjs.map +1 -0
- package/resources/reports.d.mts +2 -0
- package/resources/reports.d.mts.map +1 -0
- package/resources/reports.d.ts +2 -0
- package/resources/reports.d.ts.map +1 -0
- package/resources/reports.js +6 -0
- package/resources/reports.js.map +1 -0
- package/resources/reports.mjs +3 -0
- package/resources/reports.mjs.map +1 -0
- package/resources/sandboxes.d.mts +904 -0
- package/resources/sandboxes.d.mts.map +1 -0
- package/resources/sandboxes.d.ts +904 -0
- package/resources/sandboxes.d.ts.map +1 -0
- package/resources/sandboxes.js +52 -0
- package/resources/sandboxes.js.map +1 -0
- package/resources/sandboxes.mjs +48 -0
- package/resources/sandboxes.mjs.map +1 -0
- package/resources/scheduled-job-assignments.d.mts +152 -0
- package/resources/scheduled-job-assignments.d.mts.map +1 -0
- package/resources/scheduled-job-assignments.d.ts +152 -0
- package/resources/scheduled-job-assignments.d.ts.map +1 -0
- package/resources/scheduled-job-assignments.js +39 -0
- package/resources/scheduled-job-assignments.js.map +1 -0
- package/resources/scheduled-job-assignments.mjs +35 -0
- package/resources/scheduled-job-assignments.mjs.map +1 -0
- package/resources/schedules.d.mts +397 -0
- package/resources/schedules.d.mts.map +1 -0
- package/resources/schedules.d.ts +397 -0
- package/resources/schedules.d.ts.map +1 -0
- package/resources/schedules.js +42 -0
- package/resources/schedules.js.map +1 -0
- package/resources/schedules.mjs +38 -0
- package/resources/schedules.mjs.map +1 -0
- package/resources/shared.d.mts +90 -0
- package/resources/shared.d.mts.map +1 -0
- package/resources/shared.d.ts +90 -0
- package/resources/shared.d.ts.map +1 -0
- package/resources/shared.js +4 -0
- package/resources/shared.js.map +1 -0
- package/resources/shared.mjs +3 -0
- package/resources/shared.mjs.map +1 -0
- package/resources/shift-assignments.d.mts +299 -0
- package/resources/shift-assignments.d.mts.map +1 -0
- package/resources/shift-assignments.d.ts +299 -0
- package/resources/shift-assignments.d.ts.map +1 -0
- package/resources/shift-assignments.js +28 -0
- package/resources/shift-assignments.js.map +1 -0
- package/resources/shift-assignments.mjs +24 -0
- package/resources/shift-assignments.mjs.map +1 -0
- package/resources/shift-inputs.d.mts +299 -0
- package/resources/shift-inputs.d.mts.map +1 -0
- package/resources/shift-inputs.d.ts +299 -0
- package/resources/shift-inputs.d.ts.map +1 -0
- package/resources/shift-inputs.js +56 -0
- package/resources/shift-inputs.js.map +1 -0
- package/resources/shift-inputs.mjs +52 -0
- package/resources/shift-inputs.mjs.map +1 -0
- package/resources/shiftassignments.d.mts +1252 -0
- package/resources/shiftassignments.d.mts.map +1 -0
- package/resources/shiftassignments.d.ts +1252 -0
- package/resources/shiftassignments.d.ts.map +1 -0
- package/resources/shiftassignments.js +47 -0
- package/resources/shiftassignments.js.map +1 -0
- package/resources/shiftassignments.mjs +43 -0
- package/resources/shiftassignments.mjs.map +1 -0
- package/resources/sites.d.mts +610 -0
- package/resources/sites.d.mts.map +1 -0
- package/resources/sites.d.ts +610 -0
- package/resources/sites.d.ts.map +1 -0
- package/resources/sites.js +154 -0
- package/resources/sites.js.map +1 -0
- package/resources/sites.mjs +150 -0
- package/resources/sites.mjs.map +1 -0
- package/resources/software-deployments.d.mts +472 -0
- package/resources/software-deployments.d.mts.map +1 -0
- package/resources/software-deployments.d.ts +472 -0
- package/resources/software-deployments.d.ts.map +1 -0
- package/resources/software-deployments.js +56 -0
- package/resources/software-deployments.js.map +1 -0
- package/resources/software-deployments.mjs +52 -0
- package/resources/software-deployments.mjs.map +1 -0
- package/resources/sso-me.d.mts +56 -0
- package/resources/sso-me.d.mts.map +1 -0
- package/resources/sso-me.d.ts +56 -0
- package/resources/sso-me.d.ts.map +1 -0
- package/resources/sso-me.js +21 -0
- package/resources/sso-me.js.map +1 -0
- package/resources/sso-me.mjs +17 -0
- package/resources/sso-me.mjs.map +1 -0
- package/resources/supergroups/exclusion-members.d.mts +66 -0
- package/resources/supergroups/exclusion-members.d.mts.map +1 -0
- package/resources/supergroups/exclusion-members.d.ts +66 -0
- package/resources/supergroups/exclusion-members.d.ts.map +1 -0
- package/resources/supergroups/exclusion-members.js +30 -0
- package/resources/supergroups/exclusion-members.js.map +1 -0
- package/resources/supergroups/exclusion-members.mjs +26 -0
- package/resources/supergroups/exclusion-members.mjs.map +1 -0
- package/resources/supergroups/inclusion-members.d.mts +66 -0
- package/resources/supergroups/inclusion-members.d.mts.map +1 -0
- package/resources/supergroups/inclusion-members.d.ts +66 -0
- package/resources/supergroups/inclusion-members.d.ts.map +1 -0
- package/resources/supergroups/inclusion-members.js +30 -0
- package/resources/supergroups/inclusion-members.js.map +1 -0
- package/resources/supergroups/inclusion-members.mjs +26 -0
- package/resources/supergroups/inclusion-members.mjs.map +1 -0
- package/resources/supergroups/index.d.mts +5 -0
- package/resources/supergroups/index.d.mts.map +1 -0
- package/resources/supergroups/index.d.ts +5 -0
- package/resources/supergroups/index.d.ts.map +1 -0
- package/resources/supergroups/index.js +13 -0
- package/resources/supergroups/index.js.map +1 -0
- package/resources/supergroups/index.mjs +6 -0
- package/resources/supergroups/index.mjs.map +1 -0
- package/resources/supergroups/members.d.mts +32 -0
- package/resources/supergroups/members.d.mts.map +1 -0
- package/resources/supergroups/members.d.ts +32 -0
- package/resources/supergroups/members.d.ts.map +1 -0
- package/resources/supergroups/members.js +24 -0
- package/resources/supergroups/members.js.map +1 -0
- package/resources/supergroups/members.mjs +20 -0
- package/resources/supergroups/members.mjs.map +1 -0
- package/resources/supergroups/supergroups.d.mts +131 -0
- package/resources/supergroups/supergroups.d.mts.map +1 -0
- package/resources/supergroups/supergroups.d.ts +131 -0
- package/resources/supergroups/supergroups.d.ts.map +1 -0
- package/resources/supergroups/supergroups.js +46 -0
- package/resources/supergroups/supergroups.js.map +1 -0
- package/resources/supergroups/supergroups.mjs +41 -0
- package/resources/supergroups/supergroups.mjs.map +1 -0
- package/resources/supergroups.d.mts +2 -0
- package/resources/supergroups.d.mts.map +1 -0
- package/resources/supergroups.d.ts +2 -0
- package/resources/supergroups.d.ts.map +1 -0
- package/resources/supergroups.js +6 -0
- package/resources/supergroups.js.map +1 -0
- package/resources/supergroups.mjs +3 -0
- package/resources/supergroups.mjs.map +1 -0
- package/resources/teams.d.mts +104 -0
- package/resources/teams.d.mts.map +1 -0
- package/resources/teams.d.ts +104 -0
- package/resources/teams.d.ts.map +1 -0
- package/resources/teams.js +52 -0
- package/resources/teams.js.map +1 -0
- package/resources/teams.mjs +48 -0
- package/resources/teams.mjs.map +1 -0
- package/resources/time-cards.d.mts +164 -0
- package/resources/time-cards.d.mts.map +1 -0
- package/resources/time-cards.d.ts +164 -0
- package/resources/time-cards.d.ts.map +1 -0
- package/resources/time-cards.js +31 -0
- package/resources/time-cards.js.map +1 -0
- package/resources/time-cards.mjs +27 -0
- package/resources/time-cards.mjs.map +1 -0
- package/resources/time-entries.d.mts +1503 -0
- package/resources/time-entries.d.mts.map +1 -0
- package/resources/time-entries.d.ts +1503 -0
- package/resources/time-entries.d.ts.map +1 -0
- package/resources/time-entries.js +57 -0
- package/resources/time-entries.js.map +1 -0
- package/resources/time-entries.mjs +53 -0
- package/resources/time-entries.mjs.map +1 -0
- package/resources/titles.d.mts +133 -0
- package/resources/titles.d.mts.map +1 -0
- package/resources/titles.d.ts +133 -0
- package/resources/titles.d.ts.map +1 -0
- package/resources/titles.js +51 -0
- package/resources/titles.js.map +1 -0
- package/resources/titles.mjs +47 -0
- package/resources/titles.mjs.map +1 -0
- package/resources/tracks.d.mts +101 -0
- package/resources/tracks.d.mts.map +1 -0
- package/resources/tracks.d.ts +101 -0
- package/resources/tracks.d.ts.map +1 -0
- package/resources/tracks.js +51 -0
- package/resources/tracks.js.map +1 -0
- package/resources/tracks.mjs +47 -0
- package/resources/tracks.mjs.map +1 -0
- package/resources/unassigned-shifts.d.mts +337 -0
- package/resources/unassigned-shifts.d.mts.map +1 -0
- package/resources/unassigned-shifts.d.ts +337 -0
- package/resources/unassigned-shifts.d.ts.map +1 -0
- package/resources/unassigned-shifts.js +45 -0
- package/resources/unassigned-shifts.js.map +1 -0
- package/resources/unassigned-shifts.mjs +41 -0
- package/resources/unassigned-shifts.mjs.map +1 -0
- package/resources/unassignedshifts.d.mts +1254 -0
- package/resources/unassignedshifts.d.mts.map +1 -0
- package/resources/unassignedshifts.d.ts +1254 -0
- package/resources/unassignedshifts.d.ts.map +1 -0
- package/resources/unassignedshifts.js +47 -0
- package/resources/unassignedshifts.js.map +1 -0
- package/resources/unassignedshifts.mjs +43 -0
- package/resources/unassignedshifts.mjs.map +1 -0
- package/resources/users.d.mts +208 -0
- package/resources/users.d.mts.map +1 -0
- package/resources/users.d.ts +208 -0
- package/resources/users.d.ts.map +1 -0
- package/resources/users.js +29 -0
- package/resources/users.js.map +1 -0
- package/resources/users.mjs +25 -0
- package/resources/users.mjs.map +1 -0
- package/resources/variable-compensation-payout-labels.d.mts +155 -0
- package/resources/variable-compensation-payout-labels.d.mts.map +1 -0
- package/resources/variable-compensation-payout-labels.d.ts +155 -0
- package/resources/variable-compensation-payout-labels.d.ts.map +1 -0
- package/resources/variable-compensation-payout-labels.js +41 -0
- package/resources/variable-compensation-payout-labels.js.map +1 -0
- package/resources/variable-compensation-payout-labels.mjs +37 -0
- package/resources/variable-compensation-payout-labels.mjs.map +1 -0
- package/resources/variable-compensation-payout-types.d.mts +334 -0
- package/resources/variable-compensation-payout-types.d.mts.map +1 -0
- package/resources/variable-compensation-payout-types.d.ts +334 -0
- package/resources/variable-compensation-payout-types.d.ts.map +1 -0
- package/resources/variable-compensation-payout-types.js +52 -0
- package/resources/variable-compensation-payout-types.js.map +1 -0
- package/resources/variable-compensation-payout-types.mjs +48 -0
- package/resources/variable-compensation-payout-types.mjs.map +1 -0
- package/resources/variable-compensation-payout-writes.d.mts +115 -0
- package/resources/variable-compensation-payout-writes.d.mts.map +1 -0
- package/resources/variable-compensation-payout-writes.d.ts +115 -0
- package/resources/variable-compensation-payout-writes.d.ts.map +1 -0
- package/resources/variable-compensation-payout-writes.js +19 -0
- package/resources/variable-compensation-payout-writes.js.map +1 -0
- package/resources/variable-compensation-payout-writes.mjs +15 -0
- package/resources/variable-compensation-payout-writes.mjs.map +1 -0
- package/resources/variable-compensation-payouts.d.mts +501 -0
- package/resources/variable-compensation-payouts.d.mts.map +1 -0
- package/resources/variable-compensation-payouts.d.ts +501 -0
- package/resources/variable-compensation-payouts.d.ts.map +1 -0
- package/resources/variable-compensation-payouts.js +41 -0
- package/resources/variable-compensation-payouts.js.map +1 -0
- package/resources/variable-compensation-payouts.mjs +37 -0
- package/resources/variable-compensation-payouts.mjs.map +1 -0
- package/resources/work-locations.d.mts +160 -0
- package/resources/work-locations.d.mts.map +1 -0
- package/resources/work-locations.d.ts +160 -0
- package/resources/work-locations.d.ts.map +1 -0
- package/resources/work-locations.js +51 -0
- package/resources/work-locations.js.map +1 -0
- package/resources/work-locations.mjs +47 -0
- package/resources/work-locations.mjs.map +1 -0
- package/resources/worker-change-fields.d.mts +44 -0
- package/resources/worker-change-fields.d.mts.map +1 -0
- package/resources/worker-change-fields.d.ts +44 -0
- package/resources/worker-change-fields.d.ts.map +1 -0
- package/resources/worker-change-fields.js +21 -0
- package/resources/worker-change-fields.js.map +1 -0
- package/resources/worker-change-fields.mjs +17 -0
- package/resources/worker-change-fields.mjs.map +1 -0
- package/resources/worker-changes.d.mts +271 -0
- package/resources/worker-changes.d.mts.map +1 -0
- package/resources/worker-changes.d.ts +271 -0
- package/resources/worker-changes.d.ts.map +1 -0
- package/resources/worker-changes.js +36 -0
- package/resources/worker-changes.js.map +1 -0
- package/resources/worker-changes.mjs +32 -0
- package/resources/worker-changes.mjs.map +1 -0
- package/resources/worker-time-splits.d.mts +375 -0
- package/resources/worker-time-splits.d.mts.map +1 -0
- package/resources/worker-time-splits.d.ts +375 -0
- package/resources/worker-time-splits.d.ts.map +1 -0
- package/resources/worker-time-splits.js +56 -0
- package/resources/worker-time-splits.js.map +1 -0
- package/resources/worker-time-splits.mjs +52 -0
- package/resources/worker-time-splits.mjs.map +1 -0
- package/resources/workers.d.mts +399 -0
- package/resources/workers.d.mts.map +1 -0
- package/resources/workers.d.ts +399 -0
- package/resources/workers.d.ts.map +1 -0
- package/resources/workers.js +34 -0
- package/resources/workers.js.map +1 -0
- package/resources/workers.mjs +30 -0
- package/resources/workers.mjs.map +1 -0
- package/resources/workflow-action-executions.d.mts +33 -0
- package/resources/workflow-action-executions.d.mts.map +1 -0
- package/resources/workflow-action-executions.d.ts +33 -0
- package/resources/workflow-action-executions.d.ts.map +1 -0
- package/resources/workflow-action-executions.js +18 -0
- package/resources/workflow-action-executions.js.map +1 -0
- package/resources/workflow-action-executions.mjs +14 -0
- package/resources/workflow-action-executions.mjs.map +1 -0
- package/resources/workflows.d.mts +768 -0
- package/resources/workflows.d.mts.map +1 -0
- package/resources/workflows.d.ts +768 -0
- package/resources/workflows.d.ts.map +1 -0
- package/resources/workflows.js +48 -0
- package/resources/workflows.js.map +1 -0
- package/resources/workflows.mjs +44 -0
- package/resources/workflows.mjs.map +1 -0
- package/resources.d.mts +2 -0
- package/resources.d.mts.map +1 -0
- package/resources.d.ts +2 -0
- package/resources.d.ts.map +1 -0
- package/resources.js +5 -0
- package/resources.js.map +1 -0
- package/resources.mjs +2 -0
- package/resources.mjs.map +1 -0
- package/src/api-promise.ts +2 -0
- package/src/client.ts +2996 -0
- package/src/core/README.md +3 -0
- package/src/core/api-promise.ts +92 -0
- package/src/core/error.ts +130 -0
- package/src/core/pagination.ts +155 -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/resource.ts +11 -0
- package/src/core/uploads.ts +2 -0
- package/src/error.ts +2 -0
- package/src/functions.md +254 -0
- package/src/functions.ts +270 -0
- package/src/index.ts +25 -0
- package/src/internal/README.md +3 -0
- package/src/internal/builtin-types.ts +93 -0
- package/src/internal/detect-platform.ts +196 -0
- package/src/internal/errors.ts +33 -0
- package/src/internal/headers.ts +97 -0
- package/src/internal/parse.ts +56 -0
- package/src/internal/request-options.ts +91 -0
- package/src/internal/shim-types.ts +26 -0
- package/src/internal/shims.ts +107 -0
- package/src/internal/to-file.ts +154 -0
- package/src/internal/types.ts +93 -0
- package/src/internal/uploads.ts +187 -0
- package/src/internal/utils/base64.ts +40 -0
- package/src/internal/utils/bytes.ts +32 -0
- package/src/internal/utils/env.ts +18 -0
- package/src/internal/utils/log.ts +128 -0
- package/src/internal/utils/path.ts +88 -0
- package/src/internal/utils/query.ts +23 -0
- package/src/internal/utils/sleep.ts +3 -0
- package/src/internal/utils/uuid.ts +17 -0
- package/src/internal/utils/values.ts +105 -0
- package/src/internal/utils.ts +9 -0
- package/src/lib/.keep +4 -0
- package/src/lib/leave-programs/README.md +160 -0
- package/src/lib/leave-programs/advanced.ts +11 -0
- package/src/lib/leave-programs/context.ts +101 -0
- package/src/lib/leave-programs/define-company-leave-program.ts +58 -0
- package/src/lib/leave-programs/duration.ts +20 -0
- package/src/lib/leave-programs/pay.ts +18 -0
- package/src/lib/leave-programs/policy-builder.ts +113 -0
- package/src/lib/leave-programs/recipes/parental-top-up-policy.ts +85 -0
- package/src/lib/leave-programs/testing.ts +16 -0
- package/src/lib/leave-programs/types.ts +274 -0
- package/src/lib/leave-programs.ts +35 -0
- package/src/lib/manifest/_existing-component-fields.ts +96 -0
- package/src/lib/manifest/_helpers.ts +168 -0
- package/src/lib/manifest/acp-agent-source-files.ts +42 -0
- package/src/lib/manifest/acp-agent.ts +215 -0
- package/src/lib/manifest/agent.ts +141 -0
- package/src/lib/manifest/app.ts +233 -0
- package/src/lib/manifest/business-event.ts +72 -0
- package/src/lib/manifest/category.ts +129 -0
- package/src/lib/manifest/custom-field-section.ts +86 -0
- package/src/lib/manifest/custom-field.ts +420 -0
- package/src/lib/manifest/custom-object-action.ts +119 -0
- package/src/lib/manifest/custom-object-field-section.ts +137 -0
- package/src/lib/manifest/custom-object-page-layout.ts +2378 -0
- package/src/lib/manifest/custom-object.ts +544 -0
- package/src/lib/manifest/custom-skill.ts +205 -0
- package/src/lib/manifest/existing-manifest-context.ts +923 -0
- package/src/lib/manifest/field.ts +1065 -0
- package/src/lib/manifest/index.ts +284 -0
- package/src/lib/manifest/list-view.ts +253 -0
- package/src/lib/manifest/manifest-builder.ts +255 -0
- package/src/lib/manifest/manifest-function.ts +186 -0
- package/src/lib/manifest/node.ts +4 -0
- package/src/lib/manifest/rule.ts +291 -0
- package/src/lib/manifest/sdui-page.ts +175 -0
- package/src/lib/manifest/validation.ts +202 -0
- package/src/lib/manifest/workflow.ts +248 -0
- package/src/lib/manifest.ts +1 -0
- package/src/pagination.ts +2 -0
- package/src/resource.ts +2 -0
- package/src/resources/agents/agents.ts +340 -0
- package/src/resources/agents/deployments.ts +249 -0
- package/src/resources/agents/index.ts +40 -0
- package/src/resources/agents/sessions/events.ts +107 -0
- package/src/resources/agents/sessions/index.ts +14 -0
- package/src/resources/agents/sessions/messages.ts +111 -0
- package/src/resources/agents/sessions/resume-state.ts +32 -0
- package/src/resources/agents/sessions/sessions.ts +333 -0
- package/src/resources/agents/sessions.ts +3 -0
- package/src/resources/agents/source-revisions.ts +267 -0
- package/src/resources/agents.ts +3 -0
- package/src/resources/app-users.ts +275 -0
- package/src/resources/background-check-candidates.ts +434 -0
- package/src/resources/break-policies.ts +131 -0
- package/src/resources/break-types.ts +252 -0
- package/src/resources/business-partner-groups.ts +156 -0
- package/src/resources/business-partners.ts +200 -0
- package/src/resources/business-structure-paths.ts +240 -0
- package/src/resources/candidate-applications.ts +106 -0
- package/src/resources/candidates.ts +89 -0
- package/src/resources/companies.ts +120 -0
- package/src/resources/company-legal-entities.ts +242 -0
- package/src/resources/company-legal-entity-workers.ts +120 -0
- package/src/resources/compensation-bands-details.ts +148 -0
- package/src/resources/compensations.ts +323 -0
- package/src/resources/custom-apps.ts +442 -0
- package/src/resources/custom-fields.ts +109 -0
- package/src/resources/custom-objects/custom-objects.ts +258 -0
- package/src/resources/custom-objects/fields.ts +459 -0
- package/src/resources/custom-objects/index.ts +35 -0
- package/src/resources/custom-objects/records.ts +353 -0
- package/src/resources/custom-objects.ts +3 -0
- package/src/resources/custom-pages.ts +247 -0
- package/src/resources/custom-settings.ts +376 -0
- package/src/resources/departments.ts +175 -0
- package/src/resources/developer-program-application.ts +233 -0
- package/src/resources/developer-users.ts +77 -0
- package/src/resources/device-orders.ts +205 -0
- package/src/resources/devices.ts +501 -0
- package/src/resources/draft-hires.ts +599 -0
- package/src/resources/draft-transitions.ts +583 -0
- package/src/resources/earning-types.ts +72 -0
- package/src/resources/earnings-inputs.ts +322 -0
- package/src/resources/employee-documents.ts +183 -0
- package/src/resources/employment-types.ts +117 -0
- package/src/resources/entitlements.ts +47 -0
- package/src/resources/files.ts +203 -0
- package/src/resources/functions/deployments.ts +228 -0
- package/src/resources/functions/executions.ts +193 -0
- package/src/resources/functions/functions.ts +244 -0
- package/src/resources/functions/index.ts +31 -0
- package/src/resources/functions.ts +3 -0
- package/src/resources/headcount-positions.ts +1829 -0
- package/src/resources/headcount-priorities.ts +105 -0
- package/src/resources/hire-requirements.ts +140 -0
- package/src/resources/hires.ts +786 -0
- package/src/resources/index.ts +807 -0
- package/src/resources/job-assignments.ts +375 -0
- package/src/resources/job-codes.ts +562 -0
- package/src/resources/job-dimensions.ts +235 -0
- package/src/resources/job-functions.ts +105 -0
- package/src/resources/job-pay-rate-exceptions.ts +161 -0
- package/src/resources/job-requisitions-write.ts +330 -0
- package/src/resources/job-requisitions.ts +74 -0
- package/src/resources/kiosk-badges.ts +353 -0
- package/src/resources/leave-accruals.ts +490 -0
- package/src/resources/leave-balances.ts +147 -0
- package/src/resources/leave-program-evaluations.ts +737 -0
- package/src/resources/leave-requests.ts +938 -0
- package/src/resources/leave-types.ts +105 -0
- package/src/resources/legal-entities.ts +418 -0
- package/src/resources/levels.ts +254 -0
- package/src/resources/listing-submissions.ts +120 -0
- package/src/resources/listing-transitions.ts +84 -0
- package/src/resources/listing.ts +2297 -0
- package/src/resources/location-factors.ts +657 -0
- package/src/resources/metadata/components.ts +349 -0
- package/src/resources/metadata/deployment-runs.ts +186 -0
- package/src/resources/metadata/index.ts +30 -0
- package/src/resources/metadata/metadata.ts +237 -0
- package/src/resources/metadata/schema.ts +105 -0
- package/src/resources/metadata/types.ts +55 -0
- package/src/resources/metadata/validation-runs.ts +186 -0
- package/src/resources/metadata.ts +3 -0
- package/src/resources/object-categories.ts +138 -0
- package/src/resources/package-installs.ts +143 -0
- package/src/resources/package-managed-installs.ts +156 -0
- package/src/resources/package-sandbox-links.ts +195 -0
- package/src/resources/package-uninstalls.ts +168 -0
- package/src/resources/package-upgrades.ts +183 -0
- package/src/resources/package-version-component-updates.ts +154 -0
- package/src/resources/package-versions/index.ts +9 -0
- package/src/resources/package-versions/package-versions.ts +156 -0
- package/src/resources/package-versions/publish.ts +74 -0
- package/src/resources/package-versions.ts +3 -0
- package/src/resources/packages/available-upgrades.ts +51 -0
- package/src/resources/packages/index.ts +27 -0
- package/src/resources/packages/next-versions.ts +95 -0
- package/src/resources/packages/packages.ts +374 -0
- package/src/resources/packages/versions.ts +175 -0
- package/src/resources/packages.ts +3 -0
- package/src/resources/payroll-runs/index.ts +15 -0
- package/src/resources/payroll-runs/payroll-runs.ts +277 -0
- package/src/resources/payroll-runs/worker-payroll-records.ts +260 -0
- package/src/resources/payroll-runs.ts +3 -0
- package/src/resources/platform-capabilities.ts +41 -0
- package/src/resources/report-runs.ts +286 -0
- package/src/resources/reports/available-filters.ts +60 -0
- package/src/resources/reports/index.ts +4 -0
- package/src/resources/reports/reports.ts +112 -0
- package/src/resources/reports.ts +3 -0
- package/src/resources/sandboxes.ts +1094 -0
- package/src/resources/scheduled-job-assignments.ts +211 -0
- package/src/resources/schedules.ts +506 -0
- package/src/resources/shared.ts +359 -0
- package/src/resources/shift-assignments.ts +365 -0
- package/src/resources/shift-inputs.ts +408 -0
- package/src/resources/shiftassignments.ts +1534 -0
- package/src/resources/sites.ts +777 -0
- package/src/resources/software-deployments.ts +612 -0
- package/src/resources/sso-me.ts +70 -0
- package/src/resources/supergroups/exclusion-members.ts +101 -0
- package/src/resources/supergroups/inclusion-members.ts +101 -0
- package/src/resources/supergroups/index.ts +22 -0
- package/src/resources/supergroups/members.ts +51 -0
- package/src/resources/supergroups/supergroups.ts +204 -0
- package/src/resources/supergroups.ts +3 -0
- package/src/resources/teams.ts +161 -0
- package/src/resources/time-cards.ts +219 -0
- package/src/resources/time-entries.ts +1871 -0
- package/src/resources/titles.ts +189 -0
- package/src/resources/tracks.ts +152 -0
- package/src/resources/unassigned-shifts.ts +418 -0
- package/src/resources/unassignedshifts.ts +1542 -0
- package/src/resources/users.ts +265 -0
- package/src/resources/variable-compensation-payout-labels.ts +227 -0
- package/src/resources/variable-compensation-payout-types.ts +440 -0
- package/src/resources/variable-compensation-payout-writes.ts +146 -0
- package/src/resources/variable-compensation-payouts.ts +702 -0
- package/src/resources/work-locations.ts +217 -0
- package/src/resources/worker-change-fields.ts +63 -0
- package/src/resources/worker-changes.ts +359 -0
- package/src/resources/worker-time-splits.ts +485 -0
- package/src/resources/workers.ts +1028 -0
- package/src/resources/workflow-action-executions.ts +50 -0
- package/src/resources/workflows.ts +1434 -0
- package/src/resources.ts +1 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +2 -0
- package/src/version.ts +1 -0
- package/uploads.d.mts +3 -0
- package/uploads.d.mts.map +1 -0
- package/uploads.d.ts +3 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +6 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +3 -0
- package/uploads.mjs.map +1 -0
- package/version.d.mts +2 -0
- package/version.d.mts.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,2378 @@
|
|
|
1
|
+
import { generateId } from './_helpers';
|
|
2
|
+
import { CustomObjectFieldSection } from './custom-object-field-section';
|
|
3
|
+
import type {
|
|
4
|
+
CustomObject,
|
|
5
|
+
CustomObjectFieldInput,
|
|
6
|
+
CustomObjectStandardFieldIdentifier,
|
|
7
|
+
} from './custom-object';
|
|
8
|
+
import { getExistingManifestContext, type ExistingManifestContextOptions } from './existing-manifest-context';
|
|
9
|
+
import type { Field } from './field';
|
|
10
|
+
import type { ManifestComponentDeletion } from './manifest-builder';
|
|
11
|
+
import { requireStringComponentField } from './_existing-component-fields';
|
|
12
|
+
|
|
13
|
+
export interface PageLayoutDeletionIdentifier {
|
|
14
|
+
layoutId: string;
|
|
15
|
+
objectRqlName: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export type ObjectRqlName = string;
|
|
19
|
+
export type BlueprintKey = string;
|
|
20
|
+
export type LayoutApiName = string;
|
|
21
|
+
export type TabKey = string;
|
|
22
|
+
export type SectionKey = string;
|
|
23
|
+
export type HeaderFieldKey = string;
|
|
24
|
+
export type FieldRqlName = string;
|
|
25
|
+
export type RelatedObjectRqlName = string;
|
|
26
|
+
export type CanvasCompositionId = string;
|
|
27
|
+
|
|
28
|
+
export type JsonPrimitive = string | number | boolean | null;
|
|
29
|
+
export type JsonValue = JsonPrimitive | JsonObject | JsonValue[];
|
|
30
|
+
export interface JsonObject {
|
|
31
|
+
[key: string]: JsonValue;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
// ---------------------------------------------------------------------------
|
|
35
|
+
// header_edits — HeaderEditsDTO
|
|
36
|
+
// ---------------------------------------------------------------------------
|
|
37
|
+
|
|
38
|
+
/** Edit to a built-in (system) header field. */
|
|
39
|
+
export interface SystemHeaderFieldEdit {
|
|
40
|
+
/** Replace the system field's RQL field reference. Optional. */
|
|
41
|
+
newRqlField?: FieldRqlName;
|
|
42
|
+
/** Remove this system field from the header. Optional. */
|
|
43
|
+
deleted?: boolean;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Custom header field added via `newFields`.
|
|
48
|
+
*
|
|
49
|
+
* `key` is required and must be non-empty — it is used as the stable identity
|
|
50
|
+
* for this field in visibility conditions.
|
|
51
|
+
*/
|
|
52
|
+
export interface NewHeaderField {
|
|
53
|
+
/** RQL field name to display. Required. */
|
|
54
|
+
rqlName: FieldRqlName;
|
|
55
|
+
/** Stable key for this field. Required. */
|
|
56
|
+
key: HeaderFieldKey;
|
|
57
|
+
/** Whether the user can remove this field. Optional. */
|
|
58
|
+
canBeDeleted?: boolean;
|
|
59
|
+
/** Whether the user can swap this field for another. Optional. */
|
|
60
|
+
canBeChanged?: boolean;
|
|
61
|
+
/** Whether the user can reorder this field. Optional. */
|
|
62
|
+
canBeMoved?: boolean;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Header configuration for a page layout (`header_edits`).
|
|
67
|
+
*
|
|
68
|
+
* Only the keys listed here are accepted — anything else is silently dropped
|
|
69
|
+
* on the wire. Pass `{}` for an unchanged header.
|
|
70
|
+
*
|
|
71
|
+
* > **Caution:** key names are camelCase on the wire. Snake_case keys are
|
|
72
|
+
* > silently dropped and produce an empty header on deploy.
|
|
73
|
+
*/
|
|
74
|
+
export interface HeaderEdits {
|
|
75
|
+
/** Replace the record title field (pass the field's api_name). Optional. */
|
|
76
|
+
newTitleField?: FieldRqlName;
|
|
77
|
+
/** Remove the title field from the header. Optional. */
|
|
78
|
+
titleFieldDeleted?: boolean;
|
|
79
|
+
/** Replace the record description field. Optional. */
|
|
80
|
+
newDescriptionField?: FieldRqlName;
|
|
81
|
+
/** Remove the description field from the header. Optional. */
|
|
82
|
+
descriptionFieldDeleted?: boolean;
|
|
83
|
+
/** Edits to built-in system header fields, keyed by system field key. Optional. */
|
|
84
|
+
systemFieldEdits?: Record<HeaderFieldKey, SystemHeaderFieldEdit>;
|
|
85
|
+
/** Additional custom fields to add to the header. Optional. */
|
|
86
|
+
newFields?: NewHeaderField[];
|
|
87
|
+
/** Ordered list of header field RQL names. Custom header keys are accepted and converted. Optional. */
|
|
88
|
+
headerFieldsOrder?: FieldRqlName[];
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
interface SerializedSystemHeaderFieldEdit extends Omit<SystemHeaderFieldEdit, 'newRqlField'> {
|
|
92
|
+
newRqlField?: FieldRqlName | null;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
interface SerializedHeaderEdits
|
|
96
|
+
extends Omit<HeaderEdits, 'newTitleField' | 'newDescriptionField' | 'systemFieldEdits'> {
|
|
97
|
+
newTitleField?: FieldRqlName | null;
|
|
98
|
+
newDescriptionField?: FieldRqlName | null;
|
|
99
|
+
systemFieldEdits?: Record<HeaderFieldKey, SerializedSystemHeaderFieldEdit>;
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
// ---------------------------------------------------------------------------
|
|
103
|
+
// tab_edits — TabEditsDTO + section/tab DTOs
|
|
104
|
+
// ---------------------------------------------------------------------------
|
|
105
|
+
|
|
106
|
+
export type SectionFieldsLayout = 'one_column' | 'two_column' | 'three_column' | 'responsive';
|
|
107
|
+
export type TabLayout = 'vertical' | 'horizontal';
|
|
108
|
+
export type CustomObjectCustomSectionComponentKey = 'attachments' | 'comments';
|
|
109
|
+
|
|
110
|
+
/** Default value wrapper used by `SectionField.defaultValue`. */
|
|
111
|
+
export interface SectionFieldDefaultValue {
|
|
112
|
+
value: JsonValue;
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/** Options for one field entry inside a `fields_section`. */
|
|
116
|
+
export interface SectionFieldOptions {
|
|
117
|
+
/** Hide this field from view. Optional. */
|
|
118
|
+
hidden?: boolean;
|
|
119
|
+
/** Allow inline editing of this field. Optional. */
|
|
120
|
+
editable?: boolean;
|
|
121
|
+
/** Render this field read-only. Optional. */
|
|
122
|
+
readOnly?: boolean;
|
|
123
|
+
/** Default value metadata for the field. Optional. */
|
|
124
|
+
defaultValue?: SectionFieldDefaultValue;
|
|
125
|
+
/** Rich-text field height. Optional. */
|
|
126
|
+
height?: number;
|
|
127
|
+
/** Whether the layout manager can remove this field. Optional. */
|
|
128
|
+
canBeDeleted?: boolean;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
/** A typed field entry inside a `fields_section`. */
|
|
132
|
+
export interface SectionField extends SectionFieldOptions {
|
|
133
|
+
/** Field to display. Required. */
|
|
134
|
+
field: CustomObjectFieldInput;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
/** @deprecated Use `SectionField` for object entries or `SectionFieldInput` for field arrays. */
|
|
138
|
+
export type SectionFieldRef = SectionField;
|
|
139
|
+
|
|
140
|
+
/** One field entry inside a `fields_section`. */
|
|
141
|
+
export type SectionFieldInput = CustomObjectFieldInput | SectionField;
|
|
142
|
+
|
|
143
|
+
/** Common edit controls for sections. */
|
|
144
|
+
export interface PageLayoutSectionOptions {
|
|
145
|
+
/** Whether the layout manager can delete this section. Optional. */
|
|
146
|
+
canBeDeleted?: boolean;
|
|
147
|
+
/** Whether the layout manager can rename this section. Optional. */
|
|
148
|
+
canBeRenamed?: boolean;
|
|
149
|
+
/** Hide the section title. Optional. */
|
|
150
|
+
hideName?: boolean;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
/** A standard field-grid section inside a tab. */
|
|
154
|
+
export interface FieldsSection extends PageLayoutSectionOptions {
|
|
155
|
+
type: 'fields_section';
|
|
156
|
+
/** Field section metadata for the fields displayed in this layout section. Required. */
|
|
157
|
+
section: CustomObjectFieldSection;
|
|
158
|
+
/** Stable layout section key. Optional. Defaults to `section.getSectionId()`. */
|
|
159
|
+
key?: SectionKey;
|
|
160
|
+
/** Display name of the layout section. Optional. Defaults to the field section name. */
|
|
161
|
+
name?: string;
|
|
162
|
+
/** Fields to display in this section. Required. */
|
|
163
|
+
fields: SectionFieldInput[];
|
|
164
|
+
/** Column layout for the fields. Optional. @default `'responsive'` (backend default). */
|
|
165
|
+
layout?: SectionFieldsLayout;
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
export interface RelatedObjectSection extends PageLayoutSectionOptions {
|
|
169
|
+
type: 'related_object_section';
|
|
170
|
+
/** Stable layout section key. Required. */
|
|
171
|
+
key: SectionKey;
|
|
172
|
+
/** Display name of the layout section. Required. */
|
|
173
|
+
name: string;
|
|
174
|
+
/** Related object whose records point back to this custom object. Required. */
|
|
175
|
+
relatedObjectRqlName: RelatedObjectRqlName;
|
|
176
|
+
/** Field on the related object that points back to this custom object. Required. */
|
|
177
|
+
relatedFieldRqlName: FieldRqlName;
|
|
178
|
+
/** Field RQL names to display for related records. Required. */
|
|
179
|
+
fields: FieldRqlName[];
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface RelatedFieldSection extends PageLayoutSectionOptions {
|
|
183
|
+
type: 'related_field_section';
|
|
184
|
+
/** Stable layout section key. Required. */
|
|
185
|
+
key: SectionKey;
|
|
186
|
+
/** Display name of the layout section. Required. */
|
|
187
|
+
name: string;
|
|
188
|
+
/** Related object reached from this custom object. Required. */
|
|
189
|
+
relatedObjectRqlName: RelatedObjectRqlName;
|
|
190
|
+
/** Field on this custom object that points to the related object. Required. */
|
|
191
|
+
relatedFieldRqlName: FieldRqlName;
|
|
192
|
+
/** Field RQL names to display from the related object. Required. */
|
|
193
|
+
fields: FieldRqlName[];
|
|
194
|
+
/** Column layout for the fields. Optional. @default `'responsive'` (backend default). */
|
|
195
|
+
layout?: SectionFieldsLayout;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface CustomSection extends PageLayoutSectionOptions {
|
|
199
|
+
type: 'custom_section';
|
|
200
|
+
/** Stable layout section key. Required. */
|
|
201
|
+
key: SectionKey;
|
|
202
|
+
/** Display name of the layout section. Required. */
|
|
203
|
+
name: string;
|
|
204
|
+
/** Custom object section component key. Required. */
|
|
205
|
+
componentKey: CustomObjectCustomSectionComponentKey;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
export interface ResizableLayoutPosition {
|
|
209
|
+
identifier: string;
|
|
210
|
+
width: number;
|
|
211
|
+
height: number;
|
|
212
|
+
minWidth?: number;
|
|
213
|
+
minHeight?: number;
|
|
214
|
+
maxWidth?: number;
|
|
215
|
+
maxHeight?: number;
|
|
216
|
+
}
|
|
217
|
+
|
|
218
|
+
export interface ReportsSectionItem {
|
|
219
|
+
key: string;
|
|
220
|
+
reportId: string;
|
|
221
|
+
position: ResizableLayoutPosition;
|
|
222
|
+
contextualFieldAttrName?: FieldRqlName;
|
|
223
|
+
visualizationType?: string;
|
|
224
|
+
}
|
|
225
|
+
|
|
226
|
+
export interface ReportsSection extends PageLayoutSectionOptions {
|
|
227
|
+
type: 'reports_section';
|
|
228
|
+
/** Stable layout section key. Required. */
|
|
229
|
+
key: SectionKey;
|
|
230
|
+
/** Display name of the layout section. Required. */
|
|
231
|
+
name: string;
|
|
232
|
+
/** Reports to display in this section. Required. */
|
|
233
|
+
reports: ReportsSectionItem[];
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export interface CanvasSection extends PageLayoutSectionOptions {
|
|
237
|
+
type: 'canvas_section';
|
|
238
|
+
/** Stable layout section key. Required. */
|
|
239
|
+
key: SectionKey;
|
|
240
|
+
/** Display name of the layout section. Required. */
|
|
241
|
+
name: string;
|
|
242
|
+
/** Canvas composition to render. Required. */
|
|
243
|
+
canvasCompositionId: CanvasCompositionId;
|
|
244
|
+
/** Composition input name to field or state path mapping. Optional. */
|
|
245
|
+
inputMapping?: Record<string, string>;
|
|
246
|
+
}
|
|
247
|
+
|
|
248
|
+
/** A section inside a page layout tab. */
|
|
249
|
+
export type PageLayoutSection =
|
|
250
|
+
| FieldsSection
|
|
251
|
+
| RelatedObjectSection
|
|
252
|
+
| RelatedFieldSection
|
|
253
|
+
| CustomSection
|
|
254
|
+
| ReportsSection
|
|
255
|
+
| CanvasSection;
|
|
256
|
+
|
|
257
|
+
/** A tab that contains one or more field-grid sections. */
|
|
258
|
+
export interface TabWithSections {
|
|
259
|
+
type: 'tab_with_sections';
|
|
260
|
+
/** Stable key for this tab. Required. */
|
|
261
|
+
key: TabKey;
|
|
262
|
+
/** Display name of the tab. Required. */
|
|
263
|
+
name: string;
|
|
264
|
+
/** Sections inside this tab. Required. */
|
|
265
|
+
sections: PageLayoutSection[];
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/** A tab that hosts a custom UI component. */
|
|
269
|
+
export interface CustomTab {
|
|
270
|
+
type: 'custom_tab';
|
|
271
|
+
/** Stable key for this tab. Required. */
|
|
272
|
+
key: TabKey;
|
|
273
|
+
/** Display name of the tab. Required. */
|
|
274
|
+
name: string;
|
|
275
|
+
/** Key of the custom component to render. Required. */
|
|
276
|
+
componentKey: string;
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
/** A tab entry in a page layout — either a sections-based tab or a custom component tab. */
|
|
280
|
+
export type PageLayoutTab = TabWithSections | CustomTab;
|
|
281
|
+
|
|
282
|
+
/** Column layout for a `fields_section`. */
|
|
283
|
+
/** Edits to a built-in section inside a system tab. */
|
|
284
|
+
export interface SystemSectionEdit {
|
|
285
|
+
/** Rename this section. Optional. */
|
|
286
|
+
newName?: string;
|
|
287
|
+
/** Remove this section. Optional. */
|
|
288
|
+
deleted?: boolean;
|
|
289
|
+
/** Change the column layout. Optional. */
|
|
290
|
+
newLayout?: SectionFieldsLayout;
|
|
291
|
+
/** Add fields to this section. Optional. */
|
|
292
|
+
newFields?: SectionFieldInput[];
|
|
293
|
+
/** Hide the section name header. Optional. */
|
|
294
|
+
newHideName?: boolean;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
/** Edits to a built-in (system) tab. */
|
|
298
|
+
export interface SystemTabEdit {
|
|
299
|
+
/** Rename this tab. Optional. */
|
|
300
|
+
newName?: string;
|
|
301
|
+
/** Remove this tab. Optional. */
|
|
302
|
+
deleted?: boolean;
|
|
303
|
+
/** Add new sections to this tab. Optional. */
|
|
304
|
+
newSections?: PageLayoutSection[];
|
|
305
|
+
/** Edits to built-in sections inside this tab, keyed by section key. Optional. */
|
|
306
|
+
systemSectionEdits?: Record<SectionKey, SystemSectionEdit>;
|
|
307
|
+
/** Reorder sections by key. Optional. */
|
|
308
|
+
sectionsOrder?: SectionKey[];
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
/**
|
|
312
|
+
* Tab structure configuration for a page layout (`tab_edits`).
|
|
313
|
+
*
|
|
314
|
+
* All fields are optional. An omitted `tabEdits` defaults to `{}`.
|
|
315
|
+
*
|
|
316
|
+
* > **Caution:** key names are camelCase on the wire. Snake_case keys are
|
|
317
|
+
* > silently dropped and produce an empty layout on deploy.
|
|
318
|
+
*/
|
|
319
|
+
export interface TabEdits {
|
|
320
|
+
/** New tabs to add to this layout. Each must include a `type` discriminator. Optional. */
|
|
321
|
+
newTabs?: PageLayoutTab[];
|
|
322
|
+
/** Edits to existing system tabs, keyed by tab key. Optional. */
|
|
323
|
+
systemTabEdits?: Record<TabKey, SystemTabEdit>;
|
|
324
|
+
/** Ordered list of tab `key` values (new + system). Optional. */
|
|
325
|
+
tabsOrder?: TabKey[];
|
|
326
|
+
/** Tab strip orientation. Optional. */
|
|
327
|
+
newTabLayout?: TabLayout;
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
// ---------------------------------------------------------------------------
|
|
331
|
+
// visibility_conditions — VisibilityConditionsDTO
|
|
332
|
+
// ---------------------------------------------------------------------------
|
|
333
|
+
|
|
334
|
+
/**
|
|
335
|
+
* A single visibility condition applied to a section or tab.
|
|
336
|
+
*
|
|
337
|
+
* Both fields are required by the backend — pass an empty string / empty object
|
|
338
|
+
* if you have no formula or condition tree.
|
|
339
|
+
*/
|
|
340
|
+
export interface VisibilityCondition {
|
|
341
|
+
/** RQL formula that controls visibility. Required. */
|
|
342
|
+
rqlFormula: string;
|
|
343
|
+
/** Layered conditions tree (AST). Required. */
|
|
344
|
+
layeredConditionsTree: JsonObject;
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
/**
|
|
348
|
+
* Visibility conditions for sections and tabs on a page layout.
|
|
349
|
+
*
|
|
350
|
+
* Pass `{}` for no conditions.
|
|
351
|
+
*/
|
|
352
|
+
export interface VisibilityConditions {
|
|
353
|
+
/** Per-section visibility conditions, keyed by section key. Optional. */
|
|
354
|
+
sections?: Record<SectionKey, VisibilityCondition>;
|
|
355
|
+
/** Per-tab visibility conditions, keyed by tab key. Optional. */
|
|
356
|
+
tabs?: Record<TabKey, VisibilityCondition>;
|
|
357
|
+
}
|
|
358
|
+
|
|
359
|
+
// ---------------------------------------------------------------------------
|
|
360
|
+
// Mutation helpers
|
|
361
|
+
// ---------------------------------------------------------------------------
|
|
362
|
+
|
|
363
|
+
/** Where to insert a new layout item. Defaults to `'end'`. */
|
|
364
|
+
export type PageLayoutMutationPosition = 'start' | 'end' | number;
|
|
365
|
+
|
|
366
|
+
interface AddPageLayoutFieldOptionsBase extends SectionFieldOptions {
|
|
367
|
+
/** Insert position inside the section field list. Optional. @default `'end'` */
|
|
368
|
+
position?: PageLayoutMutationPosition;
|
|
369
|
+
/** Allow the same field to appear twice in the same section. Optional. @default false */
|
|
370
|
+
allowDuplicate?: boolean;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
/** Options for adding a field to a typed custom-object field section. */
|
|
374
|
+
export interface AddCustomPageLayoutFieldOptions extends AddPageLayoutFieldOptionsBase {
|
|
375
|
+
/**
|
|
376
|
+
* Tab key containing the target section. Optional when `section` is unique
|
|
377
|
+
* across the layout.
|
|
378
|
+
*/
|
|
379
|
+
tabKey?: string;
|
|
380
|
+
/** Field-section metadata used to find typed custom layout sections and assign field metadata. */
|
|
381
|
+
section?: CustomObjectFieldSection;
|
|
382
|
+
/** Layout section key. Optional escape hatch for ambiguous custom sections. */
|
|
383
|
+
sectionKey?: SectionKey;
|
|
384
|
+
/** Deprecated. Use `section`. */
|
|
385
|
+
fieldSection?: never;
|
|
386
|
+
/** Custom layout sections are selected by `section`; `sectionKey` can disambiguate. */
|
|
387
|
+
systemSection?: false;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
/** Options for adding a field to a built-in system section. */
|
|
391
|
+
export interface AddSystemPageLayoutFieldOptions extends AddPageLayoutFieldOptionsBase {
|
|
392
|
+
/**
|
|
393
|
+
* Add to a built-in system section via `systemTabEdits`.
|
|
394
|
+
*
|
|
395
|
+
* When true, `tabKey` and `sectionKey` are required and the edit is created
|
|
396
|
+
* if it does not already exist.
|
|
397
|
+
*/
|
|
398
|
+
systemSection: true;
|
|
399
|
+
/** System tab key containing the target section. Required. */
|
|
400
|
+
tabKey: string;
|
|
401
|
+
/** Built-in system section key. Required. */
|
|
402
|
+
sectionKey: string;
|
|
403
|
+
/** Custom field-section objects are only accepted for custom layout sections. */
|
|
404
|
+
section?: never;
|
|
405
|
+
/** Deprecated. Use `section` for custom sections, or `sectionKey` for system sections. */
|
|
406
|
+
fieldSection?: never;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
/** Options for adding a field to an existing layout section. */
|
|
410
|
+
export type AddPageLayoutFieldOptions = AddCustomPageLayoutFieldOptions | AddSystemPageLayoutFieldOptions;
|
|
411
|
+
|
|
412
|
+
/** Options for adding multiple fields to an existing layout section. */
|
|
413
|
+
export type AddPageLayoutFieldsOptions = AddPageLayoutFieldOptions;
|
|
414
|
+
|
|
415
|
+
/** Options for removing fields from a layout. */
|
|
416
|
+
interface RemovePageLayoutFieldOptionsBase {
|
|
417
|
+
/**
|
|
418
|
+
* Remove all matching occurrences. When false, removing a field that appears
|
|
419
|
+
* more than once throws. Optional. @default true
|
|
420
|
+
*/
|
|
421
|
+
removeAll?: boolean;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
/** Options for removing fields from typed custom-object field sections. */
|
|
425
|
+
export interface RemoveCustomPageLayoutFieldOptions extends RemovePageLayoutFieldOptionsBase {
|
|
426
|
+
/** Limit removal to one tab. Optional. */
|
|
427
|
+
tabKey?: string;
|
|
428
|
+
/** Limit removal to one field section. Optional. */
|
|
429
|
+
section?: CustomObjectFieldSection;
|
|
430
|
+
/** Limit removal to one layout section key. Optional. */
|
|
431
|
+
sectionKey?: SectionKey;
|
|
432
|
+
/** Custom layout sections are selected by `section`; `sectionKey` can disambiguate. */
|
|
433
|
+
systemSection?: false;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
/** Options for removing fields from built-in system section edits. */
|
|
437
|
+
export interface RemoveSystemPageLayoutFieldOptions extends RemovePageLayoutFieldOptionsBase {
|
|
438
|
+
/** Remove from a built-in system section edit. Required. */
|
|
439
|
+
systemSection: true;
|
|
440
|
+
/** System tab key containing the target section. Required. */
|
|
441
|
+
tabKey: string;
|
|
442
|
+
/** Built-in system section key. Required. */
|
|
443
|
+
sectionKey: string;
|
|
444
|
+
/** Custom field-section objects are only accepted for custom layout sections. */
|
|
445
|
+
section?: never;
|
|
446
|
+
}
|
|
447
|
+
|
|
448
|
+
/** Options for removing fields from a layout. */
|
|
449
|
+
export type RemovePageLayoutFieldOptions =
|
|
450
|
+
| RemoveCustomPageLayoutFieldOptions
|
|
451
|
+
| RemoveSystemPageLayoutFieldOptions;
|
|
452
|
+
|
|
453
|
+
/** Options for adding a section to an existing tab. */
|
|
454
|
+
export interface AddPageLayoutSectionOptions {
|
|
455
|
+
/** Tab key to add the section to. Required. */
|
|
456
|
+
tabKey: string;
|
|
457
|
+
/** Insert position inside the tab. Optional. @default `'end'` */
|
|
458
|
+
position?: PageLayoutMutationPosition;
|
|
459
|
+
/** Allow another section with the same key in the same tab. Optional. @default false */
|
|
460
|
+
allowDuplicate?: boolean;
|
|
461
|
+
/**
|
|
462
|
+
* Add to a built-in system tab via `systemTabEdits.newSections`.
|
|
463
|
+
*
|
|
464
|
+
* When false, the tab must already be present in `newTabs`.
|
|
465
|
+
*/
|
|
466
|
+
systemTab?: boolean;
|
|
467
|
+
}
|
|
468
|
+
|
|
469
|
+
/** Options for removing sections from a layout. */
|
|
470
|
+
export interface RemovePageLayoutSectionOptions {
|
|
471
|
+
/** Limit removal to one tab. Optional. */
|
|
472
|
+
tabKey?: string;
|
|
473
|
+
/**
|
|
474
|
+
* Remove all matching occurrences. When false, removing a section that appears
|
|
475
|
+
* more than once throws. Optional. @default true
|
|
476
|
+
*/
|
|
477
|
+
removeAll?: boolean;
|
|
478
|
+
/** Custom layout sections are selected by layout section key or `CustomObjectFieldSection`. */
|
|
479
|
+
systemSection?: false;
|
|
480
|
+
}
|
|
481
|
+
|
|
482
|
+
/** Options for removing a built-in system section from a layout. */
|
|
483
|
+
export interface RemoveSystemPageLayoutSectionOptions {
|
|
484
|
+
/** System tab key containing the target section. Required. */
|
|
485
|
+
tabKey: string;
|
|
486
|
+
/** Delete a built-in system section via `systemSectionEdits`. Required. */
|
|
487
|
+
systemSection: true;
|
|
488
|
+
}
|
|
489
|
+
|
|
490
|
+
/** Options for adding a tab to a layout. */
|
|
491
|
+
export interface AddPageLayoutTabOptions {
|
|
492
|
+
/** Insert position inside `newTabs` and `tabsOrder`. Optional. @default `'end'` */
|
|
493
|
+
position?: PageLayoutMutationPosition;
|
|
494
|
+
/** Allow another tab with the same key. Optional. @default false */
|
|
495
|
+
allowDuplicate?: boolean;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
/** Options for removing a tab from a layout. */
|
|
499
|
+
export interface RemovePageLayoutTabOptions {
|
|
500
|
+
/**
|
|
501
|
+
* Remove all matching occurrences. When false, removing a tab that appears
|
|
502
|
+
* more than once throws. Optional. @default true
|
|
503
|
+
*/
|
|
504
|
+
removeAll?: boolean;
|
|
505
|
+
/** Delete a built-in system tab via `systemTabEdits`. */
|
|
506
|
+
systemTab?: boolean;
|
|
507
|
+
}
|
|
508
|
+
|
|
509
|
+
/** Options for adding a custom header field. */
|
|
510
|
+
export interface AddHeaderFieldOptions extends Omit<NewHeaderField, 'rqlName' | 'key'> {
|
|
511
|
+
/**
|
|
512
|
+
* Stable header key. Defaults to the field api_name when adding a `Field`.
|
|
513
|
+
* Required when adding a raw `NewHeaderField`.
|
|
514
|
+
*/
|
|
515
|
+
key?: string;
|
|
516
|
+
/** Insert position inside `newFields` and `headerFieldsOrder`. Optional. @default `'end'` */
|
|
517
|
+
position?: PageLayoutMutationPosition;
|
|
518
|
+
/** Allow another custom header field with the same key. Optional. @default false */
|
|
519
|
+
allowDuplicate?: boolean;
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
/** Options for removing custom header fields. */
|
|
523
|
+
export interface RemoveHeaderFieldOptions {
|
|
524
|
+
/**
|
|
525
|
+
* Remove all matching occurrences. When false, removing a header field that
|
|
526
|
+
* appears more than once throws. Optional. @default true
|
|
527
|
+
*/
|
|
528
|
+
removeAll?: boolean;
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
// ---------------------------------------------------------------------------
|
|
532
|
+
// Public props
|
|
533
|
+
// ---------------------------------------------------------------------------
|
|
534
|
+
|
|
535
|
+
/**
|
|
536
|
+
* Initialization properties for {@link CustomObjectPageLayout}.
|
|
537
|
+
*/
|
|
538
|
+
export interface CustomObjectPageLayoutProps {
|
|
539
|
+
/**
|
|
540
|
+
* Stable identifier for this layout (e.g. `'default'`).
|
|
541
|
+
*
|
|
542
|
+
* Required. Use `'default'` for the layout that drives the **Add** form and
|
|
543
|
+
* the default record detail view. Each custom object supports one `'default'`
|
|
544
|
+
* layout.
|
|
545
|
+
*/
|
|
546
|
+
apiName: string;
|
|
547
|
+
/**
|
|
548
|
+
* Display name of this layout shown in the layout selector.
|
|
549
|
+
*
|
|
550
|
+
* Required.
|
|
551
|
+
*/
|
|
552
|
+
name: string;
|
|
553
|
+
/**
|
|
554
|
+
* Tab structure — which tabs and sections to show on the detail page.
|
|
555
|
+
*
|
|
556
|
+
* Optional. @default `{}`
|
|
557
|
+
*/
|
|
558
|
+
tabEdits?: TabEdits;
|
|
559
|
+
/**
|
|
560
|
+
* Header configuration — title and description fields.
|
|
561
|
+
*
|
|
562
|
+
* Optional. @default `{}`
|
|
563
|
+
*/
|
|
564
|
+
headerEdits?: HeaderEdits;
|
|
565
|
+
/**
|
|
566
|
+
* Visibility conditions for individual tabs and sections.
|
|
567
|
+
*
|
|
568
|
+
* Optional. @default `{}`
|
|
569
|
+
*/
|
|
570
|
+
visibilityConditions?: VisibilityConditions;
|
|
571
|
+
/**
|
|
572
|
+
* Stable identifier for this layout record. Pass a human-readable slug
|
|
573
|
+
* to keep it stable across regenerations.
|
|
574
|
+
*
|
|
575
|
+
* Optional. Auto-generated when omitted. @default generateId('layout')
|
|
576
|
+
*/
|
|
577
|
+
layoutId?: string;
|
|
578
|
+
/**
|
|
579
|
+
* Blueprint key used during install. Defaults to the parent object's api_name.
|
|
580
|
+
*
|
|
581
|
+
* Optional.
|
|
582
|
+
*/
|
|
583
|
+
blueprintKey?: string;
|
|
584
|
+
}
|
|
585
|
+
|
|
586
|
+
export interface CustomObjectPageLayoutLoadFromExistingOptions extends ExistingManifestContextOptions {
|
|
587
|
+
customObjectApiName?: string;
|
|
588
|
+
}
|
|
589
|
+
|
|
590
|
+
type ResolveFieldSectionId = (fieldRqlName: string) => string | undefined;
|
|
591
|
+
|
|
592
|
+
interface SerializedSectionField extends SectionFieldOptions {
|
|
593
|
+
fieldRqlName: string;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
interface SerializedFieldsSection extends PageLayoutSectionOptions {
|
|
597
|
+
key?: string;
|
|
598
|
+
type: 'fields_section';
|
|
599
|
+
name: string;
|
|
600
|
+
fields: SerializedSectionField[];
|
|
601
|
+
layout?: SectionFieldsLayout;
|
|
602
|
+
}
|
|
603
|
+
|
|
604
|
+
type SerializedPageLayoutSection =
|
|
605
|
+
| SerializedFieldsSection
|
|
606
|
+
| RelatedObjectSection
|
|
607
|
+
| RelatedFieldSection
|
|
608
|
+
| CustomSection
|
|
609
|
+
| ReportsSection
|
|
610
|
+
| CanvasSection;
|
|
611
|
+
|
|
612
|
+
interface SerializedTabWithSections {
|
|
613
|
+
type: 'tab_with_sections';
|
|
614
|
+
key: string;
|
|
615
|
+
name: string;
|
|
616
|
+
sections: SerializedPageLayoutSection[];
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
type SerializedPageLayoutTab = SerializedTabWithSections | CustomTab;
|
|
620
|
+
|
|
621
|
+
interface SerializedSystemSectionEdit extends Omit<SystemSectionEdit, 'newFields'> {
|
|
622
|
+
newFields?: SerializedSectionField[];
|
|
623
|
+
}
|
|
624
|
+
|
|
625
|
+
interface SerializedSystemTabEdit extends Omit<SystemTabEdit, 'newSections' | 'systemSectionEdits'> {
|
|
626
|
+
newSections?: SerializedPageLayoutSection[];
|
|
627
|
+
systemSectionEdits?: Record<string, SerializedSystemSectionEdit>;
|
|
628
|
+
}
|
|
629
|
+
|
|
630
|
+
interface SerializedTabEdits extends Omit<TabEdits, 'newTabs' | 'systemTabEdits'> {
|
|
631
|
+
newTabs?: SerializedPageLayoutTab[];
|
|
632
|
+
systemTabEdits?: Record<string, SerializedSystemTabEdit>;
|
|
633
|
+
}
|
|
634
|
+
|
|
635
|
+
function isField(value: unknown): value is Field {
|
|
636
|
+
const candidate = value as {
|
|
637
|
+
getApiName?: unknown;
|
|
638
|
+
getCustomObjectApiName?: unknown;
|
|
639
|
+
getSectionId?: unknown;
|
|
640
|
+
_assignSection?: unknown;
|
|
641
|
+
} | null;
|
|
642
|
+
return (
|
|
643
|
+
candidate != null &&
|
|
644
|
+
typeof candidate.getApiName === 'function' &&
|
|
645
|
+
typeof candidate.getCustomObjectApiName === 'function' &&
|
|
646
|
+
typeof candidate.getSectionId === 'function' &&
|
|
647
|
+
typeof candidate._assignSection === 'function'
|
|
648
|
+
);
|
|
649
|
+
}
|
|
650
|
+
|
|
651
|
+
function isFieldRef(value: SectionFieldInput): value is SectionField {
|
|
652
|
+
const candidate = value as { field?: unknown } | null;
|
|
653
|
+
return (
|
|
654
|
+
candidate != null &&
|
|
655
|
+
typeof candidate === 'object' &&
|
|
656
|
+
(isField(candidate.field) || typeof candidate.field === 'string')
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
|
|
660
|
+
const LAYOUT_SECTION_KEY = Symbol('CustomObjectPageLayout.layoutSectionKey');
|
|
661
|
+
|
|
662
|
+
function isCustomObjectFieldSection(value: unknown): value is CustomObjectFieldSection {
|
|
663
|
+
return value instanceof CustomObjectFieldSection;
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
function explicitLayoutSectionKey(section: { key?: string }): string | undefined {
|
|
667
|
+
const record = section as unknown as Record<string, unknown>;
|
|
668
|
+
const key = section.key ?? record['layout_section_key'] ?? record['layoutSectionKey'];
|
|
669
|
+
return typeof key === 'string' ? key : undefined;
|
|
670
|
+
}
|
|
671
|
+
|
|
672
|
+
function attachLayoutSectionKey(
|
|
673
|
+
section: SerializedFieldsSection,
|
|
674
|
+
sectionKey: string,
|
|
675
|
+
): SerializedFieldsSection {
|
|
676
|
+
if (explicitLayoutSectionKey(section) == null) section.key = sectionKey;
|
|
677
|
+
Object.defineProperty(section, LAYOUT_SECTION_KEY, {
|
|
678
|
+
value: sectionKey,
|
|
679
|
+
enumerable: false,
|
|
680
|
+
configurable: true,
|
|
681
|
+
});
|
|
682
|
+
return section;
|
|
683
|
+
}
|
|
684
|
+
|
|
685
|
+
function layoutSectionKey(section: { key?: string }): string | undefined {
|
|
686
|
+
return (
|
|
687
|
+
explicitLayoutSectionKey(section) ??
|
|
688
|
+
(section as unknown as Record<typeof LAYOUT_SECTION_KEY, string | undefined>)[LAYOUT_SECTION_KEY]
|
|
689
|
+
);
|
|
690
|
+
}
|
|
691
|
+
|
|
692
|
+
function layoutSectionMatches(section: { key?: string }, sectionKey: string): boolean {
|
|
693
|
+
return layoutSectionKey(section) === sectionKey;
|
|
694
|
+
}
|
|
695
|
+
|
|
696
|
+
function isSerializedFieldsSection(section: SerializedPageLayoutSection): section is SerializedFieldsSection {
|
|
697
|
+
return section.type === 'fields_section';
|
|
698
|
+
}
|
|
699
|
+
|
|
700
|
+
function assertSameObject(customObject: CustomObject, field: Field, sectionKey: string): void {
|
|
701
|
+
if (field.getCustomObjectApiName() !== customObject.getApiName()) {
|
|
702
|
+
throw new Error(
|
|
703
|
+
`CustomObjectPageLayout fields_section "${sectionKey}" references field "${field.getApiName()}" ` +
|
|
704
|
+
`from "${field.getCustomObjectApiName()}", but the layout belongs to "${customObject.getApiName()}".`,
|
|
705
|
+
);
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
function assignSectionForLayout(field: Field, section: CustomObjectFieldSection | string): void {
|
|
710
|
+
if (!field.isStandard()) field._assignSection(section);
|
|
711
|
+
}
|
|
712
|
+
|
|
713
|
+
function assertSectionBelongsTo(customObject: CustomObject, section: CustomObjectFieldSection): void {
|
|
714
|
+
if (section.getModelApiName() !== customObject.getApiName()) {
|
|
715
|
+
throw new Error(
|
|
716
|
+
`CustomObjectPageLayout section "${section.getSectionId()}" belongs to "${section.getModelApiName()}", ` +
|
|
717
|
+
`but the layout belongs to "${customObject.getApiName()}".`,
|
|
718
|
+
);
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
function requireFieldSectionOption(value: unknown, label: string): CustomObjectFieldSection {
|
|
723
|
+
if (isCustomObjectFieldSection(value)) return value;
|
|
724
|
+
if (typeof value === 'string') {
|
|
725
|
+
throw new TypeError(
|
|
726
|
+
`${label} must be a CustomObjectFieldSection object; received raw section id "${value}". ` +
|
|
727
|
+
'Load/include the existing field section first.',
|
|
728
|
+
);
|
|
729
|
+
}
|
|
730
|
+
throw new TypeError(`${label} must be a CustomObjectFieldSection object.`);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
function assertOptionAbsent(options: unknown, key: string, message: string): void {
|
|
734
|
+
if (options == null || typeof options !== 'object') return;
|
|
735
|
+
if (Object.prototype.hasOwnProperty.call(options, key)) throw new TypeError(message);
|
|
736
|
+
}
|
|
737
|
+
|
|
738
|
+
function toSerializedSectionField(
|
|
739
|
+
fieldRqlName: string,
|
|
740
|
+
options: SectionFieldOptions = {},
|
|
741
|
+
): SerializedSectionField {
|
|
742
|
+
const normalized: SerializedSectionField = { fieldRqlName };
|
|
743
|
+
if (options.hidden != null) normalized.hidden = options.hidden;
|
|
744
|
+
if (options.editable != null) normalized.editable = options.editable;
|
|
745
|
+
if (options.readOnly != null) normalized.readOnly = options.readOnly;
|
|
746
|
+
if (options.defaultValue != null) normalized.defaultValue = options.defaultValue;
|
|
747
|
+
if (options.height != null) normalized.height = options.height;
|
|
748
|
+
if (options.canBeDeleted != null) normalized.canBeDeleted = options.canBeDeleted;
|
|
749
|
+
return normalized;
|
|
750
|
+
}
|
|
751
|
+
|
|
752
|
+
function copySectionOptions<T extends PageLayoutSectionOptions>(
|
|
753
|
+
target: T,
|
|
754
|
+
input: PageLayoutSectionOptions,
|
|
755
|
+
): T {
|
|
756
|
+
if (input.canBeDeleted != null) target.canBeDeleted = input.canBeDeleted;
|
|
757
|
+
if (input.canBeRenamed != null) target.canBeRenamed = input.canBeRenamed;
|
|
758
|
+
if (input.hideName != null) target.hideName = input.hideName;
|
|
759
|
+
return target;
|
|
760
|
+
}
|
|
761
|
+
|
|
762
|
+
function normalizeSectionField(
|
|
763
|
+
customObject: CustomObject,
|
|
764
|
+
section: CustomObjectFieldSection | string,
|
|
765
|
+
sectionKey: string,
|
|
766
|
+
entry: SectionFieldInput,
|
|
767
|
+
): SerializedSectionField {
|
|
768
|
+
if (isField(entry) || typeof entry === 'string') {
|
|
769
|
+
const field = customObject._resolveField(entry);
|
|
770
|
+
assertSameObject(customObject, field, sectionKey);
|
|
771
|
+
assignSectionForLayout(field, section);
|
|
772
|
+
return toSerializedSectionField(field.getApiName());
|
|
773
|
+
}
|
|
774
|
+
|
|
775
|
+
if (isFieldRef(entry)) {
|
|
776
|
+
const field = customObject._resolveField(entry.field);
|
|
777
|
+
assertSameObject(customObject, field, sectionKey);
|
|
778
|
+
assignSectionForLayout(field, section);
|
|
779
|
+
return toSerializedSectionField(field.getApiName(), entry);
|
|
780
|
+
}
|
|
781
|
+
|
|
782
|
+
throw new Error(
|
|
783
|
+
`CustomObjectPageLayout fields_section "${sectionKey}" has an invalid field entry; ` +
|
|
784
|
+
'pass a Field instance or { field }.',
|
|
785
|
+
);
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
function normalizeFieldsSection(customObject: CustomObject, input: FieldsSection): SerializedFieldsSection {
|
|
789
|
+
assertSectionBelongsTo(customObject, input.section);
|
|
790
|
+
const sectionKey = input.key ?? input.section.getSectionId();
|
|
791
|
+
const name = input.name ?? input.section.getName();
|
|
792
|
+
const normalized = copySectionOptions<SerializedFieldsSection>(
|
|
793
|
+
{
|
|
794
|
+
name,
|
|
795
|
+
type: 'fields_section',
|
|
796
|
+
fields: input.fields.map((field) =>
|
|
797
|
+
normalizeSectionField(customObject, input.section, sectionKey, field),
|
|
798
|
+
),
|
|
799
|
+
},
|
|
800
|
+
input,
|
|
801
|
+
);
|
|
802
|
+
if (input.layout != null) normalized.layout = input.layout;
|
|
803
|
+
return attachLayoutSectionKey(normalized, sectionKey);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
function normalizeSection(
|
|
807
|
+
customObject: CustomObject,
|
|
808
|
+
section: PageLayoutSection,
|
|
809
|
+
): SerializedPageLayoutSection {
|
|
810
|
+
if (section.type === 'fields_section') return normalizeFieldsSection(customObject, section);
|
|
811
|
+
return { ...section };
|
|
812
|
+
}
|
|
813
|
+
|
|
814
|
+
function normalizeTab(customObject: CustomObject, tab: PageLayoutTab): SerializedPageLayoutTab {
|
|
815
|
+
if (tab.type === 'custom_tab') return tab;
|
|
816
|
+
return {
|
|
817
|
+
...tab,
|
|
818
|
+
sections: tab.sections.map((section) => normalizeSection(customObject, section)),
|
|
819
|
+
};
|
|
820
|
+
}
|
|
821
|
+
|
|
822
|
+
function normalizeSystemSectionEdit(
|
|
823
|
+
customObject: CustomObject,
|
|
824
|
+
tabKey: string,
|
|
825
|
+
sectionKey: string,
|
|
826
|
+
edit: SystemSectionEdit,
|
|
827
|
+
): SerializedSystemSectionEdit {
|
|
828
|
+
const { newFields: _newFields, ...rest } = edit;
|
|
829
|
+
const normalized: SerializedSystemSectionEdit = { ...rest };
|
|
830
|
+
if (edit.newFields != null) {
|
|
831
|
+
normalized.newFields = edit.newFields.map((field) =>
|
|
832
|
+
normalizeSectionField(customObject, sectionKey, `${tabKey}.${sectionKey}`, field),
|
|
833
|
+
);
|
|
834
|
+
}
|
|
835
|
+
return normalized;
|
|
836
|
+
}
|
|
837
|
+
|
|
838
|
+
function normalizeSystemTabEdit(
|
|
839
|
+
customObject: CustomObject,
|
|
840
|
+
tabKey: string,
|
|
841
|
+
edit: SystemTabEdit,
|
|
842
|
+
): SerializedSystemTabEdit {
|
|
843
|
+
const { newSections: _newSections, systemSectionEdits: _systemSectionEdits, ...rest } = edit;
|
|
844
|
+
const normalized: SerializedSystemTabEdit = { ...rest };
|
|
845
|
+
if (edit.newSections != null) {
|
|
846
|
+
normalized.newSections = edit.newSections.map((section) => normalizeSection(customObject, section));
|
|
847
|
+
}
|
|
848
|
+
if (edit.systemSectionEdits != null) {
|
|
849
|
+
const systemSectionEdits: Record<string, SerializedSystemSectionEdit> = {};
|
|
850
|
+
for (const [sectionKey, sectionEdit] of Object.entries(edit.systemSectionEdits)) {
|
|
851
|
+
systemSectionEdits[sectionKey] = normalizeSystemSectionEdit(
|
|
852
|
+
customObject,
|
|
853
|
+
tabKey,
|
|
854
|
+
sectionKey,
|
|
855
|
+
sectionEdit,
|
|
856
|
+
);
|
|
857
|
+
}
|
|
858
|
+
normalized.systemSectionEdits = systemSectionEdits;
|
|
859
|
+
}
|
|
860
|
+
return normalized;
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
function normalizeTabEdits(customObject: CustomObject, tabEdits: TabEdits): SerializedTabEdits {
|
|
864
|
+
const { newTabs: _newTabs, systemTabEdits: _systemTabEdits, ...rest } = tabEdits;
|
|
865
|
+
const normalized: SerializedTabEdits = { ...rest };
|
|
866
|
+
if (tabEdits.newTabs != null) {
|
|
867
|
+
normalized.newTabs = tabEdits.newTabs.map((tab) => normalizeTab(customObject, tab));
|
|
868
|
+
}
|
|
869
|
+
if (tabEdits.systemTabEdits != null) {
|
|
870
|
+
const systemTabEdits: Record<string, SerializedSystemTabEdit> = {};
|
|
871
|
+
for (const [tabKey, tabEdit] of Object.entries(tabEdits.systemTabEdits)) {
|
|
872
|
+
systemTabEdits[tabKey] = normalizeSystemTabEdit(customObject, tabKey, tabEdit);
|
|
873
|
+
}
|
|
874
|
+
normalized.systemTabEdits = systemTabEdits;
|
|
875
|
+
}
|
|
876
|
+
return normalized;
|
|
877
|
+
}
|
|
878
|
+
|
|
879
|
+
function cloneJson<T>(value: T): T {
|
|
880
|
+
if (value == null) return value;
|
|
881
|
+
return JSON.parse(JSON.stringify(value)) as T;
|
|
882
|
+
}
|
|
883
|
+
|
|
884
|
+
function stripMovementOptions(value: unknown): void {
|
|
885
|
+
if (Array.isArray(value)) {
|
|
886
|
+
for (const item of value) stripMovementOptions(item);
|
|
887
|
+
return;
|
|
888
|
+
}
|
|
889
|
+
if (value == null || typeof value !== 'object') return;
|
|
890
|
+
const record = value as Record<string, unknown>;
|
|
891
|
+
delete record['movementOption'];
|
|
892
|
+
for (const item of Object.values(record)) stripMovementOptions(item);
|
|
893
|
+
}
|
|
894
|
+
|
|
895
|
+
const HEADER_EDIT_KEYS = new Set([
|
|
896
|
+
'newTitleField',
|
|
897
|
+
'titleFieldDeleted',
|
|
898
|
+
'newDescriptionField',
|
|
899
|
+
'descriptionFieldDeleted',
|
|
900
|
+
'systemFieldEdits',
|
|
901
|
+
'newFields',
|
|
902
|
+
'headerFieldsOrder',
|
|
903
|
+
]);
|
|
904
|
+
|
|
905
|
+
const SYSTEM_HEADER_FIELD_EDIT_KEYS = new Set(['newRqlField', 'deleted']);
|
|
906
|
+
|
|
907
|
+
const NEW_HEADER_FIELD_KEYS = new Set(['rqlName', 'key', 'canBeDeleted', 'canBeChanged', 'canBeMoved']);
|
|
908
|
+
|
|
909
|
+
function assertKnownKeys(
|
|
910
|
+
record: Record<string, unknown>,
|
|
911
|
+
allowedKeys: ReadonlySet<string>,
|
|
912
|
+
label: string,
|
|
913
|
+
hint: string,
|
|
914
|
+
): void {
|
|
915
|
+
for (const key of Object.keys(record)) {
|
|
916
|
+
if (!allowedKeys.has(key)) {
|
|
917
|
+
throw new Error(`${label} contains unsupported key "${key}". ${hint}`);
|
|
918
|
+
}
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
|
|
922
|
+
function normalizeHeaderEdits(headerEdits: HeaderEdits): SerializedHeaderEdits {
|
|
923
|
+
assertKnownKeys(
|
|
924
|
+
headerEdits as unknown as Record<string, unknown>,
|
|
925
|
+
HEADER_EDIT_KEYS,
|
|
926
|
+
'CustomObjectPageLayout headerEdits',
|
|
927
|
+
'Use addHeaderField(), setTitleField(), setDescriptionField(), or the HeaderEdits keys documented by the SDK.',
|
|
928
|
+
);
|
|
929
|
+
|
|
930
|
+
for (const [key, edit] of Object.entries(headerEdits.systemFieldEdits ?? {})) {
|
|
931
|
+
assertKnownKeys(
|
|
932
|
+
edit as Record<string, unknown>,
|
|
933
|
+
SYSTEM_HEADER_FIELD_EDIT_KEYS,
|
|
934
|
+
`CustomObjectPageLayout headerEdits.systemFieldEdits.${key}`,
|
|
935
|
+
'Use newRqlField and deleted for system header field edits.',
|
|
936
|
+
);
|
|
937
|
+
}
|
|
938
|
+
|
|
939
|
+
for (const [index, field] of (headerEdits.newFields ?? []).entries()) {
|
|
940
|
+
assertKnownKeys(
|
|
941
|
+
field as unknown as Record<string, unknown>,
|
|
942
|
+
NEW_HEADER_FIELD_KEYS,
|
|
943
|
+
`CustomObjectPageLayout headerEdits.newFields[${index}]`,
|
|
944
|
+
'Use { rqlName, key } entries, or call addHeaderField(field).',
|
|
945
|
+
);
|
|
946
|
+
}
|
|
947
|
+
|
|
948
|
+
if (headerEdits.newTitleField === '') {
|
|
949
|
+
throw new Error(
|
|
950
|
+
'CustomObjectPageLayout headerEdits.newTitleField cannot be empty. Use titleFieldDeleted.',
|
|
951
|
+
);
|
|
952
|
+
}
|
|
953
|
+
if (headerEdits.newDescriptionField === '') {
|
|
954
|
+
throw new Error(
|
|
955
|
+
'CustomObjectPageLayout headerEdits.newDescriptionField cannot be empty. Use descriptionFieldDeleted.',
|
|
956
|
+
);
|
|
957
|
+
}
|
|
958
|
+
if (headerEdits.newTitleField != null && headerEdits.titleFieldDeleted === true) {
|
|
959
|
+
throw new Error(
|
|
960
|
+
'CustomObjectPageLayout headerEdits cannot both set newTitleField and titleFieldDeleted.',
|
|
961
|
+
);
|
|
962
|
+
}
|
|
963
|
+
if (headerEdits.newDescriptionField != null && headerEdits.descriptionFieldDeleted === true) {
|
|
964
|
+
throw new Error(
|
|
965
|
+
'CustomObjectPageLayout headerEdits cannot both set newDescriptionField and descriptionFieldDeleted.',
|
|
966
|
+
);
|
|
967
|
+
}
|
|
968
|
+
|
|
969
|
+
const normalized: SerializedHeaderEdits = { ...headerEdits };
|
|
970
|
+
|
|
971
|
+
if (headerEdits.headerFieldsOrder == null) return normalized;
|
|
972
|
+
return {
|
|
973
|
+
...normalized,
|
|
974
|
+
headerFieldsOrder: normalizeHeaderFieldsOrder(normalized),
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
|
|
978
|
+
function addUniqueHeaderOrderField(order: string[], field: unknown): void {
|
|
979
|
+
if (typeof field !== 'string' || field.length === 0) return;
|
|
980
|
+
if (!order.includes(field)) order.push(field);
|
|
981
|
+
}
|
|
982
|
+
|
|
983
|
+
function normalizeHeaderFieldsOrder(headerEdits: SerializedHeaderEdits): string[] {
|
|
984
|
+
const customFieldRqlByKey = new Map(
|
|
985
|
+
(headerEdits.newFields ?? []).map((field) => [field.key, field.rqlName]),
|
|
986
|
+
);
|
|
987
|
+
const systemFieldRqlByKey = new Map(
|
|
988
|
+
Object.entries(headerEdits.systemFieldEdits ?? {})
|
|
989
|
+
.filter((entry): entry is [string, SerializedSystemHeaderFieldEdit & { newRqlField: string }] => {
|
|
990
|
+
const [, edit] = entry;
|
|
991
|
+
return typeof edit.newRqlField === 'string' && edit.newRqlField.length > 0;
|
|
992
|
+
})
|
|
993
|
+
.map(([key, edit]) => [key, edit.newRqlField]),
|
|
994
|
+
);
|
|
995
|
+
const order: string[] = [];
|
|
996
|
+
|
|
997
|
+
for (const entry of headerEdits.headerFieldsOrder ?? []) {
|
|
998
|
+
addUniqueHeaderOrderField(
|
|
999
|
+
order,
|
|
1000
|
+
customFieldRqlByKey.get(entry) ?? systemFieldRqlByKey.get(entry) ?? entry,
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
|
|
1004
|
+
addUniqueHeaderOrderField(order, headerEdits.newTitleField);
|
|
1005
|
+
addUniqueHeaderOrderField(order, headerEdits.newDescriptionField);
|
|
1006
|
+
for (const field of headerEdits.newFields ?? []) {
|
|
1007
|
+
addUniqueHeaderOrderField(order, field.rqlName);
|
|
1008
|
+
}
|
|
1009
|
+
for (const systemEdit of Object.values(headerEdits.systemFieldEdits ?? {})) {
|
|
1010
|
+
addUniqueHeaderOrderField(order, systemEdit.newRqlField);
|
|
1011
|
+
}
|
|
1012
|
+
|
|
1013
|
+
return order;
|
|
1014
|
+
}
|
|
1015
|
+
|
|
1016
|
+
type MutableSectionField = SerializedSectionField | Record<string, any> | string;
|
|
1017
|
+
|
|
1018
|
+
interface MutableFieldContainer {
|
|
1019
|
+
tabKey: string;
|
|
1020
|
+
sectionKey: string | undefined;
|
|
1021
|
+
section?: SerializedFieldsSection;
|
|
1022
|
+
fields: MutableSectionField[];
|
|
1023
|
+
label: string;
|
|
1024
|
+
}
|
|
1025
|
+
|
|
1026
|
+
interface FieldSectionLayoutSection {
|
|
1027
|
+
tabKey: string;
|
|
1028
|
+
sectionKey: string;
|
|
1029
|
+
}
|
|
1030
|
+
|
|
1031
|
+
function isTabWithSections(tab: SerializedPageLayoutTab): tab is SerializedTabWithSections {
|
|
1032
|
+
return tab.type === 'tab_with_sections';
|
|
1033
|
+
}
|
|
1034
|
+
|
|
1035
|
+
function insertionIndex(length: number, position: PageLayoutMutationPosition | undefined): number {
|
|
1036
|
+
if (position == null || position === 'end') return length;
|
|
1037
|
+
if (position === 'start') return 0;
|
|
1038
|
+
if (!Number.isInteger(position) || position < 0 || position > length) {
|
|
1039
|
+
throw new Error(`Invalid insertion position ${position}; expected 'start', 'end', or 0-${length}.`);
|
|
1040
|
+
}
|
|
1041
|
+
return position;
|
|
1042
|
+
}
|
|
1043
|
+
|
|
1044
|
+
function insertAt<T>(items: T[], item: T, position: PageLayoutMutationPosition | undefined): void {
|
|
1045
|
+
items.splice(insertionIndex(items.length, position), 0, item);
|
|
1046
|
+
}
|
|
1047
|
+
|
|
1048
|
+
function insertUniqueAt(
|
|
1049
|
+
items: string[],
|
|
1050
|
+
item: string | null | undefined,
|
|
1051
|
+
position: PageLayoutMutationPosition | undefined,
|
|
1052
|
+
): void {
|
|
1053
|
+
if (item == null || item.length === 0 || items.includes(item)) return;
|
|
1054
|
+
insertAt(items, item, position);
|
|
1055
|
+
}
|
|
1056
|
+
|
|
1057
|
+
function fieldRqlNameOf(entry: unknown): string | undefined {
|
|
1058
|
+
if (typeof entry === 'string') return entry;
|
|
1059
|
+
if (entry == null || typeof entry !== 'object') return undefined;
|
|
1060
|
+
const record = entry as Record<string, any>;
|
|
1061
|
+
const fieldRqlName =
|
|
1062
|
+
record['fieldRqlName'] ?? record['field_rql_name'] ?? record['apiName'] ?? record['api_name'];
|
|
1063
|
+
return typeof fieldRqlName === 'string' ? fieldRqlName : undefined;
|
|
1064
|
+
}
|
|
1065
|
+
|
|
1066
|
+
function addFieldSectionLayoutSection(
|
|
1067
|
+
index: Map<string, FieldSectionLayoutSection[]>,
|
|
1068
|
+
fieldSectionId: string,
|
|
1069
|
+
entry: FieldSectionLayoutSection,
|
|
1070
|
+
): void {
|
|
1071
|
+
const entries = index.get(fieldSectionId) ?? [];
|
|
1072
|
+
if (
|
|
1073
|
+
!entries.some((existing) => existing.tabKey === entry.tabKey && existing.sectionKey === entry.sectionKey)
|
|
1074
|
+
) {
|
|
1075
|
+
entries.push(entry);
|
|
1076
|
+
}
|
|
1077
|
+
index.set(fieldSectionId, entries);
|
|
1078
|
+
}
|
|
1079
|
+
|
|
1080
|
+
function indexFieldsSectionInput(
|
|
1081
|
+
index: Map<string, FieldSectionLayoutSection[]>,
|
|
1082
|
+
tabKey: string,
|
|
1083
|
+
section: FieldsSection,
|
|
1084
|
+
): void {
|
|
1085
|
+
addFieldSectionLayoutSection(index, section.section.getSectionId(), {
|
|
1086
|
+
tabKey,
|
|
1087
|
+
sectionKey: section.key ?? section.section.getSectionId(),
|
|
1088
|
+
});
|
|
1089
|
+
}
|
|
1090
|
+
|
|
1091
|
+
function indexPageLayoutSectionInput(
|
|
1092
|
+
index: Map<string, FieldSectionLayoutSection[]>,
|
|
1093
|
+
tabKey: string,
|
|
1094
|
+
section: PageLayoutSection,
|
|
1095
|
+
): void {
|
|
1096
|
+
if (section.type === 'fields_section') indexFieldsSectionInput(index, tabKey, section);
|
|
1097
|
+
}
|
|
1098
|
+
|
|
1099
|
+
function buildFieldSectionLayoutIndexFromProps(
|
|
1100
|
+
tabEdits: TabEdits | undefined,
|
|
1101
|
+
): Map<string, FieldSectionLayoutSection[]> {
|
|
1102
|
+
const index = new Map<string, FieldSectionLayoutSection[]>();
|
|
1103
|
+
if (tabEdits == null) return index;
|
|
1104
|
+
|
|
1105
|
+
for (const tab of tabEdits.newTabs ?? []) {
|
|
1106
|
+
if (tab.type !== 'tab_with_sections') continue;
|
|
1107
|
+
for (const section of tab.sections) indexPageLayoutSectionInput(index, tab.key, section);
|
|
1108
|
+
}
|
|
1109
|
+
|
|
1110
|
+
for (const [tabKey, tabEdit] of Object.entries(tabEdits.systemTabEdits ?? {})) {
|
|
1111
|
+
for (const section of tabEdit.newSections ?? []) {
|
|
1112
|
+
indexPageLayoutSectionInput(index, tabKey, section);
|
|
1113
|
+
}
|
|
1114
|
+
}
|
|
1115
|
+
|
|
1116
|
+
return index;
|
|
1117
|
+
}
|
|
1118
|
+
|
|
1119
|
+
function indexLoadedFieldsSection(
|
|
1120
|
+
index: Map<string, FieldSectionLayoutSection[]>,
|
|
1121
|
+
tabKey: string,
|
|
1122
|
+
section: SerializedFieldsSection,
|
|
1123
|
+
resolveFieldSectionId: ResolveFieldSectionId | undefined,
|
|
1124
|
+
): void {
|
|
1125
|
+
const sectionKey = layoutSectionKey(section);
|
|
1126
|
+
if (sectionKey == null || resolveFieldSectionId == null) return;
|
|
1127
|
+
|
|
1128
|
+
for (const field of section.fields ?? []) {
|
|
1129
|
+
const fieldRqlName = fieldRqlNameOf(field);
|
|
1130
|
+
if (fieldRqlName == null) continue;
|
|
1131
|
+
const fieldSectionId = resolveFieldSectionId(fieldRqlName);
|
|
1132
|
+
if (fieldSectionId != null) {
|
|
1133
|
+
addFieldSectionLayoutSection(index, fieldSectionId, { tabKey, sectionKey });
|
|
1134
|
+
}
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1138
|
+
function buildFieldSectionLayoutIndexFromLoadedTabEdits(
|
|
1139
|
+
tabEdits: SerializedTabEdits,
|
|
1140
|
+
resolveFieldSectionId: ResolveFieldSectionId | undefined,
|
|
1141
|
+
): Map<string, FieldSectionLayoutSection[]> {
|
|
1142
|
+
const index = new Map<string, FieldSectionLayoutSection[]>();
|
|
1143
|
+
|
|
1144
|
+
for (const tab of tabEdits.newTabs ?? []) {
|
|
1145
|
+
if (!isTabWithSections(tab)) continue;
|
|
1146
|
+
for (const section of tab.sections) {
|
|
1147
|
+
if (isSerializedFieldsSection(section)) {
|
|
1148
|
+
indexLoadedFieldsSection(index, tab.key, section, resolveFieldSectionId);
|
|
1149
|
+
}
|
|
1150
|
+
}
|
|
1151
|
+
}
|
|
1152
|
+
|
|
1153
|
+
for (const [tabKey, tabEdit] of Object.entries(tabEdits.systemTabEdits ?? {})) {
|
|
1154
|
+
for (const section of tabEdit.newSections ?? []) {
|
|
1155
|
+
if (isSerializedFieldsSection(section)) {
|
|
1156
|
+
indexLoadedFieldsSection(index, tabKey, section, resolveFieldSectionId);
|
|
1157
|
+
}
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
1160
|
+
|
|
1161
|
+
return index;
|
|
1162
|
+
}
|
|
1163
|
+
|
|
1164
|
+
function annotateLoadedFieldsSection(section: SerializedFieldsSection): SerializedFieldsSection {
|
|
1165
|
+
const sectionKey = layoutSectionKey(section);
|
|
1166
|
+
return sectionKey == null ? section : attachLayoutSectionKey(section, sectionKey);
|
|
1167
|
+
}
|
|
1168
|
+
|
|
1169
|
+
function annotateLoadedTabEdits(tabEdits: SerializedTabEdits): SerializedTabEdits {
|
|
1170
|
+
for (const tab of tabEdits.newTabs ?? []) {
|
|
1171
|
+
if (!isTabWithSections(tab)) continue;
|
|
1172
|
+
tab.sections = tab.sections.map((section) =>
|
|
1173
|
+
isSerializedFieldsSection(section) ? annotateLoadedFieldsSection(section) : section,
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
for (const tabEdit of Object.values(tabEdits.systemTabEdits ?? {})) {
|
|
1178
|
+
if (tabEdit.newSections != null) {
|
|
1179
|
+
tabEdit.newSections = tabEdit.newSections.map((section) =>
|
|
1180
|
+
isSerializedFieldsSection(section) ? annotateLoadedFieldsSection(section) : section,
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1183
|
+
}
|
|
1184
|
+
return tabEdits;
|
|
1185
|
+
}
|
|
1186
|
+
|
|
1187
|
+
function removeIndexes<T>(items: T[], indexes: number[]): void {
|
|
1188
|
+
for (const index of [...indexes].sort((a, b) => b - a)) {
|
|
1189
|
+
items.splice(index, 1);
|
|
1190
|
+
}
|
|
1191
|
+
}
|
|
1192
|
+
|
|
1193
|
+
function removeFromArray<T>(
|
|
1194
|
+
items: T[],
|
|
1195
|
+
predicate: (item: T) => boolean,
|
|
1196
|
+
label: string,
|
|
1197
|
+
removeAll = true,
|
|
1198
|
+
): number {
|
|
1199
|
+
const indexes: number[] = [];
|
|
1200
|
+
items.forEach((item, index) => {
|
|
1201
|
+
if (predicate(item)) indexes.push(index);
|
|
1202
|
+
});
|
|
1203
|
+
if (indexes.length > 1 && !removeAll) {
|
|
1204
|
+
throw new Error(`${label} matched ${indexes.length} entries; pass removeAll: true to remove them all.`);
|
|
1205
|
+
}
|
|
1206
|
+
removeIndexes(items, removeAll ? indexes : indexes.slice(0, 1));
|
|
1207
|
+
return removeAll ? indexes.length : Math.min(indexes.length, 1);
|
|
1208
|
+
}
|
|
1209
|
+
|
|
1210
|
+
function removeKeyFromOrder(order: string[] | undefined, key: string): void {
|
|
1211
|
+
if (order == null) return;
|
|
1212
|
+
removeFromArray(order, (entry) => entry === key, `order key "${key}"`);
|
|
1213
|
+
}
|
|
1214
|
+
|
|
1215
|
+
function ensureRecordProperty(record: Record<string, any>, key: string, label: string): Record<string, any> {
|
|
1216
|
+
const existing = record[key];
|
|
1217
|
+
if (existing == null) {
|
|
1218
|
+
const next: Record<string, any> = {};
|
|
1219
|
+
record[key] = next;
|
|
1220
|
+
return next;
|
|
1221
|
+
}
|
|
1222
|
+
if (typeof existing !== 'object' || Array.isArray(existing)) {
|
|
1223
|
+
throw new Error(`${label} must be an object.`);
|
|
1224
|
+
}
|
|
1225
|
+
return existing as Record<string, any>;
|
|
1226
|
+
}
|
|
1227
|
+
|
|
1228
|
+
function ensureArrayProperty<T>(record: Record<string, any>, key: string, label: string): T[] {
|
|
1229
|
+
const existing = record[key];
|
|
1230
|
+
if (existing == null) {
|
|
1231
|
+
const next: T[] = [];
|
|
1232
|
+
record[key] = next;
|
|
1233
|
+
return next;
|
|
1234
|
+
}
|
|
1235
|
+
if (!Array.isArray(existing)) {
|
|
1236
|
+
throw new Error(`${label} must be an array.`);
|
|
1237
|
+
}
|
|
1238
|
+
return existing as T[];
|
|
1239
|
+
}
|
|
1240
|
+
|
|
1241
|
+
// ---------------------------------------------------------------------------
|
|
1242
|
+
// Class
|
|
1243
|
+
// ---------------------------------------------------------------------------
|
|
1244
|
+
|
|
1245
|
+
/**
|
|
1246
|
+
* Defines a page layout and registers it with the manifest.
|
|
1247
|
+
*
|
|
1248
|
+
* A page layout controls the tab structure, section groupings, header fields,
|
|
1249
|
+
* and visibility conditions on a custom object's record detail page. You would
|
|
1250
|
+
* normally define one layout per custom object using `apiName: 'default'`.
|
|
1251
|
+
*
|
|
1252
|
+
* For simple single-tab layouts, use the {@link CustomObjectPageLayout.basic}
|
|
1253
|
+
* factory instead of constructing the full props manually.
|
|
1254
|
+
*
|
|
1255
|
+
* > **Caution:** all keys inside `tabEdits` and `headerEdits` must be camelCase.
|
|
1256
|
+
* > Snake_case keys are silently dropped on the wire and produce an empty layout.
|
|
1257
|
+
*
|
|
1258
|
+
* @example
|
|
1259
|
+
* ```ts
|
|
1260
|
+
* new CustomObjectPageLayout(memberObj, {
|
|
1261
|
+
* apiName: 'default',
|
|
1262
|
+
* name: 'Member',
|
|
1263
|
+
* layoutId: 'layout_gym_member',
|
|
1264
|
+
* tabEdits: {
|
|
1265
|
+
* newTabs: [{
|
|
1266
|
+
* key: 'member', name: 'Member', type: 'tab_with_sections',
|
|
1267
|
+
* sections: [{
|
|
1268
|
+
* name: 'Profile',
|
|
1269
|
+
* type: 'fields_section',
|
|
1270
|
+
* section: profileSection,
|
|
1271
|
+
* fields: [{ field: 'name', editable: true }, memberEmail],
|
|
1272
|
+
* }],
|
|
1273
|
+
* }],
|
|
1274
|
+
* systemTabEdits: {},
|
|
1275
|
+
* tabsOrder: ['member'],
|
|
1276
|
+
* },
|
|
1277
|
+
* visibilityConditions: {},
|
|
1278
|
+
* });
|
|
1279
|
+
* ```
|
|
1280
|
+
*
|
|
1281
|
+
* @see {@link CustomObjectPageLayout.basic} — factory for simple single-tab layouts.
|
|
1282
|
+
*/
|
|
1283
|
+
export class CustomObjectPageLayout {
|
|
1284
|
+
static readonly componentType = 'CUSTOM_OBJECT_PAGE_LAYOUT' as const;
|
|
1285
|
+
|
|
1286
|
+
static toDeletionIdentifier(identifier: PageLayoutDeletionIdentifier): ManifestComponentDeletion {
|
|
1287
|
+
return {
|
|
1288
|
+
type: CustomObjectPageLayout.componentType,
|
|
1289
|
+
layout_id: identifier.layoutId,
|
|
1290
|
+
object_rql_name: identifier.objectRqlName,
|
|
1291
|
+
};
|
|
1292
|
+
}
|
|
1293
|
+
|
|
1294
|
+
private readonly _layoutId: string;
|
|
1295
|
+
private readonly _apiName: string;
|
|
1296
|
+
private readonly _customObjectApiName: string;
|
|
1297
|
+
private readonly _name: string;
|
|
1298
|
+
private readonly _tabEdits: SerializedTabEdits;
|
|
1299
|
+
private readonly _headerEdits: SerializedHeaderEdits;
|
|
1300
|
+
private readonly _visibilityConditions: VisibilityConditions;
|
|
1301
|
+
private readonly _blueprintKey: string | undefined;
|
|
1302
|
+
private readonly _fieldSectionLayoutSections: Map<string, FieldSectionLayoutSection[]>;
|
|
1303
|
+
private readonly _customObject: CustomObject;
|
|
1304
|
+
|
|
1305
|
+
/**
|
|
1306
|
+
* @param customObject - The custom object this layout belongs to.
|
|
1307
|
+
* @param props - Initialization properties.
|
|
1308
|
+
* @throws {Error} If `apiName` or `name` is empty.
|
|
1309
|
+
*/
|
|
1310
|
+
constructor(customObject: CustomObject, props: CustomObjectPageLayoutProps) {
|
|
1311
|
+
if (!props.apiName) throw new Error('CustomObjectPageLayout: apiName cannot be empty');
|
|
1312
|
+
if (!props.name) throw new Error('CustomObjectPageLayout: name cannot be empty');
|
|
1313
|
+
this._layoutId = props.layoutId ?? generateId('layout');
|
|
1314
|
+
this._apiName = props.apiName;
|
|
1315
|
+
this._customObjectApiName = customObject.getApiName();
|
|
1316
|
+
this._customObject = customObject;
|
|
1317
|
+
this._name = props.name;
|
|
1318
|
+
this._tabEdits = normalizeTabEdits(customObject, props.tabEdits ?? {});
|
|
1319
|
+
this._fieldSectionLayoutSections = buildFieldSectionLayoutIndexFromProps(props.tabEdits);
|
|
1320
|
+
this._headerEdits = normalizeHeaderEdits(props.headerEdits ?? {});
|
|
1321
|
+
this._visibilityConditions = props.visibilityConditions ?? {};
|
|
1322
|
+
this._blueprintKey = props.blueprintKey;
|
|
1323
|
+
customObject._register(this);
|
|
1324
|
+
}
|
|
1325
|
+
|
|
1326
|
+
/**
|
|
1327
|
+
* Loads this page layout from the active existing-manifest JSON context.
|
|
1328
|
+
*
|
|
1329
|
+
* `id` resolves against `layout_id` first, then `api_name`. When loading by
|
|
1330
|
+
* api_name such as `'default'`, pass `customObjectApiName` if multiple objects
|
|
1331
|
+
* have a layout with the same api_name.
|
|
1332
|
+
*/
|
|
1333
|
+
static loadFromExisting(
|
|
1334
|
+
layoutIdOrApiName: string,
|
|
1335
|
+
options: CustomObjectPageLayoutLoadFromExistingOptions = {},
|
|
1336
|
+
): CustomObjectPageLayout {
|
|
1337
|
+
return getExistingManifestContext(options).loadPageLayout(layoutIdOrApiName, options);
|
|
1338
|
+
}
|
|
1339
|
+
|
|
1340
|
+
/** @internal Hydrates a page layout from existing manifest wire JSON. */
|
|
1341
|
+
static _fromExistingComponent(
|
|
1342
|
+
customObject: CustomObject,
|
|
1343
|
+
component: Record<string, any>,
|
|
1344
|
+
resolveFieldSectionId?: ResolveFieldSectionId,
|
|
1345
|
+
): CustomObjectPageLayout {
|
|
1346
|
+
const layout = Object.create(CustomObjectPageLayout.prototype) as CustomObjectPageLayout;
|
|
1347
|
+
const tabEdits = annotateLoadedTabEdits(cloneJson(component['tab_edits'] ?? {}));
|
|
1348
|
+
Object.assign(layout as Record<string, any>, {
|
|
1349
|
+
_layoutId: requireStringComponentField(component, 'layout_id', CustomObjectPageLayout.componentType),
|
|
1350
|
+
_apiName: requireStringComponentField(component, 'api_name', CustomObjectPageLayout.componentType),
|
|
1351
|
+
_customObjectApiName: requireStringComponentField(
|
|
1352
|
+
component,
|
|
1353
|
+
'object_rql_name',
|
|
1354
|
+
CustomObjectPageLayout.componentType,
|
|
1355
|
+
),
|
|
1356
|
+
_customObject: customObject,
|
|
1357
|
+
_name: requireStringComponentField(component, 'name', CustomObjectPageLayout.componentType),
|
|
1358
|
+
_tabEdits: tabEdits,
|
|
1359
|
+
_headerEdits: cloneJson(component['header_edits'] ?? {}),
|
|
1360
|
+
_visibilityConditions: cloneJson(component['visibility_conditions'] ?? {}),
|
|
1361
|
+
_blueprintKey: component['blueprint_key'],
|
|
1362
|
+
_fieldSectionLayoutSections: buildFieldSectionLayoutIndexFromLoadedTabEdits(
|
|
1363
|
+
tabEdits,
|
|
1364
|
+
resolveFieldSectionId,
|
|
1365
|
+
),
|
|
1366
|
+
});
|
|
1367
|
+
customObject._register(layout);
|
|
1368
|
+
return layout;
|
|
1369
|
+
}
|
|
1370
|
+
|
|
1371
|
+
/**
|
|
1372
|
+
* Returns the stable identifier for this layout record (e.g. `'layout_gym_member'`).
|
|
1373
|
+
*/
|
|
1374
|
+
getLayoutId(): string {
|
|
1375
|
+
return this._layoutId;
|
|
1376
|
+
}
|
|
1377
|
+
|
|
1378
|
+
/**
|
|
1379
|
+
* Returns the api_name of this layout (e.g. `'default'`).
|
|
1380
|
+
*/
|
|
1381
|
+
getApiName(): string {
|
|
1382
|
+
return this._apiName;
|
|
1383
|
+
}
|
|
1384
|
+
|
|
1385
|
+
/**
|
|
1386
|
+
* Returns the api_name of the custom object this layout belongs to.
|
|
1387
|
+
*/
|
|
1388
|
+
getCustomObjectApiName(): string {
|
|
1389
|
+
return this._customObjectApiName;
|
|
1390
|
+
}
|
|
1391
|
+
|
|
1392
|
+
/**
|
|
1393
|
+
* Adds one field to an existing layout section.
|
|
1394
|
+
*
|
|
1395
|
+
* For loaded layouts, this mutates the preserved `tab_edits` JSON in place
|
|
1396
|
+
* and normalizes only the inserted field entry.
|
|
1397
|
+
*/
|
|
1398
|
+
addField(field: CustomObjectFieldInput, options: AddPageLayoutFieldOptions): this {
|
|
1399
|
+
return this.addFields([field], options);
|
|
1400
|
+
}
|
|
1401
|
+
|
|
1402
|
+
/**
|
|
1403
|
+
* Adds multiple fields to an existing layout section.
|
|
1404
|
+
*
|
|
1405
|
+
* Fields are inserted in the order provided. For custom layout sections,
|
|
1406
|
+
* pass `section` to choose the typed field section. Use `sectionKey` only
|
|
1407
|
+
* when a field section maps to multiple layout sections.
|
|
1408
|
+
*/
|
|
1409
|
+
addFields(fields: CustomObjectFieldInput[], options: AddPageLayoutFieldsOptions): this {
|
|
1410
|
+
if (fields.length === 0) return this;
|
|
1411
|
+
|
|
1412
|
+
let fieldSectionForMutation: CustomObjectFieldSection | undefined;
|
|
1413
|
+
const container =
|
|
1414
|
+
options.systemSection === true ?
|
|
1415
|
+
(() => {
|
|
1416
|
+
assertOptionAbsent(
|
|
1417
|
+
options,
|
|
1418
|
+
'section',
|
|
1419
|
+
'CustomObjectPageLayout addField section is only supported for custom layout sections.',
|
|
1420
|
+
);
|
|
1421
|
+
assertOptionAbsent(
|
|
1422
|
+
options,
|
|
1423
|
+
'fieldSection',
|
|
1424
|
+
'CustomObjectPageLayout addField fieldSection is no longer supported. ' +
|
|
1425
|
+
'Use sectionKey only for systemSection: true.',
|
|
1426
|
+
);
|
|
1427
|
+
return this.ensureSystemSectionFieldContainer(options.tabKey, options.sectionKey);
|
|
1428
|
+
})()
|
|
1429
|
+
: (() => {
|
|
1430
|
+
assertOptionAbsent(
|
|
1431
|
+
options,
|
|
1432
|
+
'fieldSection',
|
|
1433
|
+
'CustomObjectPageLayout addField fieldSection is no longer supported. ' +
|
|
1434
|
+
'Pass section: CustomObjectFieldSection instead.',
|
|
1435
|
+
);
|
|
1436
|
+
const section =
|
|
1437
|
+
options.section == null ?
|
|
1438
|
+
undefined
|
|
1439
|
+
: requireFieldSectionOption(options.section, 'CustomObjectPageLayout addField section');
|
|
1440
|
+
if (section != null) {
|
|
1441
|
+
this.assertFieldSectionBelongsToLayout(section);
|
|
1442
|
+
fieldSectionForMutation = section;
|
|
1443
|
+
}
|
|
1444
|
+
const sectionKey =
|
|
1445
|
+
options.sectionKey ??
|
|
1446
|
+
(section == null ? undefined : this.layoutSectionKeyForFieldSection(options.tabKey, section)) ??
|
|
1447
|
+
section?.getSectionId();
|
|
1448
|
+
return this.requireOneFieldContainer(options.tabKey, sectionKey, section);
|
|
1449
|
+
})();
|
|
1450
|
+
const entries = fields.map((field) =>
|
|
1451
|
+
this.serializeFieldForMutation(
|
|
1452
|
+
field,
|
|
1453
|
+
container.sectionKey ?? container.label,
|
|
1454
|
+
options,
|
|
1455
|
+
fieldSectionForMutation,
|
|
1456
|
+
),
|
|
1457
|
+
);
|
|
1458
|
+
|
|
1459
|
+
if (options.allowDuplicate !== true) {
|
|
1460
|
+
const existing = new Set(container.fields.map((entry) => fieldRqlNameOf(entry)).filter(Boolean));
|
|
1461
|
+
const seen = new Set<string>();
|
|
1462
|
+
for (const entry of entries) {
|
|
1463
|
+
const fieldRqlName = entry.fieldRqlName;
|
|
1464
|
+
if (existing.has(fieldRqlName) || seen.has(fieldRqlName)) {
|
|
1465
|
+
throw new Error(
|
|
1466
|
+
`CustomObjectPageLayout section "${container.label}" already contains field "${fieldRqlName}".`,
|
|
1467
|
+
);
|
|
1468
|
+
}
|
|
1469
|
+
seen.add(fieldRqlName);
|
|
1470
|
+
}
|
|
1471
|
+
}
|
|
1472
|
+
|
|
1473
|
+
const index = insertionIndex(container.fields.length, options.position);
|
|
1474
|
+
container.fields.splice(index, 0, ...entries);
|
|
1475
|
+
return this;
|
|
1476
|
+
}
|
|
1477
|
+
|
|
1478
|
+
/**
|
|
1479
|
+
* Removes a field from the layout's field sections.
|
|
1480
|
+
*
|
|
1481
|
+
* This only removes the field from the page layout. It does not delete the
|
|
1482
|
+
* `CUSTOM_OBJECT_FIELD` component from the manifest.
|
|
1483
|
+
*/
|
|
1484
|
+
removeField(field: Field | string, options: RemovePageLayoutFieldOptions = {}): this {
|
|
1485
|
+
const fieldApiName = this.fieldApiName(field);
|
|
1486
|
+
if (isField(field)) this.assertFieldBelongsToLayout(field);
|
|
1487
|
+
|
|
1488
|
+
let sectionKey: string | undefined;
|
|
1489
|
+
if (options.systemSection === true) {
|
|
1490
|
+
assertOptionAbsent(
|
|
1491
|
+
options,
|
|
1492
|
+
'section',
|
|
1493
|
+
'CustomObjectPageLayout removeField section is only supported for custom layout sections.',
|
|
1494
|
+
);
|
|
1495
|
+
sectionKey = options.sectionKey;
|
|
1496
|
+
} else {
|
|
1497
|
+
sectionKey = options.sectionKey;
|
|
1498
|
+
if (options.section != null) {
|
|
1499
|
+
const section = requireFieldSectionOption(
|
|
1500
|
+
options.section,
|
|
1501
|
+
'CustomObjectPageLayout removeField section',
|
|
1502
|
+
);
|
|
1503
|
+
this.assertFieldSectionBelongsToLayout(section);
|
|
1504
|
+
sectionKey ??= this.layoutSectionKeyForFieldSection(options.tabKey, section);
|
|
1505
|
+
sectionKey ??= section.getSectionId();
|
|
1506
|
+
}
|
|
1507
|
+
}
|
|
1508
|
+
|
|
1509
|
+
const containers = this.findFieldContainers({
|
|
1510
|
+
tabKey: options.tabKey,
|
|
1511
|
+
sectionKey,
|
|
1512
|
+
systemSectionOnly: options.systemSection === true,
|
|
1513
|
+
});
|
|
1514
|
+
const matches: Array<{ container: MutableFieldContainer; index: number }> = [];
|
|
1515
|
+
for (const container of containers) {
|
|
1516
|
+
container.fields.forEach((entry, index) => {
|
|
1517
|
+
if (fieldRqlNameOf(entry) === fieldApiName) {
|
|
1518
|
+
matches.push({ container, index });
|
|
1519
|
+
}
|
|
1520
|
+
});
|
|
1521
|
+
}
|
|
1522
|
+
|
|
1523
|
+
if (matches.length === 0) {
|
|
1524
|
+
throw new Error(`CustomObjectPageLayout does not contain field "${fieldApiName}".`);
|
|
1525
|
+
}
|
|
1526
|
+
const removeAll = options.removeAll !== false;
|
|
1527
|
+
if (matches.length > 1 && !removeAll) {
|
|
1528
|
+
throw new Error(
|
|
1529
|
+
`CustomObjectPageLayout field "${fieldApiName}" matched ${matches.length} entries; ` +
|
|
1530
|
+
'pass removeAll: true to remove them all.',
|
|
1531
|
+
);
|
|
1532
|
+
}
|
|
1533
|
+
|
|
1534
|
+
const removals = removeAll ? matches : matches.slice(0, 1);
|
|
1535
|
+
const byContainer = new Map<MutableFieldContainer, number[]>();
|
|
1536
|
+
for (const match of removals) {
|
|
1537
|
+
const indexes = byContainer.get(match.container) ?? [];
|
|
1538
|
+
indexes.push(match.index);
|
|
1539
|
+
byContainer.set(match.container, indexes);
|
|
1540
|
+
}
|
|
1541
|
+
for (const [container, indexes] of byContainer.entries()) {
|
|
1542
|
+
removeIndexes(container.fields, indexes);
|
|
1543
|
+
}
|
|
1544
|
+
return this;
|
|
1545
|
+
}
|
|
1546
|
+
|
|
1547
|
+
/** Removes multiple fields from the layout's field sections. */
|
|
1548
|
+
removeFields(fields: Array<Field | string>, options: RemovePageLayoutFieldOptions = {}): this {
|
|
1549
|
+
for (const field of fields) {
|
|
1550
|
+
this.removeField(field, options);
|
|
1551
|
+
}
|
|
1552
|
+
return this;
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1555
|
+
/**
|
|
1556
|
+
* Adds a section to an existing tab.
|
|
1557
|
+
*
|
|
1558
|
+
* Pass `systemTab: true` to add a new section to a built-in tab via
|
|
1559
|
+
* `systemTabEdits.newSections`.
|
|
1560
|
+
*/
|
|
1561
|
+
addSection(section: PageLayoutSection, options: AddPageLayoutSectionOptions): this {
|
|
1562
|
+
const normalized = this.normalizeSectionForMutation(section);
|
|
1563
|
+
if (options.systemTab === true) {
|
|
1564
|
+
const tabEdit = this.ensureSystemTabEdit(options.tabKey);
|
|
1565
|
+
const sections = ensureArrayProperty<SerializedPageLayoutSection>(
|
|
1566
|
+
tabEdit as Record<string, any>,
|
|
1567
|
+
'newSections',
|
|
1568
|
+
`systemTabEdits.${options.tabKey}.newSections`,
|
|
1569
|
+
);
|
|
1570
|
+
this.assertSectionKeyAvailable(
|
|
1571
|
+
sections,
|
|
1572
|
+
layoutSectionKey(normalized),
|
|
1573
|
+
options.tabKey,
|
|
1574
|
+
options.allowDuplicate,
|
|
1575
|
+
);
|
|
1576
|
+
const sectionsOrder = this.ensureSystemSectionsOrder(tabEdit);
|
|
1577
|
+
insertAt(sections, normalized, options.position);
|
|
1578
|
+
insertUniqueAt(sectionsOrder, layoutSectionKey(normalized), options.position);
|
|
1579
|
+
if (section.type === 'fields_section') {
|
|
1580
|
+
this.rememberFieldSectionLayoutSection(section.section, options.tabKey, layoutSectionKey(normalized));
|
|
1581
|
+
}
|
|
1582
|
+
return this;
|
|
1583
|
+
}
|
|
1584
|
+
|
|
1585
|
+
const tab = this.findNewTabWithSections(options.tabKey);
|
|
1586
|
+
if (tab == null) {
|
|
1587
|
+
throw new Error(
|
|
1588
|
+
`CustomObjectPageLayout could not find new tab "${options.tabKey}". ` +
|
|
1589
|
+
'Pass systemTab: true to add a section to a built-in system tab.',
|
|
1590
|
+
);
|
|
1591
|
+
}
|
|
1592
|
+
this.assertSectionKeyAvailable(
|
|
1593
|
+
tab.sections,
|
|
1594
|
+
layoutSectionKey(normalized),
|
|
1595
|
+
options.tabKey,
|
|
1596
|
+
options.allowDuplicate,
|
|
1597
|
+
);
|
|
1598
|
+
insertAt(tab.sections, normalized, options.position);
|
|
1599
|
+
if (section.type === 'fields_section') {
|
|
1600
|
+
this.rememberFieldSectionLayoutSection(section.section, tab.key, layoutSectionKey(normalized));
|
|
1601
|
+
}
|
|
1602
|
+
return this;
|
|
1603
|
+
}
|
|
1604
|
+
|
|
1605
|
+
/**
|
|
1606
|
+
* Removes a section from `newTabs` / `systemTabEdits.newSections`.
|
|
1607
|
+
*
|
|
1608
|
+
* Pass `systemSection: true` with `tabKey` to delete a built-in section via
|
|
1609
|
+
* `systemSectionEdits[sectionKey].deleted`.
|
|
1610
|
+
*/
|
|
1611
|
+
removeSection(section: CustomObjectFieldSection, options?: RemovePageLayoutSectionOptions): this;
|
|
1612
|
+
removeSection(sectionKey: string, options?: RemovePageLayoutSectionOptions): this;
|
|
1613
|
+
removeSection(sectionKey: string, options: RemoveSystemPageLayoutSectionOptions): this;
|
|
1614
|
+
removeSection(
|
|
1615
|
+
sectionOrKey: CustomObjectFieldSection | string,
|
|
1616
|
+
options: RemovePageLayoutSectionOptions | RemoveSystemPageLayoutSectionOptions = {},
|
|
1617
|
+
): this {
|
|
1618
|
+
if (options.systemSection === true) {
|
|
1619
|
+
if (typeof sectionOrKey !== 'string') {
|
|
1620
|
+
throw new TypeError(
|
|
1621
|
+
'CustomObjectPageLayout removeSection with systemSection: true requires a system section key.',
|
|
1622
|
+
);
|
|
1623
|
+
}
|
|
1624
|
+
if (options.tabKey == null) {
|
|
1625
|
+
throw new Error('CustomObjectPageLayout removeSection with systemSection: true requires tabKey.');
|
|
1626
|
+
}
|
|
1627
|
+
const sectionEdit = this.ensureSystemSectionEdit(options.tabKey, sectionOrKey);
|
|
1628
|
+
sectionEdit.deleted = true;
|
|
1629
|
+
removeKeyFromOrder(this._tabEdits.systemTabEdits?.[options.tabKey]?.sectionsOrder, sectionOrKey);
|
|
1630
|
+
this.removeSectionVisibility(sectionOrKey);
|
|
1631
|
+
return this;
|
|
1632
|
+
}
|
|
1633
|
+
|
|
1634
|
+
let sectionKey: string;
|
|
1635
|
+
if (typeof sectionOrKey === 'string') {
|
|
1636
|
+
sectionKey = sectionOrKey;
|
|
1637
|
+
} else {
|
|
1638
|
+
const section = requireFieldSectionOption(sectionOrKey, 'CustomObjectPageLayout removeSection section');
|
|
1639
|
+
this.assertFieldSectionBelongsToLayout(section);
|
|
1640
|
+
sectionKey = this.layoutSectionKeyForFieldSection(options.tabKey, section) ?? section.getSectionId();
|
|
1641
|
+
}
|
|
1642
|
+
const matches: Array<{
|
|
1643
|
+
sections: SerializedPageLayoutSection[];
|
|
1644
|
+
section: SerializedFieldsSection;
|
|
1645
|
+
index: number;
|
|
1646
|
+
tabEdit?: SerializedSystemTabEdit;
|
|
1647
|
+
tabKey: string;
|
|
1648
|
+
}> = [];
|
|
1649
|
+
for (const tab of this._tabEdits.newTabs ?? []) {
|
|
1650
|
+
if (!isTabWithSections(tab)) continue;
|
|
1651
|
+
if (options.tabKey != null && tab.key !== options.tabKey) continue;
|
|
1652
|
+
tab.sections.forEach((section, index) => {
|
|
1653
|
+
if (isSerializedFieldsSection(section) && layoutSectionMatches(section, sectionKey))
|
|
1654
|
+
matches.push({ sections: tab.sections, section, index, tabKey: tab.key });
|
|
1655
|
+
});
|
|
1656
|
+
}
|
|
1657
|
+
for (const [tabKey, tabEdit] of Object.entries(this._tabEdits.systemTabEdits ?? {})) {
|
|
1658
|
+
if (options.tabKey != null && tabKey !== options.tabKey) continue;
|
|
1659
|
+
(tabEdit.newSections ?? []).forEach((section, index) => {
|
|
1660
|
+
if (isSerializedFieldsSection(section) && layoutSectionMatches(section, sectionKey))
|
|
1661
|
+
matches.push({ sections: tabEdit.newSections!, section, index, tabEdit, tabKey });
|
|
1662
|
+
});
|
|
1663
|
+
}
|
|
1664
|
+
|
|
1665
|
+
if (matches.length === 0) {
|
|
1666
|
+
throw new Error(`CustomObjectPageLayout does not contain section "${sectionKey}".`);
|
|
1667
|
+
}
|
|
1668
|
+
const removeAll = options.removeAll !== false;
|
|
1669
|
+
if (matches.length > 1 && !removeAll) {
|
|
1670
|
+
throw new Error(
|
|
1671
|
+
`CustomObjectPageLayout section "${sectionKey}" matched ${matches.length} entries; ` +
|
|
1672
|
+
'pass removeAll: true to remove them all.',
|
|
1673
|
+
);
|
|
1674
|
+
}
|
|
1675
|
+
|
|
1676
|
+
const removals = removeAll ? matches : matches.slice(0, 1);
|
|
1677
|
+
const byArray = new Map<SerializedPageLayoutSection[], number[]>();
|
|
1678
|
+
for (const match of removals) {
|
|
1679
|
+
const indexes = byArray.get(match.sections) ?? [];
|
|
1680
|
+
indexes.push(match.index);
|
|
1681
|
+
byArray.set(match.sections, indexes);
|
|
1682
|
+
if (match.tabEdit != null) removeKeyFromOrder(match.tabEdit.sectionsOrder, sectionKey);
|
|
1683
|
+
this.removeSectionVisibility(sectionKey);
|
|
1684
|
+
}
|
|
1685
|
+
for (const [sections, indexes] of byArray.entries()) {
|
|
1686
|
+
removeIndexes(sections, indexes);
|
|
1687
|
+
}
|
|
1688
|
+
return this;
|
|
1689
|
+
}
|
|
1690
|
+
|
|
1691
|
+
/** Adds a new tab to `tab_edits.newTabs`. */
|
|
1692
|
+
addTab(tab: PageLayoutTab, options: AddPageLayoutTabOptions = {}): this {
|
|
1693
|
+
const normalized = this.normalizeTabForMutation(tab);
|
|
1694
|
+
const newTabs = (this._tabEdits.newTabs ??= []);
|
|
1695
|
+
if (options.allowDuplicate !== true && newTabs.some((existing) => existing.key === normalized.key)) {
|
|
1696
|
+
throw new Error(`CustomObjectPageLayout already contains tab "${normalized.key}".`);
|
|
1697
|
+
}
|
|
1698
|
+
const tabsOrder = this.ensureTabsOrder();
|
|
1699
|
+
insertAt(newTabs, normalized, options.position);
|
|
1700
|
+
insertUniqueAt(tabsOrder, normalized.key, options.position);
|
|
1701
|
+
if (tab.type === 'tab_with_sections') {
|
|
1702
|
+
for (const section of tab.sections)
|
|
1703
|
+
indexPageLayoutSectionInput(this._fieldSectionLayoutSections, tab.key, section);
|
|
1704
|
+
}
|
|
1705
|
+
return this;
|
|
1706
|
+
}
|
|
1707
|
+
|
|
1708
|
+
/**
|
|
1709
|
+
* Removes a tab from `newTabs`.
|
|
1710
|
+
*
|
|
1711
|
+
* Pass `systemTab: true` to delete a built-in tab via `systemTabEdits[tabKey].deleted`.
|
|
1712
|
+
*/
|
|
1713
|
+
removeTab(tabKey: string, options: RemovePageLayoutTabOptions = {}): this {
|
|
1714
|
+
if (options.systemTab === true) {
|
|
1715
|
+
const tabEdit = this.ensureSystemTabEdit(tabKey);
|
|
1716
|
+
tabEdit.deleted = true;
|
|
1717
|
+
removeKeyFromOrder(this._tabEdits.tabsOrder, tabKey);
|
|
1718
|
+
this.removeTabVisibility(tabKey);
|
|
1719
|
+
return this;
|
|
1720
|
+
}
|
|
1721
|
+
|
|
1722
|
+
const newTabs = this._tabEdits.newTabs ?? [];
|
|
1723
|
+
const removed = removeFromArray(
|
|
1724
|
+
newTabs,
|
|
1725
|
+
(tab) => tab.key === tabKey,
|
|
1726
|
+
`CustomObjectPageLayout tab "${tabKey}"`,
|
|
1727
|
+
options.removeAll !== false,
|
|
1728
|
+
);
|
|
1729
|
+
if (removed === 0) {
|
|
1730
|
+
throw new Error(`CustomObjectPageLayout does not contain tab "${tabKey}".`);
|
|
1731
|
+
}
|
|
1732
|
+
removeKeyFromOrder(this._tabEdits.tabsOrder, tabKey);
|
|
1733
|
+
this.removeTabVisibility(tabKey);
|
|
1734
|
+
return this;
|
|
1735
|
+
}
|
|
1736
|
+
|
|
1737
|
+
/** Adds a custom header field to `header_edits.newFields`. */
|
|
1738
|
+
addHeaderField(field: Field | NewHeaderField, options: AddHeaderFieldOptions = {}): this {
|
|
1739
|
+
const headerField = this.normalizeHeaderFieldForMutation(field, options);
|
|
1740
|
+
const newFields = (this._headerEdits.newFields ??= []);
|
|
1741
|
+
if (options.allowDuplicate !== true && newFields.some((existing) => existing.key === headerField.key)) {
|
|
1742
|
+
throw new Error(`CustomObjectPageLayout header already contains field key "${headerField.key}".`);
|
|
1743
|
+
}
|
|
1744
|
+
const headerFieldsOrder = this.ensureHeaderFieldsOrder();
|
|
1745
|
+
insertAt(newFields, headerField, options.position);
|
|
1746
|
+
insertUniqueAt(headerFieldsOrder, headerField.rqlName, options.position);
|
|
1747
|
+
return this;
|
|
1748
|
+
}
|
|
1749
|
+
|
|
1750
|
+
/** Removes custom header fields from `header_edits.newFields`. */
|
|
1751
|
+
removeHeaderField(fieldOrKey: Field | string, options: RemoveHeaderFieldOptions = {}): this {
|
|
1752
|
+
const fieldApiName = typeof fieldOrKey === 'string' ? undefined : fieldOrKey.getApiName();
|
|
1753
|
+
if (isField(fieldOrKey)) this.assertFieldBelongsToLayout(fieldOrKey);
|
|
1754
|
+
const key = typeof fieldOrKey === 'string' ? fieldOrKey : fieldApiName;
|
|
1755
|
+
const newFields = this._headerEdits.newFields ?? [];
|
|
1756
|
+
const removedFields: NewHeaderField[] = [];
|
|
1757
|
+
const removed = removeFromArray(
|
|
1758
|
+
newFields,
|
|
1759
|
+
(field) => {
|
|
1760
|
+
const matched = field.key === key || (fieldApiName != null && field.rqlName === fieldApiName);
|
|
1761
|
+
if (matched) removedFields.push(field);
|
|
1762
|
+
return matched;
|
|
1763
|
+
},
|
|
1764
|
+
`CustomObjectPageLayout header field "${key}"`,
|
|
1765
|
+
options.removeAll !== false,
|
|
1766
|
+
);
|
|
1767
|
+
if (removed === 0) {
|
|
1768
|
+
throw new Error(`CustomObjectPageLayout header does not contain field "${key}".`);
|
|
1769
|
+
}
|
|
1770
|
+
for (const removedField of removedFields) this.removeHeaderOrderFieldIfUnused(removedField);
|
|
1771
|
+
return this;
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
/** Sets the record title field in `header_edits`. */
|
|
1775
|
+
setTitleField(field: Field): this;
|
|
1776
|
+
setTitleField(fieldApiName: FieldRqlName): this;
|
|
1777
|
+
setTitleField(field: Field | FieldRqlName): this {
|
|
1778
|
+
const previousTitleField = this._headerEdits.newTitleField;
|
|
1779
|
+
const nextTitleField = this.headerFieldApiName(field);
|
|
1780
|
+
this._headerEdits.newTitleField = nextTitleField;
|
|
1781
|
+
this._headerEdits.titleFieldDeleted = false;
|
|
1782
|
+
insertUniqueAt(this.ensureHeaderFieldsOrder(), nextTitleField, 'end');
|
|
1783
|
+
this.removeHeaderOrderFieldIfUnused(previousTitleField);
|
|
1784
|
+
return this;
|
|
1785
|
+
}
|
|
1786
|
+
|
|
1787
|
+
/** Removes the record title field from the header. */
|
|
1788
|
+
removeTitleField(): this {
|
|
1789
|
+
const previousTitleField = this._headerEdits.newTitleField;
|
|
1790
|
+
this._headerEdits.newTitleField = null;
|
|
1791
|
+
this._headerEdits.titleFieldDeleted = true;
|
|
1792
|
+
this.removeHeaderOrderFieldIfUnused(previousTitleField);
|
|
1793
|
+
return this;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
/** Sets the record description field in `header_edits`. */
|
|
1797
|
+
setDescriptionField(field: Field): this;
|
|
1798
|
+
setDescriptionField(fieldApiName: FieldRqlName): this;
|
|
1799
|
+
setDescriptionField(field: Field | FieldRqlName): this {
|
|
1800
|
+
const previousDescriptionField = this._headerEdits.newDescriptionField;
|
|
1801
|
+
const nextDescriptionField = this.headerFieldApiName(field);
|
|
1802
|
+
this._headerEdits.newDescriptionField = nextDescriptionField;
|
|
1803
|
+
this._headerEdits.descriptionFieldDeleted = false;
|
|
1804
|
+
insertUniqueAt(this.ensureHeaderFieldsOrder(), nextDescriptionField, 'end');
|
|
1805
|
+
this.removeHeaderOrderFieldIfUnused(previousDescriptionField);
|
|
1806
|
+
return this;
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
/** Removes the record description field from the header. */
|
|
1810
|
+
removeDescriptionField(): this {
|
|
1811
|
+
const previousDescriptionField = this._headerEdits.newDescriptionField;
|
|
1812
|
+
this._headerEdits.newDescriptionField = null;
|
|
1813
|
+
this._headerEdits.descriptionFieldDeleted = true;
|
|
1814
|
+
this.removeHeaderOrderFieldIfUnused(previousDescriptionField);
|
|
1815
|
+
return this;
|
|
1816
|
+
}
|
|
1817
|
+
|
|
1818
|
+
private ensureTabsOrder(): string[] {
|
|
1819
|
+
const order = (this._tabEdits.tabsOrder ??= []);
|
|
1820
|
+
for (const tab of this._tabEdits.newTabs ?? []) insertUniqueAt(order, tab.key, 'end');
|
|
1821
|
+
for (const [tabKey, tabEdit] of Object.entries(this._tabEdits.systemTabEdits ?? {})) {
|
|
1822
|
+
if (tabEdit.deleted !== true) insertUniqueAt(order, tabKey, 'end');
|
|
1823
|
+
}
|
|
1824
|
+
return order;
|
|
1825
|
+
}
|
|
1826
|
+
|
|
1827
|
+
private ensureSystemSectionsOrder(tabEdit: SerializedSystemTabEdit): string[] {
|
|
1828
|
+
const order = (tabEdit.sectionsOrder ??= []);
|
|
1829
|
+
for (const section of tabEdit.newSections ?? []) insertUniqueAt(order, layoutSectionKey(section), 'end');
|
|
1830
|
+
for (const [sectionKey, sectionEdit] of Object.entries(tabEdit.systemSectionEdits ?? {})) {
|
|
1831
|
+
if (sectionEdit.deleted !== true) insertUniqueAt(order, sectionKey, 'end');
|
|
1832
|
+
}
|
|
1833
|
+
return order;
|
|
1834
|
+
}
|
|
1835
|
+
|
|
1836
|
+
private ensureHeaderFieldsOrder(): string[] {
|
|
1837
|
+
this._headerEdits.headerFieldsOrder = normalizeHeaderFieldsOrder({
|
|
1838
|
+
...this._headerEdits,
|
|
1839
|
+
headerFieldsOrder: this._headerEdits.headerFieldsOrder ?? [],
|
|
1840
|
+
});
|
|
1841
|
+
return this._headerEdits.headerFieldsOrder;
|
|
1842
|
+
}
|
|
1843
|
+
|
|
1844
|
+
private headerOrderFieldIsUsed(rqlName: string): boolean {
|
|
1845
|
+
return (
|
|
1846
|
+
this._headerEdits.newTitleField === rqlName ||
|
|
1847
|
+
this._headerEdits.newDescriptionField === rqlName ||
|
|
1848
|
+
(this._headerEdits.newFields ?? []).some((field) => field.rqlName === rqlName) ||
|
|
1849
|
+
Object.values(this._headerEdits.systemFieldEdits ?? {}).some((edit) => edit.newRqlField === rqlName)
|
|
1850
|
+
);
|
|
1851
|
+
}
|
|
1852
|
+
|
|
1853
|
+
private removeHeaderOrderFieldIfUnused(field: NewHeaderField | string | null | undefined): void {
|
|
1854
|
+
const rqlName = typeof field === 'string' ? field : field?.rqlName;
|
|
1855
|
+
if (field != null && typeof field !== 'string' && field.key !== rqlName) {
|
|
1856
|
+
removeKeyFromOrder(this._headerEdits.headerFieldsOrder, field.key);
|
|
1857
|
+
}
|
|
1858
|
+
if (rqlName == null || this.headerOrderFieldIsUsed(rqlName)) return;
|
|
1859
|
+
removeKeyFromOrder(this._headerEdits.headerFieldsOrder, rqlName);
|
|
1860
|
+
}
|
|
1861
|
+
|
|
1862
|
+
private serializeFieldForMutation(
|
|
1863
|
+
field: CustomObjectFieldInput,
|
|
1864
|
+
fallbackSectionKey: string,
|
|
1865
|
+
options: AddPageLayoutFieldOptions,
|
|
1866
|
+
fieldSection: CustomObjectFieldSection | undefined,
|
|
1867
|
+
): SerializedSectionField {
|
|
1868
|
+
const resolved = this._resolveField(field);
|
|
1869
|
+
this.assertFieldBelongsToLayout(resolved);
|
|
1870
|
+
this.assignFieldSectionForMutation(resolved, fallbackSectionKey, fieldSection);
|
|
1871
|
+
return toSerializedSectionField(resolved.getApiName(), options);
|
|
1872
|
+
}
|
|
1873
|
+
|
|
1874
|
+
private normalizeSectionFieldForMutation(
|
|
1875
|
+
section: CustomObjectFieldSection | string,
|
|
1876
|
+
sectionKey: string,
|
|
1877
|
+
entry: SectionFieldInput,
|
|
1878
|
+
): SerializedSectionField {
|
|
1879
|
+
if (isField(entry) || typeof entry === 'string') {
|
|
1880
|
+
const field = this._resolveField(entry);
|
|
1881
|
+
this.assertFieldBelongsToLayout(field);
|
|
1882
|
+
assignSectionForLayout(field, section);
|
|
1883
|
+
return toSerializedSectionField(field.getApiName());
|
|
1884
|
+
}
|
|
1885
|
+
|
|
1886
|
+
if (isFieldRef(entry)) {
|
|
1887
|
+
const field = this._resolveField(entry.field);
|
|
1888
|
+
this.assertFieldBelongsToLayout(field);
|
|
1889
|
+
assignSectionForLayout(field, section);
|
|
1890
|
+
return toSerializedSectionField(field.getApiName(), entry);
|
|
1891
|
+
}
|
|
1892
|
+
|
|
1893
|
+
throw new Error(
|
|
1894
|
+
`CustomObjectPageLayout fields_section "${sectionKey}" has an invalid field entry; ` +
|
|
1895
|
+
'pass a Field instance or { field }.',
|
|
1896
|
+
);
|
|
1897
|
+
}
|
|
1898
|
+
|
|
1899
|
+
private normalizeSectionForMutation(input: PageLayoutSection): SerializedPageLayoutSection {
|
|
1900
|
+
if (input.type !== 'fields_section') return { ...input };
|
|
1901
|
+
|
|
1902
|
+
this.assertFieldSectionBelongsToLayout(input.section);
|
|
1903
|
+
|
|
1904
|
+
const sectionKey = input.key ?? input.section.getSectionId();
|
|
1905
|
+
const name = input.name ?? input.section.getName();
|
|
1906
|
+
const normalized = copySectionOptions<SerializedFieldsSection>(
|
|
1907
|
+
{
|
|
1908
|
+
name,
|
|
1909
|
+
type: 'fields_section',
|
|
1910
|
+
fields: input.fields.map((field) =>
|
|
1911
|
+
this.normalizeSectionFieldForMutation(input.section, sectionKey, field),
|
|
1912
|
+
),
|
|
1913
|
+
},
|
|
1914
|
+
input,
|
|
1915
|
+
);
|
|
1916
|
+
if (input.layout != null) normalized.layout = input.layout;
|
|
1917
|
+
return attachLayoutSectionKey(normalized, sectionKey);
|
|
1918
|
+
}
|
|
1919
|
+
|
|
1920
|
+
private normalizeTabForMutation(tab: PageLayoutTab): SerializedPageLayoutTab {
|
|
1921
|
+
if (tab.type === 'custom_tab') return { ...tab };
|
|
1922
|
+
return {
|
|
1923
|
+
...tab,
|
|
1924
|
+
sections: tab.sections.map((section) => this.normalizeSectionForMutation(section)),
|
|
1925
|
+
};
|
|
1926
|
+
}
|
|
1927
|
+
|
|
1928
|
+
private assignFieldSectionForMutation(
|
|
1929
|
+
field: Field,
|
|
1930
|
+
fallbackSectionKey: string,
|
|
1931
|
+
fieldSection: CustomObjectFieldSection | undefined,
|
|
1932
|
+
): void {
|
|
1933
|
+
if (field.isStandard()) return;
|
|
1934
|
+
const rawFieldSection = fieldSection as CustomObjectFieldSection | string | undefined;
|
|
1935
|
+
if (rawFieldSection != null) {
|
|
1936
|
+
if (typeof rawFieldSection === 'string') {
|
|
1937
|
+
throw new TypeError(
|
|
1938
|
+
`CustomObjectPageLayout section must be a CustomObjectFieldSection object; ` +
|
|
1939
|
+
`received raw section id "${rawFieldSection}". Load/include the existing field section first.`,
|
|
1940
|
+
);
|
|
1941
|
+
}
|
|
1942
|
+
if (rawFieldSection.getModelApiName() !== this._customObjectApiName) {
|
|
1943
|
+
throw new Error(
|
|
1944
|
+
`CustomObjectPageLayout field section "${rawFieldSection.getSectionId()}" belongs to ` +
|
|
1945
|
+
`"${rawFieldSection.getModelApiName()}", but the layout belongs to "${
|
|
1946
|
+
this._customObjectApiName
|
|
1947
|
+
}".`,
|
|
1948
|
+
);
|
|
1949
|
+
}
|
|
1950
|
+
field._assignSection(rawFieldSection);
|
|
1951
|
+
return;
|
|
1952
|
+
}
|
|
1953
|
+
|
|
1954
|
+
if (field.getSectionId() == null) {
|
|
1955
|
+
throw new Error(
|
|
1956
|
+
`CustomObjectPageLayout field "${field.getApiName()}" is missing field-section metadata. ` +
|
|
1957
|
+
`Construct the field with a CustomObjectFieldSection or pass section when adding it to ` +
|
|
1958
|
+
`section "${fallbackSectionKey}".`,
|
|
1959
|
+
);
|
|
1960
|
+
}
|
|
1961
|
+
}
|
|
1962
|
+
|
|
1963
|
+
private assertFieldBelongsToLayout(field: Field): void {
|
|
1964
|
+
if (field.getCustomObjectApiName() !== this._customObjectApiName) {
|
|
1965
|
+
throw new Error(
|
|
1966
|
+
`CustomObjectPageLayout references field "${field.getApiName()}" from ` +
|
|
1967
|
+
`"${field.getCustomObjectApiName()}", but the layout belongs to "${this._customObjectApiName}".`,
|
|
1968
|
+
);
|
|
1969
|
+
}
|
|
1970
|
+
}
|
|
1971
|
+
|
|
1972
|
+
private _resolveField(field: CustomObjectFieldInput): Field {
|
|
1973
|
+
return this._customObject._resolveField(field);
|
|
1974
|
+
}
|
|
1975
|
+
|
|
1976
|
+
private fieldApiName(field: Field | string): FieldRqlName {
|
|
1977
|
+
if (typeof field !== 'string') return field.getApiName();
|
|
1978
|
+
if (field.endsWith('__c')) return field;
|
|
1979
|
+
return this._customObject.standardField(field as CustomObjectStandardFieldIdentifier).getApiName();
|
|
1980
|
+
}
|
|
1981
|
+
|
|
1982
|
+
private assertFieldSectionBelongsToLayout(section: CustomObjectFieldSection): void {
|
|
1983
|
+
if (section.getModelApiName() !== this._customObjectApiName) {
|
|
1984
|
+
throw new Error(
|
|
1985
|
+
`CustomObjectPageLayout field section "${section.getSectionId()}" belongs to ` +
|
|
1986
|
+
`"${section.getModelApiName()}", but the layout belongs to "${this._customObjectApiName}".`,
|
|
1987
|
+
);
|
|
1988
|
+
}
|
|
1989
|
+
}
|
|
1990
|
+
|
|
1991
|
+
private rememberFieldSectionLayoutSection(
|
|
1992
|
+
section: CustomObjectFieldSection,
|
|
1993
|
+
tabKey: string,
|
|
1994
|
+
sectionKey: string | undefined,
|
|
1995
|
+
): void {
|
|
1996
|
+
if (sectionKey == null) return;
|
|
1997
|
+
addFieldSectionLayoutSection(this._fieldSectionLayoutSections, section.getSectionId(), {
|
|
1998
|
+
tabKey,
|
|
1999
|
+
sectionKey,
|
|
2000
|
+
});
|
|
2001
|
+
}
|
|
2002
|
+
|
|
2003
|
+
private layoutSectionKeyForFieldSection(
|
|
2004
|
+
tabKey: string | undefined,
|
|
2005
|
+
section: CustomObjectFieldSection,
|
|
2006
|
+
): string | undefined {
|
|
2007
|
+
const entries = this._fieldSectionLayoutSections.get(section.getSectionId()) ?? [];
|
|
2008
|
+
const matches = tabKey == null ? entries : entries.filter((entry) => entry.tabKey === tabKey);
|
|
2009
|
+
const sectionKeys = [...new Set(matches.map((entry) => entry.sectionKey))];
|
|
2010
|
+
if (sectionKeys.length === 0) return undefined;
|
|
2011
|
+
if (sectionKeys.length === 1) return sectionKeys[0];
|
|
2012
|
+
|
|
2013
|
+
const scope = tabKey == null ? '' : ` in tab "${tabKey}"`;
|
|
2014
|
+
throw new Error(
|
|
2015
|
+
`CustomObjectPageLayout field section "${section.getSectionId()}" maps to multiple layout sections${scope}: ` +
|
|
2016
|
+
`${sectionKeys.join(', ')}. Pass sectionKey to choose one.`,
|
|
2017
|
+
);
|
|
2018
|
+
}
|
|
2019
|
+
|
|
2020
|
+
private requireOneFieldContainer(
|
|
2021
|
+
tabKey: string | undefined,
|
|
2022
|
+
sectionKey: string | undefined,
|
|
2023
|
+
fallbackFieldSection?: CustomObjectFieldSection,
|
|
2024
|
+
): MutableFieldContainer {
|
|
2025
|
+
const containers = this.findFieldContainers({
|
|
2026
|
+
tabKey,
|
|
2027
|
+
sectionKey,
|
|
2028
|
+
systemSectionOnly: false,
|
|
2029
|
+
});
|
|
2030
|
+
if (containers.length === 0) {
|
|
2031
|
+
if (sectionKey != null && fallbackFieldSection != null) {
|
|
2032
|
+
const unkeyedContainers = this.findFieldContainers({
|
|
2033
|
+
tabKey,
|
|
2034
|
+
sectionKey: undefined,
|
|
2035
|
+
systemSectionOnly: false,
|
|
2036
|
+
}).filter((container) => container.section != null && container.sectionKey == null);
|
|
2037
|
+
if (unkeyedContainers.length === 1) {
|
|
2038
|
+
if (fallbackFieldSection.getModelApiName() !== this._customObjectApiName) {
|
|
2039
|
+
throw new Error(
|
|
2040
|
+
`CustomObjectPageLayout field section "${fallbackFieldSection.getSectionId()}" belongs to ` +
|
|
2041
|
+
`"${fallbackFieldSection.getModelApiName()}", but the layout belongs to "${
|
|
2042
|
+
this._customObjectApiName
|
|
2043
|
+
}".`,
|
|
2044
|
+
);
|
|
2045
|
+
}
|
|
2046
|
+
const container = unkeyedContainers[0] as MutableFieldContainer & {
|
|
2047
|
+
section: SerializedFieldsSection;
|
|
2048
|
+
};
|
|
2049
|
+
attachLayoutSectionKey(container.section, sectionKey);
|
|
2050
|
+
container.sectionKey = sectionKey;
|
|
2051
|
+
container.label = `${container.tabKey}.${container.sectionKey}`;
|
|
2052
|
+
return container;
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2055
|
+
const scope =
|
|
2056
|
+
sectionKey == null ? 'a field section' : (
|
|
2057
|
+
`section "${tabKey != null ? `${tabKey}.` : ''}${sectionKey}"`
|
|
2058
|
+
);
|
|
2059
|
+
throw new Error(`CustomObjectPageLayout could not find ${scope}.`);
|
|
2060
|
+
}
|
|
2061
|
+
if (containers.length > 1) {
|
|
2062
|
+
if (sectionKey == null) {
|
|
2063
|
+
throw new Error(
|
|
2064
|
+
`CustomObjectPageLayout matched multiple sections: ` +
|
|
2065
|
+
`${containers.map((container) => container.label).join(', ')}. Pass section to choose one.`,
|
|
2066
|
+
);
|
|
2067
|
+
}
|
|
2068
|
+
throw new Error(
|
|
2069
|
+
`CustomObjectPageLayout section "${sectionKey}" matched multiple sections: ` +
|
|
2070
|
+
`${containers.map((container) => container.label).join(', ')}. Pass tabKey to choose one.`,
|
|
2071
|
+
);
|
|
2072
|
+
}
|
|
2073
|
+
return containers[0] as MutableFieldContainer;
|
|
2074
|
+
}
|
|
2075
|
+
|
|
2076
|
+
private findFieldContainers(filter: {
|
|
2077
|
+
tabKey: string | undefined;
|
|
2078
|
+
sectionKey: string | undefined;
|
|
2079
|
+
systemSectionOnly: boolean;
|
|
2080
|
+
}): MutableFieldContainer[] {
|
|
2081
|
+
const containers: MutableFieldContainer[] = [];
|
|
2082
|
+
|
|
2083
|
+
if (!filter.systemSectionOnly) {
|
|
2084
|
+
for (const tab of this._tabEdits.newTabs ?? []) {
|
|
2085
|
+
if (!isTabWithSections(tab)) continue;
|
|
2086
|
+
if (filter.tabKey != null && tab.key !== filter.tabKey) continue;
|
|
2087
|
+
for (const [index, section] of tab.sections.entries()) {
|
|
2088
|
+
if (!isSerializedFieldsSection(section)) continue;
|
|
2089
|
+
const sectionKey = layoutSectionKey(section);
|
|
2090
|
+
if (filter.sectionKey != null && !layoutSectionMatches(section, filter.sectionKey)) continue;
|
|
2091
|
+
const label = sectionKey == null ? `${tab.key}.sections[${index}]` : `${tab.key}.${sectionKey}`;
|
|
2092
|
+
containers.push({
|
|
2093
|
+
tabKey: tab.key,
|
|
2094
|
+
sectionKey,
|
|
2095
|
+
section,
|
|
2096
|
+
fields: ensureArrayProperty<MutableSectionField>(
|
|
2097
|
+
section as unknown as Record<string, any>,
|
|
2098
|
+
'fields',
|
|
2099
|
+
`newTabs.${label}.fields`,
|
|
2100
|
+
),
|
|
2101
|
+
label,
|
|
2102
|
+
});
|
|
2103
|
+
}
|
|
2104
|
+
}
|
|
2105
|
+
|
|
2106
|
+
for (const [tabKey, tabEdit] of Object.entries(this._tabEdits.systemTabEdits ?? {})) {
|
|
2107
|
+
if (filter.tabKey != null && tabKey !== filter.tabKey) continue;
|
|
2108
|
+
for (const [index, section] of (tabEdit.newSections ?? []).entries()) {
|
|
2109
|
+
if (!isSerializedFieldsSection(section)) continue;
|
|
2110
|
+
const sectionKey = layoutSectionKey(section);
|
|
2111
|
+
if (filter.sectionKey != null && !layoutSectionMatches(section, filter.sectionKey)) continue;
|
|
2112
|
+
const label = sectionKey == null ? `${tabKey}.newSections[${index}]` : `${tabKey}.${sectionKey}`;
|
|
2113
|
+
containers.push({
|
|
2114
|
+
tabKey,
|
|
2115
|
+
sectionKey,
|
|
2116
|
+
section,
|
|
2117
|
+
fields: ensureArrayProperty<MutableSectionField>(
|
|
2118
|
+
section as unknown as Record<string, any>,
|
|
2119
|
+
'fields',
|
|
2120
|
+
`systemTabEdits.${label}.fields`,
|
|
2121
|
+
),
|
|
2122
|
+
label,
|
|
2123
|
+
});
|
|
2124
|
+
}
|
|
2125
|
+
}
|
|
2126
|
+
}
|
|
2127
|
+
|
|
2128
|
+
for (const [tabKey, tabEdit] of Object.entries(this._tabEdits.systemTabEdits ?? {})) {
|
|
2129
|
+
if (filter.tabKey != null && tabKey !== filter.tabKey) continue;
|
|
2130
|
+
for (const [sectionKey, sectionEdit] of Object.entries(tabEdit.systemSectionEdits ?? {})) {
|
|
2131
|
+
if (filter.sectionKey != null && sectionKey !== filter.sectionKey) continue;
|
|
2132
|
+
const fields = (sectionEdit as Record<string, any>)['newFields'];
|
|
2133
|
+
if (fields == null) continue;
|
|
2134
|
+
if (!Array.isArray(fields)) {
|
|
2135
|
+
throw new Error(
|
|
2136
|
+
`systemTabEdits.${tabKey}.systemSectionEdits.${sectionKey}.newFields must be an array.`,
|
|
2137
|
+
);
|
|
2138
|
+
}
|
|
2139
|
+
containers.push({
|
|
2140
|
+
tabKey,
|
|
2141
|
+
sectionKey,
|
|
2142
|
+
fields: fields as MutableSectionField[],
|
|
2143
|
+
label: `${tabKey}.${sectionKey}`,
|
|
2144
|
+
});
|
|
2145
|
+
}
|
|
2146
|
+
}
|
|
2147
|
+
|
|
2148
|
+
return containers;
|
|
2149
|
+
}
|
|
2150
|
+
|
|
2151
|
+
private ensureSystemSectionFieldContainer(
|
|
2152
|
+
tabKey: string | undefined,
|
|
2153
|
+
sectionKey: string | undefined,
|
|
2154
|
+
): MutableFieldContainer {
|
|
2155
|
+
if (tabKey == null) {
|
|
2156
|
+
throw new Error('CustomObjectPageLayout addField with systemSection: true requires tabKey.');
|
|
2157
|
+
}
|
|
2158
|
+
if (sectionKey == null) {
|
|
2159
|
+
throw new Error('CustomObjectPageLayout addField with systemSection: true requires sectionKey.');
|
|
2160
|
+
}
|
|
2161
|
+
const sectionEdit = this.ensureSystemSectionEdit(tabKey, sectionKey);
|
|
2162
|
+
if (sectionEdit.deleted === true) {
|
|
2163
|
+
throw new Error(`CustomObjectPageLayout system section "${tabKey}.${sectionKey}" is marked deleted.`);
|
|
2164
|
+
}
|
|
2165
|
+
return {
|
|
2166
|
+
tabKey,
|
|
2167
|
+
sectionKey,
|
|
2168
|
+
fields: ensureArrayProperty<MutableSectionField>(
|
|
2169
|
+
sectionEdit as Record<string, any>,
|
|
2170
|
+
'newFields',
|
|
2171
|
+
`systemTabEdits.${tabKey}.systemSectionEdits.${sectionKey}.newFields`,
|
|
2172
|
+
),
|
|
2173
|
+
label: `${tabKey}.${sectionKey}`,
|
|
2174
|
+
};
|
|
2175
|
+
}
|
|
2176
|
+
|
|
2177
|
+
private ensureSystemTabEdit(tabKey: string): SerializedSystemTabEdit {
|
|
2178
|
+
const systemTabEdits = ensureRecordProperty(
|
|
2179
|
+
this._tabEdits as unknown as Record<string, any>,
|
|
2180
|
+
'systemTabEdits',
|
|
2181
|
+
'tab_edits.systemTabEdits',
|
|
2182
|
+
);
|
|
2183
|
+
return ensureRecordProperty(
|
|
2184
|
+
systemTabEdits,
|
|
2185
|
+
tabKey,
|
|
2186
|
+
`systemTabEdits.${tabKey}`,
|
|
2187
|
+
) as SerializedSystemTabEdit;
|
|
2188
|
+
}
|
|
2189
|
+
|
|
2190
|
+
private ensureSystemSectionEdit(tabKey: string, sectionKey: string): SerializedSystemSectionEdit {
|
|
2191
|
+
const tabEdit = this.ensureSystemTabEdit(tabKey);
|
|
2192
|
+
const systemSectionEdits = ensureRecordProperty(
|
|
2193
|
+
tabEdit as Record<string, any>,
|
|
2194
|
+
'systemSectionEdits',
|
|
2195
|
+
`systemTabEdits.${tabKey}.systemSectionEdits`,
|
|
2196
|
+
);
|
|
2197
|
+
return ensureRecordProperty(
|
|
2198
|
+
systemSectionEdits,
|
|
2199
|
+
sectionKey,
|
|
2200
|
+
`systemTabEdits.${tabKey}.systemSectionEdits.${sectionKey}`,
|
|
2201
|
+
) as SerializedSystemSectionEdit;
|
|
2202
|
+
}
|
|
2203
|
+
|
|
2204
|
+
private findNewTabWithSections(tabKey: string): SerializedTabWithSections | undefined {
|
|
2205
|
+
let found: SerializedTabWithSections | undefined;
|
|
2206
|
+
for (const tab of this._tabEdits.newTabs ?? []) {
|
|
2207
|
+
if (tab.key !== tabKey) continue;
|
|
2208
|
+
if (!isTabWithSections(tab)) {
|
|
2209
|
+
throw new Error(
|
|
2210
|
+
`CustomObjectPageLayout tab "${tabKey}" is a custom_tab and cannot contain sections.`,
|
|
2211
|
+
);
|
|
2212
|
+
}
|
|
2213
|
+
if (found != null) {
|
|
2214
|
+
throw new Error(`CustomObjectPageLayout contains multiple new tabs with key "${tabKey}".`);
|
|
2215
|
+
}
|
|
2216
|
+
found = tab;
|
|
2217
|
+
}
|
|
2218
|
+
return found;
|
|
2219
|
+
}
|
|
2220
|
+
|
|
2221
|
+
private assertSectionKeyAvailable(
|
|
2222
|
+
sections: SerializedPageLayoutSection[],
|
|
2223
|
+
sectionKey: string | undefined,
|
|
2224
|
+
tabKey: string,
|
|
2225
|
+
allowDuplicate: boolean | undefined,
|
|
2226
|
+
): void {
|
|
2227
|
+
if (allowDuplicate === true) return;
|
|
2228
|
+
if (sectionKey != null && sections.some((section) => layoutSectionMatches(section, sectionKey))) {
|
|
2229
|
+
throw new Error(`CustomObjectPageLayout tab "${tabKey}" already contains section "${sectionKey}".`);
|
|
2230
|
+
}
|
|
2231
|
+
}
|
|
2232
|
+
|
|
2233
|
+
private normalizeHeaderFieldForMutation(
|
|
2234
|
+
field: Field | NewHeaderField,
|
|
2235
|
+
options: AddHeaderFieldOptions,
|
|
2236
|
+
): NewHeaderField {
|
|
2237
|
+
const source = isField(field) ? undefined : field;
|
|
2238
|
+
const rqlName = isField(field) ? field.getApiName() : field.rqlName;
|
|
2239
|
+
if (isField(field)) this.assertFieldBelongsToLayout(field);
|
|
2240
|
+
if (!rqlName) throw new Error('CustomObjectPageLayout header field rqlName cannot be empty.');
|
|
2241
|
+
|
|
2242
|
+
const key = options.key ?? source?.key ?? (isField(field) ? field.getApiName() : undefined);
|
|
2243
|
+
if (!key) throw new Error('CustomObjectPageLayout header field key cannot be empty.');
|
|
2244
|
+
|
|
2245
|
+
const normalized: NewHeaderField = { rqlName, key };
|
|
2246
|
+
const canBeDeleted = options.canBeDeleted ?? source?.canBeDeleted;
|
|
2247
|
+
const canBeChanged = options.canBeChanged ?? source?.canBeChanged;
|
|
2248
|
+
const canBeMoved = options.canBeMoved ?? source?.canBeMoved;
|
|
2249
|
+
if (canBeDeleted != null) normalized.canBeDeleted = canBeDeleted;
|
|
2250
|
+
if (canBeChanged != null) normalized.canBeChanged = canBeChanged;
|
|
2251
|
+
if (canBeMoved != null) normalized.canBeMoved = canBeMoved;
|
|
2252
|
+
return normalized;
|
|
2253
|
+
}
|
|
2254
|
+
|
|
2255
|
+
private headerFieldApiName(field: Field | FieldRqlName): FieldRqlName {
|
|
2256
|
+
if (typeof field === 'string') return this.fieldApiName(field);
|
|
2257
|
+
this.assertFieldBelongsToLayout(field);
|
|
2258
|
+
return field.getApiName();
|
|
2259
|
+
}
|
|
2260
|
+
|
|
2261
|
+
private removeSectionVisibility(sectionKey: string): void {
|
|
2262
|
+
if (this._visibilityConditions.sections != null) {
|
|
2263
|
+
delete this._visibilityConditions.sections[sectionKey];
|
|
2264
|
+
}
|
|
2265
|
+
}
|
|
2266
|
+
|
|
2267
|
+
private removeTabVisibility(tabKey: string): void {
|
|
2268
|
+
if (this._visibilityConditions.tabs != null) {
|
|
2269
|
+
delete this._visibilityConditions.tabs[tabKey];
|
|
2270
|
+
}
|
|
2271
|
+
}
|
|
2272
|
+
|
|
2273
|
+
/**
|
|
2274
|
+
* Serializes this layout to the wire format consumed by the manifest install endpoint.
|
|
2275
|
+
*
|
|
2276
|
+
* @returns A plain object with `type: 'CUSTOM_OBJECT_PAGE_LAYOUT'`.
|
|
2277
|
+
*/
|
|
2278
|
+
toDict(): Record<string, any> {
|
|
2279
|
+
const tabEdits = cloneJson(this._tabEdits);
|
|
2280
|
+
stripMovementOptions(tabEdits);
|
|
2281
|
+
const d: Record<string, any> = {
|
|
2282
|
+
type: CustomObjectPageLayout.componentType,
|
|
2283
|
+
layout_id: this._layoutId,
|
|
2284
|
+
api_name: this._apiName,
|
|
2285
|
+
object_rql_name: this._customObjectApiName,
|
|
2286
|
+
name: this._name,
|
|
2287
|
+
// Packaged layouts are never system-created (backend invariant).
|
|
2288
|
+
system_created: false,
|
|
2289
|
+
tab_edits: tabEdits,
|
|
2290
|
+
header_edits: this._headerEdits,
|
|
2291
|
+
visibility_conditions: this._visibilityConditions,
|
|
2292
|
+
blueprint_key: this._blueprintKey ?? this._customObjectApiName,
|
|
2293
|
+
};
|
|
2294
|
+
return d;
|
|
2295
|
+
}
|
|
2296
|
+
|
|
2297
|
+
/**
|
|
2298
|
+
* Creates a simple single-tab "Details" layout with a single "General" section.
|
|
2299
|
+
*
|
|
2300
|
+
* Use this factory when you want a straightforward layout without customizing
|
|
2301
|
+
* tabs or sections. Always uses `apiName: 'default'`.
|
|
2302
|
+
*
|
|
2303
|
+
* @param customObject - The custom object to create the layout for.
|
|
2304
|
+
* @param props - Optional. Pass `section` and `fields` to populate the General section.
|
|
2305
|
+
* @returns A new `CustomObjectPageLayout` registered with the manifest.
|
|
2306
|
+
*
|
|
2307
|
+
* @example
|
|
2308
|
+
* ```ts
|
|
2309
|
+
* CustomObjectPageLayout.basic(memberObj, {
|
|
2310
|
+
* section: profileSection,
|
|
2311
|
+
* fields: [memberFirstName, memberEmail, memberStatusField],
|
|
2312
|
+
* });
|
|
2313
|
+
* ```
|
|
2314
|
+
*/
|
|
2315
|
+
static basic(
|
|
2316
|
+
customObject: CustomObject,
|
|
2317
|
+
props: {
|
|
2318
|
+
section?: CustomObjectFieldSection;
|
|
2319
|
+
fields?: CustomObjectFieldInput[];
|
|
2320
|
+
} = {},
|
|
2321
|
+
): CustomObjectPageLayout {
|
|
2322
|
+
const coApiName = customObject.getApiName();
|
|
2323
|
+
const coName = customObject.getName();
|
|
2324
|
+
const fields = (props.fields ?? []).map((field) => customObject._resolveField(field));
|
|
2325
|
+
const generalSection =
|
|
2326
|
+
props.section ??
|
|
2327
|
+
(() => {
|
|
2328
|
+
const alreadySectionedField = fields.find((field) => field.getSectionId() != null);
|
|
2329
|
+
if (alreadySectionedField != null) {
|
|
2330
|
+
throw new Error(
|
|
2331
|
+
`CustomObjectPageLayout.basic field "${alreadySectionedField.getApiName()}" already belongs to ` +
|
|
2332
|
+
`field section "${alreadySectionedField.getSectionId()}". Pass that CustomObjectFieldSection ` +
|
|
2333
|
+
'as section so basic() does not reassign the field.',
|
|
2334
|
+
);
|
|
2335
|
+
}
|
|
2336
|
+
const sectionPrefix = coApiName.replace(/__c$/, '').replace(/[^a-zA-Z0-9]+/g, '_');
|
|
2337
|
+
return new CustomObjectFieldSection(customObject, {
|
|
2338
|
+
sectionId: `sec_${sectionPrefix}_general`,
|
|
2339
|
+
name: 'General',
|
|
2340
|
+
});
|
|
2341
|
+
})();
|
|
2342
|
+
assertSectionBelongsTo(customObject, generalSection);
|
|
2343
|
+
for (const field of fields) {
|
|
2344
|
+
const fieldSectionId = field.getSectionId();
|
|
2345
|
+
if (fieldSectionId != null && fieldSectionId !== generalSection.getSectionId()) {
|
|
2346
|
+
throw new Error(
|
|
2347
|
+
`CustomObjectPageLayout.basic field "${field.getApiName()}" belongs to field section ` +
|
|
2348
|
+
`"${fieldSectionId}", but basic() was given section "${generalSection.getSectionId()}".`,
|
|
2349
|
+
);
|
|
2350
|
+
}
|
|
2351
|
+
}
|
|
2352
|
+
return new CustomObjectPageLayout(customObject, {
|
|
2353
|
+
apiName: 'default',
|
|
2354
|
+
name: `${coName} Layout`,
|
|
2355
|
+
tabEdits: {
|
|
2356
|
+
newTabs: [
|
|
2357
|
+
{
|
|
2358
|
+
key: 'details',
|
|
2359
|
+
name: 'Details',
|
|
2360
|
+
type: 'tab_with_sections',
|
|
2361
|
+
sections: [
|
|
2362
|
+
{
|
|
2363
|
+
name: 'General',
|
|
2364
|
+
type: 'fields_section',
|
|
2365
|
+
section: generalSection,
|
|
2366
|
+
fields,
|
|
2367
|
+
},
|
|
2368
|
+
],
|
|
2369
|
+
},
|
|
2370
|
+
],
|
|
2371
|
+
systemTabEdits: {},
|
|
2372
|
+
tabsOrder: ['details'],
|
|
2373
|
+
},
|
|
2374
|
+
headerEdits: {},
|
|
2375
|
+
visibilityConditions: {},
|
|
2376
|
+
});
|
|
2377
|
+
}
|
|
2378
|
+
}
|