lemmy-js-client 0.19.3-alpha.6 → 0.19.4-alpha.3

Sign up to get free protection for your applications and to get access to all the features.
package/dist/index.d.ts CHANGED
@@ -48,6 +48,7 @@ export { CommunityId } from "./types/CommunityId";
48
48
  export { CommunityModeratorView } from "./types/CommunityModeratorView";
49
49
  export { CommunityResponse } from "./types/CommunityResponse";
50
50
  export { CommunityView } from "./types/CommunityView";
51
+ export { CommunityVisibility } from "./types/CommunityVisibility";
51
52
  export { CreateComment } from "./types/CreateComment";
52
53
  export { CreateCommentLike } from "./types/CreateCommentLike";
53
54
  export { CreateCommentReport } from "./types/CreateCommentReport";
@@ -109,7 +110,6 @@ export { GetSiteResponse } from "./types/GetSiteResponse";
109
110
  export { GetUnreadCountResponse } from "./types/GetUnreadCountResponse";
110
111
  export { GetUnreadRegistrationApplicationCountResponse } from "./types/GetUnreadRegistrationApplicationCountResponse";
111
112
  export { HideCommunity } from "./types/HideCommunity";
112
- export { ImageUpload } from "./types/ImageUpload";
113
113
  export { Instance } from "./types/Instance";
114
114
  export { InstanceBlockView } from "./types/InstanceBlockView";
115
115
  export { InstanceId } from "./types/InstanceId";
@@ -117,6 +117,7 @@ export { InstanceWithFederationState } from "./types/InstanceWithFederationState
117
117
  export { Language } from "./types/Language";
118
118
  export { LanguageId } from "./types/LanguageId";
119
119
  export { LemmyErrorType } from "./types/LemmyErrorType";
120
+ export { LinkMetadata } from "./types/LinkMetadata";
120
121
  export { ListCommentLikes } from "./types/ListCommentLikes";
121
122
  export { ListCommentLikesResponse } from "./types/ListCommentLikesResponse";
122
123
  export { ListCommentReports } from "./types/ListCommentReports";
@@ -171,6 +172,7 @@ export { ModTransferCommunityView } from "./types/ModTransferCommunityView";
171
172
  export { ModlogActionType } from "./types/ModlogActionType";
172
173
  export { ModlogListParams } from "./types/ModlogListParams";
173
174
  export { MyUserInfo } from "./types/MyUserInfo";
175
+ export { OpenGraphData } from "./types/OpenGraphData";
174
176
  export { PaginationCursor } from "./types/PaginationCursor";
175
177
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
176
178
  export { PasswordReset } from "./types/PasswordReset";
@@ -231,7 +233,6 @@ export { SearchType } from "./types/SearchType";
231
233
  export { Site } from "./types/Site";
232
234
  export { SiteAggregates } from "./types/SiteAggregates";
233
235
  export { SiteId } from "./types/SiteId";
234
- export { SiteMetadata } from "./types/SiteMetadata";
235
236
  export { SiteResponse } from "./types/SiteResponse";
236
237
  export { SiteView } from "./types/SiteView";
237
238
  export { SortType } from "./types/SortType";
@@ -243,4 +244,3 @@ export { UpdateTotp } from "./types/UpdateTotp";
243
244
  export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
244
245
  export { VerifyEmail } from "./types/VerifyEmail";
245
246
  export { VoteView } from "./types/VoteView";
246
- export { UploadImage, UploadImageResponse, ImageFile, DeleteImage, } from "./other_types";
@@ -1,4 +1,5 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { CommunityVisibility } from "./CommunityVisibility";
2
3
  import type { InstanceId } from "./InstanceId";
