From c5a6a740547f859539665b7181a71d33fc77017b Mon Sep 17 00:00:00 2001 From: Kazuhiro Sera Date: Wed, 15 Dec 2021 14:48:02 +0900 Subject: [PATCH] Update the web-api response types with the latest data source --- .../src/response/ChatUpdateResponse.ts | 42 +++++++++---------- .../response/ConversationsHistoryResponse.ts | 16 +++---- .../web-api/src/response/SearchAllResponse.ts | 24 +++++------ .../src/response/SearchMessagesResponse.ts | 24 +++++------ 4 files changed, 53 insertions(+), 53 deletions(-) diff --git a/packages/web-api/src/response/ChatUpdateResponse.ts b/packages/web-api/src/response/ChatUpdateResponse.ts index 80720d380..7ab247a89 100644 --- a/packages/web-api/src/response/ChatUpdateResponse.ts +++ b/packages/web-api/src/response/ChatUpdateResponse.ts @@ -142,39 +142,26 @@ export interface File { timestamp?: number; name?: string; title?: string; + subject?: string; mimetype?: string; filetype?: string; pretty_type?: string; user?: string; - editable?: boolean; - size?: number; mode?: string; - is_external?: boolean; - external_type?: string; - is_public?: boolean; - public_url_shared?: boolean; - display_as_bot?: boolean; - username?: string; - url_private?: string; - url_private_download?: string; - permalink?: string; - permalink_public?: string; - edit_link?: string; - preview?: string; - preview_highlight?: string; - lines?: number; - lines_more?: number; - preview_is_truncated?: boolean; - is_starred?: boolean; - has_rich_preview?: boolean; - subject?: string; + editable?: boolean; non_owner_editable?: boolean; editor?: string; last_editor?: string; updated?: number; original_attachment_count?: number; + is_external?: boolean; + external_type?: string; external_id?: string; external_url?: string; + username?: string; + size?: number; + url_private?: string; + url_private_download?: string; app_id?: string; app_name?: string; thumb_64?: string; @@ -226,11 +213,23 @@ export interface File { deanimate?: string; deanimate_gif?: string; pjpeg?: string; + permalink?: string; + permalink_public?: string; + edit_link?: string; + has_rich_preview?: boolean; media_display_type?: string; + preview_is_truncated?: boolean; + preview?: string; + preview_highlight?: string; plain_text?: string; preview_plain_text?: string; has_more?: boolean; sent_to_self?: boolean; + lines?: number; + lines_more?: number; + is_public?: boolean; + public_url_shared?: boolean; + display_as_bot?: boolean; shares?: Shares; channel_actions_ts?: string; channel_actions_count?: number; @@ -239,6 +238,7 @@ export interface File { bot_id?: string; initial_comment?: InitialComment; num_stars?: number; + is_starred?: boolean; comments_count?: number; } diff --git a/packages/web-api/src/response/ConversationsHistoryResponse.ts b/packages/web-api/src/response/ConversationsHistoryResponse.ts index 541e638f4..3753a70c6 100644 --- a/packages/web-api/src/response/ConversationsHistoryResponse.ts +++ b/packages/web-api/src/response/ConversationsHistoryResponse.ts @@ -161,8 +161,10 @@ export interface Metadata { export interface Block { type?: string; - elements?: Element[]; block_id?: string; + text?: Text; + accessory?: Accessory; + elements?: Element[]; fallback?: string; image_url?: string; image_width?: number; @@ -170,27 +172,25 @@ export interface Block { image_bytes?: number; alt_text?: string; title?: Text; - text?: Text; fields?: Text[]; - accessory?: Accessory; } export interface Accessory { - type?: string; - image_url?: string; - alt_text?: string; fallback?: string; + image_url?: string; image_width?: number; image_height?: number; image_bytes?: number; + type?: string; + alt_text?: string; } export interface Element { type?: string; - text?: Text; action_id?: string; - url?: string; + text?: Text; value?: string; + url?: string; style?: string; confirm?: ElementConfirm; placeholder?: Text; diff --git a/packages/web-api/src/response/SearchAllResponse.ts b/packages/web-api/src/response/SearchAllResponse.ts index 8bebf901b..877d5f0de 100644 --- a/packages/web-api/src/response/SearchAllResponse.ts +++ b/packages/web-api/src/response/SearchAllResponse.ts @@ -154,30 +154,24 @@ export interface MessagesMatch { } export interface Attachment { - service_name?: string; - title?: string; - title_link?: string; - text?: string; - fallback?: string; - thumb_url?: string; - from_url?: string; - thumb_width?: number; - thumb_height?: number; - service_icon?: string; - id?: number; - original_url?: string; msg_subtype?: string; + fallback?: string; callback_id?: string; color?: string; pretext?: string; service_url?: string; + service_name?: string; + service_icon?: string; author_id?: string; author_name?: string; author_link?: string; author_icon?: string; + from_url?: string; + original_url?: string; author_subname?: string; channel_id?: string; channel_name?: string; + id?: number; bot_id?: string; indent?: boolean; is_msg_unfurl?: boolean; @@ -185,11 +179,17 @@ export interface Attachment { is_thread_root_unfurl?: boolean; is_app_unfurl?: boolean; app_unfurl_url?: string; + title?: string; + title_link?: string; + text?: string; fields?: Field[]; image_url?: string; image_width?: number; image_height?: number; image_bytes?: number; + thumb_url?: string; + thumb_width?: number; + thumb_height?: number; video_url?: string; video_html?: string; video_html_width?: number; diff --git a/packages/web-api/src/response/SearchMessagesResponse.ts b/packages/web-api/src/response/SearchMessagesResponse.ts index 499040132..f11c93200 100644 --- a/packages/web-api/src/response/SearchMessagesResponse.ts +++ b/packages/web-api/src/response/SearchMessagesResponse.ts @@ -46,24 +46,30 @@ export interface Match { } export interface Attachment { - msg_subtype?: string; + service_name?: string; + title?: string; + title_link?: string; + text?: string; fallback?: string; + thumb_url?: string; + from_url?: string; + thumb_width?: number; + thumb_height?: number; + service_icon?: string; + id?: number; + original_url?: string; + msg_subtype?: string; callback_id?: string; color?: string; pretext?: string; service_url?: string; - service_name?: string; - service_icon?: string; author_id?: string; author_name?: string; author_link?: string; author_icon?: string; - from_url?: string; - original_url?: string; author_subname?: string; channel_id?: string; channel_name?: string; - id?: number; bot_id?: string; indent?: boolean; is_msg_unfurl?: boolean; @@ -71,17 +77,11 @@ export interface Attachment { is_thread_root_unfurl?: boolean; is_app_unfurl?: boolean; app_unfurl_url?: string; - title?: string; - title_link?: string; - text?: string; fields?: Field[]; image_url?: string; image_width?: number; image_height?: number; image_bytes?: number; - thumb_url?: string; - thumb_width?: number; - thumb_height?: number; video_url?: string; video_html?: string; video_html_width?: number;