ecoportal-api-graphql 1.3.5 → 1.3.16
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +934 -477
- data/lib/ecoportal/api/common/graphql/CLAUDE.md +36 -0
- data/lib/ecoportal/api/common/graphql/client.rb +1 -1
- data/lib/ecoportal/api/common/graphql/http_client.rb +195 -145
- data/lib/ecoportal/api/common/graphql/model/CLAUDE.md +28 -0
- data/lib/ecoportal/api/common/graphql/model/as_input.rb +8 -5
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +3 -1
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +31 -23
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff_nesting.rb +54 -1
- data/lib/ecoportal/api/common/graphql/model/diffable.rb +54 -54
- data/lib/ecoportal/api/graphql/CLAUDE.md +37 -0
- data/lib/ecoportal/api/graphql/base/CLAUDE.md +50 -0
- data/lib/ecoportal/api/graphql/base/action.rb +43 -43
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +17 -0
- data/lib/ecoportal/api/graphql/base/contractor_entity/member_changes.rb +67 -67
- data/lib/ecoportal/api/graphql/base/delta_result.rb +16 -0
- data/lib/ecoportal/api/graphql/base/file_container.rb +14 -14
- data/lib/ecoportal/api/graphql/base/force/binding.rb +19 -0
- data/lib/ecoportal/api/graphql/base/force/binding_collection.rb +62 -0
- data/lib/ecoportal/api/graphql/base/force/collection.rb +47 -0
- data/lib/ecoportal/api/graphql/base/force.rb +65 -0
- data/lib/ecoportal/api/graphql/base/kickstand/job.rb +17 -0
- data/lib/ecoportal/api/graphql/base/kickstand/workflow.rb +18 -0
- data/lib/ecoportal/api/graphql/base/kickstand.rb +13 -0
- data/lib/ecoportal/api/graphql/base/location_classification_type.rb +15 -15
- data/lib/ecoportal/api/graphql/base/location_structure.rb +27 -27
- data/lib/ecoportal/api/graphql/base/organization.rb +15 -15
- data/lib/ecoportal/api/graphql/base/page/basic.rb +38 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/actions_list.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/ai_summary.rb +18 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/checklist.rb +29 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/collection.rb +119 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/contractor_entities.rb +28 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/cross_reference.rb +54 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/date_field.rb +23 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/file_field.rb +25 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/gauge.rb +19 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/geo.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/law.rb +8 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/mailbox.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/number.rb +20 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/people.rb +35 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/plain_text.rb +17 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/rich_text.rb +26 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/select.rb +41 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/signature.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/smart_fill.rb +17 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/table.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/tag_field.rb +21 -0
- data/lib/ecoportal/api/graphql/base/page/data_field.rb +137 -12
- data/lib/ecoportal/api/graphql/base/page/phased/stage.rb +68 -14
- data/lib/ecoportal/api/graphql/base/page/phased.rb +1 -0
- data/lib/ecoportal/api/graphql/base/page/section.rb +36 -0
- data/lib/ecoportal/api/graphql/base/page/section_collection.rb +85 -0
- data/lib/ecoportal/api/graphql/base/page/task.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page.rb +17 -14
- data/lib/ecoportal/api/graphql/base/pages_workflow/action_type_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/callback_type.rb +28 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_change.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_change_message.rb +15 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_es_change.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_interface.rb +36 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/email_config.rb +18 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/escalation_level.rb +19 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/in_system_config.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/mailbox_field_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operation_interface.rb +39 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/assign_to.rb +27 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/create_page.rb +21 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/send_notification.rb +30 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/people_field_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/recipient_config.rb +34 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/register_field.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/task_config_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/time_delay_config.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/trigger_interface.rb +26 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/triggers/conditional_logic.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/user_selection.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow.rb +35 -0
- data/lib/ecoportal/api/graphql/base/preset_view.rb +17 -0
- data/lib/ecoportal/api/graphql/base/preview_page.rb +23 -0
- data/lib/ecoportal/api/graphql/base/register.rb +18 -0
- data/lib/ecoportal/api/graphql/base/template.rb +35 -0
- data/lib/ecoportal/api/graphql/base.rb +37 -24
- data/lib/ecoportal/api/graphql/builder/CLAUDE.md +65 -0
- data/lib/ecoportal/api/graphql/builder/contractor_entity.rb +41 -41
- data/lib/ecoportal/api/graphql/builder/kickstand.rb +73 -0
- data/lib/ecoportal/api/graphql/builder/page.rb +210 -41
- data/lib/ecoportal/api/graphql/builder/register/preset_view.rb +84 -0
- data/lib/ecoportal/api/graphql/builder/register.rb +27 -19
- data/lib/ecoportal/api/graphql/builder/template.rb +80 -0
- data/lib/ecoportal/api/graphql/builder/template_builder.rb +174 -0
- data/lib/ecoportal/api/graphql/builder.rb +17 -14
- data/lib/ecoportal/api/graphql/compat/filter_translator.rb +142 -0
- data/lib/ecoportal/api/graphql/compat/page_reference.rb +23 -0
- data/lib/ecoportal/api/graphql/compat/pages.rb +212 -0
- data/lib/ecoportal/api/graphql/compat/registers.rb +84 -0
- data/lib/ecoportal/api/graphql/compat/response.rb +35 -0
- data/lib/ecoportal/api/graphql/compat/search_results.rb +33 -0
- data/lib/ecoportal/api/graphql/compat/stage_collection.rb +70 -0
- data/lib/ecoportal/api/graphql/compat/stage_view.rb +76 -0
- data/lib/ecoportal/api/graphql/compat.rb +17 -0
- data/lib/ecoportal/api/graphql/concerns/data_field_access.rb +71 -0
- data/lib/ecoportal/api/graphql/concerns/deprecation.rb +20 -0
- data/lib/ecoportal/api/graphql/concerns/fragment_definitions.rb +21 -28
- data/lib/ecoportal/api/graphql/concerns/page_compat.rb +51 -0
- data/lib/ecoportal/api/graphql/concerns/snake_camel_access.rb +60 -0
- data/lib/ecoportal/api/graphql/concerns.rb +14 -10
- data/lib/ecoportal/api/graphql/connection/action.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/action_category.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/contractor_entity.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/page.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/pages_workflow_command.rb +13 -0
- data/lib/ecoportal/api/graphql/connection/person_member.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/preset_view.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/preview_page.rb +11 -0
- data/lib/ecoportal/api/graphql/connection.rb +17 -13
- data/lib/ecoportal/api/graphql/diff/change.rb +59 -0
- data/lib/ecoportal/api/graphql/diff/command_synthesizer.rb +329 -0
- data/lib/ecoportal/api/graphql/diff/cross_object_diff.rb +165 -0
- data/lib/ecoportal/api/graphql/diff/deploy.rb +121 -0
- data/lib/ecoportal/api/graphql/diff/id_resolver.rb +64 -0
- data/lib/ecoportal/api/graphql/diff/pairing/candidate.rb +32 -0
- data/lib/ecoportal/api/graphql/diff/pairing/engine.rb +173 -0
- data/lib/ecoportal/api/graphql/diff/pairing/ledger.rb +119 -0
- data/lib/ecoportal/api/graphql/diff/pairing/signals.rb +104 -0
- data/lib/ecoportal/api/graphql/diff/strategy.rb +113 -0
- data/lib/ecoportal/api/graphql/diff/version_diff.rb +332 -0
- data/lib/ecoportal/api/graphql/diff.rb +34 -0
- data/lib/ecoportal/api/graphql/file_upload/client.rb +192 -0
- data/lib/ecoportal/api/graphql/file_upload.rb +10 -0
- data/lib/ecoportal/api/graphql/fragment/action.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/action_category.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/field_configuration.rb +38 -0
- data/lib/ecoportal/api/graphql/fragment/force.rb +34 -0
- data/lib/ecoportal/api/graphql/fragment/location_draft.rb +53 -53
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +26 -26
- data/lib/ecoportal/api/graphql/fragment/locations_error.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/page.rb +85 -0
- data/lib/ecoportal/api/graphql/fragment/page_task.rb +39 -0
- data/lib/ecoportal/api/graphql/fragment/pages/common_page_union.rb +396 -0
- data/lib/ecoportal/api/graphql/fragment/pages.rb +15 -0
- data/lib/ecoportal/api/graphql/fragment/pages_workflow.rb +172 -0
- data/lib/ecoportal/api/graphql/fragment/pagination.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/template.rb +51 -0
- data/lib/ecoportal/api/graphql/fragment.rb +40 -27
- data/lib/ecoportal/api/graphql/input/action/update.rb +14 -14
- data/lib/ecoportal/api/graphql/input/contractor_entity/update.rb +41 -16
- data/lib/ecoportal/api/graphql/input/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/input/delta_input.rb +16 -0
- data/lib/ecoportal/api/graphql/input/location_structure/apply_commands.rb +47 -47
- data/lib/ecoportal/api/graphql/input/location_structure/draft/add_commands.rb +49 -49
- data/lib/ecoportal/api/graphql/input/location_structure/update_command.rb +27 -27
- data/lib/ecoportal/api/graphql/input/page/archive.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/build_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/create_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/create_from_template.rb +18 -0
- data/lib/ecoportal/api/graphql/input/page/delete_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/publish_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/review_task.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/unarchive.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/update.rb +140 -0
- data/lib/ecoportal/api/graphql/input/page.rb +26 -0
- data/lib/ecoportal/api/graphql/input/preset_view/create.rb +18 -0
- data/lib/ecoportal/api/graphql/input/preset_view/permission.rb +16 -0
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +16 -0
- data/lib/ecoportal/api/graphql/input/preset_view.rb +14 -0
- data/lib/ecoportal/api/graphql/input/register/create.rb +18 -0
- data/lib/ecoportal/api/graphql/input/register/update.rb +15 -0
- data/lib/ecoportal/api/graphql/input/register.rb +13 -0
- data/lib/ecoportal/api/graphql/input/search_conf/ai_generator.rb +234 -0
- data/lib/ecoportal/api/graphql/input/search_conf.rb +436 -0
- data/lib/ecoportal/api/graphql/input/variable_binding.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_action_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_comment_tagging_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_field.rb +27 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_gauge_field_stop.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_field_config.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_action_type.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_filter.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_people_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_task_config.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback_action.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_select_field_option.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task_assignment_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_workflow_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/collapse_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_creator_permissions.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_gauge_field_stop.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_field_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +28 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page_creator_permissions.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_reminder.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_required_sign_offs.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_comment_tagging.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_task_assignment.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_scheduled_callback.rb +22 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_section_header.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_select_field_option.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_task_due.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_trigger.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/expand_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/contractor_entities.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/gauge.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/location_field.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/people.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/signature.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/table.rb +25 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_action_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_comment_tagging_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_gauge_field_stop.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_field_config.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_action_type.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_filter.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_people_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_task_config.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_scheduled_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_select_field_option.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_assignment_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_due.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_priority_level.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +251 -0
- data/lib/ecoportal/api/graphql/input.rb +24 -16
- data/lib/ecoportal/api/graphql/interface/base_page.rb +100 -58
- data/lib/ecoportal/api/graphql/interface/location_structure/command.rb +30 -30
- data/lib/ecoportal/api/graphql/interface/location_structure/nodes.rb +27 -28
- data/lib/ecoportal/api/graphql/logic/base_model.rb +2 -0
- data/lib/ecoportal/api/graphql/logic/base_query.rb +45 -2
- data/lib/ecoportal/api/graphql/logic/connection.rb +34 -34
- data/lib/ecoportal/api/graphql/logic/input.rb +26 -11
- data/lib/ecoportal/api/graphql/model/ai_summary_version.rb +10 -0
- data/lib/ecoportal/api/graphql/model/organization.rb +65 -55
- data/lib/ecoportal/api/graphql/model/page/basic.rb +14 -0
- data/lib/ecoportal/api/graphql/model/page/phased.rb +82 -20
- data/lib/ecoportal/api/graphql/model/page/task.rb +16 -0
- data/lib/ecoportal/api/graphql/model/page.rb +16 -14
- data/lib/ecoportal/api/graphql/model/page_union.rb +21 -0
- data/lib/ecoportal/api/graphql/model/pages_workflow.rb +20 -0
- data/lib/ecoportal/api/graphql/model/person_member.rb +15 -15
- data/lib/ecoportal/api/graphql/model/preset_view.rb +10 -0
- data/lib/ecoportal/api/graphql/model/preview_page.rb +10 -0
- data/lib/ecoportal/api/graphql/model/register.rb +10 -0
- data/lib/ecoportal/api/graphql/model/template.rb +15 -0
- data/lib/ecoportal/api/graphql/model.rb +32 -22
- data/lib/ecoportal/api/graphql/mutation/action/archive.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/action/create.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/action/update.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +45 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary.rb +13 -0
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/create.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/destroy.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/update.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_jobs.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_workflows.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/fail_job.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/fail_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/start_job.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/start_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/stop_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand.rb +18 -0
- data/lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/add_commands.rb +2 -2
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/create.rb +2 -2
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/drop_bad_commands.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/publish.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/archive.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +38 -0
- data/lib/ecoportal/api/graphql/mutation/page/build_from_template.rb +50 -0
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +38 -0
- data/lib/ecoportal/api/graphql/mutation/page/create_from_template.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +38 -0
- data/lib/ecoportal/api/graphql/mutation/page/execute_force_commands.rb +69 -0
- data/lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb +52 -0
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +38 -0
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/unarchive.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/update.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/update_variable_bindings.rb +44 -0
- data/lib/ecoportal/api/graphql/mutation/page.rb +28 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/create.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +34 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/permission.rb +37 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/update.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view.rb +15 -0
- data/lib/ecoportal/api/graphql/mutation/register/create.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register/update.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register.rb +14 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +36 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +13 -0
- data/lib/ecoportal/api/graphql/mutation/template/create.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/create_related_page.rb +46 -0
- data/lib/ecoportal/api/graphql/mutation/template/destroy_related_page.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template/publish.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/unpublish.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/update.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template/update_information.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template.rb +18 -0
- data/lib/ecoportal/api/graphql/mutation.rb +20 -12
- data/lib/ecoportal/api/graphql/payload/ai_summary_generate.rb +12 -0
- data/lib/ecoportal/api/graphql/payload/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/force_commands.rb +31 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/job.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/workflow.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/kickstand.rb +15 -0
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/create.rb +33 -34
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/page/archive.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/build_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/create_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +26 -0
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/review_task_batch.rb +23 -0
- data/lib/ecoportal/api/graphql/payload/page/unarchive.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/update.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/update_variable_bindings.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page.rb +20 -0
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +15 -0
- data/lib/ecoportal/api/graphql/payload/register.rb +15 -0
- data/lib/ecoportal/api/graphql/payload/template/create.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/create_related_page.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/destroy_related_page.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/publish.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/unpublish.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/update.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/update_information.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template.rb +18 -0
- data/lib/ecoportal/api/graphql/payload.rb +23 -12
- data/lib/ecoportal/api/graphql/query/action.rb +1 -1
- data/lib/ecoportal/api/graphql/query/action_categories.rb +1 -1
- data/lib/ecoportal/api/graphql/query/actions.rb +2 -2
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +1 -1
- data/lib/ecoportal/api/graphql/query/file_upload_signature.rb +76 -0
- data/lib/ecoportal/api/graphql/query/location_structure/draft.rb +62 -62
- data/lib/ecoportal/api/graphql/query/location_structure.rb +61 -61
- data/lib/ecoportal/api/graphql/query/location_structures.rb +57 -57
- data/lib/ecoportal/api/graphql/query/page.rb +45 -0
- data/lib/ecoportal/api/graphql/query/page_delta.rb +47 -0
- data/lib/ecoportal/api/graphql/query/page_with_forces.rb +49 -0
- data/lib/ecoportal/api/graphql/query/pages.rb +59 -0
- data/lib/ecoportal/api/graphql/query/pages_workflow_commands.rb +65 -0
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +78 -0
- data/lib/ecoportal/api/graphql/query/register_preview_pages.rb +83 -0
- data/lib/ecoportal/api/graphql/query/templates.rb +53 -0
- data/lib/ecoportal/api/graphql/query.rb +27 -16
- data/lib/ecoportal/api/graphql.rb +143 -80
- data/lib/ecoportal/api/graphql_version.rb +5 -5
- metadata +333 -25
- data/.gitignore +0 -24
- data/.markdownlint.json +0 -4
- data/.rspec +0 -3
- data/.rubocop.yml +0 -97
- data/.ruby-version +0 -1
- data/.yardopts +0 -10
- data/Gemfile +0 -6
- data/Rakefile +0 -38
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/bin/setup.ps1 +0 -6
- data/ecoportal-api-graphql.gemspec +0 -40
- data/tests/actions_get.rb +0 -7
- data/tests/contractor_entities_get.rb +0 -20
- data/tests/contractor_entity_create.rb +0 -19
- data/tests/contractor_entity_udpate.rb +0 -20
- data/tests/loc_structure_get.rb +0 -11
- data/tests/loc_structure_update.rb +0 -51
- data/tests/loc_structures_get.rb +0 -15
- data/tests/local_libs.rb +0 -20
|
@@ -1,54 +1,54 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
module Common
|
|
4
|
-
module GraphQL
|
|
5
|
-
class Model
|
|
6
|
-
module Diffable
|
|
7
|
-
require_relative 'diffable/hash_diff_nesting'
|
|
8
|
-
require_relative 'diffable/classic_diff_service'
|
|
9
|
-
require_relative 'diffable/diff_service'
|
|
10
|
-
|
|
11
|
-
DIFF_CLASS = DiffService
|
|
12
|
-
|
|
13
|
-
# INSTANCE METHODS
|
|
14
|
-
|
|
15
|
-
# @note **cascaded callbacks**
|
|
16
|
-
# 1. Can **skip** rooted objects (where `root?` is `true`).
|
|
17
|
-
# This is because nested rooted objects are usually look-ups
|
|
18
|
-
# (not really part of the target model).
|
|
19
|
-
# 2. Allow to redefine `as_update` on each model.
|
|
20
|
-
# @param flat [Boolean] whether it should NOT perform a cascaded callback
|
|
21
|
-
# througout all the instance objects of the model hierarchy (nested).
|
|
22
|
-
# @param ignored [Array<String>] the keys that should be ignored, not part
|
|
23
|
-
# of the result of `as_update`
|
|
24
|
-
# @return [nil, Hash] the patch `Hash` model including only
|
|
25
|
-
# the changes between `original_doc` and `doc`.
|
|
26
|
-
def as_update(**kargs)
|
|
27
|
-
diff_class.new(
|
|
28
|
-
self,
|
|
29
|
-
**kargs
|
|
30
|
-
).diff
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
# @note `cascaded` will be more accurate in a `GraphQL` scenario.
|
|
34
|
-
# @return [Boolean] stating if there are changes.
|
|
35
|
-
def dirty?(...)
|
|
36
|
-
au = as_update(...)
|
|
37
|
-
|
|
38
|
-
return false if au.nil?
|
|
39
|
-
return false if au == {}
|
|
40
|
-
|
|
41
|
-
true
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
private
|
|
45
|
-
|
|
46
|
-
def diff_class
|
|
47
|
-
self.class::DIFF_CLASS
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
54
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
module Common
|
|
4
|
+
module GraphQL
|
|
5
|
+
class Model
|
|
6
|
+
module Diffable
|
|
7
|
+
require_relative 'diffable/hash_diff_nesting'
|
|
8
|
+
require_relative 'diffable/classic_diff_service'
|
|
9
|
+
require_relative 'diffable/diff_service'
|
|
10
|
+
|
|
11
|
+
DIFF_CLASS = DiffService
|
|
12
|
+
|
|
13
|
+
# INSTANCE METHODS
|
|
14
|
+
|
|
15
|
+
# @note **cascaded callbacks**
|
|
16
|
+
# 1. Can **skip** rooted objects (where `root?` is `true`).
|
|
17
|
+
# This is because nested rooted objects are usually look-ups
|
|
18
|
+
# (not really part of the target model).
|
|
19
|
+
# 2. Allow to redefine `as_update` on each model.
|
|
20
|
+
# @param flat [Boolean] whether it should NOT perform a cascaded callback
|
|
21
|
+
# througout all the instance objects of the model hierarchy (nested).
|
|
22
|
+
# @param ignored [Array<String>] the keys that should be ignored, not part
|
|
23
|
+
# of the result of `as_update`
|
|
24
|
+
# @return [nil, Hash] the patch `Hash` model including only
|
|
25
|
+
# the changes between `original_doc` and `doc`.
|
|
26
|
+
def as_update(**kargs)
|
|
27
|
+
diff_class.new(
|
|
28
|
+
self,
|
|
29
|
+
**kargs
|
|
30
|
+
).diff
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# @note `cascaded` will be more accurate in a `GraphQL` scenario.
|
|
34
|
+
# @return [Boolean] stating if there are changes.
|
|
35
|
+
def dirty?(...)
|
|
36
|
+
au = as_update(...)
|
|
37
|
+
|
|
38
|
+
return false if au.nil?
|
|
39
|
+
return false if au == {}
|
|
40
|
+
|
|
41
|
+
true
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
def diff_class
|
|
47
|
+
self.class::DIFF_CLASS
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
54
|
+
end
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# graphql (gem root)
|
|
2
|
+
|
|
3
|
+
The entry point for the gem: `Ecoportal::API::GraphQL` is the top-level class consumers instantiate; it holds the `client`, wires the `HttpClient`, and exposes builder/compat entry points.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
| File / class | Purpose |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `graphql.rb` / `GraphQL` | Main entry class — `initialize` builds `Client` + `HttpClient`, exposes `pages`, `registers`, `page`, `action`, `contractorEntity`, `locationStructure`, `currentOrganization` |
|
|
10
|
+
| `graphql_version.rb` | Gem `VERSION` constant |
|
|
11
|
+
| `base/` | Data-only model base classes (no resolvers, no `client`); see `base/CLAUDE.md` |
|
|
12
|
+
| `builder/` | Facade builders that group related mutations under one object |
|
|
13
|
+
| `compat/` | v2-compatible API layer for eco-helpers scripts |
|
|
14
|
+
| `concerns/` | Shared Ruby mixins (`PageCompat`, `DataFieldAccess`, `SnakeCamelAccess`, `FragmentDefinitions`) |
|
|
15
|
+
| `connection/` | `Logic::Connection` subclasses — typed pagination wrappers per entity |
|
|
16
|
+
| `error/` | Domain error classes (`ValidationErrors`, `LocationsError`, `LocationsValidationError`) |
|
|
17
|
+
| `fragment/` | GraphQL fragment heredoc strings + `Fragment.assemble(*syms)` |
|
|
18
|
+
| `helpers/` | Utility modules (`LocationsTree`) |
|
|
19
|
+
| `input/` | Mutation input serialisers; `SearchConf` is a chainable value object |
|
|
20
|
+
| `interface/` | Abstract base models shared by `Base::` and `Model::` (e.g. `BasePage`, `LocationStructure`) |
|
|
21
|
+
| `logic/` | Abstract base classes for queries, mutations, connections — no domain code |
|
|
22
|
+
| `model/` | Concrete domain models with `class_resolver` wiring; subclass their `Base::` counterparts |
|
|
23
|
+
| `mutation/` | Concrete mutation execution classes |
|
|
24
|
+
| `payload/` | Mutation response payload wrappers |
|
|
25
|
+
| `query/` | Concrete query execution classes |
|
|
26
|
+
|
|
27
|
+
## Conventions
|
|
28
|
+
|
|
29
|
+
- Load order in `graphql.rb` matters: `logic/base_model` → `error` → `interface` → `base` → `model` → rest.
|
|
30
|
+
- `#pages` returns `Compat::Pages` (v2-compatible); `#page` returns `Builder::Page` (raw mutation facade).
|
|
31
|
+
- `#currentOrganization` returns `Model::Organization` class (not instance) with `client` set — query methods are class-level.
|
|
32
|
+
- `GraphQL` (not `GraphQL`) is the namespace: use `Ecoportal::API::Graphql` alias only for legacy references; internal code uses `GraphQL`.
|
|
33
|
+
|
|
34
|
+
## Related
|
|
35
|
+
|
|
36
|
+
- `../../common/graphql/` — HTTP client, auth, and base model infrastructure
|
|
37
|
+
- Downstream: `eco-helpers` calls `.pages` and `.registers` exclusively via `Compat::*`
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# base
|
|
2
|
+
|
|
3
|
+
Data-only model base classes — these declare fields and structure but hold no `client`, no query resolvers, and no business logic.
|
|
4
|
+
|
|
5
|
+
## Contents
|
|
6
|
+
|
|
7
|
+
| File / class | Purpose |
|
|
8
|
+
|---|---|
|
|
9
|
+
| `action.rb` / `Base::Action` | Action fields (id, name, status, dates, assignee IDs); declared `root!` so excluded from cascaded diffs |
|
|
10
|
+
| `action_category.rb` / `Base::ActionCategory` | Action category fields |
|
|
11
|
+
| `contractor_entity.rb` / `Base::ContractorEntity` | Contractor entity fields |
|
|
12
|
+
| `contractor_entity/member_changes.rb` | Nested member-changes sub-model |
|
|
13
|
+
| `date_time.rb` / `Base::DateTime` | Wraps `{ dateTime:, timeZone: }` response objects |
|
|
14
|
+
| `delta_result.rb` / `Base::DeltaResult` | `pageDelta` result item: `id` + `delta` enum (UPDATED/NOT_FOUND/NEW) |
|
|
15
|
+
| `field.rb` / `Base::Field` | Generic field model |
|
|
16
|
+
| `file_attachment.rb` / `Base::FileAttachment` | File attachment metadata |
|
|
17
|
+
| `file_container.rb` / `Base::FileContainer` | File container wrapper |
|
|
18
|
+
| `location_classification_type.rb` | Classification type (name) |
|
|
19
|
+
| `location_node.rb` / `Base::LocationNode` | Location node with ancestors and classifications |
|
|
20
|
+
| `location_structure.rb` / `Base::LocationStructure` | Location structure tree model |
|
|
21
|
+
| `location_structure/draft.rb` | Draft structure model |
|
|
22
|
+
| `location_structure/draft/structure.rb` | Nested draft structure detail |
|
|
23
|
+
| `organization.rb` / `Base::Organization` | Thin organization base (id, name) |
|
|
24
|
+
| `page.rb` | Namespace module; requires `basic`, `data_field`, `section`, `section_collection`, `phased` |
|
|
25
|
+
| `page/basic.rb` / `Base::Page::Basic` | BasicPage — inherits `Interface::BasePage`; no extra fields |
|
|
26
|
+
| `page/phased.rb` / `Base::Page::Phased` | PhasedPage — inherits `Interface::BasePage`; `embeds_many :stages` |
|
|
27
|
+
| `page/phased/stage.rb` / `Base::Page::Phased::Stage` | Single stage: id, name, ordering, state, sections, components |
|
|
28
|
+
| `page/section.rb` / `Base::Page::Section` | Section wrapper (ContentSection or SplitSection); merges left/right dataFields into `components` |
|
|
29
|
+
| `page/section_collection.rb` / `Base::Page::SectionCollection` | Enumerable wrapper over sections; provides `get_by_type`, `get_by_heading`, `components` |
|
|
30
|
+
| `page/data_field.rb` / `Base::Page::DataField` | Base data field class; `TYPE_MAP` dispatches `from_doc` to typed subclasses |
|
|
31
|
+
| `page/data_field/` | 10 typed subclasses (PlainText, RichText, DateField, Number, Gauge, People, Select, Checklist, TagField, Geo) + `Collection` |
|
|
32
|
+
| `page_info.rb` / `Base::PageInfo` | Cursor pagination info (endCursor, hasNextPage) |
|
|
33
|
+
| `person_member.rb` / `Base::PersonMember` | Person member (name, email, id) |
|
|
34
|
+
| `preview_page.rb` / `Base::PreviewPage` | Lightweight page preview (no field data) |
|
|
35
|
+
| `resource.rb` / `Base::Resource` | Resource model (inherits `Logic::BaseModel` directly) |
|
|
36
|
+
| `pages_workflow.rb` / `Base::PagesWorkflow` | PagesWorkflow top-level model: `autoPageCreationEnabled`, `fields` (RegisterField), `stages`; sub-files under `pages_workflow/` cover RegisterField, CallbackType, OperationInterface, TriggerInterface, and supporting types |
|
|
37
|
+
|
|
38
|
+
## Conventions
|
|
39
|
+
|
|
40
|
+
- `Base::` classes are data-only: `passkey`, `passthrough`, `passboolean`, `passarray`, `embeds_one`, `embeds_many` only — no business methods, no resolvers.
|
|
41
|
+
- `Model::` subclasses in `../model/` add `class_resolver` wiring and may add behaviour (e.g. `Model::Page::Phased#stages` wraps the array in `Compat::StageCollection`).
|
|
42
|
+
- `Interface::BasePage` is the shared parent of both `Basic` and `Phased`; field declarations that apply to both page types live there.
|
|
43
|
+
- `Base::Action` declares `root!` — this marks it as an independent server entity, excluded from cascaded `as_update` diffs.
|
|
44
|
+
- When adding a new field to a page type, add it to `Interface::BasePage` if it applies to both, or to the appropriate `Base::Page::*` class.
|
|
45
|
+
|
|
46
|
+
## Related
|
|
47
|
+
|
|
48
|
+
- `../interface/base_page.rb` — common parent for Basic + Phased page base classes
|
|
49
|
+
- `../model/` — concrete models that subclass these bases
|
|
50
|
+
- `../model/page_union.rb` — factory that dispatches `__typename` to `Model::Page::Basic` or `Model::Page::Phased`
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Base
|
|
5
|
-
class Action < Logic::BaseModel
|
|
6
|
-
root!
|
|
7
|
-
|
|
8
|
-
passkey :id
|
|
9
|
-
passthrough :altId
|
|
10
|
-
passthrough :name, :description
|
|
11
|
-
passthrough :age
|
|
12
|
-
|
|
13
|
-
passarray :locationIds
|
|
14
|
-
|
|
15
|
-
passthrough :status, :relativeStatus
|
|
16
|
-
passboolean :archived, :attached, :standaloneAction
|
|
17
|
-
passthrough :actionCategoryId
|
|
18
|
-
|
|
19
|
-
passarray :fileContainerIds
|
|
20
|
-
|
|
21
|
-
passarray :assignedPersonMemberIds
|
|
22
|
-
passthrough :creatorId, :creatorUserId
|
|
23
|
-
passthrough :updaterId, :updaterUserId
|
|
24
|
-
passthrough :completerId
|
|
25
|
-
|
|
26
|
-
passthrough :timeZone
|
|
27
|
-
embeds_one :dueDate, klass: Base::DateTime
|
|
28
|
-
embeds_one :reminderDate, klass: Base::DateTime
|
|
29
|
-
embeds_one :createdAt, klass: Base::DateTime
|
|
30
|
-
embeds_one :updatedAt, klass: Base::DateTime
|
|
31
|
-
embeds_one :completedAt, klass: Base::DateTime
|
|
32
|
-
embeds_one :openededAt, klass: Base::DateTime
|
|
33
|
-
embeds_one :closedAt, klass: Base::DateTime
|
|
34
|
-
embeds_one :dueOrClosedDate, klass: Base::DateTime
|
|
35
|
-
|
|
36
|
-
passboolean :completed
|
|
37
|
-
passthrough :closeDetail
|
|
38
|
-
#passthrough :dueIn # only for templates
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class Action < Logic::BaseModel
|
|
6
|
+
root!
|
|
7
|
+
|
|
8
|
+
passkey :id
|
|
9
|
+
passthrough :altId
|
|
10
|
+
passthrough :name, :description
|
|
11
|
+
passthrough :age
|
|
12
|
+
|
|
13
|
+
passarray :locationIds
|
|
14
|
+
|
|
15
|
+
passthrough :status, :relativeStatus
|
|
16
|
+
passboolean :archived, :attached, :standaloneAction
|
|
17
|
+
passthrough :actionCategoryId
|
|
18
|
+
|
|
19
|
+
passarray :fileContainerIds
|
|
20
|
+
|
|
21
|
+
passarray :assignedPersonMemberIds
|
|
22
|
+
passthrough :creatorId, :creatorUserId
|
|
23
|
+
passthrough :updaterId, :updaterUserId
|
|
24
|
+
passthrough :completerId
|
|
25
|
+
|
|
26
|
+
passthrough :timeZone
|
|
27
|
+
embeds_one :dueDate, klass: Base::DateTime
|
|
28
|
+
embeds_one :reminderDate, klass: Base::DateTime
|
|
29
|
+
embeds_one :createdAt, klass: Base::DateTime
|
|
30
|
+
embeds_one :updatedAt, klass: Base::DateTime
|
|
31
|
+
embeds_one :completedAt, klass: Base::DateTime
|
|
32
|
+
embeds_one :openededAt, klass: Base::DateTime
|
|
33
|
+
embeds_one :closedAt, klass: Base::DateTime
|
|
34
|
+
embeds_one :dueOrClosedDate, klass: Base::DateTime
|
|
35
|
+
|
|
36
|
+
passboolean :completed
|
|
37
|
+
passthrough :closeDetail
|
|
38
|
+
#passthrough :dueIn # only for templates
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
# Represents one generation version of an AiSummary field.
|
|
6
|
+
# Returned by generateAiSummary — tracks the prompt, output, token usage, and status.
|
|
7
|
+
class AiSummaryVersion < Logic::BaseModel
|
|
8
|
+
passkey :id
|
|
9
|
+
passthrough :aiSummary, :status, :prompt
|
|
10
|
+
passthrough :inputTokens, :outputTokens, :totalTokens
|
|
11
|
+
passthrough :resourceType # "field" | "stage" | "page"
|
|
12
|
+
passarray :ratings # [[user_id, score], ...]
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -1,67 +1,67 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Base
|
|
5
|
-
class ContractorEntity
|
|
6
|
-
module MemberChanges
|
|
7
|
-
def associate(*values, lead: false)
|
|
8
|
-
ids = to_person_ids(*values)
|
|
9
|
-
|
|
10
|
-
associatedPeopleIds.tap do |associated|
|
|
11
|
-
associated.push!(*ids)
|
|
12
|
-
next unless lead
|
|
13
|
-
|
|
14
|
-
lead!(*ids)
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def dissassociate(*values)
|
|
19
|
-
ids = to_person_ids(*values)
|
|
20
|
-
|
|
21
|
-
associatedPeopleIds.tap do |associated|
|
|
22
|
-
unlead!(*ids)
|
|
23
|
-
associated.delete!(*ids)
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def lead!(*values)
|
|
28
|
-
ids = to_person_ids(*values)
|
|
29
|
-
|
|
30
|
-
leadContractorIds.tap do |leads|
|
|
31
|
-
associate(*ids)
|
|
32
|
-
leads.push!(*ids)
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def unlead!(*values)
|
|
37
|
-
ids = to_person_ids(*values)
|
|
38
|
-
|
|
39
|
-
leadContractorIds.tap do |leads|
|
|
40
|
-
leads.delete!(*ids)
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
private
|
|
45
|
-
|
|
46
|
-
def to_person_ids(*values)
|
|
47
|
-
to_person_id(values.flatten)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def to_person_id(value)
|
|
51
|
-
case value
|
|
52
|
-
when String
|
|
53
|
-
value
|
|
54
|
-
when Ecoportal::API::V1::Person
|
|
55
|
-
value.id
|
|
56
|
-
when Hash
|
|
57
|
-
to_person_id(['id'])
|
|
58
|
-
when Enumarable
|
|
59
|
-
value.map {|val| to_person_id(val)}.compact
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class ContractorEntity
|
|
6
|
+
module MemberChanges
|
|
7
|
+
def associate(*values, lead: false)
|
|
8
|
+
ids = to_person_ids(*values)
|
|
9
|
+
|
|
10
|
+
associatedPeopleIds.tap do |associated|
|
|
11
|
+
associated.push!(*ids)
|
|
12
|
+
next unless lead
|
|
13
|
+
|
|
14
|
+
lead!(*ids)
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def dissassociate(*values)
|
|
19
|
+
ids = to_person_ids(*values)
|
|
20
|
+
|
|
21
|
+
associatedPeopleIds.tap do |associated|
|
|
22
|
+
unlead!(*ids)
|
|
23
|
+
associated.delete!(*ids)
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def lead!(*values)
|
|
28
|
+
ids = to_person_ids(*values)
|
|
29
|
+
|
|
30
|
+
leadContractorIds.tap do |leads|
|
|
31
|
+
associate(*ids)
|
|
32
|
+
leads.push!(*ids)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def unlead!(*values)
|
|
37
|
+
ids = to_person_ids(*values)
|
|
38
|
+
|
|
39
|
+
leadContractorIds.tap do |leads|
|
|
40
|
+
leads.delete!(*ids)
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
private
|
|
45
|
+
|
|
46
|
+
def to_person_ids(*values)
|
|
47
|
+
to_person_id(values.flatten)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def to_person_id(value)
|
|
51
|
+
case value
|
|
52
|
+
when String
|
|
53
|
+
value
|
|
54
|
+
when Ecoportal::API::V1::Person
|
|
55
|
+
value.id
|
|
56
|
+
when Hash
|
|
57
|
+
to_person_id(['id'])
|
|
58
|
+
when Enumarable
|
|
59
|
+
value.map {|val| to_person_id(val)}.compact
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
# Result of a pageDelta query for a single page ID.
|
|
6
|
+
# delta: 'UPDATED' | 'NOT_FOUND' | 'NEW'
|
|
7
|
+
class DeltaResult < Logic::BaseModel
|
|
8
|
+
read_only!
|
|
9
|
+
|
|
10
|
+
passkey :id
|
|
11
|
+
passthrough :delta
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Base
|
|
5
|
-
class FileContainer < Logic::BaseModel
|
|
6
|
-
passkey :id
|
|
7
|
-
passthrough :name, :activeName
|
|
8
|
-
passthrough :fileSize, :token, :activeVersionId
|
|
9
|
-
passarray :tags
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class FileContainer < Logic::BaseModel
|
|
6
|
+
passkey :id
|
|
7
|
+
passthrough :name, :activeName
|
|
8
|
+
passthrough :fileSize, :token, :activeVersionId
|
|
9
|
+
passarray :tags
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class Force
|
|
6
|
+
# A single force binding — links a Force to a data field or section by referenceId.
|
|
7
|
+
class Binding < Logic::BaseModel
|
|
8
|
+
passkey :id
|
|
9
|
+
passthrough :name, :referenceId
|
|
10
|
+
|
|
11
|
+
def reference_id
|
|
12
|
+
referenceId
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class Force
|
|
6
|
+
# Wraps the bindings array of a Force. Supports the v2 scripting interface:
|
|
7
|
+
# force.bindings.get_by_name(name) → [Binding, ...]
|
|
8
|
+
# force.bindings.add(field, name:) → queues addBinding command
|
|
9
|
+
# force.bindings.delete!(binding) → queues removeBinding command
|
|
10
|
+
class BindingCollection
|
|
11
|
+
include Enumerable
|
|
12
|
+
|
|
13
|
+
def initialize(raw, force:)
|
|
14
|
+
@force = force
|
|
15
|
+
@bindings = Array(raw).map { |b| Force::Binding.new(b) }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# Filter bindings by name (case-insensitive).
|
|
19
|
+
def get_by_name(name)
|
|
20
|
+
target = name.to_s.downcase
|
|
21
|
+
@bindings.select { |b| b.name.to_s.downcase == target }
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
# Queue an addBinding command. `field` may be a GraphQL DataField object
|
|
25
|
+
# (uses field.id as referenceId) or a raw ID string.
|
|
26
|
+
def add(field, name:, type: 'field')
|
|
27
|
+
ref_id = field.respond_to?(:id) ? field.id : field.to_s
|
|
28
|
+
@force.queue_command(
|
|
29
|
+
addBinding: {
|
|
30
|
+
forceId: @force.id,
|
|
31
|
+
name: name.to_s,
|
|
32
|
+
referenceId: ref_id,
|
|
33
|
+
type: type
|
|
34
|
+
}
|
|
35
|
+
)
|
|
36
|
+
self
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# Queue a removeBinding command. Accepts a Binding object or an ID string.
|
|
40
|
+
def delete!(binding_or_id)
|
|
41
|
+
bid = binding_or_id.respond_to?(:id) ? binding_or_id.id : binding_or_id.to_s
|
|
42
|
+
@force.queue_command(removeBinding: { id: bid })
|
|
43
|
+
self
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def each(&block)
|
|
47
|
+
@bindings.each(&block)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def size
|
|
51
|
+
@bindings.size
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def empty?
|
|
55
|
+
@bindings.empty?
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class Force
|
|
6
|
+
# Wraps a page's forces array. Provides the v2 scripting interface:
|
|
7
|
+
# page.forces.get_by_name(name) → [Force, ...]
|
|
8
|
+
class Collection
|
|
9
|
+
include Enumerable
|
|
10
|
+
|
|
11
|
+
def initialize(raw)
|
|
12
|
+
@forces = Array(raw).map { |f| Force.new(f) }
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
# Filter forces by name (case-insensitive).
|
|
16
|
+
def get_by_name(name)
|
|
17
|
+
target = name.to_s.downcase
|
|
18
|
+
@forces.select { |f| f.name.to_s.downcase == target }
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
# True if any force has uncommitted script changes or pending binding commands.
|
|
22
|
+
def dirty?
|
|
23
|
+
@forces.any?(&:dirty?)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
# All pending commands across all forces (editForce, addBinding, removeBinding).
|
|
27
|
+
def pending_commands
|
|
28
|
+
@forces.flat_map(&:all_pending_commands)
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def each(&block)
|
|
32
|
+
@forces.each(&block)
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def size
|
|
36
|
+
@forces.size
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def empty?
|
|
40
|
+
@forces.empty?
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|