ecoportal-api-graphql 1.3.17 → 2.2.1
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 +763 -11
- data/lib/ecoportal/api/common/graphql/http_client.rb +85 -2
- data/lib/ecoportal/api/common/graphql/model/diffable/leaf_diff_service.rb +97 -0
- data/lib/ecoportal/api/common/graphql/model/diffable.rb +1 -0
- data/lib/ecoportal/api/graphql/base/action.rb +1 -1
- data/lib/ecoportal/api/graphql/base/action_event.rb +23 -0
- data/lib/ecoportal/api/graphql/base/action_event_page.rb +16 -0
- data/lib/ecoportal/api/graphql/base/activity.rb +38 -0
- data/lib/ecoportal/api/graphql/base/activity_log.rb +38 -0
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +12 -7
- data/lib/ecoportal/api/graphql/base/auth_log.rb +24 -0
- data/lib/ecoportal/api/graphql/base/authorization_result.rb +20 -0
- data/lib/ecoportal/api/graphql/base/contractor_entity/member_changes.rb +17 -5
- data/lib/ecoportal/api/graphql/base/file_container.rb +12 -4
- data/lib/ecoportal/api/graphql/base/location_classification_type.rb +2 -0
- data/lib/ecoportal/api/graphql/base/location_structure.rb +3 -0
- data/lib/ecoportal/api/graphql/base/minimal_dashboard.rb +25 -0
- data/lib/ecoportal/api/graphql/base/organization.rb +2 -0
- data/lib/ecoportal/api/graphql/base/page/data_field/contractor_entities.rb +25 -2
- data/lib/ecoportal/api/graphql/base/page/data_field/file_field.rb +46 -7
- data/lib/ecoportal/api/graphql/base/page/data_field/image_gallery.rb +5 -2
- data/lib/ecoportal/api/graphql/base/page/data_field/people.rb +50 -12
- data/lib/ecoportal/api/graphql/base/page/data_field.rb +12 -18
- data/lib/ecoportal/api/graphql/base/page/phased/stage.rb +51 -0
- data/lib/ecoportal/api/graphql/base/permissions.rb +15 -0
- data/lib/ecoportal/api/graphql/base/person_member_changelog.rb +23 -0
- data/lib/ecoportal/api/graphql/base/preset_view.rb +135 -0
- data/lib/ecoportal/api/graphql/base/register.rb +5 -0
- data/lib/ecoportal/api/graphql/base/template/change_log_entry.rb +118 -0
- data/lib/ecoportal/api/graphql/base/template.rb +2 -0
- data/lib/ecoportal/api/graphql/base.rb +9 -0
- data/lib/ecoportal/api/graphql/builder/contractor_entity.rb +10 -0
- data/lib/ecoportal/api/graphql/builder/page.rb +0 -16
- data/lib/ecoportal/api/graphql/builder/template.rb +46 -0
- data/lib/ecoportal/api/graphql/builder/template_builder.rb +21 -2
- data/lib/ecoportal/api/graphql/compat/pages.rb +7 -2
- data/lib/ecoportal/api/graphql/compat/response.rb +14 -0
- data/lib/ecoportal/api/graphql/concerns/threadable.rb +58 -0
- data/lib/ecoportal/api/graphql/concerns.rb +1 -0
- data/lib/ecoportal/api/graphql/connection/action.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/action_category.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/activity.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/activity_log.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/auth_log.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/contractor_entity.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/minimal_dashboard.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/page.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/pages_workflow_command.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/person_member.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/person_member_changelog.rb +11 -0
- data/lib/ecoportal/api/graphql/connection/preview_page.rb +1 -1
- data/lib/ecoportal/api/graphql/connection/template_change_log.rb +19 -0
- data/lib/ecoportal/api/graphql/connection.rb +6 -0
- data/lib/ecoportal/api/graphql/diff/change.rb +7 -2
- data/lib/ecoportal/api/graphql/diff/command_synthesizer.rb +19 -1
- data/lib/ecoportal/api/graphql/diff/pairing/signals.rb +21 -1
- data/lib/ecoportal/api/graphql/diff/version_diff.rb +13 -6
- data/lib/ecoportal/api/graphql/file_upload/client.rb +198 -139
- data/lib/ecoportal/api/graphql/fragment/activity.rb +84 -0
- data/lib/ecoportal/api/graphql/fragment/activity_log.rb +75 -0
- data/lib/ecoportal/api/graphql/fragment/auth_log.rb +29 -0
- data/lib/ecoportal/api/graphql/fragment/authorization_result.rb +14 -0
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/minimal_dashboard.rb +31 -0
- data/lib/ecoportal/api/graphql/fragment/page.rb +1 -0
- data/lib/ecoportal/api/graphql/fragment/pages/common_page_union.rb +23 -0
- data/lib/ecoportal/api/graphql/fragment/permissions.rb +96 -0
- data/lib/ecoportal/api/graphql/fragment/person_member_changelog.rb +33 -0
- data/lib/ecoportal/api/graphql/fragment/template_change_log.rb +102 -0
- data/lib/ecoportal/api/graphql/fragment.rb +8 -0
- data/lib/ecoportal/api/graphql/input/action/update.rb +12 -0
- data/lib/ecoportal/api/graphql/input/contractor_entity/manager_settings.rb +20 -0
- data/lib/ecoportal/api/graphql/input/contractor_entity/update.rb +6 -27
- data/lib/ecoportal/api/graphql/input/contractor_entity.rb +1 -0
- data/lib/ecoportal/api/graphql/input/date_range.rb +16 -0
- data/lib/ecoportal/api/graphql/input/location_structure/apply_commands.rb +2 -2
- data/lib/ecoportal/api/graphql/input/location_structure/draft/add_commands.rb +2 -2
- data/lib/ecoportal/api/graphql/input/location_structure/insert_command.rb +8 -0
- data/lib/ecoportal/api/graphql/input/location_structure/update_command.rb +6 -2
- data/lib/ecoportal/api/graphql/input/page/review_task.rb +14 -1
- data/lib/ecoportal/api/graphql/input/preset_view/update.rb +16 -1
- data/lib/ecoportal/api/graphql/input/workflow_command/add_checklist_field_item.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_field.rb +10 -9
- data/lib/ecoportal/api/graphql/input/workflow_command/add_select_field_option.rb +11 -5
- data/lib/ecoportal/api/graphql/input/workflow_command/add_smart_fill_config.rb +23 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/add_viewable_field.rb +45 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/archive_public_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/create_public_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_checklist_field_item.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +17 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_force.rb +5 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_public_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_select_field_option.rb +6 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_smart_fill_config.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_advanced_settings.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_basic_settings.rb +32 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_container_uid.rb +45 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/{edit_page_creator_permissions.rb → edit_template_creator_permissions.rb} +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_template_descriptions.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/action_list.rb +31 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/contractor_entities.rb +6 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +9 -1
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +15 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/file.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/people.rb +27 -3
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +9 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/manage_copy_page_configuration.rb +47 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_field.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/move_section_to_stage.rb +33 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/move_viewable_field.rb +33 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_checklist_field_item.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_smart_fill_config.rb +19 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/remove_viewable_field.rb +21 -0
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +3 -2
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +48 -5
- data/lib/ecoportal/api/graphql/input.rb +1 -0
- data/lib/ecoportal/api/graphql/interface/base_page.rb +50 -3
- data/lib/ecoportal/api/graphql/interface/location_structure/command.rb +2 -1
- data/lib/ecoportal/api/graphql/logic/base_query.rb +72 -5
- data/lib/ecoportal/api/graphql/logic/connection.rb +17 -0
- data/lib/ecoportal/api/graphql/logic/input.rb +127 -0
- data/lib/ecoportal/api/graphql/model/action_event.rb +14 -0
- data/lib/ecoportal/api/graphql/model/action_event_page.rb +10 -0
- data/lib/ecoportal/api/graphql/model/activity.rb +14 -0
- data/lib/ecoportal/api/graphql/model/activity_log.rb +31 -0
- data/lib/ecoportal/api/graphql/model/auth_log.rb +11 -0
- data/lib/ecoportal/api/graphql/model/authorization_result.rb +12 -0
- data/lib/ecoportal/api/graphql/model/minimal_dashboard.rb +14 -0
- data/lib/ecoportal/api/graphql/model/organization.rb +36 -0
- data/lib/ecoportal/api/graphql/model/page/phased.rb +17 -0
- data/lib/ecoportal/api/graphql/model/permissions.rb +185 -0
- data/lib/ecoportal/api/graphql/model/person_member.rb +7 -0
- data/lib/ecoportal/api/graphql/model/person_member_changelog.rb +15 -0
- data/lib/ecoportal/api/graphql/model/template/change_log_entry.rb +19 -0
- data/lib/ecoportal/api/graphql/model/template.rb +4 -1
- data/lib/ecoportal/api/graphql/model.rb +9 -0
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +20 -10
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +25 -10
- data/lib/ecoportal/api/graphql/mutation/contractor_entity/update_manager_settings.rb +37 -0
- data/lib/ecoportal/api/graphql/mutation/contractor_entity.rb +1 -0
- data/lib/ecoportal/api/graphql/mutation/file_container/upload.rb +78 -0
- data/lib/ecoportal/api/graphql/mutation/file_container.rb +15 -0
- data/lib/ecoportal/api/graphql/mutation/template/update_related_page.rb +79 -0
- data/lib/ecoportal/api/graphql/mutation/template.rb +1 -0
- data/lib/ecoportal/api/graphql/mutation.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/contractor_entity/manager_settings.rb +20 -0
- data/lib/ecoportal/api/graphql/payload/contractor_entity.rb +1 -0
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_jobs.rb +2 -2
- data/lib/ecoportal/api/graphql/payload/kickstand/bulk_update_workflows.rb +2 -2
- data/lib/ecoportal/api/graphql/payload/template/update_related_page.rb +15 -0
- data/lib/ecoportal/api/graphql/payload/template.rb +1 -0
- data/lib/ecoportal/api/graphql/payload/upload.rb +12 -0
- data/lib/ecoportal/api/graphql/payload.rb +1 -0
- data/lib/ecoportal/api/graphql/query/activity_logs.rb +78 -0
- data/lib/ecoportal/api/graphql/query/auth_logs.rb +51 -0
- data/lib/ecoportal/api/graphql/query/dashboard_search.rb +57 -0
- data/lib/ecoportal/api/graphql/query/location_structure.rb +2 -0
- data/lib/ecoportal/api/graphql/query/location_structures.rb +2 -0
- data/lib/ecoportal/api/graphql/query/page.rb +6 -1
- data/lib/ecoportal/api/graphql/query/page_activities.rb +56 -0
- data/lib/ecoportal/api/graphql/query/permissions.rb +35 -0
- data/lib/ecoportal/api/graphql/query/person_member_changelogs.rb +53 -0
- data/lib/ecoportal/api/graphql/query/person_members.rb +76 -0
- data/lib/ecoportal/api/graphql/query/template_change_log.rb +118 -0
- data/lib/ecoportal/api/graphql/query.rb +8 -0
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- metadata +83 -14
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +0 -28
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +0 -36
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +0 -40
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +0 -13
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# `WorkflowAddViewableFieldInput` — adds a person-schema field to the list of fields
|
|
7
|
+
# shown on a People data field ("viewable fields").
|
|
8
|
+
#
|
|
9
|
+
# ★ This command exists BECAUSE the 20260725 schema drift REMOVED
|
|
10
|
+
# `WorkflowEditFieldConfigurationPeopleInput.addViewableFields: [String!]`. Viewable
|
|
11
|
+
# fields moved from an array on the people field-config to three dedicated commands
|
|
12
|
+
# (add/move/remove), which also bought them ordering (`anchorId` + `anchorPosition`)
|
|
13
|
+
# that the old flat array could not express. Until these were wired, viewable-field
|
|
14
|
+
# management was simply impossible through this gem.
|
|
15
|
+
module AddViewableField
|
|
16
|
+
SCHEMA_VERSION = '20260725'.freeze
|
|
17
|
+
VALID_KEYS = %i[
|
|
18
|
+
dataFieldId schemaFieldId schemaFieldType anchorId anchorPosition
|
|
19
|
+
].freeze
|
|
20
|
+
# AnchorPositionEnum
|
|
21
|
+
ANCHOR_POSITIONS = %w[BEFORE AFTER].freeze
|
|
22
|
+
|
|
23
|
+
def self.build(data_field_id:, schema_field_id:, **kwargs)
|
|
24
|
+
validate_anchor!(kwargs[:anchorPosition])
|
|
25
|
+
|
|
26
|
+
{
|
|
27
|
+
dataFieldId: data_field_id,
|
|
28
|
+
schemaFieldId: schema_field_id
|
|
29
|
+
}.merge(kwargs.slice(*(VALID_KEYS - %i[dataFieldId schemaFieldId])).compact)
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def self.validate_anchor!(position)
|
|
33
|
+
return if position.nil? || ANCHOR_POSITIONS.include?(position.to_s)
|
|
34
|
+
|
|
35
|
+
raise ArgumentError,
|
|
36
|
+
"Invalid anchorPosition #{position.inspect}: " \
|
|
37
|
+
"expected one of #{ANCHOR_POSITIONS.join(', ')}"
|
|
38
|
+
end
|
|
39
|
+
private_class_method :validate_anchor!
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713
|
|
7
|
+
module ArchivePublicConfig
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
VALID_KEYS = %i[archive].freeze # archive: Boolean! (required server-side)
|
|
10
|
+
|
|
11
|
+
def self.build(**kwargs)
|
|
12
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713: public (anonymous) submission config for a template.
|
|
7
|
+
module CreatePublicConfig
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
VALID_KEYS = %i[token].freeze
|
|
10
|
+
|
|
11
|
+
def self.build(**kwargs)
|
|
12
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713
|
|
7
|
+
module EditChecklistFieldItem
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
VALID_KEYS = %i[dataFieldId itemId label weight].freeze
|
|
10
|
+
|
|
11
|
+
def self.build(**kwargs)
|
|
12
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -4,9 +4,24 @@ module Ecoportal
|
|
|
4
4
|
module Input
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
|
-
SCHEMA_VERSION = '
|
|
7
|
+
SCHEMA_VERSION = '20260828'.freeze
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
# 20260713: gained addActionIds/removeActionIds (set-diff of field-attached Actions).
|
|
10
|
+
# 20260801: added the three keys the schema has always had but this builder silently
|
|
11
|
+
# dropped — `stageId` (which stage's copy of the field to edit; REQUIRED to
|
|
12
|
+
# disambiguate on a phased page, so its absence made this builder unusable there) and
|
|
13
|
+
# the addPermittedPersonSchemaIds/removePermittedPersonSchemaIds set-diff.
|
|
14
|
+
# 20260828: added `required` and `hiddenOnReports`, both real top-level arguments on
|
|
15
|
+
# the backend's EditFieldConfigurationInput but previously dropped by this builder's
|
|
16
|
+
# kwargs.slice. Schema authority: backend source, not the stale 2026-07-30
|
|
17
|
+
# introspection dump. See add_field.rb — its comment claiming `required` has no input
|
|
18
|
+
# key anywhere in the schema was wrong and has been corrected.
|
|
19
|
+
BASE_KEYS = %i[
|
|
20
|
+
dataFieldId stageId label tooltip description hideView hiddenOnMobile
|
|
21
|
+
enableActions globalBinding required hiddenOnReports
|
|
22
|
+
addActionIds removeActionIds
|
|
23
|
+
addPermittedPersonSchemaIds removePermittedPersonSchemaIds
|
|
24
|
+
].freeze
|
|
10
25
|
|
|
11
26
|
def self.build(data_field_id:, **kwargs)
|
|
12
27
|
{ dataFieldId: data_field_id }.
|
|
@@ -4,8 +4,11 @@ module Ecoportal
|
|
|
4
4
|
module Input
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditForce
|
|
7
|
-
SCHEMA_VERSION = '
|
|
8
|
-
|
|
7
|
+
SCHEMA_VERSION = '20260828'.freeze
|
|
8
|
+
# 20260828: added `lastSyncedAt`, which the backend's EditForceInput declares as
|
|
9
|
+
# `required: false` (schema authority: backend source, not the stale 2026-07-30
|
|
10
|
+
# introspection dump).
|
|
11
|
+
VALID_KEYS = %i[id name customScript url contentB64 lastSyncedAt].freeze
|
|
9
12
|
|
|
10
13
|
def self.build(**kwargs)
|
|
11
14
|
kwargs.slice(*VALID_KEYS).compact
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713
|
|
7
|
+
module EditPublicConfig
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
VALID_KEYS = %i[token].freeze # token: String! (required server-side)
|
|
10
|
+
|
|
11
|
+
def self.build(**kwargs)
|
|
12
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -4,8 +4,12 @@ module Ecoportal
|
|
|
4
4
|
module Input
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditSelectFieldOption
|
|
7
|
-
SCHEMA_VERSION = '
|
|
8
|
-
|
|
7
|
+
SCHEMA_VERSION = '20260828'.freeze
|
|
8
|
+
# 20260828: added `value` (optional; edits the option's stored value) — declared by
|
|
9
|
+
# the backend's EditSelectFieldOptionInput but previously dropped by this builder's
|
|
10
|
+
# kwargs.slice. Schema authority: backend source, not the stale 2026-07-30
|
|
11
|
+
# introspection dump.
|
|
12
|
+
VALID_KEYS = %i[label value weight].freeze
|
|
9
13
|
|
|
10
14
|
def self.build(data_field_id:, option_id:, **kwargs)
|
|
11
15
|
{ dataFieldId: data_field_id, optionId: option_id }.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713
|
|
7
|
+
module EditSmartFillConfig
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
VALID_KEYS = %i[
|
|
10
|
+
dataFieldId triggerType instructions editEnabled textFormat limitLength fieldConfigurations
|
|
11
|
+
].freeze
|
|
12
|
+
|
|
13
|
+
def self.build(**kwargs)
|
|
14
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713
|
|
7
|
+
module EditTemplateAdvancedSettings
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
VALID_KEYS = %i[addBaseTags removeBaseTags addOtherTags removeOtherTags].freeze
|
|
10
|
+
|
|
11
|
+
def self.build(**kwargs)
|
|
12
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713: replaces the page-level `editPage` command (template-scoped).
|
|
7
|
+
module EditTemplateBasicSettings
|
|
8
|
+
SCHEMA_VERSION = '20260828'.freeze
|
|
9
|
+
# 20260828: added `enableCopyPage`, a real top-level argument on the backend's
|
|
10
|
+
# EditTemplateBasicSettingsInput but previously dropped by this builder's
|
|
11
|
+
# kwargs.slice. Schema authority: backend source, not the stale 2026-07-30
|
|
12
|
+
# introspection dump.
|
|
13
|
+
VALID_KEYS = %i[
|
|
14
|
+
name icon themeId timeZone disableDirectPermissions mobileEnabled
|
|
15
|
+
useSectionsOnMobile showStrategyForRestrictedStages
|
|
16
|
+
showAssigneeNamesForRestrictedStages showTaskDueDateForRestrictedStages
|
|
17
|
+
hideActivityStream disableComments hidePageLocationUi enableDashboardImport
|
|
18
|
+
enableActionsOnFields showCreator active counterPrefix counterPostfix
|
|
19
|
+
counterEnabled counter enableCopyPage
|
|
20
|
+
addLocationIds removeLocationIds addFolders removeFolders
|
|
21
|
+
addBaseTags removeBaseTags creatorEnabled creatorEditable creatorFlags
|
|
22
|
+
].freeze
|
|
23
|
+
|
|
24
|
+
def self.build(**kwargs)
|
|
25
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# `WorkflowEditTemplateContainerUidInput { templateContainerUid: String! }`.
|
|
7
|
+
#
|
|
8
|
+
# Sets the template's CROSS-VERSION identity key. Semantics (verified against the
|
|
9
|
+
# backend on 2026-07-31 — see the repo's internal docs):
|
|
10
|
+
#
|
|
11
|
+
# - Format `/\A[a-zA-Z0-9\-_.]{3,20}\z/` — org-scoped, human-authored.
|
|
12
|
+
# - Many versions of a template may share one uid, but only ONE may be published
|
|
13
|
+
# (`active: true`, unarchived) per organization at a time. Publishing another with
|
|
14
|
+
# the same uid UNPUBLISHES the incumbent (a swap, not an error), which is what stops
|
|
15
|
+
# restored UAT backups from colliding with the live PROD template.
|
|
16
|
+
# - Rejected with `:template_container_uid, :taken` when the swap is not permitted.
|
|
17
|
+
# - Requires `Pages::TemplatePolicy#change_template_container_uid?`
|
|
18
|
+
# (`required_level: :implement`).
|
|
19
|
+
#
|
|
20
|
+
# The value is REQUIRED and non-null in the schema, so nil is rejected here rather
|
|
21
|
+
# than silently dropped — `.compact` (as used by the sibling builders) would emit an
|
|
22
|
+
# empty command that the server rejects with a less obvious message.
|
|
23
|
+
module EditTemplateContainerUid
|
|
24
|
+
SCHEMA_VERSION = '20260731'.freeze
|
|
25
|
+
VALID_KEYS = %i[templateContainerUid].freeze
|
|
26
|
+
UID_FORMAT = /\A[a-zA-Z0-9\-_.]{3,20}\z/
|
|
27
|
+
|
|
28
|
+
def self.build(**kwargs)
|
|
29
|
+
uid = kwargs[:templateContainerUid]
|
|
30
|
+
raise ArgumentError, 'templateContainerUid is required (String!)' if uid.nil?
|
|
31
|
+
|
|
32
|
+
unless UID_FORMAT.match?(uid.to_s)
|
|
33
|
+
raise ArgumentError,
|
|
34
|
+
"Invalid templateContainerUid #{uid.inspect}: " \
|
|
35
|
+
'use 3-20 characters (letters, numbers, -, _, . only)'
|
|
36
|
+
end
|
|
37
|
+
|
|
38
|
+
{ templateContainerUid: uid.to_s }
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -3,8 +3,9 @@ module Ecoportal
|
|
|
3
3
|
class GraphQL
|
|
4
4
|
module Input
|
|
5
5
|
class WorkflowCommand
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
# 20260713: replaces the page-level `editPageCreatorPermissions` command (template-scoped).
|
|
7
|
+
module EditTemplateCreatorPermissions
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
8
9
|
VALID_KEYS = %i[creatorEnabled creatorEditable creatorFlags].freeze
|
|
9
10
|
|
|
10
11
|
def self.build(**kwargs)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# 20260713
|
|
7
|
+
module EditTemplateDescriptions
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
VALID_KEYS = %i[description aiDescription templateType].freeze
|
|
10
|
+
|
|
11
|
+
def self.build(**kwargs)
|
|
12
|
+
kwargs.slice(*VALID_KEYS).compact
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
module EditFieldConfiguration
|
|
7
|
+
# `WorkflowEditFieldConfigurationActionListInput` — the 14th (and last unwired)
|
|
8
|
+
# member of `WorkflowEditFieldConfigurationByTypeInput`. Added to the schema in the
|
|
9
|
+
# 20260725 drift and never picked up, which left ActionsList the one field type whose
|
|
10
|
+
# configuration could not be edited through this gem.
|
|
11
|
+
#
|
|
12
|
+
# NOTE the naming asymmetry, which is the schema's, not ours: the byType KEY is
|
|
13
|
+
# `actionList` (singular) while the field TYPE is `ActionsList` (plural) — hence
|
|
14
|
+
# `Base::Page::DataField::TYPE_MAP` maps `'ActionsList'`. Keep this module named after
|
|
15
|
+
# the byType key so the registry lookup stays mechanical.
|
|
16
|
+
module ActionList
|
|
17
|
+
SCHEMA_VERSION = '20260725'.freeze
|
|
18
|
+
VALID_KEYS = %i[requiredCompleted].freeze
|
|
19
|
+
# ActionsListRequiredCompletedEnum (verified against the live schema, 20260731)
|
|
20
|
+
REQUIRED_COMPLETED = %w[NONE SOME ALL].freeze
|
|
21
|
+
|
|
22
|
+
def self.build(**kwargs)
|
|
23
|
+
{ actionList: kwargs.slice(*VALID_KEYS).compact }
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
@@ -5,10 +5,14 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module ContractorEntities
|
|
8
|
-
SCHEMA_VERSION = '
|
|
8
|
+
SCHEMA_VERSION = '20260828'.freeze
|
|
9
|
+
# 20260828: added `applyPermissionsToParent`, which the backend's
|
|
10
|
+
# ContractorEntitiesInput declares as `required: false` (schema authority: backend
|
|
11
|
+
# source, not the stale 2026-07-30 introspection dump). Do not confuse this with
|
|
12
|
+
# `applyAttachedContractorsPermissionsTo` below, which is a different argument.
|
|
9
13
|
VALID_KEYS = %i[
|
|
10
14
|
singular requiresNumber isMeButton showApprovalStatus grantPermissionsEnabled
|
|
11
|
-
applyAttachedContractorsPermissionsTo adminAccess regularAccess
|
|
15
|
+
applyAttachedContractorsPermissionsTo applyPermissionsToParent adminAccess regularAccess
|
|
12
16
|
attachedContractorsPermissionsFlags attachedContractorsAdminPermissionsFlags
|
|
13
17
|
].freeze
|
|
14
18
|
|
|
@@ -5,10 +5,18 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module CrossReference
|
|
8
|
-
SCHEMA_VERSION = '
|
|
8
|
+
SCHEMA_VERSION = '20260819'.freeze
|
|
9
|
+
# 20260713: gained addReferenceIds/removeReferenceIds (set-diff of attached references).
|
|
10
|
+
# 20260819: picked up enableCrossRegisterReporting (Boolean, per
|
|
11
|
+
# WorkflowEditFieldConfigurationCrossReferenceInput; verified against the live schema
|
|
12
|
+
# dump of 20260819). NOTE it was FIRST OBSERVED on that date, not necessarily added
|
|
13
|
+
# then — validate_commands.rb had been reporting it as a MISSING key (schema accepts
|
|
14
|
+
# it, no builder path could set it), so the gap was ours, not the schema's. When it
|
|
15
|
+
# actually entered the schema is not established.
|
|
9
16
|
VALID_KEYS = %i[
|
|
10
17
|
displayFields displayFieldsInLookup hideCreate hideAttach hideMetadata
|
|
11
18
|
registerId attachSourcePage hideDashboards singleSelectMode
|
|
19
|
+
addReferenceIds removeReferenceIds enableCrossRegisterReporting
|
|
12
20
|
].freeze
|
|
13
21
|
|
|
14
22
|
def self.build(**kwargs)
|
|
@@ -5,8 +5,21 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module Date
|
|
8
|
-
SCHEMA_VERSION = '
|
|
9
|
-
|
|
8
|
+
SCHEMA_VERSION = '20260725'.freeze
|
|
9
|
+
# 20260713: smartFillConfiguration moved out to dedicated add/edit/removeSmartFillConfig commands.
|
|
10
|
+
# 20260725: gained the date-EVENT and RENEWAL keys below (calendar events + recurring
|
|
11
|
+
# expiry on a date field). Six keys that had never been reachable from this gem —
|
|
12
|
+
# renewals are how expiry-driven registers (certifications, inductions, permits)
|
|
13
|
+
# are configured, so this was a real functional hole, not a cosmetic one.
|
|
14
|
+
VALID_KEYS = %i[
|
|
15
|
+
showTime pastOnly todayButton
|
|
16
|
+
createEvent remindMeIn
|
|
17
|
+
renews renewsEvery renewsUnit renewsUntil
|
|
18
|
+
].freeze
|
|
19
|
+
# PagesDataFieldsDatesRenewsUnitEnum
|
|
20
|
+
RENEWS_UNITS = %w[DAY WEEK MONTH YEAR].freeze
|
|
21
|
+
# DateEventRemindOption
|
|
22
|
+
REMIND_OPTIONS = %w[NEVER ONE_DAY THREE_DAYS ONE_WEEK TWO_WEEKS ONE_MONTH].freeze
|
|
10
23
|
|
|
11
24
|
def self.build(**kwargs)
|
|
12
25
|
{ date: kwargs.slice(*VALID_KEYS).compact }
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
module EditFieldConfiguration
|
|
7
|
+
# 20260713: `file` by-type field configuration (set-diff of file containers/items).
|
|
8
|
+
module File
|
|
9
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
10
|
+
VALID_KEYS = %i[addFileContainerIds removeItemIds].freeze
|
|
11
|
+
|
|
12
|
+
def self.build(**kwargs)
|
|
13
|
+
{ file: kwargs.slice(*VALID_KEYS).compact }
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -5,8 +5,9 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module ImageGallery
|
|
8
|
-
SCHEMA_VERSION = '
|
|
9
|
-
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
# 20260713: gained addImageSourceIds/removeImageIds (set-diff of gallery images).
|
|
10
|
+
VALID_KEYS = %i[layout stretch noPopup hideOptions addImageSourceIds removeImageIds].freeze
|
|
10
11
|
|
|
11
12
|
def self.build(**kwargs)
|
|
12
13
|
{ imageGallery: kwargs.slice(*VALID_KEYS).compact }
|
|
@@ -5,15 +5,39 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module People
|
|
8
|
-
SCHEMA_VERSION = '
|
|
8
|
+
SCHEMA_VERSION = '20260725'.freeze
|
|
9
|
+
# 20260725: `addViewableFields`/`removeViewableFields` were REMOVED from
|
|
10
|
+
# WorkflowEditFieldConfigurationPeopleInput — they lived on here as dead keys the
|
|
11
|
+
# server rejects. Viewable fields are now three dedicated commands
|
|
12
|
+
# (add/move/removeViewableField), which also added ordering the flat arrays could
|
|
13
|
+
# not express. The same drift added the six attached-people-permission /
|
|
14
|
+
# allowed-user-group keys below, which had never been reachable from this gem.
|
|
9
15
|
VALID_KEYS = %i[
|
|
10
16
|
personSchemaId singular requiresNumber attachMode isMeButton
|
|
11
17
|
autoSelectMode autoSelectSupervisorFieldRef autoSelectDefaultLocations
|
|
12
|
-
|
|
18
|
+
addAllowedUserGroupIds removeAllowedUserGroupIds
|
|
19
|
+
attachedPeoplePermissionsEnabled attachedPeoplePermissionsEditable
|
|
20
|
+
attachedPeoplePermissionsFlags applyAttachedPeoplePermissionsTo
|
|
21
|
+
].freeze
|
|
22
|
+
# WorkflowAutoSelectModeEnum — `autoSelectMode` was retyped String -> enum in the
|
|
23
|
+
# same drift. Values pass through as strings (valid for enum variables).
|
|
24
|
+
AUTO_SELECT_MODES = %w[NONE CREATOR CREATOR_SUPERVISOR PEOPLE_SUPERVISOR].freeze
|
|
25
|
+
# WorkflowApplyAttachedPeoplePermissionsToEnum
|
|
26
|
+
APPLY_PERMISSIONS_TO = %w[PAGE_ONLY PAGE ALL_STAGES CURRENT_STAGE].freeze
|
|
27
|
+
# Nested WorkflowEditFieldConfigurationAttachedPeoplePermissionsFlagsInput keys.
|
|
28
|
+
PERMISSION_FLAGS = %i[
|
|
29
|
+
canRestructure canConfigure canPermission canCreateActions
|
|
30
|
+
canAdministrateActions subscribed subscribedToTasks
|
|
13
31
|
].freeze
|
|
14
32
|
|
|
15
33
|
def self.build(**kwargs)
|
|
16
|
-
|
|
34
|
+
out = kwargs.slice(*VALID_KEYS).compact
|
|
35
|
+
# Filter the nested flags hash to the keys the schema actually declares, so a
|
|
36
|
+
# stray key can't sink the whole command server-side.
|
|
37
|
+
if (flags = out[:attachedPeoplePermissionsFlags]).is_a?(Hash)
|
|
38
|
+
out[:attachedPeoplePermissionsFlags] = flags.slice(*PERMISSION_FLAGS).compact
|
|
39
|
+
end
|
|
40
|
+
{ people: out }
|
|
17
41
|
end
|
|
18
42
|
end
|
|
19
43
|
end
|
|
@@ -5,8 +5,15 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module PlainText
|
|
8
|
-
SCHEMA_VERSION = '
|
|
9
|
-
|
|
8
|
+
SCHEMA_VERSION = '20260828'.freeze
|
|
9
|
+
# 20260713: smartFillConfiguration moved out to dedicated add/edit/removeSmartFillConfig commands.
|
|
10
|
+
# 20260828: added `multiline`, which the backend's PlainTextInput declares as
|
|
11
|
+
# `required: false` (schema authority: backend source, not the stale 2026-07-30
|
|
12
|
+
# introspection dump). This builder previously dropped it via kwargs.slice with no
|
|
13
|
+
# error, no warning, no effect: a copied template's multiline text fields came back
|
|
14
|
+
# single-line, and this dropped key is why that could not be fixed through the gem's
|
|
15
|
+
# builder.
|
|
16
|
+
VALID_KEYS = %i[value maxLength embeddingEnabled multiline].freeze
|
|
10
17
|
|
|
11
18
|
def self.build(**kwargs)
|
|
12
19
|
{ plainText: kwargs.slice(*VALID_KEYS).compact }
|
|
@@ -5,8 +5,9 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module RichText
|
|
8
|
-
SCHEMA_VERSION = '
|
|
9
|
-
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
# 20260713: smartFillConfiguration moved out to dedicated add/edit/removeSmartFillConfig commands.
|
|
10
|
+
VALID_KEYS = %i[content markdown embeddingEnabled].freeze
|
|
10
11
|
|
|
11
12
|
def self.build(**kwargs)
|
|
12
13
|
{ richText: kwargs.slice(*VALID_KEYS).compact }
|
|
@@ -5,8 +5,9 @@ module Ecoportal
|
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module EditFieldConfiguration
|
|
7
7
|
module Select
|
|
8
|
-
SCHEMA_VERSION = '
|
|
9
|
-
|
|
8
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
9
|
+
# 20260713: smartFillConfiguration moved out to dedicated add/edit/removeSmartFillConfig commands.
|
|
10
|
+
VALID_KEYS = %i[dataType multiple flat other otherDesc].freeze
|
|
10
11
|
|
|
11
12
|
def self.build(**kwargs)
|
|
12
13
|
{ select: kwargs.slice(*VALID_KEYS).compact }
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Input
|
|
5
|
+
class WorkflowCommand
|
|
6
|
+
# `WorkflowManageCopyPageConfigurationInput` — first observed in the live schema on
|
|
7
|
+
# 20260819, which is when `validate-queries` went red on it being unwired. `main`'s last
|
|
8
|
+
# green pipeline was 2026-08-16, so the drift landed in that window.
|
|
9
|
+
#
|
|
10
|
+
# ★ The field NAMES and TYPES below are verified against the schema dump. Their MEANING
|
|
11
|
+
# is NOT: the schema carries no descriptions for them, and no verified platform note
|
|
12
|
+
# covers page-copy configuration. Best reading, offered as a HYPOTHESIS only — this
|
|
13
|
+
# appears to configure the platform's copy-a-page behaviour: whether a copy OVERRIDES
|
|
14
|
+
# the creator permissions rather than inheriting them (note the field is named
|
|
15
|
+
# `override…`, so do not assume the inverse), whether template content added later is
|
|
16
|
+
# automatically included in future copies, and per-data-field whether that field is
|
|
17
|
+
# included in a copy (`include`) and whether the choice is locked against per-copy
|
|
18
|
+
# override (`enforce`). `enforce` is the least certain of these.
|
|
19
|
+
# Confirm against platform behaviour before relying on any of it; see
|
|
20
|
+
# the repo's internal docs.
|
|
21
|
+
module ManageCopyPageConfiguration
|
|
22
|
+
SCHEMA_VERSION = '20260819'.freeze
|
|
23
|
+
VALID_KEYS = %i[overridePageCreatorPermissions autoIncludeNewContent inclusionSettingsChanges].freeze
|
|
24
|
+
# WorkflowInclusionSettingsChangeInput — dataFieldId is REQUIRED on the schema side;
|
|
25
|
+
# this builder only filters keys, it does not validate presence (see siblings).
|
|
26
|
+
INCLUSION_SETTINGS_CHANGE_KEYS = %i[dataFieldId include enforce].freeze
|
|
27
|
+
|
|
28
|
+
def self.build(**kwargs)
|
|
29
|
+
built = kwargs.slice(*VALID_KEYS).compact
|
|
30
|
+
return built unless built.key?(:inclusionSettingsChanges)
|
|
31
|
+
|
|
32
|
+
# NOTE: `Array(a_hash)` calls `Hash#to_a` and yields key/value PAIRS, not a
|
|
33
|
+
# one-element array containing the hash -- do not "simplify" this to `Array(...)`.
|
|
34
|
+
changes = built[:inclusionSettingsChanges]
|
|
35
|
+
changes = [changes] unless changes.is_a?(::Array)
|
|
36
|
+
|
|
37
|
+
built[:inclusionSettingsChanges] = changes.map do |change|
|
|
38
|
+
change.transform_keys(&:to_sym).slice(*INCLUSION_SETTINGS_CHANGE_KEYS).compact
|
|
39
|
+
end
|
|
40
|
+
built
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
46
|
+
end
|
|
47
|
+
end
|
|
@@ -4,8 +4,9 @@ module Ecoportal
|
|
|
4
4
|
module Input
|
|
5
5
|
class WorkflowCommand
|
|
6
6
|
module MoveField
|
|
7
|
-
SCHEMA_VERSION = '
|
|
8
|
-
|
|
7
|
+
SCHEMA_VERSION = '20260713'.freeze
|
|
8
|
+
# 20260713: gained anchor-based positioning (anchorId/anchorPosition).
|
|
9
|
+
VALID_KEYS = %i[id sectionId column anchorId anchorPosition].freeze
|
|
9
10
|
|
|
10
11
|
def self.build(**kwargs)
|
|
11
12
|
kwargs.slice(*VALID_KEYS).compact
|