decidim 0.31.5 → 0.32.0.rc2
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/decidim-core/lib/decidim/shakapacker/runner.rb +4 -4
- data/decidim-core/lib/decidim/shakapacker/shakapacker.yml +28 -3
- data/decidim.gemspec +21 -24
- data/docs/antora.yml +1 -1
- data/docs/modules/configure/pages/environment_variables.adoc +4 -26
- data/docs/modules/customize/pages/logic.adoc +31 -0
- data/docs/modules/develop/assets/images/maintainers-backports-checker.png +0 -0
- data/docs/modules/develop/pages/api/authentication.adoc +95 -0
- data/docs/modules/develop/pages/api/core-concepts.adoc +535 -0
- data/docs/modules/develop/pages/api/index.adoc +83 -0
- data/docs/modules/develop/pages/api/reference/components/debates/close.adoc +48 -0
- data/docs/modules/develop/pages/api/reference/components/debates/create.adoc +58 -0
- data/docs/modules/develop/pages/api/reference/components/debates/update.adoc +63 -0
- data/docs/modules/develop/pages/api/reference/components/debates.adoc +9 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/close.adoc +48 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/create.adoc +108 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/update.adoc +95 -0
- data/docs/modules/develop/pages/api/reference/components/meetings/withdraw.adoc +36 -0
- data/docs/modules/develop/pages/api/reference/components/meetings.adoc +10 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/answer.adoc +82 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/create.adoc +78 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/update.adoc +66 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/vote.adoc +73 -0
- data/docs/modules/develop/pages/api/reference/components/proposals/withdraw.adoc +38 -0
- data/docs/modules/develop/pages/api/reference/components/proposals.adoc +14 -0
- data/docs/modules/develop/pages/api/reference/errors/attribute_validation_error.adoc +38 -0
- data/docs/modules/develop/pages/api/reference/errors/introspection_disabled_error.adoc +19 -0
- data/docs/modules/develop/pages/api/reference/errors/invalid_locale_error.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/locale_error.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/not_found.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/permission_not_set.adoc +46 -0
- data/docs/modules/develop/pages/api/reference/errors/recursion_limit_exceeded_error.adoc +19 -0
- data/docs/modules/develop/pages/api/reference/errors/too_many_aliases_error.adoc +23 -0
- data/docs/modules/develop/pages/api/reference/errors/unauthorized_field.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/unauthorized_mutation.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/unauthorized_object.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors/validation_error.adoc +30 -0
- data/docs/modules/develop/pages/api/reference/errors.adoc +29 -0
- data/docs/modules/develop/pages/backports.adoc +100 -19
- data/docs/modules/develop/pages/c4_component.adoc +0 -3
- data/docs/modules/develop/pages/classes/models.adoc +0 -1
- data/docs/modules/develop/pages/components.adoc +67 -1
- data/docs/modules/develop/pages/machine_translations.adoc +1 -1
- data/docs/modules/develop/pages/maintainers/releases.adoc +34 -21
- data/docs/modules/develop/pages/maintainers/security.adoc +15 -1
- data/docs/modules/develop/partials/api/decidim_version.adoc +102 -0
- data/docs/modules/install/pages/manual.adoc +4 -3
- data/docs/modules/install/pages/update.adoc +7 -24
- data/docs/modules/install/partials/version_matrix.adoc +4 -8
- data/docs/modules/services/pages/activestorage.adoc +40 -0
- data/docs/modules/services/pages/aitools.adoc +0 -1
- data/docs/modules/services/pages/index.adoc +1 -0
- data/docs/modules/services/pages/machine_translation.adoc +139 -2
- data/docs/modules/services/pages/maps.adoc +42 -0
- data/lib/decidim/gem_manager.rb +16 -2
- data/lib/decidim/version.rb +1 -1
- data/lib/decidim.rb +0 -1
- data/package-lock.json +21945 -12726
- data/package.json +5 -4
- data/packages/browserslist-config/package.json +1 -1
- data/packages/core/package.json +28 -28
- data/packages/dev/package.json +2 -2
- data/packages/eslint-config/package.json +1 -1
- data/packages/prettier-config/package.json +1 -1
- data/packages/stylelint-config/package.json +1 -1
- data/packages/webpacker/package.json +12 -12
- data/packages/webpacker/src/override-config.js +1 -1
- metadata +73 -58
- data/docs/modules/develop/pages/api.adoc +0 -21
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
= Create Debate
|
|
2
|
+
== Input attributes
|
|
3
|
+
|
|
4
|
+
When you want to add or create data in your debates component, you need to rely on the `DebateAttributes` type, which has the following input fields:
|
|
5
|
+
|
|
6
|
+
[source]
|
|
7
|
+
----
|
|
8
|
+
• title (required) - String
|
|
9
|
+
• description (required) - String
|
|
10
|
+
• taxonomies (optional) - Taxonomy ids to assign to this debate
|
|
11
|
+
----
|
|
12
|
+
|
|
13
|
+
== Sample request
|
|
14
|
+
|
|
15
|
+
The `CreateDebate` mutation allows authenticated users to create new debates in a Decidim debates component. This mutation uses the existing `CreateDebate` command from the controller.
|
|
16
|
+
|
|
17
|
+
[source,graphql]
|
|
18
|
+
----
|
|
19
|
+
mutation createDebate($componentId: ID!, $input: CreateDebateInput!){
|
|
20
|
+
component(id: $componentId) {
|
|
21
|
+
...on DebatesMutation{
|
|
22
|
+
createDebate(input: $input) {
|
|
23
|
+
id
|
|
24
|
+
title { translation(locale: "en") }
|
|
25
|
+
description { translation(locale: "en") }
|
|
26
|
+
taxonomies {
|
|
27
|
+
name { translation(locale: "en") }
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
----
|
|
34
|
+
|
|
35
|
+
Example of submitted variables
|
|
36
|
+
|
|
37
|
+
[source,json]
|
|
38
|
+
----
|
|
39
|
+
{
|
|
40
|
+
"componentId": 5,
|
|
41
|
+
"input": {
|
|
42
|
+
"locale": "en",
|
|
43
|
+
"attributes": {
|
|
44
|
+
"description": "Cities need more people, not more cars",
|
|
45
|
+
"taxonomies": [11],
|
|
46
|
+
"title": "More sidewalks and less roads"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
----
|
|
51
|
+
|
|
52
|
+
== Error Handling
|
|
53
|
+
|
|
54
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
55
|
+
|
|
56
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
57
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
58
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
= Update Debate
|
|
2
|
+
|
|
3
|
+
== Input attributes
|
|
4
|
+
|
|
5
|
+
When you want to update data in your debates component, you need to rely on the `DebateAttributes` type, which has the following input fields:
|
|
6
|
+
|
|
7
|
+
[source]
|
|
8
|
+
----
|
|
9
|
+
• title (required) - String
|
|
10
|
+
• description (required) - String
|
|
11
|
+
• taxonomies (optional) - Taxonomy ids to assign to this debate
|
|
12
|
+
----
|
|
13
|
+
|
|
14
|
+
== Sample request
|
|
15
|
+
|
|
16
|
+
The `UpdateDebate` mutation allows authenticated users to update debates in a Decidim debates component. This mutation uses the existing `UpdateDebate` command from the controller.
|
|
17
|
+
|
|
18
|
+
[source,graphql]
|
|
19
|
+
----
|
|
20
|
+
mutation updateDebate($componentId: ID!,$debateId: ID!, $input: UpdateDebateInput!){
|
|
21
|
+
component(id: $componentId) {
|
|
22
|
+
...on DebatesMutation{
|
|
23
|
+
debate(id: $debateId){
|
|
24
|
+
update(input: $input) {
|
|
25
|
+
id
|
|
26
|
+
title { translation(locale: "en") }
|
|
27
|
+
description { translation(locale: "en") }
|
|
28
|
+
taxonomies {
|
|
29
|
+
name { translation(locale: "en") }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
----
|
|
37
|
+
|
|
38
|
+
Example of submitted variables
|
|
39
|
+
|
|
40
|
+
[source,json]
|
|
41
|
+
----
|
|
42
|
+
{
|
|
43
|
+
"componentId": "5",
|
|
44
|
+
"debateId": "9",
|
|
45
|
+
"input": {
|
|
46
|
+
"locale": "en",
|
|
47
|
+
"attributes": {
|
|
48
|
+
"description": "Cities need more people, not more cars",
|
|
49
|
+
"taxonomies": [11],
|
|
50
|
+
"title": "More sidewalks and less roads"
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
----
|
|
55
|
+
|
|
56
|
+
== Error Handling
|
|
57
|
+
|
|
58
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
59
|
+
|
|
60
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
61
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
62
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
63
|
+
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
= Debates
|
|
2
|
+
|
|
3
|
+
In the debates module we are providing a few mutations that we find useful for day-to-day management of Decidim instance outside the admin.
|
|
4
|
+
|
|
5
|
+
== For user/participants roles
|
|
6
|
+
|
|
7
|
+
* xref:develop:api/reference/components/debates/create.adoc[Create Debate]
|
|
8
|
+
* xref:develop:api/reference/components/debates/update.adoc[Update Debate]
|
|
9
|
+
* xref:develop:api/reference/components/debates/close.adoc[Close Debate]
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
= Close Meeting
|
|
2
|
+
|
|
3
|
+
To use the API to close any meeting that the user is authorized to close, you will need to use the following API request.
|
|
4
|
+
|
|
5
|
+
[source,graphql]
|
|
6
|
+
----
|
|
7
|
+
mutation closeMeeting($componentId: ID!, $meetingId: ID!, $input: CloseMeetingInput!){
|
|
8
|
+
component(id: $componentId) {
|
|
9
|
+
...on MeetingsMutation{
|
|
10
|
+
meeting(id: $meetingId) {
|
|
11
|
+
close(input: $input) {
|
|
12
|
+
id
|
|
13
|
+
closed
|
|
14
|
+
attendeesCount
|
|
15
|
+
closingReport { translation(locale: "en") }
|
|
16
|
+
closedAt
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
----
|
|
23
|
+
|
|
24
|
+
Example of submitted variables
|
|
25
|
+
|
|
26
|
+
[source,json]
|
|
27
|
+
----
|
|
28
|
+
{
|
|
29
|
+
"componentId": "9",
|
|
30
|
+
"meetingId": "2",
|
|
31
|
+
"input": {
|
|
32
|
+
"locale": "en",
|
|
33
|
+
"attributes": {
|
|
34
|
+
"closingReport": "Your closing report",
|
|
35
|
+
"attendeesCount": 12,
|
|
36
|
+
"proposalIds": ["1","2","3"]
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
----
|
|
41
|
+
|
|
42
|
+
== Error Handling
|
|
43
|
+
|
|
44
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
45
|
+
|
|
46
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
47
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
48
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
= Create Meeting
|
|
2
|
+
|
|
3
|
+
== Input attributes
|
|
4
|
+
|
|
5
|
+
When you want to add or create data in your meetings component, you need to rely on the `MeetingAttributes` type, which has the following input fields:
|
|
6
|
+
|
|
7
|
+
[source]
|
|
8
|
+
----
|
|
9
|
+
• address (optional) - String
|
|
10
|
+
• available_slots (optional) - Int
|
|
11
|
+
• title (required) - String
|
|
12
|
+
• description (required) - String
|
|
13
|
+
• end_time (required) - DateTime
|
|
14
|
+
• latitude (optional) - coordinate
|
|
15
|
+
• longitude (optional) - coordinate
|
|
16
|
+
• location_hints (optional) - String
|
|
17
|
+
• location (optional) - String
|
|
18
|
+
• online_meeting_url (optional) - String
|
|
19
|
+
• registration_terms (optional) - String
|
|
20
|
+
• registration_type (required) - RegistrationTypeType
|
|
21
|
+
• registration_url (optional) - String
|
|
22
|
+
• registrations_enabled (optional) - Boolean
|
|
23
|
+
• start_time (required) - DateTime
|
|
24
|
+
• taxonomies (optional) - Taxonomy ids to assign to this meeting
|
|
25
|
+
• type_of_meeting (required) - TypeOfMeeting
|
|
26
|
+
----
|
|
27
|
+
|
|
28
|
+
You may want to check the following input types:
|
|
29
|
+
|
|
30
|
+
* http://nightly.decidim.org/api/docs/enum/typeofmeetingenum/[TypeOfMeetingEnum]
|
|
31
|
+
* http://nightly.decidim.org/api/docs/enum/registrationtypeenum/[RegistrationTypeEnum]
|
|
32
|
+
* http://nightly.decidim.org/api/docs/enum/iframeembedtypeenum/[IframeEmbedTypeEnum]
|
|
33
|
+
* http://nightly.decidim.org/api/docs/enum/iframeaccesslevelenum/[IframeAccessLevelEnum]
|
|
34
|
+
|
|
35
|
+
== Sample request
|
|
36
|
+
|
|
37
|
+
The `CreateMeeting` mutation allows authenticated users to create new meetings in a Decidim meetings component. This mutation uses the existing `CreateMeeting` command from the controller.
|
|
38
|
+
|
|
39
|
+
[source,graphql]
|
|
40
|
+
----
|
|
41
|
+
mutation createMeeting($componentId: ID!, $input: CreateMeetingInput!){
|
|
42
|
+
component(id: $componentId) {
|
|
43
|
+
...on MeetingsMutation{
|
|
44
|
+
createMeeting(input: $input) {
|
|
45
|
+
id
|
|
46
|
+
title {
|
|
47
|
+
translation(locale: "en")
|
|
48
|
+
}
|
|
49
|
+
description {
|
|
50
|
+
translation(locale: "en")
|
|
51
|
+
}
|
|
52
|
+
address
|
|
53
|
+
taxonomies{
|
|
54
|
+
name {
|
|
55
|
+
translation(locale: "en")
|
|
56
|
+
}
|
|
57
|
+
children{
|
|
58
|
+
name{
|
|
59
|
+
translation(locale: "en")
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
----
|
|
68
|
+
|
|
69
|
+
Example of submitted variables
|
|
70
|
+
|
|
71
|
+
[source,json]
|
|
72
|
+
----
|
|
73
|
+
{
|
|
74
|
+
"componentId": 670,
|
|
75
|
+
"input": {
|
|
76
|
+
"locale": "en",
|
|
77
|
+
"attributes": {
|
|
78
|
+
"address": "Carrer de la Pau, 1, Barcelona",
|
|
79
|
+
"availableSlots": 10,
|
|
80
|
+
"description": "Cities need more people, not more cars",
|
|
81
|
+
"endTime": "2025-12-24T22:10:22Z",
|
|
82
|
+
"iframeAccessLevel": "ALL",
|
|
83
|
+
"iframeEmbedType": "NONE",
|
|
84
|
+
"latitude": 40.1234,
|
|
85
|
+
"location": "Somewhere",
|
|
86
|
+
"locationHints": "Near the main square",
|
|
87
|
+
"longitude": 2.1234,
|
|
88
|
+
"onlineMeetingUrl": "https://meets.example.org/abc-def",
|
|
89
|
+
"registrationTerms": "By registering you agree to the terms and conditions",
|
|
90
|
+
"registrationType": "ON_THIS_PLATFORM",
|
|
91
|
+
"registrationUrl": "https://example.org/register",
|
|
92
|
+
"registrationsEnabled": true,
|
|
93
|
+
"startTime": "2025-12-24T20:10:22Z",
|
|
94
|
+
"taxonomies": [1072],
|
|
95
|
+
"title": "More sidewalks and less roads",
|
|
96
|
+
"typeOfMeeting": "ONLINE"
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
----
|
|
101
|
+
|
|
102
|
+
== Error Handling
|
|
103
|
+
|
|
104
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
105
|
+
|
|
106
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
107
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
108
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
= Update Meeting
|
|
2
|
+
|
|
3
|
+
== Input attributes
|
|
4
|
+
|
|
5
|
+
When you want to update your meetings component, you need to rely on the `MeetingAttributes` type, which has the following input fields:
|
|
6
|
+
|
|
7
|
+
[source]
|
|
8
|
+
----
|
|
9
|
+
• address (optional) - String
|
|
10
|
+
• available_slots (optional) - Int
|
|
11
|
+
• description (required) - String
|
|
12
|
+
• end_time (required) - DateTime
|
|
13
|
+
• latitude (optional) - coordinate
|
|
14
|
+
• longitude (optional) - coordinate
|
|
15
|
+
• location_hints (optional) - String
|
|
16
|
+
• location (optional) - String
|
|
17
|
+
• online_meeting_url (optional) - String
|
|
18
|
+
• registration_terms (optional) - String
|
|
19
|
+
• registration_type (required) - RegistrationTypeType
|
|
20
|
+
• registration_url (optional) - String
|
|
21
|
+
• registrations_enabled (optional) - Boolean
|
|
22
|
+
• start_time (required) - DateTime
|
|
23
|
+
• taxonomies (optional) - Taxonomy ids to assign to this meeting
|
|
24
|
+
• title (required) - String
|
|
25
|
+
• type_of_meeting (required) - TypeOfMeeting
|
|
26
|
+
----
|
|
27
|
+
|
|
28
|
+
You may want to check the following input types:
|
|
29
|
+
|
|
30
|
+
* http://nightly.decidim.org/api/docs/enum/typeofmeetingenum/[TypeOfMeetingEnum]
|
|
31
|
+
* http://nightly.decidim.org/api/docs/enum/registrationtypeenum/[RegistrationTypeEnum]
|
|
32
|
+
* http://nightly.decidim.org/api/docs/enum/iframeembedtypeenum/[IframeEmbedTypeEnum]
|
|
33
|
+
* http://nightly.decidim.org/api/docs/enum/iframeaccesslevelenum/[IframeAccessLevelEnum]
|
|
34
|
+
|
|
35
|
+
== Sample request
|
|
36
|
+
|
|
37
|
+
The `UpdateMeeting` mutation allows authenticated users to update meetings in a Decidim meetings component. This mutation uses the existing `UpdateMeeting` command from the controller.
|
|
38
|
+
|
|
39
|
+
[source,graphql]
|
|
40
|
+
----
|
|
41
|
+
mutation updateMeeting($componentId: ID!, $meetingId: ID!, $input: UpdateMeetingInput!){
|
|
42
|
+
component(id: $componentId) {
|
|
43
|
+
...on MeetingsMutation{
|
|
44
|
+
meeting(id: $meetingId) {
|
|
45
|
+
update(input: $input) {
|
|
46
|
+
id
|
|
47
|
+
title { translation(locale: "en") }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
----
|
|
54
|
+
|
|
55
|
+
Example of submitted variables
|
|
56
|
+
|
|
57
|
+
[source,json]
|
|
58
|
+
----
|
|
59
|
+
{
|
|
60
|
+
"componentId": 670,
|
|
61
|
+
"meetingId": "2",
|
|
62
|
+
"input": {
|
|
63
|
+
"locale": "en",
|
|
64
|
+
"attributes": {
|
|
65
|
+
"address": "Carrer de la Pau, 1, Barcelona",
|
|
66
|
+
"availableSlots": 10,
|
|
67
|
+
"description": "Cities need more people, not more cars",
|
|
68
|
+
"endTime": "2025-12-24T22:10:22Z",
|
|
69
|
+
"iframeAccessLevel": "ALL",
|
|
70
|
+
"iframeEmbedType": "NONE",
|
|
71
|
+
"latitude": 40.1234,
|
|
72
|
+
"location": "Somewhere",
|
|
73
|
+
"locationHints": "Near the main square",
|
|
74
|
+
"longitude": 2.1234,
|
|
75
|
+
"onlineMeetingUrl": "https://meets.example.org/abc-def",
|
|
76
|
+
"registrationTerms": "By registering you agree to the terms and conditions",
|
|
77
|
+
"registrationType": "ON_THIS_PLATFORM",
|
|
78
|
+
"registrationUrl": "https://example.org/register",
|
|
79
|
+
"registrationsEnabled": true,
|
|
80
|
+
"startTime": "2025-12-24T20:10:22Z",
|
|
81
|
+
"taxonomies": [1072],
|
|
82
|
+
"title": "More sidewalks and less roads",
|
|
83
|
+
"typeOfMeeting": "ONLINE"
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
----
|
|
88
|
+
|
|
89
|
+
== Error Handling
|
|
90
|
+
|
|
91
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
92
|
+
|
|
93
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
94
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
95
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
= Withdraw Meeting
|
|
2
|
+
|
|
3
|
+
To use the API to withdraw any meeting that the user has created, you will need to use the following API request.
|
|
4
|
+
|
|
5
|
+
[source,graphql]
|
|
6
|
+
----
|
|
7
|
+
mutation withdrawMeeting($componentId: ID!, $meetingId: ID!){
|
|
8
|
+
component(id: $componentId) {
|
|
9
|
+
...on MeetingsMutation{
|
|
10
|
+
meeting(id: $meetingId) {
|
|
11
|
+
withdraw(input: {}) {
|
|
12
|
+
id
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
----
|
|
19
|
+
|
|
20
|
+
Example of submitted variables
|
|
21
|
+
|
|
22
|
+
[source,json]
|
|
23
|
+
----
|
|
24
|
+
{
|
|
25
|
+
"componentId": "9",
|
|
26
|
+
"meetingId": "2"
|
|
27
|
+
}
|
|
28
|
+
----
|
|
29
|
+
|
|
30
|
+
== Error Handling
|
|
31
|
+
|
|
32
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
33
|
+
|
|
34
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
35
|
+
* xref:develop:api/reference/errors/validation_error.adoc[Validation Error - VALIDATION_ERROR]
|
|
36
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
= Meetings
|
|
2
|
+
|
|
3
|
+
In the meetings module we are providing a few mutations that we find useful for day-to-day management of Decidim instance outside the admin.
|
|
4
|
+
|
|
5
|
+
== For user/participants roles
|
|
6
|
+
|
|
7
|
+
* xref:develop:api/reference/components/meetings/create.adoc[Create Meeting]
|
|
8
|
+
* xref:develop:api/reference/components/meetings/update.adoc[Update Meeting]
|
|
9
|
+
* xref:develop:api/reference/components/meetings/withdraw.adoc[Withdraw Meeting]
|
|
10
|
+
* xref:develop:api/reference/components/meetings/close.adoc[Close Meeting]
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
= Answer Proposal
|
|
2
|
+
|
|
3
|
+
Allows administrators to answer proposals with a status (accepted, rejected, or evaluating).
|
|
4
|
+
|
|
5
|
+
This is an example on how to use the `addProposalAnswer` mutation. Please refer to the GraphQL documentation for the available fields:
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
- https://nightly.decidim.org/api/docs/input_object/answerinput/[Answer Input]
|
|
9
|
+
- https://nightly.decidim.org/api/docs/input_object/proposalattributes[Proposal Attributes]
|
|
10
|
+
- https://nightly.decidim.org/api/docs/object/proposal[Proposal Type]
|
|
11
|
+
|
|
12
|
+
```graphql
|
|
13
|
+
mutation addProposalAnswer($componentId: ID!, $proposalId: ID!, $input: AnswerInput!){
|
|
14
|
+
component(id: $componentId) {
|
|
15
|
+
...on ProposalsMutation{
|
|
16
|
+
proposal(id: $proposalId) {
|
|
17
|
+
answer(input: $input) {
|
|
18
|
+
// this is the proposal response
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Example of submitted variables
|
|
27
|
+
```graphql
|
|
28
|
+
{
|
|
29
|
+
"componentId": 9,
|
|
30
|
+
"proposalId": 2,
|
|
31
|
+
"input": {
|
|
32
|
+
"clientMutationId": "unique-client-id-123",
|
|
33
|
+
"attributes": {
|
|
34
|
+
"state": "accepted",
|
|
35
|
+
"cost": 10.0,
|
|
36
|
+
"answerContent": {
|
|
37
|
+
"en": "Some answer in English",
|
|
38
|
+
"ca": "Some answer in Catalan"
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
=== HTTP Request Example
|
|
46
|
+
|
|
47
|
+
Using cURL to make the GraphQL request:
|
|
48
|
+
|
|
49
|
+
```bash
|
|
50
|
+
curl -X POST https://your-decidim-instance.org/api \
|
|
51
|
+
-H "Content-Type: application/json" \
|
|
52
|
+
-H "Authorization: Bearer YOUR_API_TOKEN" \
|
|
53
|
+
-d '{
|
|
54
|
+
"query": "mutation addProposalAnswer($componentId: ID!, $proposalId: ID!, $input: AnswerInput!){ component(id: $componentId) { ...on ProposalsMutation{ proposal(id: $proposalId) { answer(input: $input) { /* this is the proposal response */ } } } } }",
|
|
55
|
+
"variables": {
|
|
56
|
+
"input": {
|
|
57
|
+
"componentId": 9,
|
|
58
|
+
"proposalId": 2,
|
|
59
|
+
"input": {
|
|
60
|
+
"clientMutationId": "unique-client-id-123",
|
|
61
|
+
"attributes": {
|
|
62
|
+
"state": "accepted",
|
|
63
|
+
"cost": 10.0,
|
|
64
|
+
"answerContent": {
|
|
65
|
+
"en": "Some answer in English",
|
|
66
|
+
"ca": "Some answer in Catalan"
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}'
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
=== Error Handling
|
|
76
|
+
|
|
77
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
78
|
+
|
|
79
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
80
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
81
|
+
* xref:develop:api/reference/errors/not_found.adoc[Not Found Error - NOT_FOUND_ERROR]
|
|
82
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
= Create Proposal
|
|
2
|
+
|
|
3
|
+
== Input attributes
|
|
4
|
+
|
|
5
|
+
When you want to add or create data in your proposals component, you need to rely on the `ProposalAttributes` type, which has the following input fields:
|
|
6
|
+
|
|
7
|
+
[source]
|
|
8
|
+
----
|
|
9
|
+
• title (required) - 15-150 characters
|
|
10
|
+
• body (required) - minimum 15 characters
|
|
11
|
+
• address (optional) - physical address (requires geocoding)
|
|
12
|
+
• latitude (optional) - coordinate
|
|
13
|
+
• longitude (optional) - coordinate
|
|
14
|
+
• taxonomies (optional) - Taxonomies ids to assign to this proposal
|
|
15
|
+
----
|
|
16
|
+
|
|
17
|
+
== Sample request
|
|
18
|
+
|
|
19
|
+
The `CreateProposal` mutation allows authenticated users to create new proposals in a Decidim proposals component. This mutation delegates to the existing `Decidim::Proposals::CreateProposal` command used by the controllers.
|
|
20
|
+
|
|
21
|
+
[source,graphql]
|
|
22
|
+
----
|
|
23
|
+
mutation createProposal($componentId: ID!, $input: CreateProposalInput!){
|
|
24
|
+
component(id: $componentId) {
|
|
25
|
+
...on ProposalsMutation{
|
|
26
|
+
createProposal(input: $input) {
|
|
27
|
+
id
|
|
28
|
+
title {
|
|
29
|
+
translation(locale: "en")
|
|
30
|
+
}
|
|
31
|
+
body {
|
|
32
|
+
translation(locale: "en")
|
|
33
|
+
}
|
|
34
|
+
address
|
|
35
|
+
taxonomies{
|
|
36
|
+
name {
|
|
37
|
+
translation(locale: "en")
|
|
38
|
+
}
|
|
39
|
+
children{
|
|
40
|
+
name{
|
|
41
|
+
translation(locale: "en")
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
----
|
|
50
|
+
|
|
51
|
+
Example of submitted variables
|
|
52
|
+
|
|
53
|
+
[source,json]
|
|
54
|
+
----
|
|
55
|
+
{
|
|
56
|
+
"componentId": 9,
|
|
57
|
+
"input": {
|
|
58
|
+
"locale": "en",
|
|
59
|
+
"attributes": {
|
|
60
|
+
"title": "Install Bike Lanes on Main Street",
|
|
61
|
+
"body": "We propose adding dedicated bike lanes along Main Street to improve cyclist safety and encourage sustainable transportation.",
|
|
62
|
+
"address": "Main Street, Barcelona, Spain",
|
|
63
|
+
"latitude": 41.3851,
|
|
64
|
+
"longitude": 2.1734
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
----
|
|
69
|
+
|
|
70
|
+
== Error Handling
|
|
71
|
+
|
|
72
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
73
|
+
|
|
74
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
75
|
+
* xref:develop:api/reference/errors/invalid_locale_error.adoc[Invalid Locale Error - INVALID_LOCALE_ERROR]
|
|
76
|
+
* xref:develop:api/reference/errors/validation_error.adoc[Validation Error - VALIDATION_ERROR]
|
|
77
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
78
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
= Update Proposal
|
|
2
|
+
|
|
3
|
+
== Input attributes
|
|
4
|
+
|
|
5
|
+
When you want to update data in your proposals component, you need to rely on the `ProposalAttributes` type, which has the following input fields:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
• title (required) - 15-150 characters
|
|
9
|
+
• body (required) - minimum 15 characters
|
|
10
|
+
• address (optional) - physical address (requires geocoding)
|
|
11
|
+
• latitude (optional) - coordinate
|
|
12
|
+
• longitude (optional) - coordinate
|
|
13
|
+
• taxonomies (optional) - Taxonomies ids to assign to this proposal
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
== Sample request
|
|
17
|
+
|
|
18
|
+
The `UpdateProposal` mutation allows authenticated users to update proposals in a Decidim component. This mutation delegates to the existing `Decidim::Proposals::UpdateProposal` command.
|
|
19
|
+
|
|
20
|
+
[source,graphql]
|
|
21
|
+
----
|
|
22
|
+
mutation updateProposal($componentId: ID!,$proposalId: ID!, $input: UpdateProposalInput!){
|
|
23
|
+
component(id: $componentId) {
|
|
24
|
+
...on ProposalsMutation{
|
|
25
|
+
proposal(id: $proposalId) {
|
|
26
|
+
update(input: $input) {
|
|
27
|
+
id
|
|
28
|
+
title { translation(locale: "en") }
|
|
29
|
+
body { translation(locale: "en") }
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
----
|
|
36
|
+
|
|
37
|
+
Example of submitted variables
|
|
38
|
+
|
|
39
|
+
[source,json]
|
|
40
|
+
----
|
|
41
|
+
{
|
|
42
|
+
"componentId": 9,
|
|
43
|
+
"proposalId": "140",
|
|
44
|
+
"input": {
|
|
45
|
+
"locale": "en",
|
|
46
|
+
"attributes": {
|
|
47
|
+
"title": "Install Bike Lanes on Main Street",
|
|
48
|
+
"body": "We propose adding dedicated bike lanes along Main Street to improve cyclist safety and encourage sustainable transportation.",
|
|
49
|
+
"address": "Main Street, Barcelona, Spain",
|
|
50
|
+
"latitude": 41.3851,
|
|
51
|
+
"longitude": 2.1734,
|
|
52
|
+
"taxonomies": [123, 456]
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
----
|
|
57
|
+
|
|
58
|
+
== Error Handling
|
|
59
|
+
|
|
60
|
+
The most frequent errors that can be generated by this mutation are as follows:
|
|
61
|
+
|
|
62
|
+
* xref:develop:api/reference/errors/unauthorized_mutation.adoc[Unauthorized Mutation Error - MUTATION_NOT_AUTHORIZED_ERROR]
|
|
63
|
+
* xref:develop:api/reference/errors/invalid_locale_error.adoc[Invalid Locale Error - INVALID_LOCALE_ERROR]
|
|
64
|
+
* xref:develop:api/reference/errors/validation_error.adoc[Validation Error - VALIDATION_ERROR]
|
|
65
|
+
* xref:develop:api/reference/errors/attribute_validation_error.adoc[Attribute Validation Error - ATTRIBUTE_VALIDATION_ERROR]
|
|
66
|
+
* xref:develop:api/reference/errors/unauthorized_object.adoc[Unauthorized Object Error - UNAUTHORIZED_OBJECT_ERROR]
|