decidim 0.4.3 → 0.4.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/.codeclimate.yml +11 -0
- data/CHANGELOG.md +16 -2
- data/Gemfile.lock +41 -42
- data/README.md +1 -1
- data/Rakefile +1 -1
- data/decidim-admin/app/commands/decidim/admin/publish_participatory_process.rb +1 -5
- data/decidim-admin/app/commands/decidim/admin/unpublish_participatory_process.rb +1 -5
- data/decidim-admin/app/controllers/decidim/admin/application_controller.rb +1 -1
- data/decidim-admin/app/controllers/decidim/admin/exports_controller.rb +2 -9
- data/decidim-admin/app/controllers/decidim/admin/feature_permissions_controller.rb +1 -1
- data/decidim-admin/app/controllers/decidim/admin/features/base_controller.rb +3 -2
- data/decidim-admin/app/controllers/decidim/admin/features_controller.rb +2 -2
- data/decidim-admin/app/controllers/decidim/admin/participatory_process_groups_controller.rb +2 -1
- data/decidim-admin/app/controllers/decidim/admin/participatory_processes_controller.rb +6 -2
- data/decidim-admin/app/forms/decidim/admin/participatory_process_copy_form.rb +1 -1
- data/decidim-admin/app/forms/decidim/admin/participatory_process_form.rb +1 -1
- data/decidim-admin/app/helpers/decidim/admin/process_groups_for_select_helper.rb +1 -1
- data/decidim-admin/app/helpers/decidim/admin/processes_for_select_helper.rb +1 -1
- data/decidim-admin/app/helpers/decidim/admin/{feature_settings_helper.rb → settings_helper.rb} +2 -2
- data/decidim-admin/app/models/decidim/admin/abilities/participatory_process_admin_ability.rb +2 -2
- data/decidim-admin/app/views/decidim/admin/attachments/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/categories/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/exports/_dropdown.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/features/_feature.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/features/edit.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/features/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/features/new.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_process_groups/show.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/index.html.erb +2 -2
- data/decidim-admin/app/views/decidim/admin/participatory_process_steps/new.html.erb +0 -1
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/index.html.erb +1 -1
- data/decidim-admin/app/views/decidim/admin/participatory_process_user_roles/new.html.erb +6 -6
- data/decidim-admin/app/views/decidim/admin/participatory_processes/new.html.erb +0 -1
- data/decidim-admin/app/views/layouts/decidim/admin/participatory_process.html.erb +2 -2
- data/decidim-admin/config/locales/ca.yml +7 -14
- data/decidim-admin/config/locales/en.yml +7 -14
- data/decidim-admin/config/locales/es.yml +7 -14
- data/decidim-admin/config/locales/eu.yml +9 -15
- data/decidim-admin/config/locales/fi.yml +7 -12
- data/decidim-admin/config/locales/fr.yml +9 -15
- data/decidim-admin/config/locales/it.yml +9 -15
- data/decidim-admin/config/routes.rb +9 -7
- data/decidim-admin/spec/commands/copy_participatory_process_spec.rb +4 -4
- data/decidim-admin/spec/controllers/exports_controller_spec.rb +2 -0
- data/decidim-admin/spec/controllers/participatory_processes_controller_spec.rb +2 -0
- data/decidim-admin/spec/controllers/static_pages_controller_spec.rb +2 -0
- data/decidim-admin/spec/features/admin_copy_participatory_process_spec.rb +3 -2
- data/decidim-admin/spec/features/admin_manages_feature_permissions_spec.rb +1 -1
- data/decidim-admin/spec/features/admin_manages_features_spec.rb +4 -4
- data/decidim-admin/spec/features/admin_manages_participatory_process_admins_spec.rb +2 -1
- data/decidim-admin/spec/features/admin_manages_participatory_process_attachments_spec.rb +2 -1
- data/decidim-admin/spec/features/admin_manages_participatory_process_categories_spec.rb +1 -1
- data/decidim-admin/spec/features/admin_manages_participatory_process_groups_spec.rb +2 -2
- data/decidim-admin/spec/features/admin_manages_participatory_process_steps_spec.rb +2 -1
- data/decidim-admin/spec/features/admin_manages_participatory_processes_spec.rb +3 -3
- data/decidim-admin/spec/features/admin_manages_user_groups_spec.rb +3 -2
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_admins_spec.rb +1 -2
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_attachments_spec.rb +1 -3
- data/decidim-admin/spec/features/{process_admin_manages_participatory_process_categories_spec.rb → participatory_process_admin_manages_participatory_process_categories_spec.rb} +2 -4
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_process_steps_spec.rb +1 -2
- data/decidim-admin/spec/features/participatory_process_admin_manages_participatory_processes_spec.rb +2 -2
- data/decidim-admin/spec/helpers/{feature_settings_helper_spec.rb → settings_helper_spec.rb} +1 -1
- data/decidim-admin/spec/shared/manage_process_admins_examples.rb +9 -1
- data/decidim-admin/spec/shared/participatory_process_administration_by_admin_shared_context.rb +9 -0
- data/decidim-admin/spec/shared/participatory_process_administration_by_process_admin_shared_context.rb +13 -0
- data/decidim-admin/spec/shared/{participatory_admin_shared_context.rb → participatory_process_administration_shared_context.rb} +2 -4
- data/decidim-api/decidim-api.gemspec +2 -0
- data/decidim-api/lib/decidim/api/schema.rb +1 -1
- data/decidim-api/lib/decidim/api/test/type_context.rb +1 -1
- data/decidim-api/spec/controllers/queries_controller_spec.rb +2 -0
- data/decidim-budgets/app/forms/decidim/budgets/admin/project_form.rb +4 -0
- data/decidim-budgets/app/views/decidim/budgets/admin/projects/index.html.erb +1 -1
- data/decidim-budgets/app/views/decidim/budgets/projects/_tags.html.erb +2 -2
- data/decidim-budgets/decidim-budgets.gemspec +1 -1
- data/decidim-budgets/lib/decidim/budgets/feature.rb +30 -34
- data/decidim-budgets/spec/commands/remove_line_item_spec.rb +2 -0
- data/decidim-budgets/spec/features/comments_spec.rb +1 -1
- data/decidim-budgets/spec/features/orders_spec.rb +1 -5
- data/decidim-budgets/spec/forms/project_form_spec.rb +6 -0
- data/decidim-budgets/spec/shared/manage_projects_examples.rb +1 -1
- data/decidim-comments/app/assets/javascripts/decidim/comments/bundle.js +0 -0
- data/decidim-comments/app/frontend/comments/add_comment_form.component.tsx +3 -3
- data/decidim-comments/app/frontend/support/schema.ts +1379 -94
- data/decidim-comments/app/types/decidim/comments/commentable_interface.rb +1 -1
- data/decidim-comments/decidim-comments.gemspec +1 -0
- data/decidim-comments/lib/decidim/comments/api/comment_mutation_type.rb +2 -2
- data/decidim-comments/spec/features/comments_spec.rb +1 -1
- data/decidim-comments/spec/features/notifications_spec.rb +1 -1
- data/decidim-comments/spec/features/report_comment_spec.rb +1 -1
- data/decidim-comments/spec/models/comment_spec.rb +1 -1
- data/decidim-dev/lib/decidim/dev/test/base_spec_helper.rb +2 -1
- data/decidim-dev/lib/decidim/dev/test/rspec_support/feature_context.rb +1 -3
- data/decidim-dev/lib/decidim/dev/test/rspec_support/i18n.rb +0 -7
- data/decidim-dev/lib/decidim/dev/test/rspec_support/phantomjs_polyfills/promise.js +2 -2
- data/decidim-dev/lib/decidim/dev/test/rspec_support/route_helpers.rb +6 -0
- data/decidim-dev/lib/generators/decidim/dummy_generator.rb +0 -2
- data/decidim-meetings/app/forms/decidim/meetings/admin/meeting_form.rb +6 -0
- data/decidim-meetings/app/helpers/decidim/meetings/meetings_helper.rb +2 -1
- data/decidim-meetings/app/services/decidim/meetings/meeting_search.rb +2 -2
- data/decidim-meetings/app/views/decidim/meetings/admin/meeting_closes/_form.html.erb +2 -2
- data/decidim-meetings/app/views/decidim/meetings/admin/meetings/index.html.erb +1 -1
- data/decidim-meetings/app/views/decidim/meetings/meetings/_tags.html.erb +2 -2
- data/decidim-meetings/decidim-meetings.gemspec +1 -1
- data/decidim-meetings/lib/decidim/meetings/feature.rb +35 -39
- data/decidim-meetings/spec/features/explore_meetings_spec.rb +1 -1
- data/decidim-meetings/spec/forms/meeting_form_spec.rb +6 -0
- data/decidim-meetings/spec/shared/manage_meetings_examples.rb +1 -1
- data/decidim-pages/lib/decidim/pages/feature.rb +14 -18
- data/decidim-pages/spec/features/comments_spec.rb +1 -1
- data/decidim-proposals/app/forms/decidim/proposals/admin/proposal_form.rb +6 -0
- data/decidim-proposals/app/forms/decidim/proposals/proposal_form.rb +6 -0
- data/decidim-proposals/app/models/decidim/proposals/proposal.rb +9 -1
- data/decidim-proposals/app/views/decidim/proposals/admin/proposals/index.html.erb +1 -1
- data/decidim-proposals/app/views/decidim/proposals/proposals/_tags.html.erb +2 -2
- data/decidim-proposals/decidim-proposals.gemspec +1 -0
- data/decidim-proposals/lib/decidim/proposals/feature.rb +59 -65
- data/decidim-proposals/lib/decidim/proposals/proposal_serializer.rb +1 -15
- data/decidim-proposals/spec/controllers/decidim/admin/proposal_answers_controller_spec.rb +2 -4
- data/decidim-proposals/spec/controllers/decidim/proposal_votes_controller_spec.rb +2 -4
- data/decidim-proposals/spec/controllers/decidim/proposals_controller_spec.rb +2 -4
- data/decidim-proposals/spec/features/comments_spec.rb +1 -1
- data/decidim-proposals/spec/features/report_proposal_spec.rb +1 -1
- data/decidim-proposals/spec/models/decidim/proposals/proposal_spec.rb +18 -0
- data/decidim-proposals/spec/shared/manage_proposals_examples.rb +1 -1
- data/decidim-proposals/spec/shared/proposal_form_examples.rb +6 -0
- data/decidim-results/app/controllers/decidim/results/result_widgets_controller.rb +0 -2
- data/decidim-results/app/forms/decidim/results/admin/result_form.rb +4 -0
- data/decidim-results/app/views/decidim/results/admin/results/index.html.erb +1 -1
- data/decidim-results/app/views/decidim/results/results/_tags.html.erb +2 -2
- data/decidim-results/decidim-results.gemspec +2 -1
- data/decidim-results/lib/decidim/results/feature.rb +18 -22
- data/decidim-results/spec/controllers/results_controller_spec.rb +2 -0
- data/decidim-results/spec/features/comments_spec.rb +1 -1
- data/decidim-results/spec/features/explore_results_spec.rb +1 -1
- data/decidim-results/spec/forms/result_form_spec.rb +6 -0
- data/decidim-results/spec/shared/manage_results_examples.rb +1 -1
- data/decidim-surveys/decidim-surveys.gemspec +1 -0
- data/decidim-surveys/lib/decidim/surveys/feature.rb +23 -27
- data/decidim-system/db/seeds.rb +1 -2
- data/decidim-system/spec/commands/decidim/system/create_default_pages_spec.rb +1 -1
- data/docs/features_and_components.md +6 -6
- data/docs/getting_started.md +1 -1
- data/docs/how_to_create_a_plugin.md +2 -2
- data/docs/social_providers.md +2 -2
- data/lib/generators/decidim/app_generator.rb +0 -6
- data/lib/generators/decidim/docker_generator.rb +1 -1
- data/lib/generators/decidim/install_generator.rb +5 -5
- data/lib/generators/decidim/templates/README.md.erb +1 -1
- data/lib/generators/decidim/templates/database.yml.erb +1 -1
- data/lib/generators/decidim/templates/initializer.rb +4 -1
- data/package-lock.json +46 -134
- data/package.json +9 -9
- metadata +31 -30
- data/decidim-dev/lib/decidim/dev/test/rspec_support/engine_routes.rb +0 -35
- data/decidim-dev/lib/generators/decidim/templates/decidim_dev.rb +0 -3
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
RSpec.shared_context "participatory process administration by process admin" do
|
4
|
+
let!(:user) do
|
5
|
+
create(:user,
|
6
|
+
:process_admin,
|
7
|
+
:confirmed,
|
8
|
+
organization: organization,
|
9
|
+
participatory_process: participatory_process)
|
10
|
+
end
|
11
|
+
|
12
|
+
include_context "participatory process administration"
|
13
|
+
end
|
@@ -1,11 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
RSpec.shared_context "participatory process
|
3
|
+
RSpec.shared_context "participatory process administration" do
|
4
4
|
let(:organization) { create(:organization) }
|
5
|
-
let!(:user) { create(:user, :admin, :confirmed, organization: organization) }
|
6
5
|
|
7
|
-
let(:participatory_process) { create(:participatory_process, organization: organization) }
|
8
|
-
let!(:process_admin) { create :user, :process_admin, :confirmed, organization: organization, participatory_process: participatory_process }
|
6
|
+
let!(:participatory_process) { create(:participatory_process, organization: organization) }
|
9
7
|
|
10
8
|
let(:image1_filename) { "city.jpeg" }
|
11
9
|
let(:image1_path) { Decidim::Dev.asset(image1_filename) }
|
@@ -22,4 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency "sprockets-es6", "~> 0.9.2"
|
23
23
|
|
24
24
|
s.add_development_dependency "decidim-dev", Decidim.version
|
25
|
+
s.add_development_dependency "decidim-core", Decidim.version
|
26
|
+
s.add_development_dependency "decidim-comments", Decidim.version
|
25
27
|
end
|
@@ -5,6 +5,8 @@ require "spec_helper"
|
|
5
5
|
module Decidim
|
6
6
|
module Api
|
7
7
|
describe QueriesController, type: :controller do
|
8
|
+
routes { Decidim::Api::Engine.routes }
|
9
|
+
|
8
10
|
let!(:participatory_process) { create(:participatory_process) }
|
9
11
|
let!(:other_participatory_process) { create(:participatory_process) }
|
10
12
|
|
@@ -25,6 +25,10 @@ module Decidim
|
|
25
25
|
|
26
26
|
def map_model(model)
|
27
27
|
self.proposal_ids = model.linked_resources(:proposals, "included_proposals").pluck(:id)
|
28
|
+
|
29
|
+
return unless model.categorization
|
30
|
+
|
31
|
+
self.decidim_category_id = model.categorization.decidim_category_id
|
28
32
|
end
|
29
33
|
|
30
34
|
def process_scope
|
@@ -26,7 +26,7 @@
|
|
26
26
|
<%= project.confirmed_orders_count %>
|
27
27
|
</td>
|
28
28
|
<td class="table-list__actions">
|
29
|
-
<%= icon_link_to "eye",
|
29
|
+
<%= icon_link_to "eye", resource_locator(project).path, t("actions.preview", scope: "decidim.budgets"), target: :blank, class: "action-icon--preview" %>
|
30
30
|
|
31
31
|
<% if can? :update, current_feature %>
|
32
32
|
<%= icon_link_to "pencil", edit_project_path(project), t("actions.edit", scope: "decidim.budgets"), class: "action-icon--edit" %>
|
@@ -1,10 +1,10 @@
|
|
1
1
|
<% if project.category.present? || project.scope.present? %>
|
2
2
|
<ul class="tags tags--project" >
|
3
3
|
<% if project.category.present? %>
|
4
|
-
<li><%= link_to translated_attribute(project.category.name),
|
4
|
+
<li><%= link_to translated_attribute(project.category.name), resource_locator(project).index(filter: { category_id: project.category.id }) %></li>
|
5
5
|
<% end %>
|
6
6
|
<% if project.scope.present? && !current_participatory_process.scope %>
|
7
|
-
<li><%= link_to project.scope.name,
|
7
|
+
<li><%= link_to project.scope.name, resource_locator(project).index(filter: { scope_id: [project.scope.id] }) %></li>
|
8
8
|
<% end %>
|
9
9
|
</ul>
|
10
10
|
<% end %>
|
@@ -22,6 +22,6 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_dependency "kaminari", "~> 1.0.1"
|
23
23
|
|
24
24
|
s.add_development_dependency "decidim-dev", Decidim.version
|
25
|
-
s.add_development_dependency "decidim-proposals", Decidim.version
|
26
25
|
s.add_development_dependency "decidim-admin", Decidim.version
|
26
|
+
s.add_development_dependency "decidim-proposals", Decidim.version
|
27
27
|
end
|
@@ -47,42 +47,38 @@ Decidim.register_feature(:budgets) do |feature|
|
|
47
47
|
settings.attribute :show_votes, type: :boolean, default: false
|
48
48
|
end
|
49
49
|
|
50
|
-
feature.seeds do
|
51
|
-
Decidim::
|
52
|
-
|
50
|
+
feature.seeds do |process|
|
51
|
+
feature = Decidim::Feature.create!(
|
52
|
+
name: Decidim::Features::Namer.new(process.organization.available_locales, :budgets).i18n_name,
|
53
|
+
manifest_name: :budgets,
|
54
|
+
published_at: Time.current,
|
55
|
+
participatory_process: process
|
56
|
+
)
|
53
57
|
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
58
|
+
3.times do
|
59
|
+
project = Decidim::Budgets::Project.create!(
|
60
|
+
feature: feature,
|
61
|
+
scope: process.organization.scopes.sample,
|
62
|
+
category: process.categories.sample,
|
63
|
+
title: Decidim::Faker::Localized.sentence(2),
|
64
|
+
description: Decidim::Faker::Localized.wrapped("<p>", "</p>") do
|
65
|
+
Decidim::Faker::Localized.paragraph(3)
|
66
|
+
end,
|
67
|
+
budget: Faker::Number.number(8)
|
59
68
|
)
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
title: Decidim::Faker::Localized.sentence(2),
|
74
|
-
description: Decidim::Faker::Localized.sentence(5),
|
75
|
-
file: File.new(File.join(__dir__, "seeds", "city.jpeg")),
|
76
|
-
attached_to: project
|
77
|
-
)
|
78
|
-
Decidim::Attachment.create!(
|
79
|
-
title: Decidim::Faker::Localized.sentence(2),
|
80
|
-
description: Decidim::Faker::Localized.sentence(5),
|
81
|
-
file: File.new(File.join(__dir__, "seeds", "Exampledocument.pdf")),
|
82
|
-
attached_to: project
|
83
|
-
)
|
84
|
-
Decidim::Comments::Seed.comments_for(project)
|
85
|
-
end
|
69
|
+
Decidim::Attachment.create!(
|
70
|
+
title: Decidim::Faker::Localized.sentence(2),
|
71
|
+
description: Decidim::Faker::Localized.sentence(5),
|
72
|
+
file: File.new(File.join(__dir__, "seeds", "city.jpeg")),
|
73
|
+
attached_to: project
|
74
|
+
)
|
75
|
+
Decidim::Attachment.create!(
|
76
|
+
title: Decidim::Faker::Localized.sentence(2),
|
77
|
+
description: Decidim::Faker::Localized.sentence(5),
|
78
|
+
file: File.new(File.join(__dir__, "seeds", "Exampledocument.pdf")),
|
79
|
+
attached_to: project
|
80
|
+
)
|
81
|
+
Decidim::Comments::Seed.comments_for(project)
|
86
82
|
end
|
87
83
|
end
|
88
84
|
end
|
@@ -4,11 +4,13 @@ require "spec_helper"
|
|
4
4
|
|
5
5
|
describe Decidim::Budgets::RemoveLineItem do
|
6
6
|
let(:user) { create(:user) }
|
7
|
+
|
7
8
|
let(:feature) do
|
8
9
|
create(:budget_feature,
|
9
10
|
organization: user.organization,
|
10
11
|
settings: { "total_budget" => 100_000, "vote_threshold_percent": 50 })
|
11
12
|
end
|
13
|
+
|
12
14
|
let(:project) { create(:project, feature: feature, budget: 100) }
|
13
15
|
|
14
16
|
let(:order) do
|
@@ -6,6 +6,6 @@ describe "Comments", type: :feature, perform_enqueued: true do
|
|
6
6
|
let!(:feature) { create(:budget_feature, organization: organization) }
|
7
7
|
let!(:commentable) { create(:project, feature: feature) }
|
8
8
|
|
9
|
-
let(:resource_path) {
|
9
|
+
let(:resource_path) { resource_locator(commentable).path }
|
10
10
|
include_examples "comments"
|
11
11
|
end
|
@@ -219,11 +219,7 @@ describe "Orders", type: :feature do
|
|
219
219
|
let!(:project) { create(:project, feature: feature, budget: 25_000_000) }
|
220
220
|
|
221
221
|
before do
|
222
|
-
visit
|
223
|
-
id: project.id,
|
224
|
-
participatory_process_id: participatory_process,
|
225
|
-
feature_id: feature
|
226
|
-
)
|
222
|
+
visit resource_locator(project).path
|
227
223
|
end
|
228
224
|
|
229
225
|
let(:attached_to) { project }
|
@@ -75,6 +75,12 @@ describe Decidim::Budgets::Admin::ProjectForm do
|
|
75
75
|
it { is_expected.not_to be_valid }
|
76
76
|
end
|
77
77
|
|
78
|
+
it "properly maps category id from model" do
|
79
|
+
project = create(:project, feature: current_feature, category: category)
|
80
|
+
|
81
|
+
expect(described_class.from_model(project).decidim_category_id).to eq(category_id)
|
82
|
+
end
|
83
|
+
|
78
84
|
context "with proposals" do
|
79
85
|
let(:proposals_feature) { create :feature, manifest_name: :proposals, participatory_process: participatory_process }
|
80
86
|
let!(:proposal) { create :proposal, feature: proposals_feature }
|
@@ -35,7 +35,7 @@ RSpec.shared_examples "manage projects" do
|
|
35
35
|
end
|
36
36
|
|
37
37
|
within_window @new_window do
|
38
|
-
expect(current_path).to eq
|
38
|
+
expect(current_path).to eq resource_locator(project).path
|
39
39
|
expect(page).to have_content(translated(project.title))
|
40
40
|
end
|
41
41
|
end
|
Binary file
|
@@ -11,7 +11,7 @@ const { I18n, Translate } = require("react-i18nify");
|
|
11
11
|
import {
|
12
12
|
AddCommentFormCommentableFragment,
|
13
13
|
AddCommentFormSessionFragment,
|
14
|
-
|
14
|
+
addCommentMutation,
|
15
15
|
CommentFragment,
|
16
16
|
GetCommentsQuery,
|
17
17
|
} from "../support/schema";
|
@@ -344,7 +344,7 @@ export class AddCommentForm extends React.Component<AddCommentFormProps, AddComm
|
|
344
344
|
const addCommentMutation = require("../mutations/add_comment.mutation.graphql");
|
345
345
|
const getCommentsQuery = require("../queries/comments.query.graphql");
|
346
346
|
|
347
|
-
const AddCommentFormWithMutation = graphql<
|
347
|
+
const AddCommentFormWithMutation = graphql<addCommentMutation, AddCommentFormProps>(addCommentMutation, {
|
348
348
|
props: ({ ownProps, mutate }) => ({
|
349
349
|
addComment: ({ body, alignment, userGroupId }: { body: string, alignment: number, userGroupId: string }) => {
|
350
350
|
if (mutate) {
|
@@ -386,7 +386,7 @@ const AddCommentFormWithMutation = graphql<AddCommentMutation, AddCommentFormPro
|
|
386
386
|
},
|
387
387
|
},
|
388
388
|
},
|
389
|
-
update: (store, { data }: { data:
|
389
|
+
update: (store, { data }: { data: addCommentMutation }) => {
|
390
390
|
const variables = {
|
391
391
|
commentableId: ownProps.rootCommentable.id,
|
392
392
|
commentableType: ownProps.rootCommentable.type,
|
@@ -1,55 +1,688 @@
|
|
1
|
-
// This file was automatically generated and should not be edited.
|
2
1
|
/* tslint:disable */
|
2
|
+
// This file was automatically generated and should not be edited.
|
3
3
|
|
4
|
-
export
|
5
|
-
commentableId: string
|
6
|
-
commentableType: string
|
7
|
-
body: string
|
8
|
-
alignment
|
9
|
-
userGroupId
|
10
|
-
}
|
4
|
+
export type addCommentMutationVariables = {
|
5
|
+
commentableId: string,
|
6
|
+
commentableType: string,
|
7
|
+
body: string,
|
8
|
+
alignment?: number | null,
|
9
|
+
userGroupId?: string | null,
|
10
|
+
};
|
11
11
|
|
12
|
-
export
|
12
|
+
export type addCommentMutation = {
|
13
13
|
// A commentable
|
14
|
-
commentable:
|
14
|
+
commentable: {
|
15
15
|
// Add a new comment to a commentable
|
16
|
-
addComment:
|
17
|
-
|
18
|
-
|
16
|
+
addComment: {
|
17
|
+
// Check if the commentable has comments
|
18
|
+
hasComments: boolean,
|
19
|
+
// The Comment's unique ID
|
20
|
+
id: string,
|
21
|
+
// The Comment's signed global id
|
22
|
+
sgid: string,
|
23
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
24
|
+
type: string,
|
25
|
+
// The comment message
|
26
|
+
body: string,
|
27
|
+
// The creation date of the comment
|
28
|
+
createdAt: string,
|
29
|
+
// The comment's author
|
30
|
+
author: ( {
|
31
|
+
// The author's name
|
32
|
+
name: string,
|
33
|
+
// The author's avatar url
|
34
|
+
avatarUrl: string,
|
35
|
+
// Whether the author is verified or not
|
36
|
+
isVerified: boolean,
|
37
|
+
// Whether the author is a user or another kind of author (User Group)
|
38
|
+
isUser: boolean,
|
39
|
+
// Whether the author's account has been deleted or not
|
40
|
+
deleted: boolean,
|
41
|
+
} | {
|
42
|
+
// The author's name
|
43
|
+
name: string,
|
44
|
+
// The author's avatar url
|
45
|
+
avatarUrl: string,
|
46
|
+
// Whether the author is verified or not
|
47
|
+
isVerified: boolean,
|
48
|
+
// Whether the author is a user or another kind of author (User Group)
|
49
|
+
isUser: boolean,
|
50
|
+
// Whether the author's account has been deleted or not
|
51
|
+
deleted: boolean,
|
52
|
+
}
|
53
|
+
),
|
54
|
+
// Whether the object can have new comments or not
|
55
|
+
acceptsNewComments: boolean,
|
56
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
57
|
+
alignment: number | null,
|
58
|
+
// Check if the current user has reported the comment
|
59
|
+
alreadyReported: boolean,
|
60
|
+
// The number of comment's upVotes
|
61
|
+
upVotes: number,
|
62
|
+
// Check if the current user has upvoted the comment
|
63
|
+
upVoted: boolean,
|
64
|
+
// Check if the current user has downvoted the comment
|
65
|
+
downVoted: boolean,
|
66
|
+
// The number of comment's downVotes
|
67
|
+
downVotes: number,
|
68
|
+
comments: Array< {
|
69
|
+
// The Comment's unique ID
|
70
|
+
id: string,
|
71
|
+
// The Comment's signed global id
|
72
|
+
sgid: string,
|
73
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
74
|
+
type: string,
|
75
|
+
// The comment message
|
76
|
+
body: string,
|
77
|
+
// The creation date of the comment
|
78
|
+
createdAt: string,
|
79
|
+
// The comment's author
|
80
|
+
author: ( {
|
81
|
+
// The author's name
|
82
|
+
name: string,
|
83
|
+
// The author's avatar url
|
84
|
+
avatarUrl: string,
|
85
|
+
// Whether the author is verified or not
|
86
|
+
isVerified: boolean,
|
87
|
+
// Whether the author is a user or another kind of author (User Group)
|
88
|
+
isUser: boolean,
|
89
|
+
// Whether the author's account has been deleted or not
|
90
|
+
deleted: boolean,
|
91
|
+
} | {
|
92
|
+
// The author's name
|
93
|
+
name: string,
|
94
|
+
// The author's avatar url
|
95
|
+
avatarUrl: string,
|
96
|
+
// Whether the author is verified or not
|
97
|
+
isVerified: boolean,
|
98
|
+
// Whether the author is a user or another kind of author (User Group)
|
99
|
+
isUser: boolean,
|
100
|
+
// Whether the author's account has been deleted or not
|
101
|
+
deleted: boolean,
|
102
|
+
}
|
103
|
+
),
|
104
|
+
// Check if the commentable has comments
|
105
|
+
hasComments: boolean,
|
106
|
+
// Whether the object can have new comments or not
|
107
|
+
acceptsNewComments: boolean,
|
108
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
109
|
+
alignment: number | null,
|
110
|
+
// Check if the current user has reported the comment
|
111
|
+
alreadyReported: boolean,
|
112
|
+
// The number of comment's upVotes
|
113
|
+
upVotes: number,
|
114
|
+
// Check if the current user has upvoted the comment
|
115
|
+
upVoted: boolean,
|
116
|
+
// Check if the current user has downvoted the comment
|
117
|
+
downVoted: boolean,
|
118
|
+
// The number of comment's downVotes
|
119
|
+
downVotes: number,
|
120
|
+
comments: Array< {
|
121
|
+
// The Comment's unique ID
|
122
|
+
id: string,
|
123
|
+
// The Comment's signed global id
|
124
|
+
sgid: string,
|
125
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
126
|
+
type: string,
|
127
|
+
// The comment message
|
128
|
+
body: string,
|
129
|
+
// The creation date of the comment
|
130
|
+
createdAt: string,
|
131
|
+
// The comment's author
|
132
|
+
author: ( {
|
133
|
+
// The author's name
|
134
|
+
name: string,
|
135
|
+
// The author's avatar url
|
136
|
+
avatarUrl: string,
|
137
|
+
// Whether the author is verified or not
|
138
|
+
isVerified: boolean,
|
139
|
+
// Whether the author is a user or another kind of author (User Group)
|
140
|
+
isUser: boolean,
|
141
|
+
// Whether the author's account has been deleted or not
|
142
|
+
deleted: boolean,
|
143
|
+
} | {
|
144
|
+
// The author's name
|
145
|
+
name: string,
|
146
|
+
// The author's avatar url
|
147
|
+
avatarUrl: string,
|
148
|
+
// Whether the author is verified or not
|
149
|
+
isVerified: boolean,
|
150
|
+
// Whether the author is a user or another kind of author (User Group)
|
151
|
+
isUser: boolean,
|
152
|
+
// Whether the author's account has been deleted or not
|
153
|
+
deleted: boolean,
|
154
|
+
}
|
155
|
+
),
|
156
|
+
// Check if the commentable has comments
|
157
|
+
hasComments: boolean,
|
158
|
+
// Whether the object can have new comments or not
|
159
|
+
acceptsNewComments: boolean,
|
160
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
161
|
+
alignment: number | null,
|
162
|
+
// Check if the current user has reported the comment
|
163
|
+
alreadyReported: boolean,
|
164
|
+
// The number of comment's upVotes
|
165
|
+
upVotes: number,
|
166
|
+
// Check if the current user has upvoted the comment
|
167
|
+
upVoted: boolean,
|
168
|
+
// Check if the current user has downvoted the comment
|
169
|
+
downVoted: boolean,
|
170
|
+
// The number of comment's downVotes
|
171
|
+
downVotes: number,
|
172
|
+
comments: Array< {
|
173
|
+
// The Comment's unique ID
|
174
|
+
id: string,
|
175
|
+
// The Comment's signed global id
|
176
|
+
sgid: string,
|
177
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
178
|
+
type: string,
|
179
|
+
// The comment message
|
180
|
+
body: string,
|
181
|
+
// The creation date of the comment
|
182
|
+
createdAt: string,
|
183
|
+
// The comment's author
|
184
|
+
author: ( {
|
185
|
+
// The author's name
|
186
|
+
name: string,
|
187
|
+
// The author's avatar url
|
188
|
+
avatarUrl: string,
|
189
|
+
// Whether the author is verified or not
|
190
|
+
isVerified: boolean,
|
191
|
+
// Whether the author is a user or another kind of author (User Group)
|
192
|
+
isUser: boolean,
|
193
|
+
// Whether the author's account has been deleted or not
|
194
|
+
deleted: boolean,
|
195
|
+
} | {
|
196
|
+
// The author's name
|
197
|
+
name: string,
|
198
|
+
// The author's avatar url
|
199
|
+
avatarUrl: string,
|
200
|
+
// Whether the author is verified or not
|
201
|
+
isVerified: boolean,
|
202
|
+
// Whether the author is a user or another kind of author (User Group)
|
203
|
+
isUser: boolean,
|
204
|
+
// Whether the author's account has been deleted or not
|
205
|
+
deleted: boolean,
|
206
|
+
}
|
207
|
+
),
|
208
|
+
// Check if the commentable has comments
|
209
|
+
hasComments: boolean,
|
210
|
+
// Whether the object can have new comments or not
|
211
|
+
acceptsNewComments: boolean,
|
212
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
213
|
+
alignment: number | null,
|
214
|
+
// Check if the current user has reported the comment
|
215
|
+
alreadyReported: boolean,
|
216
|
+
// The number of comment's upVotes
|
217
|
+
upVotes: number,
|
218
|
+
// Check if the current user has upvoted the comment
|
219
|
+
upVoted: boolean,
|
220
|
+
// Check if the current user has downvoted the comment
|
221
|
+
downVoted: boolean,
|
222
|
+
// The number of comment's downVotes
|
223
|
+
downVotes: number,
|
224
|
+
} >,
|
225
|
+
} >,
|
226
|
+
} >,
|
227
|
+
} | null,
|
228
|
+
} | null,
|
229
|
+
};
|
19
230
|
|
20
|
-
export
|
21
|
-
id: string
|
22
|
-
}
|
231
|
+
export type DownVoteMutationVariables = {
|
232
|
+
id: string,
|
233
|
+
};
|
23
234
|
|
24
|
-
export
|
235
|
+
export type DownVoteMutation = {
|
25
236
|
// A comment
|
26
|
-
comment:
|
27
|
-
downVote:
|
28
|
-
|
29
|
-
|
237
|
+
comment: {
|
238
|
+
downVote: {
|
239
|
+
// The Comment's unique ID
|
240
|
+
id: string,
|
241
|
+
// The Comment's signed global id
|
242
|
+
sgid: string,
|
243
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
244
|
+
type: string,
|
245
|
+
// The comment message
|
246
|
+
body: string,
|
247
|
+
// The creation date of the comment
|
248
|
+
createdAt: string,
|
249
|
+
// The comment's author
|
250
|
+
author: ( {
|
251
|
+
// The author's name
|
252
|
+
name: string,
|
253
|
+
// The author's avatar url
|
254
|
+
avatarUrl: string,
|
255
|
+
// Whether the author is verified or not
|
256
|
+
isVerified: boolean,
|
257
|
+
// Whether the author is a user or another kind of author (User Group)
|
258
|
+
isUser: boolean,
|
259
|
+
// Whether the author's account has been deleted or not
|
260
|
+
deleted: boolean,
|
261
|
+
} | {
|
262
|
+
// The author's name
|
263
|
+
name: string,
|
264
|
+
// The author's avatar url
|
265
|
+
avatarUrl: string,
|
266
|
+
// Whether the author is verified or not
|
267
|
+
isVerified: boolean,
|
268
|
+
// Whether the author is a user or another kind of author (User Group)
|
269
|
+
isUser: boolean,
|
270
|
+
// Whether the author's account has been deleted or not
|
271
|
+
deleted: boolean,
|
272
|
+
}
|
273
|
+
),
|
274
|
+
// Check if the commentable has comments
|
275
|
+
hasComments: boolean,
|
276
|
+
// Whether the object can have new comments or not
|
277
|
+
acceptsNewComments: boolean,
|
278
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
279
|
+
alignment: number | null,
|
280
|
+
// Check if the current user has reported the comment
|
281
|
+
alreadyReported: boolean,
|
282
|
+
// The number of comment's upVotes
|
283
|
+
upVotes: number,
|
284
|
+
// Check if the current user has upvoted the comment
|
285
|
+
upVoted: boolean,
|
286
|
+
// Check if the current user has downvoted the comment
|
287
|
+
downVoted: boolean,
|
288
|
+
// The number of comment's downVotes
|
289
|
+
downVotes: number,
|
290
|
+
comments: Array< {
|
291
|
+
// The Comment's unique ID
|
292
|
+
id: string,
|
293
|
+
// The Comment's signed global id
|
294
|
+
sgid: string,
|
295
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
296
|
+
type: string,
|
297
|
+
// The comment message
|
298
|
+
body: string,
|
299
|
+
// The creation date of the comment
|
300
|
+
createdAt: string,
|
301
|
+
// The comment's author
|
302
|
+
author: ( {
|
303
|
+
// The author's name
|
304
|
+
name: string,
|
305
|
+
// The author's avatar url
|
306
|
+
avatarUrl: string,
|
307
|
+
// Whether the author is verified or not
|
308
|
+
isVerified: boolean,
|
309
|
+
// Whether the author is a user or another kind of author (User Group)
|
310
|
+
isUser: boolean,
|
311
|
+
// Whether the author's account has been deleted or not
|
312
|
+
deleted: boolean,
|
313
|
+
} | {
|
314
|
+
// The author's name
|
315
|
+
name: string,
|
316
|
+
// The author's avatar url
|
317
|
+
avatarUrl: string,
|
318
|
+
// Whether the author is verified or not
|
319
|
+
isVerified: boolean,
|
320
|
+
// Whether the author is a user or another kind of author (User Group)
|
321
|
+
isUser: boolean,
|
322
|
+
// Whether the author's account has been deleted or not
|
323
|
+
deleted: boolean,
|
324
|
+
}
|
325
|
+
),
|
326
|
+
// Check if the commentable has comments
|
327
|
+
hasComments: boolean,
|
328
|
+
// Whether the object can have new comments or not
|
329
|
+
acceptsNewComments: boolean,
|
330
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
331
|
+
alignment: number | null,
|
332
|
+
// Check if the current user has reported the comment
|
333
|
+
alreadyReported: boolean,
|
334
|
+
// The number of comment's upVotes
|
335
|
+
upVotes: number,
|
336
|
+
// Check if the current user has upvoted the comment
|
337
|
+
upVoted: boolean,
|
338
|
+
// Check if the current user has downvoted the comment
|
339
|
+
downVoted: boolean,
|
340
|
+
// The number of comment's downVotes
|
341
|
+
downVotes: number,
|
342
|
+
comments: Array< {
|
343
|
+
// The Comment's unique ID
|
344
|
+
id: string,
|
345
|
+
// The Comment's signed global id
|
346
|
+
sgid: string,
|
347
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
348
|
+
type: string,
|
349
|
+
// The comment message
|
350
|
+
body: string,
|
351
|
+
// The creation date of the comment
|
352
|
+
createdAt: string,
|
353
|
+
// The comment's author
|
354
|
+
author: ( {
|
355
|
+
// The author's name
|
356
|
+
name: string,
|
357
|
+
// The author's avatar url
|
358
|
+
avatarUrl: string,
|
359
|
+
// Whether the author is verified or not
|
360
|
+
isVerified: boolean,
|
361
|
+
// Whether the author is a user or another kind of author (User Group)
|
362
|
+
isUser: boolean,
|
363
|
+
// Whether the author's account has been deleted or not
|
364
|
+
deleted: boolean,
|
365
|
+
} | {
|
366
|
+
// The author's name
|
367
|
+
name: string,
|
368
|
+
// The author's avatar url
|
369
|
+
avatarUrl: string,
|
370
|
+
// Whether the author is verified or not
|
371
|
+
isVerified: boolean,
|
372
|
+
// Whether the author is a user or another kind of author (User Group)
|
373
|
+
isUser: boolean,
|
374
|
+
// Whether the author's account has been deleted or not
|
375
|
+
deleted: boolean,
|
376
|
+
}
|
377
|
+
),
|
378
|
+
// Check if the commentable has comments
|
379
|
+
hasComments: boolean,
|
380
|
+
// Whether the object can have new comments or not
|
381
|
+
acceptsNewComments: boolean,
|
382
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
383
|
+
alignment: number | null,
|
384
|
+
// Check if the current user has reported the comment
|
385
|
+
alreadyReported: boolean,
|
386
|
+
// The number of comment's upVotes
|
387
|
+
upVotes: number,
|
388
|
+
// Check if the current user has upvoted the comment
|
389
|
+
upVoted: boolean,
|
390
|
+
// Check if the current user has downvoted the comment
|
391
|
+
downVoted: boolean,
|
392
|
+
// The number of comment's downVotes
|
393
|
+
downVotes: number,
|
394
|
+
comments: Array< {
|
395
|
+
// The Comment's unique ID
|
396
|
+
id: string,
|
397
|
+
// The Comment's signed global id
|
398
|
+
sgid: string,
|
399
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
400
|
+
type: string,
|
401
|
+
// The comment message
|
402
|
+
body: string,
|
403
|
+
// The creation date of the comment
|
404
|
+
createdAt: string,
|
405
|
+
// The comment's author
|
406
|
+
author: ( {
|
407
|
+
// The author's name
|
408
|
+
name: string,
|
409
|
+
// The author's avatar url
|
410
|
+
avatarUrl: string,
|
411
|
+
// Whether the author is verified or not
|
412
|
+
isVerified: boolean,
|
413
|
+
// Whether the author is a user or another kind of author (User Group)
|
414
|
+
isUser: boolean,
|
415
|
+
// Whether the author's account has been deleted or not
|
416
|
+
deleted: boolean,
|
417
|
+
} | {
|
418
|
+
// The author's name
|
419
|
+
name: string,
|
420
|
+
// The author's avatar url
|
421
|
+
avatarUrl: string,
|
422
|
+
// Whether the author is verified or not
|
423
|
+
isVerified: boolean,
|
424
|
+
// Whether the author is a user or another kind of author (User Group)
|
425
|
+
isUser: boolean,
|
426
|
+
// Whether the author's account has been deleted or not
|
427
|
+
deleted: boolean,
|
428
|
+
}
|
429
|
+
),
|
430
|
+
// Check if the commentable has comments
|
431
|
+
hasComments: boolean,
|
432
|
+
// Whether the object can have new comments or not
|
433
|
+
acceptsNewComments: boolean,
|
434
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
435
|
+
alignment: number | null,
|
436
|
+
// Check if the current user has reported the comment
|
437
|
+
alreadyReported: boolean,
|
438
|
+
// The number of comment's upVotes
|
439
|
+
upVotes: number,
|
440
|
+
// Check if the current user has upvoted the comment
|
441
|
+
upVoted: boolean,
|
442
|
+
// Check if the current user has downvoted the comment
|
443
|
+
downVoted: boolean,
|
444
|
+
// The number of comment's downVotes
|
445
|
+
downVotes: number,
|
446
|
+
} >,
|
447
|
+
} >,
|
448
|
+
} >,
|
449
|
+
},
|
450
|
+
} | null,
|
451
|
+
};
|
30
452
|
|
31
|
-
export
|
32
|
-
id: string
|
33
|
-
}
|
453
|
+
export type UpVoteMutationVariables = {
|
454
|
+
id: string,
|
455
|
+
};
|
34
456
|
|
35
|
-
export
|
457
|
+
export type UpVoteMutation = {
|
36
458
|
// A comment
|
37
|
-
comment:
|
38
|
-
upVote:
|
39
|
-
|
40
|
-
|
459
|
+
comment: {
|
460
|
+
upVote: {
|
461
|
+
// The Comment's unique ID
|
462
|
+
id: string,
|
463
|
+
// The Comment's signed global id
|
464
|
+
sgid: string,
|
465
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
466
|
+
type: string,
|
467
|
+
// The comment message
|
468
|
+
body: string,
|
469
|
+
// The creation date of the comment
|
470
|
+
createdAt: string,
|
471
|
+
// The comment's author
|
472
|
+
author: ( {
|
473
|
+
// The author's name
|
474
|
+
name: string,
|
475
|
+
// The author's avatar url
|
476
|
+
avatarUrl: string,
|
477
|
+
// Whether the author is verified or not
|
478
|
+
isVerified: boolean,
|
479
|
+
// Whether the author is a user or another kind of author (User Group)
|
480
|
+
isUser: boolean,
|
481
|
+
// Whether the author's account has been deleted or not
|
482
|
+
deleted: boolean,
|
483
|
+
} | {
|
484
|
+
// The author's name
|
485
|
+
name: string,
|
486
|
+
// The author's avatar url
|
487
|
+
avatarUrl: string,
|
488
|
+
// Whether the author is verified or not
|
489
|
+
isVerified: boolean,
|
490
|
+
// Whether the author is a user or another kind of author (User Group)
|
491
|
+
isUser: boolean,
|
492
|
+
// Whether the author's account has been deleted or not
|
493
|
+
deleted: boolean,
|
494
|
+
}
|
495
|
+
),
|
496
|
+
// Check if the commentable has comments
|
497
|
+
hasComments: boolean,
|
498
|
+
// Whether the object can have new comments or not
|
499
|
+
acceptsNewComments: boolean,
|
500
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
501
|
+
alignment: number | null,
|
502
|
+
// Check if the current user has reported the comment
|
503
|
+
alreadyReported: boolean,
|
504
|
+
// The number of comment's upVotes
|
505
|
+
upVotes: number,
|
506
|
+
// Check if the current user has upvoted the comment
|
507
|
+
upVoted: boolean,
|
508
|
+
// Check if the current user has downvoted the comment
|
509
|
+
downVoted: boolean,
|
510
|
+
// The number of comment's downVotes
|
511
|
+
downVotes: number,
|
512
|
+
comments: Array< {
|
513
|
+
// The Comment's unique ID
|
514
|
+
id: string,
|
515
|
+
// The Comment's signed global id
|
516
|
+
sgid: string,
|
517
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
518
|
+
type: string,
|
519
|
+
// The comment message
|
520
|
+
body: string,
|
521
|
+
// The creation date of the comment
|
522
|
+
createdAt: string,
|
523
|
+
// The comment's author
|
524
|
+
author: ( {
|
525
|
+
// The author's name
|
526
|
+
name: string,
|
527
|
+
// The author's avatar url
|
528
|
+
avatarUrl: string,
|
529
|
+
// Whether the author is verified or not
|
530
|
+
isVerified: boolean,
|
531
|
+
// Whether the author is a user or another kind of author (User Group)
|
532
|
+
isUser: boolean,
|
533
|
+
// Whether the author's account has been deleted or not
|
534
|
+
deleted: boolean,
|
535
|
+
} | {
|
536
|
+
// The author's name
|
537
|
+
name: string,
|
538
|
+
// The author's avatar url
|
539
|
+
avatarUrl: string,
|
540
|
+
// Whether the author is verified or not
|
541
|
+
isVerified: boolean,
|
542
|
+
// Whether the author is a user or another kind of author (User Group)
|
543
|
+
isUser: boolean,
|
544
|
+
// Whether the author's account has been deleted or not
|
545
|
+
deleted: boolean,
|
546
|
+
}
|
547
|
+
),
|
548
|
+
// Check if the commentable has comments
|
549
|
+
hasComments: boolean,
|
550
|
+
// Whether the object can have new comments or not
|
551
|
+
acceptsNewComments: boolean,
|
552
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
553
|
+
alignment: number | null,
|
554
|
+
// Check if the current user has reported the comment
|
555
|
+
alreadyReported: boolean,
|
556
|
+
// The number of comment's upVotes
|
557
|
+
upVotes: number,
|
558
|
+
// Check if the current user has upvoted the comment
|
559
|
+
upVoted: boolean,
|
560
|
+
// Check if the current user has downvoted the comment
|
561
|
+
downVoted: boolean,
|
562
|
+
// The number of comment's downVotes
|
563
|
+
downVotes: number,
|
564
|
+
comments: Array< {
|
565
|
+
// The Comment's unique ID
|
566
|
+
id: string,
|
567
|
+
// The Comment's signed global id
|
568
|
+
sgid: string,
|
569
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
570
|
+
type: string,
|
571
|
+
// The comment message
|
572
|
+
body: string,
|
573
|
+
// The creation date of the comment
|
574
|
+
createdAt: string,
|
575
|
+
// The comment's author
|
576
|
+
author: ( {
|
577
|
+
// The author's name
|
578
|
+
name: string,
|
579
|
+
// The author's avatar url
|
580
|
+
avatarUrl: string,
|
581
|
+
// Whether the author is verified or not
|
582
|
+
isVerified: boolean,
|
583
|
+
// Whether the author is a user or another kind of author (User Group)
|
584
|
+
isUser: boolean,
|
585
|
+
// Whether the author's account has been deleted or not
|
586
|
+
deleted: boolean,
|
587
|
+
} | {
|
588
|
+
// The author's name
|
589
|
+
name: string,
|
590
|
+
// The author's avatar url
|
591
|
+
avatarUrl: string,
|
592
|
+
// Whether the author is verified or not
|
593
|
+
isVerified: boolean,
|
594
|
+
// Whether the author is a user or another kind of author (User Group)
|
595
|
+
isUser: boolean,
|
596
|
+
// Whether the author's account has been deleted or not
|
597
|
+
deleted: boolean,
|
598
|
+
}
|
599
|
+
),
|
600
|
+
// Check if the commentable has comments
|
601
|
+
hasComments: boolean,
|
602
|
+
// Whether the object can have new comments or not
|
603
|
+
acceptsNewComments: boolean,
|
604
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
605
|
+
alignment: number | null,
|
606
|
+
// Check if the current user has reported the comment
|
607
|
+
alreadyReported: boolean,
|
608
|
+
// The number of comment's upVotes
|
609
|
+
upVotes: number,
|
610
|
+
// Check if the current user has upvoted the comment
|
611
|
+
upVoted: boolean,
|
612
|
+
// Check if the current user has downvoted the comment
|
613
|
+
downVoted: boolean,
|
614
|
+
// The number of comment's downVotes
|
615
|
+
downVotes: number,
|
616
|
+
comments: Array< {
|
617
|
+
// The Comment's unique ID
|
618
|
+
id: string,
|
619
|
+
// The Comment's signed global id
|
620
|
+
sgid: string,
|
621
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
622
|
+
type: string,
|
623
|
+
// The comment message
|
624
|
+
body: string,
|
625
|
+
// The creation date of the comment
|
626
|
+
createdAt: string,
|
627
|
+
// The comment's author
|
628
|
+
author: ( {
|
629
|
+
// The author's name
|
630
|
+
name: string,
|
631
|
+
// The author's avatar url
|
632
|
+
avatarUrl: string,
|
633
|
+
// Whether the author is verified or not
|
634
|
+
isVerified: boolean,
|
635
|
+
// Whether the author is a user or another kind of author (User Group)
|
636
|
+
isUser: boolean,
|
637
|
+
// Whether the author's account has been deleted or not
|
638
|
+
deleted: boolean,
|
639
|
+
} | {
|
640
|
+
// The author's name
|
641
|
+
name: string,
|
642
|
+
// The author's avatar url
|
643
|
+
avatarUrl: string,
|
644
|
+
// Whether the author is verified or not
|
645
|
+
isVerified: boolean,
|
646
|
+
// Whether the author is a user or another kind of author (User Group)
|
647
|
+
isUser: boolean,
|
648
|
+
// Whether the author's account has been deleted or not
|
649
|
+
deleted: boolean,
|
650
|
+
}
|
651
|
+
),
|
652
|
+
// Check if the commentable has comments
|
653
|
+
hasComments: boolean,
|
654
|
+
// Whether the object can have new comments or not
|
655
|
+
acceptsNewComments: boolean,
|
656
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
657
|
+
alignment: number | null,
|
658
|
+
// Check if the current user has reported the comment
|
659
|
+
alreadyReported: boolean,
|
660
|
+
// The number of comment's upVotes
|
661
|
+
upVotes: number,
|
662
|
+
// Check if the current user has upvoted the comment
|
663
|
+
upVoted: boolean,
|
664
|
+
// Check if the current user has downvoted the comment
|
665
|
+
downVoted: boolean,
|
666
|
+
// The number of comment's downVotes
|
667
|
+
downVotes: number,
|
668
|
+
} >,
|
669
|
+
} >,
|
670
|
+
} >,
|
671
|
+
},
|
672
|
+
} | null,
|
673
|
+
};
|
41
674
|
|
42
|
-
export
|
43
|
-
commentableId: string
|
44
|
-
commentableType: string
|
45
|
-
orderBy
|
46
|
-
}
|
675
|
+
export type GetCommentsQueryVariables = {
|
676
|
+
commentableId: string,
|
677
|
+
commentableType: string,
|
678
|
+
orderBy?: string | null,
|
679
|
+
};
|
47
680
|
|
48
|
-
export
|
681
|
+
export type GetCommentsQuery = {
|
49
682
|
// Return's information about the logged in user
|
50
|
-
session:
|
683
|
+
session: {
|
51
684
|
// The current user
|
52
|
-
user:
|
685
|
+
user: {
|
53
686
|
// The user's name
|
54
687
|
name: string,
|
55
688
|
// The user's avatar url
|
@@ -57,104 +690,756 @@ export interface GetCommentsQuery {
|
|
57
690
|
// The user's organization name
|
58
691
|
organizationName: string,
|
59
692
|
} | null,
|
60
|
-
|
61
|
-
|
693
|
+
// The current user verified user groups
|
694
|
+
verifiedUserGroups: Array< {
|
695
|
+
// The user group's id
|
696
|
+
id: string,
|
697
|
+
// The user group's name
|
698
|
+
name: string,
|
699
|
+
} >,
|
700
|
+
} | null,
|
701
|
+
commentable: {
|
62
702
|
// Whether the object can have new comments or not
|
63
703
|
acceptsNewComments: boolean,
|
64
704
|
// Whether the object comments have alignment or not
|
65
705
|
commentsHaveAlignment: boolean,
|
66
706
|
// Whether the object comments have votes or not
|
67
707
|
commentsHaveVotes: boolean,
|
68
|
-
comments:
|
708
|
+
comments: Array< {
|
69
709
|
// The Comment's unique ID
|
70
710
|
id: string,
|
711
|
+
// Check if the commentable has comments
|
712
|
+
hasComments: boolean,
|
713
|
+
// The Comment's signed global id
|
714
|
+
sgid: string,
|
715
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
716
|
+
type: string,
|
717
|
+
// The comment message
|
718
|
+
body: string,
|
719
|
+
// The creation date of the comment
|
720
|
+
createdAt: string,
|
721
|
+
// The comment's author
|
722
|
+
author: ( {
|
723
|
+
// The author's name
|
724
|
+
name: string,
|
725
|
+
// The author's avatar url
|
726
|
+
avatarUrl: string,
|
727
|
+
// Whether the author is verified or not
|
728
|
+
isVerified: boolean,
|
729
|
+
// Whether the author is a user or another kind of author (User Group)
|
730
|
+
isUser: boolean,
|
731
|
+
// Whether the author's account has been deleted or not
|
732
|
+
deleted: boolean,
|
733
|
+
} | {
|
734
|
+
// The author's name
|
735
|
+
name: string,
|
736
|
+
// The author's avatar url
|
737
|
+
avatarUrl: string,
|
738
|
+
// Whether the author is verified or not
|
739
|
+
isVerified: boolean,
|
740
|
+
// Whether the author is a user or another kind of author (User Group)
|
741
|
+
isUser: boolean,
|
742
|
+
// Whether the author's account has been deleted or not
|
743
|
+
deleted: boolean,
|
744
|
+
}
|
745
|
+
),
|
746
|
+
// Whether the object can have new comments or not
|
747
|
+
acceptsNewComments: boolean,
|
748
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
749
|
+
alignment: number | null,
|
750
|
+
// Check if the current user has reported the comment
|
751
|
+
alreadyReported: boolean,
|
752
|
+
// The number of comment's upVotes
|
753
|
+
upVotes: number,
|
754
|
+
// Check if the current user has upvoted the comment
|
755
|
+
upVoted: boolean,
|
756
|
+
// Check if the current user has downvoted the comment
|
757
|
+
downVoted: boolean,
|
758
|
+
// The number of comment's downVotes
|
759
|
+
downVotes: number,
|
760
|
+
comments: Array< {
|
761
|
+
// The Comment's unique ID
|
762
|
+
id: string,
|
763
|
+
// The Comment's signed global id
|
764
|
+
sgid: string,
|
765
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
766
|
+
type: string,
|
767
|
+
// The comment message
|
768
|
+
body: string,
|
769
|
+
// The creation date of the comment
|
770
|
+
createdAt: string,
|
771
|
+
// The comment's author
|
772
|
+
author: ( {
|
773
|
+
// The author's name
|
774
|
+
name: string,
|
775
|
+
// The author's avatar url
|
776
|
+
avatarUrl: string,
|
777
|
+
// Whether the author is verified or not
|
778
|
+
isVerified: boolean,
|
779
|
+
// Whether the author is a user or another kind of author (User Group)
|
780
|
+
isUser: boolean,
|
781
|
+
// Whether the author's account has been deleted or not
|
782
|
+
deleted: boolean,
|
783
|
+
} | {
|
784
|
+
// The author's name
|
785
|
+
name: string,
|
786
|
+
// The author's avatar url
|
787
|
+
avatarUrl: string,
|
788
|
+
// Whether the author is verified or not
|
789
|
+
isVerified: boolean,
|
790
|
+
// Whether the author is a user or another kind of author (User Group)
|
791
|
+
isUser: boolean,
|
792
|
+
// Whether the author's account has been deleted or not
|
793
|
+
deleted: boolean,
|
794
|
+
}
|
795
|
+
),
|
796
|
+
// Check if the commentable has comments
|
797
|
+
hasComments: boolean,
|
798
|
+
// Whether the object can have new comments or not
|
799
|
+
acceptsNewComments: boolean,
|
800
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
801
|
+
alignment: number | null,
|
802
|
+
// Check if the current user has reported the comment
|
803
|
+
alreadyReported: boolean,
|
804
|
+
// The number of comment's upVotes
|
805
|
+
upVotes: number,
|
806
|
+
// Check if the current user has upvoted the comment
|
807
|
+
upVoted: boolean,
|
808
|
+
// Check if the current user has downvoted the comment
|
809
|
+
downVoted: boolean,
|
810
|
+
// The number of comment's downVotes
|
811
|
+
downVotes: number,
|
812
|
+
comments: Array< {
|
813
|
+
// The Comment's unique ID
|
814
|
+
id: string,
|
815
|
+
// The Comment's signed global id
|
816
|
+
sgid: string,
|
817
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
818
|
+
type: string,
|
819
|
+
// The comment message
|
820
|
+
body: string,
|
821
|
+
// The creation date of the comment
|
822
|
+
createdAt: string,
|
823
|
+
// The comment's author
|
824
|
+
author: ( {
|
825
|
+
// The author's name
|
826
|
+
name: string,
|
827
|
+
// The author's avatar url
|
828
|
+
avatarUrl: string,
|
829
|
+
// Whether the author is verified or not
|
830
|
+
isVerified: boolean,
|
831
|
+
// Whether the author is a user or another kind of author (User Group)
|
832
|
+
isUser: boolean,
|
833
|
+
// Whether the author's account has been deleted or not
|
834
|
+
deleted: boolean,
|
835
|
+
} | {
|
836
|
+
// The author's name
|
837
|
+
name: string,
|
838
|
+
// The author's avatar url
|
839
|
+
avatarUrl: string,
|
840
|
+
// Whether the author is verified or not
|
841
|
+
isVerified: boolean,
|
842
|
+
// Whether the author is a user or another kind of author (User Group)
|
843
|
+
isUser: boolean,
|
844
|
+
// Whether the author's account has been deleted or not
|
845
|
+
deleted: boolean,
|
846
|
+
}
|
847
|
+
),
|
848
|
+
// Check if the commentable has comments
|
849
|
+
hasComments: boolean,
|
850
|
+
// Whether the object can have new comments or not
|
851
|
+
acceptsNewComments: boolean,
|
852
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
853
|
+
alignment: number | null,
|
854
|
+
// Check if the current user has reported the comment
|
855
|
+
alreadyReported: boolean,
|
856
|
+
// The number of comment's upVotes
|
857
|
+
upVotes: number,
|
858
|
+
// Check if the current user has upvoted the comment
|
859
|
+
upVoted: boolean,
|
860
|
+
// Check if the current user has downvoted the comment
|
861
|
+
downVoted: boolean,
|
862
|
+
// The number of comment's downVotes
|
863
|
+
downVotes: number,
|
864
|
+
comments: Array< {
|
865
|
+
// The Comment's unique ID
|
866
|
+
id: string,
|
867
|
+
// The Comment's signed global id
|
868
|
+
sgid: string,
|
869
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
870
|
+
type: string,
|
871
|
+
// The comment message
|
872
|
+
body: string,
|
873
|
+
// The creation date of the comment
|
874
|
+
createdAt: string,
|
875
|
+
// The comment's author
|
876
|
+
author: ( {
|
877
|
+
// The author's name
|
878
|
+
name: string,
|
879
|
+
// The author's avatar url
|
880
|
+
avatarUrl: string,
|
881
|
+
// Whether the author is verified or not
|
882
|
+
isVerified: boolean,
|
883
|
+
// Whether the author is a user or another kind of author (User Group)
|
884
|
+
isUser: boolean,
|
885
|
+
// Whether the author's account has been deleted or not
|
886
|
+
deleted: boolean,
|
887
|
+
} | {
|
888
|
+
// The author's name
|
889
|
+
name: string,
|
890
|
+
// The author's avatar url
|
891
|
+
avatarUrl: string,
|
892
|
+
// Whether the author is verified or not
|
893
|
+
isVerified: boolean,
|
894
|
+
// Whether the author is a user or another kind of author (User Group)
|
895
|
+
isUser: boolean,
|
896
|
+
// Whether the author's account has been deleted or not
|
897
|
+
deleted: boolean,
|
898
|
+
}
|
899
|
+
),
|
900
|
+
// Check if the commentable has comments
|
901
|
+
hasComments: boolean,
|
902
|
+
// Whether the object can have new comments or not
|
903
|
+
acceptsNewComments: boolean,
|
904
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
905
|
+
alignment: number | null,
|
906
|
+
// Check if the current user has reported the comment
|
907
|
+
alreadyReported: boolean,
|
908
|
+
// The number of comment's upVotes
|
909
|
+
upVotes: number,
|
910
|
+
// Check if the current user has upvoted the comment
|
911
|
+
upVoted: boolean,
|
912
|
+
// Check if the current user has downvoted the comment
|
913
|
+
downVoted: boolean,
|
914
|
+
// The number of comment's downVotes
|
915
|
+
downVotes: number,
|
916
|
+
} >,
|
917
|
+
} >,
|
918
|
+
} >,
|
71
919
|
} >,
|
72
|
-
|
73
|
-
|
920
|
+
// The commentable's ID
|
921
|
+
id: string,
|
922
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
923
|
+
type: string,
|
924
|
+
},
|
925
|
+
};
|
74
926
|
|
75
|
-
export
|
927
|
+
export type AddCommentFormCommentableFragment = {
|
76
928
|
// The commentable's ID
|
77
|
-
id: string
|
929
|
+
id: string,
|
78
930
|
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
79
|
-
type: string
|
80
|
-
}
|
931
|
+
type: string,
|
932
|
+
};
|
81
933
|
|
82
|
-
export
|
934
|
+
export type AddCommentFormSessionFragment = {
|
83
935
|
// The current user verified user groups
|
84
|
-
verifiedUserGroups:
|
936
|
+
verifiedUserGroups: Array< {
|
85
937
|
// The user group's id
|
86
938
|
id: string,
|
87
939
|
// The user group's name
|
88
940
|
name: string,
|
89
|
-
}
|
90
|
-
}
|
941
|
+
} >,
|
942
|
+
};
|
91
943
|
|
92
|
-
export
|
93
|
-
|
94
|
-
|
95
|
-
|
944
|
+
export type CommentFragment = {
|
945
|
+
// The Comment's unique ID
|
946
|
+
id: string,
|
947
|
+
// The Comment's signed global id
|
948
|
+
sgid: string,
|
949
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
950
|
+
type: string,
|
951
|
+
// The comment message
|
952
|
+
body: string,
|
953
|
+
// The creation date of the comment
|
954
|
+
createdAt: string,
|
955
|
+
// The comment's author
|
956
|
+
author: ( {
|
957
|
+
// The author's name
|
958
|
+
name: string,
|
959
|
+
// The author's avatar url
|
960
|
+
avatarUrl: string,
|
961
|
+
// Whether the author is verified or not
|
962
|
+
isVerified: boolean,
|
963
|
+
// Whether the author is a user or another kind of author (User Group)
|
964
|
+
isUser: boolean,
|
965
|
+
// Whether the author's account has been deleted or not
|
966
|
+
deleted: boolean,
|
967
|
+
} | {
|
968
|
+
// The author's name
|
969
|
+
name: string,
|
970
|
+
// The author's avatar url
|
971
|
+
avatarUrl: string,
|
972
|
+
// Whether the author is verified or not
|
973
|
+
isVerified: boolean,
|
974
|
+
// Whether the author is a user or another kind of author (User Group)
|
975
|
+
isUser: boolean,
|
976
|
+
// Whether the author's account has been deleted or not
|
977
|
+
deleted: boolean,
|
978
|
+
}
|
979
|
+
),
|
980
|
+
// Check if the commentable has comments
|
981
|
+
hasComments: boolean,
|
982
|
+
// Whether the object can have new comments or not
|
983
|
+
acceptsNewComments: boolean,
|
984
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
985
|
+
alignment: number | null,
|
986
|
+
// Check if the current user has reported the comment
|
987
|
+
alreadyReported: boolean,
|
988
|
+
// The number of comment's upVotes
|
989
|
+
upVotes: number,
|
990
|
+
// Check if the current user has upvoted the comment
|
991
|
+
upVoted: boolean,
|
992
|
+
// Check if the current user has downvoted the comment
|
993
|
+
downVoted: boolean,
|
994
|
+
// The number of comment's downVotes
|
995
|
+
downVotes: number,
|
996
|
+
comments: Array< {
|
997
|
+
// The Comment's unique ID
|
998
|
+
id: string,
|
999
|
+
// The Comment's signed global id
|
1000
|
+
sgid: string,
|
1001
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
1002
|
+
type: string,
|
1003
|
+
// The comment message
|
1004
|
+
body: string,
|
1005
|
+
// The creation date of the comment
|
1006
|
+
createdAt: string,
|
1007
|
+
// The comment's author
|
1008
|
+
author: ( {
|
1009
|
+
// The author's name
|
1010
|
+
name: string,
|
1011
|
+
// The author's avatar url
|
1012
|
+
avatarUrl: string,
|
1013
|
+
// Whether the author is verified or not
|
1014
|
+
isVerified: boolean,
|
1015
|
+
// Whether the author is a user or another kind of author (User Group)
|
1016
|
+
isUser: boolean,
|
1017
|
+
// Whether the author's account has been deleted or not
|
1018
|
+
deleted: boolean,
|
1019
|
+
} | {
|
1020
|
+
// The author's name
|
1021
|
+
name: string,
|
1022
|
+
// The author's avatar url
|
1023
|
+
avatarUrl: string,
|
1024
|
+
// Whether the author is verified or not
|
1025
|
+
isVerified: boolean,
|
1026
|
+
// Whether the author is a user or another kind of author (User Group)
|
1027
|
+
isUser: boolean,
|
1028
|
+
// Whether the author's account has been deleted or not
|
1029
|
+
deleted: boolean,
|
1030
|
+
}
|
1031
|
+
),
|
1032
|
+
// Check if the commentable has comments
|
1033
|
+
hasComments: boolean,
|
1034
|
+
// Whether the object can have new comments or not
|
1035
|
+
acceptsNewComments: boolean,
|
1036
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
1037
|
+
alignment: number | null,
|
1038
|
+
// Check if the current user has reported the comment
|
1039
|
+
alreadyReported: boolean,
|
1040
|
+
// The number of comment's upVotes
|
1041
|
+
upVotes: number,
|
1042
|
+
// Check if the current user has upvoted the comment
|
1043
|
+
upVoted: boolean,
|
1044
|
+
// Check if the current user has downvoted the comment
|
1045
|
+
downVoted: boolean,
|
1046
|
+
// The number of comment's downVotes
|
1047
|
+
downVotes: number,
|
1048
|
+
comments: Array< {
|
1049
|
+
// The Comment's unique ID
|
1050
|
+
id: string,
|
1051
|
+
// The Comment's signed global id
|
1052
|
+
sgid: string,
|
1053
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
1054
|
+
type: string,
|
1055
|
+
// The comment message
|
1056
|
+
body: string,
|
1057
|
+
// The creation date of the comment
|
1058
|
+
createdAt: string,
|
1059
|
+
// The comment's author
|
1060
|
+
author: ( {
|
1061
|
+
// The author's name
|
1062
|
+
name: string,
|
1063
|
+
// The author's avatar url
|
1064
|
+
avatarUrl: string,
|
1065
|
+
// Whether the author is verified or not
|
1066
|
+
isVerified: boolean,
|
1067
|
+
// Whether the author is a user or another kind of author (User Group)
|
1068
|
+
isUser: boolean,
|
1069
|
+
// Whether the author's account has been deleted or not
|
1070
|
+
deleted: boolean,
|
1071
|
+
} | {
|
1072
|
+
// The author's name
|
1073
|
+
name: string,
|
1074
|
+
// The author's avatar url
|
1075
|
+
avatarUrl: string,
|
1076
|
+
// Whether the author is verified or not
|
1077
|
+
isVerified: boolean,
|
1078
|
+
// Whether the author is a user or another kind of author (User Group)
|
1079
|
+
isUser: boolean,
|
1080
|
+
// Whether the author's account has been deleted or not
|
1081
|
+
deleted: boolean,
|
1082
|
+
}
|
1083
|
+
),
|
1084
|
+
// Check if the commentable has comments
|
1085
|
+
hasComments: boolean,
|
1086
|
+
// Whether the object can have new comments or not
|
1087
|
+
acceptsNewComments: boolean,
|
1088
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
1089
|
+
alignment: number | null,
|
1090
|
+
// Check if the current user has reported the comment
|
1091
|
+
alreadyReported: boolean,
|
1092
|
+
// The number of comment's upVotes
|
1093
|
+
upVotes: number,
|
1094
|
+
// Check if the current user has upvoted the comment
|
1095
|
+
upVoted: boolean,
|
1096
|
+
// Check if the current user has downvoted the comment
|
1097
|
+
downVoted: boolean,
|
1098
|
+
// The number of comment's downVotes
|
1099
|
+
downVotes: number,
|
1100
|
+
comments: Array< {
|
1101
|
+
// The Comment's unique ID
|
1102
|
+
id: string,
|
1103
|
+
// The Comment's signed global id
|
1104
|
+
sgid: string,
|
1105
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
1106
|
+
type: string,
|
1107
|
+
// The comment message
|
1108
|
+
body: string,
|
1109
|
+
// The creation date of the comment
|
1110
|
+
createdAt: string,
|
1111
|
+
// The comment's author
|
1112
|
+
author: ( {
|
1113
|
+
// The author's name
|
1114
|
+
name: string,
|
1115
|
+
// The author's avatar url
|
1116
|
+
avatarUrl: string,
|
1117
|
+
// Whether the author is verified or not
|
1118
|
+
isVerified: boolean,
|
1119
|
+
// Whether the author is a user or another kind of author (User Group)
|
1120
|
+
isUser: boolean,
|
1121
|
+
// Whether the author's account has been deleted or not
|
1122
|
+
deleted: boolean,
|
1123
|
+
} | {
|
1124
|
+
// The author's name
|
1125
|
+
name: string,
|
1126
|
+
// The author's avatar url
|
1127
|
+
avatarUrl: string,
|
1128
|
+
// Whether the author is verified or not
|
1129
|
+
isVerified: boolean,
|
1130
|
+
// Whether the author is a user or another kind of author (User Group)
|
1131
|
+
isUser: boolean,
|
1132
|
+
// Whether the author's account has been deleted or not
|
1133
|
+
deleted: boolean,
|
1134
|
+
}
|
1135
|
+
),
|
1136
|
+
// Check if the commentable has comments
|
1137
|
+
hasComments: boolean,
|
1138
|
+
// Whether the object can have new comments or not
|
1139
|
+
acceptsNewComments: boolean,
|
1140
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
1141
|
+
alignment: number | null,
|
1142
|
+
// Check if the current user has reported the comment
|
1143
|
+
alreadyReported: boolean,
|
1144
|
+
// The number of comment's upVotes
|
1145
|
+
upVotes: number,
|
1146
|
+
// Check if the current user has upvoted the comment
|
1147
|
+
upVoted: boolean,
|
1148
|
+
// Check if the current user has downvoted the comment
|
1149
|
+
downVoted: boolean,
|
1150
|
+
// The number of comment's downVotes
|
1151
|
+
downVotes: number,
|
1152
|
+
} >,
|
96
1153
|
} >,
|
97
|
-
}
|
98
|
-
}
|
1154
|
+
} >,
|
1155
|
+
};
|
99
1156
|
|
100
|
-
export
|
1157
|
+
export type CommentDataFragment = {
|
101
1158
|
// The Comment's unique ID
|
102
|
-
id: string
|
1159
|
+
id: string,
|
103
1160
|
// The Comment's signed global id
|
104
|
-
sgid: string
|
1161
|
+
sgid: string,
|
105
1162
|
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
106
|
-
type: string
|
1163
|
+
type: string,
|
107
1164
|
// The comment message
|
108
|
-
body: string
|
1165
|
+
body: string,
|
109
1166
|
// The creation date of the comment
|
110
|
-
createdAt: string
|
1167
|
+
createdAt: string,
|
111
1168
|
// The comment's author
|
112
|
-
author: {
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
1169
|
+
author: ( {
|
1170
|
+
// The author's name
|
1171
|
+
name: string,
|
1172
|
+
// The author's avatar url
|
1173
|
+
avatarUrl: string,
|
1174
|
+
// Whether the author is verified or not
|
1175
|
+
isVerified: boolean,
|
1176
|
+
// Whether the author is a user or another kind of author (User Group)
|
1177
|
+
isUser: boolean,
|
1178
|
+
// Whether the author's account has been deleted or not
|
1179
|
+
deleted: boolean,
|
1180
|
+
} | {
|
1181
|
+
// The author's name
|
1182
|
+
name: string,
|
1183
|
+
// The author's avatar url
|
1184
|
+
avatarUrl: string,
|
1185
|
+
// Whether the author is verified or not
|
1186
|
+
isVerified: boolean,
|
1187
|
+
// Whether the author is a user or another kind of author (User Group)
|
1188
|
+
isUser: boolean,
|
1189
|
+
// Whether the author's account has been deleted or not
|
1190
|
+
deleted: boolean,
|
1191
|
+
}
|
1192
|
+
),
|
124
1193
|
// Check if the commentable has comments
|
125
|
-
hasComments: boolean
|
1194
|
+
hasComments: boolean,
|
126
1195
|
// Whether the object can have new comments or not
|
127
|
-
acceptsNewComments: boolean
|
1196
|
+
acceptsNewComments: boolean,
|
128
1197
|
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
129
|
-
alignment: number | null
|
1198
|
+
alignment: number | null,
|
130
1199
|
// Check if the current user has reported the comment
|
131
|
-
alreadyReported: boolean
|
132
|
-
|
1200
|
+
alreadyReported: boolean,
|
1201
|
+
// The number of comment's upVotes
|
1202
|
+
upVotes: number,
|
1203
|
+
// Check if the current user has upvoted the comment
|
1204
|
+
upVoted: boolean,
|
1205
|
+
// Check if the current user has downvoted the comment
|
1206
|
+
downVoted: boolean,
|
1207
|
+
// The number of comment's downVotes
|
1208
|
+
downVotes: number,
|
1209
|
+
};
|
133
1210
|
|
134
|
-
export
|
1211
|
+
export type CommentThreadFragment = {
|
135
1212
|
// Check if the commentable has comments
|
136
|
-
hasComments: boolean
|
137
|
-
|
1213
|
+
hasComments: boolean,
|
1214
|
+
// The Comment's unique ID
|
1215
|
+
id: string,
|
1216
|
+
// The Comment's signed global id
|
1217
|
+
sgid: string,
|
1218
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
1219
|
+
type: string,
|
1220
|
+
// The comment message
|
1221
|
+
body: string,
|
1222
|
+
// The creation date of the comment
|
1223
|
+
createdAt: string,
|
1224
|
+
// The comment's author
|
1225
|
+
author: ( {
|
1226
|
+
// The author's name
|
1227
|
+
name: string,
|
1228
|
+
// The author's avatar url
|
1229
|
+
avatarUrl: string,
|
1230
|
+
// Whether the author is verified or not
|
1231
|
+
isVerified: boolean,
|
1232
|
+
// Whether the author is a user or another kind of author (User Group)
|
1233
|
+
isUser: boolean,
|
1234
|
+
// Whether the author's account has been deleted or not
|
1235
|
+
deleted: boolean,
|
1236
|
+
} | {
|
1237
|
+
// The author's name
|
1238
|
+
name: string,
|
1239
|
+
// The author's avatar url
|
1240
|
+
avatarUrl: string,
|
1241
|
+
// Whether the author is verified or not
|
1242
|
+
isVerified: boolean,
|
1243
|
+
// Whether the author is a user or another kind of author (User Group)
|
1244
|
+
isUser: boolean,
|
1245
|
+
// Whether the author's account has been deleted or not
|
1246
|
+
deleted: boolean,
|
1247
|
+
}
|
1248
|
+
),
|
1249
|
+
// Whether the object can have new comments or not
|
1250
|
+
acceptsNewComments: boolean,
|
1251
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
1252
|
+
alignment: number | null,
|
1253
|
+
// Check if the current user has reported the comment
|
1254
|
+
alreadyReported: boolean,
|
1255
|
+
// The number of comment's upVotes
|
1256
|
+
upVotes: number,
|
1257
|
+
// Check if the current user has upvoted the comment
|
1258
|
+
upVoted: boolean,
|
1259
|
+
// Check if the current user has downvoted the comment
|
1260
|
+
downVoted: boolean,
|
1261
|
+
// The number of comment's downVotes
|
1262
|
+
downVotes: number,
|
1263
|
+
comments: Array< {
|
1264
|
+
// The Comment's unique ID
|
1265
|
+
id: string,
|
1266
|
+
// The Comment's signed global id
|
1267
|
+
sgid: string,
|
1268
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
1269
|
+
type: string,
|
1270
|
+
// The comment message
|
1271
|
+
body: string,
|
1272
|
+
// The creation date of the comment
|
1273
|
+
createdAt: string,
|
1274
|
+
// The comment's author
|
1275
|
+
author: ( {
|
1276
|
+
// The author's name
|
1277
|
+
name: string,
|
1278
|
+
// The author's avatar url
|
1279
|
+
avatarUrl: string,
|
1280
|
+
// Whether the author is verified or not
|
1281
|
+
isVerified: boolean,
|
1282
|
+
// Whether the author is a user or another kind of author (User Group)
|
1283
|
+
isUser: boolean,
|
1284
|
+
// Whether the author's account has been deleted or not
|
1285
|
+
deleted: boolean,
|
1286
|
+
} | {
|
1287
|
+
// The author's name
|
1288
|
+
name: string,
|
1289
|
+
// The author's avatar url
|
1290
|
+
avatarUrl: string,
|
1291
|
+
// Whether the author is verified or not
|
1292
|
+
isVerified: boolean,
|
1293
|
+
// Whether the author is a user or another kind of author (User Group)
|
1294
|
+
isUser: boolean,
|
1295
|
+
// Whether the author's account has been deleted or not
|
1296
|
+
deleted: boolean,
|
1297
|
+
}
|
1298
|
+
),
|
1299
|
+
// Check if the commentable has comments
|
1300
|
+
hasComments: boolean,
|
1301
|
+
// Whether the object can have new comments or not
|
1302
|
+
acceptsNewComments: boolean,
|
1303
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
1304
|
+
alignment: number | null,
|
1305
|
+
// Check if the current user has reported the comment
|
1306
|
+
alreadyReported: boolean,
|
1307
|
+
// The number of comment's upVotes
|
1308
|
+
upVotes: number,
|
1309
|
+
// Check if the current user has upvoted the comment
|
1310
|
+
upVoted: boolean,
|
1311
|
+
// Check if the current user has downvoted the comment
|
1312
|
+
downVoted: boolean,
|
1313
|
+
// The number of comment's downVotes
|
1314
|
+
downVotes: number,
|
1315
|
+
comments: Array< {
|
1316
|
+
// The Comment's unique ID
|
1317
|
+
id: string,
|
1318
|
+
// The Comment's signed global id
|
1319
|
+
sgid: string,
|
1320
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
1321
|
+
type: string,
|
1322
|
+
// The comment message
|
1323
|
+
body: string,
|
1324
|
+
// The creation date of the comment
|
1325
|
+
createdAt: string,
|
1326
|
+
// The comment's author
|
1327
|
+
author: ( {
|
1328
|
+
// The author's name
|
1329
|
+
name: string,
|
1330
|
+
// The author's avatar url
|
1331
|
+
avatarUrl: string,
|
1332
|
+
// Whether the author is verified or not
|
1333
|
+
isVerified: boolean,
|
1334
|
+
// Whether the author is a user or another kind of author (User Group)
|
1335
|
+
isUser: boolean,
|
1336
|
+
// Whether the author's account has been deleted or not
|
1337
|
+
deleted: boolean,
|
1338
|
+
} | {
|
1339
|
+
// The author's name
|
1340
|
+
name: string,
|
1341
|
+
// The author's avatar url
|
1342
|
+
avatarUrl: string,
|
1343
|
+
// Whether the author is verified or not
|
1344
|
+
isVerified: boolean,
|
1345
|
+
// Whether the author is a user or another kind of author (User Group)
|
1346
|
+
isUser: boolean,
|
1347
|
+
// Whether the author's account has been deleted or not
|
1348
|
+
deleted: boolean,
|
1349
|
+
}
|
1350
|
+
),
|
1351
|
+
// Check if the commentable has comments
|
1352
|
+
hasComments: boolean,
|
1353
|
+
// Whether the object can have new comments or not
|
1354
|
+
acceptsNewComments: boolean,
|
1355
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
1356
|
+
alignment: number | null,
|
1357
|
+
// Check if the current user has reported the comment
|
1358
|
+
alreadyReported: boolean,
|
1359
|
+
// The number of comment's upVotes
|
1360
|
+
upVotes: number,
|
1361
|
+
// Check if the current user has upvoted the comment
|
1362
|
+
upVoted: boolean,
|
1363
|
+
// Check if the current user has downvoted the comment
|
1364
|
+
downVoted: boolean,
|
1365
|
+
// The number of comment's downVotes
|
1366
|
+
downVotes: number,
|
1367
|
+
comments: Array< {
|
1368
|
+
// The Comment's unique ID
|
1369
|
+
id: string,
|
1370
|
+
// The Comment's signed global id
|
1371
|
+
sgid: string,
|
1372
|
+
// The commentable's class name. i.e. `Decidim::ParticipatoryProcess`
|
1373
|
+
type: string,
|
1374
|
+
// The comment message
|
1375
|
+
body: string,
|
1376
|
+
// The creation date of the comment
|
1377
|
+
createdAt: string,
|
1378
|
+
// The comment's author
|
1379
|
+
author: ( {
|
1380
|
+
// The author's name
|
1381
|
+
name: string,
|
1382
|
+
// The author's avatar url
|
1383
|
+
avatarUrl: string,
|
1384
|
+
// Whether the author is verified or not
|
1385
|
+
isVerified: boolean,
|
1386
|
+
// Whether the author is a user or another kind of author (User Group)
|
1387
|
+
isUser: boolean,
|
1388
|
+
// Whether the author's account has been deleted or not
|
1389
|
+
deleted: boolean,
|
1390
|
+
} | {
|
1391
|
+
// The author's name
|
1392
|
+
name: string,
|
1393
|
+
// The author's avatar url
|
1394
|
+
avatarUrl: string,
|
1395
|
+
// Whether the author is verified or not
|
1396
|
+
isVerified: boolean,
|
1397
|
+
// Whether the author is a user or another kind of author (User Group)
|
1398
|
+
isUser: boolean,
|
1399
|
+
// Whether the author's account has been deleted or not
|
1400
|
+
deleted: boolean,
|
1401
|
+
}
|
1402
|
+
),
|
1403
|
+
// Check if the commentable has comments
|
1404
|
+
hasComments: boolean,
|
1405
|
+
// Whether the object can have new comments or not
|
1406
|
+
acceptsNewComments: boolean,
|
1407
|
+
// The comment's alignment. Can be 0 (neutral), 1 (in favor) or -1 (against)'
|
1408
|
+
alignment: number | null,
|
1409
|
+
// Check if the current user has reported the comment
|
1410
|
+
alreadyReported: boolean,
|
1411
|
+
// The number of comment's upVotes
|
1412
|
+
upVotes: number,
|
1413
|
+
// Check if the current user has upvoted the comment
|
1414
|
+
upVoted: boolean,
|
1415
|
+
// Check if the current user has downvoted the comment
|
1416
|
+
downVoted: boolean,
|
1417
|
+
// The number of comment's downVotes
|
1418
|
+
downVotes: number,
|
1419
|
+
} >,
|
1420
|
+
} >,
|
1421
|
+
} >,
|
1422
|
+
};
|
138
1423
|
|
139
|
-
export
|
1424
|
+
export type DownVoteButtonFragment = {
|
140
1425
|
// The Comment's unique ID
|
141
|
-
id: string
|
1426
|
+
id: string,
|
142
1427
|
// The number of comment's downVotes
|
143
|
-
downVotes: number
|
1428
|
+
downVotes: number,
|
144
1429
|
// Check if the current user has downvoted the comment
|
145
|
-
downVoted: boolean
|
1430
|
+
downVoted: boolean,
|
146
1431
|
// Check if the current user has upvoted the comment
|
147
|
-
upVoted: boolean
|
148
|
-
}
|
1432
|
+
upVoted: boolean,
|
1433
|
+
};
|
149
1434
|
|
150
|
-
export
|
1435
|
+
export type UpVoteButtonFragment = {
|
151
1436
|
// The Comment's unique ID
|
152
|
-
id: string
|
1437
|
+
id: string,
|
153
1438
|
// The number of comment's upVotes
|
154
|
-
upVotes: number
|
1439
|
+
upVotes: number,
|
155
1440
|
// Check if the current user has upvoted the comment
|
156
|
-
upVoted: boolean
|
1441
|
+
upVoted: boolean,
|
157
1442
|
// Check if the current user has downvoted the comment
|
158
|
-
downVoted: boolean
|
159
|
-
}
|
1443
|
+
downVoted: boolean,
|
1444
|
+
};
|
160
1445
|
/* tslint:enable */
|