mirror of
https://github.com/LemmyNet/lemmy-js-client.git
synced 2024-11-01 01:59:55 +00:00
Trying to add string dates to javascript Date.
This commit is contained in:
parent
fa3178cf5a
commit
e294b8bdee
2 changed files with 30 additions and 30 deletions
|
@ -23,7 +23,7 @@ export interface PostAggregates {
|
||||||
score: number;
|
score: number;
|
||||||
upvotes: number;
|
upvotes: number;
|
||||||
downvotes: number;
|
downvotes: number;
|
||||||
newest_comment_time: string;
|
newest_comment_time: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CommunityAggregates {
|
export interface CommunityAggregates {
|
||||||
|
|
|
@ -7,8 +7,8 @@ export interface UserSafe {
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
admin: boolean;
|
admin: boolean;
|
||||||
banned: boolean;
|
banned: boolean;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
matrix_user_id?: string;
|
matrix_user_id?: string;
|
||||||
actor_id: string;
|
actor_id: string;
|
||||||
bio?: string;
|
bio?: string;
|
||||||
|
@ -25,8 +25,8 @@ export interface UserSafeSettings {
|
||||||
avatar?: string;
|
avatar?: string;
|
||||||
admin: boolean;
|
admin: boolean;
|
||||||
banned: boolean;
|
banned: boolean;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
show_nsfw: boolean;
|
show_nsfw: boolean;
|
||||||
theme: string;
|
theme: string;
|
||||||
default_sort_type: number;
|
default_sort_type: number;
|
||||||
|
@ -48,8 +48,8 @@ export interface Site {
|
||||||
name: string;
|
name: string;
|
||||||
description?: string;
|
description?: string;
|
||||||
creator_id: number;
|
creator_id: number;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
enable_downvotes: boolean;
|
enable_downvotes: boolean;
|
||||||
open_registration: boolean;
|
open_registration: boolean;
|
||||||
enable_nsfw: boolean;
|
enable_nsfw: boolean;
|
||||||
|
@ -64,8 +64,8 @@ export interface PrivateMessage {
|
||||||
content: string;
|
content: string;
|
||||||
deleted: boolean;
|
deleted: boolean;
|
||||||
read: boolean;
|
read: boolean;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
ap_id: string;
|
ap_id: string;
|
||||||
local: boolean;
|
local: boolean;
|
||||||
}
|
}
|
||||||
|
@ -80,8 +80,8 @@ export interface PostReport {
|
||||||
reason: string;
|
reason: string;
|
||||||
resolved: boolean;
|
resolved: boolean;
|
||||||
resolver_id?: number;
|
resolver_id?: number;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Post {
|
export interface Post {
|
||||||
|
@ -93,8 +93,8 @@ export interface Post {
|
||||||
community_id: number;
|
community_id: number;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
locked: boolean;
|
locked: boolean;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
deleted: boolean;
|
deleted: boolean;
|
||||||
nsfw: boolean;
|
nsfw: boolean;
|
||||||
stickied: boolean;
|
stickied: boolean;
|
||||||
|
@ -110,7 +110,7 @@ export interface PasswordResetRequest {
|
||||||
id: number;
|
id: number;
|
||||||
user_id: number;
|
user_id: number;
|
||||||
token_encrypted: string;
|
token_encrypted: string;
|
||||||
published: string;
|
published: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModRemovePost {
|
export interface ModRemovePost {
|
||||||
|
@ -119,7 +119,7 @@ export interface ModRemovePost {
|
||||||
post_id: number;
|
post_id: number;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
removed?: boolean;
|
removed?: boolean;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModLockPost {
|
export interface ModLockPost {
|
||||||
|
@ -127,7 +127,7 @@ export interface ModLockPost {
|
||||||
mod_user_id: number;
|
mod_user_id: number;
|
||||||
post_id: number;
|
post_id: number;
|
||||||
locked?: boolean;
|
locked?: boolean;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModStickyPost {
|
export interface ModStickyPost {
|
||||||
|
@ -135,7 +135,7 @@ export interface ModStickyPost {
|
||||||
mod_user_id: number;
|
mod_user_id: number;
|
||||||
post_id: number;
|
post_id: number;
|
||||||
stickied?: boolean;
|
stickied?: boolean;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModRemoveComment {
|
export interface ModRemoveComment {
|
||||||
|
@ -144,7 +144,7 @@ export interface ModRemoveComment {
|
||||||
comment_id: number;
|
comment_id: number;
|
||||||
reason?: string;
|
reason?: string;
|
||||||
removed?: boolean;
|
removed?: boolean;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModRemoveCommunity {
|
export interface ModRemoveCommunity {
|
||||||
|
@ -154,7 +154,7 @@ export interface ModRemoveCommunity {
|
||||||
reason?: string;
|
reason?: string;
|
||||||
removed?: boolean;
|
removed?: boolean;
|
||||||
expires?: string;
|
expires?: string;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModBanFromCommunity {
|
export interface ModBanFromCommunity {
|
||||||
|
@ -165,7 +165,7 @@ export interface ModBanFromCommunity {
|
||||||
reason?: string;
|
reason?: string;
|
||||||
banned?: boolean;
|
banned?: boolean;
|
||||||
expires?: string;
|
expires?: string;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModBan {
|
export interface ModBan {
|
||||||
|
@ -175,7 +175,7 @@ export interface ModBan {
|
||||||
reason?: string;
|
reason?: string;
|
||||||
banned?: boolean;
|
banned?: boolean;
|
||||||
expires?: string;
|
expires?: string;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModAddCommunity {
|
export interface ModAddCommunity {
|
||||||
|
@ -184,7 +184,7 @@ export interface ModAddCommunity {
|
||||||
other_user_id: number;
|
other_user_id: number;
|
||||||
community_id: number;
|
community_id: number;
|
||||||
removed?: boolean;
|
removed?: boolean;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ModAdd {
|
export interface ModAdd {
|
||||||
|
@ -192,7 +192,7 @@ export interface ModAdd {
|
||||||
mod_user_id: number;
|
mod_user_id: number;
|
||||||
other_user_id: number;
|
other_user_id: number;
|
||||||
removed?: boolean;
|
removed?: boolean;
|
||||||
when_: string;
|
when_: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface CommunitySafe {
|
export interface CommunitySafe {
|
||||||
|
@ -203,8 +203,8 @@ export interface CommunitySafe {
|
||||||
category_id: number;
|
category_id: number;
|
||||||
creator_id: number;
|
creator_id: number;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
deleted: boolean;
|
deleted: boolean;
|
||||||
nsfw: boolean;
|
nsfw: boolean;
|
||||||
actor_id: string;
|
actor_id: string;
|
||||||
|
@ -221,8 +221,8 @@ export interface CommentReport {
|
||||||
reason: string;
|
reason: string;
|
||||||
resolved: boolean;
|
resolved: boolean;
|
||||||
resolver_id?: number;
|
resolver_id?: number;
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface Comment {
|
export interface Comment {
|
||||||
|
@ -233,8 +233,8 @@ export interface Comment {
|
||||||
content: string;
|
content: string;
|
||||||
removed: boolean;
|
removed: boolean;
|
||||||
read: boolean; // Whether the recipient has read the comment or not
|
read: boolean; // Whether the recipient has read the comment or not
|
||||||
published: string;
|
published: Date;
|
||||||
updated?: string;
|
updated?: Date;
|
||||||
deleted: boolean;
|
deleted: boolean;
|
||||||
ap_id: string;
|
ap_id: string;
|
||||||
local: boolean;
|
local: boolean;
|
||||||
|
@ -250,5 +250,5 @@ export interface UserMention {
|
||||||
recipient_id: number;
|
recipient_id: number;
|
||||||
comment_id: number;
|
comment_id: number;
|
||||||
read: boolean;
|
read: boolean;
|
||||||
published: string;
|
published: Date;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue