-
-
Notifications
You must be signed in to change notification settings - Fork 44
/
scheduled-status-repository.ts
49 lines (44 loc) 路 1.55 KB
/
scheduled-status-repository.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
import { type HttpMetaParams } from "../../../interfaces";
import { type ScheduledStatus } from "../../entities/v1";
import { type Paginator } from "../../paginator";
import { type DefaultPaginationParams } from "../../repository";
export interface UpdateScheduledStatusParams {
/** ISO 8601 Date-time at which the status will be published. Must be at least 5 minutes into the future. */
readonly scheduledAt: string;
}
export interface ScheduledStatusRepository {
/**
* View scheduled statuses
* @param params Parameters
* @return Array of ScheduledStatus
* @see https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/
*/
list(
params?: DefaultPaginationParams,
meta?: HttpMetaParams,
): Paginator<ScheduledStatus[], DefaultPaginationParams>;
$select(id: string): {
/**
* View a single scheduled status
* @return ScheduledStatus
* @see https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/
*/
fetch(meta?: HttpMetaParams): Promise<ScheduledStatus>;
/**
* Update Scheduled status
* @param params Parameters
* @return ScheduledStatus
* @see https://docs.joinmastodon.org/api/rest/scheduled-statuses/#put-api-v1-scheduled-statuses-id
*/
update(
params: UpdateScheduledStatusParams,
meta?: HttpMetaParams<"json">,
): Promise<ScheduledStatus>;
/**
* Cancel a scheduled status
* @return N/A
* @see https://docs.joinmastodon.org/methods/statuses/scheduled_statuses/
*/
remove(meta?: HttpMetaParams): Promise<void>;
};
}