UNPKG

2.16 kBTypeScriptView Raw
1import type { CallUser } from '@slack/types';
2import type { TokenOverridable } from './common';
3interface ID {
4 /** @description `id` returned when registering the call using the `calls.add` method. */
5 id: string;
6}
7interface Users {
8 /**
9 * @description The list of users to add/remove to/from the Call.
10 * @see {@link https://api.slack.com/apis/calls#users Using the Calls API: a note on Users}.
11 */
12 users: CallUser[];
13}
14interface CallDetails {
15 /** @description The URL required for a client to join the Call. */
16 join_url: string;
17 /**
18 * @description When supplied, available Slack clients will attempt to directly launch the 3rd-party Call
19 * with this URL.
20 */
21 desktop_app_join_url?: string;
22 /** @description The name of the Call. */
23 title?: string;
24}
25export interface CallsAddArguments extends Partial<Users>, CallDetails, TokenOverridable {
26 /**
27 * @description An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.
28 */
29 external_unique_id: string;
30 /**
31 * @description ID of the user who created this Call. When this method is called with a user token,
32 * this field is optional and defaults to the authed user of the token. Otherwise, the field is required.
33 */
34 created_by?: string;
35 /** @description Unix timestamp of the call start time. */
36 date_start?: number;
37 /**
38 * @description An optional, human-readable ID supplied by the 3rd-party Call provider.
39 * If supplied, this ID will be displayed in the Call object.
40 */
41 external_display_id?: string;
42}
43export interface CallsEndArguments extends ID, TokenOverridable {
44 /** @description Call duration in seconds. */
45 duration?: number;
46}
47export interface CallsInfoArguments extends ID, TokenOverridable {
48}
49export interface CallsUpdateArguments extends ID, Partial<CallDetails>, TokenOverridable {
50}
51export interface CallsParticipantsAddArguments extends ID, Users, TokenOverridable {
52}
53export interface CallsParticipantsRemoveArguments extends ID, Users, TokenOverridable {
54}
55export {};
56//# sourceMappingURL=calls.d.ts.map
\No newline at end of file