{"openapi":"3.1.0","info":{"title":"Hola Política API","description":"Open data API for the Spanish Congress. Vote tracking, deputies, initiatives, topics, agenda, stats. EUPL-1.2 / CC-BY 4.0.","version":"0.1.0"},"paths":{"/health":{"get":{"tags":["health"],"summary":"Health Check","description":"Verify the API is up and the database is reachable.","operationId":"health_check_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Health Check Health Get"}}}}}}},"/chambers":{"get":{"tags":["chambers"],"summary":"List Chambers","description":"List all chambers.","operationId":"list_chambers_chambers_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/ChamberRead"},"type":"array","title":"Response List Chambers Chambers Get"}}}}}}},"/chambers/{slug}":{"get":{"tags":["chambers"],"summary":"Get Chamber","description":"Get a chamber by its slug.","operationId":"get_chamber_chambers__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChamberRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/legislatures":{"get":{"tags":["legislatures"],"summary":"List Legislatures","description":"List legislatures, optionally filtered by chamber.","operationId":"list_legislatures_legislatures_get","parameters":[{"name":"chamber_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by chamber","title":"Chamber Id"},"description":"Filter by chamber"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/LegislatureRead"},"title":"Response List Legislatures Legislatures Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/legislatures/{legislature_id}":{"get":{"tags":["legislatures"],"summary":"Get Legislature","description":"Get a single legislature by ID.","operationId":"get_legislature_legislatures__legislature_id__get","parameters":[{"name":"legislature_id","in":"path","required":true,"schema":{"type":"integer","title":"Legislature Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LegislatureRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/persons":{"get":{"tags":["persons"],"summary":"List Persons","description":"List persons with optional search and pagination.\n\nReturns a paginated envelope with:\n    - total: total count matching the filter\n    - page, page_size: pagination info\n    - items: list of PersonRead\n\nNOTE on legislature filter: returns persons who have an active mandate in\nthe given legislature. We use a subquery to keep this efficient.","operationId":"list_persons_persons_get","parameters":[{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search by full name (partial match)","title":"Q"},"description":"Search by full name (partial match)"},{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter to active mandates in this legislature","title":"Legislature Id"},"description":"Filter to active mandates in this legislature"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Persons Persons Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/persons/{person_id}":{"get":{"tags":["persons"],"summary":"Get Person","description":"Get a single person by ID, enriched with current group membership.","operationId":"get_person_persons__person_id__get","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/persons/{person_id}/mandates":{"get":{"tags":["persons"],"summary":"Get Person Mandates","description":"Get all mandates of a person across legislatures.","operationId":"get_person_mandates_persons__person_id__mandates_get","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/MandateWithPerson"},"title":"Response Get Person Mandates Persons  Person Id  Mandates Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/persons/{person_id}/topic-stats":{"get":{"tags":["persons"],"summary":"Get Person Topic Stats","description":"Per-topic Sí/No/Abst breakdown for the deputy's full vote history.","operationId":"get_person_topic_stats_persons__person_id__topic_stats_get","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicVoteStatRow"},"title":"Response Get Person Topic Stats Persons  Person Id  Topic Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/persons/{person_id}/kpis":{"get":{"tags":["persons"],"summary":"Get Person Kpis","description":"Three at-a-glance numbers: votes attended, attendance %, dissidence %.","operationId":"get_person_kpis_persons__person_id__kpis_get","parameters":[{"name":"person_id","in":"path","required":true,"schema":{"type":"integer","title":"Person Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PersonKPIs"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/topics":{"get":{"tags":["topics"],"summary":"List Topics","description":"List topics, optionally filtered by knowledge base.\n\nWithin a single KB, ordering is by ``slug`` so the SDGs come out in\nnumeric order (``sdg-01-poverty`` … ``sdg-17-partnerships``) and the\neditorial topics in stable alphabetical order. When no ``kind`` is\ngiven, ``kind`` itself becomes the primary sort key so the response\nis grouped.","operationId":"list_topics_topics_get","parameters":[{"name":"kind","in":"query","required":false,"schema":{"anyOf":[{"type":"string","pattern":"^(theme|sdg)$"},{"type":"null"}],"description":"Filter by classification knowledge base. Use 'theme' for the editorial 17-topic taxonomy or 'sdg' for the 17 UN Sustainable Development Goals. Omit to return all topics.","title":"Kind"},"description":"Filter by classification knowledge base. Use 'theme' for the editorial 17-topic taxonomy or 'sdg' for the 17 UN Sustainable Development Goals. Omit to return all topics."}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicRead"},"title":"Response List Topics Topics Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/topics/{slug}":{"get":{"tags":["topics"],"summary":"Get Topic","description":"Get a topic by its slug.","operationId":"get_topic_topics__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/topics/{slug}/initiatives":{"get":{"tags":["topics"],"summary":"List Topic Initiatives","description":"All initiatives classified under ``slug``, regardless of vote linkage.\n\nThe /topics card surfaces an initiative count from\n``stats.topics.global``. When the user enters the topic detail, they\nexpect the same set surfaced here — not a votes-list filter that misses\ninitiatives whose vote has no ``initiative_id`` because the vote type\ncode (PNL / Mocions) doesn't match the initiative-feed types.\n\nOrder: most recent first by ``submitted_at`` (with NULLs last).","operationId":"list_topic_initiatives_topics__slug__initiatives_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Legislature Id"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/InitiativeRead"},"title":"Response List Topic Initiatives Topics  Slug  Initiatives Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/votes":{"get":{"tags":["votes"],"summary":"List Votes","description":"List votes with combinable filters.\n\nReturns paginated results. All filters are optional and combine with AND.","operationId":"list_votes_votes_get","parameters":[{"name":"chamber_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by chamber","title":"Chamber Id"},"description":"Filter by chamber"},{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by legislature","title":"Legislature Id"},"description":"Filter by legislature"},{"name":"topic_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by topic slug, e.g. 'habitatge'","title":"Topic Slug"},"description":"Filter by topic slug, e.g. 'habitatge'"},{"name":"initiative_type","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/InitiativeType"},{"type":"null"}],"description":"Filter by initiative type","title":"Initiative Type"},"description":"Filter by initiative type"},{"name":"proposing_group_slug","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by the parliamentary group that proposed the vote","title":"Proposing Group Slug"},"description":"Filter by the parliamentary group that proposed the vote"},{"name":"result","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/VoteResult"},{"type":"null"}],"description":"Filter by vote result","title":"Result"},"description":"Filter by vote result"},{"name":"date_from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Earliest vote date (inclusive)","title":"Date From"},"description":"Earliest vote date (inclusive)"},{"name":"date_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Latest vote date (inclusive)","title":"Date To"},"description":"Latest vote date (inclusive)"},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Search in vote title or description","title":"Q"},"description":"Search in vote title or description"},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"page_size","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":20,"title":"Page Size"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response List Votes Votes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/votes/{vote_id}":{"get":{"tags":["votes"],"summary":"Get Vote","description":"Get a single vote by ID, enriched with the proposing group when known.","operationId":"get_vote_votes__vote_id__get","parameters":[{"name":"vote_id","in":"path","required":true,"schema":{"type":"integer","title":"Vote Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoteRead"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups":{"get":{"tags":["groups"],"summary":"List Groups","description":"List parliamentary groups with current member counts.","operationId":"list_groups_groups_get","parameters":[{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Restrict to one legislature; defaults to all","title":"Legislature Id"},"description":"Restrict to one legislature; defaults to all"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ParliamentaryGroupSummary"},"title":"Response List Groups Groups Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{slug}":{"get":{"tags":["groups"],"summary":"Get Group","description":"Get a single group by slug.\n\nIf multiple legislatures have a group with this slug we pick the most\nrecent one unless ``legislature_id`` is provided.","operationId":"get_group_groups__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Disambiguate when the same slug exists in multiple legislatures","title":"Legislature Id"},"description":"Disambiguate when the same slug exists in multiple legislatures"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ParliamentaryGroupSummary"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{slug}/members":{"get":{"tags":["groups"],"summary":"Get Group Members","description":"List the open memberships in a group.\n\nIncludes both regular members and roles (spokesperson, etc.). Sorted by\nfamily name. Returns ``[]`` if the group exists but has no current\nmembers (e.g. a group that disbanded mid-legislature).","operationId":"get_group_members_groups__slug__members_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupMemberRow"},"title":"Response Get Group Members Groups  Slug  Members Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{slug}/topic-stats":{"get":{"tags":["groups"],"summary":"Get Group Topic Stats","description":"Per-topic Sí/No/Abst breakdown of every vote_record cast under this group.","operationId":"get_group_topic_stats_groups__slug__topic_stats_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/TopicVoteStatRow"},"title":"Response Get Group Topic Stats Groups  Slug  Topic Stats Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/groups/{slug}/composition":{"get":{"tags":["groups"],"summary":"Get Group Composition","description":"Demographic composition of the group's currently open memberships.\n\nCaches for 1 h — the underlying open-membership set turns over only\nwhen a deputy switches groups, which happens on the order of days,\nso a stale-by-an-hour snapshot is well inside our freshness budget.","operationId":"get_group_composition_groups__slug__composition_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupComposition"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics/group-summary":{"get":{"tags":["metrics"],"summary":"Group Summary","description":"Per-group composition + cohesion + attendance for the stats hero.","operationId":"group_summary_metrics_group_summary_get","parameters":[{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","description":"Legislature scope","title":"Legislature Id"},"description":"Legislature scope"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/GroupSummaryRow"},"title":"Response Group Summary Metrics Group Summary Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics/cohesion":{"get":{"tags":["metrics"],"summary":"Cohesion","operationId":"cohesion_metrics_cohesion_get","parameters":[{"name":"vote_id","in":"query","required":true,"schema":{"type":"integer","description":"ID of the vote to analyze","title":"Vote Id"},"description":"ID of the vote to analyze"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CohesionResult"},"title":"Response Cohesion Metrics Cohesion Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics/coincidence":{"get":{"tags":["metrics"],"summary":"Coincidence","operationId":"coincidence_metrics_coincidence_get","parameters":[{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","description":"Legislature scope","title":"Legislature Id"},"description":"Legislature scope"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CoincidenceCell"},"title":"Response Coincidence Metrics Coincidence Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics/attendance":{"get":{"tags":["metrics"],"summary":"Attendance","operationId":"attendance_metrics_attendance_get","parameters":[{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","title":"Legislature Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/AttendanceRow"},"title":"Response Attendance Metrics Attendance Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/metrics/dissidence":{"get":{"tags":["metrics"],"summary":"Dissidence","operationId":"dissidence_metrics_dissidence_get","parameters":[{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","title":"Legislature Id"}},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"From"}},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"To"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/DissidenceRow"},"title":"Response Dissidence Metrics Dissidence Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/summary":{"get":{"tags":["stats"],"summary":"Summary","operationId":"summary_stats_summary_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GlobalSummary"}}}}}}},"/stats/initiatives/by-type":{"get":{"tags":["stats"],"summary":"Initiatives By Type","operationId":"initiatives_by_type_stats_initiatives_by_type_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InitiativeTypeCount"},"type":"array","title":"Response Initiatives By Type Stats Initiatives By Type Get"}}}}}}},"/stats/initiatives/by-status":{"get":{"tags":["stats"],"summary":"Initiatives By Status","operationId":"initiatives_by_status_stats_initiatives_by_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/InitiativeStatusCount"},"type":"array","title":"Response Initiatives By Status Stats Initiatives By Status Get"}}}}}}},"/stats/votes/by-result":{"get":{"tags":["stats"],"summary":"Votes By Result","operationId":"votes_by_result_stats_votes_by_result_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/VoteResultCount"},"type":"array","title":"Response Votes By Result Stats Votes By Result Get"}}}}}}},"/stats/votes/by-proposing-group":{"get":{"tags":["stats"],"summary":"Votes By Proposing Group","operationId":"votes_by_proposing_group_stats_votes_by_proposing_group_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/GroupProposalCount"},"type":"array","title":"Response Votes By Proposing Group Stats Votes By Proposing Group Get"}}}}}}},"/stats/topics/global":{"get":{"tags":["stats"],"summary":"Topics Global","description":"Per-topic counts of initiatives broken down by status.","operationId":"topics_global_stats_topics_global_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/TopicGlobalRow"},"type":"array","title":"Response Topics Global Stats Topics Global Get"}}}}}}},"/stats/by-group/{slug}":{"get":{"tags":["stats"],"summary":"Stats By Group","description":"Recent activity + topic mix for one parliamentary group.\n\n``recent_initiatives`` is the 10 most recent initiatives whose\n``submitted_by`` text mentions this group's long name. We use a\nsubstring match because the source field is free text that lists every\nco-signer — same heuristic as ``app.services.proposing_group``.\n\n``topic_distribution`` aggregates classifier-assigned topics across\nthose initiatives (across ALL the group's initiatives, not just the top\n10) so the user sees the group's thematic profile, not just what's\nfresh this week.","operationId":"stats_by_group_stats_by_group__slug__get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Restrict counts to a specific legislature","title":"Legislature Id"},"description":"Restrict counts to a specific legislature"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GroupActivity"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/by-topic/{slug}/proposers":{"get":{"tags":["stats"],"summary":"Stats By Topic Proposers","description":"Top proposers + recent initiatives in one topic.\n\nProposers are computed by intersecting each parliamentary group's\n``name_long`` against ``Initiative.submitted_by``. We always return the\ntop 5 with their counts. ``\"government\"`` appears as a synthetic row\nrepresenting initiatives marked as government bills.\n\nA 404 is returned only when the topic slug itself doesn't exist.","operationId":"stats_by_topic_proposers_stats_by_topic__slug__proposers_get","parameters":[{"name":"slug","in":"path","required":true,"schema":{"type":"string","title":"Slug"}},{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Restrict counts to a specific legislature","title":"Legislature Id"},"description":"Restrict counts to a specific legislature"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TopicProposers"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/stats/cross/topic/{topic_slug}/group/{group_slug}":{"get":{"tags":["stats"],"summary":"Stats Cross Topic Group","description":"Power the /stats page when BOTH topic and group filters are active.\n\nReturns enough data to render three panels in one round trip:\n\n1. ``initiatives_on_topic_by_group`` — initiatives classified under\n   ``topic_slug`` grouped by their proposing group. ALL groups appear\n   (with zero counts when applicable) so the frontend can keep the\n   symmetry rule and show a full bar chart with one bar highlighted.\n2. ``topic_distribution_for_group`` — initiatives proposed by\n   ``group_slug``, grouped by topic. Top 8 by count, plus the focal\n   topic if it falls outside the top 8 (so it can always be\n   highlighted in the chart).\n3. ``joint_initiatives`` — every initiative that is BOTH classified\n   under ``topic_slug`` AND has ``submitted_by`` matching the group's\n   long name, sorted by submitted_at desc. Capped at 50 rows.\n\n404 is raised only when ``topic_slug`` doesn't exist; an unknown\n``group_slug`` returns empty lists rather than failing the page.","operationId":"stats_cross_topic_group_stats_cross_topic__topic_slug__group__group_slug__get","parameters":[{"name":"topic_slug","in":"path","required":true,"schema":{"type":"string","title":"Topic Slug"}},{"name":"group_slug","in":"path","required":true,"schema":{"type":"string","title":"Group Slug"}},{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Restrict counts to a specific legislature","title":"Legislature Id"},"description":"Restrict counts to a specific legislature"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CrossTopicGroup"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/alerts":{"post":{"tags":["subscriptions"],"summary":"Subscribe Alert","operationId":"subscribe_alert_alerts_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AlertCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__subscriptions__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/newsletter":{"post":{"tags":["subscriptions"],"summary":"Subscribe Newsletter","operationId":"subscribe_newsletter_newsletter_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NewsletterCreate"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__subscriptions__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/confirm/alert/{token}":{"get":{"tags":["subscriptions"],"summary":"Confirm Alert","operationId":"confirm_alert_confirm_alert__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__subscriptions__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/confirm/newsletter/{token}":{"get":{"tags":["subscriptions"],"summary":"Confirm Newsletter","operationId":"confirm_newsletter_confirm_newsletter__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__subscriptions__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/unsubscribe/alert/{token}":{"delete":{"tags":["subscriptions"],"summary":"Cancel Alert","operationId":"cancel_alert_unsubscribe_alert__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__subscriptions__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/unsubscribe/newsletter/{token}":{"delete":{"tags":["subscriptions"],"summary":"Cancel Newsletter","operationId":"cancel_newsletter_unsubscribe_newsletter__token__delete","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__subscriptions__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/newsletter/preview":{"get":{"tags":["admin"],"summary":"Preview Html","operationId":"preview_html_admin_newsletter_preview_get","parameters":[{"name":"period_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"End of period (defaults to today)","title":"Period To"},"description":"End of period (defaults to today)"},{"name":"period_days","in":"query","required":false,"schema":{"type":"integer","maximum":31,"minimum":1,"default":7,"title":"Period Days"}},{"name":"chamber_slug","in":"query","required":false,"schema":{"type":"string","default":"es-congreso","title":"Chamber Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/html":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/newsletter/preview.txt":{"get":{"tags":["admin"],"summary":"Preview Text","operationId":"preview_text_admin_newsletter_preview_txt_get","parameters":[{"name":"period_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period To"}},{"name":"period_days","in":"query","required":false,"schema":{"type":"integer","maximum":31,"minimum":1,"default":7,"title":"Period Days"}},{"name":"chamber_slug","in":"query","required":false,"schema":{"type":"string","default":"es-congreso","title":"Chamber Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/admin/newsletter/preview/subject":{"get":{"tags":["admin"],"summary":"Preview Subject","operationId":"preview_subject_admin_newsletter_preview_subject_get","parameters":[{"name":"period_to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Period To"}},{"name":"period_days","in":"query","required":false,"schema":{"type":"integer","maximum":31,"minimum":1,"default":7,"title":"Period Days"}},{"name":"chamber_slug","in":"query","required":false,"schema":{"type":"string","default":"es-congreso","title":"Chamber Slug"}}],"responses":{"200":{"description":"Successful Response","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agenda/upcoming":{"get":{"tags":["agenda"],"summary":"Get Upcoming","description":"Return the next plenary session whose orden del día is published.\n\n\"Next\" = earliest date >= today with status ∈ {``scheduled``,\n``modified``}. ``planned`` rows (calendar markers, no PDF yet) are\nexcluded here — the home widget would have nothing to render. They\nsurface via :func:`list_sessions` for callers that explicitly want\nthem.","operationId":"get_upcoming_agenda_upcoming_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledSessionRead"}}}}}}},"/agenda/items/by-topic/{topic_slug}":{"get":{"tags":["agenda"],"summary":"Items By Topic","description":"Upcoming agenda items whose initiative is classified under ``topic_slug``.\n\nJoins ``scheduled_agenda_items`` → ``initiatives`` (by ``official_id``) →\n``initiative_topics`` → ``topics``. Items whose ``official_id`` doesn't\nmatch any classified initiative are omitted. Ordered by session date,\nthen position within the session.","operationId":"items_by_topic_agenda_items_by_topic__topic_slug__get","parameters":[{"name":"topic_slug","in":"path","required":true,"schema":{"type":"string","title":"Topic Slug"}},{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","title":"Legislature Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledAgendaItemRead"},"title":"Response Items By Topic Agenda Items By Topic  Topic Slug  Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/agenda/sessions":{"get":{"tags":["agenda"],"summary":"List Sessions","description":"List scheduled sessions with optional filters.\n\nDefault ordering is ascending by date — useful for the \"calendar of\nupcoming plenos\" view. Pass ``upcoming_only=false`` to also include\npast rows (e.g. for historical agenda comparisons).","operationId":"list_sessions_agenda_sessions_get","parameters":[{"name":"legislature_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by legislature","title":"Legislature Id"},"description":"Filter by legislature"},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"$ref":"#/components/schemas/ScheduledSessionStatus"},{"type":"null"}],"description":"Filter by status (scheduled, modified, planned, cancelled, completed)","title":"Status"},"description":"Filter by status (scheduled, modified, planned, cancelled, completed)"},{"name":"upcoming_only","in":"query","required":false,"schema":{"type":"boolean","description":"Restrict to dates >= today (default true)","default":true,"title":"Upcoming Only"},"description":"Restrict to dates >= today (default true)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ScheduledSessionRead"},"title":"Response List Sessions Agenda Sessions Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/push/public-key":{"get":{"tags":["push"],"summary":"Get Public Key","operationId":"get_public_key_push_public_key_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicKeyResponse"}}}}}}},"/push/subscribe":{"post":{"tags":["push"],"summary":"Subscribe","operationId":"subscribe_push_subscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SubscribeRequest"}}},"required":true},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__push__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/push/interests":{"patch":{"tags":["push"],"summary":"Patch Interests","operationId":"patch_interests_push_interests_patch","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InterestsRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/app__api__push__SubscriptionResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/push/unsubscribe":{"post":{"tags":["push"],"summary":"Unsubscribe","operationId":"unsubscribe_push_unsubscribe_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UnsubscribeRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusResponse"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dump/deputies":{"get":{"tags":["dump"],"summary":"Dump Deputies","description":"Dump every active mandate in ``legislature_id`` with current group + constituency.\n\n\"Active\" here means an open ``Mandate`` (``end_date IS NULL``). For\nhistorical mandates use the paginated ``/persons`` endpoint instead\n— we deliberately don't include them in the dump because the typical\nconsumer wants \"the current Congress\" snapshot.\n\nGroup attribution uses the *open* GroupMembership (no end date). A\ndeputy who has switched groups mid-legislature appears under their\ncurrent group only.","operationId":"dump_deputies_dump_deputies_get","parameters":[{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","description":"Legislature whose mandates to dump","title":"Legislature Id"},"description":"Legislature whose mandates to dump"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dump Deputies Dump Deputies Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dump/votes":{"get":{"tags":["dump"],"summary":"Dump Votes","description":"Dump every vote in ``legislature_id``, plus its aggregate result counts.\n\nDoes NOT include per-deputy ``vote_records`` — that table is in the\n600k-row range and a single dump would defeat the point. To get the\nindividual choices for a vote, follow up with\n``/dump/vote-records?vote_id=N``.\n\nThe optional ``from`` / ``to`` query params filter by ``voted_at``\ndate. They use the SQL ``date(voted_at)`` semantics — the timezone of\nthe underlying TIMESTAMPTZ is the chamber's local time as ingested.","operationId":"dump_votes_dump_votes_get","parameters":[{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","description":"Legislature whose votes to dump","title":"Legislature Id"},"description":"Legislature whose votes to dump"},{"name":"from","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Earliest vote date (inclusive, ISO 8601)","title":"From"},"description":"Earliest vote date (inclusive, ISO 8601)"},{"name":"to","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Latest vote date (inclusive, ISO 8601)","title":"To"},"description":"Latest vote date (inclusive, ISO 8601)"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dump Votes Dump Votes Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dump/vote-records":{"get":{"tags":["dump"],"summary":"Dump Vote Records","description":"Dump the individual ``VoteRecord`` rows for ONE vote.\n\nOne-vote-per-request is deliberate: across the XV legislature there\nare ~600k records, so we never expose a \"give me everything\" endpoint\nhere. Researchers iterate over vote IDs from ``/dump/votes`` and\nissue one of these per vote.\n\nEach row carries the deputy's mandate id, their group **at the\nmoment of the vote** (not their current group — group switches mid-\nlegislature are common), and the choice (aye / no / abstention /\nabsent / no_vote_recorded).","operationId":"dump_vote_records_dump_vote_records_get","parameters":[{"name":"vote_id","in":"query","required":true,"schema":{"type":"integer","description":"The vote whose per-deputy records to dump","title":"Vote Id"},"description":"The vote whose per-deputy records to dump"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dump Vote Records Dump Vote Records Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/dump/initiatives":{"get":{"tags":["dump"],"summary":"Dump Initiatives","description":"Dump every initiative in ``legislature_id`` with its topic classifications.\n\nEach row carries the initiative metadata plus a list of\n``{slug, name_ca, confidence, classified_by}`` entries describing\nhow the LLM (or human override) tagged it. Initiatives without a\nclassification yet appear with an empty ``topics`` list.","operationId":"dump_initiatives_dump_initiatives_get","parameters":[{"name":"legislature_id","in":"query","required":true,"schema":{"type":"integer","description":"Legislature whose initiatives to dump","title":"Legislature Id"},"description":"Legislature whose initiatives to dump"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Dump Initiatives Dump Initiatives Get"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/":{"get":{"summary":"Root","description":"Root endpoint with basic info.","operationId":"root__get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"additionalProperties":{"type":"string"},"type":"object","title":"Response Root  Get"}}}}}}}},"components":{"schemas":{"AlertCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"target_type":{"type":"string","enum":["topic","person","group"],"title":"Target Type"},"target_id":{"type":"integer","title":"Target Id"},"language":{"type":"string","enum":["ca","es","en"],"title":"Language","default":"ca"}},"type":"object","required":["email","target_type","target_id"],"title":"AlertCreate"},"AttendanceRow":{"properties":{"person_id":{"type":"integer","title":"Person Id"},"full_name":{"type":"string","title":"Full Name"},"votes_total":{"type":"integer","title":"Votes Total"},"votes_attended":{"type":"integer","title":"Votes Attended"},"attendance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Attendance"}},"type":"object","required":["person_id","full_name","votes_total","votes_attended","attendance"],"title":"AttendanceRow"},"ChamberLevel":{"type":"string","enum":["national","regional","municipal"],"title":"ChamberLevel","description":"Administrative level of a parliamentary chamber."},"ChamberRead":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name_ca":{"type":"string","title":"Name Ca"},"name_es":{"type":"string","title":"Name Es"},"name_en":{"type":"string","title":"Name En"},"country":{"type":"string","title":"Country"},"region":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Region"},"level":{"$ref":"#/components/schemas/ChamberLevel"},"website":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Website"}},"type":"object","required":["id","slug","name_ca","name_es","name_en","country","level"],"title":"ChamberRead"},"CohesionResult":{"properties":{"group_slug":{"type":"string","title":"Group Slug"},"group_name_short":{"type":"string","title":"Group Name Short"},"group_color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Color Hex"},"cohesion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cohesion"},"members_voting":{"type":"integer","title":"Members Voting"},"ayes":{"type":"integer","title":"Ayes"},"noes":{"type":"integer","title":"Noes"},"abstentions":{"type":"integer","title":"Abstentions"},"no_vote":{"type":"integer","title":"No Vote"}},"type":"object","required":["group_slug","group_name_short","group_color_hex","cohesion","members_voting","ayes","noes","abstentions","no_vote"],"title":"CohesionResult"},"CoincidenceCell":{"properties":{"group_a_slug":{"type":"string","title":"Group A Slug"},"group_b_slug":{"type":"string","title":"Group B Slug"},"votes_compared":{"type":"integer","title":"Votes Compared"},"coincidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Coincidence"}},"type":"object","required":["group_a_slug","group_b_slug","votes_compared","coincidence"],"title":"CoincidenceCell"},"CrossGroupSummary":{"properties":{"slug":{"type":"string","title":"Slug"},"name_short":{"type":"string","title":"Name Short"},"name_long":{"type":"string","title":"Name Long"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"}},"type":"object","required":["slug","name_short","name_long","color_hex"],"title":"CrossGroupSummary","description":"Minimal group descriptor used in cross-filter responses."},"CrossTopicGroup":{"properties":{"topic":{"$ref":"#/components/schemas/CrossTopicGroupSummary"},"group":{"$ref":"#/components/schemas/CrossGroupSummary"},"initiatives_on_topic_by_group":{"items":{"$ref":"#/components/schemas/ProposerCount"},"type":"array","title":"Initiatives On Topic By Group"},"topic_distribution_for_group":{"items":{"$ref":"#/components/schemas/TopicCount"},"type":"array","title":"Topic Distribution For Group"},"joint_initiatives":{"items":{"$ref":"#/components/schemas/InitiativeMini"},"type":"array","title":"Joint Initiatives"},"joint_initiatives_total":{"type":"integer","title":"Joint Initiatives Total"}},"type":"object","required":["topic","group","initiatives_on_topic_by_group","topic_distribution_for_group","joint_initiatives","joint_initiatives_total"],"title":"CrossTopicGroup","description":"Full snapshot of one (topic, group) intersection.\n\nPower-feature for the /stats page when BOTH filters are active:\n\n- ``initiatives_on_topic_by_group``: how many initiatives EACH group has\n  filed on this topic. Symmetry rule — every group is always present\n  (or zero), the page just highlights the focal one.\n- ``topic_distribution_for_group``: top topics in the focal group's\n  initiative footprint, with the focal topic always included so the\n  frontend can render it highlighted even when it's not in the top N.\n- ``joint_initiatives``: every initiative this group filed on this\n  topic, ordered submitted_at desc. Capped at 50 to bound the payload;\n  the page shows a \"N total\" count separately."},"CrossTopicGroupSummary":{"properties":{"slug":{"type":"string","title":"Slug"},"name_ca":{"type":"string","title":"Name Ca"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"}},"type":"object","required":["slug","name_ca","color_hex"],"title":"CrossTopicGroupSummary","description":"Minimal topic descriptor used in cross-filter responses."},"DissidenceRow":{"properties":{"person_id":{"type":"integer","title":"Person Id"},"full_name":{"type":"string","title":"Full Name"},"votes_compared":{"type":"integer","title":"Votes Compared"},"dissents":{"type":"integer","title":"Dissents"},"dissidence":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dissidence"}},"type":"object","required":["person_id","full_name","votes_compared","dissents","dissidence"],"title":"DissidenceRow"},"GlobalSummary":{"properties":{"initiatives_total":{"type":"integer","title":"Initiatives Total"},"votes_total":{"type":"integer","title":"Votes Total"},"initiatives_classified":{"type":"integer","title":"Initiatives Classified"}},"type":"object","required":["initiatives_total","votes_total","initiatives_classified"],"title":"GlobalSummary"},"GroupActivity":{"properties":{"recent_initiatives":{"items":{"$ref":"#/components/schemas/InitiativeMini"},"type":"array","title":"Recent Initiatives"},"topic_distribution":{"items":{"$ref":"#/components/schemas/TopicCount"},"type":"array","title":"Topic Distribution"}},"type":"object","required":["recent_initiatives","topic_distribution"],"title":"GroupActivity","description":"What one group has been pushing through parliament lately."},"GroupComposition":{"properties":{"members_total":{"type":"integer","title":"Members Total"},"gender_distribution":{"additionalProperties":{"type":"integer"},"type":"object","title":"Gender Distribution"},"age_buckets":{"additionalProperties":{"type":"integer"},"type":"object","title":"Age Buckets"},"member_parties":{"items":{"$ref":"#/components/schemas/GroupCompositionPartyRow"},"type":"array","title":"Member Parties"}},"type":"object","required":["members_total","gender_distribution","age_buckets","member_parties"],"title":"GroupComposition","description":"Demographic composition of a group's *currently open* memberships.\n\nSymmetry guarantee: every category — including ``unknown`` — is always\npresent in the returned histograms. We never hide a bucket because it\nhappens to be empty; an empty bucket is a fact, and the frontend can\nrender it as a zero rather than infer one. See CLAUDE.md \"Mètriques\nagregades — regla de simetria\" and \"neutrality-guidelines.md\"."},"GroupCompositionPartyRow":{"properties":{"name":{"type":"string","title":"Name"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["name","count"],"title":"GroupCompositionPartyRow","description":"One constituent party/electoral-list of the group, with member count."},"GroupMemberRow":{"properties":{"person_id":{"type":"integer","title":"Person Id"},"full_name":{"type":"string","title":"Full Name"},"constituency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constituency"},"role":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Role"},"member_since":{"type":"string","format":"date","title":"Member Since"}},"type":"object","required":["person_id","full_name","constituency","role","member_since"],"title":"GroupMemberRow","description":"One row of a group's membership list, with the open-membership dates."},"GroupProposalCount":{"properties":{"slug":{"type":"string","title":"Slug"},"name_short":{"type":"string","title":"Name Short"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["slug","name_short","color_hex","count"],"title":"GroupProposalCount"},"GroupSummaryRow":{"properties":{"group_slug":{"type":"string","title":"Group Slug"},"group_name_short":{"type":"string","title":"Group Name Short"},"group_color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Group Color Hex"},"members_active":{"type":"integer","title":"Members Active"},"avg_cohesion":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Cohesion"},"cohesion_votes_counted":{"type":"integer","title":"Cohesion Votes Counted"},"avg_attendance":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Avg Attendance"},"attendance_member_count":{"type":"integer","title":"Attendance Member Count"}},"type":"object","required":["group_slug","group_name_short","group_color_hex","members_active","avg_cohesion","cohesion_votes_counted","avg_attendance","attendance_member_count"],"title":"GroupSummaryRow","description":"Per-group aggregate for the stats hero: members + cohesion + attendance.\n\nAll three numbers are reported alongside the raw N so the renderer can\napply the min-N rule without a second query (CLAUDE.md \"regla de simetria\"\n— every group is included; sorting/highlighting is a frontend concern)."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"InitiativeMini":{"properties":{"id":{"type":"integer","title":"Id"},"type":{"$ref":"#/components/schemas/InitiativeType"},"official_id":{"type":"string","title":"Official Id"},"title_original":{"type":"string","title":"Title Original"},"title_ca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Ca"},"status":{"$ref":"#/components/schemas/InitiativeStatus"},"submitted_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted At"},"plain_summary_ca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Ca"},"plain_summary_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Es"},"plain_summary_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Provider"}},"type":"object","required":["id","type","official_id","title_original","title_ca","status","submitted_at"],"title":"InitiativeMini","description":"Compact initiative row for \"recent activity\" lists.\n\nA trimmed-down view of :class:`Initiative` — just the fields the\n/stats explorer needs to render a row + a deep link. Includes plain\nsummary fields so the frontend can render the SummaryHover affordance\nwithout an extra fetch per row."},"InitiativeRead":{"properties":{"id":{"type":"integer","title":"Id"},"chamber_id":{"type":"integer","title":"Chamber Id"},"legislature_id":{"type":"integer","title":"Legislature Id"},"type":{"$ref":"#/components/schemas/InitiativeType"},"official_id":{"type":"string","title":"Official Id"},"title_original":{"type":"string","title":"Title Original"},"title_ca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Ca"},"title_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title Es"},"title_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Title En"},"summary":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Summary"},"status":{"$ref":"#/components/schemas/InitiativeStatus"},"submitted_at":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"Submitted At"},"submitted_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Submitted By"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"plain_summary_ca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Ca"},"plain_summary_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Es"},"plain_summary_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Provider"},"plain_summary_generated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Plain Summary Generated At"}},"type":"object","required":["id","chamber_id","legislature_id","type","official_id","title_original","status"],"title":"InitiativeRead"},"InitiativeStatus":{"type":"string","enum":["submitted","in_debate","approved","rejected","withdrawn","expired"],"title":"InitiativeStatus"},"InitiativeStatusCount":{"properties":{"status":{"$ref":"#/components/schemas/InitiativeStatus"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["status","count"],"title":"InitiativeStatusCount"},"InitiativeType":{"type":"string","enum":["proyecto_ley","proposicion_ley","proposicion_no_ley","real_decreto_ley","mocion","interpelacion","other"],"title":"InitiativeType","description":"Types of parliamentary initiatives we track.\n\nValues mirror the categories used by the Congreso open data portal.\nOther chambers will be mapped onto these when possible."},"InitiativeTypeCount":{"properties":{"type":{"$ref":"#/components/schemas/InitiativeType"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["type","count"],"title":"InitiativeTypeCount"},"InterestsRequest":{"properties":{"endpoint":{"type":"string","minLength":1,"title":"Endpoint"},"topic_slugs":{"items":{"type":"string"},"type":"array","title":"Topic Slugs"}},"type":"object","required":["endpoint"],"title":"InterestsRequest"},"LegislatureRead":{"properties":{"id":{"type":"integer","title":"Id"},"chamber_id":{"type":"integer","title":"Chamber Id"},"number":{"type":"string","title":"Number"},"name_ca":{"type":"string","title":"Name Ca"},"name_es":{"type":"string","title":"Name Es"},"name_en":{"type":"string","title":"Name En"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"status":{"$ref":"#/components/schemas/LegislatureStatus"}},"type":"object","required":["id","chamber_id","number","name_ca","name_es","name_en","start_date","status"],"title":"LegislatureRead"},"LegislatureStatus":{"type":"string","enum":["active","dissolved","concluded"],"title":"LegislatureStatus"},"MandateWithPerson":{"properties":{"id":{"type":"integer","title":"Id"},"person_id":{"type":"integer","title":"Person Id"},"chamber_id":{"type":"integer","title":"Chamber Id"},"legislature_id":{"type":"integer","title":"Legislature Id"},"start_date":{"type":"string","format":"date","title":"Start Date"},"end_date":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"title":"End Date"},"constituency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Constituency"},"electoral_list_party":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Electoral List Party"},"person":{"$ref":"#/components/schemas/PersonRead"}},"type":"object","required":["id","person_id","chamber_id","legislature_id","start_date","person"],"title":"MandateWithPerson"},"NewsletterCreate":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"language":{"type":"string","enum":["ca","es","en"],"title":"Language","default":"ca"}},"type":"object","required":["email"],"title":"NewsletterCreate"},"ParliamentaryGroupSummary":{"properties":{"id":{"type":"integer","title":"Id"},"legislature_id":{"type":"integer","title":"Legislature Id"},"slug":{"type":"string","title":"Slug"},"name_short":{"type":"string","title":"Name Short"},"name_long":{"type":"string","title":"Name Long"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"members_active":{"type":"integer","title":"Members Active"}},"type":"object","required":["id","legislature_id","slug","name_short","name_long","members_active"],"title":"ParliamentaryGroupSummary","description":"A group, plus its current member count for at-a-glance lists."},"PersonKPIs":{"properties":{"person_id":{"type":"integer","title":"Person Id"},"votes_total":{"type":"integer","title":"Votes Total"},"votes_cast":{"type":"integer","title":"Votes Cast"},"attendance_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Attendance Pct"},"dissents":{"type":"integer","title":"Dissents"},"dissidence_pct":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Dissidence Pct"}},"type":"object","required":["person_id","votes_total","votes_cast","attendance_pct","dissents","dissidence_pct"],"title":"PersonKPIs","description":"At-a-glance numbers for a deputy's voting record.\n\nAll three are deliberately equal-weight (CLAUDE.md \"regla de simetria\"):\nwe never surface a single ranked metric that could read as a verdict."},"PersonRead":{"properties":{"id":{"type":"integer","title":"Id"},"full_name":{"type":"string","title":"Full Name"},"given_names":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Given Names"},"family_names":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Family Names"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"birth_year":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Birth Year"},"photo_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Photo Url"},"biography_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Biography Url"},"current_group_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Group Slug"},"current_group_short":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Group Short"},"current_group_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Group Color"},"current_constituency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Current Constituency"}},"type":"object","required":["id","full_name"],"title":"PersonRead"},"ProposerCount":{"properties":{"slug":{"type":"string","title":"Slug"},"name_short":{"type":"string","title":"Name Short"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["slug","name_short","color_hex","count"],"title":"ProposerCount","description":"One proposer (parliamentary group OR the cabinet) + an initiative count.\n\n``slug`` is the parliamentary group slug, or ``\"government\"`` for\ngovernment bills (``proposed_by_government=True`` / no group attached)."},"PublicKeyResponse":{"properties":{"public_key":{"type":"string","title":"Public Key","description":"VAPID public key, base64url-encoded uncompressed EC P-256 point (prefix 0x04, 65 bytes total before encoding)."}},"type":"object","required":["public_key"],"title":"PublicKeyResponse"},"PushKeys":{"properties":{"p256dh":{"type":"string","maxLength":255,"minLength":1,"title":"P256Dh"},"auth":{"type":"string","maxLength":255,"minLength":1,"title":"Auth"}},"type":"object","required":["p256dh","auth"],"title":"PushKeys"},"ScheduledAgendaItemRead":{"properties":{"id":{"type":"integer","title":"Id"},"position":{"type":"integer","title":"Position"},"section":{"type":"string","title":"Section"},"kind":{"type":"string","title":"Kind"},"proposing_group":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposing Group"},"subject":{"type":"string","title":"Subject"},"official_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Official Id"},"target_minister":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Target Minister"},"last_seen_at":{"type":"string","format":"date-time","title":"Last Seen At"}},"type":"object","required":["id","position","section","kind","subject","last_seen_at"],"title":"ScheduledAgendaItemRead","description":"One numbered item in an upcoming session's orden del día.\n\nFaithful, factual copy of the source PDF — no editorial framing, no\nauto-classification at this stage. Topics will join later via the\nstandard classifier on the linked ``Initiative`` once a vote materialises."},"ScheduledSessionRead":{"properties":{"id":{"type":"integer","title":"Id"},"chamber_id":{"type":"integer","title":"Chamber Id"},"legislature_id":{"type":"integer","title":"Legislature Id"},"session_number":{"type":"integer","title":"Session Number"},"date":{"type":"string","format":"date","title":"Date"},"pdf_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pdf Url"},"status":{"$ref":"#/components/schemas/ScheduledSessionStatus"},"fetched_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Fetched At"},"last_seen_at":{"type":"string","format":"date-time","title":"Last Seen At"},"items":{"items":{"$ref":"#/components/schemas/ScheduledAgendaItemRead"},"type":"array","title":"Items","default":[]}},"type":"object","required":["id","chamber_id","legislature_id","session_number","date","status","last_seen_at"],"title":"ScheduledSessionRead","description":"An upcoming / planned plenary session."},"ScheduledSessionStatus":{"type":"string","enum":["scheduled","modified","cancelled","completed","planned"],"title":"ScheduledSessionStatus","description":"Lifecycle of a scheduled (future) plenary session.\n\n- ``SCHEDULED``: session has a published orden del día PDF; concrete agenda items.\n- ``MODIFIED``: same as scheduled, but the PDF was reissued after first ingestion\n  (the Mesa published an amendment — items may have been added or excluded).\n- ``CANCELLED``: the calendar previously listed this session but it has since\n  disappeared from the published calendar (i.e. the Mesa cancelled the pleno).\n- ``COMPLETED``: the session date is in the past and the live votes ingest\n  pipeline has taken over. Maintained for historical visibility.\n- ``PLANNED``: the calendar marks the day as a plenary day but no orden del día\n  has been published yet (typical for dates >1 week out). Date only, no items."},"StatusResponse":{"properties":{"status":{"type":"string","title":"Status"},"detail":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Detail"}},"type":"object","required":["status"],"title":"StatusResponse"},"SubscribeRequest":{"properties":{"endpoint":{"type":"string","minLength":1,"title":"Endpoint"},"keys":{"$ref":"#/components/schemas/PushKeys"},"topic_slugs":{"items":{"type":"string"},"type":"array","title":"Topic Slugs"}},"type":"object","required":["endpoint","keys"],"title":"SubscribeRequest"},"TopicCount":{"properties":{"topic_slug":{"type":"string","title":"Topic Slug"},"topic_name_ca":{"type":"string","title":"Topic Name Ca"},"topic_color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Color Hex"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["topic_slug","topic_name_ca","topic_color_hex","count"],"title":"TopicCount","description":"One topic + an initiative count, used in proposer/group breakdowns."},"TopicGlobalRow":{"properties":{"topic_slug":{"type":"string","title":"Topic Slug"},"topic_name_ca":{"type":"string","title":"Topic Name Ca"},"topic_color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Color Hex"},"initiatives_total":{"type":"integer","title":"Initiatives Total"},"initiatives_approved":{"type":"integer","title":"Initiatives Approved"},"initiatives_rejected":{"type":"integer","title":"Initiatives Rejected"},"initiatives_in_debate":{"type":"integer","title":"Initiatives In Debate"},"initiatives_other":{"type":"integer","title":"Initiatives Other"}},"type":"object","required":["topic_slug","topic_name_ca","topic_color_hex","initiatives_total","initiatives_approved","initiatives_rejected","initiatives_in_debate","initiatives_other"],"title":"TopicGlobalRow"},"TopicProposers":{"properties":{"top_proposers":{"items":{"$ref":"#/components/schemas/ProposerCount"},"type":"array","title":"Top Proposers"},"recent_initiatives":{"items":{"$ref":"#/components/schemas/InitiativeMini"},"type":"array","title":"Recent Initiatives"}},"type":"object","required":["top_proposers","recent_initiatives"],"title":"TopicProposers","description":"Who proposes initiatives on a topic + recent activity in that topic."},"TopicRead":{"properties":{"id":{"type":"integer","title":"Id"},"slug":{"type":"string","title":"Slug"},"name_ca":{"type":"string","title":"Name Ca"},"name_es":{"type":"string","title":"Name Es"},"name_en":{"type":"string","title":"Name En"},"color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Color Hex"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"kind":{"type":"string","title":"Kind","default":"theme"},"description_ca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description Ca"},"description_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description Es"},"description_en":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description En"}},"type":"object","required":["id","slug","name_ca","name_es","name_en"],"title":"TopicRead"},"TopicVoteStatRow":{"properties":{"topic_slug":{"type":"string","title":"Topic Slug"},"topic_name_ca":{"type":"string","title":"Topic Name Ca"},"topic_color_hex":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Topic Color Hex"},"ayes":{"type":"integer","title":"Ayes"},"noes":{"type":"integer","title":"Noes"},"abstentions":{"type":"integer","title":"Abstentions"},"no_vote":{"type":"integer","title":"No Vote"},"cast":{"type":"integer","title":"Cast"}},"type":"object","required":["topic_slug","topic_name_ca","topic_color_hex","ayes","noes","abstentions","no_vote","cast"],"title":"TopicVoteStatRow","description":"Vote breakdown for one (entity, topic) pair.\n\nDenominator follows the stats methodology doc: Sí + No + Abst (cast\nvotes only). ``no_vote`` is exposed for the \"didn't show up\" angle\nbut doesn't enter the percentage.\n\n``aye_pct`` etc. are ``None`` when ``cast == 0`` so the renderer can\ndistinguish \"didn't vote any of this topic\" from \"voted 0% in favor\"."},"UnsubscribeRequest":{"properties":{"endpoint":{"type":"string","minLength":1,"title":"Endpoint"}},"type":"object","required":["endpoint"],"title":"UnsubscribeRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VoteRead":{"properties":{"id":{"type":"integer","title":"Id"},"session_id":{"type":"integer","title":"Session Id"},"initiative_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Initiative Id"},"sequence_in_session":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Sequence In Session"},"title":{"type":"string","title":"Title"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"voted_at":{"type":"string","format":"date-time","title":"Voted At"},"result":{"$ref":"#/components/schemas/VoteResult"},"ayes":{"type":"integer","title":"Ayes"},"noes":{"type":"integer","title":"Noes"},"abstentions":{"type":"integer","title":"Abstentions"},"absent":{"type":"integer","title":"Absent"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"expediente_raw":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Expediente Raw"},"graphic_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Graphic Url"},"proposing_group_slug":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposing Group Slug"},"proposing_group_short":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposing Group Short"},"proposing_group_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Proposing Group Color"},"proposed_by_government":{"type":"boolean","title":"Proposed By Government","default":false},"plain_summary_ca":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Ca"},"plain_summary_es":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Es"},"plain_summary_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Plain Summary Provider"}},"type":"object","required":["id","session_id","title","voted_at","result","ayes","noes","abstentions","absent"],"title":"VoteRead"},"VoteResult":{"type":"string","enum":["approved","rejected","tie"],"title":"VoteResult"},"VoteResultCount":{"properties":{"result":{"$ref":"#/components/schemas/VoteResult"},"count":{"type":"integer","title":"Count"}},"type":"object","required":["result","count"],"title":"VoteResultCount"},"app__api__push__SubscriptionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"endpoint":{"type":"string","title":"Endpoint"},"topic_slugs":{"items":{"type":"string"},"type":"array","title":"Topic Slugs"}},"type":"object","required":["id","endpoint","topic_slugs"],"title":"SubscriptionResponse"},"app__api__subscriptions__SubscriptionResponse":{"properties":{"status":{"type":"string","enum":["pending_confirmation","confirmed","unsubscribed"],"title":"Status"},"detail":{"type":"string","title":"Detail","default":"Hem enviat un correu de confirmació. Revisa la teva safata d'entrada."}},"type":"object","required":["status"],"title":"SubscriptionResponse"}}}}