ecoportal-api-graphql 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +363 -1
- data/LICENSE +21 -21
- data/README.md +24 -24
- data/lib/ecoportal/api/common/graphql/auth_service.rb +115 -115
- data/lib/ecoportal/api/common/graphql/class_helpers.rb +46 -46
- data/lib/ecoportal/api/common/graphql/client.rb +69 -69
- data/lib/ecoportal/api/common/graphql/hash_helpers.rb +105 -105
- data/lib/ecoportal/api/common/graphql/http_client.rb +85 -2
- data/lib/ecoportal/api/common/graphql/model/as_input.rb +54 -54
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +49 -49
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +188 -188
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff.rb +55 -55
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff_nesting.rb +295 -295
- data/lib/ecoportal/api/common/graphql/model.rb +17 -17
- data/lib/ecoportal/api/common/graphql/patches.rb +1 -1
- data/lib/ecoportal/api/common/graphql/query_integration.rb +45 -45
- data/lib/ecoportal/api/common/graphql.rb +16 -16
- data/lib/ecoportal/api/common.graphql.rb +8 -8
- data/lib/ecoportal/api/graphql/base/action_category.rb +15 -15
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +1 -1
- data/lib/ecoportal/api/graphql/base/contractor_entity.rb +24 -24
- data/lib/ecoportal/api/graphql/base/date_time.rb +12 -12
- data/lib/ecoportal/api/graphql/base/delta_result.rb +16 -16
- data/lib/ecoportal/api/graphql/base/field.rb +12 -12
- data/lib/ecoportal/api/graphql/base/file_attachment.rb +15 -15
- data/lib/ecoportal/api/graphql/base/location_node.rb +14 -14
- data/lib/ecoportal/api/graphql/base/location_structure/draft/structure.rb +37 -37
- data/lib/ecoportal/api/graphql/base/location_structure/draft.rb +93 -93
- data/lib/ecoportal/api/graphql/base/page/data_field/actions_list.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/ai_summary.rb +18 -18
- data/lib/ecoportal/api/graphql/base/page/data_field/checklist.rb +29 -29
- data/lib/ecoportal/api/graphql/base/page/data_field/cross_reference.rb +1 -1
- data/lib/ecoportal/api/graphql/base/page/data_field/date_field.rb +23 -23
- data/lib/ecoportal/api/graphql/base/page/data_field/geo.rb +24 -24
- data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +1 -1
- data/lib/ecoportal/api/graphql/base/page/data_field/law.rb +8 -8
- data/lib/ecoportal/api/graphql/base/page/data_field/mailbox.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/plain_text.rb +17 -17
- data/lib/ecoportal/api/graphql/base/page/data_field/rich_text.rb +26 -26
- data/lib/ecoportal/api/graphql/base/page/data_field/signature.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/smart_fill.rb +17 -17
- data/lib/ecoportal/api/graphql/base/page/data_field/table.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/tag_field.rb +21 -21
- data/lib/ecoportal/api/graphql/base/page/phased/stage.rb +51 -0
- data/lib/ecoportal/api/graphql/base/page/phased.rb +15 -15
- data/lib/ecoportal/api/graphql/base/page/section.rb +48 -48
- data/lib/ecoportal/api/graphql/base/page_info.rb +12 -12
- data/lib/ecoportal/api/graphql/base/pages_workflow/operation_interface.rb +39 -39
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/assign_to.rb +27 -27
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/send_notification.rb +30 -30
- data/lib/ecoportal/api/graphql/base/pages_workflow/recipient_config.rb +34 -34
- data/lib/ecoportal/api/graphql/base/pages_workflow.rb +35 -35
- data/lib/ecoportal/api/graphql/base/person_member.rb +22 -22
- data/lib/ecoportal/api/graphql/base/preview_page.rb +23 -23
- data/lib/ecoportal/api/graphql/base/register.rb +1 -1
- data/lib/ecoportal/api/graphql/base/resource.rb +13 -13
- data/lib/ecoportal/api/graphql/base/template/change_log_entry.rb +118 -0
- data/lib/ecoportal/api/graphql/base/template.rb +2 -0
- data/lib/ecoportal/api/graphql/builder/action.rb +41 -41
- data/lib/ecoportal/api/graphql/builder/location_structure/draft.rb +64 -64
- data/lib/ecoportal/api/graphql/builder/location_structure.rb +40 -40
- data/lib/ecoportal/api/graphql/builder/register/preset_view.rb +84 -84
- data/lib/ecoportal/api/graphql/builder/register.rb +49 -49
- data/lib/ecoportal/api/graphql/builder/template.rb +28 -0
- data/lib/ecoportal/api/graphql/builder/template_builder.rb +21 -2
- data/lib/ecoportal/api/graphql/compat/page_reference.rb +23 -23
- data/lib/ecoportal/api/graphql/compat/registers.rb +84 -84
- data/lib/ecoportal/api/graphql/compat/search_results.rb +33 -33
- data/lib/ecoportal/api/graphql/compat.rb +17 -17
- data/lib/ecoportal/api/graphql/concerns/data_field_access.rb +71 -71
- data/lib/ecoportal/api/graphql/concerns/fragment_definitions.rb +68 -68
- data/lib/ecoportal/api/graphql/concerns/snake_camel_access.rb +60 -60
- data/lib/ecoportal/api/graphql/connection/preset_view.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/template_change_log.rb +19 -0
- data/lib/ecoportal/api/graphql/connection.rb +1 -0
- data/lib/ecoportal/api/graphql/diff/change.rb +7 -2
- data/lib/ecoportal/api/graphql/diff/command_synthesizer.rb +19 -1
- data/lib/ecoportal/api/graphql/diff/version_diff.rb +13 -6
- data/lib/ecoportal/api/graphql/error/locations_error/fetch_nested.rb +51 -51
- data/lib/ecoportal/api/graphql/error/locations_error.rb +28 -28
- data/lib/ecoportal/api/graphql/error/locations_validation_error.rb +20 -20
- data/lib/ecoportal/api/graphql/error/validation_errors.rb +28 -28
- data/lib/ecoportal/api/graphql/error.rb +12 -12
- data/lib/ecoportal/api/graphql/file_upload.rb +10 -10
- data/lib/ecoportal/api/graphql/fragment/action.rb +65 -65
- data/lib/ecoportal/api/graphql/fragment/action_category.rb +17 -17
- data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +20 -20
- data/lib/ecoportal/api/graphql/fragment/locations_error.rb +19 -19
- data/lib/ecoportal/api/graphql/fragment/page.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/pages/common_page_union.rb +2 -0
- data/lib/ecoportal/api/graphql/fragment/pages.rb +15 -15
- data/lib/ecoportal/api/graphql/fragment/pagination.rb +17 -17
- data/lib/ecoportal/api/graphql/fragment/template_change_log.rb +102 -0
- data/lib/ecoportal/api/graphql/fragment.rb +1 -0
- data/lib/ecoportal/api/graphql/helpers/locations_tree.rb +41 -41
- data/lib/ecoportal/api/graphql/helpers.rb +10 -10
- data/lib/ecoportal/api/graphql/input/action/archive.rb +14 -14
- data/lib/ecoportal/api/graphql/input/action/create.rb +13 -13
- data/lib/ecoportal/api/graphql/input/action.rb +14 -14
- data/lib/ecoportal/api/graphql/input/contractor_entity/create.rb +14 -14
- data/lib/ecoportal/api/graphql/input/contractor_entity/destroy.rb +13 -13
- data/lib/ecoportal/api/graphql/input/delta_input.rb +16 -16
- data/lib/ecoportal/api/graphql/input/id_diff.rb +11 -11
- data/lib/ecoportal/api/graphql/input/location_structure/archive_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/delete_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/draft/create.rb +15 -15
- data/lib/ecoportal/api/graphql/input/location_structure/draft/delete.rb +15 -15
- data/lib/ecoportal/api/graphql/input/location_structure/draft/drop_bad_commands.rb +16 -16
- data/lib/ecoportal/api/graphql/input/location_structure/draft/publish.rb +16 -16
- data/lib/ecoportal/api/graphql/input/location_structure/draft.rb +19 -19
- data/lib/ecoportal/api/graphql/input/location_structure/insert_command.rb +21 -13
- data/lib/ecoportal/api/graphql/input/location_structure/move_command.rb +14 -14
- data/lib/ecoportal/api/graphql/input/location_structure/reorder_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure/unarchive_command.rb +13 -13
- data/lib/ecoportal/api/graphql/input/location_structure.rb +20 -20
- data/lib/ecoportal/api/graphql/input/page/archive.rb +14 -14
- data/lib/ecoportal/api/graphql/input/page/build_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/create_draft.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/create_from_template.rb +18 -18
- data/lib/ecoportal/api/graphql/input/page/delete_draft.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/publish_draft.rb +13 -13
- data/lib/ecoportal/api/graphql/input/page/review_task.rb +27 -14
- data/lib/ecoportal/api/graphql/input/page/unarchive.rb +14 -14
- data/lib/ecoportal/api/graphql/input/page.rb +26 -26
- data/lib/ecoportal/api/graphql/input/preset_view/create.rb +18 -18
- data/lib/ecoportal/api/graphql/input/preset_view/permission.rb +16 -16
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +1 -1
- data/lib/ecoportal/api/graphql/input/preset_view.rb +14 -14
- data/lib/ecoportal/api/graphql/input/register/create.rb +18 -18
- data/lib/ecoportal/api/graphql/input/register/update.rb +15 -15
- data/lib/ecoportal/api/graphql/input/register.rb +13 -13
- data/lib/ecoportal/api/graphql/input/search.rb +13 -13
- data/lib/ecoportal/api/graphql/input/search_conf/ai_generator.rb +234 -234
- data/lib/ecoportal/api/graphql/input/search_filter.rb +12 -12
- data/lib/ecoportal/api/graphql/input/search_sorter.rb +11 -11
- data/lib/ecoportal/api/graphql/input/workflow_command/add_action_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_comment_tagging_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_field.rb +10 -9
- data/lib/ecoportal/api/graphql/input/workflow_command/add_force.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_field_config.rb +23 -23
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_helper.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_action_type.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_filter.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_people_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_task_config.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback.rb +23 -23
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback_action.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_select_field_option.rb +25 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task_assignment_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_workflow_callback.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/collapse_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_creator_permissions.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_default_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +7 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_force.rb +21 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_gauge_field_stop.rb +19 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_field_config.rb +19 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_helper.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_reminder.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_required_sign_offs.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_comment_tagging.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_task_assignment.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_scheduled_callback.rb +22 -22
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_section_header.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_select_field_option.rb +23 -19
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_task_due.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_basic_settings.rb +7 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_trigger.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/expand_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/contractor_entities.rb +28 -24
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +8 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/gauge.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/location_field.rb +24 -24
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +8 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/signature.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/table.rb +25 -25
- data/lib/ecoportal/api/graphql/input/workflow_command/manage_copy_page_configuration.rb +47 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_action_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_callback.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_comment_tagging_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_force.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_helper.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_action_type.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_filter.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_people_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_task_config.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_scheduled_callback.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_assignment_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_due.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_priority_level.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +3 -0
- data/lib/ecoportal/api/graphql/interface/base_page.rb +14 -0
- data/lib/ecoportal/api/graphql/interface/location_structure/node.rb +43 -43
- data/lib/ecoportal/api/graphql/interface/location_structure.rb +14 -14
- data/lib/ecoportal/api/graphql/interface.rb +11 -11
- data/lib/ecoportal/api/graphql/logic/base_model.rb +15 -15
- data/lib/ecoportal/api/graphql/logic/base_query.rb +260 -193
- data/lib/ecoportal/api/graphql/logic/mutation.rb +59 -59
- data/lib/ecoportal/api/graphql/logic/payload.rb +42 -42
- data/lib/ecoportal/api/graphql/logic/query.rb +23 -23
- data/lib/ecoportal/api/graphql/logic/query_array.rb +30 -30
- data/lib/ecoportal/api/graphql/logic/query_connection.rb +48 -48
- data/lib/ecoportal/api/graphql/logic.rb +18 -18
- data/lib/ecoportal/api/graphql/model/account.rb +15 -15
- data/lib/ecoportal/api/graphql/model/action.rb +22 -22
- data/lib/ecoportal/api/graphql/model/ai_summary_version.rb +10 -10
- data/lib/ecoportal/api/graphql/model/contractor_entity.rb +12 -12
- data/lib/ecoportal/api/graphql/model/field.rb +10 -10
- data/lib/ecoportal/api/graphql/model/file_attachment.rb +10 -10
- data/lib/ecoportal/api/graphql/model/file_container.rb +11 -11
- data/lib/ecoportal/api/graphql/model/location_node.rb +14 -14
- data/lib/ecoportal/api/graphql/model/location_structure/draft/structure.rb +15 -15
- data/lib/ecoportal/api/graphql/model/location_structure/draft.rb +15 -15
- data/lib/ecoportal/api/graphql/model/location_structure.rb +16 -16
- data/lib/ecoportal/api/graphql/model/organization.rb +9 -0
- data/lib/ecoportal/api/graphql/model/page/basic.rb +14 -14
- data/lib/ecoportal/api/graphql/model/page/data_field.rb +12 -12
- data/lib/ecoportal/api/graphql/model/page/phased/stage.rb +14 -14
- data/lib/ecoportal/api/graphql/model/page/phased.rb +17 -0
- data/lib/ecoportal/api/graphql/model/page/section.rb +12 -12
- data/lib/ecoportal/api/graphql/model/page_union.rb +21 -21
- data/lib/ecoportal/api/graphql/model/pages_workflow.rb +20 -20
- data/lib/ecoportal/api/graphql/model/preset_view.rb +10 -10
- data/lib/ecoportal/api/graphql/model/preview_page.rb +10 -10
- data/lib/ecoportal/api/graphql/model/register.rb +10 -10
- data/lib/ecoportal/api/graphql/model/resource.rb +13 -13
- data/lib/ecoportal/api/graphql/model/template/change_log_entry.rb +19 -0
- data/lib/ecoportal/api/graphql/model/template.rb +4 -1
- data/lib/ecoportal/api/graphql/model/user.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/action/archive.rb +41 -41
- data/lib/ecoportal/api/graphql/mutation/action/create.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/action/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/action.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/ai_summary.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/create.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/destroy.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/add_commands.rb +55 -55
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/create.rb +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/delete.rb +43 -43
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/drop_bad_commands.rb +56 -56
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/publish.rb +66 -66
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft.rb +18 -18
- data/lib/ecoportal/api/graphql/mutation/location_structure.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/archive.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/build_from_template.rb +50 -50
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/create_from_template.rb +43 -43
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/unarchive.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page.rb +28 -28
- data/lib/ecoportal/api/graphql/mutation/preset_view/create.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/preset_view/permission.rb +37 -37
- data/lib/ecoportal/api/graphql/mutation/preset_view/update.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/preset_view.rb +15 -15
- data/lib/ecoportal/api/graphql/mutation/register/create.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/register/update.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/register.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/action/archive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/action/create.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/action/update.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/action.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/ai_summary_generate.rb +12 -12
- data/lib/ecoportal/api/graphql/payload/contractor_entity/create.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/contractor_entity/destroy.rb +12 -12
- data/lib/ecoportal/api/graphql/payload/contractor_entity/update.rb +12 -12
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb +2 -2
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb +2 -2
- data/lib/ecoportal/api/graphql/payload/location_structure/apply_commands.rb +51 -51
- data/lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb +50 -50
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb +30 -30
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/delete.rb +30 -30
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/drop_bad_commands.rb +43 -43
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/publish.rb +63 -63
- data/lib/ecoportal/api/graphql/payload/location_structure/draft.rb +18 -18
- data/lib/ecoportal/api/graphql/payload/location_structure.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/archive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/build_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/create_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/unarchive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/update.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/register.rb +1 -1
- data/lib/ecoportal/api/graphql/query/action.rb +33 -33
- data/lib/ecoportal/api/graphql/query/action_categories.rb +53 -53
- data/lib/ecoportal/api/graphql/query/actions.rb +43 -43
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +53 -53
- data/lib/ecoportal/api/graphql/query/file_upload_signature.rb +76 -76
- data/lib/ecoportal/api/graphql/query/location_classifications.rb +39 -39
- data/lib/ecoportal/api/graphql/query/page_delta.rb +47 -47
- data/lib/ecoportal/api/graphql/query/pages.rb +59 -59
- data/lib/ecoportal/api/graphql/query/person_members.rb +76 -0
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +1 -1
- data/lib/ecoportal/api/graphql/query/register_preview_pages.rb +83 -83
- data/lib/ecoportal/api/graphql/query/template_change_log.rb +118 -0
- data/lib/ecoportal/api/graphql/query/templates.rb +53 -53
- data/lib/ecoportal/api/graphql/query.rb +2 -0
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- data/lib/ecoportal/api-graphql.rb +10 -10
- metadata +10 -8
- data/lib/ecoportal/api/common/graphql/CLAUDE.md +0 -36
- data/lib/ecoportal/api/common/graphql/model/CLAUDE.md +0 -28
- data/lib/ecoportal/api/graphql/CLAUDE.md +0 -37
- data/lib/ecoportal/api/graphql/base/CLAUDE.md +0 -50
- data/lib/ecoportal/api/graphql/builder/CLAUDE.md +0 -65
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Query
|
|
5
|
-
# Cache-invalidation query: given a list of (id, deltaAt) pairs, returns
|
|
6
|
-
# which pages have been UPDATED since that timestamp, are NOT_FOUND (deleted/
|
|
7
|
-
# inaccessible), or are NEW (id not recognised by the server).
|
|
8
|
-
#
|
|
9
|
-
# Usage:
|
|
10
|
-
# Query::PageDelta.new(client).query(
|
|
11
|
-
# deltaInput: [
|
|
12
|
-
# { id: 'abc', deltaAt: '2026-01-01T00:00:00Z' },
|
|
13
|
-
# { id: 'def', deltaAt: '2026-03-15T12:00:00Z' }
|
|
14
|
-
# ]
|
|
15
|
-
# )
|
|
16
|
-
# # => [DeltaResult(id: 'abc', delta: 'UPDATED'), ...]
|
|
17
|
-
class PageDelta < Logic::QueryArray
|
|
18
|
-
field_name :pageDelta
|
|
19
|
-
|
|
20
|
-
accepted_params :deltaInput, :searchConf
|
|
21
|
-
|
|
22
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Base::DeltaResult'
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
def basic_block(&block)
|
|
27
|
-
item_block = block || default_block
|
|
28
|
-
proc {
|
|
29
|
-
query(deltaInput: :'[DeltaInput!]!', searchConf: :Search) {
|
|
30
|
-
currentOrganization {
|
|
31
|
-
pageDelta(deltaInput: :deltaInput, searchConf: :searchConf, &item_block)
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def default_block
|
|
38
|
-
proc {
|
|
39
|
-
id
|
|
40
|
-
delta
|
|
41
|
-
}
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
47
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Query
|
|
5
|
+
# Cache-invalidation query: given a list of (id, deltaAt) pairs, returns
|
|
6
|
+
# which pages have been UPDATED since that timestamp, are NOT_FOUND (deleted/
|
|
7
|
+
# inaccessible), or are NEW (id not recognised by the server).
|
|
8
|
+
#
|
|
9
|
+
# Usage:
|
|
10
|
+
# Query::PageDelta.new(client).query(
|
|
11
|
+
# deltaInput: [
|
|
12
|
+
# { id: 'abc', deltaAt: '2026-01-01T00:00:00Z' },
|
|
13
|
+
# { id: 'def', deltaAt: '2026-03-15T12:00:00Z' }
|
|
14
|
+
# ]
|
|
15
|
+
# )
|
|
16
|
+
# # => [DeltaResult(id: 'abc', delta: 'UPDATED'), ...]
|
|
17
|
+
class PageDelta < Logic::QueryArray
|
|
18
|
+
field_name :pageDelta
|
|
19
|
+
|
|
20
|
+
accepted_params :deltaInput, :searchConf
|
|
21
|
+
|
|
22
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Base::DeltaResult'
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def basic_block(&block)
|
|
27
|
+
item_block = block || default_block
|
|
28
|
+
proc {
|
|
29
|
+
query(deltaInput: :'[DeltaInput!]!', searchConf: :Search) {
|
|
30
|
+
currentOrganization {
|
|
31
|
+
pageDelta(deltaInput: :deltaInput, searchConf: :searchConf, &item_block)
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def default_block
|
|
38
|
+
proc {
|
|
39
|
+
id
|
|
40
|
+
delta
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -1,59 +1,59 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Query
|
|
5
|
-
# DB-backed full-data org search — returns PageUnion nodes with patchVer and field IDs.
|
|
6
|
-
# Required pre-update fetch: always use this (not RegisterPreviewPages) before updatePage.
|
|
7
|
-
# See .ai-assistance/code/search_filters.md — "The Required Pattern: Find Before Mutate".
|
|
8
|
-
class Pages < Logic::QueryConnection
|
|
9
|
-
field_name :pages
|
|
10
|
-
# Response nests under currentOrganization.pages; needed when instantiated
|
|
11
|
-
# directly (e.g. Compat::Pages#each) rather than via the currentOrganization proxy.
|
|
12
|
-
base_path 'currentOrganization'
|
|
13
|
-
|
|
14
|
-
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PageUnion'
|
|
15
|
-
class_resolver :connection_class, 'Ecoportal::API::GraphQL::Connection::Page'
|
|
16
|
-
|
|
17
|
-
private
|
|
18
|
-
|
|
19
|
-
def basic_block(&block)
|
|
20
|
-
connection_block = block || default_connection_block
|
|
21
|
-
proc {
|
|
22
|
-
query(
|
|
23
|
-
searchConf: :Search,
|
|
24
|
-
after: :string,
|
|
25
|
-
before: :string,
|
|
26
|
-
first: :int,
|
|
27
|
-
last: :int
|
|
28
|
-
) {
|
|
29
|
-
currentOrganization {
|
|
30
|
-
pages(
|
|
31
|
-
searchConf: :searchConf,
|
|
32
|
-
after: :after,
|
|
33
|
-
before: :before,
|
|
34
|
-
first: :first,
|
|
35
|
-
last: :last,
|
|
36
|
-
&connection_block
|
|
37
|
-
)
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
end
|
|
42
|
-
|
|
43
|
-
def default_connection_block
|
|
44
|
-
proc {
|
|
45
|
-
totalCount
|
|
46
|
-
pageInfo {
|
|
47
|
-
endCursor
|
|
48
|
-
hasNextPage
|
|
49
|
-
}
|
|
50
|
-
nodes {
|
|
51
|
-
spread :PageFields
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
end
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
end
|
|
58
|
-
end
|
|
59
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Query
|
|
5
|
+
# DB-backed full-data org search — returns PageUnion nodes with patchVer and field IDs.
|
|
6
|
+
# Required pre-update fetch: always use this (not RegisterPreviewPages) before updatePage.
|
|
7
|
+
# See .ai-assistance/code/search_filters.md — "The Required Pattern: Find Before Mutate".
|
|
8
|
+
class Pages < Logic::QueryConnection
|
|
9
|
+
field_name :pages
|
|
10
|
+
# Response nests under currentOrganization.pages; needed when instantiated
|
|
11
|
+
# directly (e.g. Compat::Pages#each) rather than via the currentOrganization proxy.
|
|
12
|
+
base_path 'currentOrganization'
|
|
13
|
+
|
|
14
|
+
class_resolver :item_class, 'Ecoportal::API::GraphQL::Model::PageUnion'
|
|
15
|
+
class_resolver :connection_class, 'Ecoportal::API::GraphQL::Connection::Page'
|
|
16
|
+
|
|
17
|
+
private
|
|
18
|
+
|
|
19
|
+
def basic_block(&block)
|
|
20
|
+
connection_block = block || default_connection_block
|
|
21
|
+
proc {
|
|
22
|
+
query(
|
|
23
|
+
searchConf: :Search,
|
|
24
|
+
after: :string,
|
|
25
|
+
before: :string,
|
|
26
|
+
first: :int,
|
|
27
|
+
last: :int
|
|
28
|
+
) {
|
|
29
|
+
currentOrganization {
|
|
30
|
+
pages(
|
|
31
|
+
searchConf: :searchConf,
|
|
32
|
+
after: :after,
|
|
33
|
+
before: :before,
|
|
34
|
+
first: :first,
|
|
35
|
+
last: :last,
|
|
36
|
+
&connection_block
|
|
37
|
+
)
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
def default_connection_block
|
|
44
|
+
proc {
|
|
45
|
+
totalCount
|
|
46
|
+
pageInfo {
|
|
47
|
+
endCursor
|
|
48
|
+
hasNextPage
|
|
49
|
+
}
|
|
50
|
+
nodes {
|
|
51
|
+
spread :PageFields
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Query
|
|
5
|
+
# Lists +PersonMember+ nodes for the current organization via the
|
|
6
|
+
# GraphQL-native +organization.personMembers+ connection.
|
|
7
|
+
#
|
|
8
|
+
# This is the GraphQL-native people-directory path. It is INDEPENDENTLY
|
|
9
|
+
# USEFUL (it fills the long-standing gap flagged in
|
|
10
|
+
# +model/organization.rb+) but note: it is NOT the SCIM-sourced People
|
|
11
|
+
# replacement that customer integrations are migrating to before the
|
|
12
|
+
# APIv0 retirement, whose deadline has passed. That port is scoped in
|
|
13
|
+
# the +ecoportal-scim+ gem, project +apiv0-people-adapter+ -- not here.
|
|
14
|
+
#
|
|
15
|
+
# The default node selection intentionally inlines the fields declared on
|
|
16
|
+
# +Base::PersonMember+ rather than a +spread :PersonMember+, because no
|
|
17
|
+
# +PersonMember+ fragment is registered yet (a spread of an unregistered
|
|
18
|
+
# fragment raises at render time).
|
|
19
|
+
class PersonMembers < Logic::QueryConnection
|
|
20
|
+
field_name :personMembers
|
|
21
|
+
|
|
22
|
+
class_resolver :item_class, Model::PersonMember
|
|
23
|
+
class_resolver :connection_class, Connection::PersonMemberConnection
|
|
24
|
+
|
|
25
|
+
private
|
|
26
|
+
|
|
27
|
+
def basic_block(&block)
|
|
28
|
+
connection_block = block || default_connection_block
|
|
29
|
+
proc {
|
|
30
|
+
query(
|
|
31
|
+
searchConf: :Search,
|
|
32
|
+
includeArchived: :boolean,
|
|
33
|
+
after: :string,
|
|
34
|
+
before: :string,
|
|
35
|
+
first: :int,
|
|
36
|
+
last: :int
|
|
37
|
+
) {
|
|
38
|
+
currentOrganization {
|
|
39
|
+
personMembers(
|
|
40
|
+
searchConf: :searchConf,
|
|
41
|
+
includeArchived: :includeArchived,
|
|
42
|
+
after: :after,
|
|
43
|
+
before: :before,
|
|
44
|
+
first: :first,
|
|
45
|
+
last: :last,
|
|
46
|
+
&connection_block
|
|
47
|
+
)
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def default_connection_block
|
|
54
|
+
proc {
|
|
55
|
+
totalCount
|
|
56
|
+
pageInfo {
|
|
57
|
+
endCursor
|
|
58
|
+
hasNextPage
|
|
59
|
+
}
|
|
60
|
+
nodes {
|
|
61
|
+
id
|
|
62
|
+
name
|
|
63
|
+
email
|
|
64
|
+
personSchemaId
|
|
65
|
+
contractorOrganizationId
|
|
66
|
+
userId
|
|
67
|
+
tagRestrict
|
|
68
|
+
userGroupIds
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
end
|
|
72
|
+
end
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
@@ -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
|