lemmy-js-client 0.19.0-alpha.11 → 0.19.0-alpha.13
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.
- package/dist/http.d.ts +28 -1
- package/dist/http.js +34 -1
- package/dist/index.d.ts +1 -0
- package/dist/types/LoginToken.d.ts +8 -0
- package/dist/types/LoginToken.js +2 -0
- package/package.json +1 -1
package/dist/http.d.ts
CHANGED
@@ -131,6 +131,8 @@ import { BlockInstanceResponse } from "./types/BlockInstanceResponse";
|
|
131
131
|
import { GenerateTotpSecretResponse } from "./types/GenerateTotpSecretResponse";
|
132
132
|
import { UpdateTotp } from "./types/UpdateTotp";
|
133
133
|
import { UpdateTotpResponse } from "./types/UpdateTotpResponse";
|
134
|
+
import { SuccessResponse } from "./types/SuccessResponse";
|
135
|
+
import { LoginToken } from "./types/LoginToken";
|
134
136
|
/**
|
135
137
|
* Helps build lemmy HTTP requests.
|
136
138
|
*/
|
@@ -179,6 +181,31 @@ export declare class LemmyHttp {
|
|
179
181
|
* `HTTP.POST /user/totp/generate`
|
180
182
|
*/
|
181
183
|
generateTotpSecret(): Promise<GenerateTotpSecretResponse>;
|
184
|
+
/**
|
185
|
+
* Export a backup of your user settings, including your saved content,
|
186
|
+
* followed communities, and blocks.
|
187
|
+
*
|
188
|
+
* `HTTP.GET /user/export_settings`
|
189
|
+
*/
|
190
|
+
exportSettings(): Promise<any>;
|
191
|
+
/**
|
192
|
+
* Import a backup of your user settings.
|
193
|
+
*
|
194
|
+
* `HTTP.POST /user/import_settings`
|
195
|
+
*/
|
196
|
+
importSettings(form: any): Promise<SuccessResponse>;
|
197
|
+
/**
|
198
|
+
* List login tokens for your user
|
199
|
+
*
|
200
|
+
* `HTTP.GET /user/list_logins`
|
201
|
+
*/
|
202
|
+
listLogins(): Promise<LoginToken[]>;
|
203
|
+
/**
|
204
|
+
* Returns an error message if your auth token is invalid
|
205
|
+
*
|
206
|
+
* `HTTP.GET /user/validate_auth`
|
207
|
+
*/
|
208
|
+
validateAuth(): Promise<SuccessResponse>;
|
182
209
|
/**
|
183
210
|
* Enable / Disable TOTP / two-factor authentication.
|
184
211
|
*
|
@@ -250,7 +277,7 @@ export declare class LemmyHttp {
|
|
250
277
|
*/
|
251
278
|
deleteCommunity(form: DeleteCommunity): Promise<CommunityResponse>;
|
252
279
|
/**
|
253
|
-
* Hide a community from public view.
|
280
|
+
* Hide a community from public / "All" view. Admins only.
|
254
281
|
*
|
255
282
|
* `HTTP.PUT /community/hide`
|
256
283
|
*/
|
package/dist/http.js
CHANGED
@@ -100,6 +100,39 @@ class LemmyHttp {
|
|
100
100
|
generateTotpSecret() {
|
101
101
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/totp/generate", {});
|
102
102
|
}
|
103
|
+
/**
|
104
|
+
* Export a backup of your user settings, including your saved content,
|
105
|
+
* followed communities, and blocks.
|
106
|
+
*
|
107
|
+
* `HTTP.GET /user/export_settings`
|
108
|
+
*/
|
109
|
+
exportSettings() {
|
110
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/export_settings", {});
|
111
|
+
}
|
112
|
+
/**
|
113
|
+
* Import a backup of your user settings.
|
114
|
+
*
|
115
|
+
* `HTTP.POST /user/import_settings`
|
116
|
+
*/
|
117
|
+
importSettings(form) {
|
118
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/user/import_settings", form);
|
119
|
+
}
|
120
|
+
/**
|
121
|
+
* List login tokens for your user
|
122
|
+
*
|
123
|
+
* `HTTP.GET /user/list_logins`
|
124
|
+
*/
|
125
|
+
listLogins() {
|
126
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/list_logins", {});
|
127
|
+
}
|
128
|
+
/**
|
129
|
+
* Returns an error message if your auth token is invalid
|
130
|
+
*
|
131
|
+
* `HTTP.GET /user/validate_auth`
|
132
|
+
*/
|
133
|
+
validateAuth() {
|
134
|
+
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Get, "/user/validate_auth", {});
|
135
|
+
}
|
103
136
|
/**
|
104
137
|
* Enable / Disable TOTP / two-factor authentication.
|
105
138
|
*
|
@@ -193,7 +226,7 @@ class LemmyHttp {
|
|
193
226
|
return __classPrivateFieldGet(this, _LemmyHttp_instances, "m", _LemmyHttp_wrapper).call(this, HttpType.Post, "/community/delete", form);
|
194
227
|
}
|
195
228
|
/**
|
196
|
-
* Hide a community from public view.
|
229
|
+
* Hide a community from public / "All" view. Admins only.
|
197
230
|
*
|
198
231
|
* `HTTP.PUT /community/hide`
|
199
232
|
*/
|
package/dist/index.d.ts
CHANGED
@@ -139,6 +139,7 @@ export { LocalUserView } from "./types/LocalUserView";
|
|
139
139
|
export { LockPost } from "./types/LockPost";
|
140
140
|
export { Login } from "./types/Login";
|
141
141
|
export { LoginResponse } from "./types/LoginResponse";
|
142
|
+
export { LoginToken } from "./types/LoginToken";
|
142
143
|
export { MarkCommentReplyAsRead } from "./types/MarkCommentReplyAsRead";
|
143
144
|
export { MarkPersonMentionAsRead } from "./types/MarkPersonMentionAsRead";
|
144
145
|
export { MarkPostAsRead } from "./types/MarkPostAsRead";
|
package/package.json
CHANGED