lemmy-js-client 1.0.0-bool-vote.1 → 1.0.0-bool-vote.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (32) hide show
  1. package/dist/http.d.ts +2 -2
  2. package/dist/http.js +3 -4
  3. package/dist/index.d.ts +2 -2
  4. package/dist/index.js +0 -3
  5. package/dist/other_types.d.ts +0 -3
  6. package/dist/types/CommentSortType.d.ts +1 -1
  7. package/dist/types/CommunityFollowerState.d.ts +1 -1
  8. package/dist/types/CommunityNotificationsMode.d.ts +1 -1
  9. package/dist/types/CommunitySortType.d.ts +1 -1
  10. package/dist/types/CommunityVisibility.d.ts +1 -1
  11. package/dist/types/FederationMode.d.ts +1 -1
  12. package/dist/types/LikeType.d.ts +1 -1
  13. package/dist/types/ListCommunityPendingFollows.d.ts +1 -1
  14. package/dist/types/ListCommunityPendingFollowsResponse.d.ts +2 -2
  15. package/dist/types/ListingType.d.ts +1 -1
  16. package/dist/types/ModlogActionType.d.ts +1 -1
  17. package/dist/types/NotificationDataType.d.ts +1 -1
  18. package/dist/types/NotificationType.d.ts +1 -1
  19. package/dist/types/PendingFollowerView.d.ts +9 -0
  20. package/dist/types/PersonContentType.d.ts +1 -1
  21. package/dist/types/PostFeatureType.d.ts +1 -1
  22. package/dist/types/PostListingMode.d.ts +1 -1
  23. package/dist/types/PostNotificationsMode.d.ts +1 -1
  24. package/dist/types/PostSortType.d.ts +1 -1
  25. package/dist/types/RegistrationMode.d.ts +1 -1
  26. package/dist/types/ReportType.d.ts +1 -1
  27. package/dist/types/SearchSortType.d.ts +1 -1
  28. package/dist/types/SearchType.d.ts +1 -1
  29. package/dist/types/VoteShow.d.ts +1 -1
  30. package/package.json +1 -1
  31. package/dist/types/GetCommunityPendingFollowsCount.d.ts +0 -4
  32. /package/dist/types/{GetCommunityPendingFollowsCount.js → PendingFollowerView.js} +0 -0
package/dist/http.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import { Controller } from "@tsoa/runtime";
2
- import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetCommunityPendingFollowsCountI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListNotificationsI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
2
+ import { AdminListUsersI, CommunityIdQueryI, DeleteImageParamsI, GetCommentI, GetCommentsI, GetCommunityI, GetModlogI, GetMultiCommunityI, GetPersonDetailsI, GetPostI, GetPostsI, GetRandomCommunityI, GetRegistrationApplicationI, GetReportCountI, GetSiteMetadataI, ListCommentLikesI, ListCommunitiesI, ListCommunityPendingFollowsI, ListCustomEmojisI, ListNotificationsI, ListMediaI, ListMultiCommunitiesI, ListPersonContentI, ListPersonHiddenI, ListPersonLikedI, ListPersonReadI, ListPersonSavedI, ListPostLikesI, ListRegistrationApplicationsI, ListReportsI, ListTaglinesI, ResolveObjectI, SearchI, UploadImage } from "./other_types";
3
3
  import { AddAdmin } from "./types/AddAdmin";
4
4
  import { AddAdminResponse } from "./types/AddAdminResponse";
5
5
  import { AddModToCommunity } from "./types/AddModToCommunity";
