Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump lemmy js client #42

Merged
merged 2 commits into from
Jun 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lemmy-js-client
Submodule lemmy-js-client updated 44 files
+0 −44 .eslintrc.json
+18 −5 README.md
+1 −1 copy_generated_types_from_lemmy.sh
+49 −0 eslint.config.mjs
+7 −7 package.json
+1,529 −1,287 pnpm-lock.yaml
+5 −0 renovate.json
+6 −1 src/http.ts
+1 −0 src/index.ts
+1 −1 src/types/ActivityId.ts
+1 −1 src/types/BanFromCommunity.ts
+1 −1 src/types/BanPerson.ts
+3 −3 src/types/CommentAggregates.ts
+8 −8 src/types/CommunityAggregates.ts
+2 −2 src/types/GetComments.ts
+2 −2 src/types/GetModlog.ts
+2 −2 src/types/GetPersonDetails.ts
+2 −2 src/types/GetPersonMentions.ts
+2 −2 src/types/GetPosts.ts
+2 −2 src/types/GetPrivateMessages.ts
+2 −2 src/types/GetReplies.ts
+3 −3 src/types/GetReportCountResponse.ts
+3 −3 src/types/GetUnreadCountResponse.ts
+1 −1 src/types/GetUnreadRegistrationApplicationCountResponse.ts
+13 −3 src/types/LemmyErrorType.ts
+2 −2 src/types/ListCommentLikes.ts
+2 −2 src/types/ListCommentReports.ts
+2 −2 src/types/ListCommunities.ts
+2 −2 src/types/ListMedia.ts
+2 −2 src/types/ListMediaResponse.ts
+2 −2 src/types/ListPostLikes.ts
+2 −2 src/types/ListPostReports.ts
+2 −2 src/types/ListPrivateMessageReports.ts
+2 −2 src/types/ListRegistrationApplications.ts
+8 −0 src/types/LocalImageView.ts
+2 −2 src/types/ModlogListParams.ts
+2 −2 src/types/PersonAggregates.ts
+4 −4 src/types/PostAggregates.ts
+1 −1 src/types/PostReportView.ts
+1 −1 src/types/PostView.ts
+1 −1 src/types/Register.ts
+2 −2 src/types/Search.ts
+1 −0 src/types/Site.ts
+8 −8 src/types/SiteAggregates.ts
21 changes: 19 additions & 2 deletions lemmy_spec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,9 @@ components:
inbox_url:
title: Site.inbox_url
type: string
public_key:
title: Site.public_key
type: string
instance_id:
$ref: '#/components/schemas/InstanceId'
title: Site.instance_id
Expand All @@ -1712,6 +1715,7 @@ components:
- actor_id
- last_refreshed_at
- inbox_url
- public_key
- instance_id
additionalProperties: false
title: Site
Expand Down Expand Up @@ -6159,7 +6163,6 @@ components:
- username
- password
- password_verify
- show_nsfw
additionalProperties: false
title: Register
type: object
Expand Down Expand Up @@ -7136,11 +7139,25 @@ components:
additionalProperties: false
title: LocalImage
type: object
LocalImageView:
properties:
local_image:
$ref: '#/components/schemas/LocalImage'
title: LocalImageView.local_image
person:
$ref: '#/components/schemas/Person'
title: LocalImageView.person
required:
- local_image
- person
additionalProperties: false
title: LocalImageView
type: object
ListMediaResponse:
properties:
images:
items:
$ref: '#/components/schemas/LocalImage'
$ref: '#/components/schemas/LocalImageView'
title: ListMediaResponse.images
type: array
required:
Expand Down
27 changes: 22 additions & 5 deletions partials/auto_gen_types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1008,6 +1008,16 @@ export type LemmyErrorType =
| { error: "banned_from_community" }
| { error: "couldnt_find_community" }
| { error: "couldnt_find_person" }
| { error: "couldnt_find_comment" }
| { error: "couldnt_find_comment_report" }
| { error: "couldnt_find_post_report" }
| { error: "couldnt_find_private_message_report" }
| { error: "couldnt_find_local_user" }
| { error: "couldnt_find_person_mention" }
| { error: "couldnt_find_registration_application" }
| { error: "couldnt_find_comment_reply" }
| { error: "couldnt_find_private_message" }
| { error: "couldnt_find_activity" }
| { error: "person_is_blocked" }
| { error: "community_is_blocked" }
| { error: "instance_is_blocked" }
Expand Down Expand Up @@ -1053,9 +1063,8 @@ export type LemmyErrorType =
| { error: "person_is_banned_from_site"; message: string }
| { error: "invalid_vote_value" }
| { error: "page_does_not_specify_creator" }
| { error: "page_does_not_specify_group" }
| { error: "no_community_found_in_cc" }
| { error: "no_email_setup" }
| { error: "local_site_not_setup" }
| { error: "email_smtp_server_needs_a_port" }
| { error: "missing_an_email" }
| { error: "rate_limit_error" }
Expand Down Expand Up @@ -1116,7 +1125,6 @@ export type LemmyErrorType =
| { error: "permissive_regex" }
| { error: "invalid_regex" }
| { error: "captcha_incorrect" }
| { error: "password_reset_limit_reached" }
| { error: "couldnt_create_audio_captcha" }
| { error: "invalid_url_scheme" }
| { error: "couldnt_send_webmention" }
Expand All @@ -1128,6 +1136,8 @@ export type LemmyErrorType =
| { error: "invalid_unix_time" }
| { error: "invalid_bot_action" }
| { error: "cant_block_local_instance" }
| { error: "url_without_domain" }
| { error: "inbox_timeout" }
| { error: "unknown"; message: string };


