From 0df1a980ffcad96531dc047bdb976c519921b211 Mon Sep 17 00:00:00 2001 From: Alissa Renz Date: Tue, 7 Nov 2023 11:25:40 -0800 Subject: [PATCH 1/7] Add support for functions.* endpoints --- packages/web-api/src/methods.ts | 25 +++++++++++++++++++++++++ packages/web-api/src/response/index.ts | 2 ++ 2 files changed, 27 insertions(+) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index 60018c91a..7b7517579 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -150,6 +150,8 @@ import { FilesRevokePublicURLResponse, FilesSharedPublicURLResponse, FilesUploadResponse, + FunctionCompleteErrorResponse, + FunctionCompleteSuccessResponse, MigrationExchangeResponse, OauthAccessResponse, OauthV2AccessResponse, @@ -739,6 +741,15 @@ export abstract class Methods extends EventEmitter { }, }; + public readonly functions = { + completeError: bindApiCall(this, 'functions.completeError'), + completeSuccess: bindApiCall( + this, + 'functions.completeSuccess', + ), + }; + + public readonly migration = { exchange: bindApiCall(this, 'migration.exchange'), }; @@ -2035,6 +2046,20 @@ export interface FilesRemoteShareArguments extends WebAPICallOptions, TokenOverr external_id?: string; } +/* + * `functions.*` + */ +export interface FunctionCompleteSuccessArguments extends WebAPICallOptions, TokenOverridable { + function_execution_id: string; + outputs?: Record; +} + +export interface FunctionCompleteErrorArguments extends WebAPICallOptions, TokenOverridable { + function_execution_id: string; + error: string; +} + + /* * `groups.*` */ diff --git a/packages/web-api/src/response/index.ts b/packages/web-api/src/response/index.ts index 62dd725f2..82f9b7f40 100644 --- a/packages/web-api/src/response/index.ts +++ b/packages/web-api/src/response/index.ts @@ -192,6 +192,8 @@ export { FilesRemoteUpdateResponse } from './FilesRemoteUpdateResponse'; export { FilesRevokePublicURLResponse } from './FilesRevokePublicURLResponse'; export { FilesSharedPublicURLResponse } from './FilesSharedPublicURLResponse'; export { FilesUploadResponse } from './FilesUploadResponse'; +export { FunctionCompleteErrorResponse } from './FunctionCompleteErrorResponse'; +export { FunctionCompleteSuccessResponse } from './FunctionCompleteSuccessResponse'; export { GroupsArchiveResponse } from './GroupsArchiveResponse'; export { GroupsCloseResponse } from './GroupsCloseResponse'; export { GroupsCreateResponse } from './GroupsCreateResponse'; From c6734f490e0deb8cb029a1080b091c440a19a66d Mon Sep 17 00:00:00 2001 From: Alissa Renz Date: Wed, 8 Nov 2023 11:33:55 -0800 Subject: [PATCH 2/7] Facilitate package consumption with temp commenting out --- packages/web-api/src/methods.ts | 8 ++++---- packages/web-api/src/response/index.ts | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index 7b7517579..b4fd289c8 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -150,8 +150,8 @@ import { FilesRevokePublicURLResponse, FilesSharedPublicURLResponse, FilesUploadResponse, - FunctionCompleteErrorResponse, - FunctionCompleteSuccessResponse, + // FunctionCompleteErrorResponse, + // FunctionCompleteSuccessResponse, MigrationExchangeResponse, OauthAccessResponse, OauthV2AccessResponse, @@ -742,8 +742,8 @@ export abstract class Methods extends EventEmitter { }; public readonly functions = { - completeError: bindApiCall(this, 'functions.completeError'), - completeSuccess: bindApiCall( + completeError: bindApiCall(this, 'functions.completeError'), + completeSuccess: bindApiCall( this, 'functions.completeSuccess', ), diff --git a/packages/web-api/src/response/index.ts b/packages/web-api/src/response/index.ts index 82f9b7f40..4f015c3e2 100644 --- a/packages/web-api/src/response/index.ts +++ b/packages/web-api/src/response/index.ts @@ -192,8 +192,8 @@ export { FilesRemoteUpdateResponse } from './FilesRemoteUpdateResponse'; export { FilesRevokePublicURLResponse } from './FilesRevokePublicURLResponse'; export { FilesSharedPublicURLResponse } from './FilesSharedPublicURLResponse'; export { FilesUploadResponse } from './FilesUploadResponse'; -export { FunctionCompleteErrorResponse } from './FunctionCompleteErrorResponse'; -export { FunctionCompleteSuccessResponse } from './FunctionCompleteSuccessResponse'; +// export { FunctionCompleteErrorResponse } from './FunctionCompleteErrorResponse'; +// export { FunctionCompleteSuccessResponse } from './FunctionCompleteSuccessResponse'; export { GroupsArchiveResponse } from './GroupsArchiveResponse'; export { GroupsCloseResponse } from './GroupsCloseResponse'; export { GroupsCreateResponse } from './GroupsCreateResponse'; From 0389963f0b006fa1866a2401193c1493350f1d66 Mon Sep 17 00:00:00 2001 From: Alissa Renz Date: Tue, 5 Dec 2023 12:41:27 -0800 Subject: [PATCH 3/7] Update generated responses --- packages/web-api/src/methods.ts | 4 +- .../response/AdminFunctionsListResponse.ts | 1 + .../response/AppsManifestCreateResponse.ts | 39 +++ .../response/AppsManifestDeleteResponse.ts | 17 + .../response/AppsManifestExportResponse.ts | 130 +++++++ .../response/AppsManifestUpdateResponse.ts | 19 + .../response/AppsManifestValidateResponse.ts | 30 ++ .../web-api/src/response/AuthTestResponse.ts | 1 + .../src/response/ChatPostMessageResponse.ts | 4 + .../response/ChatScheduleMessageResponse.ts | 1 + .../src/response/ChatUpdateResponse.ts | 4 + .../response/ConversationsHistoryResponse.ts | 4 + .../src/response/ConversationsOpenResponse.ts | 1 + .../response/ConversationsRepliesResponse.ts | 4 + .../FilesCompleteUploadExternalResponse.ts | 13 + .../src/response/FilesRemoteAddResponse.ts | 3 + .../src/response/FilesRemoteInfoResponse.ts | 3 + .../src/response/FilesRemoteShareResponse.ts | 3 + .../src/response/FilesRemoteUpdateResponse.ts | 3 + .../response/FilesRevokePublicURLResponse.ts | 3 + .../response/FilesSharedPublicURLResponse.ts | 3 + .../src/response/FilesUploadResponse.ts | 3 + .../FunctionsCompleteErrorResponse.ts | 17 + .../FunctionsCompleteSuccessResponse.ts | 17 + .../web-api/src/response/PinsListResponse.ts | 3 + .../src/response/ReactionsGetResponse.ts | 1 + .../src/response/ReactionsListResponse.ts | 4 + .../web-api/src/response/RtmStartResponse.ts | 4 + .../web-api/src/response/SearchAllResponse.ts | 292 ++++++++-------- .../src/response/SearchFilesResponse.ts | 324 ++++++++++++------ .../src/response/SearchMessagesResponse.ts | 4 + .../src/response/TeamBillableInfoResponse.ts | 15 +- .../src/response/TeamProfileGetResponse.ts | 1 + .../response/ToolingTokensRotateResponse.ts | 28 ++ packages/web-api/src/response/index.ts | 10 +- 35 files changed, 762 insertions(+), 251 deletions(-) create mode 100644 packages/web-api/src/response/AppsManifestCreateResponse.ts create mode 100644 packages/web-api/src/response/AppsManifestDeleteResponse.ts create mode 100644 packages/web-api/src/response/AppsManifestExportResponse.ts create mode 100644 packages/web-api/src/response/AppsManifestUpdateResponse.ts create mode 100644 packages/web-api/src/response/AppsManifestValidateResponse.ts create mode 100644 packages/web-api/src/response/FunctionsCompleteErrorResponse.ts create mode 100644 packages/web-api/src/response/FunctionsCompleteSuccessResponse.ts create mode 100644 packages/web-api/src/response/ToolingTokensRotateResponse.ts diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index b4fd289c8..7b3021522 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -150,8 +150,8 @@ import { FilesRevokePublicURLResponse, FilesSharedPublicURLResponse, FilesUploadResponse, - // FunctionCompleteErrorResponse, - // FunctionCompleteSuccessResponse, + FunctionCompleteErrorResponse, + FunctionCompleteSuccessResponse, MigrationExchangeResponse, OauthAccessResponse, OauthV2AccessResponse, diff --git a/packages/web-api/src/response/AdminFunctionsListResponse.ts b/packages/web-api/src/response/AdminFunctionsListResponse.ts index 7f4186738..13dfcd56d 100644 --- a/packages/web-api/src/response/AdminFunctionsListResponse.ts +++ b/packages/web-api/src/response/AdminFunctionsListResponse.ts @@ -25,6 +25,7 @@ export interface Function { date_deleted?: number; date_updated?: number; description?: string; + form_enabled?: boolean; id?: string; input_parameters?: PutParameter[]; output_parameters?: PutParameter[]; diff --git a/packages/web-api/src/response/AppsManifestCreateResponse.ts b/packages/web-api/src/response/AppsManifestCreateResponse.ts new file mode 100644 index 000000000..98f60070f --- /dev/null +++ b/packages/web-api/src/response/AppsManifestCreateResponse.ts @@ -0,0 +1,39 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type AppsManifestCreateResponse = WebAPICallResult & { + app_id?: string; + credentials?: Credentials; + error?: string; + errors?: Error[]; + needed?: string; + oauth_authorize_url?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; +}; + +export interface Credentials { + client_id?: string; + client_secret?: string; + signing_secret?: string; + verification_token?: string; +} + +export interface Error { + code?: string; + message?: string; + pointer?: string; +} + +export interface ResponseMetadata { + messages?: string[]; +} diff --git a/packages/web-api/src/response/AppsManifestDeleteResponse.ts b/packages/web-api/src/response/AppsManifestDeleteResponse.ts new file mode 100644 index 000000000..36aa5c73d --- /dev/null +++ b/packages/web-api/src/response/AppsManifestDeleteResponse.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type AppsManifestDeleteResponse = WebAPICallResult & { + error?: string; + needed?: string; + ok?: boolean; + provided?: string; +}; diff --git a/packages/web-api/src/response/AppsManifestExportResponse.ts b/packages/web-api/src/response/AppsManifestExportResponse.ts new file mode 100644 index 000000000..bfee78b49 --- /dev/null +++ b/packages/web-api/src/response/AppsManifestExportResponse.ts @@ -0,0 +1,130 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type AppsManifestExportResponse = WebAPICallResult & { + error?: string; + manifest?: Manifest; + needed?: string; + ok?: boolean; + provided?: string; +}; + +export interface Manifest { + _metadata?: Metadata; + display_information?: DisplayInformation; + features?: Features; + functions?: { [key: string]: Function }; + oauth_config?: OauthConfig; + settings?: Settings; +} + +export interface Metadata { + major_version?: number; + minor_version?: number; +} + +export interface DisplayInformation { + background_color?: string; + description?: string; + long_description?: string; + name?: string; +} + +export interface Features { + app_home?: AppHome; + bot_user?: BotUser; + shortcuts?: Shortcut[]; + slash_commands?: SlashCommand[]; + unfurl_domains?: string[]; +} + +export interface AppHome { + home_tab_enabled?: boolean; + messages_tab_enabled?: boolean; + messages_tab_read_only_enabled?: boolean; +} + +export interface BotUser { + always_online?: boolean; + display_name?: string; +} + +export interface Shortcut { + callback_id?: string; + description?: string; + name?: string; + type?: string; +} + +export interface SlashCommand { + command?: string; + description?: string; + should_escape?: boolean; + url?: string; + usage_hint?: string; +} + +export interface Function { + description?: string; + input_parameters?: { [key: string]: PutParameter }; + output_parameters?: { [key: string]: PutParameter }; + title?: string; +} + +export interface PutParameter { + description?: string; + hint?: string; + is_required?: boolean; + maxLength?: number; + maximum?: number; + minLength?: number; + minimum?: number; + name?: string; + title?: string; + type?: string; +} + +export interface OauthConfig { + redirect_urls?: string[]; + scopes?: Scopes; + token_management_enabled?: boolean; +} + +export interface Scopes { + bot?: string[]; + user?: string[]; +} + +export interface Settings { + allowed_ip_address_ranges?: string[]; + background_color?: string; + description?: string; + event_subscriptions?: EventSubscriptions; + function_runtime?: string; + hermes_app_type?: string; + interactivity?: Interactivity; + long_description?: string; + org_deploy_enabled?: boolean; + socket_mode_enabled?: boolean; + token_rotation_enabled?: boolean; +} + +export interface EventSubscriptions { + bot_events?: string[]; + request_url?: string; + user_events?: string[]; +} + +export interface Interactivity { + is_enabled?: boolean; + message_menu_options_url?: string; + request_url?: string; +} diff --git a/packages/web-api/src/response/AppsManifestUpdateResponse.ts b/packages/web-api/src/response/AppsManifestUpdateResponse.ts new file mode 100644 index 000000000..7b0498454 --- /dev/null +++ b/packages/web-api/src/response/AppsManifestUpdateResponse.ts @@ -0,0 +1,19 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type AppsManifestUpdateResponse = WebAPICallResult & { + app_id?: string; + error?: string; + needed?: string; + ok?: boolean; + permissions_updated?: boolean; + provided?: string; +}; diff --git a/packages/web-api/src/response/AppsManifestValidateResponse.ts b/packages/web-api/src/response/AppsManifestValidateResponse.ts new file mode 100644 index 000000000..287c19e46 --- /dev/null +++ b/packages/web-api/src/response/AppsManifestValidateResponse.ts @@ -0,0 +1,30 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type AppsManifestValidateResponse = WebAPICallResult & { + error?: string; + errors?: Error[]; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; +}; + +export interface Error { + code?: string; + message?: string; + pointer?: string; + related_component?: string; +} + +export interface ResponseMetadata { + messages?: string[]; +} diff --git a/packages/web-api/src/response/AuthTestResponse.ts b/packages/web-api/src/response/AuthTestResponse.ts index 0c0365bed..c50744e6d 100644 --- a/packages/web-api/src/response/AuthTestResponse.ts +++ b/packages/web-api/src/response/AuthTestResponse.ts @@ -15,6 +15,7 @@ export type AuthTestResponse = WebAPICallResult & { bot_id?: string; enterprise_id?: string; error?: string; + expires_in?: number; is_enterprise_install?: boolean; needed?: string; ok?: boolean; diff --git a/packages/web-api/src/response/ChatPostMessageResponse.ts b/packages/web-api/src/response/ChatPostMessageResponse.ts index 259ea5ef4..491fe6e50 100644 --- a/packages/web-api/src/response/ChatPostMessageResponse.ts +++ b/packages/web-api/src/response/ChatPostMessageResponse.ts @@ -426,6 +426,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -548,11 +549,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -768,6 +771,7 @@ export interface MessageFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/ChatScheduleMessageResponse.ts b/packages/web-api/src/response/ChatScheduleMessageResponse.ts index ce02c7ccc..3879b7de0 100644 --- a/packages/web-api/src/response/ChatScheduleMessageResponse.ts +++ b/packages/web-api/src/response/ChatScheduleMessageResponse.ts @@ -358,6 +358,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/ChatUpdateResponse.ts b/packages/web-api/src/response/ChatUpdateResponse.ts index a95163029..9c816c3e4 100644 --- a/packages/web-api/src/response/ChatUpdateResponse.ts +++ b/packages/web-api/src/response/ChatUpdateResponse.ts @@ -370,6 +370,7 @@ export interface BlockFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -580,6 +581,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -672,11 +674,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/ConversationsHistoryResponse.ts b/packages/web-api/src/response/ConversationsHistoryResponse.ts index dcc684409..fa3330470 100644 --- a/packages/web-api/src/response/ConversationsHistoryResponse.ts +++ b/packages/web-api/src/response/ConversationsHistoryResponse.ts @@ -442,6 +442,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -564,11 +565,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -784,6 +787,7 @@ export interface BlockFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/ConversationsOpenResponse.ts b/packages/web-api/src/response/ConversationsOpenResponse.ts index 37da5dcfb..48cc35b23 100644 --- a/packages/web-api/src/response/ConversationsOpenResponse.ts +++ b/packages/web-api/src/response/ConversationsOpenResponse.ts @@ -374,6 +374,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/ConversationsRepliesResponse.ts b/packages/web-api/src/response/ConversationsRepliesResponse.ts index 5279c3446..dc7f13fe5 100644 --- a/packages/web-api/src/response/ConversationsRepliesResponse.ts +++ b/packages/web-api/src/response/ConversationsRepliesResponse.ts @@ -431,6 +431,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -553,11 +554,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -773,6 +776,7 @@ export interface BlockFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/FilesCompleteUploadExternalResponse.ts b/packages/web-api/src/response/FilesCompleteUploadExternalResponse.ts index 497ced64b..316db36a3 100644 --- a/packages/web-api/src/response/FilesCompleteUploadExternalResponse.ts +++ b/packages/web-api/src/response/FilesCompleteUploadExternalResponse.ts @@ -18,6 +18,7 @@ export type FilesCompleteUploadExternalResponse = WebAPICallResult & { }; export interface File { + alt_txt?: string; channels?: string[]; comments_count?: number; created?: number; @@ -41,6 +42,8 @@ export interface File { mimetype?: string; mode?: string; name?: string; + original_h?: number; + original_w?: number; permalink?: string; permalink_public?: string; pretty_type?: string; @@ -50,6 +53,13 @@ export interface File { public_url_shared?: boolean; shares?: Shares; size?: number; + thumb_160?: string; + thumb_360?: string; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_64?: string; + thumb_80?: string; + thumb_tiny?: string; timestamp?: number; title?: string; url_private?: string; @@ -65,10 +75,13 @@ export interface Shares { export interface Public { channel_name?: string; + latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; + thread_ts?: string; ts?: string; } diff --git a/packages/web-api/src/response/FilesRemoteAddResponse.ts b/packages/web-api/src/response/FilesRemoteAddResponse.ts index c8356c00f..77ffe2c92 100644 --- a/packages/web-api/src/response/FilesRemoteAddResponse.ts +++ b/packages/web-api/src/response/FilesRemoteAddResponse.ts @@ -102,6 +102,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -224,11 +225,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/FilesRemoteInfoResponse.ts b/packages/web-api/src/response/FilesRemoteInfoResponse.ts index d98749879..f9b0aefb5 100644 --- a/packages/web-api/src/response/FilesRemoteInfoResponse.ts +++ b/packages/web-api/src/response/FilesRemoteInfoResponse.ts @@ -102,6 +102,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -224,11 +225,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/FilesRemoteShareResponse.ts b/packages/web-api/src/response/FilesRemoteShareResponse.ts index a18f5c587..b3cbb60d2 100644 --- a/packages/web-api/src/response/FilesRemoteShareResponse.ts +++ b/packages/web-api/src/response/FilesRemoteShareResponse.ts @@ -102,6 +102,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -224,11 +225,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/FilesRemoteUpdateResponse.ts b/packages/web-api/src/response/FilesRemoteUpdateResponse.ts index e9742f4b6..453a490af 100644 --- a/packages/web-api/src/response/FilesRemoteUpdateResponse.ts +++ b/packages/web-api/src/response/FilesRemoteUpdateResponse.ts @@ -102,6 +102,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -224,11 +225,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/FilesRevokePublicURLResponse.ts b/packages/web-api/src/response/FilesRevokePublicURLResponse.ts index eb38decb3..79ad43204 100644 --- a/packages/web-api/src/response/FilesRevokePublicURLResponse.ts +++ b/packages/web-api/src/response/FilesRevokePublicURLResponse.ts @@ -102,6 +102,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -224,11 +225,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/FilesSharedPublicURLResponse.ts b/packages/web-api/src/response/FilesSharedPublicURLResponse.ts index fcab2354a..32d5f14aa 100644 --- a/packages/web-api/src/response/FilesSharedPublicURLResponse.ts +++ b/packages/web-api/src/response/FilesSharedPublicURLResponse.ts @@ -102,6 +102,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -224,11 +225,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/FilesUploadResponse.ts b/packages/web-api/src/response/FilesUploadResponse.ts index 6a9644af0..71047cb65 100644 --- a/packages/web-api/src/response/FilesUploadResponse.ts +++ b/packages/web-api/src/response/FilesUploadResponse.ts @@ -102,6 +102,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -224,11 +225,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/FunctionsCompleteErrorResponse.ts b/packages/web-api/src/response/FunctionsCompleteErrorResponse.ts new file mode 100644 index 000000000..0cf44f406 --- /dev/null +++ b/packages/web-api/src/response/FunctionsCompleteErrorResponse.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type FunctionsCompleteErrorResponse = WebAPICallResult & { + error?: string; + needed?: string; + ok?: boolean; + provided?: string; +}; diff --git a/packages/web-api/src/response/FunctionsCompleteSuccessResponse.ts b/packages/web-api/src/response/FunctionsCompleteSuccessResponse.ts new file mode 100644 index 000000000..e81792d51 --- /dev/null +++ b/packages/web-api/src/response/FunctionsCompleteSuccessResponse.ts @@ -0,0 +1,17 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type FunctionsCompleteSuccessResponse = WebAPICallResult & { + error?: string; + needed?: string; + ok?: boolean; + provided?: string; +}; diff --git a/packages/web-api/src/response/PinsListResponse.ts b/packages/web-api/src/response/PinsListResponse.ts index 0eb228977..1cb28b34e 100644 --- a/packages/web-api/src/response/PinsListResponse.ts +++ b/packages/web-api/src/response/PinsListResponse.ts @@ -110,6 +110,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -232,11 +233,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; diff --git a/packages/web-api/src/response/ReactionsGetResponse.ts b/packages/web-api/src/response/ReactionsGetResponse.ts index b8eace75d..28ae8343b 100644 --- a/packages/web-api/src/response/ReactionsGetResponse.ts +++ b/packages/web-api/src/response/ReactionsGetResponse.ts @@ -358,6 +358,7 @@ export interface File { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/ReactionsListResponse.ts b/packages/web-api/src/response/ReactionsListResponse.ts index 4619974ac..e62fb413f 100644 --- a/packages/web-api/src/response/ReactionsListResponse.ts +++ b/packages/web-api/src/response/ReactionsListResponse.ts @@ -443,6 +443,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -565,11 +566,13 @@ export interface Shares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -785,6 +788,7 @@ export interface BlockFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/RtmStartResponse.ts b/packages/web-api/src/response/RtmStartResponse.ts index 081bab1d2..c95acfd7c 100644 --- a/packages/web-api/src/response/RtmStartResponse.ts +++ b/packages/web-api/src/response/RtmStartResponse.ts @@ -537,6 +537,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -659,11 +660,13 @@ export interface PurpleShares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -863,6 +866,7 @@ export interface MessageFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/SearchAllResponse.ts b/packages/web-api/src/response/SearchAllResponse.ts index 978a7b82b..1d7ab00b6 100644 --- a/packages/web-api/src/response/SearchAllResponse.ts +++ b/packages/web-api/src/response/SearchAllResponse.ts @@ -28,93 +28,106 @@ export interface Files { } export interface FilesMatch { - attachments?: Attachment[]; - bot_id?: string; - cc?: Cc[]; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: MatchHeaders; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - non_owner_editable?: boolean; - original_attachment_count?: number; - original_h?: number; - original_w?: number; - permalink?: string; - permalink_public?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - sent_to_self?: boolean; - shares?: MatchShares; - size?: number; - subject?: string; - thumb_1024?: string; - thumb_1024_h?: number; - thumb_1024_w?: number; - thumb_160?: string; - thumb_360?: string; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_480?: string; - thumb_480_h?: number; - thumb_480_w?: number; - thumb_64?: string; - thumb_720?: string; - thumb_720_h?: number; - thumb_720_w?: number; - thumb_80?: string; - thumb_800?: string; - thumb_800_h?: number; - thumb_800_w?: number; - thumb_960?: string; - thumb_960_h?: number; - thumb_960_w?: number; - thumb_pdf?: string; - thumb_pdf_h?: number; - thumb_pdf_w?: number; - thumb_tiny?: string; - thumb_video?: string; - timestamp?: number; - title?: string; - to?: Cc[]; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + access?: string; + attachments?: Attachment[]; + bot_id?: string; + cc?: Cc[]; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + edit_link?: string; + editable?: boolean; + editors?: string[]; + editors_count?: number; + external_id?: string; + external_type?: string; + external_url?: string; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: MatchHeaders; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + non_owner_editable?: boolean; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: number; + original_w?: number; + permalink?: string; + permalink_public?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; + private_channels_with_file_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + sent_to_self?: boolean; + shares?: MatchShares; + size?: number; + subject?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: string[]; + thumb_1024?: string; + thumb_1024_h?: number; + thumb_1024_w?: number; + thumb_160?: string; + thumb_360?: string; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_480?: string; + thumb_480_h?: number; + thumb_480_w?: number; + thumb_64?: string; + thumb_720?: string; + thumb_720_h?: number; + thumb_720_w?: number; + thumb_80?: string; + thumb_800?: string; + thumb_800_h?: number; + thumb_800_w?: number; + thumb_960?: string; + thumb_960_h?: number; + thumb_960_w?: number; + thumb_pdf?: string; + thumb_pdf_h?: number; + thumb_pdf_w?: number; + thumb_tiny?: string; + thumb_video?: string; + timestamp?: number; + title?: string; + title_blocks?: MatchTitleBlock[]; + to?: Cc[]; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; } export interface Attachment { @@ -126,7 +139,7 @@ export interface Attachment { author_link?: string; author_name?: string; author_subname?: string; - blocks?: TitleBlockElement[]; + blocks?: AttachmentBlock[]; bot_id?: string; callback_id?: string; channel_id?: string; @@ -237,7 +250,7 @@ export enum ActionType { WorkflowButton = 'workflow_button', } -export interface TitleBlockElement { +export interface AttachmentBlock { accessory?: Accessory; alt_text?: string; app_collaborators?: string[]; @@ -438,7 +451,7 @@ export interface FileElement { app_id?: string; app_name?: string; attachments?: any[]; - blocks?: TitleBlockElement[]; + blocks?: AttachmentBlock[]; bot_id?: string; canvas_template_mode?: string; cc?: Cc[]; @@ -519,6 +532,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -571,7 +585,7 @@ export interface FileElement { thumb_video_w?: number; timestamp?: number; title?: string; - title_blocks?: TitleBlockElement[]; + title_blocks?: AttachmentBlock[]; to?: Cc[]; transcription?: Transcription; update_notification?: number; @@ -641,11 +655,13 @@ export interface PurpleShares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -666,7 +682,7 @@ export interface MessageBlock { export interface Message { app_id?: string; attachments?: any[]; - blocks?: TitleBlockElement[]; + blocks?: AttachmentBlock[]; bot_id?: string; bot_link?: string; bot_profile?: BotProfile; @@ -861,6 +877,7 @@ export interface MessageFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -1038,54 +1055,12 @@ export interface Public { reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; ts?: string; } -export interface Pagination { - first?: number; - last?: number; - page?: number; - page_count?: number; - per_page?: number; - total_count?: number; -} - -export interface Paging { - count?: number; - page?: number; - pages?: number; - total?: number; -} - -export interface Messages { - matches?: MessagesMatch[]; - pagination?: Pagination; - paging?: Paging; - total?: number; -} - -export interface MessagesMatch { - attachments?: Attachment[]; - blocks?: MatchBlock[]; - channel?: Channel; - files?: FileElement[]; - iid?: string; - is_mpim?: boolean; - no_reactions?: boolean; - permalink?: string; - previous?: Previous; - previous_2?: Previous; - score?: number; - team?: string; - text?: string; - ts?: string; - type?: string; - user?: string; - username?: string; -} - -export interface MatchBlock { +export interface MatchTitleBlock { accessory?: Accessory; alt_text?: string; api_decoration_available?: boolean; @@ -1181,6 +1156,49 @@ export interface AppIconUrls { image_original?: string; } +export interface Pagination { + first?: number; + last?: number; + page?: number; + page_count?: number; + per_page?: number; + total_count?: number; +} + +export interface Paging { + count?: number; + page?: number; + pages?: number; + total?: number; +} + +export interface Messages { + matches?: MessagesMatch[]; + pagination?: Pagination; + paging?: Paging; + total?: number; +} + +export interface MessagesMatch { + attachments?: Attachment[]; + blocks?: MatchTitleBlock[]; + channel?: Channel; + files?: FileElement[]; + iid?: string; + is_mpim?: boolean; + no_reactions?: boolean; + permalink?: string; + previous?: Previous; + previous_2?: Previous; + score?: number; + team?: string; + text?: string; + ts?: string; + type?: string; + user?: string; + username?: string; +} + export interface Channel { id?: string; is_channel?: boolean; @@ -1201,7 +1219,7 @@ export interface Channel { export interface Previous { attachments?: Attachment[]; - blocks?: MatchBlock[]; + blocks?: MatchTitleBlock[]; iid?: string; permalink?: string; text?: string; diff --git a/packages/web-api/src/response/SearchFilesResponse.ts b/packages/web-api/src/response/SearchFilesResponse.ts index 9bc5a32d6..d9392d2ae 100644 --- a/packages/web-api/src/response/SearchFilesResponse.ts +++ b/packages/web-api/src/response/SearchFilesResponse.ts @@ -26,93 +26,106 @@ export interface Files { } export interface Match { - attachments?: Attachment[]; - bot_id?: string; - cc?: Cc[]; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; - created?: number; - display_as_bot?: boolean; - edit_link?: string; - editable?: boolean; - editors?: string[]; - external_id?: string; - external_type?: string; - external_url?: string; - file_access?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_more_shares?: boolean; - has_rich_preview?: boolean; - headers?: MatchHeaders; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - is_external?: boolean; - is_public?: boolean; - is_starred?: boolean; - last_editor?: string; - lines?: number; - lines_more?: number; - media_display_type?: string; - mimetype?: string; - mode?: string; - name?: string; - non_owner_editable?: boolean; - original_attachment_count?: number; - original_h?: number; - original_w?: number; - permalink?: string; - permalink_public?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - sent_to_self?: boolean; - shares?: MatchShares; - size?: number; - subject?: string; - thumb_1024?: string; - thumb_1024_h?: number; - thumb_1024_w?: number; - thumb_160?: string; - thumb_360?: string; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_480?: string; - thumb_480_h?: number; - thumb_480_w?: number; - thumb_64?: string; - thumb_720?: string; - thumb_720_h?: number; - thumb_720_w?: number; - thumb_80?: string; - thumb_800?: string; - thumb_800_h?: number; - thumb_800_w?: number; - thumb_960?: string; - thumb_960_h?: number; - thumb_960_w?: number; - thumb_pdf?: string; - thumb_pdf_h?: number; - thumb_pdf_w?: number; - thumb_tiny?: string; - thumb_video?: string; - timestamp?: number; - title?: string; - to?: Cc[]; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - user_team?: string; - username?: string; + access?: string; + attachments?: Attachment[]; + bot_id?: string; + cc?: Cc[]; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + display_as_bot?: boolean; + dm_mpdm_users_with_file_access?: DmMpdmUsersWithFileAccess[]; + edit_link?: string; + editable?: boolean; + editors?: string[]; + editors_count?: number; + external_id?: string; + external_type?: string; + external_url?: string; + file_access?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_more_shares?: boolean; + has_rich_preview?: boolean; + headers?: MatchHeaders; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + is_channel_space?: boolean; + is_external?: boolean; + is_public?: boolean; + is_starred?: boolean; + last_editor?: string; + lines?: number; + lines_more?: number; + linked_channel_id?: string; + media_display_type?: string; + mimetype?: string; + mode?: string; + name?: string; + non_owner_editable?: boolean; + org_or_workspace_access?: string; + original_attachment_count?: number; + original_h?: number; + original_w?: number; + permalink?: string; + permalink_public?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; + private_channels_with_file_access_count?: number; + public_url_shared?: boolean; + quip_thread_id?: string; + sent_to_self?: boolean; + shares?: MatchShares; + size?: number; + subject?: string; + team_pref_version_history_enabled?: boolean; + teams_shared_with?: string[]; + thumb_1024?: string; + thumb_1024_h?: number; + thumb_1024_w?: number; + thumb_160?: string; + thumb_360?: string; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_480?: string; + thumb_480_h?: number; + thumb_480_w?: number; + thumb_64?: string; + thumb_720?: string; + thumb_720_h?: number; + thumb_720_w?: number; + thumb_80?: string; + thumb_800?: string; + thumb_800_h?: number; + thumb_800_w?: number; + thumb_960?: string; + thumb_960_h?: number; + thumb_960_w?: number; + thumb_pdf?: string; + thumb_pdf_h?: number; + thumb_pdf_w?: number; + thumb_tiny?: string; + thumb_video?: string; + timestamp?: number; + title?: string; + title_blocks?: TitleBlock[]; + to?: Cc[]; + update_notification?: number; + updated?: number; + url_private?: string; + url_private_download?: string; + url_static_preview?: string; + user?: string; + user_team?: string; + username?: string; } export interface Attachment { @@ -218,11 +231,11 @@ export interface Block { block_id?: string; bot_user_id?: string; button_label?: string; - description?: Subtitle | string; + description?: DescriptionElement | string; developer_trace_id?: string; elements?: Accessory[]; fallback?: string; - fields?: Subtitle[]; + fields?: DescriptionElement[]; function_trigger_id?: string; image_bytes?: number; image_height?: number; @@ -234,9 +247,9 @@ export interface Block { provider_name?: string; sales_home_workflow_app_type?: number; share_url?: string; - text?: Subtitle; + text?: DescriptionElement; thumbnail_url?: string; - title?: Subtitle | string; + title?: DescriptionElement | string; title_url?: string; trigger_subtype?: string; trigger_type?: string; @@ -278,10 +291,10 @@ export interface Accessory { offset?: number; option_groups?: AccessoryOptionGroup[]; options?: InitialOptionElement[]; - placeholder?: Subtitle; + placeholder?: DescriptionElement; response_url_enabled?: boolean; style?: string; - text?: Subtitle; + text?: DescriptionElement; timezone?: string; type?: string; url?: string; @@ -290,21 +303,21 @@ export interface Accessory { } export interface AccessoryConfirm { - confirm?: Subtitle; - deny?: Subtitle; + confirm?: DescriptionElement; + deny?: DescriptionElement; style?: string; - text?: Subtitle; - title?: Subtitle; + text?: DescriptionElement; + title?: DescriptionElement; } -export interface Subtitle { +export interface DescriptionElement { emoji?: boolean; text?: string; - type?: SubtitleType; + type?: DescriptionType; verbatim?: boolean; } -export enum SubtitleType { +export enum DescriptionType { Mrkdwn = 'mrkdwn', PlainText = 'plain_text', } @@ -369,14 +382,14 @@ export interface Filter { } export interface InitialOptionElement { - description?: Subtitle; - text?: Subtitle; + description?: DescriptionElement; + text?: DescriptionElement; url?: string; value?: string; } export interface AccessoryOptionGroup { - label?: Subtitle; + label?: DescriptionElement; options?: InitialOptionElement[]; } @@ -498,6 +511,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -620,11 +634,13 @@ export interface PurpleShares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -840,6 +856,7 @@ export interface MessageFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -998,8 +1015,8 @@ export interface AttachmentMetadata { export interface Preview { can_remove?: boolean; icon_url?: string; - subtitle?: Subtitle; - title?: Subtitle; + subtitle?: DescriptionElement; + title?: DescriptionElement; type?: string; } @@ -1017,10 +1034,107 @@ export interface Public { reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; ts?: string; } +export interface TitleBlock { + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + app_collaborators?: string[]; + app_id?: string; + author_name?: string; + block_id?: string; + bot_user_id?: string; + button_label?: string; + call?: Call; + call_id?: string; + description?: DescriptionElement; + developer_trace_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: DescriptionElement[]; + file?: MessageFile; + file_id?: string; + function_trigger_id?: string; + hint?: DescriptionElement; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + is_workflow_app?: boolean; + label?: DescriptionElement; + optional?: boolean; + owning_team_id?: string; + provider_icon_url?: string; + provider_name?: string; + sales_home_workflow_app_type?: number; + share_url?: string; + source?: string; + text?: DescriptionElement; + thumbnail_url?: string; + title?: DescriptionElement; + title_url?: string; + trigger_subtype?: string; + trigger_type?: string; + type?: BlockType; + url?: string; + video_url?: string; + workflow_id?: string; +} + +export interface Call { + media_backend_type?: string; + v1?: V1; +} + +export interface V1 { + active_participants?: Participant[]; + all_participants?: Participant[]; + app_icon_urls?: AppIconUrls; + app_id?: string; + channels?: string[]; + created_by?: string; + date_end?: number; + date_start?: number; + desktop_app_join_url?: string; + display_id?: string; + has_ended?: boolean; + id?: string; + is_dm_call?: boolean; + join_url?: string; + name?: string; + was_accepted?: boolean; + was_missed?: boolean; + was_rejected?: boolean; +} + +export interface Participant { + avatar_url?: string; + display_name?: string; + external_id?: string; + slack_id?: string; +} + +export interface AppIconUrls { + image_1024?: string; + image_128?: string; + image_192?: string; + image_32?: string; + image_36?: string; + image_48?: string; + image_512?: string; + image_64?: string; + image_72?: string; + image_96?: string; + image_original?: string; +} + export interface Pagination { first?: number; last?: number; diff --git a/packages/web-api/src/response/SearchMessagesResponse.ts b/packages/web-api/src/response/SearchMessagesResponse.ts index c17b81291..4cf90e7b1 100644 --- a/packages/web-api/src/response/SearchMessagesResponse.ts +++ b/packages/web-api/src/response/SearchMessagesResponse.ts @@ -447,6 +447,7 @@ export interface FileElement { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; @@ -569,11 +570,13 @@ export interface PurpleShares { export interface Private { access?: string; channel_name?: string; + date_last_shared?: number; latest_reply?: string; reply_count?: number; reply_users?: string[]; reply_users_count?: number; share_user_id?: string; + source?: string; team_id?: string; thread_ts?: string; ts?: string; @@ -789,6 +792,7 @@ export interface MessageFile { source_team?: string; subject?: string; subtype?: string; + team_pref_version_history_enabled?: boolean; teams_shared_with?: any[]; template_conversion_ts?: number; template_description?: string; diff --git a/packages/web-api/src/response/TeamBillableInfoResponse.ts b/packages/web-api/src/response/TeamBillableInfoResponse.ts index 4464b4d95..505571f7e 100644 --- a/packages/web-api/src/response/TeamBillableInfoResponse.ts +++ b/packages/web-api/src/response/TeamBillableInfoResponse.ts @@ -10,13 +10,18 @@ import { WebAPICallResult } from '../WebClient'; export type TeamBillableInfoResponse = WebAPICallResult & { - billable_info?: { [key: string]: BillableInfo }; - error?: string; - needed?: string; - ok?: boolean; - provided?: string; + billable_info?: { [key: string]: BillableInfo }; + error?: string; + needed?: string; + ok?: boolean; + provided?: string; + response_metadata?: ResponseMetadata; }; export interface BillableInfo { billing_active?: boolean; } + +export interface ResponseMetadata { + next_cursor?: string; +} diff --git a/packages/web-api/src/response/TeamProfileGetResponse.ts b/packages/web-api/src/response/TeamProfileGetResponse.ts index fc3e0fdca..a7887b127 100644 --- a/packages/web-api/src/response/TeamProfileGetResponse.ts +++ b/packages/web-api/src/response/TeamProfileGetResponse.ts @@ -27,6 +27,7 @@ export interface Field { hint?: string; id?: string; is_hidden?: boolean; + is_inverse?: boolean; label?: string; options?: Options; ordering?: number; diff --git a/packages/web-api/src/response/ToolingTokensRotateResponse.ts b/packages/web-api/src/response/ToolingTokensRotateResponse.ts new file mode 100644 index 000000000..093f088d5 --- /dev/null +++ b/packages/web-api/src/response/ToolingTokensRotateResponse.ts @@ -0,0 +1,28 @@ +/* eslint-disable */ +///////////////////////////////////////////////////////////////////////////////////////// +// // +// !!! DO NOT EDIT THIS FILE !!! // +// // +// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. // +// Please refer to the script code to learn how to update the source data. // +// // +///////////////////////////////////////////////////////////////////////////////////////// + +import { WebAPICallResult } from '../WebClient'; +export type ToolingTokensRotateResponse = WebAPICallResult & { + error?: string; + exp?: number; + iat?: number; + needed?: string; + ok?: boolean; + provided?: string; + refresh_token?: string; + response_metadata?: ResponseMetadata; + team_id?: string; + token?: string; + user_id?: string; +}; + +export interface ResponseMetadata { + messages?: string[]; +} diff --git a/packages/web-api/src/response/index.ts b/packages/web-api/src/response/index.ts index 4f015c3e2..5035d08a9 100644 --- a/packages/web-api/src/response/index.ts +++ b/packages/web-api/src/response/index.ts @@ -99,6 +99,11 @@ export { AdminWorkflowsUnpublishResponse } from './AdminWorkflowsUnpublishRespon export { ApiTestResponse } from './ApiTestResponse'; export { AppsConnectionsOpenResponse } from './AppsConnectionsOpenResponse'; export { AppsEventAuthorizationsListResponse } from './AppsEventAuthorizationsListResponse'; +export { AppsManifestCreateResponse } from './AppsManifestCreateResponse'; +export { AppsManifestDeleteResponse } from './AppsManifestDeleteResponse'; +export { AppsManifestExportResponse } from './AppsManifestExportResponse'; +export { AppsManifestUpdateResponse } from './AppsManifestUpdateResponse'; +export { AppsManifestValidateResponse } from './AppsManifestValidateResponse'; export { AppsPermissionsInfoResponse } from './AppsPermissionsInfoResponse'; export { AppsPermissionsRequestResponse } from './AppsPermissionsRequestResponse'; export { AppsPermissionsResourcesListResponse } from './AppsPermissionsResourcesListResponse'; @@ -192,8 +197,8 @@ export { FilesRemoteUpdateResponse } from './FilesRemoteUpdateResponse'; export { FilesRevokePublicURLResponse } from './FilesRevokePublicURLResponse'; export { FilesSharedPublicURLResponse } from './FilesSharedPublicURLResponse'; export { FilesUploadResponse } from './FilesUploadResponse'; -// export { FunctionCompleteErrorResponse } from './FunctionCompleteErrorResponse'; -// export { FunctionCompleteSuccessResponse } from './FunctionCompleteSuccessResponse'; +export { FunctionsCompleteErrorResponse } from './FunctionsCompleteErrorResponse'; +export { FunctionsCompleteSuccessResponse } from './FunctionsCompleteSuccessResponse'; export { GroupsArchiveResponse } from './GroupsArchiveResponse'; export { GroupsCloseResponse } from './GroupsCloseResponse'; export { GroupsCreateResponse } from './GroupsCreateResponse'; @@ -257,6 +262,7 @@ export { TeamInfoResponse } from './TeamInfoResponse'; export { TeamIntegrationLogsResponse } from './TeamIntegrationLogsResponse'; export { TeamPreferencesListResponse } from './TeamPreferencesListResponse'; export { TeamProfileGetResponse } from './TeamProfileGetResponse'; +export { ToolingTokensRotateResponse } from './ToolingTokensRotateResponse'; export { UsergroupsCreateResponse } from './UsergroupsCreateResponse'; export { UsergroupsDisableResponse } from './UsergroupsDisableResponse'; export { UsergroupsEnableResponse } from './UsergroupsEnableResponse'; From 8020e260dcd399e17bd61cbff19015caa69db0b3 Mon Sep 17 00:00:00 2001 From: Alissa Renz Date: Tue, 5 Dec 2023 12:50:36 -0800 Subject: [PATCH 4/7] Rename variables to actually reflect methods --- packages/web-api/src/methods.ts | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index 7b3021522..5e8a9f075 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -150,8 +150,8 @@ import { FilesRevokePublicURLResponse, FilesSharedPublicURLResponse, FilesUploadResponse, - FunctionCompleteErrorResponse, - FunctionCompleteSuccessResponse, + FunctionsCompleteErrorResponse, + FunctionsCompleteSuccessResponse, MigrationExchangeResponse, OauthAccessResponse, OauthV2AccessResponse, @@ -742,8 +742,8 @@ export abstract class Methods extends EventEmitter { }; public readonly functions = { - completeError: bindApiCall(this, 'functions.completeError'), - completeSuccess: bindApiCall( + completeError: bindApiCall(this, 'functions.completeError'), + completeSuccess: bindApiCall( this, 'functions.completeSuccess', ), @@ -2049,14 +2049,14 @@ export interface FilesRemoteShareArguments extends WebAPICallOptions, TokenOverr /* * `functions.*` */ -export interface FunctionCompleteSuccessArguments extends WebAPICallOptions, TokenOverridable { +export interface FunctionsCompleteErrorArguments extends WebAPICallOptions, TokenOverridable { function_execution_id: string; - outputs?: Record; + error: string; } -export interface FunctionCompleteErrorArguments extends WebAPICallOptions, TokenOverridable { +export interface FunctionsCompleteSuccessArguments extends WebAPICallOptions, TokenOverridable { function_execution_id: string; - error: string; + outputs?: Record; } From eb7baead1831521a3319b779f40593c7a8cbf39b Mon Sep 17 00:00:00 2001 From: Alissa Renz Date: Tue, 5 Dec 2023 13:53:01 -0800 Subject: [PATCH 5/7] Update response types one last time --- packages/web-api/src/response/AppsManifestExportResponse.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/web-api/src/response/AppsManifestExportResponse.ts b/packages/web-api/src/response/AppsManifestExportResponse.ts index 6e1669d5f..bfee78b49 100644 --- a/packages/web-api/src/response/AppsManifestExportResponse.ts +++ b/packages/web-api/src/response/AppsManifestExportResponse.ts @@ -27,8 +27,8 @@ export interface Manifest { } export interface Metadata { - major_version?: string; - minor_version?: string; + major_version?: number; + minor_version?: number; } export interface DisplayInformation { From c2bb1d18864946b00599850df3c78b43aa4b27b1 Mon Sep 17 00:00:00 2001 From: Alissa Renz Date: Tue, 5 Dec 2023 14:08:57 -0800 Subject: [PATCH 6/7] Appeasing the ESLint gods --- packages/web-api/src/methods.ts | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index 32748bfbd..476c91f06 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -762,7 +762,6 @@ export abstract class Methods extends EventEmitter { ), }; - public readonly migration = { exchange: bindApiCall(this, 'migration.exchange'), }; @@ -2101,7 +2100,6 @@ export interface FunctionsCompleteSuccessArguments extends WebAPICallOptions, To outputs?: Record; } - /* * `groups.*` */ From 3bdf11a4f5db0caf29f3e203f1641bb257053736 Mon Sep 17 00:00:00 2001 From: Alissa Renz Date: Wed, 6 Dec 2023 09:54:13 -0800 Subject: [PATCH 7/7] outputs are actually required --- packages/web-api/src/methods.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/web-api/src/methods.ts b/packages/web-api/src/methods.ts index 476c91f06..fd8ddf00f 100644 --- a/packages/web-api/src/methods.ts +++ b/packages/web-api/src/methods.ts @@ -2097,7 +2097,7 @@ export interface FunctionsCompleteErrorArguments extends WebAPICallOptions, Toke export interface FunctionsCompleteSuccessArguments extends WebAPICallOptions, TokenOverridable { function_execution_id: string; - outputs?: Record; + outputs: Record; } /*