Skip to content

Commit b2ae9b5

Browse files
committed
feat!: Remove deprecated APIs (CreateTokenParamsWithPassword, v1.search.fetch, v2.search.fetch, SuggestionSource)
1 parent 4527b53 commit b2ae9b5

File tree

4 files changed

+4
-19
lines changed

4 files changed

+4
-19
lines changed

src/mastodon/entities/v1/suggestion.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { type Account } from "./account";
77
*
88
* @deprecated Use {@link SuggestionSource_} instead
99
*/
10-
export type SuggestionSource = "staff" | "past_interactions" | "global";
10+
export type LegacySuggestionSource = "staff" | "past_interactions" | "global";
1111

1212
/**
1313
* `featured` = This account was manually recommended by your administration team. Equivalent to the staff value for source
@@ -20,7 +20,7 @@ export type SuggestionSource = "staff" | "past_interactions" | "global";
2020
*
2121
* `friends_of_friends` = This account is followed by people you follow
2222
*/
23-
export type SuggestionSource_ =
23+
export type SuggestionSource =
2424
| "featured"
2525
| "most_followed"
2626
| "most_interactions"
@@ -36,10 +36,10 @@ export interface Suggestion {
3636
* The reason this account is being suggested.
3737
* @deprecated
3838
*/
39-
source: SuggestionSource;
39+
source: LegacySuggestionSource;
4040

4141
/** A list of reasons this account is being suggested. This replaces source */
42-
sources: SuggestionSource_[];
42+
sources: SuggestionSource[];
4343

4444
/**
4545
* The account being recommended to follow.

src/mastodon/oauth/token-repository.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,6 @@
11
import { type HttpMetaParams } from "../../interfaces";
22
import { type Token } from "../entities/v1";
33

4-
/**
5-
* @deprecated Use `CreateTokenParamsWithPassword` instead
6-
*/
7-
export type CreateTokenParamsWithPassword = CreateTokenWithPasswordParams;
8-
94
interface BaseCreateTokenParams<T extends string> {
105
/** Set equal to `authorization_code` if code is provided in order to gain user-level access. Otherwise, set equal to `client_credentials` to obtain app-level access only. */
116
readonly grantType: T;

src/mastodon/rest/v1/search-repository.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,6 @@ export interface SearchParams extends DefaultPaginationParams {
1717
}
1818

1919
export interface SearchRepository {
20-
/**
21-
* @deprecated Use `list` instead
22-
*/
23-
fetch(params: SearchParams, meta?: HttpMetaParams): Search;
24-
2520
/**
2621
* Search, but hashtags is an array of strings instead of an array of Tag.
2722
* @param params Parameters

src/mastodon/rest/v2/search-repository.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,6 @@ export interface SearchParams extends DefaultPaginationParams {
2323
}
2424

2525
export interface SearchRepository {
26-
/**
27-
* @deprecated Use `list` instead
28-
*/
29-
fetch(params: SearchParams, meta?: HttpMetaParams): Search;
30-
3126
/**
3227
* Perform a search
3328
* @param params Parameters

0 commit comments

Comments
 (0)