From 78a5959503bc3c71a48cae3ce922fc7984727ff9 Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Wed, 25 May 2022 05:27:52 +0900 Subject: [PATCH] Update the web-api response types using the latest source --- .../src/response/ChatPostMessageResponse.ts | 156 ++++++++++------ .../response/ChatScheduleMessageResponse.ts | 132 -------------- .../response/ConversationsHistoryResponse.ts | 161 +++-------------- .../src/response/ConversationsOpenResponse.ts | 110 ++++++++++++ .../response/ConversationsRepliesResponse.ts | 74 ++------ .../web-api/src/response/FilesListResponse.ts | 28 +-- .../src/response/ReactionsGetResponse.ts | 138 +------------- .../src/response/ReactionsListResponse.ts | 73 ++++---- .../web-api/src/response/RtmStartResponse.ts | 140 ++++++--------- .../web-api/src/response/SearchAllResponse.ts | 49 ++--- .../src/response/SearchMessagesResponse.ts | 158 ++++++++++------ .../web-api/src/response/StarsListResponse.ts | 168 ++++++++++++++++-- 12 files changed, 647 insertions(+), 740 deletions(-) diff --git a/packages/web-api/src/response/ChatPostMessageResponse.ts b/packages/web-api/src/response/ChatPostMessageResponse.ts index ae9413744..49a94a317 100644 --- a/packages/web-api/src/response/ChatPostMessageResponse.ts +++ b/packages/web-api/src/response/ChatPostMessageResponse.ts @@ -25,7 +25,7 @@ export type ChatPostMessageResponse = WebAPICallResult & { export interface Message { app_id?: string; attachments?: Attachment[]; - blocks?: Block[]; + blocks?: MessageBlock[]; bot_id?: string; bot_profile?: BotProfile; icons?: MessageIcons; @@ -51,7 +51,7 @@ export interface Attachment { author_link?: string; author_name?: string; author_subname?: string; - blocks?: Block[]; + blocks?: AttachmentBlock[]; bot_id?: string; callback_id?: string; channel_id?: string; @@ -132,7 +132,7 @@ export interface SelectedOptionElement { value?: string; } -export interface Block { +export interface AttachmentBlock { accessory?: Accessory; alt_text?: string; api_decoration_available?: boolean; @@ -145,7 +145,7 @@ export interface Block { external_id?: string; fallback?: string; fields?: Hint[]; - file?: BlockFile; + file?: PurpleFile; file_id?: string; hint?: Hint; image_bytes?: number; @@ -286,7 +286,56 @@ export interface AppIconUrls { image_original?: string; } -export interface BlockFile { +export interface PurpleFile { + cc?: Cc[]; + created?: number; + edit_link?: string; + external_url?: string; + has_rich_preview?: boolean; + is_starred?: boolean; + last_editor?: string; + original_attachment_count?: number; + original_w?: string; + shares?: Shares; + simplified_html?: string; + thumb_1024_w?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_video?: string; + thumb_video_h?: number; + user?: string; +} + +export interface Cc { + address?: string; + name?: string; + original?: string; +} + +export interface Shares { + private?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; +} + +export interface Private { + channel_name?: string; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; + reply_users_count?: number; + share_user_id?: string; + team_id?: string; + thread_ts?: string; + ts?: string; +} + +export interface Field { + short?: boolean; + title?: string; + value?: string; +} + +export interface FileElement { app_id?: string; app_name?: string; bot_id?: string; @@ -409,12 +458,6 @@ export interface BlockFile { vtt?: string; } -export interface Cc { - address?: string; - name?: string; - original?: string; -} - export interface Headers { date?: string; in_reply_to?: string; @@ -439,35 +482,62 @@ export interface Reaction { users?: string[]; } -export interface Shares { - private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; +export interface Transcription { + locale?: string; + status?: string; } -export interface Private { - channel_name?: string; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; - reply_users_count?: number; - share_user_id?: string; - team_id?: string; - thread_ts?: string; - ts?: string; +export interface AttachmentMetadata { + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } -export interface Transcription { - locale?: string; - status?: string; +export interface Preview { + can_remove?: boolean; + icon_url?: string; + subtitle?: Hint; + title?: Hint; + type?: string; } -export interface Field { - short?: boolean; - title?: string; - value?: string; +export interface MessageBlock { + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + block_id?: string; + call?: Call; + call_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: Hint[]; + file?: FluffyFile; + file_id?: string; + hint?: Hint; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + label?: Hint; + optional?: boolean; + source?: string; + text?: Hint; + title?: Hint; + type?: string; } -export interface FileElement { +export interface FluffyFile { app_id?: string; app_name?: string; bot_id?: string; @@ -590,28 +660,6 @@ export interface FileElement { vtt?: string; } -export interface AttachmentMetadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; -} - -export interface Preview { - can_remove?: boolean; - icon_url?: string; - subtitle?: Hint; - title?: Hint; - type?: string; -} - export interface BotProfile { app_id?: string; deleted?: boolean; diff --git a/packages/web-api/src/response/ChatScheduleMessageResponse.ts b/packages/web-api/src/response/ChatScheduleMessageResponse.ts index 750fa9cd6..3bece1f4c 100644 --- a/packages/web-api/src/response/ChatScheduleMessageResponse.ts +++ b/packages/web-api/src/response/ChatScheduleMessageResponse.ts @@ -184,126 +184,23 @@ export interface AppIconUrls { } export interface File { - app_id?: string; - app_name?: string; - bot_id?: string; cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - duration_ms?: number; edit_link?: string; - editable?: boolean; - editor?: string; - external_id?: string; - external_type?: string; external_url?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - 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; - mp4?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; original_attachment_count?: number; - original_h?: string; original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - reactions?: Reaction[]; - sent_to_self?: boolean; shares?: Shares; simplified_html?: string; - size?: number; - subject?: string; - subtype?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; thumb_pdf_h?: string; thumb_pdf_w?: string; - thumb_tiny?: string; thumb_video?: string; thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - to?: Cc[]; - transcription?: Transcription; - updated?: number; - url_private?: string; - url_private_download?: string; user?: string; - username?: string; - vtt?: string; } export interface Cc { @@ -312,30 +209,6 @@ export interface Cc { original?: string; } -export interface Headers { - date?: string; - in_reply_to?: string; - message_id?: string; - reply_to?: string; -} - -export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; - timestamp?: number; - user?: string; -} - -export interface Reaction { - count?: number; - name?: string; - url?: string; - users?: string[]; -} - export interface Shares { private?: { [key: string]: Private[] }; public?: { [key: string]: Private[] }; @@ -353,11 +226,6 @@ export interface Private { ts?: string; } -export interface Transcription { - locale?: string; - status?: string; -} - export interface BotProfile { app_id?: string; deleted?: boolean; diff --git a/packages/web-api/src/response/ConversationsHistoryResponse.ts b/packages/web-api/src/response/ConversationsHistoryResponse.ts index 3974c53b4..48c7939fa 100644 --- a/packages/web-api/src/response/ConversationsHistoryResponse.ts +++ b/packages/web-api/src/response/ConversationsHistoryResponse.ts @@ -292,126 +292,23 @@ export interface AppIconUrls { } export interface BlockFile { - app_id?: string; - app_name?: string; - bot_id?: string; cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - duration_ms?: number; edit_link?: string; - editable?: boolean; - editor?: string; - external_id?: string; - external_type?: string; external_url?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - 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; - mp4?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; original_attachment_count?: number; - original_h?: string; original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - reactions?: Reaction[]; - sent_to_self?: boolean; shares?: Shares; simplified_html?: string; - size?: number; - subject?: string; - subtype?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; thumb_pdf_h?: string; thumb_pdf_w?: string; - thumb_tiny?: string; thumb_video?: string; thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - to?: Cc[]; - transcription?: Transcription; - updated?: number; - url_private?: string; - url_private_download?: string; user?: string; - username?: string; - vtt?: string; } export interface Cc { @@ -420,30 +317,6 @@ export interface Cc { original?: string; } -export interface Headers { - date?: string; - in_reply_to?: string; - message_id?: string; - reply_to?: string; -} - -export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; - timestamp?: number; - user?: string; -} - -export interface Reaction { - count?: number; - name?: string; - url?: string; - users?: string[]; -} - export interface Shares { private?: { [key: string]: Private[] }; public?: { [key: string]: Private[] }; @@ -461,11 +334,6 @@ export interface Private { ts?: string; } -export interface Transcription { - locale?: string; - status?: string; -} - export interface Field { short?: boolean; title?: string; @@ -595,6 +463,35 @@ export interface FileElement { vtt?: string; } +export interface Headers { + date?: string; + in_reply_to?: string; + message_id?: string; + reply_to?: string; +} + +export interface InitialComment { + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; + timestamp?: number; + user?: string; +} + +export interface Reaction { + count?: number; + name?: string; + url?: string; + users?: string[]; +} + +export interface Transcription { + locale?: string; + status?: string; +} + export interface AttachmentMetadata { extension?: string; format?: string; diff --git a/packages/web-api/src/response/ConversationsOpenResponse.ts b/packages/web-api/src/response/ConversationsOpenResponse.ts index 90eeb8d3c..51c506a33 100644 --- a/packages/web-api/src/response/ConversationsOpenResponse.ts +++ b/packages/web-api/src/response/ConversationsOpenResponse.ts @@ -194,26 +194,71 @@ export interface AppIconUrls { export interface File { app_id?: string; app_name?: string; + bot_id?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; created?: number; deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; duration_ms?: number; + edit_link?: string; + editable?: boolean; + editor?: string; external_id?: string; external_type?: string; external_url?: string; filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_rich_preview?: boolean; + headers?: Headers; hls?: string; hls_embed?: string; id?: string; + image_exif_rotation?: number; ims?: string[]; + initial_comment?: InitialComment; 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; mp4?: string; name?: string; + non_owner_editable?: boolean; + num_stars?: number; original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; preview_plain_text?: string; + public_url_shared?: boolean; + reactions?: Reaction[]; + sent_to_self?: boolean; + shares?: Shares; + simplified_html?: string; + size?: number; subject?: string; subtype?: string; + thumb_1024?: string; thumb_1024_gif?: string; thumb_1024_h?: string; thumb_1024_w?: string; @@ -221,27 +266,45 @@ export interface File { thumb_160_gif?: string; thumb_160_h?: string; thumb_160_w?: string; + thumb_360?: string; thumb_360_gif?: string; thumb_360_h?: string; thumb_360_w?: string; thumb_480?: string; thumb_480_gif?: string; + thumb_480_h?: string; thumb_480_w?: string; thumb_64?: string; thumb_64_gif?: string; thumb_64_h?: string; thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; thumb_80?: string; thumb_800?: string; thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; thumb_80_gif?: string; thumb_80_h?: string; thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; thumb_tiny?: string; thumb_video?: string; thumb_video_h?: number; thumb_video_w?: number; + timestamp?: number; title?: string; + to?: Cc[]; transcription?: Transcription; updated?: number; url_private?: string; @@ -251,6 +314,53 @@ export interface File { vtt?: string; } +export interface Cc { + address?: string; + name?: string; + original?: string; +} + +export interface Headers { + date?: string; + in_reply_to?: string; + message_id?: string; + reply_to?: string; +} + +export interface InitialComment { + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; + timestamp?: number; + user?: string; +} + +export interface Reaction { + count?: number; + name?: string; + url?: string; + users?: string[]; +} + +export interface Shares { + private?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; +} + +export interface Private { + channel_name?: string; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; + reply_users_count?: number; + share_user_id?: string; + team_id?: string; + thread_ts?: string; + ts?: string; +} + export interface Transcription { locale?: string; status?: string; diff --git a/packages/web-api/src/response/ConversationsRepliesResponse.ts b/packages/web-api/src/response/ConversationsRepliesResponse.ts index d30dce158..27d0a0b92 100644 --- a/packages/web-api/src/response/ConversationsRepliesResponse.ts +++ b/packages/web-api/src/response/ConversationsRepliesResponse.ts @@ -281,68 +281,13 @@ export interface AppIconUrls { } export interface BlockFile { - app_id?: string; - app_name?: string; - created?: number; - deanimate?: string; - duration_ms?: number; - external_id?: string; - external_type?: string; - external_url?: string; - filetype?: string; - hls?: string; - hls_embed?: string; - id?: string; - ims?: string[]; - is_external?: boolean; - mimetype?: string; - mp4?: string; - name?: string; - original_attachment_count?: number; - pretty_type?: string; - preview_plain_text?: string; - subject?: string; - subtype?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; - thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_tiny?: string; - thumb_video?: string; - thumb_video_h?: number; - thumb_video_w?: number; - title?: string; - transcription?: Transcription; - updated?: number; - url_private?: string; - url_private_download?: string; - user?: string; - username?: string; - vtt?: string; -} - -export interface Transcription { - locale?: string; - status?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + title?: string; } export interface Field { @@ -521,6 +466,11 @@ export interface Private { ts?: string; } +export interface Transcription { + locale?: string; + status?: string; +} + export interface Metadata { extension?: string; format?: string; diff --git a/packages/web-api/src/response/FilesListResponse.ts b/packages/web-api/src/response/FilesListResponse.ts index d52231df3..d85754441 100644 --- a/packages/web-api/src/response/FilesListResponse.ts +++ b/packages/web-api/src/response/FilesListResponse.ts @@ -65,8 +65,8 @@ export interface File { non_owner_editable?: boolean; num_stars?: number; original_attachment_count?: number; - original_h?: number; - original_w?: number; + original_h?: string; + original_w?: string; permalink?: string; permalink_public?: string; pinned_to?: string[]; @@ -87,40 +87,40 @@ export interface File { subtype?: string; thumb_1024?: string; thumb_1024_gif?: string; - thumb_1024_h?: number; - thumb_1024_w?: number; + thumb_1024_h?: string; + thumb_1024_w?: string; thumb_160?: string; thumb_160_gif?: string; thumb_160_h?: string; thumb_160_w?: string; thumb_360?: string; thumb_360_gif?: string; - thumb_360_h?: number; - thumb_360_w?: number; + thumb_360_h?: string; + thumb_360_w?: string; thumb_480?: string; thumb_480_gif?: string; - thumb_480_h?: number; - thumb_480_w?: number; + thumb_480_h?: string; + thumb_480_w?: string; thumb_64?: string; thumb_64_gif?: string; thumb_64_h?: string; thumb_64_w?: string; thumb_720?: string; thumb_720_gif?: string; - thumb_720_h?: number; - thumb_720_w?: number; + thumb_720_h?: string; + thumb_720_w?: string; thumb_80?: string; thumb_800?: string; thumb_800_gif?: string; - thumb_800_h?: number; - thumb_800_w?: number; + thumb_800_h?: string; + thumb_800_w?: string; thumb_80_gif?: string; thumb_80_h?: string; thumb_80_w?: string; thumb_960?: string; thumb_960_gif?: string; - thumb_960_h?: number; - thumb_960_w?: number; + thumb_960_h?: string; + thumb_960_w?: string; thumb_gif?: string; thumb_pdf?: string; thumb_pdf_h?: string; diff --git a/packages/web-api/src/response/ReactionsGetResponse.ts b/packages/web-api/src/response/ReactionsGetResponse.ts index bc2542299..eba06bcea 100644 --- a/packages/web-api/src/response/ReactionsGetResponse.ts +++ b/packages/web-api/src/response/ReactionsGetResponse.ts @@ -184,126 +184,23 @@ export interface AppIconUrls { } export interface File { - app_id?: string; - app_name?: string; - bot_id?: string; cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; - duration_ms?: number; edit_link?: string; - editable?: boolean; - editor?: string; - external_id?: string; - external_type?: string; external_url?: string; - filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; has_rich_preview?: boolean; - headers?: Headers; - hls?: string; - hls_embed?: string; - id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; - 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; - mp4?: string; - name?: string; - non_owner_editable?: boolean; - num_stars?: number; original_attachment_count?: number; - original_h?: string; original_w?: string; - permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; - pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - reactions?: Reaction[]; - sent_to_self?: boolean; shares?: Shares; simplified_html?: string; - size?: number; - subject?: string; - subtype?: string; - thumb_1024?: string; - thumb_1024_gif?: string; - thumb_1024_h?: string; thumb_1024_w?: string; - thumb_160?: string; - thumb_160_gif?: string; - thumb_160_h?: string; - thumb_160_w?: string; - thumb_360?: string; - thumb_360_gif?: string; - thumb_360_h?: string; - thumb_360_w?: string; - thumb_480?: string; - thumb_480_gif?: string; - thumb_480_h?: string; - thumb_480_w?: string; - thumb_64?: string; - thumb_64_gif?: string; - thumb_64_h?: string; - thumb_64_w?: string; - thumb_720?: string; - thumb_720_gif?: string; - thumb_720_h?: string; - thumb_720_w?: string; - thumb_80?: string; - thumb_800?: string; - thumb_800_gif?: string; - thumb_800_h?: string; - thumb_800_w?: string; - thumb_80_gif?: string; - thumb_80_h?: string; - thumb_80_w?: string; - thumb_960?: string; - thumb_960_gif?: string; - thumb_960_h?: string; - thumb_960_w?: string; - thumb_gif?: string; - thumb_pdf?: string; thumb_pdf_h?: string; thumb_pdf_w?: string; - thumb_tiny?: string; thumb_video?: string; thumb_video_h?: number; - thumb_video_w?: number; - timestamp?: number; - title?: string; - to?: Cc[]; - transcription?: Transcription; - updated?: number; - url_private?: string; - url_private_download?: string; user?: string; - username?: string; - vtt?: string; } export interface Cc { @@ -312,30 +209,6 @@ export interface Cc { original?: string; } -export interface Headers { - date?: string; - in_reply_to?: string; - message_id?: string; - reply_to?: string; -} - -export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; - timestamp?: number; - user?: string; -} - -export interface Reaction { - count?: number; - name?: string; - url?: string; - users?: string[]; -} - export interface Shares { private?: { [key: string]: Private[] }; public?: { [key: string]: Private[] }; @@ -353,11 +226,6 @@ export interface Private { ts?: string; } -export interface Transcription { - locale?: string; - status?: string; -} - export interface BotProfile { app_id?: string; deleted?: boolean; @@ -373,3 +241,9 @@ export interface Icons { image_48?: string; image_72?: string; } + +export interface Reaction { + count?: number; + name?: string; + users?: string[]; +} diff --git a/packages/web-api/src/response/ReactionsListResponse.ts b/packages/web-api/src/response/ReactionsListResponse.ts index 51c168a8b..29c30a51f 100644 --- a/packages/web-api/src/response/ReactionsListResponse.ts +++ b/packages/web-api/src/response/ReactionsListResponse.ts @@ -198,16 +198,46 @@ export interface AppIconUrls { } export interface BlockFile { - app_id?: string; - converted_pdf?: string; - filetype?: string; - non_owner_editable?: boolean; - subject?: string; - thumb_1024_w?: string; - thumb_64_w?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; + cc?: Cc[]; + created?: number; + edit_link?: string; + external_url?: string; + has_rich_preview?: boolean; + is_starred?: boolean; + last_editor?: string; + original_attachment_count?: number; + original_w?: string; + shares?: Shares; + simplified_html?: string; + thumb_1024_w?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_video?: string; + thumb_video_h?: number; + user?: string; +} + +export interface Cc { + address?: string; + name?: string; + original?: string; +} + +export interface Shares { + private?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; +} + +export interface Private { + channel_name?: string; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; + reply_users_count?: number; + share_user_id?: string; + team_id?: string; + thread_ts?: string; + ts?: string; } export interface BotProfile { @@ -349,12 +379,6 @@ export interface FileElement { vtt?: string; } -export interface Cc { - address?: string; - name?: string; - original?: string; -} - export interface Headers { date?: string; in_reply_to?: string; @@ -379,23 +403,6 @@ export interface Reaction { users?: string[]; } -export interface Shares { - private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; -} - -export interface Private { - channel_name?: string; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; - reply_users_count?: number; - share_user_id?: string; - team_id?: string; - thread_ts?: string; - ts?: string; -} - export interface Transcription { locale?: string; status?: string; diff --git a/packages/web-api/src/response/RtmStartResponse.ts b/packages/web-api/src/response/RtmStartResponse.ts index b650c2e0a..ba21f70f6 100644 --- a/packages/web-api/src/response/RtmStartResponse.ts +++ b/packages/web-api/src/response/RtmStartResponse.ts @@ -390,67 +390,27 @@ export interface AppIconUrls { export interface BlockFile { app_id?: string; app_name?: string; - bot_id?: string; - cc?: Cc[]; - channel_actions_count?: number; - channel_actions_ts?: string; - channels?: string[]; - comments_count?: number; - converted_pdf?: string; created?: number; - deanimate?: string; - deanimate_gif?: string; - display_as_bot?: boolean; duration_ms?: number; - edit_link?: string; editable?: boolean; editor?: string; external_id?: string; external_type?: string; external_url?: string; filetype?: string; - from?: Cc[]; - groups?: string[]; - has_more?: boolean; - has_rich_preview?: boolean; - headers?: Headers; hls?: string; hls_embed?: string; id?: string; - image_exif_rotation?: number; - ims?: string[]; - initial_comment?: InitialComment; 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; mp4?: string; name?: string; non_owner_editable?: boolean; - num_stars?: number; original_attachment_count?: number; - original_h?: string; - original_w?: string; permalink?: string; - permalink_public?: string; - pinned_to?: string[]; - pjpeg?: string; - plain_text?: string; pretty_type?: string; - preview?: string; - preview_highlight?: string; - preview_is_truncated?: boolean; - preview_plain_text?: string; - public_url_shared?: boolean; - reactions?: Reaction[]; - sent_to_self?: boolean; - shares?: Shares; - simplified_html?: string; size?: number; subject?: string; subtype?: string; @@ -492,15 +452,12 @@ export interface BlockFile { thumb_960_w?: string; thumb_gif?: string; thumb_pdf?: string; - thumb_pdf_h?: string; thumb_pdf_w?: string; - thumb_tiny?: string; thumb_video?: string; thumb_video_h?: number; thumb_video_w?: number; timestamp?: number; title?: string; - to?: Cc[]; transcription?: Transcription; updated?: number; url_private?: string; @@ -510,53 +467,6 @@ export interface BlockFile { vtt?: string; } -export interface Cc { - address?: string; - name?: string; - original?: string; -} - -export interface Headers { - date?: string; - in_reply_to?: string; - message_id?: string; - reply_to?: string; -} - -export interface InitialComment { - channel?: string; - comment?: string; - created?: number; - id?: string; - is_intro?: boolean; - timestamp?: number; - user?: string; -} - -export interface Reaction { - count?: number; - name?: string; - url?: string; - users?: string[]; -} - -export interface Shares { - private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; -} - -export interface Private { - channel_name?: string; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; - reply_users_count?: number; - share_user_id?: string; - team_id?: string; - thread_ts?: string; - ts?: string; -} - export interface Transcription { locale?: string; status?: string; @@ -691,6 +601,53 @@ export interface FileElement { vtt?: string; } +export interface Cc { + address?: string; + name?: string; + original?: string; +} + +export interface Headers { + date?: string; + in_reply_to?: string; + message_id?: string; + reply_to?: string; +} + +export interface InitialComment { + channel?: string; + comment?: string; + created?: number; + id?: string; + is_intro?: boolean; + timestamp?: number; + user?: string; +} + +export interface Reaction { + count?: number; + name?: string; + url?: string; + users?: string[]; +} + +export interface Shares { + private?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; +} + +export interface Private { + channel_name?: string; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; + reply_users_count?: number; + share_user_id?: string; + team_id?: string; + thread_ts?: string; + ts?: string; +} + export interface Metadata { extension?: string; format?: string; @@ -785,7 +742,9 @@ export interface SelfPrefs { a11y_animations?: boolean; a11y_dyslexic?: boolean; a11y_play_sound_for_incoming_dm?: boolean; + a11y_play_sound_for_incoming_dm_choice?: string; a11y_play_sound_for_sent_dm?: boolean; + a11y_play_sound_for_sent_dm_choice?: string; a11y_read_out_incoming_dm?: boolean; a11y_screen_reader_message_label_date_time_first?: boolean; activity_view?: string; @@ -1054,6 +1013,7 @@ export interface SelfPrefs { onboarding_complete?: boolean; onboarding_slackbot_conversation_step?: number; onboarding_state?: number; + onboarding_tip_opt_out?: boolean; open_quip_doc_in_flexpane?: boolean; opened_slackbot_dm?: boolean; overloaded_message_enabled?: boolean; diff --git a/packages/web-api/src/response/SearchAllResponse.ts b/packages/web-api/src/response/SearchAllResponse.ts index ab8774e2a..bafc05983 100644 --- a/packages/web-api/src/response/SearchAllResponse.ts +++ b/packages/web-api/src/response/SearchAllResponse.ts @@ -406,16 +406,34 @@ export interface AppIconUrls { } export interface PurpleFile { - app_id?: string; - converted_pdf?: string; - filetype?: string; - non_owner_editable?: boolean; - subject?: string; - thumb_1024_w?: string; - thumb_64_w?: string; - thumb_pdf_h?: string; - thumb_pdf_w?: string; - thumb_tiny?: string; + cc?: Cc[]; + created?: number; + edit_link?: string; + external_url?: string; + has_rich_preview?: boolean; + is_starred?: boolean; + last_editor?: string; + original_attachment_count?: number; + original_w?: string; + shares?: FileShares; + simplified_html?: string; + thumb_1024_w?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_video?: string; + thumb_video_h?: number; + user?: string; +} + +export interface Cc { + address?: string; + name?: string; + original?: string; +} + +export interface FileShares { + private?: { [key: string]: Public[] }; + public?: { [key: string]: Public[] }; } export interface Field { @@ -547,12 +565,6 @@ export interface FileElement { vtt?: string; } -export interface Cc { - address?: string; - name?: string; - original?: string; -} - export interface Headers { date?: string; in_reply_to?: string; @@ -577,11 +589,6 @@ export interface Reaction { users?: string[]; } -export interface FileShares { - private?: { [key: string]: Public[] }; - public?: { [key: string]: Public[] }; -} - export interface Transcription { locale?: string; status?: string; diff --git a/packages/web-api/src/response/SearchMessagesResponse.ts b/packages/web-api/src/response/SearchMessagesResponse.ts index 5eff7b107..3ee7db278 100644 --- a/packages/web-api/src/response/SearchMessagesResponse.ts +++ b/packages/web-api/src/response/SearchMessagesResponse.ts @@ -27,7 +27,7 @@ export interface Messages { export interface Match { attachments?: Attachment[]; - blocks?: Block[]; + blocks?: MatchBlock[]; channel?: Channel; files?: FileElement[]; iid?: string; @@ -54,7 +54,7 @@ export interface Attachment { author_link?: string; author_name?: string; author_subname?: string; - blocks?: Block[]; + blocks?: AttachmentBlock[]; bot_id?: string; callback_id?: string; channel_id?: string; @@ -135,7 +135,7 @@ export interface SelectedOptionElement { value?: string; } -export interface Block { +export interface AttachmentBlock { accessory?: Accessory; alt_text?: string; api_decoration_available?: boolean; @@ -148,7 +148,7 @@ export interface Block { external_id?: string; fallback?: string; fields?: Hint[]; - file?: BlockFile; + file?: PurpleFile; file_id?: string; hint?: Hint; image_bytes?: number; @@ -279,7 +279,56 @@ export interface AppIconUrls { image_original?: string; } -export interface BlockFile { +export interface PurpleFile { + cc?: Cc[]; + created?: number; + edit_link?: string; + external_url?: string; + has_rich_preview?: boolean; + is_starred?: boolean; + last_editor?: string; + original_attachment_count?: number; + original_w?: string; + shares?: Shares; + simplified_html?: string; + thumb_1024_w?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_video?: string; + thumb_video_h?: number; + user?: string; +} + +export interface Cc { + address?: string; + name?: string; + original?: string; +} + +export interface Shares { + private?: { [key: string]: Private[] }; + public?: { [key: string]: Private[] }; +} + +export interface Private { + channel_name?: string; + latest_reply?: string; + reply_count?: number; + reply_users?: string[]; + reply_users_count?: number; + share_user_id?: string; + team_id?: string; + thread_ts?: string; + ts?: string; +} + +export interface Field { + short?: boolean; + title?: string; + value?: string; +} + +export interface FileElement { app_id?: string; app_name?: string; bot_id?: string; @@ -402,12 +451,6 @@ export interface BlockFile { vtt?: string; } -export interface Cc { - address?: string; - name?: string; - original?: string; -} - export interface Headers { date?: string; in_reply_to?: string; @@ -432,35 +475,62 @@ export interface Reaction { users?: string[]; } -export interface Shares { - private?: { [key: string]: Private[] }; - public?: { [key: string]: Private[] }; +export interface Transcription { + locale?: string; + status?: string; } -export interface Private { - channel_name?: string; - latest_reply?: string; - reply_count?: number; - reply_users?: string[]; - reply_users_count?: number; - share_user_id?: string; - team_id?: string; - thread_ts?: string; - ts?: string; +export interface Metadata { + extension?: string; + format?: string; + original_h?: number; + original_w?: number; + rotation?: number; + thumb_160?: boolean; + thumb_360_h?: number; + thumb_360_w?: number; + thumb_64?: boolean; + thumb_80?: boolean; + thumb_tiny?: string; } -export interface Transcription { - locale?: string; - status?: string; +export interface Preview { + can_remove?: boolean; + icon_url?: string; + subtitle?: Hint; + title?: Hint; + type?: string; } -export interface Field { - short?: boolean; - title?: string; - value?: string; +export interface MatchBlock { + accessory?: Accessory; + alt_text?: string; + api_decoration_available?: boolean; + block_id?: string; + call?: Call; + call_id?: string; + dispatch_action?: boolean; + element?: Accessory; + elements?: Accessory[]; + external_id?: string; + fallback?: string; + fields?: Hint[]; + file?: FluffyFile; + file_id?: string; + hint?: Hint; + image_bytes?: number; + image_height?: number; + image_url?: string; + image_width?: number; + label?: Hint; + optional?: boolean; + source?: string; + text?: Hint; + title?: Hint; + type?: string; } -export interface FileElement { +export interface FluffyFile { app_id?: string; app_name?: string; bot_id?: string; @@ -583,28 +653,6 @@ export interface FileElement { vtt?: string; } -export interface Metadata { - extension?: string; - format?: string; - original_h?: number; - original_w?: number; - rotation?: number; - thumb_160?: boolean; - thumb_360_h?: number; - thumb_360_w?: number; - thumb_64?: boolean; - thumb_80?: boolean; - thumb_tiny?: string; -} - -export interface Preview { - can_remove?: boolean; - icon_url?: string; - subtitle?: Hint; - title?: Hint; - type?: string; -} - export interface Channel { id?: string; is_channel?: boolean; @@ -624,7 +672,7 @@ export interface Channel { export interface Previous { attachments?: Attachment[]; - blocks?: Block[]; + blocks?: AttachmentBlock[]; iid?: string; permalink?: string; text?: string; diff --git a/packages/web-api/src/response/StarsListResponse.ts b/packages/web-api/src/response/StarsListResponse.ts index 3f4e764b7..f383cba56 100644 --- a/packages/web-api/src/response/StarsListResponse.ts +++ b/packages/web-api/src/response/StarsListResponse.ts @@ -22,7 +22,7 @@ export interface Item { channel?: string; comment?: Comment; date_create?: number; - file?: File; + file?: ItemFile; message?: Message; type?: string; } @@ -36,15 +36,10 @@ export interface Comment { is_starred?: boolean; num_stars?: number; timestamp?: number; - user?: User; + user?: string; } -export enum User { - Empty = '', - U00000000 = 'U00000000', -} - -export interface File { +export interface ItemFile { app_id?: string; app_name?: string; bot_id?: string; @@ -184,7 +179,7 @@ export interface Reaction { count?: number; name?: string; url?: string; - users?: User[]; + users?: string[]; } export interface Shares { @@ -217,8 +212,8 @@ export interface Message { client_msg_id?: string; display_as_bot?: boolean; edited?: Edited; - files?: File[]; - inviter?: User; + files?: FileElement[]; + inviter?: string; is_locked?: boolean; is_starred?: boolean; last_read?: string; @@ -226,7 +221,7 @@ export interface Message { permalink?: string; reactions?: Reaction[]; reply_count?: number; - reply_users?: User[]; + reply_users?: string[]; reply_users_count?: number; subscribed?: boolean; subtype?: string; @@ -236,7 +231,7 @@ export interface Message { ts?: string; type?: string; upload?: boolean; - user?: User; + user?: string; username?: string; } @@ -258,7 +253,7 @@ export interface Attachment { fallback?: string; fields?: Field[]; filename?: string; - files?: File[]; + files?: FileElement[]; footer?: string; footer_icon?: string; from_url?: string; @@ -343,7 +338,7 @@ export interface Block { external_id?: string; fallback?: string; fields?: Hint[]; - file?: File; + file?: BlockFile; file_id?: string; hint?: Hint; image_bytes?: number; @@ -474,12 +469,155 @@ export interface AppIconUrls { image_original?: string; } +export interface BlockFile { + cc?: Cc[]; + created?: number; + edit_link?: string; + external_url?: string; + has_rich_preview?: boolean; + is_starred?: boolean; + last_editor?: string; + original_attachment_count?: number; + original_w?: string; + shares?: Shares; + simplified_html?: string; + thumb_1024_w?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_video?: string; + thumb_video_h?: number; + user?: string; +} + export interface Field { short?: boolean; title?: string; value?: string; } +export interface FileElement { + app_id?: string; + app_name?: string; + bot_id?: string; + cc?: Cc[]; + channel_actions_count?: number; + channel_actions_ts?: string; + channels?: string[]; + comments_count?: number; + converted_pdf?: string; + created?: number; + deanimate?: string; + deanimate_gif?: string; + display_as_bot?: boolean; + duration_ms?: number; + edit_link?: string; + editable?: boolean; + editor?: string; + external_id?: string; + external_type?: string; + external_url?: string; + filetype?: string; + from?: Cc[]; + groups?: string[]; + has_more?: boolean; + has_rich_preview?: boolean; + headers?: Headers; + hls?: string; + hls_embed?: string; + id?: string; + image_exif_rotation?: number; + ims?: string[]; + initial_comment?: Comment; + 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; + mp4?: string; + name?: string; + non_owner_editable?: boolean; + num_stars?: number; + original_attachment_count?: number; + original_h?: string; + original_w?: string; + permalink?: string; + permalink_public?: string; + pinned_to?: string[]; + pjpeg?: string; + plain_text?: string; + pretty_type?: string; + preview?: string; + preview_highlight?: string; + preview_is_truncated?: boolean; + preview_plain_text?: string; + public_url_shared?: boolean; + reactions?: Reaction[]; + sent_to_self?: boolean; + shares?: Shares; + simplified_html?: string; + size?: number; + subject?: string; + subtype?: string; + thumb_1024?: string; + thumb_1024_gif?: string; + thumb_1024_h?: string; + thumb_1024_w?: string; + thumb_160?: string; + thumb_160_gif?: string; + thumb_160_h?: string; + thumb_160_w?: string; + thumb_360?: string; + thumb_360_gif?: string; + thumb_360_h?: string; + thumb_360_w?: string; + thumb_480?: string; + thumb_480_gif?: string; + thumb_480_h?: string; + thumb_480_w?: string; + thumb_64?: string; + thumb_64_gif?: string; + thumb_64_h?: string; + thumb_64_w?: string; + thumb_720?: string; + thumb_720_gif?: string; + thumb_720_h?: string; + thumb_720_w?: string; + thumb_80?: string; + thumb_800?: string; + thumb_800_gif?: string; + thumb_800_h?: string; + thumb_800_w?: string; + thumb_80_gif?: string; + thumb_80_h?: string; + thumb_80_w?: string; + thumb_960?: string; + thumb_960_gif?: string; + thumb_960_h?: string; + thumb_960_w?: string; + thumb_gif?: string; + thumb_pdf?: string; + thumb_pdf_h?: string; + thumb_pdf_w?: string; + thumb_tiny?: string; + thumb_video?: string; + thumb_video_h?: number; + thumb_video_w?: number; + timestamp?: number; + title?: string; + to?: Cc[]; + transcription?: Transcription; + updated?: number; + url_private?: string; + url_private_download?: string; + user?: string; + username?: string; + vtt?: string; +} + export interface Metadata { extension?: string; format?: string;