Expand Down Expand Up @@ -1190,7 +1200,7 @@ export interface ListMedia {


export interface ListMediaResponse {
images: Array<LocalImage>;
images: Array<LocalImageView>;
}


Expand Down Expand Up @@ -1252,6 +1262,12 @@ export interface LocalImage {
}


export interface LocalImageView {
local_image: LocalImage;
person: Person;
}


export interface LocalSite {
id: LocalSiteId;
site_id: SiteId;
Expand Down Expand Up @@ -1975,7 +1991,7 @@ export interface Register {
username: string;
password: string;
password_verify: string;
show_nsfw: boolean;
show_nsfw?: boolean;
email?: string;
captcha_uuid?: string;
captcha_answer?: string;
Expand Down Expand Up @@ -2150,6 +2166,7 @@ export interface Site {
actor_id: string;
last_refreshed_at: string;
inbox_url: string;
public_key: string;
instance_id: InstanceId;
content_warning?: string;
}
Expand Down
179 changes: 153 additions & 26 deletions partials/components.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2999,6 +2999,116 @@ components:
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_comment
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_comment_report
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_post_report
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_private_message_report
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_local_user
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_person_mention
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_registration_application
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_comment_reply
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_private_message
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- couldnt_find_activity
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
Expand Down Expand Up @@ -3502,18 +3612,7 @@ components:
error:
title: LemmyErrorType.error
enum:
- page_does_not_specify_group
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- no_community_found_in_cc
- no_email_setup
type: string
required:
- error
Expand All @@ -3524,7 +3623,7 @@ components:
error:
title: LemmyErrorType.error
enum:
- no_email_setup
- local_site_not_setup
type: string
required:
- error
Expand Down Expand Up @@ -4204,17 +4303,6 @@ components:
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- password_reset_limit_reached
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
Expand Down Expand Up @@ -4336,6 +4424,28 @@ components:
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- url_without_domain
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
enum:
- inbox_timeout
type: string
required:
- error
additionalProperties: false
title: LemmyErrorType
type: object
- properties:
error:
title: LemmyErrorType.error
Expand Down Expand Up @@ -4487,7 +4597,7 @@ components:
properties:
images:
items:
$ref: '#/components/schemas/LocalImage'
$ref: '#/components/schemas/LocalImageView'
title: ListMediaResponse.images
type: array
required:
Expand Down Expand Up @@ -4628,6 +4738,20 @@ components:
additionalProperties: false
title: LocalImage
type: object
LocalImageView:
properties:
local_image:
$ref: '#/components/schemas/LocalImage'
title: LocalImageView.local_image
person:
$ref: '#/components/schemas/Person'
title: LocalImageView.person
required:
- local_image
- person
additionalProperties: false
title: LocalImageView
type: object
LocalSite:
properties:
id:
Expand Down Expand Up @@ -6648,7 +6772,6 @@ components:
- username
- password
- password_verify
- show_nsfw
additionalProperties: false
title: Register
type: object
Expand Down Expand Up @@ -7073,6 +7196,9 @@ components:
inbox_url:
title: Site.inbox_url
type: string
public_key:
title: Site.public_key
type: string
instance_id:
$ref: '#/components/schemas/InstanceId'
title: Site.instance_id
Expand All @@ -7086,6 +7212,7 @@ components:
- actor_id
- last_refreshed_at
- inbox_url
- public_key
- instance_id
additionalProperties: false
title: Site
Expand Down
Loading