UNPKG

2.54 kBTypeScriptView Raw
1import type { OptionalArgument } from '../helpers';
2import type { OptionalTeamAssignable, TokenOverridable } from './common';
3interface ReminderRecurrenceDailyMonthlyYearly {
4 /** @description Specifies the repeating behavior of a reminder. */
5 frequency: 'daily' | 'monthly' | 'yearly';
6}
7type DaysOfTheWeek = 'monday' | 'tuesday' | 'wednesday' | 'thursday' | 'friday' | 'saturday' | 'sunday';
8interface ReminderRecurrenceWeekly {
9 /** @description Specifies the repeating behavior of a reminder. */
10 frequency: 'weekly';
11 /** @description Specifies the day-of-the-week repeating behaviour when `frequency` is set to `weekly`. */
12 weekdays: [DaysOfTheWeek, ...DaysOfTheWeek[]];
13}
14type ReminderRecurrence = ReminderRecurrenceWeekly | ReminderRecurrenceDailyMonthlyYearly;
15export interface RemindersAddArguments extends TokenOverridable, OptionalTeamAssignable {
16 /** @description The content of the reminder. */
17 text: string;
18 /**
19 * @description When this reminder should happen, one of:
20 * - the Unix timestamp (up to five years from now),
21 * - the number of seconds until the reminder (if within 24 hours), or
22 * - a natural language description (Ex. "in 15 minutes," or "every Thursday").
23 */
24 time: string | number;
25 /**
26 * @description No longer supported - reminders cannot be set for other users.
27 * @deprecated
28 * @see {@link https://api.slack.com/changelog/2023-07-its-later-already-for-stars-and-reminders#what Changes to `reminders.*` APIs announcement}.
29 */
30 user?: string;
31 /**
32 * @description Specify the repeating behavior of a reminder. If you set the sub-property `frequency` to `weekly`,
33 * you must also set the `weekdays` array to specify which days of the week to recur on.
34 */
35 recurrence?: ReminderRecurrence;
36}
37export interface RemindersCompleteArguments extends TokenOverridable, OptionalTeamAssignable {
38 /** @description The ID of the reminder to be marked as complete. */
39 reminder: string;
40}
41export interface RemindersDeleteArguments extends TokenOverridable, OptionalTeamAssignable {
42 /** @description The ID of the reminder to delete. */
43 reminder: string;
44}
45export interface RemindersInfoArguments extends TokenOverridable, OptionalTeamAssignable {
46 /** @description The ID of the reminder to retrieve information about. */
47 reminder: string;
48}
49export type RemindersListArguments = OptionalArgument<TokenOverridable & OptionalTeamAssignable>;
50export {};
51//# sourceMappingURL=reminders.d.ts.map
\No newline at end of file