Skip to content

Commit

Permalink
Generate the latest web api responses
Browse files Browse the repository at this point in the history
  • Loading branch information
seratch committed Mar 14, 2024
1 parent 8bff32f commit 5df239e
Show file tree
Hide file tree
Showing 33 changed files with 363 additions and 64 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,15 @@ export interface Activity {
}

export interface Payload {
action?: string;
actor?: string;
billing_reason?: string[];
bot_user_id?: string;
bundle_size_kb?: number;
channel_id?: string;
current_step?: number;
datastore_name?: string;
details?: string;
error?: string;
exec_outcome?: string;
function_execution_id?: string;
Expand All @@ -47,9 +51,12 @@ export interface Payload {
inputs?: Inputs;
is_billing_excluded?: boolean;
log?: string;
request_type?: string;
team_id?: string;
total_steps?: number;
trigger?: Trigger;
type?: string;
user_id?: string;
workflow_name?: string;
}

Expand All @@ -65,12 +72,15 @@ export interface Trigger {

export interface Config {
description?: string;
event_type?: string;
name?: string;
schema?: Inputs;
}

export interface TripInformation {
channel_id?: string;
message_ts?: string;
reaction?: string;
user_id?: string;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,23 @@ export type AdminConversationsGetConversationPrefsResponse = WebAPICallResult &
};

export interface Prefs {
can_thread?: CanThread;
who_can_post?: CanThread;
can_huddle?: CanHuddle;
can_thread?: CanThread;
enable_at_channel?: CanHuddle;
enable_at_here?: CanHuddle;
membership_limit?: MembershipLimit;
who_can_post?: CanThread;
}

export interface CanHuddle {
enabled?: boolean;
}

export interface CanThread {
type?: string[];
user?: string[];
}

export interface MembershipLimit {
value?: number;
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ export interface Function {
callback_id?: string;
date_created?: number;
date_deleted?: number;
date_released?: number;
date_updated?: number;
description?: string;
form_enabled?: boolean;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export interface Errors {

export interface Permission {
allowed_by_admin?: AllowedByAdmin;
allowed_entities?: AllowedByAdmin;
allowed_entities?: AllowedEntities;
distribution?: AllowedByAdmin;
}

Expand All @@ -33,6 +33,14 @@ export interface AllowedByAdmin {
user_ids?: string[];
}

export interface AllowedEntities {
channel_ids?: string[];
org_ids?: string[];
team_ids?: string[];
type?: string;
user_ids?: string[];
}

export interface ResponseMetadata {
messages?: string[];
}
14 changes: 14 additions & 0 deletions packages/web-api/src/types/response/ChatPostMessageResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,14 @@ export interface TitleBlockElement {
image_height?: number;
image_url?: string;
image_width?: number;
is_animated?: boolean;
is_workflow_app?: boolean;
owning_team_id?: string;
provider_icon_url?: string;
provider_name?: string;
sales_home_workflow_app_type?: number;
share_url?: string;
slack_file?: SlackFile;
text?: DescriptionElement;
thumbnail_url?: string;
title?: DescriptionElement | string;
Expand Down Expand Up @@ -208,6 +210,7 @@ export interface Accessory {
options?: InitialOptionElement[];
placeholder?: DescriptionElement;
response_url_enabled?: boolean;
slack_file?: SlackFile;
style?: string;
text?: DescriptionElement;
timezone?: string;
Expand Down Expand Up @@ -308,6 +311,11 @@ export interface AccessoryOptionGroup {
options?: InitialOptionElement[];
}

export interface SlackFile {
id?: string;
url?: string;
}

export interface Workflow {
trigger?: Trigger;
}
Expand Down Expand Up @@ -421,6 +429,7 @@ export interface FileElement {
saved?: Saved;
sent_to_self?: boolean;
shares?: Shares;
show_badge?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
Expand Down Expand Up @@ -766,6 +775,7 @@ export interface MessageFile {
saved?: Saved;
sent_to_self?: boolean;
shares?: EventPayload;
show_badge?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
Expand Down Expand Up @@ -871,6 +881,8 @@ export interface Room {
is_dm_call?: boolean;
is_prewarmed?: boolean;
is_scheduled?: boolean;
knocks?: EventPayload;
last_invite_status_by_user?: EventPayload;
media_backend_type?: string;
media_server?: string;
name?: string;
Expand Down Expand Up @@ -964,6 +976,7 @@ export interface PurpleBlock {
image_height?: number;
image_url?: string;
image_width?: number;
is_animated?: boolean;
is_workflow_app?: boolean;
label?: DescriptionElement;
optional?: boolean;
Expand All @@ -972,6 +985,7 @@ export interface PurpleBlock {
provider_name?: string;
sales_home_workflow_app_type?: number;
share_url?: string;
slack_file?: SlackFile;
source?: string;
text?: DescriptionElement;
thumbnail_url?: string;
Expand Down
11 changes: 11 additions & 0 deletions packages/web-api/src/types/response/ChatScheduleMessageResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ export interface Block {
image_height?: number;
image_url?: string;
image_width?: number;
is_animated?: boolean;
is_workflow_app?: boolean;
label?: Description;
optional?: boolean;
Expand All @@ -70,6 +71,7 @@ export interface Block {
provider_name?: string;
sales_home_workflow_app_type?: number;
share_url?: string;
slack_file?: SlackFile;
source?: string;
text?: Description;
thumbnail_url?: string;
Expand Down Expand Up @@ -117,6 +119,7 @@ export interface Accessory {
options?: Option[];
placeholder?: Description;
response_url_enabled?: boolean;
slack_file?: SlackFile;
style?: string;
text?: Description;
timezone?: string;
Expand Down Expand Up @@ -210,6 +213,11 @@ export interface OptionGroup {
options?: Option[];
}

export interface SlackFile {
id?: string;
url?: string;
}

export interface Workflow {
trigger?: Trigger;
}
Expand Down Expand Up @@ -353,6 +361,7 @@ export interface File {
saved?: Saved;
sent_to_self?: boolean;
shares?: EventPayload;
show_badge?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
Expand Down Expand Up @@ -502,6 +511,8 @@ export interface Room {
is_dm_call?: boolean;
is_prewarmed?: boolean;
is_scheduled?: boolean;
knocks?: EventPayload;
last_invite_status_by_user?: EventPayload;
media_backend_type?: string;
media_server?: string;
name?: string;
Expand Down
14 changes: 14 additions & 0 deletions packages/web-api/src/types/response/ChatUpdateResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export interface Block {
image_height?: number;
image_url?: string;
image_width?: number;
is_animated?: boolean;
is_workflow_app?: boolean;
label?: DescriptionElement;
optional?: boolean;
Expand All @@ -75,6 +76,7 @@ export interface Block {
provider_name?: string;
sales_home_workflow_app_type?: number;
share_url?: string;
slack_file?: SlackFile;
source?: string;
text?: DescriptionElement;
thumbnail_url?: string;
Expand Down Expand Up @@ -122,6 +124,7 @@ export interface Accessory {
options?: Option[];
placeholder?: DescriptionElement;
response_url_enabled?: boolean;
slack_file?: SlackFile;
style?: string;
text?: DescriptionElement;
timezone?: string;
Expand Down Expand Up @@ -222,6 +225,11 @@ export interface OptionGroup {
options?: Option[];
}

export interface SlackFile {
id?: string;
url?: string;
}

export interface Workflow {
trigger?: Trigger;
}
Expand Down Expand Up @@ -365,6 +373,7 @@ export interface BlockFile {
saved?: Saved;
sent_to_self?: boolean;
shares?: EventPayload;
show_badge?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
Expand Down Expand Up @@ -576,6 +585,7 @@ export interface FileElement {
saved?: Saved;
sent_to_self?: boolean;
shares?: Shares;
show_badge?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
Expand Down Expand Up @@ -705,12 +715,14 @@ export interface TitleBlock {
image_height?: number;
image_url?: string;
image_width?: number;
is_animated?: boolean;
is_workflow_app?: boolean;
owning_team_id?: string;
provider_icon_url?: string;
provider_name?: string;
sales_home_workflow_app_type?: number;
share_url?: string;
slack_file?: SlackFile;
text?: DescriptionElement;
thumbnail_url?: string;
title?: DescriptionElement | string;
Expand Down Expand Up @@ -746,6 +758,8 @@ export interface Room {
is_dm_call?: boolean;
is_prewarmed?: boolean;
is_scheduled?: boolean;
knocks?: EventPayload;
last_invite_status_by_user?: EventPayload;
media_backend_type?: string;
media_server?: string;
name?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -172,12 +172,14 @@ export interface TitleBlockElement {
image_height?: number;
image_url?: string;
image_width?: number;
is_animated?: boolean;
is_workflow_app?: boolean;
owning_team_id?: string;
provider_icon_url?: string;
provider_name?: string;
sales_home_workflow_app_type?: number;
share_url?: string;
slack_file?: SlackFile;
text?: DescriptionElement;
thumbnail_url?: string;
title?: DescriptionElement | string;
Expand Down Expand Up @@ -224,6 +226,7 @@ export interface Accessory {
options?: InitialOptionElement[];
placeholder?: DescriptionElement;
response_url_enabled?: boolean;
slack_file?: SlackFile;
style?: string;
text?: DescriptionElement;
timezone?: string;
Expand Down Expand Up @@ -324,6 +327,11 @@ export interface AccessoryOptionGroup {
options?: InitialOptionElement[];
}

export interface SlackFile {
id?: string;
url?: string;
}

export interface Workflow {
trigger?: Trigger;
}
Expand Down Expand Up @@ -437,6 +445,7 @@ export interface FileElement {
saved?: Saved;
sent_to_self?: boolean;
shares?: Shares;
show_badge?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
Expand Down Expand Up @@ -782,6 +791,7 @@ export interface BlockFile {
saved?: Saved;
sent_to_self?: boolean;
shares?: EventPayload;
show_badge?: boolean;
simplified_html?: string;
size?: number;
source_team?: string;
Expand Down Expand Up @@ -979,6 +989,7 @@ export interface PurpleBlock {
image_height?: number;
image_url?: string;
image_width?: number;
is_animated?: boolean;
is_workflow_app?: boolean;
label?: DescriptionElement;
optional?: boolean;
Expand All @@ -987,6 +998,7 @@ export interface PurpleBlock {
provider_name?: string;
sales_home_workflow_app_type?: number;
share_url?: string;
slack_file?: SlackFile;
source?: string;
text?: DescriptionElement;
thumbnail_url?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,4 +60,5 @@ export interface Purpose {
export interface Error {
error?: string;
ok?: boolean;
user?: string;
}
Loading

0 comments on commit 5df239e

Please sign in to comment.