mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
* Remove save and get SiteConfig. Fixes #68 * v0.17.0-rc.32
This commit is contained in:
parent
82cb50227d
commit
adf324df19
5 changed files with 1 additions and 71 deletions
|
@ -1,7 +1,7 @@
|
||||||
{
|
{
|
||||||
"name": "lemmy-js-client",
|
"name": "lemmy-js-client",
|
||||||
"description": "A javascript / typescript client for Lemmy",
|
"description": "A javascript / typescript client for Lemmy",
|
||||||
"version": "0.17.0-rc.31",
|
"version": "0.17.0-rc.32",
|
||||||
"author": "Dessalines <tyhou13@gmx.com>",
|
"author": "Dessalines <tyhou13@gmx.com>",
|
||||||
"license": "AGPL-3.0",
|
"license": "AGPL-3.0",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
|
|
31
src/http.ts
31
src/http.ts
|
@ -109,8 +109,6 @@ import {
|
||||||
GetModlog,
|
GetModlog,
|
||||||
GetModlogResponse,
|
GetModlogResponse,
|
||||||
GetSite,
|
GetSite,
|
||||||
GetSiteConfig,
|
|
||||||
GetSiteConfigResponse,
|
|
||||||
GetSiteResponse,
|
GetSiteResponse,
|
||||||
GetUnreadRegistrationApplicationCount,
|
GetUnreadRegistrationApplicationCount,
|
||||||
GetUnreadRegistrationApplicationCountResponse,
|
GetUnreadRegistrationApplicationCountResponse,
|
||||||
|
@ -120,7 +118,6 @@ import {
|
||||||
RegistrationApplicationResponse,
|
RegistrationApplicationResponse,
|
||||||
ResolveObject,
|
ResolveObject,
|
||||||
ResolveObjectResponse,
|
ResolveObjectResponse,
|
||||||
SaveSiteConfig,
|
|
||||||
Search,
|
Search,
|
||||||
SearchResponse,
|
SearchResponse,
|
||||||
SiteResponse,
|
SiteResponse,
|
||||||
|
@ -194,34 +191,6 @@ export class LemmyHttp {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get your site configuration.
|
|
||||||
*
|
|
||||||
* `HTTP.GET /site/config`
|
|
||||||
*/
|
|
||||||
async getSiteConfig(form: GetSiteConfig) {
|
|
||||||
return this.wrapper(
|
|
||||||
HttpType.Get,
|
|
||||||
"/site/config",
|
|
||||||
form,
|
|
||||||
GetSiteConfigResponse
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save your site config.
|
|
||||||
*
|
|
||||||
* `HTTP.PUT /site/config`
|
|
||||||
*/
|
|
||||||
async saveSiteConfig(form: SaveSiteConfig) {
|
|
||||||
return this.wrapper(
|
|
||||||
HttpType.Put,
|
|
||||||
"/site/config",
|
|
||||||
form,
|
|
||||||
GetSiteConfigResponse
|
|
||||||
);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the modlog.
|
* Get the modlog.
|
||||||
*
|
*
|
||||||
|
|
|
@ -347,27 +347,6 @@ export class LeaveAdmin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export class GetSiteConfig {
|
|
||||||
auth: string;
|
|
||||||
|
|
||||||
constructor(init: GetSiteConfig) {
|
|
||||||
Object.assign(this, init);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class GetSiteConfigResponse {
|
|
||||||
config_hjson: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
export class SaveSiteConfig {
|
|
||||||
config_hjson: string;
|
|
||||||
auth: string;
|
|
||||||
|
|
||||||
constructor(init: SaveSiteConfig) {
|
|
||||||
Object.assign(this, init);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export class FederatedInstances {
|
export class FederatedInstances {
|
||||||
linked: string[];
|
linked: string[];
|
||||||
@Transform(({ value }) => toOption(value), { toClassOnly: true })
|
@Transform(({ value }) => toOption(value), { toClassOnly: true })
|
||||||
|
|
|
@ -67,8 +67,6 @@ export enum UserOperation {
|
||||||
GetPrivateMessages,
|
GetPrivateMessages,
|
||||||
UserJoin,
|
UserJoin,
|
||||||
GetComments,
|
GetComments,
|
||||||
GetSiteConfig,
|
|
||||||
SaveSiteConfig,
|
|
||||||
PostJoin,
|
PostJoin,
|
||||||
CommunityJoin,
|
CommunityJoin,
|
||||||
ChangePassword,
|
ChangePassword,
|
||||||
|
|
|
@ -74,12 +74,10 @@ import {
|
||||||
EditSite,
|
EditSite,
|
||||||
GetModlog,
|
GetModlog,
|
||||||
GetSite,
|
GetSite,
|
||||||
GetSiteConfig,
|
|
||||||
GetUnreadRegistrationApplicationCount,
|
GetUnreadRegistrationApplicationCount,
|
||||||
LeaveAdmin,
|
LeaveAdmin,
|
||||||
ListRegistrationApplications,
|
ListRegistrationApplications,
|
||||||
ResolveObject,
|
ResolveObject,
|
||||||
SaveSiteConfig,
|
|
||||||
Search,
|
Search,
|
||||||
} from "./interfaces/api/site";
|
} from "./interfaces/api/site";
|
||||||
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
import { CommunityJoin, PostJoin, UserJoin } from "./interfaces/api/websocket";
|
||||||
|
@ -504,13 +502,6 @@ export class LemmyWebsocket {
|
||||||
return wrapper(UserOperation.GetSite, form);
|
return wrapper(UserOperation.GetSite, form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Get your site configuration.
|
|
||||||
*/
|
|
||||||
getSiteConfig(form: GetSiteConfig) {
|
|
||||||
return wrapper(UserOperation.GetSiteConfig, form);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Search lemmy.
|
* Search lemmy.
|
||||||
*/
|
*/
|
||||||
|
@ -623,13 +614,6 @@ export class LemmyWebsocket {
|
||||||
return wrapper(UserOperation.GetPrivateMessages, form);
|
return wrapper(UserOperation.GetPrivateMessages, form);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Save your site config.
|
|
||||||
*/
|
|
||||||
saveSiteConfig(form: SaveSiteConfig) {
|
|
||||||
return wrapper(UserOperation.SaveSiteConfig, form);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Block a person.
|
* Block a person.
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue