ecoportal-api-graphql 1.3.5 → 1.3.17
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 +943 -477
- data/LICENSE +21 -21
- data/README.md +24 -24
- data/lib/ecoportal/api/common/graphql/auth_service.rb +115 -115
- data/lib/ecoportal/api/common/graphql/class_helpers.rb +46 -46
- data/lib/ecoportal/api/common/graphql/client.rb +69 -69
- data/lib/ecoportal/api/common/graphql/hash_helpers.rb +105 -105
- data/lib/ecoportal/api/common/graphql/http_client.rb +195 -145
- data/lib/ecoportal/api/common/graphql/model/as_input.rb +54 -51
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +49 -47
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +188 -180
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff.rb +55 -55
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff_nesting.rb +295 -242
- data/lib/ecoportal/api/common/graphql/model/diffable.rb +54 -54
- data/lib/ecoportal/api/common/graphql/model.rb +17 -17
- data/lib/ecoportal/api/common/graphql/patches.rb +1 -1
- data/lib/ecoportal/api/common/graphql/query_integration.rb +45 -45
- data/lib/ecoportal/api/common/graphql.rb +16 -16
- data/lib/ecoportal/api/common.graphql.rb +8 -8
- data/lib/ecoportal/api/graphql/base/action.rb +43 -43
- data/lib/ecoportal/api/graphql/base/action_category.rb +15 -15
- 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/contractor_entity.rb +24 -24
- data/lib/ecoportal/api/graphql/base/date_time.rb +12 -12
- data/lib/ecoportal/api/graphql/base/delta_result.rb +16 -0
- data/lib/ecoportal/api/graphql/base/field.rb +12 -12
- data/lib/ecoportal/api/graphql/base/file_attachment.rb +15 -15
- 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_node.rb +14 -14
- data/lib/ecoportal/api/graphql/base/location_structure/draft/structure.rb +37 -37
- data/lib/ecoportal/api/graphql/base/location_structure/draft.rb +93 -93
- 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 +15 -14
- data/lib/ecoportal/api/graphql/base/page/section.rb +48 -12
- 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/page_info.rb +12 -12
- 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/person_member.rb +22 -22
- 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/resource.rb +13 -13
- 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/action.rb +41 -41
- 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/location_structure/draft.rb +64 -64
- data/lib/ecoportal/api/graphql/builder/location_structure.rb +40 -40
- 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 +49 -41
- 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 +68 -75
- 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/error/locations_error/fetch_nested.rb +51 -51
- data/lib/ecoportal/api/graphql/error/locations_error.rb +28 -28
- data/lib/ecoportal/api/graphql/error/locations_validation_error.rb +20 -20
- data/lib/ecoportal/api/graphql/error/validation_errors.rb +28 -28
- data/lib/ecoportal/api/graphql/error.rb +12 -12
- 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 +65 -65
- data/lib/ecoportal/api/graphql/fragment/action_category.rb +17 -17
- data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +20 -20
- 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 +19 -19
- 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 +17 -17
- data/lib/ecoportal/api/graphql/fragment/template.rb +51 -0
- data/lib/ecoportal/api/graphql/fragment.rb +40 -27
- data/lib/ecoportal/api/graphql/helpers/locations_tree.rb +41 -41
- data/lib/ecoportal/api/graphql/helpers.rb +10 -10
- data/lib/ecoportal/api/graphql/input/action/archive.rb +14 -14
- data/lib/ecoportal/api/graphql/input/action/create.rb +13 -13
- data/lib/ecoportal/api/graphql/input/action/update.rb +14 -14
- data/lib/ecoportal/api/graphql/input/action.rb +14 -14
- data/lib/ecoportal/api/graphql/input/contractor_entity/create.rb +14 -14
- data/lib/ecoportal/api/graphql/input/contractor_entity/destroy.rb +13 -13
- 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/id_diff.rb +11 -11
- data/lib/ecoportal/api/graphql/input/location_structure/apply_commands.rb +47 -47
- data/lib/ecoportal/api/graphql/input/location_structure/archive_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/delete_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/draft/add_commands.rb +49 -49
- data/lib/ecoportal/api/graphql/input/location_structure/draft/create.rb +15 -15
- data/lib/ecoportal/api/graphql/input/location_structure/draft/delete.rb +15 -15
- data/lib/ecoportal/api/graphql/input/location_structure/draft/drop_bad_commands.rb +16 -16
- data/lib/ecoportal/api/graphql/input/location_structure/draft/publish.rb +16 -16
- data/lib/ecoportal/api/graphql/input/location_structure/draft.rb +19 -19
- data/lib/ecoportal/api/graphql/input/location_structure/insert_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/move_command.rb +14 -14
- data/lib/ecoportal/api/graphql/input/location_structure/reorder_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/unarchive_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/update_command.rb +27 -27
- data/lib/ecoportal/api/graphql/input/location_structure.rb +20 -20
- 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.rb +13 -13
- 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/search_filter.rb +12 -12
- data/lib/ecoportal/api/graphql/input/search_sorter.rb +11 -11
- 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/node.rb +43 -43
- data/lib/ecoportal/api/graphql/interface/location_structure/nodes.rb +27 -28
- data/lib/ecoportal/api/graphql/interface/location_structure.rb +14 -14
- data/lib/ecoportal/api/graphql/interface.rb +11 -11
- data/lib/ecoportal/api/graphql/logic/base_model.rb +15 -13
- data/lib/ecoportal/api/graphql/logic/base_query.rb +193 -150
- 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/logic/mutation.rb +59 -59
- data/lib/ecoportal/api/graphql/logic/payload.rb +42 -42
- data/lib/ecoportal/api/graphql/logic/query.rb +23 -23
- data/lib/ecoportal/api/graphql/logic/query_array.rb +30 -30
- data/lib/ecoportal/api/graphql/logic/query_connection.rb +48 -48
- data/lib/ecoportal/api/graphql/logic.rb +18 -18
- data/lib/ecoportal/api/graphql/model/account.rb +15 -15
- data/lib/ecoportal/api/graphql/model/action.rb +22 -22
- data/lib/ecoportal/api/graphql/model/ai_summary_version.rb +10 -0
- data/lib/ecoportal/api/graphql/model/contractor_entity.rb +12 -12
- data/lib/ecoportal/api/graphql/model/field.rb +10 -10
- data/lib/ecoportal/api/graphql/model/file_attachment.rb +10 -10
- data/lib/ecoportal/api/graphql/model/file_container.rb +11 -11
- data/lib/ecoportal/api/graphql/model/location_node.rb +14 -14
- data/lib/ecoportal/api/graphql/model/location_structure/draft/structure.rb +15 -15
- data/lib/ecoportal/api/graphql/model/location_structure/draft.rb +15 -15
- data/lib/ecoportal/api/graphql/model/location_structure.rb +16 -16
- 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/data_field.rb +12 -12
- data/lib/ecoportal/api/graphql/model/page/phased/stage.rb +14 -14
- data/lib/ecoportal/api/graphql/model/page/phased.rb +82 -20
- data/lib/ecoportal/api/graphql/model/page/section.rb +12 -12
- 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/resource.rb +13 -13
- data/lib/ecoportal/api/graphql/model/template.rb +15 -0
- data/lib/ecoportal/api/graphql/model/user.rb +14 -14
- data/lib/ecoportal/api/graphql/model.rb +32 -22
- data/lib/ecoportal/api/graphql/mutation/action/archive.rb +41 -41
- data/lib/ecoportal/api/graphql/mutation/action/create.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/action/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/action.rb +14 -14
- 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 +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/destroy.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/update.rb +40 -40
- 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 +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/add_commands.rb +55 -55
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/create.rb +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/delete.rb +43 -43
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/drop_bad_commands.rb +56 -56
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/publish.rb +66 -66
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft.rb +18 -18
- data/lib/ecoportal/api/graphql/mutation/location_structure.rb +13 -13
- 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/action/archive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/action/create.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/action/update.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/action.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/ai_summary_generate.rb +12 -0
- data/lib/ecoportal/api/graphql/payload/contractor_entity/create.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/contractor_entity/destroy.rb +12 -12
- data/lib/ecoportal/api/graphql/payload/contractor_entity/update.rb +12 -12
- 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/apply_commands.rb +51 -51
- data/lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb +50 -50
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb +30 -30
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/create.rb +33 -34
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/delete.rb +30 -30
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/drop_bad_commands.rb +43 -43
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/publish.rb +63 -63
- data/lib/ecoportal/api/graphql/payload/location_structure/draft.rb +18 -18
- data/lib/ecoportal/api/graphql/payload/location_structure.rb +14 -14
- 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 +33 -33
- data/lib/ecoportal/api/graphql/query/action_categories.rb +53 -53
- data/lib/ecoportal/api/graphql/query/actions.rb +43 -43
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +53 -53
- data/lib/ecoportal/api/graphql/query/file_upload_signature.rb +76 -0
- data/lib/ecoportal/api/graphql/query/location_classifications.rb +39 -39
- 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
- data/lib/ecoportal/api-graphql.rb +10 -10
- metadata +328 -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
|
@@ -0,0 +1,332 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Diff
|
|
5
|
+
# Self-version diff: two snapshots of the SAME page/template (same Mongo ids).
|
|
6
|
+
#
|
|
7
|
+
# Because the object keeps its ids across versions, pairing is EXACT (match by id) — no
|
|
8
|
+
# equivalence matching needed. This is the "what did this ticket change to the UAT template"
|
|
9
|
+
# tool, and the basis of a portable changelog ("commit") that — once id-translated through a
|
|
10
|
+
# pairing map — can be replayed onto PROD. Cross-object diff (UAT<->PROD, page<->template)
|
|
11
|
+
# is a different, harder problem handled by the pairing engine (not here).
|
|
12
|
+
#
|
|
13
|
+
# Operates on the raw page/template doc (the JSON the gem returns for a page/template), so it
|
|
14
|
+
# is a shared, session-less capability usable by admin/troubleshooting/integration/QA alike.
|
|
15
|
+
#
|
|
16
|
+
# diff = Diff::VersionDiff.new(before_doc, after_doc)
|
|
17
|
+
# diff.changes # => [Change, ...]
|
|
18
|
+
# diff.summary # => { added:, removed:, changed:, moved:, total: }
|
|
19
|
+
# diff.changelog # => ["~ field 'Severity' ...", ...]
|
|
20
|
+
#
|
|
21
|
+
# MODALITIES — pass a `Diff::Strategy` to select a scope / move-sensitivity. The default
|
|
22
|
+
# strategy (id-paired, structural, move-aware, changelog) reproduces the pre-Phase-4 behaviour
|
|
23
|
+
# exactly, so `VersionDiff.new(before, after).changes` is unchanged. A narrower scope
|
|
24
|
+
# (`:config_only`, `:data_migration`) or a move-insensitive strategy filters the SAME computed
|
|
25
|
+
# change-set — the pairing is still by-id here (`VersionDiff` is the `:id` pairing front-end).
|
|
26
|
+
# Cross-object pairings (:genome/:type_label/:assisted) are handled by `CrossObjectDiff`.
|
|
27
|
+
class VersionDiff
|
|
28
|
+
# Typed field-configuration properties that this diff EMITS, keyed by the field's
|
|
29
|
+
# `__typename`. Each entry maps a `byType` input key (the sub-hash the schema's
|
|
30
|
+
# `editFieldConfiguration.byType` accepts) to the list of doc property names that make up
|
|
31
|
+
# that sub-hash. Only pairs where the READ property name matches the WRITE (byType) input
|
|
32
|
+
# key EXACTLY are listed here — this diff never fabricates a config change it cannot map
|
|
33
|
+
# back to a real command input.
|
|
34
|
+
#
|
|
35
|
+
# Deliberately conservative: e.g. PlainText carries `multiline` in the read model but the
|
|
36
|
+
# `plainText` byType input has no `multiline` key (it exposes `maxLength`), so PlainText
|
|
37
|
+
# config is NOT emitted here (it would be unmappable). Likewise `required` has no
|
|
38
|
+
# editFieldConfiguration key at all, so a `required` flip is not a config change we emit.
|
|
39
|
+
BYTYPE_CONFIG = {
|
|
40
|
+
'Gauge' => { gauge: %w[max] },
|
|
41
|
+
'Select' => { select: %w[dataType multiple flat other otherDesc] },
|
|
42
|
+
'Date' => { date: %w[showTime pastOnly todayButton] }
|
|
43
|
+
}.freeze
|
|
44
|
+
|
|
45
|
+
def initialize(before_doc, after_doc, strategy: Strategy.default)
|
|
46
|
+
@before = before_doc || {}
|
|
47
|
+
@after = after_doc || {}
|
|
48
|
+
@strategy = strategy || Strategy.default
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
# The change-set, filtered by the strategy's scope + move-sensitivity. The full set is
|
|
52
|
+
# computed once (`all_changes`); the strategy decides what survives. The default strategy
|
|
53
|
+
# keeps everything (the historical behaviour).
|
|
54
|
+
def changes
|
|
55
|
+
@changes ||= @strategy.filter(all_changes)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def summary
|
|
59
|
+
by_op = changes.group_by(&:op)
|
|
60
|
+
{
|
|
61
|
+
added: by_op.fetch(:added, []).size,
|
|
62
|
+
removed: by_op.fetch(:removed, []).size,
|
|
63
|
+
changed: by_op.fetch(:changed, []).size,
|
|
64
|
+
moved: by_op.fetch(:moved, []).size,
|
|
65
|
+
total: changes.size
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
def changelog
|
|
70
|
+
changes.map(&:description)
|
|
71
|
+
end
|
|
72
|
+
|
|
73
|
+
def to_h
|
|
74
|
+
{ summary: summary, changes: changes.map(&:to_h) }
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
private
|
|
78
|
+
|
|
79
|
+
# The complete id-paired change-set (all kinds, all ops) before any strategy filtering.
|
|
80
|
+
def all_changes
|
|
81
|
+
stage_changes + section_changes + field_changes + option_changes +
|
|
82
|
+
field_config_changes + gauge_stop_changes
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# Generic set-diff over an index {id => info}. Emits added/removed (label/path pulled from
|
|
86
|
+
# info via the given procs) and delegates matched-id comparison to the block.
|
|
87
|
+
#
|
|
88
|
+
# `parent:` (optional) is a proc mapping an entry's info to the id of its OWNING node — the
|
|
89
|
+
# section id for a field, the stage id for a section. Recorded on ADDED changes as
|
|
90
|
+
# `parent_id` so the synthesiser can wire the structural back-ref (addField.sectionId /
|
|
91
|
+
# addStageSection.stageId), threading through a placeholder when the parent is created in
|
|
92
|
+
# the same batch. nil (default) means no parent id is known/recorded — the historical
|
|
93
|
+
# behaviour, unchanged.
|
|
94
|
+
def diff_index(kind, before_idx, after_idx, label:, path:, parent: nil, owner: nil, &compare)
|
|
95
|
+
procs = { label: label, path: path, parent: parent, owner: owner }
|
|
96
|
+
removed = (before_idx.keys - after_idx.keys).map { |id| removed_change(kind, id, before_idx[id], procs) }
|
|
97
|
+
added = (after_idx.keys - before_idx.keys).map { |id| added_change(kind, id, after_idx[id], procs) }
|
|
98
|
+
matched = (before_idx.keys & after_idx.keys).flat_map { |id| Array(compare.call(id, before_idx[id], after_idx[id])) }
|
|
99
|
+
removed + added + matched
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def removed_change(kind, id, info, procs)
|
|
103
|
+
Change.new(op: :removed, kind: kind, id: id, label: procs[:label].call(info), path: procs[:path].call(info))
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def added_change(kind, id, info, procs)
|
|
107
|
+
Change.new(op: :added, kind: kind, id: id, label: procs[:label].call(info), path: procs[:path].call(info),
|
|
108
|
+
parent_id: procs[:parent]&.call(info), owner_id: procs[:owner]&.call(info))
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def stage_changes
|
|
112
|
+
diff_index(:stage, index_stages(@before), index_stages(@after),
|
|
113
|
+
label: ->(s) { s['name'] }, path: ->(s) { s['name'] }) do |id, b, a|
|
|
114
|
+
cmp = []
|
|
115
|
+
cmp << changed(:stage, id, a['name'], a['name'], 'name', b['name'], a['name']) if b['name'] != a['name']
|
|
116
|
+
cmp << moved(:stage, id, a['name'], 'ordering', b['ordering'], a['ordering']) if b['ordering'] != a['ordering']
|
|
117
|
+
cmp
|
|
118
|
+
end
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def section_changes
|
|
122
|
+
diff_index(:section, index_sections(@before), index_sections(@after),
|
|
123
|
+
label: ->(s) { s[:heading] }, path: ->(s) { s[:path] },
|
|
124
|
+
parent: ->(s) { s[:stage_id] }) do |id, b, a|
|
|
125
|
+
cmp = []
|
|
126
|
+
cmp << changed(:section, id, a[:heading], a[:path], 'heading', b[:heading], a[:heading]) if b[:heading] != a[:heading]
|
|
127
|
+
cmp << moved(:section, id, a[:heading], 'stage', b[:stage], a[:stage]) if b[:stage] != a[:stage]
|
|
128
|
+
cmp
|
|
129
|
+
end
|
|
130
|
+
end
|
|
131
|
+
|
|
132
|
+
def field_changes
|
|
133
|
+
diff_index(:field, index_fields(@before), index_fields(@after),
|
|
134
|
+
label: ->(f) { f[:label] }, path: ->(f) { f[:path] },
|
|
135
|
+
parent: ->(f) { f[:section_id] }, owner: ->(f) { f[:stage_id] }, &method(:compare_field))
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
def compare_field(id, before, after)
|
|
139
|
+
cmp = []
|
|
140
|
+
cmp << changed(:field, id, after[:label], after[:path], 'label', before[:label], after[:label]) if before[:label] != after[:label]
|
|
141
|
+
cmp << changed(:field, id, after[:label], after[:path], 'type', before[:type], after[:type]) if before[:type] != after[:type]
|
|
142
|
+
cmp << moved(:field, id, after[:label], 'section', before[:section], after[:section]) if before[:section] != after[:section]
|
|
143
|
+
cmp
|
|
144
|
+
end
|
|
145
|
+
|
|
146
|
+
def option_changes
|
|
147
|
+
bf = index_fields(@before)
|
|
148
|
+
af = index_fields(@after)
|
|
149
|
+
(bf.keys & af.keys).flat_map do |fid|
|
|
150
|
+
options_diff(fid, af[fid][:path], bf[fid][:field], af[fid][:field])
|
|
151
|
+
end
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def options_diff(field_id, path, before_field, after_field)
|
|
155
|
+
diff_index(:option, index_options(before_field), index_options(after_field),
|
|
156
|
+
label: ->(o) { o[:label] }, path: ->(_o) { path }) do |k, b, a|
|
|
157
|
+
cmp = []
|
|
158
|
+
cmp << changed(:option, k, a[:label], path, 'label', b[:label], a[:label], field_id) if b[:label] != a[:label]
|
|
159
|
+
cmp << changed(:option, k, a[:label], path, 'weight', b[:weight], a[:weight], field_id) if b[:weight] != a[:weight]
|
|
160
|
+
cmp
|
|
161
|
+
end.each { |c| c.parent_id ||= field_id }
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
# --- typed field configuration (byType) ---------------------------
|
|
165
|
+
|
|
166
|
+
# Per-type field-configuration changes (the `byType` body of editFieldConfiguration).
|
|
167
|
+
# Matched by retained field id (self-version). For each field type in BYTYPE_CONFIG, emit
|
|
168
|
+
# a `:field_config` change per changed property, carrying the byType key so the synthesiser
|
|
169
|
+
# can nest it under the right sub-hash. Properties absent from BYTYPE_CONFIG are ignored
|
|
170
|
+
# here (unmappable → never fabricated).
|
|
171
|
+
def field_config_changes
|
|
172
|
+
bf = index_fields(@before)
|
|
173
|
+
af = index_fields(@after)
|
|
174
|
+
(bf.keys & af.keys).flat_map do |fid|
|
|
175
|
+
config_diff_for_field(fid, bf[fid], af[fid])
|
|
176
|
+
end
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
def config_diff_for_field(field_id, before_info, after_info)
|
|
180
|
+
type = after_info[:type]
|
|
181
|
+
return [] if before_info[:type] != type # a type change is handled/blocked elsewhere
|
|
182
|
+
|
|
183
|
+
(BYTYPE_CONFIG[type] || {}).flat_map do |by_type, props|
|
|
184
|
+
props.filter_map do |prop|
|
|
185
|
+
bv = before_info[:field][prop]
|
|
186
|
+
av = after_info[:field][prop]
|
|
187
|
+
next if bv == av
|
|
188
|
+
|
|
189
|
+
config_change(field_id, after_info, by_type, prop, bv, av)
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
|
|
194
|
+
def config_change(field_id, after_info, by_type, prop, before, after) # rubocop:disable Metrics/ParameterLists
|
|
195
|
+
Change.new(op: :changed, kind: :field_config, id: field_id, label: after_info[:label],
|
|
196
|
+
path: after_info[:path], attribute: prop, before: before, after: after,
|
|
197
|
+
parent_id: field_id, by_type: by_type)
|
|
198
|
+
end
|
|
199
|
+
|
|
200
|
+
# --- gauge stops ---------------------------------------------------
|
|
201
|
+
|
|
202
|
+
# Gauge fields carry an ordered list of `stops` ({ id, threshold, color }). Diff them per
|
|
203
|
+
# gauge field, matched by retained stop id (self-version). Added / removed / changed
|
|
204
|
+
# (threshold or color). parent_id = the gauge field id (the stop commands address it).
|
|
205
|
+
def gauge_stop_changes
|
|
206
|
+
bf = index_fields(@before)
|
|
207
|
+
af = index_fields(@after)
|
|
208
|
+
(bf.keys & af.keys).flat_map do |fid|
|
|
209
|
+
next [] unless af[fid][:type] == 'Gauge' && bf[fid][:type] == 'Gauge'
|
|
210
|
+
|
|
211
|
+
stops_diff(fid, af[fid][:path], bf[fid][:field], af[fid][:field])
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Explicit add/remove/change diff (NOT the generic diff_index): an ADDED stop must carry
|
|
216
|
+
# its full spec (threshold + color) on the Change so addGaugeFieldStop can be built without
|
|
217
|
+
# re-reading the doc.
|
|
218
|
+
def stops_diff(field_id, path, before_field, after_field)
|
|
219
|
+
before_idx = index_stops(before_field)
|
|
220
|
+
after_idx = index_stops(after_field)
|
|
221
|
+
|
|
222
|
+
removed = (before_idx.keys - after_idx.keys).map do |sid|
|
|
223
|
+
Change.new(op: :removed, kind: :gauge_stop, id: sid, label: before_idx[sid][:label],
|
|
224
|
+
path: path, parent_id: field_id)
|
|
225
|
+
end
|
|
226
|
+
added = (after_idx.keys - before_idx.keys).map do |sid|
|
|
227
|
+
s = after_idx[sid]
|
|
228
|
+
Change.new(op: :added, kind: :gauge_stop, id: sid, label: s[:label], path: path,
|
|
229
|
+
parent_id: field_id, after: { threshold: s[:threshold], color: s[:color] })
|
|
230
|
+
end
|
|
231
|
+
changed = (before_idx.keys & after_idx.keys).flat_map do |sid|
|
|
232
|
+
stop_attr_changes(field_id, sid, path, before_idx[sid], after_idx[sid])
|
|
233
|
+
end
|
|
234
|
+
removed + added + changed
|
|
235
|
+
end
|
|
236
|
+
|
|
237
|
+
def stop_attr_changes(field_id, stop_id, path, before, after)
|
|
238
|
+
cmp = []
|
|
239
|
+
cmp << stop_changed(field_id, stop_id, path, 'threshold', before[:threshold], after[:threshold]) if before[:threshold] != after[:threshold]
|
|
240
|
+
cmp << stop_changed(field_id, stop_id, path, 'color', before[:color], after[:color]) if before[:color] != after[:color]
|
|
241
|
+
cmp
|
|
242
|
+
end
|
|
243
|
+
|
|
244
|
+
def stop_changed(field_id, stop_id, path, attribute, before, after) # rubocop:disable Metrics/ParameterLists
|
|
245
|
+
Change.new(op: :changed, kind: :gauge_stop, id: stop_id, label: "#{attribute} #{after}".strip,
|
|
246
|
+
path: path, attribute: attribute, before: before, after: after, parent_id: field_id)
|
|
247
|
+
end
|
|
248
|
+
|
|
249
|
+
# Stops keyed by id, carrying threshold + color (an ADD needs both to build the command).
|
|
250
|
+
def index_stops(field)
|
|
251
|
+
Array(field['stops']).each_with_object({}) do |s, h|
|
|
252
|
+
next unless s.is_a?(Hash) && s['id']
|
|
253
|
+
|
|
254
|
+
h[s['id']] = { threshold: s['threshold'], color: s['color'],
|
|
255
|
+
label: "#{s['threshold']} #{s['color']}".strip }
|
|
256
|
+
end
|
|
257
|
+
end
|
|
258
|
+
|
|
259
|
+
# --- indexing helpers ---------------------------------------------
|
|
260
|
+
|
|
261
|
+
def index_stages(doc)
|
|
262
|
+
stages(doc).each_with_object({}) { |st, h| h[st['id']] = st if st['id'] }
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
def index_sections(doc)
|
|
266
|
+
out = {}
|
|
267
|
+
stages(doc).each do |st|
|
|
268
|
+
sections(st).each do |sec|
|
|
269
|
+
next unless sec['id']
|
|
270
|
+
|
|
271
|
+
out[sec['id']] = { heading: sec['heading'], stage: st['name'], stage_id: st['id'],
|
|
272
|
+
path: "#{st['name']} / #{sec['heading']}" }
|
|
273
|
+
end
|
|
274
|
+
end
|
|
275
|
+
out
|
|
276
|
+
end
|
|
277
|
+
|
|
278
|
+
def index_fields(doc)
|
|
279
|
+
out = {}
|
|
280
|
+
stages(doc).each do |st|
|
|
281
|
+
sections(st).each do |sec|
|
|
282
|
+
fields(sec).each do |f|
|
|
283
|
+
next unless f['id']
|
|
284
|
+
|
|
285
|
+
out[f['id']] = {
|
|
286
|
+
field: f, label: f['label'], type: f['__typename'] || f['type'],
|
|
287
|
+
section: sec['heading'], section_id: sec['id'], stage_id: st['id'],
|
|
288
|
+
path: "#{st['name']} / #{sec['heading']} / #{f['label']}"
|
|
289
|
+
}
|
|
290
|
+
end
|
|
291
|
+
end
|
|
292
|
+
end
|
|
293
|
+
out
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Options keyed by id when present, else by value (primary) / name (auxiliary) — the
|
|
297
|
+
# correct select-option identity (NOT genome).
|
|
298
|
+
def index_options(field)
|
|
299
|
+
Array(field['options']).each_with_object({}) do |o, h|
|
|
300
|
+
next unless o.is_a?(Hash)
|
|
301
|
+
|
|
302
|
+
key = o['id'] || o['value'] || o['label'] || o['name']
|
|
303
|
+
h[key] = { label: o['label'] || o['name'] || o['value'], weight: o['weight'] }
|
|
304
|
+
end
|
|
305
|
+
end
|
|
306
|
+
|
|
307
|
+
def stages(doc)
|
|
308
|
+
Array(doc['stages'])
|
|
309
|
+
end
|
|
310
|
+
|
|
311
|
+
def sections(stage)
|
|
312
|
+
Array(stage['sections'])
|
|
313
|
+
end
|
|
314
|
+
|
|
315
|
+
def fields(section)
|
|
316
|
+
Array(section['dataFields']) + Array(section['leftDataFields']) + Array(section['rightDataFields'])
|
|
317
|
+
end
|
|
318
|
+
|
|
319
|
+
def changed(kind, id, label, path, attribute, before, after, parent_id = nil) # rubocop:disable Metrics/ParameterLists
|
|
320
|
+
Change.new(op: :changed, kind: kind, id: id, label: label, path: path,
|
|
321
|
+
attribute: attribute, before: before, after: after, parent_id: parent_id)
|
|
322
|
+
end
|
|
323
|
+
|
|
324
|
+
def moved(kind, id, label, attribute, before, after) # rubocop:disable Metrics/ParameterLists
|
|
325
|
+
Change.new(op: :moved, kind: kind, id: id, label: label,
|
|
326
|
+
attribute: attribute, before: before, after: after)
|
|
327
|
+
end
|
|
328
|
+
end
|
|
329
|
+
end
|
|
330
|
+
end
|
|
331
|
+
end
|
|
332
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
# Diff engines over the page/template model.
|
|
5
|
+
#
|
|
6
|
+
# `VersionDiff` handles the EASY, exact case — two snapshots of the SAME object (same ids),
|
|
7
|
+
# e.g. a UAT template at version N vs N+1 ("what did this ticket change"). The HARD case —
|
|
8
|
+
# pairing two DIFFERENT objects with different ids (UAT<->PROD, page<->template) — is an
|
|
9
|
+
# equivalence-matching problem handled by `Diff::Pairing` (multi-signal + learning ledger).
|
|
10
|
+
#
|
|
11
|
+
# `CommandSynthesizer` turns a change-set into an ordered WorkflowCommand batch (the replayable
|
|
12
|
+
# "commit"); `IdResolver` fills in move-target ids from a target doc; `Deploy` orchestrates
|
|
13
|
+
# diff -> commands -> apply, gating on the honest `unsupported` list.
|
|
14
|
+
#
|
|
15
|
+
# `Strategy` makes diffing a COMPOSABLE family (pairing x scope x move-sensitivity x intent);
|
|
16
|
+
# `CrossObjectDiff` is the cross-object front-end (pairs fields via `Pairing::Engine`, then
|
|
17
|
+
# emits the same `Change` output against the pairing map).
|
|
18
|
+
module Diff
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
require_relative 'diff/change'
|
|
25
|
+
require_relative 'diff/strategy'
|
|
26
|
+
require_relative 'diff/version_diff'
|
|
27
|
+
require_relative 'diff/id_resolver'
|
|
28
|
+
require_relative 'diff/command_synthesizer'
|
|
29
|
+
require_relative 'diff/pairing/ledger'
|
|
30
|
+
require_relative 'diff/pairing/candidate'
|
|
31
|
+
require_relative 'diff/pairing/signals'
|
|
32
|
+
require_relative 'diff/pairing/engine'
|
|
33
|
+
require_relative 'diff/cross_object_diff'
|
|
34
|
+
require_relative 'diff/deploy'
|
|
@@ -1,51 +1,51 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Error
|
|
5
|
-
class LocationsError < Logic::BaseModel
|
|
6
|
-
module FetchNested
|
|
7
|
-
def locations_error_doc
|
|
8
|
-
return unless locations_error?
|
|
9
|
-
|
|
10
|
-
if loc_err_conflicting_ids?
|
|
11
|
-
{
|
|
12
|
-
conflictingIds: loc_err_conflicting_ids.doc
|
|
13
|
-
}
|
|
14
|
-
elsif validationErrors?
|
|
15
|
-
{
|
|
16
|
-
validationErrors: validationErrors.doc
|
|
17
|
-
}
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def locations_error?
|
|
22
|
-
return false if error.nil?
|
|
23
|
-
|
|
24
|
-
!error.empty?
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def loc_err_conflicting_ids?
|
|
28
|
-
loc_err_conflicting_ids.any?
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
def validationErrors?
|
|
32
|
-
validationErrors.any?
|
|
33
|
-
end
|
|
34
|
-
|
|
35
|
-
def loc_err_conflicting_ids
|
|
36
|
-
return [] unless (err = error)
|
|
37
|
-
|
|
38
|
-
err.conflictingIds || []
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def validationErrors
|
|
42
|
-
return [] unless (err = error)
|
|
43
|
-
|
|
44
|
-
err.validationErrors || []
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Error
|
|
5
|
+
class LocationsError < Logic::BaseModel
|
|
6
|
+
module FetchNested
|
|
7
|
+
def locations_error_doc
|
|
8
|
+
return unless locations_error?
|
|
9
|
+
|
|
10
|
+
if loc_err_conflicting_ids?
|
|
11
|
+
{
|
|
12
|
+
conflictingIds: loc_err_conflicting_ids.doc
|
|
13
|
+
}
|
|
14
|
+
elsif validationErrors?
|
|
15
|
+
{
|
|
16
|
+
validationErrors: validationErrors.doc
|
|
17
|
+
}
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def locations_error?
|
|
22
|
+
return false if error.nil?
|
|
23
|
+
|
|
24
|
+
!error.empty?
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def loc_err_conflicting_ids?
|
|
28
|
+
loc_err_conflicting_ids.any?
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
def validationErrors?
|
|
32
|
+
validationErrors.any?
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def loc_err_conflicting_ids
|
|
36
|
+
return [] unless (err = error)
|
|
37
|
+
|
|
38
|
+
err.conflictingIds || []
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def validationErrors
|
|
42
|
+
return [] unless (err = error)
|
|
43
|
+
|
|
44
|
+
err.validationErrors || []
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Error
|
|
5
|
-
class LocationsError < Logic::BaseModel
|
|
6
|
-
read_only!
|
|
7
|
-
|
|
8
|
-
passthrough :type, :message
|
|
9
|
-
passarray :conflictingIds
|
|
10
|
-
embeds_many :validationErrors, klass: LocationsValidationError
|
|
11
|
-
|
|
12
|
-
def empty?
|
|
13
|
-
return false unless conflictingIds.empty?
|
|
14
|
-
|
|
15
|
-
validationErrors.empty?
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def any?
|
|
19
|
-
!empty?
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
require_relative 'locations_error/fetch_nested'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Error
|
|
5
|
+
class LocationsError < Logic::BaseModel
|
|
6
|
+
read_only!
|
|
7
|
+
|
|
8
|
+
passthrough :type, :message
|
|
9
|
+
passarray :conflictingIds
|
|
10
|
+
embeds_many :validationErrors, klass: LocationsValidationError
|
|
11
|
+
|
|
12
|
+
def empty?
|
|
13
|
+
return false unless conflictingIds.empty?
|
|
14
|
+
|
|
15
|
+
validationErrors.empty?
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def any?
|
|
19
|
+
!empty?
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
require_relative 'locations_error/fetch_nested'
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Error
|
|
5
|
-
class LocationsValidationError < Logic::BaseModel
|
|
6
|
-
read_only!
|
|
7
|
-
|
|
8
|
-
passthrough :error, :message, :property
|
|
9
|
-
|
|
10
|
-
def empty?
|
|
11
|
-
return false unless error.nil?
|
|
12
|
-
return false unless message.nil?
|
|
13
|
-
|
|
14
|
-
property.nil?
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
20
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Error
|
|
5
|
+
class LocationsValidationError < Logic::BaseModel
|
|
6
|
+
read_only!
|
|
7
|
+
|
|
8
|
+
passthrough :error, :message, :property
|
|
9
|
+
|
|
10
|
+
def empty?
|
|
11
|
+
return false unless error.nil?
|
|
12
|
+
return false unless message.nil?
|
|
13
|
+
|
|
14
|
+
property.nil?
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Error
|
|
5
|
-
class ValidationErrors < Logic::BaseModel
|
|
6
|
-
include Enumerable
|
|
7
|
-
|
|
8
|
-
passthrough :details
|
|
9
|
-
passarray :fullMessages
|
|
10
|
-
|
|
11
|
-
def empty?
|
|
12
|
-
count < 1
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def any?
|
|
16
|
-
!empty?
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def each(&block)
|
|
20
|
-
return to_enum(:each) unless block
|
|
21
|
-
|
|
22
|
-
fullMessages.each(&block)
|
|
23
|
-
end
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Error
|
|
5
|
+
class ValidationErrors < Logic::BaseModel
|
|
6
|
+
include Enumerable
|
|
7
|
+
|
|
8
|
+
passthrough :details
|
|
9
|
+
passarray :fullMessages
|
|
10
|
+
|
|
11
|
+
def empty?
|
|
12
|
+
count < 1
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def any?
|
|
16
|
+
!empty?
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def each(&block)
|
|
20
|
+
return to_enum(:each) unless block
|
|
21
|
+
|
|
22
|
+
fullMessages.each(&block)
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Error
|
|
5
|
-
end
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
require_relative 'error/locations_validation_error'
|
|
11
|
-
require_relative 'error/validation_errors'
|
|
12
|
-
require_relative 'error/locations_error'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Error
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
require_relative 'error/locations_validation_error'
|
|
11
|
+
require_relative 'error/validation_errors'
|
|
12
|
+
require_relative 'error/locations_error'
|