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",
|
"name": "lemmy-js-client",
|
||||||
"description": "A javascript / typescript client for Lemmy",
|
"description": "A javascript / typescript client for Lemmy",
|
||||||
"version": "0.11.0-rc.8",
|
"version": "0.11.0-rc.9",
|
||||||
"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",
|
||||||
|
|
|
@ -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.
|
* `community_name` can only be used for local communities. To get posts for a federated community, pass `community_id` instead.
|
||||||
*/
|
*/
|
||||||
export interface GetComments {
|
export interface GetComments {
|
||||||
type_: string;
|
type_?: string;
|
||||||
sort: string;
|
sort?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
community_id?: number;
|
community_id?: number;
|
||||||
community_name?: string;
|
community_name?: string;
|
||||||
saved_only: boolean;
|
saved_only?: boolean;
|
||||||
auth?: string;
|
auth?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,8 @@ export interface CommunityResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ListCommunities {
|
export interface ListCommunities {
|
||||||
type_: string;
|
type_?: string;
|
||||||
sort: string;
|
sort?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
auth?: string;
|
auth?: string;
|
||||||
|
@ -47,7 +47,7 @@ export interface BanFromCommunity {
|
||||||
community_id: number;
|
community_id: number;
|
||||||
person_id: number;
|
person_id: number;
|
||||||
ban: boolean;
|
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;
|
reason?: string;
|
||||||
expires?: number;
|
expires?: number;
|
||||||
auth: string;
|
auth: string;
|
||||||
|
@ -74,7 +74,7 @@ export interface AddModToCommunityResponse {
|
||||||
*/
|
*/
|
||||||
export interface EditCommunity {
|
export interface EditCommunity {
|
||||||
community_id: number;
|
community_id: number;
|
||||||
title: string;
|
title?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
banner?: string;
|
banner?: string;
|
||||||
|
|
|
@ -76,11 +76,11 @@ export interface LoginResponse {
|
||||||
export interface GetPersonDetails {
|
export interface GetPersonDetails {
|
||||||
person_id?: number;
|
person_id?: number;
|
||||||
username?: string;
|
username?: string;
|
||||||
sort: string;
|
sort?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
community_id?: number;
|
community_id?: number;
|
||||||
saved_only: boolean;
|
saved_only?: boolean;
|
||||||
auth?: string;
|
auth?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -117,7 +117,7 @@ export interface AddAdminResponse {
|
||||||
export interface BanPerson {
|
export interface BanPerson {
|
||||||
person_id: number;
|
person_id: number;
|
||||||
ban: boolean;
|
ban: boolean;
|
||||||
remove_data: boolean; // Removes/Restores their comments, posts, and communities
|
remove_data?: boolean; // Removes/Restores their comments, posts, and communities
|
||||||
reason?: string;
|
reason?: string;
|
||||||
expires?: number;
|
expires?: number;
|
||||||
auth: string;
|
auth: string;
|
||||||
|
@ -129,18 +129,18 @@ export interface BanPersonResponse {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetReplies {
|
export interface GetReplies {
|
||||||
sort: string;
|
sort?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
unread_only: boolean;
|
unread_only?: boolean;
|
||||||
auth: string;
|
auth: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetPersonMentions {
|
export interface GetPersonMentions {
|
||||||
sort: string;
|
sort?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
unread_only: boolean;
|
unread_only?: boolean;
|
||||||
auth: string;
|
auth: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -199,7 +199,7 @@ export interface MarkPrivateMessageAsRead {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface GetPrivateMessages {
|
export interface GetPrivateMessages {
|
||||||
unread_only: boolean;
|
unread_only?: boolean;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
auth: string;
|
auth: string;
|
||||||
|
|
|
@ -10,7 +10,7 @@ export interface CreatePost {
|
||||||
name: string;
|
name: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
body?: string;
|
body?: string;
|
||||||
nsfw: boolean;
|
nsfw?: boolean;
|
||||||
community_id: number;
|
community_id: number;
|
||||||
auth: string;
|
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.
|
* `community_name` can only be used for local communities. To get posts for a federated community, pass `community_id` instead.
|
||||||
*/
|
*/
|
||||||
export interface GetPosts {
|
export interface GetPosts {
|
||||||
type_: string;
|
type_?: string;
|
||||||
sort: string;
|
sort?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
community_id?: number;
|
community_id?: number;
|
||||||
community_name?: string;
|
community_name?: string;
|
||||||
saved_only: boolean;
|
saved_only?: boolean;
|
||||||
auth?: string;
|
auth?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -63,10 +63,10 @@ export interface CreatePostLike {
|
||||||
|
|
||||||
export interface EditPost {
|
export interface EditPost {
|
||||||
post_id: number;
|
post_id: number;
|
||||||
name: string;
|
name?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
body?: string;
|
body?: string;
|
||||||
nsfw: boolean;
|
nsfw?: boolean;
|
||||||
auth: string;
|
auth: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -21,12 +21,12 @@ import {
|
||||||
*/
|
*/
|
||||||
export interface Search {
|
export interface Search {
|
||||||
q: string;
|
q: string;
|
||||||
type_: string;
|
type_?: string;
|
||||||
community_id?: number;
|
community_id?: number;
|
||||||
community_name?: string;
|
community_name?: string;
|
||||||
creator_id?: number;
|
creator_id?: number;
|
||||||
sort: string;
|
sort?: string;
|
||||||
listing_type: string;
|
listing_type?: string;
|
||||||
page?: number;
|
page?: number;
|
||||||
limit?: number;
|
limit?: number;
|
||||||
auth?: string;
|
auth?: string;
|
||||||
|
@ -64,20 +64,20 @@ export interface CreateSite {
|
||||||
description?: string;
|
description?: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
banner?: string;
|
banner?: string;
|
||||||
enable_downvotes: boolean;
|
enable_downvotes?: boolean;
|
||||||
open_registration: boolean;
|
open_registration?: boolean;
|
||||||
enable_nsfw: boolean;
|
enable_nsfw?: boolean;
|
||||||
auth: string;
|
auth: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EditSite {
|
export interface EditSite {
|
||||||
name: string;
|
name?: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
icon?: string;
|
icon?: string;
|
||||||
banner?: string;
|
banner?: string;
|
||||||
enable_downvotes: boolean;
|
enable_downvotes?: boolean;
|
||||||
open_registration: boolean;
|
open_registration?: boolean;
|
||||||
enable_nsfw: boolean;
|
enable_nsfw?: boolean;
|
||||||
auth: string;
|
auth: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue