feat: site languages, setup and site URL settings

This commit is contained in:
Florian Sylvain committed 2026-11-01 22:13:02 +01:00
1 parent 0806733d5c
commit d9158025d4
106 files changed
+10184 -56

No files matched your search

+45
View File
@@ -1560,6 +1560,43 @@ export const API_GROUPS: ApiGroup[] = [
],
},
),
endpoint(
'site-languages',
'GET',
'/v1/site/{key}/languages',
'List the content languages of a site: the default first, then the other enabled ones, then the disabled ones. Each carries its version and published counts and its social locale. Send the revision back when you change them. A site with no confirmed default answers needs_setup true and no languages.',
'Verified user',
verified([e(401, UNAUTHORIZED), e(404, 'site_not_found')]),
json({
revision: '9f2c4d1e7a',
default: 'en',
needs_setup: false,
languages: [
{
lang: 'en',
enabled: true,
is_default: true,
version_count: 7,
published_count: 6,
social_locale: null,
social_locale_state: 'not_set',
},
{
lang: 'fr',
enabled: true,
is_default: false,
version_count: 4,
published_count: 2,
social_locale: 'fr_FR',
social_locale_state: 'set',
},
],
available: [
{ lang: 'pt', substitute: null },
{ lang: 'pt-PT', substitute: 'pt' },
],
}),
),
endpoint(
'author-list',
'GET',
@@ -1797,6 +1834,7 @@ export const SESSION_GROUPS: SessionGroup[] = [
row('PATCH', '/v1/site/{id}', 'Edit a site'),
row('PATCH', '/v1/site/{id}/default', 'Make a site the default'),
row('DELETE', '/v1/site/{id}', 'Delete a site, moving its articles with reassign_to'),
row('PUT', '/v1/site/{key}/languages', 'Replace the content languages of a site'),
row('POST', '/v1/author/', 'Create an author'),
row(
'PATCH',
@@ -1811,6 +1849,13 @@ export const SESSION_GROUPS: SessionGroup[] = [
row('POST', '/v1/author/me', 'Create your own author profile, as any verified user'),
],
},
{
title: 'Language setup · owner only',
rows: [
row('GET', '/v1/language/setup', 'Sites that still need a default language'),
row('POST', '/v1/language/setup', 'Confirm the default language of every pending site'),
],
},
{
title: 'Image variants',
rows: [