ecoportal-api-graphql 1.3.16 → 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 +746 -6
- data/LICENSE +21 -21
- data/README.md +24 -24
- data/lib/ecoportal/api/common/graphql/auth_service.rb +115 -115
- data/lib/ecoportal/api/common/graphql/class_helpers.rb +46 -46
- data/lib/ecoportal/api/common/graphql/client.rb +69 -69
- data/lib/ecoportal/api/common/graphql/hash_helpers.rb +105 -105
- data/lib/ecoportal/api/common/graphql/http_client.rb +85 -2
- data/lib/ecoportal/api/common/graphql/model/as_input.rb +54 -54
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +49 -49
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +188 -188
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff.rb +55 -55
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff_nesting.rb +295 -295
- data/lib/ecoportal/api/common/graphql/model/diffable/leaf_diff_service.rb +97 -0
- data/lib/ecoportal/api/common/graphql/model/diffable.rb +1 -0
- 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.rb +1 -1
- data/lib/ecoportal/api/graphql/base/action_category.rb +15 -15
- data/lib/ecoportal/api/graphql/base/action_event.rb +23 -0
- data/lib/ecoportal/api/graphql/base/action_event_page.rb +16 -0
- data/lib/ecoportal/api/graphql/base/activity.rb +38 -0
- data/lib/ecoportal/api/graphql/base/activity_log.rb +38 -0
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +13 -8
- data/lib/ecoportal/api/graphql/base/auth_log.rb +24 -0
- data/lib/ecoportal/api/graphql/base/authorization_result.rb +20 -0
- data/lib/ecoportal/api/graphql/base/contractor_entity/member_changes.rb +17 -5
- 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/file_container.rb +12 -4
- data/lib/ecoportal/api/graphql/base/location_classification_type.rb +2 -0
- 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/location_structure.rb +3 -0
- data/lib/ecoportal/api/graphql/base/minimal_dashboard.rb +25 -0
- data/lib/ecoportal/api/graphql/base/organization.rb +2 -0
- 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/contractor_entities.rb +26 -3
- 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/file_field.rb +47 -8
- 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 +6 -3
- 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/people.rb +50 -12
- 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/data_field.rb +12 -18
- 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/permissions.rb +15 -0
- data/lib/ecoportal/api/graphql/base/person_member.rb +22 -22
- data/lib/ecoportal/api/graphql/base/person_member_changelog.rb +23 -0
- data/lib/ecoportal/api/graphql/base/preset_view.rb +136 -1
- data/lib/ecoportal/api/graphql/base/preview_page.rb +23 -23
- data/lib/ecoportal/api/graphql/base/register.rb +6 -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/base.rb +9 -0
- data/lib/ecoportal/api/graphql/builder/action.rb +41 -41
- data/lib/ecoportal/api/graphql/builder/contractor_entity.rb +10 -0
- 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/page.rb +0 -16
- 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 +46 -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/pages.rb +7 -2
- data/lib/ecoportal/api/graphql/compat/registers.rb +84 -84
- data/lib/ecoportal/api/graphql/compat/response.rb +14 -0
- 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/concerns/threadable.rb +58 -0
- data/lib/ecoportal/api/graphql/concerns.rb +1 -0
- data/lib/ecoportal/api/graphql/connection/action.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/action_category.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/activity.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/activity_log.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/auth_log.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/contractor_entity.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/minimal_dashboard.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/page.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/pages_workflow_command.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/person_member.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/person_member_changelog.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/preset_view.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/preview_page.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/template_change_log.rb +19 -0
- data/lib/ecoportal/api/graphql/connection.rb +6 -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/pairing/signals.rb +21 -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 +199 -140
- 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/activity.rb +84 -0
- data/lib/ecoportal/api/graphql/fragment/activity_log.rb +75 -0
- data/lib/ecoportal/api/graphql/fragment/auth_log.rb +29 -0
- data/lib/ecoportal/api/graphql/fragment/authorization_result.rb +14 -0
- data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +20 -20
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/locations_error.rb +19 -19
- data/lib/ecoportal/api/graphql/fragment/minimal_dashboard.rb +31 -0
- data/lib/ecoportal/api/graphql/fragment/page.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/pages/common_page_union.rb +23 -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/permissions.rb +98 -0
- data/lib/ecoportal/api/graphql/fragment/person_member_changelog.rb +33 -0
- data/lib/ecoportal/api/graphql/fragment/template_change_log.rb +102 -0
- data/lib/ecoportal/api/graphql/fragment.rb +8 -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/update.rb +12 -0
- 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/contractor_entity/manager_settings.rb +20 -0
- data/lib/ecoportal/api/graphql/input/contractor_entity/update.rb +6 -27
- data/lib/ecoportal/api/graphql/input/contractor_entity.rb +1 -0
- data/lib/ecoportal/api/graphql/input/date_range.rb +16 -0
- 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/apply_commands.rb +2 -2
- 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/add_commands.rb +2 -2
- 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/update_command.rb +6 -2
- 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 +17 -2
- 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_checklist_field_item.rb +19 -0
- 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_smart_fill_config.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +3 -2
- 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_viewable_field.rb +45 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_workflow_callback.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/archive_public_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/collapse_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/create_public_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_checklist_field_item.rb +19 -0
- 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 +17 -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_public_config.rb +19 -0
- 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_smart_fill_config.rb +21 -0
- 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_advanced_settings.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_basic_settings.rb +32 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_container_uid.rb +45 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/{edit_page_creator_permissions.rb → edit_template_creator_permissions.rb} +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_descriptions.rb +19 -0
- 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/action_list.rb +31 -0
- 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 +9 -1
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +15 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/file.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/gauge.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +3 -2
- 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/people.rb +27 -3
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +9 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +3 -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_field.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/move_viewable_field.rb +33 -0
- 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_checklist_field_item.rb +19 -0
- 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_smart_fill_config.rb +19 -0
- 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/remove_viewable_field.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +46 -5
- data/lib/ecoportal/api/graphql/input.rb +1 -0
- data/lib/ecoportal/api/graphql/interface/base_page.rb +50 -3
- data/lib/ecoportal/api/graphql/interface/location_structure/command.rb +2 -1
- 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/connection.rb +17 -0
- data/lib/ecoportal/api/graphql/logic/input.rb +127 -0
- 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/action_event.rb +14 -0
- data/lib/ecoportal/api/graphql/model/action_event_page.rb +10 -0
- data/lib/ecoportal/api/graphql/model/activity.rb +14 -0
- data/lib/ecoportal/api/graphql/model/activity_log.rb +31 -0
- data/lib/ecoportal/api/graphql/model/ai_summary_version.rb +10 -10
- data/lib/ecoportal/api/graphql/model/auth_log.rb +11 -0
- data/lib/ecoportal/api/graphql/model/authorization_result.rb +12 -0
- 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/minimal_dashboard.rb +14 -0
- data/lib/ecoportal/api/graphql/model/organization.rb +36 -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 +179 -0
- data/lib/ecoportal/api/graphql/model/person_member.rb +7 -0
- data/lib/ecoportal/api/graphql/model/person_member_changelog.rb +15 -0
- data/lib/ecoportal/api/graphql/model/preset_view.rb +10 -10
- data/lib/ecoportal/api/graphql/model/preview_page.rb +10 -10
- data/lib/ecoportal/api/graphql/model/register.rb +10 -10
- data/lib/ecoportal/api/graphql/model/resource.rb +13 -13
- data/lib/ecoportal/api/graphql/model/template/change_log_entry.rb +19 -0
- data/lib/ecoportal/api/graphql/model/template.rb +4 -1
- data/lib/ecoportal/api/graphql/model/user.rb +14 -14
- data/lib/ecoportal/api/graphql/model.rb +9 -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 +21 -11
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +26 -11
- 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/contractor_entity/update_manager_settings.rb +37 -0
- data/lib/ecoportal/api/graphql/mutation/contractor_entity.rb +1 -0
- data/lib/ecoportal/api/graphql/mutation/file_container/upload.rb +78 -0
- data/lib/ecoportal/api/graphql/mutation/file_container.rb +15 -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/update_related_page.rb +79 -0
- data/lib/ecoportal/api/graphql/mutation/template.rb +1 -0
- data/lib/ecoportal/api/graphql/mutation.rb +1 -1
- 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/manager_settings.rb +20 -0
- data/lib/ecoportal/api/graphql/payload/contractor_entity/update.rb +12 -12
- data/lib/ecoportal/api/graphql/payload/contractor_entity.rb +1 -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/template/update_related_page.rb +15 -0
- data/lib/ecoportal/api/graphql/payload/template.rb +1 -0
- data/lib/ecoportal/api/graphql/payload/upload.rb +12 -0
- 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/activity_logs.rb +78 -0
- data/lib/ecoportal/api/graphql/query/auth_logs.rb +51 -0
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +53 -53
- data/lib/ecoportal/api/graphql/query/dashboard_search.rb +57 -0
- 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/location_structure.rb +2 -0
- data/lib/ecoportal/api/graphql/query/location_structures.rb +2 -0
- data/lib/ecoportal/api/graphql/query/page.rb +6 -1
- data/lib/ecoportal/api/graphql/query/page_activities.rb +56 -0
- 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 +35 -0
- data/lib/ecoportal/api/graphql/query/person_member_changelogs.rb +53 -0
- 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 +8 -0
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- data/lib/ecoportal/api-graphql.rb +10 -10
- metadata +82 -19
- 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
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +0 -28
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +0 -36
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +0 -40
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +0 -13
|
@@ -2,11 +2,19 @@ module Ecoportal
|
|
|
2
2
|
module API
|
|
3
3
|
class GraphQL
|
|
4
4
|
module Base
|
|
5
|
+
# Verified against the live schema 2026-07-30: activeFileAttachment, activeName,
|
|
6
|
+
# activeVersion, archive, canDownload, canShow, draft, fileAttachments, fileSize, id,
|
|
7
|
+
# locations, name, otherTags, tags, token.
|
|
8
|
+
#
|
|
9
|
+
# ★ `activeVersionId` was declared here and does NOT exist on the type (it is
|
|
10
|
+
# `activeVersion`) — it always read nil. `otherTags` was missing, which matters because
|
|
11
|
+
# `UploadInput.otherTags` is the only way to tag a container.
|
|
5
12
|
class FileContainer < Logic::BaseModel
|
|
6
|
-
passkey
|
|
7
|
-
passthrough :name, :activeName
|
|
8
|
-
passthrough :fileSize, :token
|
|
9
|
-
|
|
13
|
+
passkey :id
|
|
14
|
+
passthrough :name, :activeName, :activeVersion
|
|
15
|
+
passthrough :fileSize, :token
|
|
16
|
+
passboolean :draft
|
|
17
|
+
passarray :tags, :otherTags
|
|
10
18
|
end
|
|
11
19
|
end
|
|
12
20
|
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Base
|
|
5
|
-
# LocationNodeType
|
|
6
|
-
class LocationNode < Interface::LocationStructure::Node
|
|
7
|
-
class_resolver :location_node_class, self
|
|
8
|
-
|
|
9
|
-
passthrough :highlights
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
# LocationNodeType
|
|
6
|
+
class LocationNode < Interface::LocationStructure::Node
|
|
7
|
+
class_resolver :location_node_class, self
|
|
8
|
+
|
|
9
|
+
passthrough :highlights
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -1,37 +1,37 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Base
|
|
5
|
-
class LocationStructure
|
|
6
|
-
class Draft
|
|
7
|
-
class Structure < Interface::LocationStructure::Nodes
|
|
8
|
-
class_resolver :location_node_class, Base::LocationNode
|
|
9
|
-
|
|
10
|
-
def draft?
|
|
11
|
-
true
|
|
12
|
-
end
|
|
13
|
-
|
|
14
|
-
def id
|
|
15
|
-
draft&.id
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def name
|
|
19
|
-
draft&.name
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def parent_structure
|
|
23
|
-
draft&.parent_structure
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def draft
|
|
27
|
-
return if _parent == self
|
|
28
|
-
|
|
29
|
-
_parent
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class LocationStructure
|
|
6
|
+
class Draft
|
|
7
|
+
class Structure < Interface::LocationStructure::Nodes
|
|
8
|
+
class_resolver :location_node_class, Base::LocationNode
|
|
9
|
+
|
|
10
|
+
def draft?
|
|
11
|
+
true
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def id
|
|
15
|
+
draft&.id
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def name
|
|
19
|
+
draft&.name
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
def parent_structure
|
|
23
|
+
draft&.parent_structure
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def draft
|
|
27
|
+
return if _parent == self
|
|
28
|
+
|
|
29
|
+
_parent
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Base
|
|
5
|
-
class LocationStructure
|
|
6
|
-
class Draft < Logic::BaseModel
|
|
7
|
-
read_only!
|
|
8
|
-
|
|
9
|
-
class_resolver :structure_class, "Base::LocationStructure::Draft::Structure"
|
|
10
|
-
|
|
11
|
-
passkey :id
|
|
12
|
-
|
|
13
|
-
passthrough :name, :notes
|
|
14
|
-
|
|
15
|
-
passboolean :commited
|
|
16
|
-
alias_method :commited?, :commited
|
|
17
|
-
|
|
18
|
-
embeds_one :createdAt, klass: Base::DateTime
|
|
19
|
-
|
|
20
|
-
embeds_one :structure, klass: :structure_class
|
|
21
|
-
|
|
22
|
-
passarray :conflictingIds
|
|
23
|
-
embeds_many :commands, klass: Interface::LocationStructure::Command
|
|
24
|
-
embeds_many :results, read_only: true, klass: "Ecoportal::API::GraphQL::Payload::LocationStructure::CommandExecutionResult"
|
|
25
|
-
|
|
26
|
-
passboolean :ok
|
|
27
|
-
|
|
28
|
-
def ok?
|
|
29
|
-
ok != false
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
def success?
|
|
33
|
-
!error?
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
def error?
|
|
37
|
-
conflictingIds? ||
|
|
38
|
-
result_errors? ||
|
|
39
|
-
!ok?
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
def error_doc
|
|
43
|
-
if conflictingIds?
|
|
44
|
-
{
|
|
45
|
-
conflictingIds: conflictingIds.doc
|
|
46
|
-
}
|
|
47
|
-
elsif result_errors?
|
|
48
|
-
{
|
|
49
|
-
results: [result_errors.first&.error_doc]
|
|
50
|
-
}
|
|
51
|
-
elsif !ok?
|
|
52
|
-
{
|
|
53
|
-
ok: ok
|
|
54
|
-
}
|
|
55
|
-
end
|
|
56
|
-
end
|
|
57
|
-
|
|
58
|
-
def structure_id
|
|
59
|
-
parent_structure&.id
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def structure_name
|
|
63
|
-
parent_structure&.name
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# @note draft is in a collection of drafts
|
|
67
|
-
def parent_structure
|
|
68
|
-
return unless _parent != self
|
|
69
|
-
return unless _parent._parent != _parent
|
|
70
|
-
return unless _parent.is_a?(Base::LocationStructure)
|
|
71
|
-
|
|
72
|
-
_parent._parent
|
|
73
|
-
end
|
|
74
|
-
|
|
75
|
-
def conflictingIds?
|
|
76
|
-
(conflictingIds || []).any?
|
|
77
|
-
end
|
|
78
|
-
|
|
79
|
-
def result_errors?
|
|
80
|
-
result_errors.any?
|
|
81
|
-
end
|
|
82
|
-
|
|
83
|
-
def result_errors
|
|
84
|
-
results.select(&:error?)
|
|
85
|
-
end
|
|
86
|
-
end
|
|
87
|
-
end
|
|
88
|
-
end # GraphQL
|
|
89
|
-
end # API
|
|
90
|
-
end # Ecoportal
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
require_relative 'draft/structure'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
class LocationStructure
|
|
6
|
+
class Draft < Logic::BaseModel
|
|
7
|
+
read_only!
|
|
8
|
+
|
|
9
|
+
class_resolver :structure_class, "Base::LocationStructure::Draft::Structure"
|
|
10
|
+
|
|
11
|
+
passkey :id
|
|
12
|
+
|
|
13
|
+
passthrough :name, :notes
|
|
14
|
+
|
|
15
|
+
passboolean :commited
|
|
16
|
+
alias_method :commited?, :commited
|
|
17
|
+
|
|
18
|
+
embeds_one :createdAt, klass: Base::DateTime
|
|
19
|
+
|
|
20
|
+
embeds_one :structure, klass: :structure_class
|
|
21
|
+
|
|
22
|
+
passarray :conflictingIds
|
|
23
|
+
embeds_many :commands, klass: Interface::LocationStructure::Command
|
|
24
|
+
embeds_many :results, read_only: true, klass: "Ecoportal::API::GraphQL::Payload::LocationStructure::CommandExecutionResult"
|
|
25
|
+
|
|
26
|
+
passboolean :ok
|
|
27
|
+
|
|
28
|
+
def ok?
|
|
29
|
+
ok != false
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def success?
|
|
33
|
+
!error?
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def error?
|
|
37
|
+
conflictingIds? ||
|
|
38
|
+
result_errors? ||
|
|
39
|
+
!ok?
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def error_doc
|
|
43
|
+
if conflictingIds?
|
|
44
|
+
{
|
|
45
|
+
conflictingIds: conflictingIds.doc
|
|
46
|
+
}
|
|
47
|
+
elsif result_errors?
|
|
48
|
+
{
|
|
49
|
+
results: [result_errors.first&.error_doc]
|
|
50
|
+
}
|
|
51
|
+
elsif !ok?
|
|
52
|
+
{
|
|
53
|
+
ok: ok
|
|
54
|
+
}
|
|
55
|
+
end
|
|
56
|
+
end
|
|
57
|
+
|
|
58
|
+
def structure_id
|
|
59
|
+
parent_structure&.id
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def structure_name
|
|
63
|
+
parent_structure&.name
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
# @note draft is in a collection of drafts
|
|
67
|
+
def parent_structure
|
|
68
|
+
return unless _parent != self
|
|
69
|
+
return unless _parent._parent != _parent
|
|
70
|
+
return unless _parent.is_a?(Base::LocationStructure)
|
|
71
|
+
|
|
72
|
+
_parent._parent
|
|
73
|
+
end
|
|
74
|
+
|
|
75
|
+
def conflictingIds?
|
|
76
|
+
(conflictingIds || []).any?
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
def result_errors?
|
|
80
|
+
result_errors.any?
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
def result_errors
|
|
84
|
+
results.select(&:error?)
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
88
|
+
end # GraphQL
|
|
89
|
+
end # API
|
|
90
|
+
end # Ecoportal
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
require_relative 'draft/structure'
|
|
@@ -11,6 +11,9 @@ module Ecoportal
|
|
|
11
11
|
passkey :id
|
|
12
12
|
passthrough :name, :weight
|
|
13
13
|
passboolean :archived, :published, :visitorManagementEnabled
|
|
14
|
+
# AI-generated structure support (2026-07 schema).
|
|
15
|
+
passthrough :aiPrompt, read_only: true
|
|
16
|
+
passboolean :generating, read_only: true
|
|
14
17
|
embeds_one :updatedAt, klass: Base::DateTime
|
|
15
18
|
|
|
16
19
|
embeds_many :drafts, klass: :draft_class, order_key: :createdAt
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Base
|
|
5
|
+
# Lightweight dashboard descriptor returned by the `dashboardSearch` connection.
|
|
6
|
+
# Read-only. For the full dashboard (components, filters, permissions) the
|
|
7
|
+
# `Dashboard` type is not yet modelled — see docs/worklog.md.
|
|
8
|
+
#
|
|
9
|
+
# Enum-valued fields are exposed as plain strings:
|
|
10
|
+
# - permissionType: 'GLOBAL' | 'RESTRICTED' | 'PRIVATE'
|
|
11
|
+
# - parentResourceType: DashboardParentResource (REGISTER, REPORTING, TASKS, ...)
|
|
12
|
+
class MinimalDashboard < Logic::BaseModel
|
|
13
|
+
read_only!
|
|
14
|
+
|
|
15
|
+
passkey :id
|
|
16
|
+
passthrough :name
|
|
17
|
+
passthrough :parentResource, :parentResourceId, :parentResourceType
|
|
18
|
+
passthrough :permissionType
|
|
19
|
+
passthrough :weight
|
|
20
|
+
passboolean :global
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -8,6 +8,8 @@ module Ecoportal
|
|
|
8
8
|
passkey :id
|
|
9
9
|
passthrough :name, :companyName
|
|
10
10
|
passthrough :logoUrl, read_only: true
|
|
11
|
+
# Whether contractor admins may add other contractor admins (2026-07 schema).
|
|
12
|
+
passboolean :allowContractorAdminsToAddAdmins, read_only: true
|
|
11
13
|
end
|
|
12
14
|
end
|
|
13
15
|
end
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
|
|
2
|
-
class DataField
|
|
3
|
-
# Actions list field — embedded action items linked to this page.
|
|
4
|
-
# Actions are managed through Mutation::Action::*; not via DataFieldInput.
|
|
5
|
-
class ActionsList < DataField
|
|
6
|
-
passarray :actions # each: { id:, name:, status: }
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
1
|
+
module Ecoportal::API::GraphQL::Base::Page
|
|
2
|
+
class DataField
|
|
3
|
+
# Actions list field — embedded action items linked to this page.
|
|
4
|
+
# Actions are managed through Mutation::Action::*; not via DataFieldInput.
|
|
5
|
+
class ActionsList < DataField
|
|
6
|
+
passarray :actions # each: { id:, name:, status: }
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
@@ -1,18 +1,18 @@
|
|
|
1
|
-
|
|
2
|
-
class DataField
|
|
3
|
-
# AI-generated summary field.
|
|
4
|
-
# Content is generated server-side via generateAiSummary mutation (Bedrock Claude).
|
|
5
|
-
# Not settable via DataFieldInput — use the dedicated mutation instead.
|
|
6
|
-
#
|
|
7
|
-
# instructions: the AI prompt configured on this field in the template.
|
|
8
|
-
# trigger: "submitted" | "approved" — when generation fires.
|
|
9
|
-
# trigger_stage_ids: stages that trigger generation (empty = all stages).
|
|
10
|
-
# text_format: "simple_text" | "bullet_points" | "numbered_list" | "headings"
|
|
11
|
-
class AiSummary < DataField
|
|
12
|
-
passthrough :aiSummary, :generatedAt, :instructions
|
|
13
|
-
passthrough :trigger, :textFormat
|
|
14
|
-
passarray :triggerStageIds, :fieldConfigurations
|
|
15
|
-
passboolean :alreadyRated
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
1
|
+
module Ecoportal::API::GraphQL::Base::Page
|
|
2
|
+
class DataField
|
|
3
|
+
# AI-generated summary field.
|
|
4
|
+
# Content is generated server-side via generateAiSummary mutation (Bedrock Claude).
|
|
5
|
+
# Not settable via DataFieldInput — use the dedicated mutation instead.
|
|
6
|
+
#
|
|
7
|
+
# instructions: the AI prompt configured on this field in the template.
|
|
8
|
+
# trigger: "submitted" | "approved" — when generation fires.
|
|
9
|
+
# trigger_stage_ids: stages that trigger generation (empty = all stages).
|
|
10
|
+
# text_format: "simple_text" | "bullet_points" | "numbered_list" | "headings"
|
|
11
|
+
class AiSummary < DataField
|
|
12
|
+
passthrough :aiSummary, :generatedAt, :instructions
|
|
13
|
+
passthrough :trigger, :textFormat
|
|
14
|
+
passarray :triggerStageIds, :fieldConfigurations
|
|
15
|
+
passboolean :alreadyRated
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
module Ecoportal::API::GraphQL::Base::Page
|
|
2
|
-
class DataField
|
|
3
|
-
class Checklist < DataField
|
|
4
|
-
passarray :items # each: { id:, label:, checked: }
|
|
5
|
-
passthrough :complete
|
|
6
|
-
|
|
7
|
-
# Check/uncheck an item by label or id.
|
|
8
|
-
def check(label_or_id, checked: true)
|
|
9
|
-
item = (doc['items'] || []).find { |i| i['label'] == label_or_id.to_s || i['id'] == label_or_id.to_s }
|
|
10
|
-
return unless item
|
|
11
|
-
|
|
12
|
-
item['checked'] = checked
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def as_input
|
|
16
|
-
return nil unless dirty?
|
|
17
|
-
|
|
18
|
-
{
|
|
19
|
-
checklist: {
|
|
20
|
-
id: id,
|
|
21
|
-
# rubocop:disable Style/DoubleNegation
|
|
22
|
-
items: (doc['items'] || []).map { |i| { id: i['id'], checked: !!i['checked'] } }
|
|
23
|
-
# rubocop:enable Style/DoubleNegation
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
1
|
+
module Ecoportal::API::GraphQL::Base::Page
|
|
2
|
+
class DataField
|
|
3
|
+
class Checklist < DataField
|
|
4
|
+
passarray :items # each: { id:, label:, checked: }
|
|
5
|
+
passthrough :complete
|
|
6
|
+
|
|
7
|
+
# Check/uncheck an item by label or id.
|
|
8
|
+
def check(label_or_id, checked: true)
|
|
9
|
+
item = (doc['items'] || []).find { |i| i['label'] == label_or_id.to_s || i['id'] == label_or_id.to_s }
|
|
10
|
+
return unless item
|
|
11
|
+
|
|
12
|
+
item['checked'] = checked
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def as_input
|
|
16
|
+
return nil unless dirty?
|
|
17
|
+
|
|
18
|
+
{
|
|
19
|
+
checklist: {
|
|
20
|
+
id: id,
|
|
21
|
+
# rubocop:disable Style/DoubleNegation
|
|
22
|
+
items: (doc['items'] || []).map { |i| { id: i['id'], checked: !!i['checked'] } }
|
|
23
|
+
# rubocop:enable Style/DoubleNegation
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
|
|
1
|
+
module Ecoportal::API::GraphQL::Base::Page
|
|
2
2
|
class DataField
|
|
3
3
|
# Contractor entity selector field.
|
|
4
4
|
# Stores references to ContractorEntity records.
|
|
5
5
|
class ContractorEntities < DataField
|
|
6
|
-
passarray :contractors #
|
|
6
|
+
passarray :contractors # staged writes; the READ response uses `contractorEntities`
|
|
7
7
|
|
|
8
|
+
# Current contractor-entity ids. The GraphQL response carries them under
|
|
9
|
+
# `contractorEntities` (CommonPageUnion's contractorEntitiesField), NOT `contractors`
|
|
10
|
+
# — so read from there. After a contractor_entity_ids= write, prefer the staged value.
|
|
8
11
|
def contractor_entity_ids
|
|
9
|
-
|
|
12
|
+
contractor_ids_from(doc)
|
|
10
13
|
end
|
|
11
14
|
|
|
12
15
|
def contractor_entity_ids=(ids)
|
|
@@ -18,11 +21,31 @@
|
|
|
18
21
|
self.contractor_entity_ids = ids
|
|
19
22
|
end
|
|
20
23
|
|
|
24
|
+
# Dirty only when the effective id SET actually changed — same phantom-dirty class as
|
|
25
|
+
# CrossReference (READ one key, WRITE another): the default leaf diff flags the field
|
|
26
|
+
# the moment the `contractors` key appears, even for a no-op restatement or a clear on
|
|
27
|
+
# an already-empty field.
|
|
28
|
+
def dirty?
|
|
29
|
+
contractor_ids_from(doc).sort != contractor_ids_from(original_doc).sort
|
|
30
|
+
end
|
|
31
|
+
|
|
21
32
|
def as_input
|
|
22
33
|
return nil unless dirty?
|
|
23
34
|
|
|
24
35
|
{ contractorEntities: { id: id, contractorEntityIds: contractor_entity_ids } }
|
|
25
36
|
end
|
|
37
|
+
|
|
38
|
+
private
|
|
39
|
+
|
|
40
|
+
# Prefer the staged `contractors` (write shape), fall back to `contractorEntities`
|
|
41
|
+
# (read shape). Shape-agnostic for both `doc` and `original_doc`, so the comparison
|
|
42
|
+
# stays correct after `consolidate!` copies the staged shape into the baseline.
|
|
43
|
+
def contractor_ids_from(source_doc)
|
|
44
|
+
return [] unless source_doc
|
|
45
|
+
|
|
46
|
+
src = source_doc.key?('contractors') ? source_doc['contractors'] : source_doc['contractorEntities']
|
|
47
|
+
Array(src).map { |c| c.is_a?(Hash) ? c['id'] : c }.compact
|
|
48
|
+
end
|
|
26
49
|
end
|
|
27
50
|
end
|
|
28
51
|
end
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
module Ecoportal::API::GraphQL::Base::Page
|
|
2
|
-
class DataField
|
|
3
|
-
# Wraps Date data field. Mapped from __typename 'Date'.
|
|
4
|
-
# value is an ISO8601DateTime string (e.g. "2024-11-25T08:30:00+13:00").
|
|
5
|
-
class DateField < DataField
|
|
6
|
-
# value is nested: { dateTime: "...", timeZone: "..." } or raw string
|
|
7
|
-
def value
|
|
8
|
-
v = doc['value']
|
|
9
|
-
v.is_a?(Hash) ? v['dateTime'] : v
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def value=(iso8601_string)
|
|
13
|
-
doc['value'] = iso8601_string
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def as_input
|
|
17
|
-
return nil unless dirty?
|
|
18
|
-
|
|
19
|
-
{ date: { id: id, value: value } }
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
1
|
+
module Ecoportal::API::GraphQL::Base::Page
|
|
2
|
+
class DataField
|
|
3
|
+
# Wraps Date data field. Mapped from __typename 'Date'.
|
|
4
|
+
# value is an ISO8601DateTime string (e.g. "2024-11-25T08:30:00+13:00").
|
|
5
|
+
class DateField < DataField
|
|
6
|
+
# value is nested: { dateTime: "...", timeZone: "..." } or raw string
|
|
7
|
+
def value
|
|
8
|
+
v = doc['value']
|
|
9
|
+
v.is_a?(Hash) ? v['dateTime'] : v
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def value=(iso8601_string)
|
|
13
|
+
doc['value'] = iso8601_string
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def as_input
|
|
17
|
+
return nil unless dirty?
|
|
18
|
+
|
|
19
|
+
{ date: { id: id, value: value } }
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
@@ -1,24 +1,63 @@
|
|
|
1
|
-
|
|
1
|
+
module Ecoportal::API::GraphQL::Base::Page
|
|
2
2
|
class DataField
|
|
3
3
|
# File attachment field.
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
#
|
|
4
|
+
# READ: the fragment selects `items { id fileContainer { id ... } }` — the container id
|
|
5
|
+
# lives at items[].fileContainer.id, NOT in a `fileContainers` array (live-verified;
|
|
6
|
+
# the previous reader keyed on a doc key the API never returns).
|
|
7
|
+
# WRITE: live `FileInput` accepts `items: [ItemInput]` ({id, fileContainerId, position}),
|
|
8
|
+
# NOT `fileContainerIds`. The backend applies `items` as FULL-REPLACE — any existing item
|
|
9
|
+
# whose id is not echoed back is destroyed — so `as_input` sends kept items as `{id:}`
|
|
10
|
+
# and new containers as `{fileContainerId:}`.
|
|
11
|
+
# `items` is deliberately a plain doc reader, not `passarray`: materialising an ArrayModel
|
|
12
|
+
# writes `items: []` into the doc of a field read without $content, and a phantom-dirty
|
|
13
|
+
# empty `items` here doesn't no-op — it DELETES every attachment on the next update.
|
|
14
|
+
# Container ids come from a prior upload — see FileUpload::Client#upload_all.
|
|
7
15
|
class FileField < DataField
|
|
8
|
-
|
|
16
|
+
# each: { 'id' =>, 'fileContainer' => { 'id' =>, 'activeFileAttachment' => {...} } }
|
|
17
|
+
def items
|
|
18
|
+
Array(doc['items'])
|
|
19
|
+
end
|
|
9
20
|
|
|
10
21
|
def file_container_ids
|
|
11
|
-
|
|
22
|
+
items.map do |item|
|
|
23
|
+
item.is_a?(Hash) ? item.dig('fileContainer', 'id') : item
|
|
24
|
+
end.compact
|
|
12
25
|
end
|
|
13
26
|
|
|
27
|
+
# Full-replace: containers already on the field keep their item identity;
|
|
28
|
+
# ids not present in `ids` are removed server-side by omission.
|
|
14
29
|
def file_container_ids=(ids)
|
|
15
|
-
|
|
30
|
+
kept = {}
|
|
31
|
+
items.each do |item|
|
|
32
|
+
next unless item.is_a?(Hash) && (fc_id = item.dig('fileContainer', 'id'))
|
|
33
|
+
|
|
34
|
+
kept[fc_id] ||= item['id']
|
|
35
|
+
end
|
|
36
|
+
doc['items'] = Array(ids).map do |fc_id|
|
|
37
|
+
new_item = { 'fileContainer' => { 'id' => fc_id } }
|
|
38
|
+
new_item['id'] = kept[fc_id] if kept[fc_id]
|
|
39
|
+
new_item
|
|
40
|
+
end
|
|
16
41
|
end
|
|
17
42
|
|
|
18
43
|
def as_input
|
|
19
44
|
return nil unless dirty?
|
|
20
45
|
|
|
21
|
-
{ file: { id: id,
|
|
46
|
+
{ file: { id: id, items: items_input } }
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
private
|
|
50
|
+
|
|
51
|
+
def items_input
|
|
52
|
+
items.map do |item|
|
|
53
|
+
next unless item.is_a?(Hash)
|
|
54
|
+
|
|
55
|
+
if (item_id = item['id'])
|
|
56
|
+
{ id: item_id }
|
|
57
|
+
else
|
|
58
|
+
{ fileContainerId: item.dig('fileContainer', 'id') }
|
|
59
|
+
end
|
|
60
|
+
end.compact
|
|
22
61
|
end
|
|
23
62
|
end
|
|
24
63
|
end
|