ecoportal-api-graphql 1.3.13 → 1.3.15
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/archive/oscar-a1b2c3d-gitlab-mcp-doc-update.inbox.md +29 -29
- data/.ai-assistance/bridge/archive/oscar-c912c25-gemini-design-review.inbox.md +42 -42
- data/.ai-assistance/projects/TODO.md +170 -118
- data/.ai-assistance/skills/ai-instructions/SKILL.md +48 -48
- data/.ai-assistance/skills/code-specs/SKILL.md +69 -69
- data/.ai-assistance/skills/gemini-assist/SKILL.md +63 -63
- data/.ai-assistance/skills/project-cycle/SKILL.md +177 -177
- data/.ai-assistance/skills/refactor/SKILL.md +62 -62
- data/.ai-assistance/skills/spec-generation/SKILL.md +72 -72
- data/.gitignore +37 -37
- data/.gitlab-ci.yml +64 -12
- data/CHANGELOG.md +77 -0
- data/changelog.d/fixed-mr51-payload-item-mismatches.md +17 -0
- data/docs/worklog.md +0 -18
- data/lib/ecoportal/api/common/graphql/client.rb +0 -2
- data/lib/ecoportal/api/common/graphql/http_client.rb +6 -0
- data/lib/ecoportal/api/graphql/base/ai_summary_version.rb +17 -17
- data/lib/ecoportal/api/graphql/base/location_classification_type.rb +15 -15
- data/lib/ecoportal/api/graphql/base/location_structure.rb +27 -27
- data/lib/ecoportal/api/graphql/base/organization.rb +15 -15
- data/lib/ecoportal/api/graphql/base/page/task.rb +24 -0
- data/lib/ecoportal/api/graphql/base/page.rb +17 -16
- data/lib/ecoportal/api/graphql/base/template.rb +35 -0
- data/lib/ecoportal/api/graphql/base.rb +37 -35
- data/lib/ecoportal/api/graphql/builder/contractor_entity.rb +41 -41
- data/lib/ecoportal/api/graphql/compat/response.rb +35 -35
- data/lib/ecoportal/api/graphql/connection/action.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/action_category.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/contractor_entity.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/page.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/person_member.rb +11 -11
- data/lib/ecoportal/api/graphql/connection/preview_page.rb +11 -11
- data/lib/ecoportal/api/graphql/connection.rb +17 -17
- data/lib/ecoportal/api/graphql/file_upload/client.rb +21 -10
- data/lib/ecoportal/api/graphql/fragment/field_configuration.rb +38 -0
- data/lib/ecoportal/api/graphql/fragment/force.rb +14 -10
- data/lib/ecoportal/api/graphql/fragment/location_node.rb +26 -26
- data/lib/ecoportal/api/graphql/fragment/page_task.rb +39 -0
- data/lib/ecoportal/api/graphql/fragment/template.rb +51 -0
- data/lib/ecoportal/api/graphql/fragment.rb +3 -0
- data/lib/ecoportal/api/graphql/input/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/input/workflow_command/add_stage.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_field_configuration.rb +21 -21
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page.rb +28 -28
- data/lib/ecoportal/api/graphql/input/workflow_command/edit_page_creator_permissions.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/cross_reference.rb +23 -23
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/date.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/image_gallery.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/plain_text.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/rich_text.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/field_config/select.rb +20 -20
- data/lib/ecoportal/api/graphql/input/workflow_command/move_field.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_forces.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command/reorder_section.rb +18 -18
- data/lib/ecoportal/api/graphql/input/workflow_command.rb +251 -251
- data/lib/ecoportal/api/graphql/input.rb +24 -24
- data/lib/ecoportal/api/graphql/logic/connection.rb +34 -34
- data/lib/ecoportal/api/graphql/model/page/task.rb +16 -0
- data/lib/ecoportal/api/graphql/model/page.rb +16 -15
- data/lib/ecoportal/api/graphql/model/person_member.rb +15 -15
- data/lib/ecoportal/api/graphql/model/template.rb +15 -0
- data/lib/ecoportal/api/graphql/model.rb +32 -30
- data/lib/ecoportal/api/graphql/mutation/ai_summary/generate.rb +45 -45
- data/lib/ecoportal/api/graphql/mutation/ai_summary/submit_feedback.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/mutation/page/approve_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/batch_update_review_task.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/create_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/delete_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/execute_force_commands.rb +7 -7
- data/lib/ecoportal/api/graphql/mutation/page/execute_workflow_commands.rb +8 -7
- data/lib/ecoportal/api/graphql/mutation/page/publish_draft.rb +38 -40
- data/lib/ecoportal/api/graphql/mutation/page/reject_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/restart_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/page/undo_review_task.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/preset_view/destroy.rb +34 -35
- data/lib/ecoportal/api/graphql/mutation/register/destroy.rb +35 -35
- data/lib/ecoportal/api/graphql/mutation/smart_fill/generate.rb +36 -36
- data/lib/ecoportal/api/graphql/mutation/smart_fill/submit_feedback.rb +40 -40
- data/lib/ecoportal/api/graphql/mutation/smart_fill.rb +13 -13
- data/lib/ecoportal/api/graphql/mutation/template/create_related_page.rb +46 -46
- data/lib/ecoportal/api/graphql/mutation/template/destroy_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation/template/update_information.rb +1 -1
- data/lib/ecoportal/api/graphql/mutation.rb +20 -20
- data/lib/ecoportal/api/graphql/payload/contractor_entity.rb +14 -14
- data/lib/ecoportal/api/graphql/payload/ok_payload.rb +36 -21
- data/lib/ecoportal/api/graphql/payload/page/draft.rb +26 -13
- data/lib/ecoportal/api/graphql/payload/page/review_task.rb +13 -13
- data/lib/ecoportal/api/graphql/payload/page/review_task_batch.rb +23 -0
- data/lib/ecoportal/api/graphql/payload/page.rb +20 -19
- data/lib/ecoportal/api/graphql/payload/preset_view.rb +15 -11
- data/lib/ecoportal/api/graphql/payload/register.rb +15 -11
- data/lib/ecoportal/api/graphql/payload/template/create_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/template/destroy_related_page.rb +1 -1
- data/lib/ecoportal/api/graphql/payload/template/update_information.rb +1 -1
- data/lib/ecoportal/api/graphql/query/location_structures.rb +57 -57
- data/lib/ecoportal/api/graphql/query/page_with_forces.rb +9 -3
- data/lib/ecoportal/api/graphql/query/pages_workflow_commands.rb +9 -3
- data/lib/ecoportal/api/graphql/query/register_preset_views.rb +78 -78
- data/lib/ecoportal/api/graphql/query.rb +27 -27
- data/lib/ecoportal/api/graphql.rb +9 -5
- data/lib/ecoportal/api/graphql_version.rb +1 -1
- data/tests/dump_schema.rb +88 -0
- data/tests/validate_queries.rb +34 -12
- metadata +11 -1
|
@@ -1,34 +1,34 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Logic
|
|
5
|
-
class Connection < Logic::BaseModel
|
|
6
|
-
class GenericNode
|
|
7
|
-
def initialize(*_args, **_kargs)
|
|
8
|
-
raise "Missuse error. You should define a node_class for a class that inherits from GraphqlConnection class."
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
include Enumerable
|
|
13
|
-
|
|
14
|
-
class_resolver :node_class, GenericNode
|
|
15
|
-
|
|
16
|
-
passthrough :edges
|
|
17
|
-
passthrough :totalCount
|
|
18
|
-
embeds_many :nodes, klass: :node_class
|
|
19
|
-
embeds_one :pageInfo, klass: Base::PageInfo
|
|
20
|
-
|
|
21
|
-
def empty?
|
|
22
|
-
count < 1
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def each(&block)
|
|
26
|
-
return to_enum(:each) unless block
|
|
27
|
-
|
|
28
|
-
nodes.each(&block)
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Logic
|
|
5
|
+
class Connection < Logic::BaseModel
|
|
6
|
+
class GenericNode
|
|
7
|
+
def initialize(*_args, **_kargs)
|
|
8
|
+
raise "Missuse error. You should define a node_class for a class that inherits from GraphqlConnection class."
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
include Enumerable
|
|
13
|
+
|
|
14
|
+
class_resolver :node_class, GenericNode
|
|
15
|
+
|
|
16
|
+
passthrough :edges
|
|
17
|
+
passthrough :totalCount
|
|
18
|
+
embeds_many :nodes, klass: :node_class
|
|
19
|
+
embeds_one :pageInfo, klass: Base::PageInfo
|
|
20
|
+
|
|
21
|
+
def empty?
|
|
22
|
+
count < 1
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
def each(&block)
|
|
26
|
+
return to_enum(:each) unless block
|
|
27
|
+
|
|
28
|
+
nodes.each(&block)
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
module Page
|
|
6
|
+
# Concrete `Base::Page::Task` — adds the typed `subject` (the page the task belongs
|
|
7
|
+
# to), which the base class cannot declare because `Model::PageUnion` lives one layer
|
|
8
|
+
# up. Nullable: the caller may select the task without its subject.
|
|
9
|
+
class Task < Base::Page::Task
|
|
10
|
+
embeds_one :subject, klass: 'Ecoportal::API::GraphQL::Model::PageUnion', nullable: true
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
@@ -1,15 +1,16 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Model
|
|
5
|
-
module Page
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
require_relative 'page/basic'
|
|
13
|
-
require_relative 'page/data_field'
|
|
14
|
-
require_relative 'page/section'
|
|
15
|
-
require_relative 'page/phased'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
module Page
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
require_relative 'page/basic'
|
|
13
|
+
require_relative 'page/data_field'
|
|
14
|
+
require_relative 'page/section'
|
|
15
|
+
require_relative 'page/phased'
|
|
16
|
+
require_relative 'page/task'
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Model
|
|
5
|
-
class PersonMember < Base::PersonMember
|
|
6
|
-
embeds_one :contractorOrganization, klass: "Ecoportal::API::GraphQL::Model::ContractorEntity"
|
|
7
|
-
embeds_one :account, klass: Model::Account
|
|
8
|
-
|
|
9
|
-
# embeds_many :privateFields, enum_class: Ecoportal::API::GraphQL::Model::MemberSchemaFields
|
|
10
|
-
# embeds_many :publicFields, enum_class: Ecoportal::API::GraphQL::Model::MemberSchemaFields
|
|
11
|
-
end
|
|
12
|
-
end
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
class PersonMember < Base::PersonMember
|
|
6
|
+
embeds_one :contractorOrganization, klass: "Ecoportal::API::GraphQL::Model::ContractorEntity"
|
|
7
|
+
embeds_one :account, klass: Model::Account
|
|
8
|
+
|
|
9
|
+
# embeds_many :privateFields, enum_class: Ecoportal::API::GraphQL::Model::MemberSchemaFields
|
|
10
|
+
# embeds_many :publicFields, enum_class: Ecoportal::API::GraphQL::Model::MemberSchemaFields
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
# Concrete counterparts of `Base::Template::*` (see there for the page-vs-Template
|
|
6
|
+
# type asymmetry). No extra wiring needed — both are flat, read-only models.
|
|
7
|
+
module Template
|
|
8
|
+
class Information < Base::Template::Information; end
|
|
9
|
+
|
|
10
|
+
class RelatedPages < Base::Template::RelatedPages; end
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
15
|
+
end
|
|
@@ -1,30 +1,32 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Model
|
|
5
|
-
end
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
|
|
10
|
-
require_relative 'model/location_node'
|
|
11
|
-
require_relative 'model/location_structure'
|
|
12
|
-
require_relative 'model/account'
|
|
13
|
-
require_relative 'model/user'
|
|
14
|
-
require_relative 'model/person_member'
|
|
15
|
-
require_relative 'model/file_attachment'
|
|
16
|
-
require_relative 'model/file_container'
|
|
17
|
-
require_relative 'model/field'
|
|
18
|
-
require_relative 'model/page'
|
|
19
|
-
require_relative 'model/page_union'
|
|
20
|
-
require_relative 'model/preview_page'
|
|
21
|
-
require_relative 'model/resource'
|
|
22
|
-
require_relative 'model/action'
|
|
23
|
-
require_relative 'model/contractor_entity'
|
|
24
|
-
require_relative 'model/organization'
|
|
25
|
-
|
|
26
|
-
require_relative 'model/register'
|
|
27
|
-
require_relative 'model/preset_view'
|
|
28
|
-
|
|
29
|
-
require_relative 'model/ai_summary_version'
|
|
30
|
-
require_relative 'model/pages_workflow'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Model
|
|
5
|
+
end
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
require_relative 'model/location_node'
|
|
11
|
+
require_relative 'model/location_structure'
|
|
12
|
+
require_relative 'model/account'
|
|
13
|
+
require_relative 'model/user'
|
|
14
|
+
require_relative 'model/person_member'
|
|
15
|
+
require_relative 'model/file_attachment'
|
|
16
|
+
require_relative 'model/file_container'
|
|
17
|
+
require_relative 'model/field'
|
|
18
|
+
require_relative 'model/page'
|
|
19
|
+
require_relative 'model/page_union'
|
|
20
|
+
require_relative 'model/preview_page'
|
|
21
|
+
require_relative 'model/resource'
|
|
22
|
+
require_relative 'model/action'
|
|
23
|
+
require_relative 'model/contractor_entity'
|
|
24
|
+
require_relative 'model/organization'
|
|
25
|
+
|
|
26
|
+
require_relative 'model/register'
|
|
27
|
+
require_relative 'model/preset_view'
|
|
28
|
+
|
|
29
|
+
require_relative 'model/ai_summary_version'
|
|
30
|
+
require_relative 'model/pages_workflow'
|
|
31
|
+
|
|
32
|
+
require_relative 'model/template'
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module AiSummary
|
|
6
|
-
# Triggers AI summary generation for a page or stage.
|
|
7
|
-
# Returns an AiSummaryVersion with the generated text and token usage.
|
|
8
|
-
# Generation is synchronous — the response contains the result or an error.
|
|
9
|
-
#
|
|
10
|
-
# stageId is optional: omit for page-level summary, provide for stage-level.
|
|
11
|
-
class Generate < Logic::Mutation
|
|
12
|
-
field_name :generateAiSummary
|
|
13
|
-
|
|
14
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::AiSummaryGenerate'
|
|
15
|
-
|
|
16
|
-
private
|
|
17
|
-
|
|
18
|
-
def basic_block(&block)
|
|
19
|
-
payload_block = block || default_payload_block
|
|
20
|
-
proc {
|
|
21
|
-
mutation(pageId: :id!, stageId: :id) {
|
|
22
|
-
generateAiSummary(pageId: :pageId, stageId: :stageId, &payload_block)
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
end
|
|
26
|
-
|
|
27
|
-
def default_payload_block
|
|
28
|
-
proc {
|
|
29
|
-
errors { details fullMessages }
|
|
30
|
-
item {
|
|
31
|
-
id
|
|
32
|
-
aiSummary
|
|
33
|
-
status
|
|
34
|
-
inputTokens
|
|
35
|
-
outputTokens
|
|
36
|
-
totalTokens
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
end
|
|
40
|
-
end
|
|
41
|
-
end
|
|
42
|
-
end
|
|
43
|
-
end
|
|
44
|
-
end
|
|
45
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module AiSummary
|
|
6
|
+
# Triggers AI summary generation for a page or stage.
|
|
7
|
+
# Returns an AiSummaryVersion with the generated text and token usage.
|
|
8
|
+
# Generation is synchronous — the response contains the result or an error.
|
|
9
|
+
#
|
|
10
|
+
# stageId is optional: omit for page-level summary, provide for stage-level.
|
|
11
|
+
class Generate < Logic::Mutation
|
|
12
|
+
field_name :generateAiSummary
|
|
13
|
+
|
|
14
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::AiSummaryGenerate'
|
|
15
|
+
|
|
16
|
+
private
|
|
17
|
+
|
|
18
|
+
def basic_block(&block)
|
|
19
|
+
payload_block = block || default_payload_block
|
|
20
|
+
proc {
|
|
21
|
+
mutation(pageId: :id!, stageId: :id) {
|
|
22
|
+
generateAiSummary(pageId: :pageId, stageId: :stageId, &payload_block)
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
def default_payload_block
|
|
28
|
+
proc {
|
|
29
|
+
errors { details fullMessages }
|
|
30
|
+
item {
|
|
31
|
+
id
|
|
32
|
+
aiSummary
|
|
33
|
+
status
|
|
34
|
+
inputTokens
|
|
35
|
+
outputTokens
|
|
36
|
+
totalTokens
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module AiSummary
|
|
6
|
-
# Submit a thumbs-up / thumbs-down rating on an AI summary version.
|
|
7
|
-
# sentiment: "THUMBS_UP" | "THUMBS_DOWN"
|
|
8
|
-
# aiSummaryVersionId: returned from generateAiSummary.item.id
|
|
9
|
-
class SubmitFeedback < Logic::Mutation
|
|
10
|
-
field_name :submitAiSummaryFeedback
|
|
11
|
-
|
|
12
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::OkPayload'
|
|
13
|
-
|
|
14
|
-
private
|
|
15
|
-
|
|
16
|
-
def basic_block(&block)
|
|
17
|
-
payload_block = block || default_payload_block
|
|
18
|
-
proc {
|
|
19
|
-
mutation(aiSummaryVersionId: :id!, sentiment: :AiSummarySentimentEnum!) {
|
|
20
|
-
submitAiSummaryFeedback(
|
|
21
|
-
aiSummaryVersionId: :aiSummaryVersionId,
|
|
22
|
-
sentiment: :sentiment,
|
|
23
|
-
&payload_block
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def default_payload_block
|
|
30
|
-
proc {
|
|
31
|
-
ok
|
|
32
|
-
errors { details fullMessages }
|
|
33
|
-
}
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module AiSummary
|
|
6
|
+
# Submit a thumbs-up / thumbs-down rating on an AI summary version.
|
|
7
|
+
# sentiment: "THUMBS_UP" | "THUMBS_DOWN"
|
|
8
|
+
# aiSummaryVersionId: returned from generateAiSummary.item.id
|
|
9
|
+
class SubmitFeedback < Logic::Mutation
|
|
10
|
+
field_name :submitAiSummaryFeedback
|
|
11
|
+
|
|
12
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::OkPayload'
|
|
13
|
+
|
|
14
|
+
private
|
|
15
|
+
|
|
16
|
+
def basic_block(&block)
|
|
17
|
+
payload_block = block || default_payload_block
|
|
18
|
+
proc {
|
|
19
|
+
mutation(aiSummaryVersionId: :id!, sentiment: :AiSummarySentimentEnum!) {
|
|
20
|
+
submitAiSummaryFeedback(
|
|
21
|
+
aiSummaryVersionId: :aiSummaryVersionId,
|
|
22
|
+
sentiment: :sentiment,
|
|
23
|
+
&payload_block
|
|
24
|
+
)
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def default_payload_block
|
|
30
|
+
proc {
|
|
31
|
+
ok
|
|
32
|
+
errors { details fullMessages }
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module ContractorEntity
|
|
6
|
-
end
|
|
7
|
-
end
|
|
8
|
-
end
|
|
9
|
-
end
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
require_relative 'contractor_entity/create'
|
|
13
|
-
require_relative 'contractor_entity/destroy'
|
|
14
|
-
require_relative 'contractor_entity/update'
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module ContractorEntity
|
|
6
|
+
end
|
|
7
|
+
end
|
|
8
|
+
end
|
|
9
|
+
end
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
require_relative 'contractor_entity/create'
|
|
13
|
+
require_relative 'contractor_entity/destroy'
|
|
14
|
+
require_relative 'contractor_entity/update'
|
|
@@ -1,40 +1,40 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module Page
|
|
6
|
-
class ApproveReviewTask < Logic::Mutation
|
|
7
|
-
field_name :approveReviewPageTask
|
|
8
|
-
|
|
9
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::ReviewTask'
|
|
10
|
-
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def basic_block(&block)
|
|
15
|
-
payload_block = block || default_payload_block
|
|
16
|
-
proc {
|
|
17
|
-
mutation(input: :ApproveReviewPageTaskInput!) {
|
|
18
|
-
approveReviewPageTask(input: :input, &payload_block)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def default_payload_block
|
|
24
|
-
proc {
|
|
25
|
-
clientMutationId
|
|
26
|
-
errors {
|
|
27
|
-
details
|
|
28
|
-
fullMessages
|
|
29
|
-
}
|
|
30
|
-
item {
|
|
31
|
-
spread :
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
37
|
-
end
|
|
38
|
-
end
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module Page
|
|
6
|
+
class ApproveReviewTask < Logic::Mutation
|
|
7
|
+
field_name :approveReviewPageTask
|
|
8
|
+
|
|
9
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::ReviewTask'
|
|
10
|
+
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def basic_block(&block)
|
|
15
|
+
payload_block = block || default_payload_block
|
|
16
|
+
proc {
|
|
17
|
+
mutation(input: :ApproveReviewPageTaskInput!) {
|
|
18
|
+
approveReviewPageTask(input: :input, &payload_block)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def default_payload_block
|
|
24
|
+
proc {
|
|
25
|
+
clientMutationId
|
|
26
|
+
errors {
|
|
27
|
+
details
|
|
28
|
+
fullMessages
|
|
29
|
+
}
|
|
30
|
+
item {
|
|
31
|
+
spread :PageTaskFields
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
40
|
+
end
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module Page
|
|
6
|
-
class BatchUpdateReviewTask < Logic::Mutation
|
|
7
|
-
field_name :batchUpdateReviewPageTask
|
|
8
|
-
|
|
9
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::
|
|
10
|
-
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def basic_block(&block)
|
|
15
|
-
payload_block = block || default_payload_block
|
|
16
|
-
proc {
|
|
17
|
-
mutation(input: :BatchUpdateReviewPageTaskInput!) {
|
|
18
|
-
batchUpdateReviewPageTask(input: :input, &payload_block)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def default_payload_block
|
|
24
|
-
proc {
|
|
25
|
-
clientMutationId
|
|
26
|
-
errors {
|
|
27
|
-
details
|
|
28
|
-
fullMessages
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module Page
|
|
6
|
+
class BatchUpdateReviewTask < Logic::Mutation
|
|
7
|
+
field_name :batchUpdateReviewPageTask
|
|
8
|
+
|
|
9
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::ReviewTaskBatch'
|
|
10
|
+
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::ReviewTask'
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def basic_block(&block)
|
|
15
|
+
payload_block = block || default_payload_block
|
|
16
|
+
proc {
|
|
17
|
+
mutation(input: :BatchUpdateReviewPageTaskInput!) {
|
|
18
|
+
batchUpdateReviewPageTask(input: :input, &payload_block)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def default_payload_block
|
|
24
|
+
proc {
|
|
25
|
+
clientMutationId
|
|
26
|
+
errors {
|
|
27
|
+
details
|
|
28
|
+
fullMessages
|
|
29
|
+
}
|
|
30
|
+
count
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
@@ -1,40 +1,38 @@
|
|
|
1
|
-
module Ecoportal
|
|
2
|
-
module API
|
|
3
|
-
class GraphQL
|
|
4
|
-
module Mutation
|
|
5
|
-
module Page
|
|
6
|
-
class CreateDraft < Logic::Mutation
|
|
7
|
-
field_name :createPageDraft
|
|
8
|
-
|
|
9
|
-
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::Draft'
|
|
10
|
-
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::CreateDraft'
|
|
11
|
-
|
|
12
|
-
private
|
|
13
|
-
|
|
14
|
-
def basic_block(&block)
|
|
15
|
-
payload_block = block || default_payload_block
|
|
16
|
-
proc {
|
|
17
|
-
mutation(input: :CreatePageDraftInput!) {
|
|
18
|
-
createPageDraft(input: :input, &payload_block)
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
def default_payload_block
|
|
24
|
-
proc {
|
|
25
|
-
clientMutationId
|
|
26
|
-
errors {
|
|
27
|
-
details
|
|
28
|
-
fullMessages
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
end
|
|
40
|
-
end
|
|
1
|
+
module Ecoportal
|
|
2
|
+
module API
|
|
3
|
+
class GraphQL
|
|
4
|
+
module Mutation
|
|
5
|
+
module Page
|
|
6
|
+
class CreateDraft < Logic::Mutation
|
|
7
|
+
field_name :createPageDraft
|
|
8
|
+
|
|
9
|
+
class_resolver :payload_class, 'Ecoportal::API::GraphQL::Payload::Page::Draft'
|
|
10
|
+
class_resolver :input_class, 'Ecoportal::API::GraphQL::Input::Page::CreateDraft'
|
|
11
|
+
|
|
12
|
+
private
|
|
13
|
+
|
|
14
|
+
def basic_block(&block)
|
|
15
|
+
payload_block = block || default_payload_block
|
|
16
|
+
proc {
|
|
17
|
+
mutation(input: :CreatePageDraftInput!) {
|
|
18
|
+
createPageDraft(input: :input, &payload_block)
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def default_payload_block
|
|
24
|
+
proc {
|
|
25
|
+
clientMutationId
|
|
26
|
+
errors {
|
|
27
|
+
details
|
|
28
|
+
fullMessages
|
|
29
|
+
}
|
|
30
|
+
id
|
|
31
|
+
}
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|