ecoportal-api-graphql 2.0.0 → 3.0.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 +793 -14
- data/LICENSE +21 -21
- data/README.gem.md +53 -0
- 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 +107 -69
- data/lib/ecoportal/api/common/graphql/hash_helpers.rb +105 -105
- data/lib/ecoportal/api/common/graphql/http_client.rb +124 -8
- 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 +160 -12
- 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/temp_image.rb +28 -0
- 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/base.rb +1 -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 +37 -4
- 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/client.rb +140 -35
- 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 +10 -3
- 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 +109 -6
- 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/temp_image.rb +10 -0
- data/lib/ecoportal/api/graphql/model/template/binding.rb +60 -0
- data/lib/ecoportal/api/graphql/model/template/change_log_entry.rb +19 -0
- data/lib/ecoportal/api/graphql/model/template/command_grouper.rb +107 -0
- data/lib/ecoportal/api/graphql/model/template/command_normalizer.rb +116 -0
- data/lib/ecoportal/api/graphql/model/template/command_synthesis.rb +262 -0
- data/lib/ecoportal/api/graphql/model/template/field.rb +68 -0
- data/lib/ecoportal/api/graphql/model/template/force.rb +65 -0
- data/lib/ecoportal/api/graphql/model/template/helper.rb +32 -0
- data/lib/ecoportal/api/graphql/model/template/instance.rb +202 -0
- data/lib/ecoportal/api/graphql/model/template/node.rb +78 -0
- data/lib/ecoportal/api/graphql/model/template/option.rb +49 -0
- data/lib/ecoportal/api/graphql/model/template/read.rb +164 -0
- data/lib/ecoportal/api/graphql/model/template/section.rb +82 -0
- data/lib/ecoportal/api/graphql/model/template/stage.rb +49 -0
- data/lib/ecoportal/api/graphql/model/template/staged_executor.rb +236 -0
- data/lib/ecoportal/api/graphql/model/template.rb +37 -1
- data/lib/ecoportal/api/graphql/model/user.rb +14 -14
- data/lib/ecoportal/api/graphql/model.rb +1 -0
- 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/file_container/upload.rb +11 -4
- data/lib/ecoportal/api/graphql/mutation/image/upload.rb +88 -0
- data/lib/ecoportal/api/graphql/mutation/image.rb +14 -0
- data/lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/add_commands.rb +55 -55
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/create.rb +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/delete.rb +43 -43
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/drop_bad_commands.rb +56 -56
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/publish.rb +66 -66
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft.rb +18 -18
- data/lib/ecoportal/api/graphql/mutation/location_structure.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +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/mutation/template/create.rb +35 -3
- data/lib/ecoportal/api/graphql/mutation/template/update.rb +4 -2
- data/lib/ecoportal/api/graphql/mutation.rb +1 -0
- 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/images_upload.rb +14 -0
- 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/payload.rb +1 -0
- 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 +45 -9
- data/README.md +0 -24
- 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:
|
|
4
|
+
version: 3.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Oscar Segura
|
|
@@ -9,6 +9,20 @@ bindir: exe
|
|
|
9
9
|
cert_chain: []
|
|
10
10
|
date: 1980-01-02 00:00:00.000000000 Z
|
|
11
11
|
dependencies:
|
|
12
|
+
- !ruby/object:Gem::Dependency
|
|
13
|
+
name: json-canonicalization
|
|
14
|
+
requirement: !ruby/object:Gem::Requirement
|
|
15
|
+
requirements:
|
|
16
|
+
- - "~>"
|
|
17
|
+
- !ruby/object:Gem::Version
|
|
18
|
+
version: '1.0'
|
|
19
|
+
type: :development
|
|
20
|
+
prerelease: false
|
|
21
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
22
|
+
requirements:
|
|
23
|
+
- - "~>"
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '1.0'
|
|
12
26
|
- !ruby/object:Gem::Dependency
|
|
13
27
|
name: pry
|
|
14
28
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -160,7 +174,7 @@ dependencies:
|
|
|
160
174
|
version: '3.3'
|
|
161
175
|
- - ">="
|
|
162
176
|
- !ruby/object:Gem::Version
|
|
163
|
-
version: 3.3.
|
|
177
|
+
version: 3.3.5
|
|
164
178
|
type: :runtime
|
|
165
179
|
prerelease: false
|
|
166
180
|
version_requirements: !ruby/object:Gem::Requirement
|
|
@@ -170,7 +184,7 @@ dependencies:
|
|
|
170
184
|
version: '3.3'
|
|
171
185
|
- - ">="
|
|
172
186
|
- !ruby/object:Gem::Version
|
|
173
|
-
version: 3.3.
|
|
187
|
+
version: 3.3.5
|
|
174
188
|
- !ruby/object:Gem::Dependency
|
|
175
189
|
name: graphlient
|
|
176
190
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -199,18 +213,16 @@ extra_rdoc_files: []
|
|
|
199
213
|
files:
|
|
200
214
|
- CHANGELOG.md
|
|
201
215
|
- LICENSE
|
|
202
|
-
- README.md
|
|
216
|
+
- README.gem.md
|
|
203
217
|
- lib/ecoportal/api-graphql.rb
|
|
204
218
|
- lib/ecoportal/api/common.graphql.rb
|
|
205
219
|
- lib/ecoportal/api/common/graphql.rb
|
|
206
|
-
- lib/ecoportal/api/common/graphql/CLAUDE.md
|
|
207
220
|
- lib/ecoportal/api/common/graphql/auth_service.rb
|
|
208
221
|
- lib/ecoportal/api/common/graphql/class_helpers.rb
|
|
209
222
|
- lib/ecoportal/api/common/graphql/client.rb
|
|
210
223
|
- lib/ecoportal/api/common/graphql/hash_helpers.rb
|
|
211
224
|
- lib/ecoportal/api/common/graphql/http_client.rb
|
|
212
225
|
- lib/ecoportal/api/common/graphql/model.rb
|
|
213
|
-
- lib/ecoportal/api/common/graphql/model/CLAUDE.md
|
|
214
226
|
- lib/ecoportal/api/common/graphql/model/as_input.rb
|
|
215
227
|
- lib/ecoportal/api/common/graphql/model/diffable.rb
|
|
216
228
|
- lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb
|
|
@@ -221,9 +233,7 @@ files:
|
|
|
221
233
|
- lib/ecoportal/api/common/graphql/patches.rb
|
|
222
234
|
- lib/ecoportal/api/common/graphql/query_integration.rb
|
|
223
235
|
- lib/ecoportal/api/graphql.rb
|
|
224
|
-
- lib/ecoportal/api/graphql/CLAUDE.md
|
|
225
236
|
- lib/ecoportal/api/graphql/base.rb
|
|
226
|
-
- lib/ecoportal/api/graphql/base/CLAUDE.md
|
|
227
237
|
- lib/ecoportal/api/graphql/base/action.rb
|
|
228
238
|
- lib/ecoportal/api/graphql/base/action_category.rb
|
|
229
239
|
- lib/ecoportal/api/graphql/base/action_event.rb
|
|
@@ -315,9 +325,10 @@ files:
|
|
|
315
325
|
- lib/ecoportal/api/graphql/base/preview_page.rb
|
|
316
326
|
- lib/ecoportal/api/graphql/base/register.rb
|
|
317
327
|
- lib/ecoportal/api/graphql/base/resource.rb
|
|
328
|
+
- lib/ecoportal/api/graphql/base/temp_image.rb
|
|
318
329
|
- lib/ecoportal/api/graphql/base/template.rb
|
|
330
|
+
- lib/ecoportal/api/graphql/base/template/change_log_entry.rb
|
|
319
331
|
- lib/ecoportal/api/graphql/builder.rb
|
|
320
|
-
- lib/ecoportal/api/graphql/builder/CLAUDE.md
|
|
321
332
|
- lib/ecoportal/api/graphql/builder/action.rb
|
|
322
333
|
- lib/ecoportal/api/graphql/builder/contractor_entity.rb
|
|
323
334
|
- lib/ecoportal/api/graphql/builder/kickstand.rb
|
|
@@ -358,6 +369,7 @@ files:
|
|
|
358
369
|
- lib/ecoportal/api/graphql/connection/person_member_changelog.rb
|
|
359
370
|
- lib/ecoportal/api/graphql/connection/preset_view.rb
|
|
360
371
|
- lib/ecoportal/api/graphql/connection/preview_page.rb
|
|
372
|
+
- lib/ecoportal/api/graphql/connection/template_change_log.rb
|
|
361
373
|
- lib/ecoportal/api/graphql/diff.rb
|
|
362
374
|
- lib/ecoportal/api/graphql/diff/change.rb
|
|
363
375
|
- lib/ecoportal/api/graphql/diff/command_synthesizer.rb
|
|
@@ -400,6 +412,7 @@ files:
|
|
|
400
412
|
- lib/ecoportal/api/graphql/fragment/permissions.rb
|
|
401
413
|
- lib/ecoportal/api/graphql/fragment/person_member_changelog.rb
|
|
402
414
|
- lib/ecoportal/api/graphql/fragment/template.rb
|
|
415
|
+
- lib/ecoportal/api/graphql/fragment/template_change_log.rb
|
|
403
416
|
- lib/ecoportal/api/graphql/helpers.rb
|
|
404
417
|
- lib/ecoportal/api/graphql/helpers/locations_tree.rb
|
|
405
418
|
- lib/ecoportal/api/graphql/input.rb
|
|
@@ -534,7 +547,9 @@ files:
|
|
|
534
547
|
- lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb
|
|
535
548
|
- lib/ecoportal/api/graphql/input/workflow_command/field_config/signature.rb
|
|
536
549
|
- lib/ecoportal/api/graphql/input/workflow_command/field_config/table.rb
|
|
550
|
+
- lib/ecoportal/api/graphql/input/workflow_command/manage_copy_page_configuration.rb
|
|
537
551
|
- lib/ecoportal/api/graphql/input/workflow_command/move_field.rb
|
|
552
|
+
- lib/ecoportal/api/graphql/input/workflow_command/move_section_to_stage.rb
|
|
538
553
|
- lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb
|
|
539
554
|
- lib/ecoportal/api/graphql/input/workflow_command/move_viewable_field.rb
|
|
540
555
|
- lib/ecoportal/api/graphql/input/workflow_command/remove_action_tag.rb
|
|
@@ -625,7 +640,23 @@ files:
|
|
|
625
640
|
- lib/ecoportal/api/graphql/model/preview_page.rb
|
|
626
641
|
- lib/ecoportal/api/graphql/model/register.rb
|
|
627
642
|
- lib/ecoportal/api/graphql/model/resource.rb
|
|
643
|
+
- lib/ecoportal/api/graphql/model/temp_image.rb
|
|
628
644
|
- lib/ecoportal/api/graphql/model/template.rb
|
|
645
|
+
- lib/ecoportal/api/graphql/model/template/binding.rb
|
|
646
|
+
- lib/ecoportal/api/graphql/model/template/change_log_entry.rb
|
|
647
|
+
- lib/ecoportal/api/graphql/model/template/command_grouper.rb
|
|
648
|
+
- lib/ecoportal/api/graphql/model/template/command_normalizer.rb
|
|
649
|
+
- lib/ecoportal/api/graphql/model/template/command_synthesis.rb
|
|
650
|
+
- lib/ecoportal/api/graphql/model/template/field.rb
|
|
651
|
+
- lib/ecoportal/api/graphql/model/template/force.rb
|
|
652
|
+
- lib/ecoportal/api/graphql/model/template/helper.rb
|
|
653
|
+
- lib/ecoportal/api/graphql/model/template/instance.rb
|
|
654
|
+
- lib/ecoportal/api/graphql/model/template/node.rb
|
|
655
|
+
- lib/ecoportal/api/graphql/model/template/option.rb
|
|
656
|
+
- lib/ecoportal/api/graphql/model/template/read.rb
|
|
657
|
+
- lib/ecoportal/api/graphql/model/template/section.rb
|
|
658
|
+
- lib/ecoportal/api/graphql/model/template/stage.rb
|
|
659
|
+
- lib/ecoportal/api/graphql/model/template/staged_executor.rb
|
|
629
660
|
- lib/ecoportal/api/graphql/model/user.rb
|
|
630
661
|
- lib/ecoportal/api/graphql/mutation.rb
|
|
631
662
|
- lib/ecoportal/api/graphql/mutation/action.rb
|
|
@@ -642,6 +673,8 @@ files:
|
|
|
642
673
|
- lib/ecoportal/api/graphql/mutation/contractor_entity/update_manager_settings.rb
|
|
643
674
|
- lib/ecoportal/api/graphql/mutation/file_container.rb
|
|
644
675
|
- lib/ecoportal/api/graphql/mutation/file_container/upload.rb
|
|
676
|
+
- lib/ecoportal/api/graphql/mutation/image.rb
|
|
677
|
+
- lib/ecoportal/api/graphql/mutation/image/upload.rb
|
|
645
678
|
- lib/ecoportal/api/graphql/mutation/kickstand.rb
|
|
646
679
|
- lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_jobs.rb
|
|
647
680
|
- lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_workflows.rb
|
|
@@ -706,6 +739,7 @@ files:
|
|
|
706
739
|
- lib/ecoportal/api/graphql/payload/contractor_entity/update.rb
|
|
707
740
|
- lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb
|
|
708
741
|
- lib/ecoportal/api/graphql/payload/force_commands.rb
|
|
742
|
+
- lib/ecoportal/api/graphql/payload/images_upload.rb
|
|
709
743
|
- lib/ecoportal/api/graphql/payload/kickstand.rb
|
|
710
744
|
- lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb
|
|
711
745
|
- lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb
|
|
@@ -764,8 +798,10 @@ files:
|
|
|
764
798
|
- lib/ecoportal/api/graphql/query/pages_workflow_commands.rb
|
|
765
799
|
- lib/ecoportal/api/graphql/query/permissions.rb
|
|
766
800
|
- lib/ecoportal/api/graphql/query/person_member_changelogs.rb
|
|
801
|
+
- lib/ecoportal/api/graphql/query/person_members.rb
|
|
767
802
|
- lib/ecoportal/api/graphql/query/register_preset_views.rb
|
|
768
803
|
- lib/ecoportal/api/graphql/query/register_preview_pages.rb
|
|
804
|
+
- lib/ecoportal/api/graphql/query/template_change_log.rb
|
|
769
805
|
- lib/ecoportal/api/graphql/query/templates.rb
|
|
770
806
|
- lib/ecoportal/api/graphql_version.rb
|
|
771
807
|
homepage: https://www.ecoportal.com
|
data/README.md
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
# Ecoportal::API::GraphQL
|
|
2
|
-
|
|
3
|
-
This is a basic collection of helpers that can be used to interact with the
|
|
4
|
-
[ecoPortal](https://www.ecoportal.com) `GraphQL` API
|
|
5
|
-
|
|
6
|
-
## Installation
|
|
7
|
-
|
|
8
|
-
Add this line to your application's Gemfile:
|
|
9
|
-
|
|
10
|
-
```ruby
|
|
11
|
-
gem 'ecoportal-api-graphql', require: %w[ecoportal/api-graphql]
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
And then execute:
|
|
15
|
-
|
|
16
|
-
$ bundle
|
|
17
|
-
|
|
18
|
-
Or install it yourself as:
|
|
19
|
-
|
|
20
|
-
$ gem install ecoportal-api-graphql
|
|
21
|
-
|
|
22
|
-
## Changelog
|
|
23
|
-
|
|
24
|
-
See {file:CHANGELOG.md} for a list of changes.
|
|
@@ -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`
|