mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
Feature/optional fields (#19)
* Making more form fields optional. * v0.11.0-rc.9
This commit is contained in:
parent
d1eacb0314
commit
a201586142
6 changed files with 32 additions and 32 deletions
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"name": "lemmy-js-client",
|
||||
"description": "A javascript / typescript client for Lemmy",
|
||||
"version": "0.11.0-rc.8",
|
||||
"version": "0.11.0-rc.9",
|
||||
"author": "Dessalines <tyhou13@gmx.com>",
|
||||
"license": "AGPL-3.0",
|
||||
"main": "./dist/index.js",
|
||||
|
|
|
@ -67,13 +67,13 @@ export interface CreateCommentLike {
|
|||
* `community_name` can only be used for local communities. To get posts for a federated community, pass `community_id` instead.
|
||||
*/
|
||||
export interface GetComments {
|
||||
type_: string;
|
||||
sort: string;
|
||||
type_?: string;
|
||||
sort?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: number;
|
||||
community_name?: string;
|
||||
saved_only: boolean;
|
||||
saved_only?: boolean;
|
||||
auth?: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -32,8 +32,8 @@ export interface CommunityResponse {
|
|||
}
|
||||
|
||||
export interface ListCommunities {
|
||||
type_: string;
|
||||
sort: string;
|
||||
type_?: string;
|
||||
sort?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
auth?: string;
|
||||
|
@ -47,7 +47,7 @@ export interface BanFromCommunity {
|
|||
community_id: number;
|
||||
person_id: number;
|
||||
ban: boolean;
|
||||
remove_data: boolean; // Removes/Restores their comments and posts for that community
|
||||
remove_data?: boolean; // Removes/Restores their comments and posts for that community
|
||||
reason?: string;
|
||||
expires?: number;
|
||||
auth: string;
|
||||
|
@ -74,7 +74,7 @@ export interface AddModToCommunityResponse {
|
|||
*/
|
||||
export interface EditCommunity {
|
||||
community_id: number;
|
||||
title: string;
|
||||
title?: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
banner?: string;
|
||||
|
|
|
@ -76,11 +76,11 @@ export interface LoginResponse {
|
|||
export interface GetPersonDetails {
|
||||
person_id?: number;
|
||||
username?: string;
|
||||
sort: string;
|
||||
sort?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: number;
|
||||
saved_only: boolean;
|
||||
saved_only?: boolean;
|
||||
auth?: string;
|
||||
}
|
||||
|
||||
|
@ -117,7 +117,7 @@ export interface AddAdminResponse {
|
|||
export interface BanPerson {
|
||||
person_id: number;
|
||||
ban: boolean;
|
||||
remove_data: boolean; // Removes/Restores their comments, posts, and communities
|
||||
remove_data?: boolean; // Removes/Restores their comments, posts, and communities
|
||||
reason?: string;
|
||||
expires?: number;
|
||||
auth: string;
|
||||
|
@ -129,18 +129,18 @@ export interface BanPersonResponse {
|
|||
}
|
||||
|
||||
export interface GetReplies {
|
||||
sort: string;
|
||||
sort?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
unread_only: boolean;
|
||||
unread_only?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
||||
export interface GetPersonMentions {
|
||||
sort: string;
|
||||
sort?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
unread_only: boolean;
|
||||
unread_only?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
||||
|
@ -199,7 +199,7 @@ export interface MarkPrivateMessageAsRead {
|
|||
}
|
||||
|
||||
export interface GetPrivateMessages {
|
||||
unread_only: boolean;
|
||||
unread_only?: boolean;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
auth: string;
|
||||
|
|
|
@ -10,7 +10,7 @@ export interface CreatePost {
|
|||
name: string;
|
||||
url?: string;
|
||||
body?: string;
|
||||
nsfw: boolean;
|
||||
nsfw?: boolean;
|
||||
community_id: number;
|
||||
auth: string;
|
||||
}
|
||||
|
@ -38,13 +38,13 @@ export interface GetPostResponse {
|
|||
* `community_name` can only be used for local communities. To get posts for a federated community, pass `community_id` instead.
|
||||
*/
|
||||
export interface GetPosts {
|
||||
type_: string;
|
||||
sort: string;
|
||||
type_?: string;
|
||||
sort?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
community_id?: number;
|
||||
community_name?: string;
|
||||
saved_only: boolean;
|
||||
saved_only?: boolean;
|
||||
auth?: string;
|
||||
}
|
||||
|
||||
|
@ -63,10 +63,10 @@ export interface CreatePostLike {
|
|||
|
||||
export interface EditPost {
|
||||
post_id: number;
|
||||
name: string;
|
||||
name?: string;
|
||||
url?: string;
|
||||
body?: string;
|
||||
nsfw: boolean;
|
||||
nsfw?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
||||
|
|
|
@ -21,12 +21,12 @@ import {
|
|||
*/
|
||||
export interface Search {
|
||||
q: string;
|
||||
type_: string;
|
||||
type_?: string;
|
||||
community_id?: number;
|
||||
community_name?: string;
|
||||
creator_id?: number;
|
||||
sort: string;
|
||||
listing_type: string;
|
||||
sort?: string;
|
||||
listing_type?: string;
|
||||
page?: number;
|
||||
limit?: number;
|
||||
auth?: string;
|
||||
|
@ -64,20 +64,20 @@ export interface CreateSite {
|
|||
description?: string;
|
||||
icon?: string;
|
||||
banner?: string;
|
||||
enable_downvotes: boolean;
|
||||
open_registration: boolean;
|
||||
enable_nsfw: boolean;
|
||||
enable_downvotes?: boolean;
|
||||
open_registration?: boolean;
|
||||
enable_nsfw?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
||||
export interface EditSite {
|
||||
name: string;
|
||||
name?: string;
|
||||
description?: string;
|
||||
icon?: string;
|
||||
banner?: string;
|
||||
enable_downvotes: boolean;
|
||||
open_registration: boolean;
|
||||
enable_nsfw: boolean;
|
||||
enable_downvotes?: boolean;
|
||||
open_registration?: boolean;
|
||||
enable_nsfw?: boolean;
|
||||
auth: string;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue