Skip to content

Commit

Permalink
Update the web-api response types with the latest data source (#1405)
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch authored Dec 17, 2021
1 parent 39977dc commit df622ce
Show file tree
Hide file tree
Showing 3 changed files with 150 additions and 20 deletions.
16 changes: 8 additions & 8 deletions packages/web-api/src/response/ConversationsHistoryResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,36 +161,36 @@ export interface Metadata {

export interface Block {
type?: string;
block_id?: string;
text?: Text;
accessory?: Accessory;
elements?: Element[];
block_id?: string;
fallback?: string;
image_url?: string;
image_width?: number;
image_height?: number;
image_bytes?: number;
alt_text?: string;
title?: Text;
text?: Text;
fields?: Text[];
accessory?: Accessory;
}

export interface Accessory {
fallback?: string;
type?: string;
image_url?: string;
alt_text?: string;
fallback?: string;
image_width?: number;
image_height?: number;
image_bytes?: number;
type?: string;
alt_text?: string;
}

export interface Element {
type?: string;
action_id?: string;
text?: Text;
value?: string;
action_id?: string;
url?: string;
value?: string;
style?: string;
confirm?: ElementConfirm;
placeholder?: Text;
Expand Down
130 changes: 130 additions & 0 deletions packages/web-api/src/response/ConversationsRepliesResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export interface Message {
is_locked?: boolean;
blocks?: Block[];
attachments?: Attachment[];
last_read?: string;
files?: File[];
upload?: boolean;
display_as_bot?: boolean;
}

export interface Attachment {
Expand Down Expand Up @@ -241,6 +245,132 @@ export interface Icons {
image_72?: string;
}

export interface File {
id?: string;
created?: number;
timestamp?: number;
name?: string;
title?: string;
subject?: string;
mimetype?: string;
filetype?: string;
pretty_type?: string;
user?: string;
mode?: 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;
thumb_64_gif?: string;
thumb_64_w?: string;
thumb_64_h?: string;
thumb_80?: string;
thumb_80_gif?: string;
thumb_80_w?: string;
thumb_80_h?: string;
thumb_160?: string;
thumb_160_gif?: string;
thumb_160_w?: string;
thumb_160_h?: string;
thumb_360?: string;
thumb_360_gif?: string;
thumb_360_w?: string;
thumb_360_h?: string;
thumb_480?: string;
thumb_480_gif?: string;
thumb_480_w?: string;
thumb_480_h?: string;
thumb_720?: string;
thumb_720_gif?: string;
thumb_720_w?: string;
thumb_720_h?: string;
thumb_800?: string;
thumb_800_gif?: string;
thumb_800_w?: string;
thumb_800_h?: string;
thumb_960?: string;
thumb_960_gif?: string;
thumb_960_w?: string;
thumb_960_h?: string;
thumb_1024?: string;
thumb_1024_gif?: string;
thumb_1024_w?: string;
thumb_1024_h?: string;
thumb_video?: string;
thumb_gif?: string;
thumb_pdf?: string;
thumb_pdf_w?: string;
thumb_pdf_h?: string;
thumb_tiny?: string;
converted_pdf?: string;
image_exif_rotation?: number;
original_w?: string;
original_h?: string;
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;
headers?: Headers;
simplified_html?: string;
bot_id?: string;
initial_comment?: InitialComment;
num_stars?: number;
is_starred?: boolean;
comments_count?: number;
}

export interface Headers {
date?: string;
in_reply_to?: string;
reply_to?: string;
message_id?: string;
}

export interface InitialComment {
id?: string;
created?: number;
timestamp?: number;
user?: string;
comment?: string;
channel?: string;
is_intro?: boolean;
}

export interface Shares {
}

export interface ResponseMetadata {
next_cursor?: string;
}
24 changes: 12 additions & 12 deletions packages/web-api/src/response/SearchAllResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -154,42 +154,42 @@ export interface MessagesMatch {
}

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;
is_reply_unfurl?: boolean;
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;
Expand Down

0 comments on commit df622ce

Please sign in to comment.