@@ -270,7 +270,7 @@ export declare class LemmyHttp extends Controller {
270
270
  /**
271
271
  * @summary Get a community's pending follows count.
272
272
  */
273
- getCommunityPendingFollowsCount(form: GetCommunityPendingFollowsCountI, options?: RequestOptions): Promise<GetCommunityPendingFollowsCountResponse>;
273
+ getCommunityPendingFollowsCount(options?: RequestOptions): Promise<GetCommunityPendingFollowsCountResponse>;
274
274
  /**
275
275
  * @summary Get a community's pending followers.
276
276
  */
package/dist/http.js CHANGED
@@ -205,8 +205,8 @@ let LemmyHttp = class LemmyHttp extends runtime_1.Controller {
205
205
  /**
206
206
  * @summary Get a community's pending follows count.
207
207
  */
208
- async getCommunityPendingFollowsCount(form, options) {
209
- return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", form, options);
208
+ async getCommunityPendingFollowsCount(options) {
209
+ return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/community/pending_follows/count", {}, options);
210
210
  }
211
211
  /**
212
212
  * @summary Get a community's pending followers.
@@ -1191,8 +1191,7 @@ __decorate([
1191
1191
  (0, runtime_1.Security)("bearerAuth"),
1192
1192
  (0, runtime_1.Get)("/community/pending_follows/count"),
1193
1193
  (0, runtime_1.Tags)("Community"),
1194
- __param(0, (0, runtime_1.Queries)()),
1195
- __param(1, (0, runtime_1.Inject)())
1194
+ __param(0, (0, runtime_1.Inject)())
1196
1195
  ], LemmyHttp.prototype, "getCommunityPendingFollowsCount", null);
1197
1196
  __decorate([
1198
1197
  (0, runtime_1.Security)("bearerAuth"),
package/dist/index.d.ts CHANGED
@@ -36,7 +36,7 @@ export { AdminPurgePostView } from "./types/AdminPurgePostView";
36
36
  export { AdminRemoveCommunity } from "./types/AdminRemoveCommunity";
37
37
  export { AdminRemoveCommunityId } from "./types/AdminRemoveCommunityId";
38
38
  export { AdminRemoveCommunityView } from "./types/AdminRemoveCommunityView";
39
- export { AllLemmyErrors } from "./types/AllLemmyErrors";
39
+ export {} from "./types/AllLemmyErrors";
40
40
  export { ApproveCommunityPendingFollower } from "./types/ApproveCommunityPendingFollower";
41
41
  export { ApproveRegistrationApplication } from "./types/ApproveRegistrationApplication";
42
42
  export { AuthenticateWithOauth } from "./types/AuthenticateWithOauth";
@@ -129,7 +129,6 @@ export { GetComments } from "./types/GetComments";
129
129
  export { GetCommentsResponse } from "./types/GetCommentsResponse";
130
130
  export { GetCommentsSlimResponse } from "./types/GetCommentsSlimResponse";
131
131
  export { GetCommunity } from "./types/GetCommunity";
132
- export { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
133
132
  export { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPendingFollowsCountResponse";
134
133
  export { GetCommunityResponse } from "./types/GetCommunityResponse";
135
134
  export { GetFederatedInstancesResponse } from "./types/GetFederatedInstancesResponse";
@@ -268,6 +267,7 @@ export { PaginationCursor } from "./types/PaginationCursor";
268
267
  export { PasswordChangeAfterReset } from "./types/PasswordChangeAfterReset";
269
268
  export { PasswordReset } from "./types/PasswordReset";
270
269
  export { PendingFollow } from "./types/PendingFollow";
270
+ export { PendingFollowerView } from "./types/PendingFollowerView";
271
271
  export { Person } from "./types/Person";
272
272
  export { PersonActions } from "./types/PersonActions";
273
273
  export { PersonContentCombinedView } from "./types/PersonContentCombinedView";
package/dist/index.js CHANGED
@@ -14,7 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.AllLemmyErrors = void 0;
18
17
  __exportStar(require("./http"), exports);
19
- var AllLemmyErrors_1 = require("./types/AllLemmyErrors");
20
- Object.defineProperty(exports, "AllLemmyErrors", { enumerable: true, get: function () { return AllLemmyErrors_1.AllLemmyErrors; } });
@@ -4,7 +4,6 @@ import { DeleteImageParams } from "./types/DeleteImageParams";
4
4
  import { GetComment } from "./types/GetComment";
5
5
  import { GetComments } from "./types/GetComments";
6
6
  import { GetCommunity } from "./types/GetCommunity";
7
- import { GetCommunityPendingFollowsCount } from "./types/GetCommunityPendingFollowsCount";
8
7
  import { GetModlog } from "./types/GetModlog";
9
8
  import { GetMultiCommunity } from "./types/GetMultiCommunity";
10
9
  import { GetPersonDetails } from "./types/GetPersonDetails";
@@ -48,8 +47,6 @@ export interface GetCommunityI extends GetCommunity {
48
47
  }
49
48
  export interface ListCommunitiesI extends ListCommunities {
50
49
  }
51
- export interface GetCommunityPendingFollowsCountI extends GetCommunityPendingFollowsCount {
52
- }
53
50
  export interface ListCommunityPendingFollowsI extends ListCommunityPendingFollows {
54
51
  }
55
52
  export interface GetRandomCommunityI extends GetRandomCommunity {
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
3
3
  */
4
- export type CommentSortType = "Hot" | "Top" | "New" | "Old" | "Controversial";
4
+ export type CommentSortType = "hot" | "top" | "new" | "old" | "controversial";
@@ -1 +1 @@
1
- export type CommunityFollowerState = "Accepted" | "Pending" | "ApprovalRequired";
1
+ export type CommunityFollowerState = "accepted" | "pending" | "approval_required" | "denied";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Available settings for community notifications
3
3
  */
4
- export type CommunityNotificationsMode = "AllPostsAndComments" | "AllPosts" | "RepliesAndMentions" | "Mute";
4
+ export type CommunityNotificationsMode = "all_posts_and_comments" | "all_posts" | "replies_and_mentions" | "mute";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The community sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
3
3
  */
4
- export type CommunitySortType = "ActiveSixMonths" | "ActiveMonthly" | "ActiveWeekly" | "ActiveDaily" | "Hot" | "New" | "Old" | "NameAsc" | "NameDesc" | "Comments" | "Posts" | "Subscribers" | "SubscribersLocal";
4
+ export type CommunitySortType = "active_six_months" | "active_monthly" | "active_weekly" | "active_daily" | "hot" | "new" | "old" | "name_asc" | "name_desc" | "comments" | "posts" | "subscribers" | "subscribers_local";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Defines who can browse and interact with content in a community.
3
3
  */
4
- export type CommunityVisibility = "Public" | "Unlisted" | "LocalOnlyPublic" | "LocalOnlyPrivate" | "Private";
4
+ export type CommunityVisibility = "public" | "unlisted" | "local_only_public" | "local_only_private" | "private";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The federation mode for an item
3
3
  */
4
- export type FederationMode = "All" | "Local" | "Disable";
4
+ export type FederationMode = "all" | "local" | "disable";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The like_type for a persons liked content.
3
3
  */
4
- export type LikeType = "All" | "LikedOnly" | "DislikedOnly";
4
+ export type LikeType = "all" | "liked_only" | "disliked_only";
@@ -3,7 +3,7 @@ export type ListCommunityPendingFollows = {
3
3
  /**
4
4
  * Only shows the unapproved applications
5
5
  */
6
- pending_only?: boolean;
6
+ unread_only?: boolean;
7
7
  all_communities?: boolean;
8
8
  page_cursor?: PaginationCursor;
9
9
  page_back?: boolean;
@@ -1,7 +1,7 @@
1
1
  import type { PaginationCursor } from "./PaginationCursor";
2
- import type { PendingFollow } from "./PendingFollow";
2
+ import type { PendingFollowerView } from "./PendingFollowerView";
3
3
  export type ListCommunityPendingFollowsResponse = {
4
- items: Array<PendingFollow>;
4
+ items: Array<PendingFollowerView>;
5
5
  /**
6
6
  * the pagination cursor to use to fetch the next page
7
7
  */
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A listing type for post and comment list fetches.
3
3
  */
4
- export type ListingType = "All" | "Local" | "Subscribed" | "ModeratorView" | "Suggested";
4
+ export type ListingType = "all" | "local" | "subscribed" | "moderator_view" | "suggested";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for the various modlog actions.
3
3
  */
4
- export type ModlogActionType = "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModLockComment" | "AdminRemoveCommunity" | "ModBanFromCommunity" | "ModAddToCommunity" | "ModTransferCommunity" | "AdminAdd" | "AdminBan" | "ModChangeCommunityVisibility" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment" | "AdminBlockInstance" | "AdminAllowInstance";
4
+ export type ModlogActionType = "all" | "mod_remove_post" | "mod_lock_post" | "mod_feature_post" | "mod_remove_comment" | "mod_lock_comment" | "admin_remove_community" | "mod_ban_from_community" | "mod_add_to_community" | "mod_transfer_community" | "admin_add" | "admin_ban" | "mod_change_community_visibility" | "admin_purge_person" | "admin_purge_community" | "admin_purge_post" | "admin_purge_comment" | "admin_block_instance" | "admin_allow_instance";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for the inbox.
3
3
  */
4
- export type NotificationDataType = "All" | "Reply" | "Mention" | "PrivateMessage" | "Subscribed";
4
+ export type NotificationDataType = "all" | "reply" | "mention" | "private_message" | "subscribed";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Types of notifications which can be received in inbox
3
3
  */
4
- export type NotificationType = "Mention" | "Reply" | "Subscribed" | "PrivateMessage" | "ModAction";
4
+ export type NotificationType = "mention" | "reply" | "subscribed" | "private_message" | "mod_action";
@@ -0,0 +1,9 @@
1
+ import type { Community } from "./Community";
2
+ import type { CommunityFollowerState } from "./CommunityFollowerState";
3
+ import type { Person } from "./Person";
4
+ export type PendingFollowerView = {
5
+ person: Person;
6
+ community: Community;
7
+ is_new_instance: boolean;
8
+ follow_state?: CommunityFollowerState;
9
+ };
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for a person's content.
3
3
  */
4
- export type PersonContentType = "All" | "Comments" | "Posts";
4
+ export type PersonContentType = "all" | "comments" | "posts";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The feature type for a post.
3
3
  */
4
- export type PostFeatureType = "Local" | "Community";
4
+ export type PostFeatureType = "local" | "community";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A post-view mode that changes how multiple post listings look.
3
3
  */
4
- export type PostListingMode = "List" | "Card" | "SmallCard";
4
+ export type PostListingMode = "list" | "card" | "small_card";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Available settings for post notifications
3
3
  */
4
- export type PostNotificationsMode = "AllComments" | "RepliesAndMentions" | "Mute";
4
+ export type PostNotificationsMode = "all_comments" | "replies_and_mentions" | "mute";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The post sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
3
3
  */
4
- export type PostSortType = "Active" | "Hot" | "New" | "Old" | "Top" | "MostComments" | "NewComments" | "Controversial" | "Scaled";
4
+ export type PostSortType = "active" | "hot" | "new" | "old" | "top" | "most_comments" | "new_comments" | "controversial" | "scaled";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The registration mode for your site. Determines what happens after a user signs up.
3
3
  */
4
- export type RegistrationMode = "Closed" | "RequireApplication" | "Open";
4
+ export type RegistrationMode = "closed" | "require_application" | "open";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * A list of possible types for reports.
3
3
  */
4
- export type ReportType = "All" | "Posts" | "Comments" | "PrivateMessages" | "Communities";
4
+ export type ReportType = "all" | "posts" | "comments" | "private_messages" | "communities";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The search sort types.
3
3
  */
4
- export type SearchSortType = "New" | "Top" | "Old";
4
+ export type SearchSortType = "new" | "top" | "old";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * The type of content returned from a search.
3
3
  */
4
- export type SearchType = "All" | "Comments" | "Posts" | "Communities" | "Users" | "MultiCommunities";
4
+ export type SearchType = "all" | "comments" | "posts" | "communities" | "users" | "multi_communities";
@@ -1,4 +1,4 @@
1
1
  /**
2
2
  * Lets you show votes for others only, show all votes, or hide all votes.
3
3
  */
4
- export type VoteShow = "Show" | "ShowForOthers" | "Hide";
4
+ export type VoteShow = "show" | "show_for_others" | "hide";
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": "1.0.0-bool-vote.1",
4
+ "version": "1.0.0-bool-vote.2",
5
5
  "author": "Dessalines",
6
6
  "license": "AGPL-3.0",
7
7
  "main": "./dist/index.js",
@@ -1,4 +0,0 @@
1
- import type { CommunityId } from "./CommunityId";
2
- export type GetCommunityPendingFollowsCount = {
3
- community_id: CommunityId;
4
- };