ecoportal-api-graphql 2.0.0 → 2.2.0
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 +363 -1
- 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 +85 -2
- data/lib/ecoportal/api/common/graphql/model/as_input.rb +54 -54
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +49 -49
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +188 -188
- 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 -295
- 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_category.rb +15 -15
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +1 -1
- 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 -16
- 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/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/page/data_field/actions_list.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/ai_summary.rb +18 -18
- data/lib/ecoportal/api/graphql/base/page/data_field/checklist.rb +29 -29
- data/lib/ecoportal/api/graphql/base/page/data_field/cross_reference.rb +1 -1
- data/lib/ecoportal/api/graphql/base/page/data_field/date_field.rb +23 -23
- data/lib/ecoportal/api/graphql/base/page/data_field/geo.rb +24 -24
- data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +1 -1
- data/lib/ecoportal/api/graphql/base/page/data_field/law.rb +8 -8
- data/lib/ecoportal/api/graphql/base/page/data_field/mailbox.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/plain_text.rb +17 -17
- data/lib/ecoportal/api/graphql/base/page/data_field/rich_text.rb +26 -26
- data/lib/ecoportal/api/graphql/base/page/data_field/signature.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/smart_fill.rb +17 -17
- data/lib/ecoportal/api/graphql/base/page/data_field/table.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/tag_field.rb +21 -21
- data/lib/ecoportal/api/graphql/base/page/phased/stage.rb +51 -0
- data/lib/ecoportal/api/graphql/base/page/phased.rb +15 -15
- data/lib/ecoportal/api/graphql/base/page/section.rb +48 -48
- data/lib/ecoportal/api/graphql/base/page_info.rb +12 -12
- data/lib/ecoportal/api/graphql/base/pages_workflow/operation_interface.rb +39 -39
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/assign_to.rb +27 -27
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/send_notification.rb +30 -30
- data/lib/ecoportal/api/graphql/base/pages_workflow/recipient_config.rb +34 -34
- data/lib/ecoportal/api/graphql/base/pages_workflow.rb +35 -35
- data/lib/ecoportal/api/graphql/base/person_member.rb +22 -22
- data/lib/ecoportal/api/graphql/base/preview_page.rb +23 -23
- data/lib/ecoportal/api/graphql/base/register.rb +1 -1
- data/lib/ecoportal/api/graphql/base/resource.rb +13 -13
- data/lib/ecoportal/api/graphql/base/template/change_log_entry.rb +118 -0
- data/lib/ecoportal/api/graphql/base/template.rb +2 -0
- data/lib/ecoportal/api/graphql/builder/action.rb +41 -41
- 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/register/preset_view.rb +84 -84
- data/lib/ecoportal/api/graphql/builder/register.rb +49 -49
- data/lib/ecoportal/api/graphql/builder/template.rb +28 -0
- data/lib/ecoportal/api/graphql/builder/template_builder.rb +21 -2
- data/lib/ecoportal/api/graphql/compat/page_reference.rb +23 -23
- data/lib/ecoportal/api/graphql/compat/registers.rb +84 -84
- data/lib/ecoportal/api/graphql/compat/search_results.rb +33 -33
- data/lib/ecoportal/api/graphql/compat.rb +17 -17
- data/lib/ecoportal/api/graphql/concerns/data_field_access.rb +71 -71
- data/lib/ecoportal/api/graphql/concerns/fragment_definitions.rb +68 -68
- data/lib/ecoportal/api/graphql/concerns/snake_camel_access.rb +60 -60
- data/lib/ecoportal/api/graphql/connection/preset_view.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/template_change_log.rb +19 -0
- data/lib/ecoportal/api/graphql/connection.rb +1 -0
- data/lib/ecoportal/api/graphql/diff/change.rb +7 -2
- data/lib/ecoportal/api/graphql/diff/command_synthesizer.rb +19 -1
- data/lib/ecoportal/api/graphql/diff/version_diff.rb +13 -6
- 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.rb +10 -10
- 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/locations_error.rb +19 -19
- data/lib/ecoportal/api/graphql/fragment/page.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/pages/common_page_union.rb +2 -0
- data/lib/ecoportal/api/graphql/fragment/pages.rb +15 -15
- data/lib/ecoportal/api/graphql/fragment/pagination.rb +17 -17
- data/lib/ecoportal/api/graphql/fragment/template_change_log.rb +102 -0
- data/lib/ecoportal/api/graphql/fragment.rb +1 -0
- 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.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/delta_input.rb +16 -16
- data/lib/ecoportal/api/graphql/input/id_diff.rb +11 -11
- 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/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 +21 -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.rb +20 -20
- data/lib/ecoportal/api/graphql/input/page/archive.rb +14 -14
- data/lib/ecoportal/api/graphql/input/page/build_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/create_draft.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/create_from_template.rb +18 -18
- data/lib/ecoportal/api/graphql/input/page/delete_draft.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/publish_draft.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/review_task.rb +27 -14
- data/lib/ecoportal/api/graphql/input/page/unarchive.rb +14 -14
- data/lib/ecoportal/api/graphql/input/page.rb +26 -26
- data/lib/ecoportal/api/graphql/input/preset_view/create.rb +18 -18
- data/lib/ecoportal/api/graphql/input/preset_view/permission.rb +16 -16
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +1 -1
- data/lib/ecoportal/api/graphql/input/preset_view.rb +14 -14
- data/lib/ecoportal/api/graphql/input/register/create.rb +18 -18
- data/lib/ecoportal/api/graphql/input/register/update.rb +15 -15
- data/lib/ecoportal/api/graphql/input/register.rb +13 -13
- data/lib/ecoportal/api/graphql/input/search.rb +13 -13
- data/lib/ecoportal/api/graphql/input/search_conf/ai_generator.rb +234 -234
- 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/workflow_command/add_action_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_comment_tagging_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_field.rb +10 -9
- data/lib/ecoportal/api/graphql/input/workflow_command/add_force.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_field_config.rb +23 -23
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_helper.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_action_type.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_filter.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_people_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_task_config.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback.rb +23 -23
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback_action.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_select_field_option.rb +25 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task_assignment_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_workflow_callback.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/collapse_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_creator_permissions.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_default_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +7 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_force.rb +21 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_gauge_field_stop.rb +19 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_field_config.rb +19 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_helper.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_reminder.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_required_sign_offs.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_comment_tagging.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_task_assignment.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_scheduled_callback.rb +22 -22
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_section_header.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_select_field_option.rb +23 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_task_due.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_basic_settings.rb +7 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_trigger.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/expand_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/contractor_entities.rb +28 -24
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +8 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/gauge.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/location_field.rb +24 -24
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +8 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/signature.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/table.rb +25 -25
- data/lib/ecoportal/api/graphql/input/workflow_command/manage_copy_page_configuration.rb +47 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_action_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_callback.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_comment_tagging_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_force.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_helper.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_action_type.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_filter.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_people_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_task_config.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_scheduled_callback.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_assignment_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_due.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_priority_level.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +3 -0
- data/lib/ecoportal/api/graphql/interface/base_page.rb +14 -0
- data/lib/ecoportal/api/graphql/interface/location_structure/node.rb +43 -43
- 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 -15
- data/lib/ecoportal/api/graphql/logic/base_query.rb +260 -193
- 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 -10
- 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 +9 -0
- data/lib/ecoportal/api/graphql/model/page/basic.rb +14 -14
- 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 +17 -0
- data/lib/ecoportal/api/graphql/model/page/section.rb +12 -12
- data/lib/ecoportal/api/graphql/model/page_union.rb +21 -21
- data/lib/ecoportal/api/graphql/model/pages_workflow.rb +20 -20
- data/lib/ecoportal/api/graphql/model/preset_view.rb +10 -10
- data/lib/ecoportal/api/graphql/model/preview_page.rb +10 -10
- data/lib/ecoportal/api/graphql/model/register.rb +10 -10
- data/lib/ecoportal/api/graphql/model/resource.rb +13 -13
- data/lib/ecoportal/api/graphql/model/template/change_log_entry.rb +19 -0
- data/lib/ecoportal/api/graphql/model/template.rb +4 -1
- data/lib/ecoportal/api/graphql/model/user.rb +14 -14
- 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 +1 -1
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/ai_summary.rb +13 -13
- 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/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 +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/archive.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/build_from_template.rb +50 -50
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/create_from_template.rb +43 -43
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/unarchive.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page.rb +28 -28
- data/lib/ecoportal/api/graphql/mutation/preset_view/create.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/preset_view/permission.rb +37 -37
- data/lib/ecoportal/api/graphql/mutation/preset_view/update.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/preset_view.rb +15 -15
- data/lib/ecoportal/api/graphql/mutation/register/create.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/register/update.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/register.rb +14 -14
- 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 -12
- 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/kickstand/bulk_update_jobs.rb +2 -2
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb +2 -2
- 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/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 +1 -1
- data/lib/ecoportal/api/graphql/payload/page/archive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/build_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/create_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/unarchive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/update.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/register.rb +1 -1
- 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 -76
- data/lib/ecoportal/api/graphql/query/location_classifications.rb +39 -39
- data/lib/ecoportal/api/graphql/query/page_delta.rb +47 -47
- data/lib/ecoportal/api/graphql/query/pages.rb +59 -59
- data/lib/ecoportal/api/graphql/query/person_members.rb +76 -0
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +1 -1
- data/lib/ecoportal/api/graphql/query/register_preview_pages.rb +83 -83
- data/lib/ecoportal/api/graphql/query/template_change_log.rb +118 -0
- data/lib/ecoportal/api/graphql/query/templates.rb +53 -53
- data/lib/ecoportal/api/graphql/query.rb +2 -0
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- data/lib/ecoportal/api-graphql.rb +10 -10
- metadata +10 -8
- data/lib/ecoportal/api/common/graphql/CLAUDE.md +0 -36
- data/lib/ecoportal/api/common/graphql/model/CLAUDE.md +0 -28
- data/lib/ecoportal/api/graphql/CLAUDE.md +0 -37
- data/lib/ecoportal/api/graphql/base/CLAUDE.md +0 -50
- data/lib/ecoportal/api/graphql/builder/CLAUDE.md +0 -65
|
@@ -1,60 +1,60 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Concerns
|
|
5
|
-
# Provides snake_case access to camelCase methods on GraphQL model objects.
|
|
6
|
-
# eco-helpers scripts (and v2 models) use snake_case, GraphQL uses camelCase.
|
|
7
|
-
#
|
|
8
|
-
# Converts any snake_case method call to its camelCase equivalent and delegates.
|
|
9
|
-
# Works for both readers (external_id → externalId) and writers (time_zone= → timeZone=).
|
|
10
|
-
#
|
|
11
|
-
# Examples:
|
|
12
|
-
# page.external_id → page.externalId
|
|
13
|
-
# page.patch_ver → page.patchVer
|
|
14
|
-
# page.source_template_id → page.sourceTemplateId
|
|
15
|
-
# page.other_tags = ['x'] → page.otherTags = ['x']
|
|
16
|
-
module SnakeCamelAccess
|
|
17
|
-
def method_missing(method_name, *args, &block)
|
|
18
|
-
str = method_name.to_s
|
|
19
|
-
setter = str.end_with?('=')
|
|
20
|
-
base = setter ? str[0..-2] : str
|
|
21
|
-
camel = snake_to_camel(base)
|
|
22
|
-
|
|
23
|
-
# Only intercept if conversion actually changed something and target exists
|
|
24
|
-
if camel != base
|
|
25
|
-
target = setter ? :"#{camel}=" : camel.to_sym
|
|
26
|
-
return send(target, *args, &block) if respond_to?(target)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
super
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def respond_to_missing?(method_name, include_private = false)
|
|
33
|
-
str = method_name.to_s
|
|
34
|
-
setter = str.end_with?('=')
|
|
35
|
-
base = setter ? str[0..-2] : str
|
|
36
|
-
camel = snake_to_camel(base)
|
|
37
|
-
|
|
38
|
-
if camel != base
|
|
39
|
-
target = setter ? :"#{camel}=" : camel.to_sym
|
|
40
|
-
return true if respond_to?(target, include_private)
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
super
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
private
|
|
47
|
-
|
|
48
|
-
# Convert snake_case to lowerCamelCase.
|
|
49
|
-
# external_id → externalId, source_template_id → sourceTemplateId
|
|
50
|
-
def snake_to_camel(snake_str)
|
|
51
|
-
parts = snake_str.split('_')
|
|
52
|
-
return snake_str if parts.length < 2
|
|
53
|
-
|
|
54
|
-
parts[0] + parts[1..].map(&:capitalize).join
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Concerns
|
|
5
|
+
# Provides snake_case access to camelCase methods on GraphQL model objects.
|
|
6
|
+
# eco-helpers scripts (and v2 models) use snake_case, GraphQL uses camelCase.
|
|
7
|
+
#
|
|
8
|
+
# Converts any snake_case method call to its camelCase equivalent and delegates.
|
|
9
|
+
# Works for both readers (external_id → externalId) and writers (time_zone= → timeZone=).
|
|
10
|
+
#
|
|
11
|
+
# Examples:
|
|
12
|
+
# page.external_id → page.externalId
|
|
13
|
+
# page.patch_ver → page.patchVer
|
|
14
|
+
# page.source_template_id → page.sourceTemplateId
|
|
15
|
+
# page.other_tags = ['x'] → page.otherTags = ['x']
|
|
16
|
+
module SnakeCamelAccess
|
|
17
|
+
def method_missing(method_name, *args, &block)
|
|
18
|
+
str = method_name.to_s
|
|
19
|
+
setter = str.end_with?('=')
|
|
20
|
+
base = setter ? str[0..-2] : str
|
|
21
|
+
camel = snake_to_camel(base)
|
|
22
|
+
|
|
23
|
+
# Only intercept if conversion actually changed something and target exists
|
|
24
|
+
if camel != base
|
|
25
|
+
target = setter ? :"#{camel}=" : camel.to_sym
|
|
26
|
+
return send(target, *args, &block) if respond_to?(target)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
super
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def respond_to_missing?(method_name, include_private = false)
|
|
33
|
+
str = method_name.to_s
|
|
34
|
+
setter = str.end_with?('=')
|
|
35
|
+
base = setter ? str[0..-2] : str
|
|
36
|
+
camel = snake_to_camel(base)
|
|
37
|
+
|
|
38
|
+
if camel != base
|
|
39
|
+
target = setter ? :"#{camel}=" : camel.to_sym
|
|
40
|
+
return true if respond_to?(target, include_private)
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
super
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
private
|
|
47
|
+
|
|
48
|
+
# Convert snake_case to lowerCamelCase.
|
|
49
|
+
# external_id → externalId, source_template_id → sourceTemplateId
|
|
50
|
+
def snake_to_camel(snake_str)
|
|
51
|
+
parts = snake_str.split('_')
|
|
52
|
+
return snake_str if parts.length < 2
|
|
53
|
+
|
|
54
|
+
parts[0] + parts[1..].map(&:capitalize).join
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Connection
|
|
5
|
-
class PresetView < Logic::Connection
|
|
6
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PresetView'
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Connection
|
|
5
|
+
class PresetView < Logic::Connection
|
|
6
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PresetView'
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Connection
|
|
5
|
+
# `Template.commands` — a `PagesWorkflowCommandInterfaceConnection` carrying
|
|
6
|
+
# `totalCount` (added by `Types::CustomConnections::BaseConnection`), `pageInfo`
|
|
7
|
+
# and `nodes`.
|
|
8
|
+
#
|
|
9
|
+
# ★ A nil connection here means NOT PERMITTED, not "no changes" — see
|
|
10
|
+
# `Base::Template::ChangeLogEntry` for the two access caveats.
|
|
11
|
+
class TemplateChangeLog < Logic::Connection
|
|
12
|
+
# `nodes_of` (not `class_resolver :node_class`) — see Logic::Connection for why the
|
|
13
|
+
# shared dynamic collection poisons sibling connections otherwise.
|
|
14
|
+
nodes_of Model::Template::ChangeLogEntry
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -23,13 +23,18 @@ module Ecoportal
|
|
|
23
23
|
# that parent_id alone cannot carry. Set for an ADDED :field (parent_id = its section id,
|
|
24
24
|
# owner_id = its stage id) because addField requires BOTH sectionId and stageId (both
|
|
25
25
|
# NON_NULL in the schema). nil for every other kind/op.
|
|
26
|
+
#
|
|
27
|
+
# value: for an ADDED :option, the select option's `value` (the schema's addSelectFieldOption
|
|
28
|
+
# requires it — see AddSelectFieldOptionInput, backend authority). Read from the source doc's
|
|
29
|
+
# option.value (VersionDiff#index_options); nil when the source doc did not carry one. NEVER
|
|
30
|
+
# defaulted to label/weight by the synthesiser — see CommandSynthesizer#option_command.
|
|
26
31
|
Change = Struct.new(:op, :kind, :id, :label, :path, :attribute, :before, :after, :parent_id,
|
|
27
|
-
:by_type, :owner_id, keyword_init: true) do
|
|
32
|
+
:by_type, :owner_id, :value, keyword_init: true) do
|
|
28
33
|
def to_h
|
|
29
34
|
{
|
|
30
35
|
op: op, kind: kind, id: id, label: label, path: path,
|
|
31
36
|
attribute: attribute, before: before, after: after, parent_id: parent_id,
|
|
32
|
-
by_type: by_type, owner_id: owner_id
|
|
37
|
+
by_type: by_type, owner_id: owner_id, value: value
|
|
33
38
|
}.compact
|
|
34
39
|
end
|
|
35
40
|
|
|
@@ -277,13 +277,31 @@ module Ecoportal
|
|
|
277
277
|
|
|
278
278
|
field_ref = ref(field_id)
|
|
279
279
|
case change.op
|
|
280
|
-
when :added then
|
|
280
|
+
when :added then add_option(change, field_ref)
|
|
281
281
|
when :removed then build(:removeSelectFieldOption, data_field_id: field_ref, option_id: change.id)
|
|
282
282
|
when :changed then edit_option(change, field_ref)
|
|
283
283
|
else unsupported!(change)
|
|
284
284
|
end
|
|
285
285
|
end
|
|
286
286
|
|
|
287
|
+
# addSelectFieldOption requires `value` (backend: AddSelectFieldOptionInput, required: true
|
|
288
|
+
# — a real, distinct field from label/weight; see OptionType#value). NEVER default it to
|
|
289
|
+
# the label/weight (a numeric select field stores `value` as a number, so a label stand-in
|
|
290
|
+
# would silently persist wrong data). When the source doc's option carried no `value`
|
|
291
|
+
# (Change#value nil — see VersionDiff#index_options), raise loudly instead of guessing.
|
|
292
|
+
def add_option(change, field_ref)
|
|
293
|
+
if change.value.nil?
|
|
294
|
+
raise ArgumentError,
|
|
295
|
+
"CommandSynthesizer: cannot build addSelectFieldOption for option " \
|
|
296
|
+
"'#{change.label}' (field #{field_ref}) — Change#value is nil. The source doc's " \
|
|
297
|
+
"option is missing `value` (VersionDiff#index_options reads it from " \
|
|
298
|
+
"option['value']); supply it on the source doc, or on the Change directly when " \
|
|
299
|
+
"hand-assembling one."
|
|
300
|
+
end
|
|
301
|
+
|
|
302
|
+
build(:addSelectFieldOption, data_field_id: field_ref, label: change.label, value: change.value)
|
|
303
|
+
end
|
|
304
|
+
|
|
287
305
|
def edit_option(change, field_id)
|
|
288
306
|
case change.attribute
|
|
289
307
|
when 'label' then build(:editSelectFieldOption, data_field_id: field_id, option_id: change.id, label: change.after)
|
|
@@ -91,8 +91,11 @@ module Ecoportal
|
|
|
91
91
|
# addStageSection.stageId), threading through a placeholder when the parent is created in
|
|
92
92
|
# the same batch. nil (default) means no parent id is known/recorded — the historical
|
|
93
93
|
# behaviour, unchanged.
|
|
94
|
-
|
|
95
|
-
|
|
94
|
+
# `value:` (optional proc) is recorded on ADDED changes only — currently used for :option,
|
|
95
|
+
# whose addSelectFieldOption command requires the source doc's option.value (see
|
|
96
|
+
# Change#value). nil (default) means the kind has no `value` concept.
|
|
97
|
+
def diff_index(kind, before_idx, after_idx, label:, path:, parent: nil, owner: nil, value: nil, &compare)
|
|
98
|
+
procs = { label: label, path: path, parent: parent, owner: owner, value: value }
|
|
96
99
|
removed = (before_idx.keys - after_idx.keys).map { |id| removed_change(kind, id, before_idx[id], procs) }
|
|
97
100
|
added = (after_idx.keys - before_idx.keys).map { |id| added_change(kind, id, after_idx[id], procs) }
|
|
98
101
|
matched = (before_idx.keys & after_idx.keys).flat_map { |id| Array(compare.call(id, before_idx[id], after_idx[id])) }
|
|
@@ -105,7 +108,8 @@ module Ecoportal
|
|
|
105
108
|
|
|
106
109
|
def added_change(kind, id, info, procs)
|
|
107
110
|
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)
|
|
111
|
+
parent_id: procs[:parent]&.call(info), owner_id: procs[:owner]&.call(info),
|
|
112
|
+
value: procs[:value]&.call(info))
|
|
109
113
|
end
|
|
110
114
|
|
|
111
115
|
def stage_changes
|
|
@@ -153,7 +157,7 @@ module Ecoportal
|
|
|
153
157
|
|
|
154
158
|
def options_diff(field_id, path, before_field, after_field)
|
|
155
159
|
diff_index(:option, index_options(before_field), index_options(after_field),
|
|
156
|
-
label: ->(o) { o[:label] }, path: ->(_o) { path }) do |k, b, a|
|
|
160
|
+
label: ->(o) { o[:label] }, path: ->(_o) { path }, value: ->(o) { o[:value] }) do |k, b, a|
|
|
157
161
|
cmp = []
|
|
158
162
|
cmp << changed(:option, k, a[:label], path, 'label', b[:label], a[:label], field_id) if b[:label] != a[:label]
|
|
159
163
|
cmp << changed(:option, k, a[:label], path, 'weight', b[:weight], a[:weight], field_id) if b[:weight] != a[:weight]
|
|
@@ -294,13 +298,16 @@ module Ecoportal
|
|
|
294
298
|
end
|
|
295
299
|
|
|
296
300
|
# Options keyed by id when present, else by value (primary) / name (auxiliary) — the
|
|
297
|
-
# correct select-option identity (NOT genome).
|
|
301
|
+
# correct select-option identity (NOT genome). `value` is carried through separately from
|
|
302
|
+
# `label` (they are distinct schema fields — OptionType#value vs #label/#name) so an ADDED
|
|
303
|
+
# option's Change can supply the real value addSelectFieldOption requires, never a
|
|
304
|
+
# label/weight stand-in.
|
|
298
305
|
def index_options(field)
|
|
299
306
|
Array(field['options']).each_with_object({}) do |o, h|
|
|
300
307
|
next unless o.is_a?(Hash)
|
|
301
308
|
|
|
302
309
|
key = o['id'] || o['value'] || o['label'] || o['name']
|
|
303
|
-
h[key] = { label: o['label'] || o['name'] || o['value'], weight: o['weight'] }
|
|
310
|
+
h[key] = { label: o['label'] || o['name'] || o['value'], weight: o['weight'], value: o['value'] }
|
|
304
311
|
end
|
|
305
312
|
end
|
|
306
313
|
|
|
@@ -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'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module FileUpload
|
|
5
|
-
end
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
require_relative 'file_upload/client'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module FileUpload
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
require_relative 'file_upload/client'
|