UNPKG

7.86 kBTypeScriptView Raw
1import type { OptionalArgument } from '../helpers';
2import type { ChannelID, CursorPaginationEnabled, LocaleAware, OptionalTeamAssignable, TargetTeam, TimelinePaginationEnabled, TokenOverridable } from './common';
3export interface Channel {
4 /** @description ID of conversation. */
5 channel: string;
6}
7export interface Emails {
8 /** @description List of emails to receive this invite. Either `emails` or `user_ids` must be provided. */
9 emails: string[];
10 user_ids?: never;
11}
12interface IncludeAllMetadata {
13 /** @description Return all metadata associated with messages. Defaults to `false`. */
14 include_all_metadata?: boolean;
15}
16export interface InviteID {
17 /** @description ID of the invite. */
18 invite_id: string;
19}
20export interface IsPrivate {
21 /** @description Whether the channel should be private. */
22 is_private?: boolean;
23}
24interface MessageSpecifier extends Channel {
25 /** @description Unique identifier of message. */
26 ts: string;
27}
28interface Message {
29 /** @description A message to send to the user who requested the invite. */
30 message?: string;
31}
32export interface UserIDs {
33 /** List of user IDs to receive this invite. Either `emails` or `user_ids` must be provided. */
34 user_ids: string[];
35 emails?: never;
36}
37export interface Users {
38 /** @description A comma separated list of user IDs. Up to 1000 users may be listed. */
39 users: string;
40}
41export type ConversationsAcceptSharedInviteArguments = TokenOverridable & OptionalTeamAssignable & (ChannelID | InviteID) & IsPrivate & {
42 /**
43 * @description Name of the channel. If the channel does not exist already in your workspace,
44 * this name is the one that the channel will take.
45 */
46 channel_name: string;
47 /** @description Whether you'd like to use your workspace's free trial to begin using Slack Connect. */
48 free_trial_accepted?: boolean;
49};
50export interface ConversationsApproveSharedInviteArguments extends InviteID, TargetTeam, TokenOverridable {
51}
52export interface ConversationsArchiveArguments extends Channel, TokenOverridable {
53}
54export interface ConversationsCloseArguments extends Channel, TokenOverridable {
55}
56export interface ConversationsCreateArguments extends IsPrivate, TokenOverridable, OptionalTeamAssignable {
57 /** @description Name of the public or private channel to create. */
58 name: string;
59}
60export interface ConversationsDeclineSharedInviteArguments extends InviteID, TargetTeam, TokenOverridable {
61}
62export interface ConversationsExternalInvitePermissionsSetArguments extends Channel, Required<TargetTeam>, TokenOverridable {
63 /** @description The type of action be taken: `upgrade` or `downgrade`. */
64 action: 'downgrade' | 'upgrade';
65}
66export interface ConversationsHistoryArguments extends Channel, IncludeAllMetadata, TokenOverridable, CursorPaginationEnabled, TimelinePaginationEnabled {
67}
68export interface ConversationsInfoArguments extends Channel, TokenOverridable, LocaleAware {
69 /**
70 @description Set to `true` to include the member count for the specified conversation. Defaults to `false`.
71 */
72 include_num_members?: boolean;
73}
74export interface ConversationsInviteArguments extends Channel, Users, TokenOverridable {
75 /**
76 * @description When set to `true` and multiple user IDs are provided, continue inviting the valid ones while
77 * disregarding invalid IDs. Defaults to `false`.
78 */
79 force?: boolean;
80}
81export type ConversationsInviteSharedArguments = Channel & TokenOverridable & (Emails | UserIDs) & {
82 /** @description Whether invite is to an external limited member. Defaults to `true`. */
83 external_limited?: boolean;
84};
85export interface ConversationsJoinArguments extends Channel, TokenOverridable {
86}
87export interface ConversationsKickArguments extends Channel, TokenOverridable {
88 user: string;
89}
90export interface ConversationsLeaveArguments extends Channel, TokenOverridable {
91}
92export type ConversationsListArguments = OptionalArgument<TokenOverridable & CursorPaginationEnabled & OptionalTeamAssignable & {
93 /** @description Set to `true` to exclude archived channels from the list. Defaults to `false`. */
94 exclude_archived?: boolean;
95 /**
96 * @description Mix and match channel types by providing a comma-separated list of any combination of:
97 * `public_channel`, `private_channel`, `mpim` or `im`. Defaults to `public_channel`.
98 */
99 types?: string;
100}>;
101export type ConversationsListConnectInvitesArguments = OptionalArgument<TokenOverridable & OptionalTeamAssignable & {
102 /** @description Maximum number of invites to return. Defaults to `100`. */
103 count?: number;
104 /** @description Set to `next_cursor` returned by previous call to list items in subsequent page. */
105 cursor?: string;
106}>;
107export interface ConversationsMarkArguments extends MessageSpecifier, TokenOverridable {
108}
109export interface ConversationsMembersArguments extends Channel, TokenOverridable, CursorPaginationEnabled {
110}
111export type ConversationsOpenArguments = (Channel | Users) & TokenOverridable & {
112 /**
113 * @description Do not create a direct message or multi-person direct message.
114 * This is used to see if there is an existing dm or mpdm.
115 */
116 prevent_creation?: boolean;
117 /** @description Indicates you want the full IM channel definition in the response. */
118 return_im?: boolean;
119};
120export interface ConversationsRenameArguments extends Channel, TokenOverridable {
121 /** @description New name for conversation. */
122 name: string;
123}
124export interface ConversationsRepliesArguments extends MessageSpecifier, IncludeAllMetadata, TokenOverridable, CursorPaginationEnabled, TimelinePaginationEnabled {
125}
126export interface ConversationsRequestSharedInviteApproveArguments extends InviteID, Partial<ChannelID>, TokenOverridable {
127 /**
128 * @description Whether the invited team will have post-only permissions in the channel.
129 * Will override the value on the requested invite.
130 */
131 is_external_limited?: boolean;
132 /** @description Optional additional messaging to attach to the invite approval message. */
133 message?: {
134 /**
135 * @description When `true`, will override the user specified message. Otherwise, `text` will be appended to the
136 * user specified message on the invite request.
137 */
138 is_override: boolean;
139 /** @description Text to include along with the email invite. */
140 text: string;
141 };
142}
143export interface ConversationsRequestSharedInviteDenyArguments extends InviteID, Message, TokenOverridable {
144}
145export type ConversationsRequestSharedInviteListArguments = OptionalArgument<CursorPaginationEnabled & TokenOverridable & {
146 /** @description When `true` approved invitation requests will be returned, otherwise they will be excluded. */
147 include_approved?: boolean;
148 /** @description When `true` denied invitation requests will be returned, otherwise they will be excluded. */
149 include_denied?: boolean;
150 /** @description When `true` expired invitation requests will be returned, otherwise they will be excluded. */
151 include_expired?: boolean;
152 /** @description An optional list of invitation ids to look up. */
153 invite_ids?: string[];
154 /** @description Optional filter to return invitation requests for the inviting user. */
155 user_id?: string;
156}>;
157export interface ConversationsSetPurposeArguments extends Channel, TokenOverridable {
158 /** @description A new, specialer purpose. */
159 purpose: string;
160}
161export interface ConversationsSetTopicArguments extends Channel, TokenOverridable {
162 /** @description The new topic string. Does not support formatting or linkification. */
163 topic: string;
164}
165export interface ConversationsUnarchiveArguments extends Channel, TokenOverridable {
166}
167export {};
168//# sourceMappingURL=conversations.d.ts.map
\No newline at end of file