ecoportal-api-graphql 2.0.0 → 2.2.1
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 +397 -14
- 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/diffable/leaf_diff_service.rb +1 -1
- 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/collection.rb +1 -1
- 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/filter_translator.rb +1 -1
- 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 +4 -2
- 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/permissions.rb +0 -2
- 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/update.rb +2 -2
- 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_conf.rb +1 -1
- 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_template_container_uid.rb +1 -1
- 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_section_to_stage.rb +33 -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 +5 -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/permissions.rb +6 -0
- 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/permissions.rb +1 -1
- 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 +11 -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,83 +1,83 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Query
|
|
5
|
-
# Elasticsearch-backed fast search within a register.
|
|
6
|
-
# Returns PreviewPage nodes — no field IDs, no patchVer.
|
|
7
|
-
# Use for metadata lookup (find by externalId, state, location, date).
|
|
8
|
-
# Switch to Query::Pages (org search) for full data before mutations.
|
|
9
|
-
#
|
|
10
|
-
# Supports includeArchived: Boolean (default false).
|
|
11
|
-
# Supports presetViewId: ID to apply a register PageView preset.
|
|
12
|
-
class RegisterPreviewPages < Logic::QueryConnection
|
|
13
|
-
field_name :previewPages
|
|
14
|
-
|
|
15
|
-
accepted_params :registerId, :after, :before, :first, :last,
|
|
16
|
-
:searchConf, :includeArchived, :presetViewId
|
|
17
|
-
|
|
18
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PreviewPage'
|
|
19
|
-
class_resolver :connection_class, 'Ecoportal::API::GraphQL::Connection::PreviewPage'
|
|
20
|
-
|
|
21
|
-
def path
|
|
22
|
-
%w[currentOrganization register previewPages]
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
private
|
|
26
|
-
|
|
27
|
-
def basic_block(&block)
|
|
28
|
-
connection_block = block || default_connection_block
|
|
29
|
-
proc {
|
|
30
|
-
query(
|
|
31
|
-
registerId: :id!,
|
|
32
|
-
after: :string,
|
|
33
|
-
before: :string,
|
|
34
|
-
first: :int,
|
|
35
|
-
last: :int,
|
|
36
|
-
searchConf: :Search,
|
|
37
|
-
includeArchived: :boolean,
|
|
38
|
-
presetViewId: :id
|
|
39
|
-
) {
|
|
40
|
-
currentOrganization {
|
|
41
|
-
register(id: :registerId) {
|
|
42
|
-
previewPages(
|
|
43
|
-
after: :after,
|
|
44
|
-
before: :before,
|
|
45
|
-
first: :first,
|
|
46
|
-
last: :last,
|
|
47
|
-
searchConf: :searchConf,
|
|
48
|
-
includeArchived: :includeArchived,
|
|
49
|
-
presetViewId: :presetViewId,
|
|
50
|
-
&connection_block
|
|
51
|
-
)
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def default_connection_block
|
|
59
|
-
proc {
|
|
60
|
-
totalCount
|
|
61
|
-
pageInfo {
|
|
62
|
-
endCursor
|
|
63
|
-
hasNextPage
|
|
64
|
-
}
|
|
65
|
-
nodes {
|
|
66
|
-
id
|
|
67
|
-
uid
|
|
68
|
-
name
|
|
69
|
-
state
|
|
70
|
-
archived
|
|
71
|
-
externalId
|
|
72
|
-
creatorName
|
|
73
|
-
createdAt { dateTime timeZone }
|
|
74
|
-
updatedAt { dateTime timeZone }
|
|
75
|
-
locations { id name }
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Query
|
|
5
|
+
# Elasticsearch-backed fast search within a register.
|
|
6
|
+
# Returns PreviewPage nodes — no field IDs, no patchVer.
|
|
7
|
+
# Use for metadata lookup (find by externalId, state, location, date).
|
|
8
|
+
# Switch to Query::Pages (org search) for full data before mutations.
|
|
9
|
+
#
|
|
10
|
+
# Supports includeArchived: Boolean (default false).
|
|
11
|
+
# Supports presetViewId: ID to apply a register PageView preset.
|
|
12
|
+
class RegisterPreviewPages < Logic::QueryConnection
|
|
13
|
+
field_name :previewPages
|
|
14
|
+
|
|
15
|
+
accepted_params :registerId, :after, :before, :first, :last,
|
|
16
|
+
:searchConf, :includeArchived, :presetViewId
|
|
17
|
+
|
|
18
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PreviewPage'
|
|
19
|
+
class_resolver :connection_class, 'Ecoportal::API::GraphQL::Connection::PreviewPage'
|
|
20
|
+
|
|
21
|
+
def path
|
|
22
|
+
%w[currentOrganization register previewPages]
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def basic_block(&block)
|
|
28
|
+
connection_block = block || default_connection_block
|
|
29
|
+
proc {
|
|
30
|
+
query(
|
|
31
|
+
registerId: :id!,
|
|
32
|
+
after: :string,
|
|
33
|
+
before: :string,
|
|
34
|
+
first: :int,
|
|
35
|
+
last: :int,
|
|
36
|
+
searchConf: :Search,
|
|
37
|
+
includeArchived: :boolean,
|
|
38
|
+
presetViewId: :id
|
|
39
|
+
) {
|
|
40
|
+
currentOrganization {
|
|
41
|
+
register(id: :registerId) {
|
|
42
|
+
previewPages(
|
|
43
|
+
after: :after,
|
|
44
|
+
before: :before,
|
|
45
|
+
first: :first,
|
|
46
|
+
last: :last,
|
|
47
|
+
searchConf: :searchConf,
|
|
48
|
+
includeArchived: :includeArchived,
|
|
49
|
+
presetViewId: :presetViewId,
|
|
50
|
+
&connection_block
|
|
51
|
+
)
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def default_connection_block
|
|
59
|
+
proc {
|
|
60
|
+
totalCount
|
|
61
|
+
pageInfo {
|
|
62
|
+
endCursor
|
|
63
|
+
hasNextPage
|
|
64
|
+
}
|
|
65
|
+
nodes {
|
|
66
|
+
id
|
|
67
|
+
uid
|
|
68
|
+
name
|
|
69
|
+
state
|
|
70
|
+
archived
|
|
71
|
+
externalId
|
|
72
|
+
creatorName
|
|
73
|
+
createdAt { dateTime timeZone }
|
|
74
|
+
updatedAt { dateTime timeZone }
|
|
75
|
+
locations { id name }
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Query
|
|
5
|
+
# TEMPLATE CHANGE LOG — "for template X, who changed what, and when", newest first,
|
|
6
|
+
# paginated.
|
|
7
|
+
#
|
|
8
|
+
# Read path (verified in the Rails backend on 2026-08-19):
|
|
9
|
+
# currentOrganization.page(id:) → template → commands
|
|
10
|
+
# There is NO top-level query for the narrow `Template` type. `template` is declared on
|
|
11
|
+
# `app/graphql/types/pages/interfaces/base_page_interface.rb:27`, so it is reachable on
|
|
12
|
+
# any page — and a template IS a page in this platform, so pass the TEMPLATE's page id.
|
|
13
|
+
#
|
|
14
|
+
# `currentOrganization.page(id:)` returns a `PageUnion`, so `template` has to be selected
|
|
15
|
+
# through a type condition on `BasePageInterface` — selecting directly on a union is
|
|
16
|
+
# invalid GraphQL under any schema (this is the class of bug the `validate-queries` CI
|
|
17
|
+
# gate hard-fails on). The type condition does not change the response shape, so `#path`
|
|
18
|
+
# still digs currentOrganization → page → template → commands.
|
|
19
|
+
#
|
|
20
|
+
# ★ Access caveats and the forces watermark blind spot are documented on
|
|
21
|
+
# `Base::Template::ChangeLogEntry`. In short: a nil `commands` connection means the caller
|
|
22
|
+
# lacks `Pages::TemplatePolicy#update_information?`, NOT that nothing changed; and only
|
|
23
|
+
# TEMPLATE_BUILDER-sourced commands appear here (workflow-builder ones live on
|
|
24
|
+
# `Query::PagesWorkflowCommands`).
|
|
25
|
+
#
|
|
26
|
+
# Usage:
|
|
27
|
+
# q = Query::TemplateChangeLog.new(client)
|
|
28
|
+
# conn = q.query(id: template_page_id, first: 50)
|
|
29
|
+
# conn.nodes.each { |e| puts "#{e.createdAt.dateTime} #{e.owner&.name} #{e.commandAction}" }
|
|
30
|
+
#
|
|
31
|
+
# # auto-paginating enumerator (Logic::QueryConnection#each)
|
|
32
|
+
# q.each(id: template_page_id, first: 100) { |entry| ... }
|
|
33
|
+
#
|
|
34
|
+
# Also reachable as `api.template.change_log(id:, first:)` — see `Builder::Template`.
|
|
35
|
+
#
|
|
36
|
+
# ★ For WHAT CHANGED (field/from/to, change messages) pass `detail: true` to the builder,
|
|
37
|
+
# or `&Query::TemplateChangeLog.detail_block` here. The default selection deliberately
|
|
38
|
+
# omits it so the common "who and when" read stays cheap.
|
|
39
|
+
class TemplateChangeLog < Logic::QueryConnection
|
|
40
|
+
SCHEMA_VERSION = '20260819'.freeze
|
|
41
|
+
|
|
42
|
+
field_name :commands
|
|
43
|
+
|
|
44
|
+
accepted_params :id, :after, :before, :first, :last
|
|
45
|
+
|
|
46
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::Template::ChangeLogEntry'
|
|
47
|
+
class_resolver :connection_class, 'Ecoportal::API::GraphQL::Connection::TemplateChangeLog'
|
|
48
|
+
|
|
49
|
+
# Absolute — the connection is nested three levels deep, so it is not expressible as
|
|
50
|
+
# `base_path + field_name`.
|
|
51
|
+
def path
|
|
52
|
+
%w[currentOrganization page template commands]
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
# Connection block that selects FIELD-LEVEL DETAIL as well -- what changed, not just
|
|
56
|
+
# who/when/which-resource. Opt-in, because it adds three inline fragments and their
|
|
57
|
+
# sub-selections to every node.
|
|
58
|
+
#
|
|
59
|
+
# q = Query::TemplateChangeLog.new(client)
|
|
60
|
+
# conn = q.query(id: template_page_id, first: 50, &described_class.detail_block)
|
|
61
|
+
# conn.nodes.each do |e|
|
|
62
|
+
# case e.detail_kind
|
|
63
|
+
# when :changes then e.changes.each { |c| puts "#{c['field']}: #{c['from']} -> #{c['to']}" }
|
|
64
|
+
# when :change_messages then puts e.changeMessages.join('; ')
|
|
65
|
+
# when :es_changes then puts "filter changed: #{e.changes.map { |c| c['field'] }.join(', ')}"
|
|
66
|
+
# end
|
|
67
|
+
# end
|
|
68
|
+
#
|
|
69
|
+
# Or simply `api.template.change_log(id:, first:, detail: true)`.
|
|
70
|
+
def self.detail_block
|
|
71
|
+
proc {
|
|
72
|
+
totalCount
|
|
73
|
+
pageInfo {
|
|
74
|
+
endCursor
|
|
75
|
+
hasNextPage
|
|
76
|
+
}
|
|
77
|
+
nodes {
|
|
78
|
+
spread :TemplateChangeLogEntryDetail
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
private
|
|
84
|
+
|
|
85
|
+
def basic_block(&block)
|
|
86
|
+
connection_block = block || default_connection_block
|
|
87
|
+
proc {
|
|
88
|
+
query(id: :id!, after: :string, before: :string, first: :int, last: :int) {
|
|
89
|
+
currentOrganization {
|
|
90
|
+
page(id: :id) {
|
|
91
|
+
spread on: :BasePageInterface do
|
|
92
|
+
template {
|
|
93
|
+
commands(after: :after, before: :before, first: :first, last: :last, &connection_block)
|
|
94
|
+
}
|
|
95
|
+
end
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def default_connection_block
|
|
103
|
+
proc {
|
|
104
|
+
totalCount
|
|
105
|
+
pageInfo {
|
|
106
|
+
endCursor
|
|
107
|
+
hasNextPage
|
|
108
|
+
}
|
|
109
|
+
nodes {
|
|
110
|
+
spread :TemplateChangeLogEntry
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Query
|
|
5
|
-
class Templates < Logic::QueryConnection
|
|
6
|
-
field_name :templates
|
|
7
|
-
|
|
8
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PageUnion'
|
|
9
|
-
class_resolver :connection_class, 'Ecoportal::API::GraphQL::Connection::Page'
|
|
10
|
-
|
|
11
|
-
private
|
|
12
|
-
|
|
13
|
-
def basic_block(&block)
|
|
14
|
-
connection_block = block || default_connection_block
|
|
15
|
-
proc {
|
|
16
|
-
query(
|
|
17
|
-
searchConf: :Search,
|
|
18
|
-
after: :string,
|
|
19
|
-
before: :string,
|
|
20
|
-
first: :int,
|
|
21
|
-
last: :int
|
|
22
|
-
) {
|
|
23
|
-
currentOrganization {
|
|
24
|
-
templates(
|
|
25
|
-
searchConf: :searchConf,
|
|
26
|
-
after: :after,
|
|
27
|
-
before: :before,
|
|
28
|
-
first: :first,
|
|
29
|
-
last: :last,
|
|
30
|
-
&connection_block
|
|
31
|
-
)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def default_connection_block
|
|
38
|
-
proc {
|
|
39
|
-
totalCount
|
|
40
|
-
pageInfo {
|
|
41
|
-
endCursor
|
|
42
|
-
hasNextPage
|
|
43
|
-
}
|
|
44
|
-
nodes {
|
|
45
|
-
spread :PageFields
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
end
|
|
49
|
-
end
|
|
50
|
-
end
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Query
|
|
5
|
+
class Templates < Logic::QueryConnection
|
|
6
|
+
field_name :templates
|
|
7
|
+
|
|
8
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PageUnion'
|
|
9
|
+
class_resolver :connection_class, 'Ecoportal::API::GraphQL::Connection::Page'
|
|
10
|
+
|
|
11
|
+
private
|
|
12
|
+
|
|
13
|
+
def basic_block(&block)
|
|
14
|
+
connection_block = block || default_connection_block
|
|
15
|
+
proc {
|
|
16
|
+
query(
|
|
17
|
+
searchConf: :Search,
|
|
18
|
+
after: :string,
|
|
19
|
+
before: :string,
|
|
20
|
+
first: :int,
|
|
21
|
+
last: :int
|
|
22
|
+
) {
|
|
23
|
+
currentOrganization {
|
|
24
|
+
templates(
|
|
25
|
+
searchConf: :searchConf,
|
|
26
|
+
after: :after,
|
|
27
|
+
before: :before,
|
|
28
|
+
first: :first,
|
|
29
|
+
last: :last,
|
|
30
|
+
&connection_block
|
|
31
|
+
)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def default_connection_block
|
|
38
|
+
proc {
|
|
39
|
+
totalCount
|
|
40
|
+
pageInfo {
|
|
41
|
+
endCursor
|
|
42
|
+
hasNextPage
|
|
43
|
+
}
|
|
44
|
+
nodes {
|
|
45
|
+
spread :PageFields
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
end
|
|
@@ -19,6 +19,7 @@ require_relative 'query/page_activities'
|
|
|
19
19
|
require_relative 'query/auth_logs'
|
|
20
20
|
require_relative 'query/permissions'
|
|
21
21
|
require_relative 'query/person_member_changelogs'
|
|
22
|
+
require_relative 'query/person_members'
|
|
22
23
|
require_relative 'query/dashboard_search'
|
|
23
24
|
require_relative 'query/page'
|
|
24
25
|
require_relative 'query/pages'
|
|
@@ -31,3 +32,4 @@ require_relative 'query/file_upload_signature'
|
|
|
31
32
|
|
|
32
33
|
require_relative 'query/page_with_forces'
|
|
33
34
|
require_relative 'query/pages_workflow_commands'
|
|
35
|
+
require_relative 'query/template_change_log'
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
require "ecoportal/api-v2"
|
|
2
|
-
require "ecoportal/api/graphql_version"
|
|
3
|
-
|
|
4
|
-
module Ecoportal
|
|
5
|
-
module API
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
|
|
9
|
-
require_relative "api/common.graphql"
|
|
10
|
-
require_relative "api/graphql"
|
|
1
|
+
require "ecoportal/api-v2"
|
|
2
|
+
require "ecoportal/api/graphql_version"
|
|
3
|
+
|
|
4
|
+
module Ecoportal
|
|
5
|
+
module API
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
|
|
9
|
+
require_relative "api/common.graphql"
|
|
10
|
+
require_relative "api/graphql"
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: ecoportal-api-graphql
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.
|
|
4
|
+
version: 2.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oscar Segura
|
|
@@ -160,7 +160,7 @@ dependencies:
|
|
|
160
160
|
version: '3.3'
|
|
161
161
|
- - ">="
|
|
162
162
|
- !ruby/object:Gem::Version
|
|
163
|
-
version: 3.3.
|
|
163
|
+
version: 3.3.5
|
|
164
164
|
type: :runtime
|
|
165
165
|
prerelease: false
|
|
166
166
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -170,7 +170,7 @@ dependencies:
|
|
|
170
170
|
version: '3.3'
|
|
171
171
|
- - ">="
|
|
172
172
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: 3.3.
|
|
173
|
+
version: 3.3.5
|
|
174
174
|
- !ruby/object:Gem::Dependency
|
|
175
175
|
name: graphlient
|
|
176
176
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -203,14 +203,12 @@ files:
|
|
|
203
203
|
- lib/ecoportal/api-graphql.rb
|
|
204
204
|
- lib/ecoportal/api/common.graphql.rb
|
|
205
205
|
- lib/ecoportal/api/common/graphql.rb
|
|
206
|
-
- lib/ecoportal/api/common/graphql/CLAUDE.md
|
|
207
206
|
- lib/ecoportal/api/common/graphql/auth_service.rb
|
|
208
207
|
- lib/ecoportal/api/common/graphql/class_helpers.rb
|
|
209
208
|
- lib/ecoportal/api/common/graphql/client.rb
|
|
210
209
|
- lib/ecoportal/api/common/graphql/hash_helpers.rb
|
|
211
210
|
- lib/ecoportal/api/common/graphql/http_client.rb
|
|
212
211
|
- lib/ecoportal/api/common/graphql/model.rb
|
|
213
|
-
- lib/ecoportal/api/common/graphql/model/CLAUDE.md
|
|
214
212
|
- lib/ecoportal/api/common/graphql/model/as_input.rb
|
|
215
213
|
- lib/ecoportal/api/common/graphql/model/diffable.rb
|
|
216
214
|
- lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb
|
|
@@ -221,9 +219,7 @@ files:
|
|
|
221
219
|
- lib/ecoportal/api/common/graphql/patches.rb
|
|
222
220
|
- lib/ecoportal/api/common/graphql/query_integration.rb
|
|
223
221
|
- lib/ecoportal/api/graphql.rb
|
|
224
|
-
- lib/ecoportal/api/graphql/CLAUDE.md
|
|
225
222
|
- lib/ecoportal/api/graphql/base.rb
|
|
226
|
-
- lib/ecoportal/api/graphql/base/CLAUDE.md
|
|
227
223
|
- lib/ecoportal/api/graphql/base/action.rb
|
|
228
224
|
- lib/ecoportal/api/graphql/base/action_category.rb
|
|
229
225
|
- lib/ecoportal/api/graphql/base/action_event.rb
|
|
@@ -316,8 +312,8 @@ files:
|
|
|
316
312
|
- lib/ecoportal/api/graphql/base/register.rb
|
|
317
313
|
- lib/ecoportal/api/graphql/base/resource.rb
|
|
318
314
|
- lib/ecoportal/api/graphql/base/template.rb
|
|
315
|
+
- lib/ecoportal/api/graphql/base/template/change_log_entry.rb
|
|
319
316
|
- lib/ecoportal/api/graphql/builder.rb
|
|
320
|
-
- lib/ecoportal/api/graphql/builder/CLAUDE.md
|
|
321
317
|
- lib/ecoportal/api/graphql/builder/action.rb
|
|
322
318
|
- lib/ecoportal/api/graphql/builder/contractor_entity.rb
|
|
323
319
|
- lib/ecoportal/api/graphql/builder/kickstand.rb
|
|
@@ -358,6 +354,7 @@ files:
|
|
|
358
354
|
- lib/ecoportal/api/graphql/connection/person_member_changelog.rb
|
|
359
355
|
- lib/ecoportal/api/graphql/connection/preset_view.rb
|
|
360
356
|
- lib/ecoportal/api/graphql/connection/preview_page.rb
|
|
357
|
+
- lib/ecoportal/api/graphql/connection/template_change_log.rb
|
|
361
358
|
- lib/ecoportal/api/graphql/diff.rb
|
|
362
359
|
- lib/ecoportal/api/graphql/diff/change.rb
|
|
363
360
|
- lib/ecoportal/api/graphql/diff/command_synthesizer.rb
|
|
@@ -400,6 +397,7 @@ files:
|
|
|
400
397
|
- lib/ecoportal/api/graphql/fragment/permissions.rb
|
|
401
398
|
- lib/ecoportal/api/graphql/fragment/person_member_changelog.rb
|
|
402
399
|
- lib/ecoportal/api/graphql/fragment/template.rb
|
|
400
|
+
- lib/ecoportal/api/graphql/fragment/template_change_log.rb
|
|
403
401
|
- lib/ecoportal/api/graphql/helpers.rb
|
|
404
402
|
- lib/ecoportal/api/graphql/helpers/locations_tree.rb
|
|
405
403
|
- lib/ecoportal/api/graphql/input.rb
|
|
@@ -534,7 +532,9 @@ files:
|
|
|
534
532
|
- lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb
|
|
535
533
|
- lib/ecoportal/api/graphql/input/workflow_command/field_config/signature.rb
|
|
536
534
|
- lib/ecoportal/api/graphql/input/workflow_command/field_config/table.rb
|
|
535
|
+
- lib/ecoportal/api/graphql/input/workflow_command/manage_copy_page_configuration.rb
|
|
537
536
|
- lib/ecoportal/api/graphql/input/workflow_command/move_field.rb
|
|
537
|
+
- lib/ecoportal/api/graphql/input/workflow_command/move_section_to_stage.rb
|
|
538
538
|
- lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb
|
|
539
539
|
- lib/ecoportal/api/graphql/input/workflow_command/move_viewable_field.rb
|
|
540
540
|
- lib/ecoportal/api/graphql/input/workflow_command/remove_action_tag.rb
|
|
@@ -626,6 +626,7 @@ files:
|
|
|
626
626
|
- lib/ecoportal/api/graphql/model/register.rb
|
|
627
627
|
- lib/ecoportal/api/graphql/model/resource.rb
|
|
628
628
|
- lib/ecoportal/api/graphql/model/template.rb
|
|
629
|
+
- lib/ecoportal/api/graphql/model/template/change_log_entry.rb
|
|
629
630
|
- lib/ecoportal/api/graphql/model/user.rb
|
|
630
631
|
- lib/ecoportal/api/graphql/mutation.rb
|
|
631
632
|
- lib/ecoportal/api/graphql/mutation/action.rb
|
|
@@ -764,8 +765,10 @@ files:
|
|
|
764
765
|
- lib/ecoportal/api/graphql/query/pages_workflow_commands.rb
|
|
765
766
|
- lib/ecoportal/api/graphql/query/permissions.rb
|
|
766
767
|
- lib/ecoportal/api/graphql/query/person_member_changelogs.rb
|
|
768
|
+
- lib/ecoportal/api/graphql/query/person_members.rb
|
|
767
769
|
- lib/ecoportal/api/graphql/query/register_preset_views.rb
|
|
768
770
|
- lib/ecoportal/api/graphql/query/register_preview_pages.rb
|
|
771
|
+
- lib/ecoportal/api/graphql/query/template_change_log.rb
|
|
769
772
|
- lib/ecoportal/api/graphql/query/templates.rb
|
|
770
773
|
- lib/ecoportal/api/graphql_version.rb
|
|
771
774
|
homepage: https://www.ecoportal.com
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
# common/graphql
|
|
2
|
-
|
|
3
|
-
Shared HTTP transport, authentication, and base model infrastructure used by the gem — nothing here is EcoPortal-domain-specific.
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
|
|
7
|
-
| File / class | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `auth_service.rb` / `AuthService` | OAuth2 password + refresh-token flow; included in both client classes |
|
|
10
|
-
| `client.rb` / `Client` | Graphlient-based GraphQL client (builds bearer-token headers, constructs endpoint URL) |
|
|
11
|
-
| `http_client.rb` / `HttpClient` | Raw HTTP client (extends `Common::Client`); `execute` sends query strings + variables; supports v0–v3 + graphql API version modes |
|
|
12
|
-
| `class_helpers.rb` / `ClassHelpers` | `becomes(klass)` instance casting + `const?` class helper |
|
|
13
|
-
| `hash_helpers.rb` / `HashHelpers` | Deep key transforms (`keys_to_sym_deep`, `deep_dup`, `remove_nil_keys_deep`) — used by diff and input serialisation |
|
|
14
|
-
| `query_integration.rb` / `QueryIntegration` | Class macro `query(:method, query_klass:)` that wires a named query method on `Model::Organization` |
|
|
15
|
-
| `model.rb` / `Model` | Base model class: `DoubleModel` + `Diffable` + `AsInput`; all GraphQL models ultimately inherit this |
|
|
16
|
-
| `patches.rb` | Reserved placeholder (empty) |
|
|
17
|
-
| `model/diffable.rb` | `as_update` / `dirty?` — delegates to `DiffService` |
|
|
18
|
-
| `model/as_input.rb` | `as_input` (instance) and `as_input(hash)` (class method) — converts diff to GraphQL mutation variables |
|
|
19
|
-
| `model/diffable/diff_service.rb` | Main diff engine: flat classic diff + cascaded reduce through nested `GraphQL::Model` objects |
|
|
20
|
-
| `model/diffable/classic_diff_service.rb` | Low-level change-data extraction (compares `curr_doc` vs `prev_doc`) |
|
|
21
|
-
| `model/diffable/hash_diff.rb` | Hash equality / change detection helpers |
|
|
22
|
-
| `model/diffable/hash_diff_nesting.rb` | Nested key path helpers (`dig_set!`, `dig_delete!`, `dig_path?`) |
|
|
23
|
-
|
|
24
|
-
## Conventions
|
|
25
|
-
|
|
26
|
-
- `Client` is graphlient-based and used for schema introspection; `HttpClient` is the actual request sender used in production (set as `client.http_client`).
|
|
27
|
-
- `HashHelpers` is used as both a module mixin (include) and directly via `HashHelpers.keys_to_sym_deep(...)`.
|
|
28
|
-
- `DiffService` handles the `flat:` flag: `flat: true` does a single-level diff; `flat: false` (default) cascades through nested `GraphQL::Model` objects.
|
|
29
|
-
- Root-class objects (`root!` declared) are excluded from cascaded diffs — they represent independent server entities.
|
|
30
|
-
- `AsInput#as_input(target_class:)` delegates to `Input::X.from_model(self)` when a target class is given.
|
|
31
|
-
|
|
32
|
-
## Related
|
|
33
|
-
|
|
34
|
-
- `../graphql/logic/base_model.rb` — adds `SnakeCamelAccess` on top of `Common::GraphQL::Model`
|
|
35
|
-
- `../graphql/logic/input.rb` — `Logic::Input` base class built on top of `Model`
|
|
36
|
-
- `../graphql/logic/base_query.rb` — consumes `HttpClient#execute` and `HashHelpers`
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# common/graphql/model
|
|
2
|
-
|
|
3
|
-
Concerns that add dirty-tracking diff (`Diffable`) and mutation-input serialisation (`AsInput`) to the base `Common::GraphQL::Model`.
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
|
|
7
|
-
| File / class | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `diffable.rb` / `Model::Diffable` | Provides `as_update` (returns changed-field hash or nil) and `dirty?`; delegates to `DIFF_CLASS` (defaults to `DiffService`) |
|
|
10
|
-
| `as_input.rb` / `Model::AsInput` | Instance `as_input` (wraps diff as mutation variables) + class-level `as_input(hash)` (key-sym + nil-id cleanup) |
|
|
11
|
-
| `diffable/diff_service.rb` / `DiffService` | Primary diff engine: flat classic diff then cascaded reduce over nested `GraphQL::Model` children |
|
|
12
|
-
| `diffable/classic_diff_service.rb` / `ClassicDiffService` | Low-level diff: compares `curr_doc` vs `prev_doc`, returns `{ id:, changed_field: new_value }` or nil |
|
|
13
|
-
| `diffable/hash_diff.rb` / `HashDiff` | Primitive equality helpers used by `ClassicDiffService` |
|
|
14
|
-
| `diffable/hash_diff_nesting.rb` / `HashDiffNesting` | Nested path helpers: `dig_set!`, `dig_delete!`, `dig_path?` used when building cascaded diff results |
|
|
15
|
-
|
|
16
|
-
## Conventions
|
|
17
|
-
|
|
18
|
-
- `DIFF_CLASS = DiffService` is a constant on `Diffable` — subclasses can override it to swap diff strategies.
|
|
19
|
-
- `DiffService` `flat: true` produces a single-level diff (current model only); `flat: false` (default) recurses via `cascaded_reduce` through nested `GraphQL::Model` objects.
|
|
20
|
-
- Objects declared with `root!` in their class are skipped during cascaded diff — they are independent server entities (look-ups only).
|
|
21
|
-
- `as_input` on a model calls `as_update` first; returns `nil` when nothing has changed so callers can skip the mutation.
|
|
22
|
-
- `as_input(target_class:)` is the preferred path when a corresponding `Input::X` class exists — delegates to `target_class.from_model(self)`.
|
|
23
|
-
|
|
24
|
-
## Related
|
|
25
|
-
|
|
26
|
-
- `../hash_helpers.rb` — `HashHelpers` used inside `DiffService` for key transforms
|
|
27
|
-
- `../../graphql/logic/input.rb` — `Logic::Input.from_model` is the canonical consumer of `as_update`
|
|
28
|
-
- `../../graphql/logic/base_model.rb` — all concrete models inherit this chain
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
# graphql (gem root)
|
|
2
|
-
|
|
3
|
-
The entry point for the gem: `Ecoportal::API::GraphQL` is the top-level class consumers instantiate; it holds the `client`, wires the `HttpClient`, and exposes builder/compat entry points.
|
|
4
|
-
|
|
5
|
-
## Contents
|
|
6
|
-
|
|
7
|
-
| File / class | Purpose |
|
|
8
|
-
|---|---|
|
|
9
|
-
| `graphql.rb` / `GraphQL` | Main entry class — `initialize` builds `Client` + `HttpClient`, exposes `pages`, `registers`, `page`, `action`, `contractorEntity`, `locationStructure`, `currentOrganization` |
|
|
10
|
-
| `graphql_version.rb` | Gem `VERSION` constant |
|
|
11
|
-
| `base/` | Data-only model base classes (no resolvers, no `client`); see `base/CLAUDE.md` |
|
|
12
|
-
| `builder/` | Facade builders that group related mutations under one object |
|
|
13
|
-
| `compat/` | v2-compatible API layer for eco-helpers scripts |
|
|
14
|
-
| `concerns/` | Shared Ruby mixins (`PageCompat`, `DataFieldAccess`, `SnakeCamelAccess`, `FragmentDefinitions`) |
|
|
15
|
-
| `connection/` | `Logic::Connection` subclasses — typed pagination wrappers per entity |
|
|
16
|
-
| `error/` | Domain error classes (`ValidationErrors`, `LocationsError`, `LocationsValidationError`) |
|
|
17
|
-
| `fragment/` | GraphQL fragment heredoc strings + `Fragment.assemble(*syms)` |
|
|
18
|
-
| `helpers/` | Utility modules (`LocationsTree`) |
|
|
19
|
-
| `input/` | Mutation input serialisers; `SearchConf` is a chainable value object |
|
|
20
|
-
| `interface/` | Abstract base models shared by `Base::` and `Model::` (e.g. `BasePage`, `LocationStructure`) |
|
|
21
|
-
| `logic/` | Abstract base classes for queries, mutations, connections — no domain code |
|
|
22
|
-
| `model/` | Concrete domain models with `class_resolver` wiring; subclass their `Base::` counterparts |
|
|
23
|
-
| `mutation/` | Concrete mutation execution classes |
|
|
24
|
-
| `payload/` | Mutation response payload wrappers |
|
|
25
|
-
| `query/` | Concrete query execution classes |
|
|
26
|
-
|
|
27
|
-
## Conventions
|
|
28
|
-
|
|
29
|
-
- Load order in `graphql.rb` matters: `logic/base_model` → `error` → `interface` → `base` → `model` → rest.
|
|
30
|
-
- `#pages` returns `Compat::Pages` (v2-compatible); `#page` returns `Builder::Page` (raw mutation facade).
|
|
31
|
-
- `#currentOrganization` returns `Model::Organization` class (not instance) with `client` set — query methods are class-level.
|
|
32
|
-
- `GraphQL` (not `GraphQL`) is the namespace: use `Ecoportal::API::Graphql` alias only for legacy references; internal code uses `GraphQL`.
|
|
33
|
-
|
|
34
|
-
## Related
|
|
35
|
-
|
|
36
|
-
- `../../common/graphql/` — HTTP client, auth, and base model infrastructure
|
|
37
|
-
- Downstream: `eco-helpers` calls `.pages` and `.registers` exclusively via `Compat::*`
|