lemmy-js-client 0.20.0-instance-blocks.5 → 0.20.0-pkce.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/http.d.ts +4 -17
- package/dist/http.js +2 -18
- package/dist/index.d.ts +2 -8
- package/dist/types/AuthenticateWithOauth.d.ts +1 -0
- package/dist/types/{UserBlockInstanceParams.d.ts → BlockInstance.d.ts} +1 -1
- package/dist/types/BlockInstanceResponse.d.ts +3 -0
- package/dist/types/CommentAggregates.d.ts +2 -0
- package/dist/types/CreateOAuthProvider.d.ts +1 -0
- package/dist/types/CreateSite.d.ts +2 -0
- package/dist/types/EditOAuthProvider.d.ts +1 -0
- package/dist/types/EditSite.d.ts +8 -0
- package/dist/types/GetModlogResponse.d.ts +0 -4
- package/dist/types/LemmyErrorType.d.ts +2 -2
- package/dist/types/ModlogActionType.d.ts +1 -1
- package/dist/types/OAuthProvider.d.ts +4 -0
- package/dist/types/PostAggregates.d.ts +2 -0
- package/package.json +1 -1
- package/dist/types/AdminAllowInstance.d.ts +0 -10
- package/dist/types/AdminAllowInstanceParams.d.ts +0 -5
- package/dist/types/AdminAllowInstanceView.d.ts +0 -11
- package/dist/types/AdminAllowInstanceView.js +0 -2
- package/dist/types/AdminBlockInstance.d.ts +0 -11
- package/dist/types/AdminBlockInstance.js +0 -2
- package/dist/types/AdminBlockInstanceParams.d.ts +0 -6
- package/dist/types/AdminBlockInstanceParams.js +0 -3
- package/dist/types/AdminBlockInstanceView.d.ts +0 -11
- package/dist/types/AdminBlockInstanceView.js +0 -2
- package/dist/types/FederationBlockList.d.ts +0 -7
- package/dist/types/FederationBlockList.js +0 -2
- package/dist/types/UserBlockInstanceParams.js +0 -2
- /package/dist/types/{AdminAllowInstance.js → BlockInstance.js} +0 -0
- /package/dist/types/{AdminAllowInstanceParams.js → BlockInstanceResponse.js} +0 -0
package/dist/http.d.ts
CHANGED
@@ -124,6 +124,8 @@ import { TransferCommunity } from "./types/TransferCommunity";
|
|
124
124
|
import { VerifyEmail } from "./types/VerifyEmail";
|
125
125
|
import { DeleteImage, UploadImage, UploadImageResponse } from "./other_types";
|
126
126
|
import { HideCommunity } from "./types/HideCommunity";
|
127
|
+
import { BlockInstance } from "./types/BlockInstance";
|
128
|
+
import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
127
129
|
import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
128
130
|
import { UpdateTotp } from "./types/UpdateTotp";
|
129
131
|
import { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
@@ -152,9 +154,6 @@ import { GetCommunityPendingFollowsCountResponse } from "./types/GetCommunityPen
|
|
152
154
|
import { ListCommunityPendingFollowsResponse } from "./types/ListCommunityPendingFollowsResponse";
|
153
155
|
import { ListCommunityPendingFollows } from "./types/ListCommunityPendingFollows";
|
154
156
|
import { CommunityId } from "./types/CommunityId";
|
155
|
-
import { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
156
|
-
import { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
157
|
-
import { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
158
157
|
type RequestOptions = Pick<RequestInit, "signal">;
|
159
158
|
/**
|
160
159
|
* Helps build lemmy HTTP requests.
|
@@ -837,23 +836,11 @@ export declare class LemmyHttp {
|
|
837
836
|
*/
|
838
837
|
getFederatedInstances(options?: RequestOptions): Promise<GetFederatedInstancesResponse>;
|
839
838
|
/**
|
840
|
-
* Block an instance
|
839
|
+
* Block an instance.
|
841
840
|
*
|
842
841
|
* `HTTP.Post /site/block`
|
843
842
|
*/
|
844
|
-
|
845
|
-
/**
|
846
|
-
* Globally block an instance as admin.
|
847
|
-
*
|
848
|
-
* `HTTP.Post /admin/block_instance`
|
849
|
-
*/
|
850
|
-
adminBlockInstance(form: AdminBlockInstanceParams, options?: RequestOptions): Promise<SuccessResponse>;
|
851
|
-
/**
|
852
|
-
* Globally allow an instance as admin.
|
853
|
-
*
|
854
|
-
* `HTTP.Post /admin/allow_instance`
|
855
|
-
*/
|
856
|
-
adminAllowInstance(form: AdminAllowInstanceParams, options?: RequestOptions): Promise<SuccessResponse>;
|
843
|
+
blockInstance(form: BlockInstance, options?: RequestOptions): Promise<BlockInstanceResponse>;
|
857
844
|
/**
|
858
845
|
* Upload an image to the server.
|
859
846
|
*/
|
package/dist/http.js
CHANGED
@@ -943,29 +943,13 @@ class LemmyHttp {
|
|
943
943
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/federated_instances", {}, options);
|
944
944
|
}
|
945
945
|
/**
|
946
|
-
* Block an instance
|
946
|
+
* Block an instance.
|
947
947
|
*
|
948
948
|
* `HTTP.Post /site/block`
|
949
949
|
*/
|
950
|
-
|
950
|
+
blockInstance(form, options) {
|
951
951
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/site/block", form, options);
|
952
952
|
}
|
953
|
-
/**
|
954
|
-
* Globally block an instance as admin.
|
955
|
-
*
|
956
|
-
* `HTTP.Post /admin/block_instance`
|
957
|
-
*/
|
958
|
-
adminBlockInstance(form, options) {
|
959
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/block_instance", form, options);
|
960
|
-
}
|
961
|
-
/**
|
962
|
-
* Globally allow an instance as admin.
|
963
|
-
*
|
964
|
-
* `HTTP.Post /admin/allow_instance`
|
965
|
-
*/
|
966
|
-
adminAllowInstance(form, options) {
|
967
|
-
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/admin/allow_instance", form, options);
|
968
|
-
}
|
969
953
|
/**
|
970
954
|
* Upload an image to the server.
|
971
955
|
*/
|
package/dist/index.d.ts
CHANGED
@@ -5,12 +5,6 @@ export { AddAdmin } from "./types/AddAdmin";
|
|
5
5
|
export { AddAdminResponse } from "./types/AddAdminResponse";
|
6
6
|
export { AddModToCommunity } from "./types/AddModToCommunity";
|
7
7
|
export { AddModToCommunityResponse } from "./types/AddModToCommunityResponse";
|
8
|
-
export { AdminAllowInstance } from "./types/AdminAllowInstance";
|
9
|
-
export { AdminAllowInstanceParams } from "./types/AdminAllowInstanceParams";
|
10
|
-
export { AdminAllowInstanceView } from "./types/AdminAllowInstanceView";
|
11
|
-
export { AdminBlockInstance } from "./types/AdminBlockInstance";
|
12
|
-
export { AdminBlockInstanceParams } from "./types/AdminBlockInstanceParams";
|
13
|
-
export { AdminBlockInstanceView } from "./types/AdminBlockInstanceView";
|
14
8
|
export { AdminPurgeComment } from "./types/AdminPurgeComment";
|
15
9
|
export { AdminPurgeCommentView } from "./types/AdminPurgeCommentView";
|
16
10
|
export { AdminPurgeCommunity } from "./types/AdminPurgeCommunity";
|
@@ -29,6 +23,8 @@ export { BanPersonResponse } from "./types/BanPersonResponse";
|
|
29
23
|
export { BannedPersonsResponse } from "./types/BannedPersonsResponse";
|
30
24
|
export { BlockCommunity } from "./types/BlockCommunity";
|
31
25
|
export { BlockCommunityResponse } from "./types/BlockCommunityResponse";
|
26
|
+
export { BlockInstance } from "./types/BlockInstance";
|
27
|
+
export { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
32
28
|
export { BlockPerson } from "./types/BlockPerson";
|
33
29
|
export { BlockPersonResponse } from "./types/BlockPersonResponse";
|
34
30
|
export { CaptchaResponse } from "./types/CaptchaResponse";
|
@@ -94,7 +90,6 @@ export { EditPrivateMessage } from "./types/EditPrivateMessage";
|
|
94
90
|
export { EditSite } from "./types/EditSite";
|
95
91
|
export { FeaturePost } from "./types/FeaturePost";
|
96
92
|
export { FederatedInstances } from "./types/FederatedInstances";
|
97
|
-
export { FederationBlockList } from "./types/FederationBlockList";
|
98
93
|
export { FederationError } from "./types/FederationError";
|
99
94
|
export { FederationMode } from "./types/FederationMode";
|
100
95
|
export { FollowCommunity } from "./types/FollowCommunity";
|
@@ -286,6 +281,5 @@ export { TransferCommunity } from "./types/TransferCommunity";
|
|
286
281
|
export { UpdateTagline } from "./types/UpdateTagline";
|
287
282
|
export { UpdateTotp } from "./types/UpdateTotp";
|
288
283
|
export { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
289
|
-
export { UserBlockInstanceParams } from "./types/UserBlockInstanceParams";
|
290
284
|
export { VerifyEmail } from "./types/VerifyEmail";
|
291
285
|
export { VoteView } from "./types/VoteView";
|
@@ -46,6 +46,8 @@ export type CreateSite = {
|
|
46
46
|
federation_debug?: boolean;
|
47
47
|
captcha_enabled?: boolean;
|
48
48
|
captcha_difficulty?: string;
|
49
|
+
allowed_instances?: Array<string>;
|
50
|
+
blocked_instances?: Array<string>;
|
49
51
|
registration_mode?: RegistrationMode;
|
50
52
|
oauth_registration?: boolean;
|
51
53
|
content_warning?: string;
|
package/dist/types/EditSite.d.ts
CHANGED
@@ -136,6 +136,14 @@ export type EditSite = {
|
|
136
136
|
* The captcha difficulty. Can be easy, medium, or hard
|
137
137
|
*/
|
138
138
|
captcha_difficulty?: string;
|
139
|
+
/**
|
140
|
+
* A list of allowed instances. If none are set, federation is open.
|
141
|
+
*/
|
142
|
+
allowed_instances?: Array<string>;
|
143
|
+
/**
|
144
|
+
* A list of blocked instances.
|
145
|
+
*/
|
146
|
+
blocked_instances?: Array<string>;
|
139
147
|
/**
|
140
148
|
* A list of blocked URLs
|
141
149
|
*/
|
@@ -1,5 +1,3 @@
|
|
1
|
-
import type { AdminAllowInstanceView } from "./AdminAllowInstanceView";
|
2
|
-
import type { AdminBlockInstanceView } from "./AdminBlockInstanceView";
|
3
1
|
import type { AdminPurgeCommentView } from "./AdminPurgeCommentView";
|
4
2
|
import type { AdminPurgeCommunityView } from "./AdminPurgeCommunityView";
|
5
3
|
import type { AdminPurgePersonView } from "./AdminPurgePersonView";
|
@@ -34,6 +32,4 @@ export type GetModlogResponse = {
|
|
34
32
|
admin_purged_posts: Array<AdminPurgePostView>;
|
35
33
|
admin_purged_comments: Array<AdminPurgeCommentView>;
|
36
34
|
hidden_communities: Array<ModHideCommunityView>;
|
37
|
-
admin_block_instance: Array<AdminBlockInstanceView>;
|
38
|
-
admin_allow_instance: Array<AdminAllowInstanceView>;
|
39
35
|
};
|
@@ -130,6 +130,8 @@ export type LemmyErrorType = {
|
|
130
130
|
error: "rate_limit_error";
|
131
131
|
} | {
|
132
132
|
error: "invalid_name";
|
133
|
+
} | {
|
134
|
+
error: "invalid_code_verifier";
|
133
135
|
} | {
|
134
136
|
error: "invalid_display_name";
|
135
137
|
} | {
|
@@ -274,8 +276,6 @@ export type LemmyErrorType = {
|
|
274
276
|
error: "post_schedule_time_must_be_in_future";
|
275
277
|
} | {
|
276
278
|
error: "too_many_scheduled_posts";
|
277
|
-
} | {
|
278
|
-
error: "cannot_combine_federation_blocklist_and_allowlist";
|
279
279
|
} | {
|
280
280
|
error: "federation_error";
|
281
281
|
message: {
|
@@ -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" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModHideCommunity" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment"
|
4
|
+
export type ModlogActionType = "All" | "ModRemovePost" | "ModLockPost" | "ModFeaturePost" | "ModRemoveComment" | "ModRemoveCommunity" | "ModBanFromCommunity" | "ModAddCommunity" | "ModTransferCommunity" | "ModAdd" | "ModBan" | "ModHideCommunity" | "AdminPurgePerson" | "AdminPurgeCommunity" | "AdminPurgePost" | "AdminPurgeComment";
|
package/package.json
CHANGED
@@ -1,10 +0,0 @@
|
|
1
|
-
import type { InstanceId } from "./InstanceId";
|
2
|
-
import type { PersonId } from "./PersonId";
|
3
|
-
export type AdminAllowInstance = {
|
4
|
-
id: number;
|
5
|
-
instance_id: InstanceId;
|
6
|
-
admin_person_id: PersonId;
|
7
|
-
allowed: boolean;
|
8
|
-
reason?: string;
|
9
|
-
published: string;
|
10
|
-
};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { AdminAllowInstance } from "./AdminAllowInstance";
|
2
|
-
import type { Instance } from "./Instance";
|
3
|
-
import type { Person } from "./Person";
|
4
|
-
/**
|
5
|
-
* When an admin purges a post.
|
6
|
-
*/
|
7
|
-
export type AdminAllowInstanceView = {
|
8
|
-
admin_block_instance: AdminAllowInstance;
|
9
|
-
instance: Instance;
|
10
|
-
admin?: Person;
|
11
|
-
};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { InstanceId } from "./InstanceId";
|
2
|
-
import type { PersonId } from "./PersonId";
|
3
|
-
export type AdminBlockInstance = {
|
4
|
-
id: number;
|
5
|
-
instance_id: InstanceId;
|
6
|
-
admin_person_id: PersonId;
|
7
|
-
blocked: boolean;
|
8
|
-
reason?: string;
|
9
|
-
expires?: string;
|
10
|
-
published: string;
|
11
|
-
};
|
@@ -1,11 +0,0 @@
|
|
1
|
-
import type { AdminBlockInstance } from "./AdminBlockInstance";
|
2
|
-
import type { Instance } from "./Instance";
|
3
|
-
import type { Person } from "./Person";
|
4
|
-
/**
|
5
|
-
* When an admin purges a post.
|
6
|
-
*/
|
7
|
-
export type AdminBlockInstanceView = {
|
8
|
-
admin_block_instance: AdminBlockInstance;
|
9
|
-
instance: Instance;
|
10
|
-
admin?: Person;
|
11
|
-
};
|
File without changes
|
File without changes
|