pl-api: update feature definitions for iceshrimp net

Signed-off-by: mkljczk <git@mkljczk.pl>
This commit is contained in:
mkljczk 2024-12-04 12:02:55 +01:00
parent 6472a5e4e2
commit 22f0f09ce6
4 changed files with 27 additions and 6 deletions

View file

@ -257,6 +257,7 @@ const getFeatures = (instance: Instance) => {
announcements: any([
v.software === FIREFISH,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA,
v.software === TAKAHE && gte(v.version, '0.7.0'),
@ -283,6 +284,7 @@ const getFeatures = (instance: Instance) => {
* see POST /api/v1/bite
*/
bites: any([
v.software === ICESHRIMP_NET,
v.software === TOKI,
instance.api_versions['bites.pleroma.pl-api'] >= 1,
]),
@ -309,6 +311,7 @@ const getFeatures = (instance: Instance) => {
v.software === FIREFISH,
v.software === GOTOSOCIAL,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === FRIENDICA,
v.software === MASTODON,
v.software === MITRA && gte(v.version, '3.3.0'),
@ -325,6 +328,7 @@ const getFeatures = (instance: Instance) => {
bots: any([
v.software === GOTOSOCIAL,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA,
]),
@ -359,6 +363,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA,
v.software === GOTOSOCIAL && gte(v.version, '0.17.0'),
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PIXELFED,
v.software === PLEROMA,
@ -439,6 +444,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA,
v.software === GOTOSOCIAL,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === MITRA,
v.software === PIXELFED,
@ -455,6 +461,7 @@ const getFeatures = (instance: Instance) => {
v.software === FIREFISH,
v.software === FRIENDICA && gte(v.version, '2022.12.0'),
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === MITRA,
v.software === TAKAHE && gte(v.version, '0.8.0'),
@ -527,6 +534,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA,
v.software === GOTOSOCIAL,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === TAKAHE && gte(v.version, '0.6.1'),
v.software === TOKI,
@ -563,6 +571,7 @@ const getFeatures = (instance: Instance) => {
*/
filtersV2: any([
v.software === GOTOSOCIAL && gte(v.version, '0.16.0'),
v.software === ICESHRIMP_NET,
v.software === MASTODON,
]),
@ -624,6 +633,7 @@ const getFeatures = (instance: Instance) => {
*/
frontendConfigurations: any([
v.software === DITTO,
v.software === ICESHRIMP_NET,
v.software === PLEROMA,
]),
@ -750,6 +760,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA,
v.software === GOTOSOCIAL,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA,
]),
@ -820,6 +831,7 @@ const getFeatures = (instance: Instance) => {
mediaV2: any([
v.software === FIREFISH,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === MITRA,
v.software === PLEROMA,
@ -850,6 +862,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA,
v.software === GOTOSOCIAL && gte(v.version, '0.16.0'),
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === MITRA,
v.software === PIXELFED,
@ -865,6 +878,7 @@ const getFeatures = (instance: Instance) => {
v.software === FIREFISH,
v.software === GOTOSOCIAL && gte(v.version, '0.16.0'),
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA,
v.software === TAKAHE,
@ -903,6 +917,7 @@ const getFeatures = (instance: Instance) => {
notificationsIncludeTypes: any([
v.software === FIREFISH,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA && gte(v.version, '2.5.0'),
v.software === TAKAHE && gte(v.version, '0.6.2'),
@ -965,6 +980,7 @@ const getFeatures = (instance: Instance) => {
polls: any([
v.software === FIREFISH,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === TAKAHE && gte(v.version, '0.8.0'),
v.software === GOTOSOCIAL,
@ -1014,6 +1030,7 @@ const getFeatures = (instance: Instance) => {
v.software === DITTO,
v.software === GOTOSOCIAL,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === MITRA,
v.software === PLEROMA,
@ -1037,6 +1054,7 @@ const getFeatures = (instance: Instance) => {
v.software === FRIENDICA,
v.software === GOTOSOCIAL,
v.software === ICESHRIMP,
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA,
v.software === TAKAHE,
@ -1048,6 +1066,7 @@ const getFeatures = (instance: Instance) => {
* @see POST /api/v1/statuses
*/
quotePosts: any([
v.software === ICESHRIMP_NET,
v.software === FRIENDICA && gte(v.version, '2023.3.0'),
v.software === PLEROMA && [REBASED, AKKOMA].includes(v.build!) && gte(v.version, '2.5.0'),
instance.api_versions['quote_posting.pleroma.pl-api'] >= 1,
@ -1059,6 +1078,7 @@ const getFeatures = (instance: Instance) => {
* @see POST /api/v1/statuses/:id/reblog
*/
reblogVisibility: any([
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA,
]),
@ -1074,6 +1094,7 @@ const getFeatures = (instance: Instance) => {
* @see POST /api/v1/accounts/:id/remove_from_followers
*/
removeFromFollowers: any([
v.software === ICESHRIMP_NET,
v.software === MASTODON,
v.software === PLEROMA && gte(v.version, '2.5.0'),
v.software === PLEROMA && v.build === AKKOMA,

View file

@ -1,6 +1,6 @@
{
"name": "pl-api",
"version": "1.0.0-rc.1",
"version": "1.0.0-rc.2",
"type": "module",
"homepage": "https://github.com/mkljczk/pl-fe/tree/develop/packages/pl-api",
"repository": {

View file

@ -101,7 +101,7 @@
"multiselect-react-dropdown": "^2.0.25",
"mutative": "^1.0.11",
"path-browserify": "^1.0.1",
"pl-api": "^1.0.0-rc.1",
"pl-api": "^1.0.0-rc.2",
"postcss": "^8.4.47",
"process": "^0.11.10",
"punycode": "^2.1.1",

View file

@ -7620,10 +7620,10 @@ pkg-dir@^4.1.0:
dependencies:
find-up "^4.0.0"
pl-api@^1.0.0-rc.1:
version "1.0.0-rc.1"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.1.tgz#e5b1ead42230ed86e57ebaf020f3a2114da3bce0"
integrity sha512-bwV831HoATajRlmZg4USIzQvHgZC9MBAg0/sN/T5uXrM5tcUzfM+qU5ZQIzk+r5gSQ0ZCwqkjbajvhbn9tRcBA==
pl-api@^1.0.0-rc.2:
version "1.0.0-rc.2"
resolved "https://registry.yarnpkg.com/pl-api/-/pl-api-1.0.0-rc.2.tgz#e6fb11b11bae2464974a88cce19901f458ef07e7"
integrity sha512-iF+NLNGkng/CTOyH84+0UJOWm02zB/MA7t6U9Wpu/QIMqqqjMPuwl6jcF9JhbB/V6TcBegzHZcmjUViz3zQxeA==
dependencies:
blurhash "^2.0.5"
http-link-header "^1.1.3"