ecoportal-api-graphql 1.3.16 → 1.3.17
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 +13 -4
- 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/model/as_input.rb +54 -54
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +49 -49
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +188 -188
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff.rb +55 -55
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff_nesting.rb +295 -295
- data/lib/ecoportal/api/common/graphql/model.rb +17 -17
- data/lib/ecoportal/api/common/graphql/patches.rb +1 -1
- data/lib/ecoportal/api/common/graphql/query_integration.rb +45 -45
- data/lib/ecoportal/api/common/graphql.rb +16 -16
- data/lib/ecoportal/api/common.graphql.rb +8 -8
- data/lib/ecoportal/api/graphql/base/action_category.rb +15 -15
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +1 -1
- data/lib/ecoportal/api/graphql/base/contractor_entity.rb +24 -24
- data/lib/ecoportal/api/graphql/base/date_time.rb +12 -12
- data/lib/ecoportal/api/graphql/base/delta_result.rb +16 -16
- data/lib/ecoportal/api/graphql/base/field.rb +12 -12
- data/lib/ecoportal/api/graphql/base/file_attachment.rb +15 -15
- data/lib/ecoportal/api/graphql/base/location_node.rb +14 -14
- data/lib/ecoportal/api/graphql/base/location_structure/draft/structure.rb +37 -37
- data/lib/ecoportal/api/graphql/base/location_structure/draft.rb +93 -93
- data/lib/ecoportal/api/graphql/base/page/data_field/actions_list.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/ai_summary.rb +18 -18
- data/lib/ecoportal/api/graphql/base/page/data_field/checklist.rb +29 -29
- data/lib/ecoportal/api/graphql/base/page/data_field/collection.rb +1 -1
- data/lib/ecoportal/api/graphql/base/page/data_field/contractor_entities.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/file_field.rb +1 -1
- data/lib/ecoportal/api/graphql/base/page/data_field/geo.rb +24 -24
- data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +1 -1
- data/lib/ecoportal/api/graphql/base/page/data_field/law.rb +8 -8
- data/lib/ecoportal/api/graphql/base/page/data_field/mailbox.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/plain_text.rb +17 -17
- data/lib/ecoportal/api/graphql/base/page/data_field/rich_text.rb +26 -26
- data/lib/ecoportal/api/graphql/base/page/data_field/signature.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/smart_fill.rb +17 -17
- data/lib/ecoportal/api/graphql/base/page/data_field/table.rb +9 -9
- data/lib/ecoportal/api/graphql/base/page/data_field/tag_field.rb +21 -21
- data/lib/ecoportal/api/graphql/base/page/phased.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/preset_view.rb +1 -1
- 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/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/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/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 +1 -1
- 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/pages.rb +15 -15
- data/lib/ecoportal/api/graphql/fragment/pagination.rb +17 -17
- 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 +13 -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 +14 -14
- data/lib/ecoportal/api/graphql/input/page/unarchive.rb +14 -14
- data/lib/ecoportal/api/graphql/input/page/update.rb +2 -2
- data/lib/ecoportal/api/graphql/input/page.rb +26 -26
- data/lib/ecoportal/api/graphql/input/preset_view/create.rb +18 -18
- data/lib/ecoportal/api/graphql/input/preset_view/permission.rb +16 -16
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +1 -1
- data/lib/ecoportal/api/graphql/input/preset_view.rb +14 -14
- data/lib/ecoportal/api/graphql/input/register/create.rb +18 -18
- data/lib/ecoportal/api/graphql/input/register/update.rb +15 -15
- data/lib/ecoportal/api/graphql/input/register.rb +13 -13
- data/lib/ecoportal/api/graphql/input/search.rb +13 -13
- data/lib/ecoportal/api/graphql/input/search_conf/ai_generator.rb +234 -234
- data/lib/ecoportal/api/graphql/input/search_conf.rb +1 -1
- data/lib/ecoportal/api/graphql/input/search_filter.rb +12 -12
- data/lib/ecoportal/api/graphql/input/search_sorter.rb +11 -11
- data/lib/ecoportal/api/graphql/input/workflow_command/add_action_tag.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_binding.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_comment_tagging_user_group.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_strategy.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_direct_strategy_user.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/add_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 +19 -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_force.rb +18 -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 +19 -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_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 +24 -24
- 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/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/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/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 +193 -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/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/section.rb +12 -12
- data/lib/ecoportal/api/graphql/model/page_union.rb +21 -21
- data/lib/ecoportal/api/graphql/model/pages_workflow.rb +20 -20
- data/lib/ecoportal/api/graphql/model/preset_view.rb +10 -10
- data/lib/ecoportal/api/graphql/model/preview_page.rb +10 -10
- data/lib/ecoportal/api/graphql/model/register.rb +10 -10
- data/lib/ecoportal/api/graphql/model/resource.rb +13 -13
- data/lib/ecoportal/api/graphql/model/user.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/action/archive.rb +41 -41
- data/lib/ecoportal/api/graphql/mutation/action/create.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/action/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/action.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/ai_summary.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/create.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/destroy.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/add_commands.rb +55 -55
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/create.rb +54 -54
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/delete.rb +43 -43
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/drop_bad_commands.rb +56 -56
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/publish.rb +66 -66
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft.rb +18 -18
- data/lib/ecoportal/api/graphql/mutation/location_structure.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/archive.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/build_from_template.rb +50 -50
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/create_from_template.rb +43 -43
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/unarchive.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/page/update.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page.rb +28 -28
- data/lib/ecoportal/api/graphql/mutation/preset_view/create.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/preset_view/permission.rb +37 -37
- data/lib/ecoportal/api/graphql/mutation/preset_view/update.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/preset_view.rb +15 -15
- data/lib/ecoportal/api/graphql/mutation/register/create.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/register/update.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/register.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/smart_fill.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/update.rb +12 -12
- data/lib/ecoportal/api/graphql/payload/location_structure/apply_commands.rb +51 -51
- data/lib/ecoportal/api/graphql/payload/location_structure/command_execution_result.rb +50 -50
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/add_commands.rb +30 -30
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/delete.rb +30 -30
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/drop_bad_commands.rb +43 -43
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/publish.rb +63 -63
- data/lib/ecoportal/api/graphql/payload/location_structure/draft.rb +18 -18
- data/lib/ecoportal/api/graphql/payload/location_structure.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/archive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/build_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/create_from_template.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/page/unarchive.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/update.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/register.rb +1 -1
- data/lib/ecoportal/api/graphql/query/action.rb +33 -33
- data/lib/ecoportal/api/graphql/query/action_categories.rb +53 -53
- data/lib/ecoportal/api/graphql/query/actions.rb +43 -43
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +53 -53
- data/lib/ecoportal/api/graphql/query/file_upload_signature.rb +76 -76
- data/lib/ecoportal/api/graphql/query/location_classifications.rb +39 -39
- data/lib/ecoportal/api/graphql/query/page_delta.rb +47 -47
- data/lib/ecoportal/api/graphql/query/pages.rb +59 -59
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +1 -1
- data/lib/ecoportal/api/graphql/query/register_preview_pages.rb +83 -83
- data/lib/ecoportal/api/graphql/query/templates.rb +53 -53
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- data/lib/ecoportal/api-graphql.rb +10 -10
- metadata +1 -6
- 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
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e8ab1262f84b1fada9c29cfcaa29ec70f38aa6e8d05762b3bb580ece22910eec
|
|
4
|
+
data.tar.gz: 25240f9c150f55a10a55284e647b42c3d96426fedafdc2ac866ada347e3a1794
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 89e3340050db60aa9114b595b6d63f7e0d1bfc9aa3c36c273c14fb680ce78573318440a25c35c79b5d8413e668b275837d509572b3c93fceed965458056d6f43
|
|
7
|
+
data.tar.gz: bd9641bd8aad69ee8e1db51cda0c59ee46225c913f0fa19ee1ed2834f6ebd58493eb26b77b0ca1170abef1d058ae613f0c4ebb0541adb0f677169def9eeb3a7f
|
data/CHANGELOG.md
CHANGED
|
@@ -2,12 +2,21 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.17] - 2026-09-30
|
|
6
|
+
|
|
7
|
+
### Security
|
|
8
|
+
|
|
9
|
+
- Security republish of `1.3.16` -- backwards-compatible, no code change: removes customer and
|
|
10
|
+
internal identifiers from shipped comments and this changelog; stops shipping internal
|
|
11
|
+
files (packaging allowlist: only `lib/**/*.rb` plus the named root docs ship, so the internal
|
|
12
|
+
`CLAUDE.md` files under `lib/` no longer do).
|
|
13
|
+
|
|
5
14
|
## [1.3.16] - 2026-08-13
|
|
6
15
|
|
|
7
16
|
### Fixed
|
|
8
17
|
|
|
9
18
|
- Packaging-only republish of `1.3.15` with an allowlisted gemspec (backported from `2.0.0`).
|
|
10
|
-
Versions `1.3.9`-`1.3.15` shipped internal repository content (
|
|
19
|
+
Versions `1.3.9`-`1.3.15` shipped internal repository content (internal AI-tooling project notes,
|
|
11
20
|
`docs/worklog.md`, architecture docs) to rubygems.org via the old denylist `spec.files`; they
|
|
12
21
|
will be yanked. `1.3.16` is the identical `lib/` code (including the `1.3.15` OozeRedirect
|
|
13
22
|
`executeWorkflowCommands` fix) packaged clean, so the `1.x` line keeps a clean latest release.
|
|
@@ -136,7 +145,7 @@ signed-off future decision.)
|
|
|
136
145
|
(`external_id`/`id`/`state`) — a spurious path produced term `membranes.external_id.external_id`
|
|
137
146
|
→ 0 results (silent miss → dup-on-upsert). Register FIELD keys still get the nested path.
|
|
138
147
|
- Verified against the backend filter definitions; catalogued in
|
|
139
|
-
|
|
148
|
+
the repo's internal docs.
|
|
140
149
|
|
|
141
150
|
### Added
|
|
142
151
|
|
|
@@ -208,7 +217,7 @@ shapes checked against the live schema dump); the live UAT→PROD round trip is
|
|
|
208
217
|
longer exists (fragments are a registry now) → `uninitialized constant … Fragment::… (NameError)` at
|
|
209
218
|
render time. Now `spread :Action` / `spread :ContractorEntity`, matching the already-migrated queries.
|
|
210
219
|
(The sibling breakage in eco-helpers' location-command optimizations is fixed in eco-helpers 3.2.17;
|
|
211
|
-
it crashed
|
|
220
|
+
it crashed a customer's live locations sync.)
|
|
212
221
|
- **Kickstand workflow mutations — bare `DateTime` selection.** `Kickstand::{Start,Stop,Fail}Workflow`
|
|
213
222
|
selected `startedAt`/`stoppedAt`/`failedAt` bare → "Field must have selections". Now
|
|
214
223
|
`{ dateTime timeZone }` (same class as the 1.3.10 LocationStructure fix).
|
|
@@ -236,7 +245,7 @@ shapes checked against the live schema dump); the live UAT→PROD round trip is
|
|
|
236
245
|
|
|
237
246
|
## [1.3.10] - 2026-07-03
|
|
238
247
|
|
|
239
|
-
Hotfix (backwards-compatible). Resolves a live failure on
|
|
248
|
+
Hotfix (backwards-compatible). Resolves a live failure on a customer's users sync.
|
|
240
249
|
|
|
241
250
|
### Fixed
|
|
242
251
|
|
data/LICENSE
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2022 ecoPortal
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
-
SOFTWARE.
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 ecoPortal
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
data/README.md
CHANGED
|
@@ -1,24 +1,24 @@
|
|
|
1
|
-
# Ecoportal::API::GraphQL
|
|
2
|
-
|
|
3
|
-
This is a basic collection of helpers that can be used to interact with the
|
|
4
|
-
[ecoPortal](https://www.ecoportal.com) `GraphQL` API
|
|
5
|
-
|
|
6
|
-
## Installation
|
|
7
|
-
|
|
8
|
-
Add this line to your application's Gemfile:
|
|
9
|
-
|
|
10
|
-
```ruby
|
|
11
|
-
gem 'ecoportal-api-graphql', require: %w[ecoportal/api-graphql]
|
|
12
|
-
```
|
|
13
|
-
|
|
14
|
-
And then execute:
|
|
15
|
-
|
|
16
|
-
$ bundle
|
|
17
|
-
|
|
18
|
-
Or install it yourself as:
|
|
19
|
-
|
|
20
|
-
$ gem install ecoportal-api-graphql
|
|
21
|
-
|
|
22
|
-
## Changelog
|
|
23
|
-
|
|
24
|
-
See {file:CHANGELOG.md} for a list of changes.
|
|
1
|
+
# Ecoportal::API::GraphQL
|
|
2
|
+
|
|
3
|
+
This is a basic collection of helpers that can be used to interact with the
|
|
4
|
+
[ecoPortal](https://www.ecoportal.com) `GraphQL` API
|
|
5
|
+
|
|
6
|
+
## Installation
|
|
7
|
+
|
|
8
|
+
Add this line to your application's Gemfile:
|
|
9
|
+
|
|
10
|
+
```ruby
|
|
11
|
+
gem 'ecoportal-api-graphql', require: %w[ecoportal/api-graphql]
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
And then execute:
|
|
15
|
+
|
|
16
|
+
$ bundle
|
|
17
|
+
|
|
18
|
+
Or install it yourself as:
|
|
19
|
+
|
|
20
|
+
$ gem install ecoportal-api-graphql
|
|
21
|
+
|
|
22
|
+
## Changelog
|
|
23
|
+
|
|
24
|
+
See {file:CHANGELOG.md} for a list of changes.
|
|
@@ -1,115 +1,115 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
module Common
|
|
4
|
-
module GraphQL
|
|
5
|
-
module AuthService
|
|
6
|
-
DEFAULT_SERVER = 'live.ecoportal.com'.freeze
|
|
7
|
-
TOKEN_AUTORENEW = 90 # minutes
|
|
8
|
-
|
|
9
|
-
module InstanceMethods
|
|
10
|
-
def session_token(host: server, auto_renew: true)
|
|
11
|
-
session_token_data(host: host).then do |body|
|
|
12
|
-
next unless body
|
|
13
|
-
|
|
14
|
-
if auto_renew && token_renew?(body['expires_in'])
|
|
15
|
-
session_token_renewed(
|
|
16
|
-
host: host,
|
|
17
|
-
refresh_token: body['refresh_token']
|
|
18
|
-
)
|
|
19
|
-
else
|
|
20
|
-
body['access_token']
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def session_token_renewed(host: server, refresh_token: nil)
|
|
26
|
-
unless refresh_token
|
|
27
|
-
return unless (body = session_token_data(host: host))
|
|
28
|
-
return unless (refresh_token = body['resfresh_token'])
|
|
29
|
-
end
|
|
30
|
-
|
|
31
|
-
session_refresh_token_data(
|
|
32
|
-
host: host,
|
|
33
|
-
refresh_token: refresh_token
|
|
34
|
-
).then do |bdy|
|
|
35
|
-
bdy['access_token'] if bdy
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
|
|
39
|
-
private
|
|
40
|
-
|
|
41
|
-
def session_token_data(host: server)
|
|
42
|
-
auth_http_client(host: host).post(
|
|
43
|
-
'/oauth/token',
|
|
44
|
-
data: {
|
|
45
|
-
'grant_type' => 'password',
|
|
46
|
-
'email' => user_email,
|
|
47
|
-
'password' => user_pass
|
|
48
|
-
}
|
|
49
|
-
).then do |response|
|
|
50
|
-
next response.body if response.success?
|
|
51
|
-
end
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def session_refresh_token_data(refresh_token:, host: server)
|
|
55
|
-
auth_http_client(host: host).post(
|
|
56
|
-
'/oauth/token',
|
|
57
|
-
data: {
|
|
58
|
-
'grant_type' => 'refresh_token',
|
|
59
|
-
'refresh_token' => refresh_token
|
|
60
|
-
}
|
|
61
|
-
).then do |response|
|
|
62
|
-
next response.body if response.success?
|
|
63
|
-
end
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
def token_renew?(seconds)
|
|
67
|
-
(TOKEN_AUTORENEW * 60) > seconds
|
|
68
|
-
end
|
|
69
|
-
|
|
70
|
-
def auth_http_client(host: server)
|
|
71
|
-
@auth_http_client ||= Ecoportal::API::Common::GraphQL::HttpClient.new(
|
|
72
|
-
host: host,
|
|
73
|
-
version: 'http'
|
|
74
|
-
)
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def user_email
|
|
78
|
-
@user_email || fetch_env_required('USER_EMAIL')
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def user_pass
|
|
82
|
-
@user_pass || fetch_env_required('USER_PASS')
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
def server(default = DEFAULT_SERVER)
|
|
86
|
-
ENV['SERVER'] || default
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def fetch_env_required(name)
|
|
90
|
-
raise "Missing ENV '#{name}'" unless ENV.key?(name)
|
|
91
|
-
ENV[name]
|
|
92
|
-
end
|
|
93
|
-
|
|
94
|
-
def abort(msg)
|
|
95
|
-
puts msg
|
|
96
|
-
exit(1)
|
|
97
|
-
end
|
|
98
|
-
end
|
|
99
|
-
|
|
100
|
-
module ClassMethods
|
|
101
|
-
end
|
|
102
|
-
|
|
103
|
-
class << self
|
|
104
|
-
include InstanceMethods
|
|
105
|
-
|
|
106
|
-
def included(base)
|
|
107
|
-
base.send(:include, InstanceMethods)
|
|
108
|
-
base.extend(ClassMethods)
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
114
|
-
end
|
|
115
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
module Common
|
|
4
|
+
module GraphQL
|
|
5
|
+
module AuthService
|
|
6
|
+
DEFAULT_SERVER = 'live.ecoportal.com'.freeze
|
|
7
|
+
TOKEN_AUTORENEW = 90 # minutes
|
|
8
|
+
|
|
9
|
+
module InstanceMethods
|
|
10
|
+
def session_token(host: server, auto_renew: true)
|
|
11
|
+
session_token_data(host: host).then do |body|
|
|
12
|
+
next unless body
|
|
13
|
+
|
|
14
|
+
if auto_renew && token_renew?(body['expires_in'])
|
|
15
|
+
session_token_renewed(
|
|
16
|
+
host: host,
|
|
17
|
+
refresh_token: body['refresh_token']
|
|
18
|
+
)
|
|
19
|
+
else
|
|
20
|
+
body['access_token']
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def session_token_renewed(host: server, refresh_token: nil)
|
|
26
|
+
unless refresh_token
|
|
27
|
+
return unless (body = session_token_data(host: host))
|
|
28
|
+
return unless (refresh_token = body['resfresh_token'])
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
session_refresh_token_data(
|
|
32
|
+
host: host,
|
|
33
|
+
refresh_token: refresh_token
|
|
34
|
+
).then do |bdy|
|
|
35
|
+
bdy['access_token'] if bdy
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
private
|
|
40
|
+
|
|
41
|
+
def session_token_data(host: server)
|
|
42
|
+
auth_http_client(host: host).post(
|
|
43
|
+
'/oauth/token',
|
|
44
|
+
data: {
|
|
45
|
+
'grant_type' => 'password',
|
|
46
|
+
'email' => user_email,
|
|
47
|
+
'password' => user_pass
|
|
48
|
+
}
|
|
49
|
+
).then do |response|
|
|
50
|
+
next response.body if response.success?
|
|
51
|
+
end
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def session_refresh_token_data(refresh_token:, host: server)
|
|
55
|
+
auth_http_client(host: host).post(
|
|
56
|
+
'/oauth/token',
|
|
57
|
+
data: {
|
|
58
|
+
'grant_type' => 'refresh_token',
|
|
59
|
+
'refresh_token' => refresh_token
|
|
60
|
+
}
|
|
61
|
+
).then do |response|
|
|
62
|
+
next response.body if response.success?
|
|
63
|
+
end
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def token_renew?(seconds)
|
|
67
|
+
(TOKEN_AUTORENEW * 60) > seconds
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def auth_http_client(host: server)
|
|
71
|
+
@auth_http_client ||= Ecoportal::API::Common::GraphQL::HttpClient.new(
|
|
72
|
+
host: host,
|
|
73
|
+
version: 'http'
|
|
74
|
+
)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def user_email
|
|
78
|
+
@user_email || fetch_env_required('USER_EMAIL')
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def user_pass
|
|
82
|
+
@user_pass || fetch_env_required('USER_PASS')
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
def server(default = DEFAULT_SERVER)
|
|
86
|
+
ENV['SERVER'] || default
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
def fetch_env_required(name)
|
|
90
|
+
raise "Missing ENV '#{name}'" unless ENV.key?(name)
|
|
91
|
+
ENV[name]
|
|
92
|
+
end
|
|
93
|
+
|
|
94
|
+
def abort(msg)
|
|
95
|
+
puts msg
|
|
96
|
+
exit(1)
|
|
97
|
+
end
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
module ClassMethods
|
|
101
|
+
end
|
|
102
|
+
|
|
103
|
+
class << self
|
|
104
|
+
include InstanceMethods
|
|
105
|
+
|
|
106
|
+
def included(base)
|
|
107
|
+
base.send(:include, InstanceMethods)
|
|
108
|
+
base.extend(ClassMethods)
|
|
109
|
+
end
|
|
110
|
+
end
|
|
111
|
+
end
|
|
112
|
+
end
|
|
113
|
+
end
|
|
114
|
+
end
|
|
115
|
+
end
|
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
module Common
|
|
4
|
-
module GraphQL
|
|
5
|
-
module ClassHelpers
|
|
6
|
-
module InstanceMethods
|
|
7
|
-
def becomes(klass)
|
|
8
|
-
klass.new.tap do |becoming|
|
|
9
|
-
instance_variables.each do |var|
|
|
10
|
-
becoming.instance_variable_set(
|
|
11
|
-
var,
|
|
12
|
-
instance_variable_get(var)
|
|
13
|
-
)
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
def becomes_parent_class
|
|
19
|
-
becomes(self.class.superclass)
|
|
20
|
-
end
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
module ClassMethods
|
|
24
|
-
include Ecoportal::API::Common::Content::ClassHelpers
|
|
25
|
-
|
|
26
|
-
def const?(value)
|
|
27
|
-
begin
|
|
28
|
-
const_get(value)
|
|
29
|
-
rescue NameError
|
|
30
|
-
return false
|
|
31
|
-
end
|
|
32
|
-
true
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
|
|
36
|
-
class << self
|
|
37
|
-
def included(base)
|
|
38
|
-
base.send(:include, InstanceMethods)
|
|
39
|
-
base.extend(ClassMethods)
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
46
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
module Common
|
|
4
|
+
module GraphQL
|
|
5
|
+
module ClassHelpers
|
|
6
|
+
module InstanceMethods
|
|
7
|
+
def becomes(klass)
|
|
8
|
+
klass.new.tap do |becoming|
|
|
9
|
+
instance_variables.each do |var|
|
|
10
|
+
becoming.instance_variable_set(
|
|
11
|
+
var,
|
|
12
|
+
instance_variable_get(var)
|
|
13
|
+
)
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
def becomes_parent_class
|
|
19
|
+
becomes(self.class.superclass)
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
module ClassMethods
|
|
24
|
+
include Ecoportal::API::Common::Content::ClassHelpers
|
|
25
|
+
|
|
26
|
+
def const?(value)
|
|
27
|
+
begin
|
|
28
|
+
const_get(value)
|
|
29
|
+
rescue NameError
|
|
30
|
+
return false
|
|
31
|
+
end
|
|
32
|
+
true
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
class << self
|
|
37
|
+
def included(base)
|
|
38
|
+
base.send(:include, InstanceMethods)
|
|
39
|
+
base.extend(ClassMethods)
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
require 'graphlient'
|
|
2
|
-
module Ecoportal
|
|
3
|
-
module API
|
|
4
|
-
module Common
|
|
5
|
-
module GraphQL
|
|
6
|
-
class Client < ::Graphlient::Client
|
|
7
|
-
ENDPOINT_PATH = 'external/graphql'.freeze
|
|
8
|
-
|
|
9
|
-
attr_accessor :host, :http_client
|
|
10
|
-
|
|
11
|
-
READ_TIMEOUT = 90
|
|
12
|
-
WRITE_TIMEOUT = 90
|
|
13
|
-
|
|
14
|
-
include Ecoportal::API::Common::GraphQL::AuthService
|
|
15
|
-
|
|
16
|
-
def initialize(
|
|
17
|
-
email: nil,
|
|
18
|
-
pass: nil,
|
|
19
|
-
org_id: self.org_id,
|
|
20
|
-
host: server,
|
|
21
|
-
schema_path: host,
|
|
22
|
-
no_schema: false
|
|
23
|
-
)
|
|
24
|
-
@org_id = org_id
|
|
25
|
-
@host = host
|
|
26
|
-
@no_schema = no_schema
|
|
27
|
-
@user_email = email
|
|
28
|
-
@user_pass = pass
|
|
29
|
-
|
|
30
|
-
puts "Configuring GraphQL Client onto '#{url}'"
|
|
31
|
-
|
|
32
|
-
super(
|
|
33
|
-
url,
|
|
34
|
-
headers: {
|
|
35
|
-
'Authorization' => "Bearer #{session_token(host: host)}"
|
|
36
|
-
},
|
|
37
|
-
http_options: {
|
|
38
|
-
read_timeout: READ_TIMEOUT,
|
|
39
|
-
write_timeout: WRITE_TIMEOUT
|
|
40
|
-
}.tap do |options|
|
|
41
|
-
options.merge!(schema_path: schema_path) unless @no_schema
|
|
42
|
-
end
|
|
43
|
-
)
|
|
44
|
-
end
|
|
45
|
-
|
|
46
|
-
def new(org_id: self.org_id, host: self.host, schema_path: host, no_schema: @no_schema)
|
|
47
|
-
self.class.new(
|
|
48
|
-
org_id: org_id,
|
|
49
|
-
host: host,
|
|
50
|
-
schema_path: schema_path,
|
|
51
|
-
no_schema: no_schema
|
|
52
|
-
)
|
|
53
|
-
end
|
|
54
|
-
|
|
55
|
-
def org_id
|
|
56
|
-
@org_id || fetch_env_required('ORGANIZATION_ID')
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
private
|
|
60
|
-
|
|
61
|
-
def url
|
|
62
|
-
base_url = Ecoportal::API::Common::GraphQL::HttpClient.base_url(host)
|
|
63
|
-
"#{base_url}/api/#{org_id}/#{ENDPOINT_PATH}"
|
|
64
|
-
end
|
|
65
|
-
end
|
|
66
|
-
end
|
|
67
|
-
end
|
|
68
|
-
end
|
|
69
|
-
end
|
|
1
|
+
require 'graphlient'
|
|
2
|
+
module Ecoportal
|
|
3
|
+
module API
|
|
4
|
+
module Common
|
|
5
|
+
module GraphQL
|
|
6
|
+
class Client < ::Graphlient::Client
|
|
7
|
+
ENDPOINT_PATH = 'external/graphql'.freeze
|
|
8
|
+
|
|
9
|
+
attr_accessor :host, :http_client
|
|
10
|
+
|
|
11
|
+
READ_TIMEOUT = 90
|
|
12
|
+
WRITE_TIMEOUT = 90
|
|
13
|
+
|
|
14
|
+
include Ecoportal::API::Common::GraphQL::AuthService
|
|
15
|
+
|
|
16
|
+
def initialize(
|
|
17
|
+
email: nil,
|
|
18
|
+
pass: nil,
|
|
19
|
+
org_id: self.org_id,
|
|
20
|
+
host: server,
|
|
21
|
+
schema_path: host,
|
|
22
|
+
no_schema: false
|
|
23
|
+
)
|
|
24
|
+
@org_id = org_id
|
|
25
|
+
@host = host
|
|
26
|
+
@no_schema = no_schema
|
|
27
|
+
@user_email = email
|
|
28
|
+
@user_pass = pass
|
|
29
|
+
|
|
30
|
+
puts "Configuring GraphQL Client onto '#{url}'"
|
|
31
|
+
|
|
32
|
+
super(
|
|
33
|
+
url,
|
|
34
|
+
headers: {
|
|
35
|
+
'Authorization' => "Bearer #{session_token(host: host)}"
|
|
36
|
+
},
|
|
37
|
+
http_options: {
|
|
38
|
+
read_timeout: READ_TIMEOUT,
|
|
39
|
+
write_timeout: WRITE_TIMEOUT
|
|
40
|
+
}.tap do |options|
|
|
41
|
+
options.merge!(schema_path: schema_path) unless @no_schema
|
|
42
|
+
end
|
|
43
|
+
)
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def new(org_id: self.org_id, host: self.host, schema_path: host, no_schema: @no_schema)
|
|
47
|
+
self.class.new(
|
|
48
|
+
org_id: org_id,
|
|
49
|
+
host: host,
|
|
50
|
+
schema_path: schema_path,
|
|
51
|
+
no_schema: no_schema
|
|
52
|
+
)
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
def org_id
|
|
56
|
+
@org_id || fetch_env_required('ORGANIZATION_ID')
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
private
|
|
60
|
+
|
|
61
|
+
def url
|
|
62
|
+
base_url = Ecoportal::API::Common::GraphQL::HttpClient.base_url(host)
|
|
63
|
+
"#{base_url}/api/#{org_id}/#{ENDPOINT_PATH}"
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
end
|