ecoportal-api-graphql 1.3.5 → 1.3.9
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/.ai-assistance/bridge/CLAUDE.md +338 -0
- data/.ai-assistance/bridge/archive/.gitkeep +0 -0
- data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.inbox.md +29 -0
- data/.ai-assistance/bridge/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.outbox.md +18 -0
- data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.inbox.md +42 -0
- data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.outbox.md +115 -0
- data/.ai-assistance/bridge/context/gemini-review-prompt.txt +48 -0
- data/.ai-assistance/bridge/context/gemini-review-response.md +104 -0
- data/.ai-assistance/bridge/context/project.md +42 -0
- data/.ai-assistance/bridge/inbox/.gitkeep +0 -0
- data/.ai-assistance/bridge/outbox/.gitkeep +0 -0
- data/.ai-assistance/bridge/outbox/request-for-standards-discovery.md +48 -0
- data/.ai-assistance/bridge/queue/.gitkeep +1 -0
- data/.ai-assistance/capabilities/CLAUDE.md +27 -0
- data/.ai-assistance/capabilities/assumptions-log.md +80 -0
- data/.ai-assistance/capabilities/code.md +47 -0
- data/.ai-assistance/capabilities/connectors.md +37 -0
- data/.ai-assistance/capabilities/cowork.md +55 -0
- data/.ai-assistance/code/OVERVIEW.md +155 -0
- data/.ai-assistance/code/data_fields.md +242 -0
- data/.ai-assistance/code/dependencies.md +151 -0
- data/.ai-assistance/code/diff_as_input.md +234 -0
- data/.ai-assistance/code/diff_service_deep_dive.md +192 -0
- data/.ai-assistance/code/ecoPortal_architecture/00_overview_and_index.md +55 -0
- data/.ai-assistance/code/ecoPortal_architecture/01_terminology_dictionary.md +181 -0
- data/.ai-assistance/code/ecoPortal_architecture/02_data_model.md +192 -0
- data/.ai-assistance/code/ecoPortal_architecture/03_api_layers.md +147 -0
- data/.ai-assistance/code/ecoPortal_architecture/04_graphql_queries_mutations.md +277 -0
- data/.ai-assistance/code/ecoPortal_architecture/05_page_workflows.md +200 -0
- data/.ai-assistance/code/ecoPortal_architecture/06_search_and_filters.md +228 -0
- data/.ai-assistance/code/ecoPortal_architecture/07_data_fields.md +197 -0
- data/.ai-assistance/code/ecoPortal_architecture/08_stages_sections.md +243 -0
- data/.ai-assistance/code/ecoPortal_architecture/09_people_contractors_locations.md +196 -0
- data/.ai-assistance/code/ecoPortal_architecture/10_forces_workflow_builder.md +132 -0
- data/.ai-assistance/code/ecoPortal_architecture/11_integration_gems.md +187 -0
- data/.ai-assistance/code/ecoPortal_architecture/12_ai_documentation_sources_gaps.md +236 -0
- data/.ai-assistance/code/ecoPortal_architecture/13_ai_infrastructure.md +183 -0
- data/.ai-assistance/code/ecoportal_schema_reference.md +240 -0
- data/.ai-assistance/code/graphql_domain_knowledge.md +230 -0
- data/.ai-assistance/code/refactoring/datafield-readwrite-shape-asymmetry.md +71 -0
- data/.ai-assistance/code/refactoring/opportunities.md +251 -0
- data/.ai-assistance/code/schema_analysis.md +321 -0
- data/.ai-assistance/code/search_filters.md +868 -0
- data/.ai-assistance/code/spec_coverage.md +73 -0
- data/.ai-assistance/code/workflow-command-guide.md +438 -0
- data/.ai-assistance/code/workflow-space.md +353 -0
- data/.ai-assistance/conventions/CLAUDE.md +30 -0
- data/.ai-assistance/conventions/code-working-tree-protocol.md +199 -0
- data/.ai-assistance/conventions/gitignore-rules.md +42 -0
- data/.ai-assistance/conventions/permission-guidance.md +120 -0
- data/.ai-assistance/integrations/README.md +70 -0
- data/.ai-assistance/integrations/gitkraken-mcp.md +107 -0
- data/.ai-assistance/integrations/gitlab-mcp.md +123 -0
- data/.ai-assistance/integrations/local-git.md +60 -0
- data/.ai-assistance/local_paths.example.md +17 -0
- data/.ai-assistance/projects/TODO.md +97 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/DECISIONS.md +168 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/INTENT.md +60 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/TODO.md +267 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/UPSTREAM.md +53 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/csv-template-pipeline-design.md +102 -0
- data/.ai-assistance/projects/api-v2-to-graphql-migration/notes/cutover-usecase-gap-audit.md +139 -0
- data/.ai-assistance/projects/dynamic-model-generation/INTENT.md +93 -0
- data/.ai-assistance/projects/eco-helpers-compat/INTENT.md +244 -0
- data/.ai-assistance/projects/eco-helpers-compat/MIGRATION_GUIDE.md +266 -0
- data/.ai-assistance/projects/eco-helpers-compat/TODO.md +86 -0
- data/.ai-assistance/projects/ecoportal-api-v2-doublemodel-review/INTENT.md +101 -0
- data/.ai-assistance/projects/graphql-agent/GAP_ANALYSIS.md +177 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/DECISIONS.md +161 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/INTENT.md +125 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/RISKS.md +126 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/TODO.md +256 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-06-30-cutover-workflow-deep-review.md +122 -0
- data/.ai-assistance/projects/ooze-graphql-native-migration/analysis/2026-07-01-forces-via-workflow-commands-miss-rca.md +148 -0
- data/.ai-assistance/projects/page-model/DECISIONS.md +245 -0
- data/.ai-assistance/projects/page-model/TODO.md +190 -0
- data/.ai-assistance/projects/search-filter-builder/INTENT.md +107 -0
- data/.ai-assistance/projects/search-filter-builder/TODO.md +131 -0
- data/.ai-assistance/projects/template-maintenance/DESIGN.md +134 -0
- data/.ai-assistance/projects/workflow-space/TODO.md +213 -0
- data/.ai-assistance/reinstall-claude-desktop-windows.md +136 -0
- data/.ai-assistance/scripts/CLAUDE.md +150 -0
- data/.ai-assistance/scripts/bridge-init.sh +86 -0
- data/.ai-assistance/scripts/bridge-status.sh +44 -0
- data/.ai-assistance/scripts/capabilities-check.ts +104 -0
- data/.ai-assistance/scripts/check-outbox.sh +43 -0
- data/.ai-assistance/scripts/dep_graph.rb +91 -0
- data/.ai-assistance/scripts/lock-acquire.sh +103 -0
- data/.ai-assistance/scripts/lock-multi.sh +124 -0
- data/.ai-assistance/scripts/lock-queue.sh +94 -0
- data/.ai-assistance/scripts/setup-mcps.test.ts +188 -0
- data/.ai-assistance/scripts/setup-mcps.ts +234 -0
- data/.ai-assistance/scripts/task-complete.ts +74 -0
- data/.ai-assistance/scripts/task-create.ts +75 -0
- data/.ai-assistance/scripts/task-read.ts +125 -0
- data/.ai-assistance/scripts/token-logger.js +220 -0
- data/.ai-assistance/scripts/token-report.ts +158 -0
- data/.ai-assistance/scripts/token-session-start.js +66 -0
- data/.ai-assistance/skills/ai-instructions/SKILL.md +48 -0
- data/.ai-assistance/skills/code-specs/SKILL.md +69 -0
- data/.ai-assistance/skills/corporate-policies/SKILL.md +201 -0
- data/.ai-assistance/skills/dep-graph/SKILL.md +139 -0
- data/.ai-assistance/skills/ep-ai-manager/SKILL.md +417 -0
- data/.ai-assistance/skills/gemini-assist/SKILL.md +63 -0
- data/.ai-assistance/skills/gemini-assist/gemini-mcp-server.js +205 -0
- data/.ai-assistance/skills/gemini-assist/gemini_ask.py +1 -0
- data/.ai-assistance/skills/gemini-assist/gemini_ask.rb +240 -0
- data/.ai-assistance/skills/gemini-assist/prompts/cycle_end_review.txt +25 -0
- data/.ai-assistance/skills/graphql-schema-analysis/SKILL.md +261 -0
- data/.ai-assistance/skills/project-cycle/SKILL.md +177 -0
- data/.ai-assistance/skills/refactor/SKILL.md +62 -0
- data/.ai-assistance/skills/rubocop/SKILL.md +93 -0
- data/.ai-assistance/skills/ruby-scripting/SKILL.md +215 -0
- data/.ai-assistance/skills/spec-generation/SKILL.md +72 -0
- data/.ai-assistance/standards-version.json +21 -0
- data/.ai-assistance/token-budget.json +32 -0
- data/.ai-assistance/version.json +39 -0
- data/.claude/settings.json +146 -0
- data/.env.example +18 -0
- data/.gitattributes +15 -0
- data/.gitignore +13 -0
- data/.rubocop.yml +121 -97
- data/CHANGELOG.md +673 -477
- data/CLAUDE.md +232 -0
- data/Gemfile +30 -6
- data/Rakefile +90 -38
- data/docs/worklog.md +574 -0
- data/ecoportal-api-graphql.gemspec +40 -40
- data/lib/ecoportal/api/common/graphql/CLAUDE.md +36 -0
- data/lib/ecoportal/api/common/graphql/client.rb +1 -1
- data/lib/ecoportal/api/common/graphql/http_client.rb +35 -3
- data/lib/ecoportal/api/common/graphql/model/CLAUDE.md +28 -0
- data/lib/ecoportal/api/common/graphql/model/as_input.rb +8 -5
- data/lib/ecoportal/api/common/graphql/model/diffable/classic_diff_service.rb +3 -1
- data/lib/ecoportal/api/common/graphql/model/diffable/diff_service.rb +31 -23
- data/lib/ecoportal/api/common/graphql/model/diffable/hash_diff_nesting.rb +54 -1
- data/lib/ecoportal/api/graphql/CLAUDE.md +37 -0
- data/lib/ecoportal/api/graphql/base/CLAUDE.md +50 -0
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +17 -0
- data/lib/ecoportal/api/graphql/base/delta_result.rb +16 -0
- data/lib/ecoportal/api/graphql/base/force/binding.rb +19 -0
- data/lib/ecoportal/api/graphql/base/force/binding_collection.rb +62 -0
- data/lib/ecoportal/api/graphql/base/force/collection.rb +47 -0
- data/lib/ecoportal/api/graphql/base/force.rb +65 -0
- data/lib/ecoportal/api/graphql/base/kickstand/job.rb +17 -0
- data/lib/ecoportal/api/graphql/base/kickstand/workflow.rb +18 -0
- data/lib/ecoportal/api/graphql/base/kickstand.rb +13 -0
- data/lib/ecoportal/api/graphql/base/page/basic.rb +38 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/actions_list.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/ai_summary.rb +18 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/checklist.rb +29 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/collection.rb +112 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/contractor_entities.rb +28 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/cross_reference.rb +54 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/date_field.rb +23 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/file_field.rb +25 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/gauge.rb +19 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/geo.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/law.rb +8 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/mailbox.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/number.rb +20 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/people.rb +35 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/plain_text.rb +17 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/rich_text.rb +26 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/select.rb +41 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/signature.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/smart_fill.rb +17 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/table.rb +9 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/tag_field.rb +21 -0
- data/lib/ecoportal/api/graphql/base/page/data_field.rb +137 -12
- data/lib/ecoportal/api/graphql/base/page/phased/stage.rb +68 -14
- data/lib/ecoportal/api/graphql/base/page/phased.rb +1 -0
- data/lib/ecoportal/api/graphql/base/page/section.rb +36 -0
- data/lib/ecoportal/api/graphql/base/page/section_collection.rb +79 -0
- data/lib/ecoportal/api/graphql/base/page.rb +2 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/action_type_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/callback_type.rb +28 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_change.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_change_message.rb +15 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_es_change.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/command_interface.rb +36 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/email_config.rb +18 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/escalation_level.rb +19 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/in_system_config.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/mailbox_field_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operation_interface.rb +39 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/assign_to.rb +27 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/create_page.rb +21 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/operations/send_notification.rb +30 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/people_field_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/recipient_config.rb +34 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/register_field.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/task_config_selection.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/time_delay_config.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/trigger_interface.rb +26 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/triggers/conditional_logic.rb +17 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow/user_selection.rb +16 -0
- data/lib/ecoportal/api/graphql/base/pages_workflow.rb +35 -0
- data/lib/ecoportal/api/graphql/base/preset_view.rb +17 -0
- data/lib/ecoportal/api/graphql/base/preview_page.rb +23 -0
- data/lib/ecoportal/api/graphql/base/register.rb +18 -0
- data/lib/ecoportal/api/graphql/base.rb +11 -0
- data/lib/ecoportal/api/graphql/builder/CLAUDE.md +65 -0
- data/lib/ecoportal/api/graphql/builder/kickstand.rb +73 -0
- data/lib/ecoportal/api/graphql/builder/page.rb +210 -41
- data/lib/ecoportal/api/graphql/builder/register/preset_view.rb +84 -0
- data/lib/ecoportal/api/graphql/builder/register.rb +27 -19
- data/lib/ecoportal/api/graphql/builder/template.rb +80 -0
- data/lib/ecoportal/api/graphql/builder.rb +2 -0
- data/lib/ecoportal/api/graphql/compat/filter_translator.rb +107 -0
- data/lib/ecoportal/api/graphql/compat/page_reference.rb +23 -0
- data/lib/ecoportal/api/graphql/compat/pages.rb +212 -0
- data/lib/ecoportal/api/graphql/compat/registers.rb +84 -0
- data/lib/ecoportal/api/graphql/compat/response.rb +35 -0
- data/lib/ecoportal/api/graphql/compat/search_results.rb +33 -0
- data/lib/ecoportal/api/graphql/compat/stage_collection.rb +70 -0
- data/lib/ecoportal/api/graphql/compat/stage_view.rb +76 -0
- data/lib/ecoportal/api/graphql/compat.rb +17 -0
- data/lib/ecoportal/api/graphql/concerns/data_field_access.rb +71 -0
- data/lib/ecoportal/api/graphql/concerns/deprecation.rb +20 -0
- data/lib/ecoportal/api/graphql/concerns/fragment_definitions.rb +21 -28
- data/lib/ecoportal/api/graphql/concerns/page_compat.rb +51 -0
- data/lib/ecoportal/api/graphql/concerns/snake_camel_access.rb +60 -0
- data/lib/ecoportal/api/graphql/concerns.rb +4 -0
- data/lib/ecoportal/api/graphql/connection/page.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/pages_workflow_command.rb +13 -0
- data/lib/ecoportal/api/graphql/connection/preset_view.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/preview_page.rb +11 -0
- data/lib/ecoportal/api/graphql/connection.rb +4 -0
- data/lib/ecoportal/api/graphql/file_upload/client.rb +181 -0
- data/lib/ecoportal/api/graphql/file_upload.rb +10 -0
- data/lib/ecoportal/api/graphql/fragment/action.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/action_category.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/contractor_entity.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/force.rb +30 -0
- data/lib/ecoportal/api/graphql/fragment/location_draft.rb +2 -2
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/locations_error.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment/page.rb +85 -0
- data/lib/ecoportal/api/graphql/fragment/pages/common_page_union.rb +395 -0
- data/lib/ecoportal/api/graphql/fragment/pages.rb +15 -0
- data/lib/ecoportal/api/graphql/fragment/pages_workflow.rb +172 -0
- data/lib/ecoportal/api/graphql/fragment/pagination.rb +1 -1
- data/lib/ecoportal/api/graphql/fragment.rb +37 -27
- data/lib/ecoportal/api/graphql/input/contractor_entity/update.rb +25 -0
- data/lib/ecoportal/api/graphql/input/delta_input.rb +16 -0
- data/lib/ecoportal/api/graphql/input/page/archive.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/build_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/create_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/create_from_template.rb +18 -0
- data/lib/ecoportal/api/graphql/input/page/delete_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/publish_draft.rb +13 -0
- data/lib/ecoportal/api/graphql/input/page/review_task.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/unarchive.rb +14 -0
- data/lib/ecoportal/api/graphql/input/page/update.rb +140 -0
- data/lib/ecoportal/api/graphql/input/page.rb +26 -0
- data/lib/ecoportal/api/graphql/input/preset_view/create.rb +18 -0
- data/lib/ecoportal/api/graphql/input/preset_view/permission.rb +16 -0
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +16 -0
- data/lib/ecoportal/api/graphql/input/preset_view.rb +14 -0
- data/lib/ecoportal/api/graphql/input/register/create.rb +18 -0
- data/lib/ecoportal/api/graphql/input/register/update.rb +15 -0
- data/lib/ecoportal/api/graphql/input/register.rb +13 -0
- data/lib/ecoportal/api/graphql/input/search_conf/ai_generator.rb +234 -0
- data/lib/ecoportal/api/graphql/input/search_conf.rb +367 -0
- data/lib/ecoportal/api/graphql/input/variable_binding.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_action_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_comment_tagging_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_gauge_field_stop.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_field_config.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_action_type.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_filter.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_people_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_task_config.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_recipient_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_scheduled_callback_action.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_select_field_option.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_task_assignment_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_workflow_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/collapse_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_creator_permissions.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_gauge_field_stop.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_field_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +28 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page_creator_permissions.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_reminder.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_required_sign_offs.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_comment_tagging.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_restrict_task_assignment.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_scheduled_callback.rb +22 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_section_header.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_select_field_option.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_task_due.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_trigger.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/expand_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/contractor_entities.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/gauge.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/location_field.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/people.rb +24 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/signature.rb +20 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/table.rb +25 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_action_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_binding.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_comment_tagging_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_default_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_force.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_gauge_field_stop.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_field_config.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_linked_helper.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_direct_strategy_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_operation_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_action_type.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_filter.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_people_field.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_task_config.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_recipient_user.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_scheduled_callback.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_select_field_option.rb +17 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_stage_tag.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_strategy.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_assignment_user_group.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_due.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_task_priority_level.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +18 -0
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +251 -0
- data/lib/ecoportal/api/graphql/input.rb +8 -0
- data/lib/ecoportal/api/graphql/interface/base_page.rb +100 -58
- data/lib/ecoportal/api/graphql/interface/location_structure/nodes.rb +27 -28
- data/lib/ecoportal/api/graphql/logic/base_model.rb +2 -0
- data/lib/ecoportal/api/graphql/logic/base_query.rb +45 -2
- data/lib/ecoportal/api/graphql/logic/input.rb +15 -0
- data/lib/ecoportal/api/graphql/model/ai_summary_version.rb +10 -0
- data/lib/ecoportal/api/graphql/model/organization.rb +65 -55
- data/lib/ecoportal/api/graphql/model/page/basic.rb +14 -0
- data/lib/ecoportal/api/graphql/model/page/phased.rb +82 -20
- data/lib/ecoportal/api/graphql/model/page.rb +1 -0
- data/lib/ecoportal/api/graphql/model/page_union.rb +21 -0
- data/lib/ecoportal/api/graphql/model/pages_workflow.rb +20 -0
- data/lib/ecoportal/api/graphql/model/preset_view.rb +10 -0
- data/lib/ecoportal/api/graphql/model/preview_page.rb +10 -0
- data/lib/ecoportal/api/graphql/model/register.rb +10 -0
- data/lib/ecoportal/api/graphql/model.rb +8 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +45 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary.rb +13 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_jobs.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/bulk_update_workflows.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/fail_job.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/fail_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/start_job.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/start_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand/stop_workflow.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/kickstand.rb +18 -0
- data/lib/ecoportal/api/graphql/mutation/location_structure/apply_commands.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/add_commands.rb +2 -2
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/create.rb +2 -2
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/drop_bad_commands.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/location_structure/draft/publish.rb +3 -3
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/archive.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/build_from_template.rb +50 -0
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/create_from_template.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/execute_force_commands.rb +69 -0
- data/lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb +51 -0
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/unarchive.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/update.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/page/update_variable_bindings.rb +44 -0
- data/lib/ecoportal/api/graphql/mutation/page.rb +28 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/create.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/permission.rb +37 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view/update.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/preset_view.rb +15 -0
- data/lib/ecoportal/api/graphql/mutation/register/create.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register/update.rb +35 -0
- data/lib/ecoportal/api/graphql/mutation/register.rb +14 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +36 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +40 -0
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +13 -0
- data/lib/ecoportal/api/graphql/mutation/template/create.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/create_related_page.rb +46 -0
- data/lib/ecoportal/api/graphql/mutation/template/destroy_related_page.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template/publish.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/unpublish.rb +39 -0
- data/lib/ecoportal/api/graphql/mutation/template/update.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template/update_information.rb +43 -0
- data/lib/ecoportal/api/graphql/mutation/template.rb +18 -0
- data/lib/ecoportal/api/graphql/mutation.rb +8 -0
- data/lib/ecoportal/api/graphql/payload/ai_summary_generate.rb +12 -0
- data/lib/ecoportal/api/graphql/payload/execute_workflow_commands.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/force_commands.rb +31 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb +36 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/job.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/workflow.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/kickstand.rb +15 -0
- data/lib/ecoportal/api/graphql/payload/location_structure/draft/create.rb +33 -34
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +21 -0
- data/lib/ecoportal/api/graphql/payload/page/archive.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/build_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/create_from_template.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/unarchive.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/update.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page/update_variable_bindings.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/page.rb +19 -0
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +11 -0
- data/lib/ecoportal/api/graphql/payload/register.rb +11 -0
- data/lib/ecoportal/api/graphql/payload/template/create.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/create_related_page.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/destroy_related_page.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/publish.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/unpublish.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/update.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template/update_information.rb +13 -0
- data/lib/ecoportal/api/graphql/payload/template.rb +18 -0
- data/lib/ecoportal/api/graphql/payload.rb +11 -0
- data/lib/ecoportal/api/graphql/query/action.rb +1 -1
- data/lib/ecoportal/api/graphql/query/action_categories.rb +1 -1
- data/lib/ecoportal/api/graphql/query/actions.rb +2 -2
- data/lib/ecoportal/api/graphql/query/contractor_entities.rb +1 -1
- data/lib/ecoportal/api/graphql/query/file_upload_signature.rb +76 -0
- data/lib/ecoportal/api/graphql/query/location_structure/draft.rb +2 -2
- data/lib/ecoportal/api/graphql/query/location_structure.rb +1 -1
- data/lib/ecoportal/api/graphql/query/location_structures.rb +1 -1
- data/lib/ecoportal/api/graphql/query/page.rb +45 -0
- data/lib/ecoportal/api/graphql/query/page_delta.rb +47 -0
- data/lib/ecoportal/api/graphql/query/page_with_forces.rb +43 -0
- data/lib/ecoportal/api/graphql/query/pages.rb +59 -0
- data/lib/ecoportal/api/graphql/query/pages_workflow_commands.rb +59 -0
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +78 -0
- data/lib/ecoportal/api/graphql/query/register_preview_pages.rb +83 -0
- data/lib/ecoportal/api/graphql/query/templates.rb +53 -0
- data/lib/ecoportal/api/graphql/query.rb +11 -0
- data/lib/ecoportal/api/graphql.rb +60 -2
- data/lib/ecoportal/api/graphql_version.rb +5 -5
- data/scripts/auto-worker-scheduler.sh +386 -0
- data/tests/contractor_entity_create.rb +19 -19
- data/tests/contractor_entity_udpate.rb +20 -20
- data/tests/dump_page_model.rb +74 -0
- data/tests/loc_structure_get.rb +1 -2
- data/tests/loc_structure_update.rb +51 -51
- data/tests/loc_structures_get.rb +15 -15
- metadata +436 -5
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
# AI Documentation Sources, Gaps, and Improvement Opportunities
|
|
2
|
+
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
## Knowledge Sources for AI Agents
|
|
6
|
+
|
|
7
|
+
### 1. GraphQL Schema (Live — Auto-Generated)
|
|
8
|
+
|
|
9
|
+
**URL:** `https://live.ecoportal.com/api-docs/graphql` (requires login)
|
|
10
|
+
**Corpus location:** `C:\claude\Projects\Claude AWS Platform\tmp\corpus\staging\success\graphql\schema_graphql-schema.md`
|
|
11
|
+
**Type:** Auto-generated from GraphQL SDL on each deployment
|
|
12
|
+
**Quality:** Authoritative — always reflects the current API
|
|
13
|
+
**Limitations:** No explanations, no examples, field descriptions sparse
|
|
14
|
+
|
|
15
|
+
### 2. Confluence APIDOCS Space
|
|
16
|
+
|
|
17
|
+
**URL:** `https://ecoportal-projects.atlassian.net/wiki/spaces/APIDOCS`
|
|
18
|
+
**Corpus location:** `C:\claude\Projects\Claude AWS Platform\tmp\corpus\staging\success\graphql\`
|
|
19
|
+
**Type:** Team-maintained documentation, customer-facing guidance
|
|
20
|
+
|
|
21
|
+
**Key pages:**
|
|
22
|
+
- `2254077960_graphql-api-docs.md` — GraphQL API introduction
|
|
23
|
+
- `2235662347_graphql-pages-technical-guide.md` — Pages technical guide
|
|
24
|
+
- `2262892608_registers-searches-and-templates.md` — **EMPTY — critical gap**
|
|
25
|
+
- `2262696008_pageunion-common-fragment-definition.md` — CommonPageUnion reference
|
|
26
|
+
- `1933639695_searching-pages.md` — Search/filter guide
|
|
27
|
+
- `1931542534_createpagefromtemplate.md` — Create workflow
|
|
28
|
+
- `1931575325_updatepage.md` — Update workflow
|
|
29
|
+
- `1959788614_authentication-flow.md` — Auth guide
|
|
30
|
+
- `2261450758_schema-introspection.md` — Schema introspection
|
|
31
|
+
- `2261614596_fetch-by-system-id.md` — Fetch by system ID
|
|
32
|
+
- `2262499334_search-by-external-id.md` — **BROKEN — placeholder content**
|
|
33
|
+
- `2289958954_list-all-templates.md`, `2290122761_list-register-templates.md`, `2290089995_list-registers.md`
|
|
34
|
+
- `1928855618_createaction.md`, `1928921220_updateaction.md`, `1933901853_loadactions.md`
|
|
35
|
+
|
|
36
|
+
### 3. Confluence Engineering Projects (High Level Requirements)
|
|
37
|
+
|
|
38
|
+
**URL:** Engineering Confluence space (separate from APIDOCS)
|
|
39
|
+
**Status:** EXISTS but not yet in the corpus
|
|
40
|
+
**Contains:** HLRs for new features, architectural decisions, roadmap items
|
|
41
|
+
**Gap:** Not yet available to AI agents. Would provide: planned features, architectural
|
|
42
|
+
constraints, why certain decisions were made, what's coming next.
|
|
43
|
+
|
|
44
|
+
**Recommended action:** Add Engineering HLR pages to the corpus. Particularly valuable:
|
|
45
|
+
- Workflow Builder HLR and design docs
|
|
46
|
+
- Field ID / System ID project spec
|
|
47
|
+
- APIv3 page render spec
|
|
48
|
+
- Template editing via GraphQL (when Engineering unblocks it)
|
|
49
|
+
|
|
50
|
+
### 4. Confluence Knowledge Base (Customer-Facing Articles)
|
|
51
|
+
|
|
52
|
+
**URL:** Separate Confluence space — customer-facing how-to articles
|
|
53
|
+
**Status:** NOT YET in the corpus
|
|
54
|
+
**Contains:** End-user instructions for using ecoPortal features (not API)
|
|
55
|
+
**Value for AI:** Understanding what customers call things, common support tickets,
|
|
56
|
+
feature explanations at a non-technical level
|
|
57
|
+
|
|
58
|
+
**Gap:** An AI agent helping customers reference both KB articles and API docs would
|
|
59
|
+
be much more effective.
|
|
60
|
+
|
|
61
|
+
### 5. Production Insomnia Queries (Verified Examples)
|
|
62
|
+
|
|
63
|
+
**Location:** `C:\claude\Projects\Claude AWS Platform\tmp\corpus\success\graphql\examples\Insomnia_2026-06-07.yaml`
|
|
64
|
+
**Corpus extraction:** `C:\ruby_scripts\git\ecoportal-api-graphql\.ai-assistance\code\search_filters.md`
|
|
65
|
+
**Contains:** 17+ production queries verified against live.ecoportal.com
|
|
66
|
+
|
|
67
|
+
Key confirmed patterns:
|
|
68
|
+
- Org search with register + date filters
|
|
69
|
+
- Register search (`previewPages`)
|
|
70
|
+
- Find by externalId (exact_filter)
|
|
71
|
+
- OR filter for multiple externalIds
|
|
72
|
+
- buildFromTemplate + createFromTemplate
|
|
73
|
+
- updatePage with field values
|
|
74
|
+
- archivePage compound mutation
|
|
75
|
+
|
|
76
|
+
### 6. Front-End GraphQL Queries (React components)
|
|
77
|
+
|
|
78
|
+
**Location:** `C:\docker\ecoPortal_master\` — `.graphql` files distributed throughout
|
|
79
|
+
the React codebase
|
|
80
|
+
**Status:** Not yet systematically catalogued
|
|
81
|
+
**Contains:** Every query/mutation used in the React UI — ground truth for what's
|
|
82
|
+
actually supported and used
|
|
83
|
+
|
|
84
|
+
**Recommended action:** Run a grep for `*.graphql` files across the ecoPortal codebase,
|
|
85
|
+
extract all query/mutation names, and add them to the corpus. The `graphql-schema-analysis`
|
|
86
|
+
skill has guidance for this.
|
|
87
|
+
|
|
88
|
+
### 7. eco-helpers Source Code
|
|
89
|
+
|
|
90
|
+
**Location:** `C:\ruby_scripts\git\eco-helpers`
|
|
91
|
+
**Contains:** All integration patterns used by the Integrations Team
|
|
92
|
+
**Audited:** 2026-06-07 (see eco-helpers-compat INTENT.md)
|
|
93
|
+
**Key files:** `ooze_base_case.rb`, `register_export_case.rb`, `register_update_case.rb`,
|
|
94
|
+
`helpers/filters.rb`
|
|
95
|
+
|
|
96
|
+
### 8. ecoportal-api-v2 Source Code
|
|
97
|
+
|
|
98
|
+
**Location:** `C:\ruby_scripts\git\ecoportal-api-v2`
|
|
99
|
+
**Contains:** REST API client, data models, diff/patch logic
|
|
100
|
+
**Key:** `StringDigest` for Field ID formula, `HashDiffPatch` for diff algorithm
|
|
101
|
+
|
|
102
|
+
### 9. APIv3 Page Render (Custom Exports)
|
|
103
|
+
|
|
104
|
+
**Status:** In development. Not yet available for scripting.
|
|
105
|
+
**Purpose:** Custom page rendering for PDF exports and other format-specific outputs.
|
|
106
|
+
**Gap:** Not yet documented in any corpus. When deployed, this will be important for
|
|
107
|
+
customers who need custom report generation.
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## Critical Gaps in Current Documentation
|
|
112
|
+
|
|
113
|
+
### Gaps That Break AI Agent Reliability
|
|
114
|
+
|
|
115
|
+
| Gap | Impact | Recommended Fix |
|
|
116
|
+
|-----|--------|-----------------|
|
|
117
|
+
| `2262892608` (registers/search/templates) is EMPTY | Agent has NO guidance on register search | Write comprehensive page: register structure, previewPages, search, preset views |
|
|
118
|
+
| `2262499334` (search by externalId) has placeholder content | Agent will make up contractor search syntax | Replace with real query + variables |
|
|
119
|
+
| Error taxonomy completely missing | Agent invents error codes/names | Document 20+ error codes: patchVer conflict, invalid field ID, permission denied, stale cursor, etc. |
|
|
120
|
+
| State machines not documented | Agent suggests invalid state changes | Add state diagrams: Page (active→archived→active), Stage (pending→inprogress→complete), Task |
|
|
121
|
+
| `updateMode` on actions undocumented | Agent omits or guesses this param | Document enum: single/series/future/all |
|
|
122
|
+
| Authorization (`canXXX` fields) unexplained | Agent doesn't know what to do on `canUpdate: false` | Document each `canXXX` field's meaning and correct response |
|
|
123
|
+
| Filter `key` vs `fieldName` inconsistency | Agent uses wrong key name | Document that sorters use `key:`, filters use `key:` in params |
|
|
124
|
+
|
|
125
|
+
### Gaps That Reduce Usefulness
|
|
126
|
+
|
|
127
|
+
| Gap | Impact |
|
|
128
|
+
|-----|--------|
|
|
129
|
+
| No field type reference (all 20 types) | Agent doesn't know what fields are available or how to update them |
|
|
130
|
+
| Pagination edge cases undocumented | Agent doesn't know cursor invalidation policy |
|
|
131
|
+
| CommonPageUnion variables not explained in human terms | Agent can't tell customer what `$content`, `$fields`, `$only_content` do |
|
|
132
|
+
| Archive/unarchive compound pattern not in corpus | Agent misses the externalId blanking step |
|
|
133
|
+
| `previewPages` vs `pages` distinction not documented | Agent uses wrong query for register search |
|
|
134
|
+
| No contractor CRUD guide | Agent makes up create/update/delete syntax |
|
|
135
|
+
| File upload mechanics missing | Agent can't guide file/image field updates |
|
|
136
|
+
|
|
137
|
+
---
|
|
138
|
+
|
|
139
|
+
## Recommended Agent Instructions (System Prompt Additions)
|
|
140
|
+
|
|
141
|
+
An AI agent deployed to assist ecoPortal customers or integrations should include:
|
|
142
|
+
|
|
143
|
+
```
|
|
144
|
+
Key invariants for the ecoPortal GraphQL API:
|
|
145
|
+
|
|
146
|
+
1. GraphQL queries are client-defined. Variability in examples is intentional.
|
|
147
|
+
Multiple mutations in one request is valid and used for stateless middleware clients.
|
|
148
|
+
|
|
149
|
+
2. Filter operations are snake_case strings. CamelCase silently returns no results.
|
|
150
|
+
Always use: exact_filter, date_filter, and_filter, or_filter, register_filter.
|
|
151
|
+
The `filters` value should always be an Array.
|
|
152
|
+
|
|
153
|
+
3. Sorters use the key `key:` (not `fieldName:`) pointing to the Elasticsearch index
|
|
154
|
+
key (field ref), not the MongoDB field id.
|
|
155
|
+
|
|
156
|
+
4. Page creation requires a 2-step sequence:
|
|
157
|
+
(a) buildFromTemplate → get server-assigned field IDs from the built draft
|
|
158
|
+
(b) createFromTemplate → use those field IDs in dataFields.updates
|
|
159
|
+
|
|
160
|
+
5. Page update requires:
|
|
161
|
+
(a) Fetch current page → get patchVer + current field IDs and values
|
|
162
|
+
(b) updatePage → include patchVer (required for concurrency control)
|
|
163
|
+
Stale patchVer = mutation rejection.
|
|
164
|
+
|
|
165
|
+
6. The CommonPageUnion fragment ($fields/$content/$only_content variables) is the
|
|
166
|
+
standard pattern for fetching full page data.
|
|
167
|
+
|
|
168
|
+
7. Register search (`previewPages`) is Elasticsearch — fast but no field IDs.
|
|
169
|
+
Org search (`pages`) is DB — slow (~3s/page) but complete data including field IDs.
|
|
170
|
+
For pre-mutation fetch, always use org search.
|
|
171
|
+
|
|
172
|
+
8. Stage-specific operations (submit, sign-off, people field permissions) require
|
|
173
|
+
`stageId` in UpdatePageInput. Without it, server-side workflow may not trigger.
|
|
174
|
+
|
|
175
|
+
9. Engineering does NOT want templates updated via GraphQL. Read-only template access
|
|
176
|
+
is fine. Template mutations exist but are not approved for scripting.
|
|
177
|
+
|
|
178
|
+
10. patchVer is mandatory on all updatePage calls. Scripts MUST fetch the page first.
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
---
|
|
182
|
+
|
|
183
|
+
## Improvement Opportunities for AI-Assisted Integration
|
|
184
|
+
|
|
185
|
+
### Near-Term (Within Corpus)
|
|
186
|
+
|
|
187
|
+
1. **Fill the two broken/empty docs** (2262892608, 2262499334)
|
|
188
|
+
2. **Write error taxonomy** — agents desperately need this
|
|
189
|
+
3. **Write state machine docs** — Page, Stage, Action, Task states
|
|
190
|
+
4. **Document all 20 field types** — types, what values they accept, DataFieldInput keys
|
|
191
|
+
5. **Write CommonPageUnion explanation** — what `$content/$fields/$only_content` do with examples
|
|
192
|
+
|
|
193
|
+
### Medium-Term (New Sources)
|
|
194
|
+
|
|
195
|
+
6. **Add Engineering HLRs** to corpus — Workflow Builder, Field ID project, APIv3
|
|
196
|
+
7. **Add customer-facing KB articles** — align technical + customer vocabulary
|
|
197
|
+
8. **Catalogue front-end `.graphql` files** — ground truth for what's used in production
|
|
198
|
+
9. **Add Insomnia collection systematically** — more coverage of edge cases
|
|
199
|
+
|
|
200
|
+
### Long-Term (AI-Driven Features)
|
|
201
|
+
|
|
202
|
+
10. **AI-assisted filter builder** — customer describes "find all active pages in region X
|
|
203
|
+
updated in the last 7 days" → AI generates `SearchConf` objects
|
|
204
|
+
(Foundation exists in `search-filter-builder/` project, see `TODO.md` Step 5)
|
|
205
|
+
|
|
206
|
+
11. **AI-assisted query builder** — customer describes what they need, AI generates
|
|
207
|
+
the full GraphQL query + fragment combination
|
|
208
|
+
|
|
209
|
+
12. **Automatic schema-corpus sync** — on each deployment, re-generate the corpus
|
|
210
|
+
from live schema introspection and flag what changed
|
|
211
|
+
|
|
212
|
+
---
|
|
213
|
+
|
|
214
|
+
## Things to Remind Oscar (Noted from Session 2026-06-07)
|
|
215
|
+
|
|
216
|
+
- **Confluence Engineering Projects:** Get HLR pages added to corpus. Key projects:
|
|
217
|
+
Workflow Builder, Field ID / System ID, APIv3 page render, template editing unblock.
|
|
218
|
+
|
|
219
|
+
- **Confluence Knowledge Base:** Customer-facing how-to articles — add to corpus to
|
|
220
|
+
bridge technical ↔ customer language gap.
|
|
221
|
+
|
|
222
|
+
- **APIv3 page render:** New endpoint for custom exports. Not yet documented or stable.
|
|
223
|
+
Add to corpus when deployed.
|
|
224
|
+
|
|
225
|
+
- **Front-end `.graphql` files:** Run a systematic sweep of `C:\docker\ecoPortal_master\`
|
|
226
|
+
for `.graphql` files. Add to corpus. These are the ground-truth queries the React UI uses.
|
|
227
|
+
|
|
228
|
+
- **Genome signature:** Will come back to this. Currently broken on many instances.
|
|
229
|
+
Potentially the basis for the Field ID project. `Migrator` service in Rails (abandoned).
|
|
230
|
+
|
|
231
|
+
- **Filter builder DSL:** Operator-based `Search[:field].eq('X') & Search.in_register('R')`
|
|
232
|
+
is the planned API. AI generation hook is step 5 in `search-filter-builder/TODO.md`.
|
|
233
|
+
|
|
234
|
+
- **Comprehensive Confluence review:** The gap analysis (`graphql-agent/GAP_ANALYSIS.md`)
|
|
235
|
+
has the full list of 10+ items to fix before the GraphQL agent can be deployed to customers.
|
|
236
|
+
Two docs are critically broken (empty/placeholder). Fix these first.
|
|
@@ -0,0 +1,183 @@
|
|
|
1
|
+
# 13 — AI Infrastructure
|
|
2
|
+
|
|
3
|
+
*Extracted from backend source analysis of `C:\docker\ecoPortal_master` (2026-06-08).*
|
|
4
|
+
*This is **customer-facing** infrastructure — not to be reused for internal tooling.*
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Overview
|
|
9
|
+
|
|
10
|
+
EcoPortal's AI layer is built on AWS Bedrock (primary LLM and embeddings) + OpenSearch KNN
|
|
11
|
+
(vector search) + AWS Bedrock AgentCore (natural language → filters). GCP Vertex AI provides
|
|
12
|
+
a fallback for image analysis. All AI features are organisation-scoped and gated by feature flags.
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## LLM Models (AWS Bedrock)
|
|
17
|
+
|
|
18
|
+
| Model ID | Region | Use case |
|
|
19
|
+
|---|---|---|
|
|
20
|
+
| `anthropic.claude-3-5-sonnet-20241022-v2:0` | `ap-southeast-2` | AiSummary generation, Image OCR/metadata, SmartFill |
|
|
21
|
+
| `anthropic.claude-3-sonnet-20240229-v1:0` | inferred | Legacy AiSummary |
|
|
22
|
+
| `meta.llama3-3-70b-instruct-v1:0` | `us-east-2` | Alternative LLM |
|
|
23
|
+
| `amazon.nova-micro-v1:0` | `us-east-1` | Lightweight inference (980 req/min rate limit) |
|
|
24
|
+
|
|
25
|
+
**Guardrails (prompt injection protection):**
|
|
26
|
+
- `us-east-2`: guardrail ID `7gsue70cel0j` v1 (`prompt_attack_only`)
|
|
27
|
+
- `ap-southeast-2`: guardrail ID `5mg9t3aqm3ic` v1 (`prompt_attack_only`)
|
|
28
|
+
|
|
29
|
+
Rate limiting: Redis-backed sorted sets. Claude 3: 90 req/min; Nova Micro: 980 req/min.
|
|
30
|
+
|
|
31
|
+
---
|
|
32
|
+
|
|
33
|
+
## Embedding Models (AWS Bedrock Cohere)
|
|
34
|
+
|
|
35
|
+
| Model ID | Env var | Dimensions | Region | Use case |
|
|
36
|
+
|---|---|---|---|---|
|
|
37
|
+
| `cohere.embed-multilingual-v3` | `COHERE_EMBED_V3_MODEL_ID` | 1024 | `ap-southeast-2` | Universal embeddings |
|
|
38
|
+
| `us.cohere.embed-v4:0` | `COHERE_EMBED_V4_MODEL_ID` | 1024 (default) | `us-east-1` | High-perf embeddings |
|
|
39
|
+
|
|
40
|
+
Max batch: 96 texts/call. Used for: page text field vectors, template descriptions, semantic search.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## AI-Powered Features
|
|
45
|
+
|
|
46
|
+
### 1. AiSummary Field (`NewEp::Pages::DataFields::AiSummary`)
|
|
47
|
+
|
|
48
|
+
AI-generated text summary field on pages. Template-configured.
|
|
49
|
+
|
|
50
|
+
**Gem type:** `Base::Page::DataField::AiSummary` (read-only in DataFieldInput)
|
|
51
|
+
**Dedicated mutations:** `generateAiSummary`, `submitAiSummaryFeedback`
|
|
52
|
+
|
|
53
|
+
Key fields:
|
|
54
|
+
- `instructions` — custom prompt addition set on the template field (**reviewable by team**)
|
|
55
|
+
- `trigger` — `submitted` | `approved` (when generation fires)
|
|
56
|
+
- `triggerStageIds` — stages that trigger (empty = all)
|
|
57
|
+
- `textFormat` — `simple_text` | `bullet_points` | `numbered_list` | `headings`
|
|
58
|
+
- `aiSummary` — the generated text
|
|
59
|
+
- `alreadyRated` — whether the user has given feedback
|
|
60
|
+
|
|
61
|
+
Versioning: `NewEp::Pages::AiSummaryVersion` tracks prompt, token counts, status, ratings.
|
|
62
|
+
|
|
63
|
+
### 2. SmartFill Field (`NewEp::Pages::DataFields::SmartFill`)
|
|
64
|
+
|
|
65
|
+
AI-auto-populated data fields using template-defined prompts. Supports plain text, date,
|
|
66
|
+
select, rich text, mailbox, actions list field types.
|
|
67
|
+
|
|
68
|
+
**Gem type:** `Base::Page::DataField::SmartFill` (read-only in DataFieldInput)
|
|
69
|
+
**Dedicated mutations:** `generateSmartFill`, `submitSmartFillFeedback`
|
|
70
|
+
|
|
71
|
+
Key fields:
|
|
72
|
+
- `instructions` — the AI prompt for this field (**reviewable by team**)
|
|
73
|
+
- `trigger_type` — `manual` | `snapshot` | `live`
|
|
74
|
+
- `status` — `pending` | `generating` | `success` | `failed`
|
|
75
|
+
- `edit_enabled` — whether users can override the AI-generated value
|
|
76
|
+
- `generated_at` — timestamp
|
|
77
|
+
|
|
78
|
+
### 3. Template AI Description
|
|
79
|
+
|
|
80
|
+
Templates can have an auto-generated AI description used for semantic search.
|
|
81
|
+
|
|
82
|
+
- Field: `ai_description` on `Enzyme::Mould`
|
|
83
|
+
- Embeddings: `ai_description_embeddings` (Cohere v4, 1024 dims)
|
|
84
|
+
- Job: `NewEp::Pages::Templates::AiDescriptionEmbedJob`
|
|
85
|
+
- Query log: `NewEp::Pages::Templates::AiQueryLog`
|
|
86
|
+
|
|
87
|
+
### 4. Semantic Search (OpenSearch KNN)
|
|
88
|
+
|
|
89
|
+
Vector-based page search on `text_field_vectors.embedding` (nested field).
|
|
90
|
+
|
|
91
|
+
- Index: Enzyme::Ooze + NewEp::Page
|
|
92
|
+
- Vector path: `text_field_vectors.embedding`
|
|
93
|
+
- Dimensions: 1024 (Cohere v4)
|
|
94
|
+
- Min score: 0.65, KNN k: 10
|
|
95
|
+
- Gated by: `organization.pages_semantic_search_enabled?`
|
|
96
|
+
- Service: `NewEp::Es::SemanticQs::Page`
|
|
97
|
+
|
|
98
|
+
### 5. Smart Search — Natural Language → Filters
|
|
99
|
+
|
|
100
|
+
Converts a user's natural-language query into structured register search filters.
|
|
101
|
+
|
|
102
|
+
- Service: `NewEp::GeneratedFilters::PageFilters::Generate`
|
|
103
|
+
- Backend: `AwsBedrock::AgentCore::InvokeAgentRuntime`
|
|
104
|
+
- Agent ARN: `arn:aws:bedrock-agentcore:ap-southeast-2:697073004009:runtime/prod_master_page_filters_agent-P10hX5HEIG`
|
|
105
|
+
- Auth: JWT tokens via `NewEp::AgentSessions::TokenService` (scope: `page_filters_agent`)
|
|
106
|
+
- Dev endpoint: `http://host.docker.internal:8080/invocations` or `SMART_QUERY_AGENT_URL`
|
|
107
|
+
|
|
108
|
+
This is the backend for the "build register filters on the go" customer feature.
|
|
109
|
+
|
|
110
|
+
### 6. Image OCR / Metadata Extraction
|
|
111
|
+
|
|
112
|
+
Extracts text, captions, descriptions, and sensitivity flags from uploaded images.
|
|
113
|
+
|
|
114
|
+
**Primary:** AWS Bedrock Claude 3.5 Sonnet (`ap-southeast-2`)
|
|
115
|
+
**Fallback:** GCP Vertex AI Gemini (`gemini-3.1-flash-lite`)
|
|
116
|
+
|
|
117
|
+
Supported formats: PNG, JPG, JPEG, GIF, WebP, BMP
|
|
118
|
+
Max size: 4.71 MB (Bedrock), 19 MB (GCP); Max resolution: 1568px / 1.15 MP
|
|
119
|
+
|
|
120
|
+
Output: `description`, `caption`, `extracted_text`, `sensitive_content`, `overall_confidence`
|
|
121
|
+
|
|
122
|
+
### 7. Inline Text AI Tools
|
|
123
|
+
|
|
124
|
+
General text manipulation operations accessible from any text-capable field.
|
|
125
|
+
|
|
126
|
+
**Model:** GCP Vertex AI Gemini (`gemini-3.1-flash-lite`)
|
|
127
|
+
**Mutations:** `aiToolsSummarize`, `aiToolsFixSpellingGrammar`, `aiToolsMakeFormal`,
|
|
128
|
+
`aiToolsRephrase`, `aiToolsTranslate`
|
|
129
|
+
|
|
130
|
+
Context injection: field label, description, max char limit (via `AiTools::ContextInput`).
|
|
131
|
+
Translation backend: Google Cloud Translate.
|
|
132
|
+
|
|
133
|
+
---
|
|
134
|
+
|
|
135
|
+
## Video Transcription
|
|
136
|
+
|
|
137
|
+
Not implemented. The application uses vision models (image OCR) but no video
|
|
138
|
+
transcription pipeline was found in the codebase. Status: not available.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Async Job Queue
|
|
143
|
+
|
|
144
|
+
| Job | Queue | Purpose |
|
|
145
|
+
|---|---|---|
|
|
146
|
+
| `NewEp::Pages::DataFields::AiSummaryGenerationJob` | `p3` | Generate AI summary (max 3 retries) |
|
|
147
|
+
| `NewEp::Pages::DataFields::AiSummaryTriggerJob` | async | Trigger on page submit/approve |
|
|
148
|
+
| `Kickstand::NewEp::Pages::AiSummaryCreateVersionJob` | Kickstand | Create version record on stage submission |
|
|
149
|
+
| `NewEp::Pages::Templates::AiDescriptionEmbedJob` | `p3` | Embed template description (Cohere v4) |
|
|
150
|
+
| `Kickstand::NewEp::Pages::GenerateFieldEmbeddingsJob` | Kickstand | Embed page text field content |
|
|
151
|
+
|
|
152
|
+
---
|
|
153
|
+
|
|
154
|
+
## AI Prompt Instructions — Team Review Note
|
|
155
|
+
|
|
156
|
+
Both `AiSummary` and `SmartFill` fields store an `instructions` string that is appended
|
|
157
|
+
to Bedrock's system prompt at generation time. These instructions are set by template
|
|
158
|
+
builders (human, in-app) and directly influence output quality and safety.
|
|
159
|
+
|
|
160
|
+
**Current situation:**
|
|
161
|
+
- No workflow exists in the gem or backend for auditing/reviewing these prompts at scale.
|
|
162
|
+
- Instructions are stored per-field-instance in the page document.
|
|
163
|
+
- To review: query pages that have AiSummary/SmartFill fields and read the `instructions` field.
|
|
164
|
+
|
|
165
|
+
**Future work needed:**
|
|
166
|
+
- A review/approval workflow for template-level AI field instructions
|
|
167
|
+
- Possibly surfacing instructions in the template admin UI for bulk review
|
|
168
|
+
- Tracked in: `projects/TODO.md` — "AI prompt review workflow"
|
|
169
|
+
|
|
170
|
+
---
|
|
171
|
+
|
|
172
|
+
## Dependencies (Gemfile)
|
|
173
|
+
|
|
174
|
+
```ruby
|
|
175
|
+
gem 'aws-sdk-bedrockruntime', '~> 1.39' # LLM invocation
|
|
176
|
+
gem 'aws-sdk-bedrockagentcore', '~> 1.14' # Agent (smart search)
|
|
177
|
+
gem 'opensearch-ruby' # Vector search
|
|
178
|
+
gem 'faraday_middleware-aws-sigv4' # AWS SigV4 auth
|
|
179
|
+
gem 'google-cloud-translate', '3.6.1' # Translation for AI tools
|
|
180
|
+
gem 'memo_wise' # Embedding memoisation
|
|
181
|
+
gem 'image_processing', '~> 1.2' # Image resizing
|
|
182
|
+
gem 'ruby-vips', '~> 2' # Image processing backend
|
|
183
|
+
```
|
|
@@ -0,0 +1,240 @@
|
|
|
1
|
+
# EcoPortal GraphQL Schema — AI Agent Quick Reference
|
|
2
|
+
|
|
3
|
+
**Source:** Live introspection `20260605T101224_live_ep_graphql_schema.graphql.json`
|
|
4
|
+
**Use this doc to:** orient quickly on the schema without re-running extraction scripts.
|
|
5
|
+
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## Architecture at a Glance
|
|
9
|
+
|
|
10
|
+
```
|
|
11
|
+
Query {
|
|
12
|
+
currentOrganization: Organization! ← ALL org data lives here
|
|
13
|
+
checkInConfig(identifier:) ← public kiosk endpoint (no auth)
|
|
14
|
+
publicPage / publicTemplate ← anonymous access
|
|
15
|
+
user / users ← user management
|
|
16
|
+
kickstand* ← workflow automation
|
|
17
|
+
}
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
**Everything important is nested under `currentOrganization`.**
|
|
21
|
+
There are no top-level `page`, `action`, or `contractorEntity` query fields —
|
|
22
|
+
you always go through `currentOrganization.page(id:)`, etc.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Mutation Pattern — Consistent Across All Mutations
|
|
27
|
+
|
|
28
|
+
**All 161 mutations use a single `input: SomeType!` wrapper.** No mutation has
|
|
29
|
+
separate top-level arguments. This is consistent — build your gem input classes
|
|
30
|
+
as `InputClass.from_model(model)` returning a hash that maps to the single `input:` arg.
|
|
31
|
+
|
|
32
|
+
```graphql
|
|
33
|
+
mutation UpdateSomething($input: UpdateSomethingInput!) {
|
|
34
|
+
updateSomething(input: $input) { item { ...fields } errors { ... } }
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Schema-Wide Shared Patterns
|
|
41
|
+
|
|
42
|
+
### `patchVer: Int!` — Optimistic Concurrency Lock
|
|
43
|
+
Present on: `BasePageInterface`, `CheckInConfig`
|
|
44
|
+
- **Non-null on read** — every page/kiosk config response includes it.
|
|
45
|
+
- **Optional on write** (mutation input) — but should always be passed.
|
|
46
|
+
- **Pattern:** read `patchVer` from model → include in update input → server rejects if stale.
|
|
47
|
+
- **Gem:** `BasePage` maps it as `passthrough :patchVer`. Not yet injected in mutation inputs.
|
|
48
|
+
|
|
49
|
+
### `IdDiffInput` — Incremental Relationship Updates
|
|
50
|
+
```graphql
|
|
51
|
+
input IdDiffInput { additions: [ID!], removals: [ID!] }
|
|
52
|
+
```
|
|
53
|
+
Used for array relationships in **update** mutations (not create). Create mutations use `[ID!]` flat arrays.
|
|
54
|
+
|
|
55
|
+
Always build separate `Create` and `Update` input classes for areas using `IdDiffInput`.
|
|
56
|
+
|
|
57
|
+
### `OneToManyInput` — Nested Object Arrays
|
|
58
|
+
```graphql
|
|
59
|
+
input DataFieldOneToManyInput { additions: [DataFieldInput!], updates: [DataFieldInput!], deletions: [ID!] }
|
|
60
|
+
```
|
|
61
|
+
Pattern for complex nested array updates. Present for: `dataFields`, `visitorTypeConfigurations`,
|
|
62
|
+
`requirements`, `legalAgreements`.
|
|
63
|
+
|
|
64
|
+
### `DeltaResult` — Incremental Sync
|
|
65
|
+
```graphql
|
|
66
|
+
type DeltaResult { id: ID!, delta: DeltaEnum! } # UPDATED | NOT_FOUND | NEW
|
|
67
|
+
```
|
|
68
|
+
Query fields: `pageDelta(ids:)`, `actionDelta(ids:)`, `contractorEntityDelta(ids:)`,
|
|
69
|
+
`personMemberDelta(ids:)`, `templateDelta(ids:)` — all on `currentOrganization`.
|
|
70
|
+
|
|
71
|
+
Pass a set of cached IDs → get back which ones changed, were deleted, or are new.
|
|
72
|
+
|
|
73
|
+
### Mutation Payload Pattern
|
|
74
|
+
Most mutations return: `{ item: TypeUnion, errors: ValidationErrors }` or
|
|
75
|
+
`{ item: SomeType, nextTasks: [MinimalTaskInterface], errors }` (page/task mutations).
|
|
76
|
+
|
|
77
|
+
---
|
|
78
|
+
|
|
79
|
+
## Type Inventory by Area
|
|
80
|
+
|
|
81
|
+
### Pages
|
|
82
|
+
| Type | Kind | Purpose |
|
|
83
|
+
|------|------|---------|
|
|
84
|
+
| `BasePageInterface` | INTERFACE | 50 fields shared by all pages |
|
|
85
|
+
| `BasicPage` | OBJECT | Non-staged page (implements BasePageInterface) |
|
|
86
|
+
| `PhasedPage` | OBJECT | Multi-stage form/register (implements BasePageInterface) |
|
|
87
|
+
| `PageUnion` | UNION | `BasicPage \| PhasedPage` — returned by queries |
|
|
88
|
+
| `Stage` | OBJECT | Single stage of a PhasedPage |
|
|
89
|
+
| `MinimalStage` | OBJECT | `id, name, ordering, state` — lightweight |
|
|
90
|
+
| `UpdatePageInput` | INPUT | `id!, stageId, submit, dataFields, task, page, patchVer, publish` |
|
|
91
|
+
| `PageInput` | INPUT | `locations, otherTags, timeZone, state, taskPriority, name, externalId` |
|
|
92
|
+
| `DataFieldInput` | INPUT | Union-like — one of 20 field type sub-inputs |
|
|
93
|
+
| `DataFieldOneToManyInput` | INPUT | `additions, updates, deletions` for dataFields |
|
|
94
|
+
| `CreateFromTemplateInput` | INPUT | `templateId!, dataFields!, page, stageId, submit, attach` |
|
|
95
|
+
|
|
96
|
+
**Queries:** `org.page(id:)`, `org.pages(searchConf:, after:, first:, ...)`, `org.myDraftPages`,
|
|
97
|
+
`org.allPages`, `org.templates`, `org.fullTemplates`, `org.minimalTemplates`
|
|
98
|
+
|
|
99
|
+
**Key mutations:** `updatePage`, `archivePage`, `unarchivePage`,
|
|
100
|
+
`createPageFromTemplate`, `buildPageFromTemplate`, `createPageDraft`,
|
|
101
|
+
`deleteDraftPage`, `publishDraftPage`, `approveReviewPageTask`, `rejectReviewPageTask`
|
|
102
|
+
|
|
103
|
+
**`PageUnion` members:** Only `BasicPage` and `PhasedPage`. Always query `__typename` to
|
|
104
|
+
dispatch to the right Ruby model class.
|
|
105
|
+
|
|
106
|
+
### Actions
|
|
107
|
+
| Type | Kind | Purpose |
|
|
108
|
+
|------|------|---------|
|
|
109
|
+
| `Action` | OBJECT | Action instance |
|
|
110
|
+
| `Category` | OBJECT | Action category (name, value, archived, weight) |
|
|
111
|
+
| `UpdateActionInput` | INPUT | `id!, name!, status!, updateMode, recurrence, closeDetail, ...` |
|
|
112
|
+
| `CreateActionInput` | INPUT | `name!, status!, recurrence, linkedResource, draft, ...` |
|
|
113
|
+
| `ActionRecurrenceInput` | INPUT | `daily, weekly, or monthly` sub-input |
|
|
114
|
+
| `SeriesUpdateMode` | ENUM | `ALL \| FORWARD \| ONE` |
|
|
115
|
+
|
|
116
|
+
**Gem gaps:** `recurrence`, `updateMode`, `tags`, `dueIn/reminderIn`, `linkedResources`
|
|
117
|
+
|
|
118
|
+
### ContractorEntities
|
|
119
|
+
| Type | Kind | Purpose |
|
|
120
|
+
|------|------|---------|
|
|
121
|
+
| `ContractorEntity` | OBJECT | Contractor org |
|
|
122
|
+
| `UpdateContractorEntityInput` | INPUT | Uses `IdDiffInput` for `leadContractorIds`, `associatedPeopleIds` |
|
|
123
|
+
| `CreateContractorEntityInput` | INPUT | Uses `[ID!]` (flat arrays) for same fields |
|
|
124
|
+
|
|
125
|
+
### Location Structures
|
|
126
|
+
| Type | Kind | Purpose |
|
|
127
|
+
|------|------|---------|
|
|
128
|
+
| `LocationNodeInterface` | INTERFACE | Shared by all location nodes |
|
|
129
|
+
| `UpdateLocationStructureInput` | INPUT | `id!, name, visitorManagementEnabled, archived, published, weight` |
|
|
130
|
+
|
|
131
|
+
No `patchVer` on location structures.
|
|
132
|
+
|
|
133
|
+
### Visitor Management / CheckIn
|
|
134
|
+
| Type | Kind | Purpose |
|
|
135
|
+
|------|------|---------|
|
|
136
|
+
| `CheckInConfig` | OBJECT | Kiosk configuration — has `patchVer: Int!` |
|
|
137
|
+
| `VisitorType` | OBJECT | Visitor category with check-in fields |
|
|
138
|
+
| `Visit` | OBJECT | Check-in record |
|
|
139
|
+
| `UpdateCheckInConfigInput` | INPUT | `id!, locationIds: IdDiffInput, visitorTypeConfigurations:, requirements:, ...` |
|
|
140
|
+
|
|
141
|
+
**Key for RS location fix:** `updateCheckInConfig(input: { id:, locationIds: { additions: [...], removals: [...] } })`
|
|
142
|
+
|
|
143
|
+
**Queries on org:** `checkInConfig(id:)`, `checkInConfigs(...)`, `visitorTypes(...)`,
|
|
144
|
+
`visits(...)`, `visitStatus(...)`, `identifyVisitor(...)`
|
|
145
|
+
|
|
146
|
+
**Mutations:** `checkIn`, `checkOut`, `checkInOnBehalf`, `checkOutOnBehalf`,
|
|
147
|
+
`createCheckInConfig`, `updateCheckInConfig`, `destroyCheckInConfig`,
|
|
148
|
+
`createVisitorType`, `updateVisitorType`, `destroyVisitorType`
|
|
149
|
+
|
|
150
|
+
### PersonMembers
|
|
151
|
+
| Type | Kind | Purpose |
|
|
152
|
+
|------|------|---------|
|
|
153
|
+
| `PersonMember` | OBJECT | Person (user, contractor, employee) |
|
|
154
|
+
| `PersonSchema` | OBJECT | Custom person schema (org-specific person data model) |
|
|
155
|
+
|
|
156
|
+
No `PersonMemberInput` — person management is not exposed as mutation (read-only in this API).
|
|
157
|
+
|
|
158
|
+
**Queries:** `personMember(id:)`, `personMembers(searchConf:)`, `attachablePersonMembers(searchConf:)`,
|
|
159
|
+
`personMembersCreatedSince(date:)`, `personMemberDelta(ids:)`
|
|
160
|
+
|
|
161
|
+
### Registers
|
|
162
|
+
| Type | Kind | Purpose |
|
|
163
|
+
|------|------|---------|
|
|
164
|
+
| `Register` | OBJECT | Register (page collection/module) — dashboards, templates, pages, preset views |
|
|
165
|
+
| `PresetView` | OBJECT | Saved column/sort config for `previewPages`; id used as `presetViewId` argument |
|
|
166
|
+
|
|
167
|
+
**Queries:** `register(id:)`, `registers`, `minimalRegisters`, `register.presetViews`
|
|
168
|
+
|
|
169
|
+
**Mutations:** `createRegister`, `updateRegister`, `destroyRegister`,
|
|
170
|
+
`createPresetView`, `updatePresetView`, `permissionPresetView`, `destroyPresetView`
|
|
171
|
+
|
|
172
|
+
**Gem coverage:** `Builder::Register` (create/update/destroy) + `Builder::Register::PresetView`
|
|
173
|
+
(list/create/update/permission/destroy). `Query::RegisterPresetViews` to list views by register.
|
|
174
|
+
`Base::Register`, `Model::Register`, `Base::PresetView`, `Model::PresetView` implemented.
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Enums Quick Reference
|
|
179
|
+
|
|
180
|
+
| Enum | Values |
|
|
181
|
+
|------|--------|
|
|
182
|
+
| `StateEnum` | `INACTIVE` / `ACTIVE` / `COMPLETE` |
|
|
183
|
+
| `ActionsStatusEnum` | `open` / `closed` |
|
|
184
|
+
| `TaskPriorityEnum` | `low` / `medium` / `high` / `none` |
|
|
185
|
+
| `SeriesUpdateMode` | `ALL` / `FORWARD` / `ONE` |
|
|
186
|
+
| `DeltaEnum` | `UPDATED` / `NOT_FOUND` / `NEW` |
|
|
187
|
+
| `StageStateEnum` | check schema — `active`, `completed`, `pending`, etc. |
|
|
188
|
+
|
|
189
|
+
---
|
|
190
|
+
|
|
191
|
+
## Gem Coverage Map
|
|
192
|
+
|
|
193
|
+
| Area | Queries | Mutations | Gem status |
|
|
194
|
+
|------|---------|-----------|------------|
|
|
195
|
+
| Actions | ✓ action, actions, actionCategories | ✓ create, update, archive | Well covered. Gaps: recurrence, updateMode, tags |
|
|
196
|
+
| ContractorEntities | ✓ contractorEntities, contractorEntity | ✓ create, update, destroy, manageRelationships | Well covered. Verify IdDiff on update |
|
|
197
|
+
| LocationStructures | ✓ structure, structures, locationDraftById | ✓ draft mutations | Well covered |
|
|
198
|
+
| **Pages** | **✓ fully covered** | **✓ fully covered** | **Phases A–E complete 2026-06-08** |
|
|
199
|
+
| PersonMembers | ✗ | n/a | Gap |
|
|
200
|
+
| Registers | ✓ register, registers, presetViews | ✓ create, update, destroy + preset view CRUD | Covered 2026-06-08 |
|
|
201
|
+
| VisitorManagement | ✗ | ✗ | Gap (customer urgency) |
|
|
202
|
+
| Dashboards/Charts | ✗ | ✗ | Future — see TODO |
|
|
203
|
+
| Delta queries | ✓ pageDelta | n/a | Done |
|
|
204
|
+
| AI tools | ✗ (AiSummary/SmartFill read-only) | ✗ (mutations pending) | See TODO — AI field mutations |
|
|
205
|
+
|
|
206
|
+
---
|
|
207
|
+
|
|
208
|
+
## Key Rules for Implementing New Areas
|
|
209
|
+
|
|
210
|
+
1. **Always fetch before update.** If the output type has `patchVer`, you cannot update
|
|
211
|
+
without first querying the current value. Build this into the `from_model` input class.
|
|
212
|
+
|
|
213
|
+
2. **Create vs Update input classes are different.** `IdDiffInput` in update, `[ID!]` in
|
|
214
|
+
create — always check both input types separately.
|
|
215
|
+
|
|
216
|
+
3. **Spread `__typename` on union types.** `PageUnion`, `DataFieldUnion`, `SectionUnion`
|
|
217
|
+
all require `__typename` in the fragment to dispatch to the right Ruby model class.
|
|
218
|
+
|
|
219
|
+
4. **Mutations always use `input:` wrapper.** No mutation has separate top-level args.
|
|
220
|
+
|
|
221
|
+
5. **Check `nonNull` carefully.** `required: true` in a Ruby input class should match
|
|
222
|
+
`field: Type!` in the schema. Mismatches cause server validation errors.
|
|
223
|
+
|
|
224
|
+
6. **OneToManyInput for nested array updates.** Where you see `*OneToManyInput`, that
|
|
225
|
+
area needs separate `additions`, `updates`, and `deletions` handling — not a flat replace.
|
|
226
|
+
|
|
227
|
+
---
|
|
228
|
+
|
|
229
|
+
## Files to Check Before Implementing Anything
|
|
230
|
+
|
|
231
|
+
```
|
|
232
|
+
.ai-assistance/code/schema_analysis.md ← full schema survey
|
|
233
|
+
.ai-assistance/code/diff_as_input.md ← as_update/as_input pipeline spec
|
|
234
|
+
.ai-assistance/code/ecoportal_schema_reference.md ← this file
|
|
235
|
+
.ai-assistance/projects/page-model/TODO.md ← page project plan
|
|
236
|
+
.ai-assistance/projects/api-v2-to-graphql-migration/DECISIONS.md ← core arch decisions
|
|
237
|
+
lib/ecoportal/api/common/graphql/model/as_input.rb ← current AsInput (known issue: no patchVer injection)
|
|
238
|
+
lib/ecoportal/api/graphql/logic/base_query.rb ← query dispatch (recently updated)
|
|
239
|
+
lib/ecoportal/api/graphql/interface/base_page.rb ← BasePage partial mapping
|
|
240
|
+
```
|