UNPKG

@slack/web-api

Version:

Official library for using the Slack Platform's Web API

104 lines • 4.96 kB
import type { Overflow, PlainTextElement } from '@slack/types'; import type { OptionalArgument } from '../helpers'; import type { AppID, CursorPaginationEnabled, OAuthCredentials, TokenOverridable } from './common'; import type { Manifest } from './manifest'; export type AppsConnectionsOpenArguments = OptionalArgument<object>; export interface AppsEventAuthorizationsListArguments extends TokenOverridable, CursorPaginationEnabled { event_context: string; } export interface AppsIconSetArguments extends AppID, TokenOverridable { /** @description File contents via `multipart/form-data`. */ file?: Buffer; /** @description URL of a publicly hosted image. */ url?: string; } export interface AppsManagedPermissionsSetArguments extends AppID, TokenOverridable { /** * @description Who can interact with the app. Use `everyone` to allow all members, or `app_owner` to restrict access * to the app's owner. */ permissions: 'app_owner' | 'everyone'; } export interface AppsManifestCreateArguments extends TokenOverridable { manifest: Manifest; } export interface AppsManifestDeleteArguments extends AppID, TokenOverridable { } export interface AppsManifestExportArguments extends AppID, TokenOverridable { } export interface AppsManifestUpdateArguments extends AppID, TokenOverridable { manifest: Manifest; } export interface AppsManifestValidateArguments extends Partial<AppID>, TokenOverridable { manifest: Manifest; } interface UserConnectionConnectedUserIDs { /** * @description IDs of users connected to the app. * One of `connected_user_ids` or `disconnected_user_ids` is required; combined they may not exceed 1000. */ connected_user_ids: string[]; disconnected_user_ids?: string[]; } interface UserConnectionDisconnectedUserIDs { connected_user_ids?: string[]; /** * @description IDs of users not connected to the app. * One of `connected_user_ids` or `disconnected_user_ids` is required; combined they may not exceed 1000. */ disconnected_user_ids: string[]; } export type AppsUserConnectionBulkUpdateArguments = TokenOverridable & (UserConnectionConnectedUserIDs | UserConnectionDisconnectedUserIDs); export interface UserConnectionPrimaryProvider { /** * @description Unique identifier for this provider within the app. Included in interaction payloads and used to * derive the connect button `action_id` (`auth_provider_connect_<value>`). */ value: string; /** @description Human-readable name of the provider. */ name: PlainTextElement; /** * @description Whether this provider is currently connected or disconnected. Slack records this state for the user, * so an omitted value would be indistinguishable from an explicit `false` and silently mark the user disconnected. */ is_connected: boolean; /** @description Brief description of what this connection enables. */ description?: PlainTextElement; /** @description URL for the provider icon image. Must be HTTPs format. Falls back to the app's avatar when absent. */ icon_url?: string; /** @description OAuth redirect URL opened when the user clicks **Connect**. Must be HTTPs format. */ auth_url?: string; /** @description URL opened when the user clicks **Disconnect**. Must be HTTPs format on a registered auth host. */ disconnect_url?: string; /** @description Display name of the connected account, shown when `is_connected` is `true`. */ connected_identity?: PlainTextElement; /** @description Additional context about the connection (e.g., org or workspace name). */ connected_context?: PlainTextElement; /** @description Overflow menu shown when connected (e.g., Disconnect, Re-authenticate). */ accessory?: Overflow; } interface UserConnectionTriggerID { /** @description The `trigger_id` from the `user_connection` interactive callback. Opens a new modal. */ trigger_id: string; } interface UserConnectionUserID { /** * @description The user whose auth modal to update. Required when `trigger_id` is omitted, and ignored when it is * present. */ user_id: string; } export type AppsUserConnectionRequestAuthArguments = TokenOverridable & (UserConnectionTriggerID | UserConnectionUserID) & { /** @description The connection to render. Its `icon_url` defaults to the app's own avatar when omitted. */ primary_provider: UserConnectionPrimaryProvider; }; export interface AppsUserConnectionUpdateArguments extends TokenOverridable { /** @description The identifier for the user receiving the status update. */ user_id: string; /** @description The connection status value to assign to the user. `connected` or `disconnected`. */ status: string; } export interface AppsUninstallArguments extends Pick<OAuthCredentials, 'client_id' | 'client_secret'>, TokenOverridable { } export {}; //# sourceMappingURL=apps.d.ts.map