3
4
  export interface Community {
4
5
  id: CommunityId;
@@ -17,4 +18,5 @@ export interface Community {
17
18
  hidden: boolean;
18
19
  posting_restricted_to_mods: boolean;
19
20
  instance_id: InstanceId;
21
+ visibility: CommunityVisibility;
20
22
  }
@@ -9,4 +9,5 @@ export interface CommunityAggregates {
9
9
  users_active_week: number;
10
10
  users_active_month: number;
11
11
  users_active_half_year: number;
12
+ subscribers_local: number;
12
13
  }
@@ -6,4 +6,5 @@ export interface CommunityView {
6
6
  subscribed: SubscribedType;
7
7
  blocked: boolean;
8
8
  counts: CommunityAggregates;
9
+ banned_from_community: boolean;
9
10
  }
@@ -0,0 +1 @@
1
+ export type CommunityVisibility = "Public" | "LocalOnly";
@@ -1,3 +1,4 @@
1
+ import type { CommunityVisibility } from "./CommunityVisibility";
1
2
  import type { LanguageId } from "./LanguageId";
2
3
  export interface CreateCommunity {
3
4
  name: string;
@@ -8,4 +9,5 @@ export interface CreateCommunity {
8
9
  nsfw?: boolean;
9
10
  posting_restricted_to_mods?: boolean;
10
11
  discussion_languages?: Array<LanguageId>;
12
+ visibility?: CommunityVisibility;
11
13
  }
@@ -8,4 +8,5 @@ export interface CreatePost {
8
8
  honeypot?: string;
9
9
  nsfw?: boolean;
10
10
  language_id?: LanguageId;
11
+ custom_thumbnail?: string;
11
12
  }
@@ -1,6 +1,8 @@
1
1
  import type { LanguageId } from "./LanguageId";
2
2
  import type { ListingType } from "./ListingType";
3
+ import type { PostListingMode } from "./PostListingMode";
3
4
  import type { RegistrationMode } from "./RegistrationMode";
5
+ import type { SortType } from "./SortType";
4
6
  export interface CreateSite {
5
7
  name: string;
6
8
  sidebar?: string;
@@ -15,6 +17,7 @@ export interface CreateSite {
15
17
  private_instance?: boolean;
16
18
  default_theme?: string;
17
19
  default_post_listing_type?: ListingType;
20
+ default_sort_type?: SortType;
18
21
  legal_information?: string;
19
22
  application_email_admins?: boolean;
20
23
  hide_modlog_mod_names?: boolean;
@@ -41,4 +44,6 @@ export interface CreateSite {
41
44
  blocked_instances?: Array<string>;
42
45
  taglines?: Array<string>;
43
46
  registration_mode?: RegistrationMode;
47
+ content_warning?: string;
48
+ default_post_listing_mode?: PostListingMode;
44
49
  }
@@ -1,4 +1,5 @@
1
1
  import type { CommunityId } from "./CommunityId";
2
+ import type { CommunityVisibility } from "./CommunityVisibility";
2
3
  import type { LanguageId } from "./LanguageId";
3
4
  export interface EditCommunity {
4
5
  community_id: CommunityId;
@@ -9,4 +10,5 @@ export interface EditCommunity {
9
10
  nsfw?: boolean;
10
11
  posting_restricted_to_mods?: boolean;
11
12
  discussion_languages?: Array<LanguageId>;
13
+ visibility?: CommunityVisibility;
12
14
  }
@@ -7,4 +7,5 @@ export interface EditPost {
7
7
  body?: string;
8
8
  nsfw?: boolean;
9
9
  language_id?: LanguageId;
10
+ custom_thumbnail?: string;
10
11
  }
@@ -1,6 +1,8 @@
1
1
  import type { LanguageId } from "./LanguageId";
2
2
  import type { ListingType } from "./ListingType";
3
+ import type { PostListingMode } from "./PostListingMode";
3
4
  import type { RegistrationMode } from "./RegistrationMode";
5
+ import type { SortType } from "./SortType";
4
6
  export interface EditSite {
5
7
  name?: string;
6
8
  sidebar?: string;
@@ -15,6 +17,7 @@ export interface EditSite {
15
17
  private_instance?: boolean;
16
18
  default_theme?: string;
17
19
  default_post_listing_type?: ListingType;
20
+ default_sort_type?: SortType;
18
21
  legal_information?: string;
19
22
  application_email_admins?: boolean;
20
23
  hide_modlog_mod_names?: boolean;
@@ -42,4 +45,6 @@ export interface EditSite {
42
45
  taglines?: Array<string>;
43
46
  registration_mode?: RegistrationMode;
44
47
  reports_email_admins?: boolean;
48
+ content_warning?: string;
49
+ default_post_listing_mode?: PostListingMode;
45
50
  }
@@ -1,4 +1,4 @@
1
- import type { SiteMetadata } from "./SiteMetadata";
1
+ import type { LinkMetadata } from "./LinkMetadata";
2
2
  export interface GetSiteMetadataResponse {
3
- metadata: SiteMetadata;
3
+ metadata: LinkMetadata;
4
4
  }
@@ -0,0 +1,7 @@
1
+ export interface LinkMetadata {
2
+ title?: string;
3
+ description?: string;
4
+ image?: string;
5
+ embed_video_url?: string;
6
+ content_type?: string;
7
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,7 +1,9 @@
1
1
  import type { ListingType } from "./ListingType";
2
2
  import type { LocalSiteId } from "./LocalSiteId";
3
+ import type { PostListingMode } from "./PostListingMode";
3
4
  import type { RegistrationMode } from "./RegistrationMode";
4
5
  import type { SiteId } from "./SiteId";
6
+ import type { SortType } from "./SortType";
5
7
  export interface LocalSite {
6
8
  id: LocalSiteId;
7
9
  site_id: SiteId;
@@ -27,4 +29,6 @@ export interface LocalSite {
27
29
  registration_mode: RegistrationMode;
28
30
  reports_email_admins: boolean;
29
31
  federation_signed_fetch: boolean;
32
+ default_post_listing_mode: PostListingMode;
33
+ default_sort_type: SortType;
30
34
  }
@@ -1,4 +1,4 @@
1
- export interface SiteMetadata {
1
+ export interface OpenGraphData {
2
2
  title?: string;
3
3
  description?: string;
4
4
  image?: string;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -24,4 +24,5 @@ export interface Post {
24
24
  language_id: LanguageId;
25
25
  featured_community: boolean;
26
26
  featured_local: boolean;
27
+ url_content_type?: string;
27
28
  }
@@ -15,4 +15,5 @@ export interface Site {
15
15
  private_key?: string;
16
16
  public_key: string;
17
17
  instance_id: InstanceId;
18
+ content_warning?: string;
18
19
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "lemmy-js-client",
3
3
  "description": "A javascript / typescript client for Lemmy",
4
- "version": "0.19.3-alpha.6",
4
+ "version": "0.19.4-alpha.3",
5
5
  "author": "Dessalines <tyhou13@gmx.com>",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -19,24 +19,24 @@
19
19
  "url": "git+https://github.com/LemmyNet/lemmy-js-client.git"
20
20
  },
21
21
  "dependencies": {
22
- "cross-fetch": "^3.1.5",
22
+ "cross-fetch": "^4.0.0",
23
23
  "form-data": "^4.0.0"
24
24
  },
25
25
  "devDependencies": {
26
- "@types/node": "^20.11.10",
27
- "@typescript-eslint/eslint-plugin": "^6.13.1",
28
- "@typescript-eslint/parser": "^6.13.1",
29
- "eslint": "^8.54.0",
30
- "eslint-plugin-prettier": "^5.0.1",
31
- "husky": "^9.0.6",
32
- "lint-staged": "^15.1.0",
33
- "prettier": "^3.1.0",
26
+ "@types/node": "^20.11.19",
27
+ "@typescript-eslint/eslint-plugin": "^7.0.1",
28
+ "@typescript-eslint/parser": "^7.0.1",
29
+ "eslint": "^8.56.0",
30
+ "eslint-plugin-prettier": "^5.1.3",
31
+ "husky": "^9.0.11",
32
+ "lint-staged": "^15.2.2",
33
+ "prettier": "^3.2.5",
34
34
  "prettier-plugin-import-sort": "^0.0.7",
35
35
  "prettier-plugin-organize-imports": "^3.2.4",
36
- "prettier-plugin-packagejson": "^2.4.6",
37
- "sortpack": "^2.3.5",
38
- "typedoc": "^0.25.7",
39
- "typescript": "^5.3.2"
36
+ "prettier-plugin-packagejson": "^2.4.11",
37
+ "sortpack": "^2.4.0",
38
+ "typedoc": "^0.25.8",
39
+ "typescript": "^5.3.3"
40
40
  },
41
41
  "types": "./dist/index.d.ts",
42
42
  "lint-staged": {
@@ -1,7 +0,0 @@
1
- import type { LocalUserId } from "./LocalUserId";
2
- export interface ImageUpload {
3
- local_user_id: LocalUserId;
4
- pictrs_alias: string;
5
- pictrs_delete_token: string;
6
- published: string;
7
- }
@@ -1,2 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });