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,13 +1,13 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Base
|
|
5
|
-
class Resource < Logic::BaseModel
|
|
6
|
-
passkey :id
|
|
7
|
-
passthrough :fieldId, :pageId
|
|
8
|
-
passarray :stageIds
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class Resource < Logic::BaseModel
|
|
6
|
+
passkey :id
|
|
7
|
+
passthrough :fieldId, :pageId
|
|
8
|
+
passarray :stageIds
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
# The upload-staging model behind `uploadImage` -- explicitly NOT a `FileContainer`.
|
|
6
|
+
# Verified against the live ecoPortal server schema (read-only,
|
|
7
|
+
# /tmp/work/ecoPortal): `Types::Files::TempImageType` (`app/graphql/types/files/
|
|
8
|
+
# temp_image_type.rb`) declares exactly `id s3Key error complete`, backed by
|
|
9
|
+
# `Enzyme::ImageReference::TempImage` (`app/models/enzyme/image_reference.rb`), a
|
|
10
|
+
# separate upload-staging Mongoid model from `FileContainer`.
|
|
11
|
+
#
|
|
12
|
+
# `complete` starts `false` immediately after `uploadImage` returns and is filled in
|
|
13
|
+
# later by background processing. A consumer does NOT need to wait for it: confirmed
|
|
14
|
+
# server-side (`app/services/new_ep/pages/assign_attributes_service.rb`'s
|
|
15
|
+
# `set_image_gallery_attrs`) that attaching a `TempImage` to an Image Gallery field via
|
|
16
|
+
# `ImageInput.sourceId` succeeds whether or not `complete?`/`error?` is true yet -- an
|
|
17
|
+
# incomplete image is accepted and filled in on the record later.
|
|
18
|
+
class TempImage < Logic::BaseModel
|
|
19
|
+
read_only!
|
|
20
|
+
|
|
21
|
+
passkey :id
|
|
22
|
+
passthrough :s3Key, :error
|
|
23
|
+
passboolean :complete
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
module Template
|
|
6
|
+
# One entry of a TEMPLATE's change log — a single command the platform recorded
|
|
7
|
+
# against the template. Read-only.
|
|
8
|
+
#
|
|
9
|
+
# ── Where it comes from (verified in the Rails backend on 2026-08-19) ────────────
|
|
10
|
+
# `app/graphql/types/pages/template_type.rb` declares
|
|
11
|
+
# field :commands, Types::Pages::Interfaces::WorkflowCommandInterface.connection_type
|
|
12
|
+
# and resolves it as
|
|
13
|
+
# NewEp::Pages::Workflows::Commands::Base.where(page: object.page)
|
|
14
|
+
# .from_template_builder.order(_id: :desc)
|
|
15
|
+
#
|
|
16
|
+
# The narrow `Template` type itself is reachable as `template { ... }` on any page,
|
|
17
|
+
# because `app/graphql/types/pages/interfaces/base_page_interface.rb:27` declares
|
|
18
|
+
# field :template, Types::Pages::TemplateType, null: true
|
|
19
|
+
#
|
|
20
|
+
# ── ★ TWO ACCESS CAVEATS — both are silent, neither raises ─────────────────────
|
|
21
|
+
# 1. `commands` returns **nil**, not an empty connection, unless the caller satisfies
|
|
22
|
+
# `Pages::TemplatePolicy#update_information?` (`return unless allowed_to?(...)`).
|
|
23
|
+
# A read-only account therefore sees NO change log and gets no error saying so.
|
|
24
|
+
# Treat a nil connection as "not permitted", never as "nothing changed".
|
|
25
|
+
# 2. The scope is `.from_template_builder` — only `TEMPLATE_BUILDER`-sourced commands
|
|
26
|
+
# appear. `WORKFLOW_BUILDER` commands against the same page are EXCLUDED
|
|
27
|
+
# (`app/models/new_ep/pages/workflows/commands/base.rb`, `enum_field :feature_source`
|
|
28
|
+
# with values WORKFLOW_BUILDER / TEMPLATE_BUILDER). For the workflow-builder side of
|
|
29
|
+
# the same log see `Query::PagesWorkflowCommands`.
|
|
30
|
+
# Ordering is `_id: :desc` — newest first, server-side, not configurable.
|
|
31
|
+
#
|
|
32
|
+
# ── ★ WHY THIS LOG BEATS POLLING A WATERMARK ──────────────────────────────────
|
|
33
|
+
# `app/services/new_ep/pages/run_merged_forces.rb:17` writes with
|
|
34
|
+
# @page.timeless.skip_patch_incr.rewrite(only_if: { updated_at: @page.updated_at.utc })
|
|
35
|
+
# so a forces run bumps NEITHER `patchVer` NOR `updatedAt`. Any change tracker that
|
|
36
|
+
# polls a watermark is structurally blind to force-driven change; the command log is
|
|
37
|
+
# per-change and cannot be skipped that way.
|
|
38
|
+
# (OPEN: whether forces run against TEMPLATES specifically is NOT confirmed — do not
|
|
39
|
+
# assume either way.)
|
|
40
|
+
#
|
|
41
|
+
# ── Field set ─────────────────────────────────────────────────────────────────
|
|
42
|
+
# These are the fields of the INTERFACE `PagesWorkflowCommandInterface` only
|
|
43
|
+
# (`app/graphql/types/pages/interfaces/workflow_command_interface.rb`). The concrete
|
|
44
|
+
# implementing types add their own (`PagesWorkflowCommandChange.changes`,
|
|
45
|
+
# `PagesWorkflowCommandChangeMessage.changeMessages`,
|
|
46
|
+
# `PagesWorkflowCommandEsChange.changes`); `__typename` is passed through so a caller
|
|
47
|
+
# can branch, and those extras can be selected with an inline fragment or by reusing
|
|
48
|
+
# `Fragment :PagesWorkflowCommandFields`.
|
|
49
|
+
#
|
|
50
|
+
# Enum-valued fields are exposed as plain strings:
|
|
51
|
+
# - commandAction: WorkflowCommandActionEnum
|
|
52
|
+
class ChangeLogEntry < Logic::BaseModel
|
|
53
|
+
read_only!
|
|
54
|
+
|
|
55
|
+
passkey :id
|
|
56
|
+
# Concrete type name: 'PagesWorkflowCommandChange' | 'PagesWorkflowCommandChangeMessage'
|
|
57
|
+
# | 'PagesWorkflowCommandEsChange'.
|
|
58
|
+
passthrough :__typename
|
|
59
|
+
passthrough :commandAction
|
|
60
|
+
# Optimistic-concurrency token the command was recorded against (Int!).
|
|
61
|
+
passthrough :patchVer
|
|
62
|
+
# `owner` (the UserType embed) is added in Model::Template::ChangeLogEntry — Base
|
|
63
|
+
# loads before Model.
|
|
64
|
+
passthrough :ownerId
|
|
65
|
+
passthrough :stageId, :stageName
|
|
66
|
+
passthrough :taskId, :taskType
|
|
67
|
+
# What the command acted on. Resolved server-side from `targeted_resource` and
|
|
68
|
+
# nil for commands that target nothing.
|
|
69
|
+
passthrough :targetedResourceId, :targetedResourceName, :targetedResourceType
|
|
70
|
+
|
|
71
|
+
# `createdAt`/`updatedAt` are `DateTimeType` OBJECTS ({ dateTime, timeZone }), not
|
|
72
|
+
# scalars — hence an embed rather than `passdate`. Use `entry.createdAt.dateTime`.
|
|
73
|
+
embeds_one :createdAt, klass: Base::DateTime
|
|
74
|
+
embeds_one :updatedAt, klass: Base::DateTime
|
|
75
|
+
|
|
76
|
+
# ── What actually changed (only populated by the DETAIL selection) ──────────
|
|
77
|
+
# Present only when the node was selected with `Fragment :TemplateChangeLogEntryDetail`
|
|
78
|
+
# (see `Query::TemplateChangeLog.detail_block` / `api.template.change_log(detail: true)`).
|
|
79
|
+
# With the default light selection both readers are empty — empty means
|
|
80
|
+
# "not selected", NOT "nothing changed", exactly like the nil-connection caveat above.
|
|
81
|
+
#
|
|
82
|
+
# Deliberately raw hashes rather than a typed embed: the two `changes`-bearing types
|
|
83
|
+
# do not share a shape (`ChangeType.from/to` are Strings;
|
|
84
|
+
# `StoredEsFilterChangeType.from/to` are objects), so one typed model would have to
|
|
85
|
+
# lie about one of them. This mirrors `Base::PagesWorkflow::CommandChange#changes`,
|
|
86
|
+
# which does the same for the workflow-builder side of the same interface.
|
|
87
|
+
def changes
|
|
88
|
+
Array(doc['changes'])
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
passarray :changeMessages
|
|
92
|
+
|
|
93
|
+
# Which of the three concrete command types this entry is, as a symbol:
|
|
94
|
+
# :changes | :change_messages | :es_changes | nil (unknown/unselected `__typename`).
|
|
95
|
+
# Use it instead of string-matching `__typename` at call sites.
|
|
96
|
+
DETAIL_KINDS = {
|
|
97
|
+
'PagesWorkflowCommandChange' => :changes,
|
|
98
|
+
'PagesWorkflowCommandChangeMessage' => :change_messages,
|
|
99
|
+
'PagesWorkflowCommandEsChange' => :es_changes
|
|
100
|
+
}.freeze
|
|
101
|
+
|
|
102
|
+
def detail_kind
|
|
103
|
+
DETAIL_KINDS[__typename]
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
# True when this entry carries field-level detail. False both when the light
|
|
107
|
+
# selection was used and when a command genuinely recorded no changes -- those two
|
|
108
|
+
# are indistinguishable from the response alone, which is why the caller should know
|
|
109
|
+
# which selection it asked for.
|
|
110
|
+
def detail?
|
|
111
|
+
!changes.empty? || !changeMessages.to_a.empty?
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
116
|
+
end
|
|
117
|
+
end
|
|
118
|
+
end
|
|
@@ -15,6 +15,7 @@ require_relative 'base/location_structure'
|
|
|
15
15
|
require_relative 'base/person_member'
|
|
16
16
|
require_relative 'base/file_attachment'
|
|
17
17
|
require_relative 'base/file_container'
|
|
18
|
+
require_relative 'base/temp_image'
|
|
18
19
|
require_relative 'base/field'
|
|
19
20
|
require_relative 'base/page'
|
|
20
21
|
require_relative 'base/resource'
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Builder
|
|
5
|
-
class Action
|
|
6
|
-
attr_reader :client
|
|
7
|
-
|
|
8
|
-
def initialize(client)
|
|
9
|
-
@client = client
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def archive(**kargs, &block)
|
|
13
|
-
archiveMutation.query(**kargs, &block)
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def update(**kargs, &block)
|
|
17
|
-
updateMutation.query(**kargs, &block)
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def create(**kargs, &block)
|
|
21
|
-
createMutation.query(**kargs, &block)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
private
|
|
25
|
-
|
|
26
|
-
def archiveMutation
|
|
27
|
-
Mutation::Action::Archive.new(client)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def updateMutation
|
|
31
|
-
Mutation::Action::Update.new(client)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def createMutation
|
|
35
|
-
Mutation::Action::Create.new(client)
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Builder
|
|
5
|
+
class Action
|
|
6
|
+
attr_reader :client
|
|
7
|
+
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def archive(**kargs, &block)
|
|
13
|
+
archiveMutation.query(**kargs, &block)
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def update(**kargs, &block)
|
|
17
|
+
updateMutation.query(**kargs, &block)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def create(**kargs, &block)
|
|
21
|
+
createMutation.query(**kargs, &block)
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
private
|
|
25
|
+
|
|
26
|
+
def archiveMutation
|
|
27
|
+
Mutation::Action::Archive.new(client)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def updateMutation
|
|
31
|
+
Mutation::Action::Update.new(client)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def createMutation
|
|
35
|
+
Mutation::Action::Create.new(client)
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Builder
|
|
5
|
-
class LocationStructure
|
|
6
|
-
class Draft
|
|
7
|
-
attr_reader :client, :parent
|
|
8
|
-
|
|
9
|
-
def initialize(client, parent:)
|
|
10
|
-
@client = client
|
|
11
|
-
@parent = parent
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def nodeClassifications(**kargs, &block)
|
|
15
|
-
parent.nodeClassifications(**kargs, &block)
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def create(**kargs, &block)
|
|
19
|
-
createMutation.query(**kargs, &block)
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def addCommands(**kargs, &block)
|
|
23
|
-
addCommandsMutation.query(**kargs, &block)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def delete(**kargs, &block)
|
|
27
|
-
deleteMutation.query(**kargs, &block)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def publish(**kargs, &block)
|
|
31
|
-
publishMutation.query(**kargs, &block)
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
def DropBadCommands(**kargs, &block)
|
|
35
|
-
dropBadCommandsMutation.query(**kargs, &block)
|
|
36
|
-
end
|
|
37
|
-
|
|
38
|
-
private
|
|
39
|
-
|
|
40
|
-
def createMutation
|
|
41
|
-
Mutation::LocationStructure::Draft::Create.new(client)
|
|
42
|
-
end
|
|
43
|
-
|
|
44
|
-
def addCommandsMutation
|
|
45
|
-
Mutation::LocationStructure::Draft::AddCommands.new(client)
|
|
46
|
-
end
|
|
47
|
-
|
|
48
|
-
def deleteMutation
|
|
49
|
-
Mutation::LocationStructure::Draft::Delete.new(client)
|
|
50
|
-
end
|
|
51
|
-
|
|
52
|
-
def publishMutation
|
|
53
|
-
Mutation::LocationStructure::Draft::Publish.new(client)
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def dropBadCommandsMutation
|
|
57
|
-
Mutation::LocationStructure::Draft::DropBadCommands.new(client)
|
|
58
|
-
end
|
|
59
|
-
end
|
|
60
|
-
end
|
|
61
|
-
end
|
|
62
|
-
end
|
|
63
|
-
end
|
|
64
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Builder
|
|
5
|
+
class LocationStructure
|
|
6
|
+
class Draft
|
|
7
|
+
attr_reader :client, :parent
|
|
8
|
+
|
|
9
|
+
def initialize(client, parent:)
|
|
10
|
+
@client = client
|
|
11
|
+
@parent = parent
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def nodeClassifications(**kargs, &block)
|
|
15
|
+
parent.nodeClassifications(**kargs, &block)
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def create(**kargs, &block)
|
|
19
|
+
createMutation.query(**kargs, &block)
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def addCommands(**kargs, &block)
|
|
23
|
+
addCommandsMutation.query(**kargs, &block)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def delete(**kargs, &block)
|
|
27
|
+
deleteMutation.query(**kargs, &block)
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def publish(**kargs, &block)
|
|
31
|
+
publishMutation.query(**kargs, &block)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
def DropBadCommands(**kargs, &block)
|
|
35
|
+
dropBadCommandsMutation.query(**kargs, &block)
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
def createMutation
|
|
41
|
+
Mutation::LocationStructure::Draft::Create.new(client)
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def addCommandsMutation
|
|
45
|
+
Mutation::LocationStructure::Draft::AddCommands.new(client)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def deleteMutation
|
|
49
|
+
Mutation::LocationStructure::Draft::Delete.new(client)
|
|
50
|
+
end
|
|
51
|
+
|
|
52
|
+
def publishMutation
|
|
53
|
+
Mutation::LocationStructure::Draft::Publish.new(client)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def dropBadCommandsMutation
|
|
57
|
+
Mutation::LocationStructure::Draft::DropBadCommands.new(client)
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|
|
64
|
+
end
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Builder
|
|
5
|
-
class LocationStructure
|
|
6
|
-
attr_reader :client
|
|
7
|
-
|
|
8
|
-
def initialize(client)
|
|
9
|
-
@client = client
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def nodeClassifications(**kargs, &block)
|
|
13
|
-
query_model = Query::LocationClassifications.new(client)
|
|
14
|
-
query_model.query(**kargs, &block)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def applyCommandsInput
|
|
18
|
-
Input::LocationStructure::ApplyCommands.new
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def applyCommands(**kargs, &block)
|
|
22
|
-
applyCommandsMutation.query(**kargs, &block)
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def draft
|
|
26
|
-
LocationStructure::Draft.new(client, parent: self)
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
private
|
|
30
|
-
|
|
31
|
-
def applyCommandsMutation
|
|
32
|
-
Mutation::LocationStructure::ApplyCommands.new(client)
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
|
|
40
|
-
require_relative 'location_structure/draft'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Builder
|
|
5
|
+
class LocationStructure
|
|
6
|
+
attr_reader :client
|
|
7
|
+
|
|
8
|
+
def initialize(client)
|
|
9
|
+
@client = client
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def nodeClassifications(**kargs, &block)
|
|
13
|
+
query_model = Query::LocationClassifications.new(client)
|
|
14
|
+
query_model.query(**kargs, &block)
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def applyCommandsInput
|
|
18
|
+
Input::LocationStructure::ApplyCommands.new
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def applyCommands(**kargs, &block)
|
|
22
|
+
applyCommandsMutation.query(**kargs, &block)
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def draft
|
|
26
|
+
LocationStructure::Draft.new(client, parent: self)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
private
|
|
30
|
+
|
|
31
|
+
def applyCommandsMutation
|
|
32
|
+
Mutation::LocationStructure::ApplyCommands.new(client)
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
require_relative 'location_structure/draft'
|
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Builder
|
|
5
|
-
class Register
|
|
6
|
-
# Sub-builder for preset view operations within a register context.
|
|
7
|
-
# Access via: api.register.preset_view
|
|
8
|
-
#
|
|
9
|
-
# Usage:
|
|
10
|
-
# pv = api.register.preset_view
|
|
11
|
-
#
|
|
12
|
-
# # List preset views for a register (find IDs for presetViewId in searches)
|
|
13
|
-
# views = pv.list('REG_ID')
|
|
14
|
-
# views.map { |v| "#{v.name} (#{v.id}) global=#{v.global?}" }
|
|
15
|
-
#
|
|
16
|
-
# # Create a preset view
|
|
17
|
-
# pv.create(input: {
|
|
18
|
-
# registerId: 'REG_ID',
|
|
19
|
-
# name: 'Active Pages',
|
|
20
|
-
# customPresetView: true,
|
|
21
|
-
# fieldConfigs: [{ key: 'name', weight: 0 }, { key: 'state', weight: 1 }],
|
|
22
|
-
# sorter: { key: 'created_at', direction: 'desc' }
|
|
23
|
-
# })
|
|
24
|
-
#
|
|
25
|
-
# # Share with a user (view access)
|
|
26
|
-
# pv.permission(input: {
|
|
27
|
-
# id: 'VIEW_ID',
|
|
28
|
-
# permissions: [{ level: 'view', to: { userId: 'USER_ID' } }]
|
|
29
|
-
# })
|
|
30
|
-
class PresetView
|
|
31
|
-
attr_reader :client
|
|
32
|
-
|
|
33
|
-
def initialize(client)
|
|
34
|
-
@client = client
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
# List all preset views for a register. Returns an array of PresetView objects.
|
|
38
|
-
def list(register_id, search_conf: nil, &block)
|
|
39
|
-
Query::RegisterPresetViews.new(client).query(
|
|
40
|
-
registerId: register_id,
|
|
41
|
-
searchConf: search_conf,
|
|
42
|
-
&block
|
|
43
|
-
).nodes
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def create(**kargs, &block)
|
|
47
|
-
createMutation.query(**kargs, &block)
|
|
48
|
-
end
|
|
49
|
-
|
|
50
|
-
def update(**kargs, &block)
|
|
51
|
-
updateMutation.query(**kargs, &block)
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def permission(**kargs, &block)
|
|
55
|
-
permissionMutation.query(**kargs, &block)
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def destroy(**kargs, &block)
|
|
59
|
-
destroyMutation.query(**kargs, &block)
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
private
|
|
63
|
-
|
|
64
|
-
def createMutation
|
|
65
|
-
Mutation::PresetView::Create.new(client)
|
|
66
|
-
end
|
|
67
|
-
|
|
68
|
-
def updateMutation
|
|
69
|
-
Mutation::PresetView::Update.new(client)
|
|
70
|
-
end
|
|
71
|
-
|
|
72
|
-
def permissionMutation
|
|
73
|
-
Mutation::PresetView::Permission.new(client)
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
def destroyMutation
|
|
77
|
-
Mutation::PresetView::Destroy.new(client)
|
|
78
|
-
end
|
|
79
|
-
end
|
|
80
|
-
end
|
|
81
|
-
end
|
|
82
|
-
end
|
|
83
|
-
end
|
|
84
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Builder
|
|
5
|
+
class Register
|
|
6
|
+
# Sub-builder for preset view operations within a register context.
|
|
7
|
+
# Access via: api.register.preset_view
|
|
8
|
+
#
|
|
9
|
+
# Usage:
|
|
10
|
+
# pv = api.register.preset_view
|
|
11
|
+
#
|
|
12
|
+
# # List preset views for a register (find IDs for presetViewId in searches)
|
|
13
|
+
# views = pv.list('REG_ID')
|
|
14
|
+
# views.map { |v| "#{v.name} (#{v.id}) global=#{v.global?}" }
|
|
15
|
+
#
|
|
16
|
+
# # Create a preset view
|
|
17
|
+
# pv.create(input: {
|
|
18
|
+
# registerId: 'REG_ID',
|
|
19
|
+
# name: 'Active Pages',
|
|
20
|
+
# customPresetView: true,
|
|
21
|
+
# fieldConfigs: [{ key: 'name', weight: 0 }, { key: 'state', weight: 1 }],
|
|
22
|
+
# sorter: { key: 'created_at', direction: 'desc' }
|
|
23
|
+
# })
|
|
24
|
+
#
|
|
25
|
+
# # Share with a user (view access)
|
|
26
|
+
# pv.permission(input: {
|
|
27
|
+
# id: 'VIEW_ID',
|
|
28
|
+
# permissions: [{ level: 'view', to: { userId: 'USER_ID' } }]
|
|
29
|
+
# })
|
|
30
|
+
class PresetView
|
|
31
|
+
attr_reader :client
|
|
32
|
+
|
|
33
|
+
def initialize(client)
|
|
34
|
+
@client = client
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# List all preset views for a register. Returns an array of PresetView objects.
|
|
38
|
+
def list(register_id, search_conf: nil, &block)
|
|
39
|
+
Query::RegisterPresetViews.new(client).query(
|
|
40
|
+
registerId: register_id,
|
|
41
|
+
searchConf: search_conf,
|
|
42
|
+
&block
|
|
43
|
+
).nodes
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def create(**kargs, &block)
|
|
47
|
+
createMutation.query(**kargs, &block)
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def update(**kargs, &block)
|
|
51
|
+
updateMutation.query(**kargs, &block)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def permission(**kargs, &block)
|
|
55
|
+
permissionMutation.query(**kargs, &block)
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def destroy(**kargs, &block)
|
|
59
|
+
destroyMutation.query(**kargs, &block)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
private
|
|
63
|
+
|
|
64
|
+
def createMutation
|
|
65
|
+
Mutation::PresetView::Create.new(client)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def updateMutation
|
|
69
|
+
Mutation::PresetView::Update.new(client)
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def permissionMutation
|
|
73
|
+
Mutation::PresetView::Permission.new(client)
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def destroyMutation
|
|
77
|
+
Mutation::PresetView::Destroy.new(client)
|
|
78
|
+
end
|
|
79
|
+
end
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|