Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions .changeset/regen-web-api-response-types.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
"@slack/web-api": minor
---

chore(web-api): regenerate Web API response types from latest samples

Regenerate `packages/web-api/src/types/response` from the current `java-slack-sdk` samples, picking up new stable response properties (e.g. `warning` fields, `Channel.properties`) and one new method type. Also fixes `scripts/generate-web-api-types.sh` to run `lint:fix` from the repo root (Biome), since the per-package `lint:fix` script no longer exists.
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminAppsActivitiesListResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👾 note: According to agentic search 229/330 methods have "warning" added. We might continue to search for it in upstream changes but this remains true to scripting at this time.

};

export interface Activity {
Expand All @@ -35,24 +36,37 @@ export interface Activity {
export interface Payload {
action?: string;
actor?: string;
app_id?: string;
billing_reason?: string[];
bot_user_id?: string;
bundle_size_kb?: number;
channel_id?: string;
code?: string;
current_step?: number;
datastore_name?: string;
details?: string;
elapsed_ms?: number;
error?: string;
error_stage?: string;
exec_outcome?: string;
extra_message?: string;
function_execution_id?: string;
function_id?: string;
function_name?: string;
function_type?: string;
http_status_code?: number;
inputs?: Inputs;
is_billing_excluded?: boolean;
log?: string;
message?: string;
outputs?: Outputs;
provider_key?: string;
request_type?: string;
server_name?: string;
team_id?: string;
tokens_checked?: number;
tool_count?: number;
tool_name?: string;
total_steps?: number;
trigger?: Trigger;
type?: string;
Expand All @@ -62,6 +76,11 @@ export interface Payload {

export type Inputs = {};

export interface Outputs {
channel_id?: string;
message_ts?: string;
}

export interface Trigger {
config?: Config;
id?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminAppsConfigLookupResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface Config {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminAppsConfigSetResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminAppsRequestsCancelResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export type AdminAuthPolicyAssignEntitiesResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminAuthPolicyGetEntitiesResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};

export interface Entity {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ export type AdminAuthPolicyRemoveEntitiesResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminBarriersCreateResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface Barrier {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminBarriersDeleteResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminBarriersListResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};

export interface Barrier {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminBarriersUpdateResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};

export interface Barrier {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type AdminConversationsBulkArchiveResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface NotAdded {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type AdminConversationsBulkDeleteResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface NotAdded {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ export type AdminConversationsBulkMoveResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface NotAdded {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminConversationsCreateResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminConversationsDeleteResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminConversationsEkmListOriginalConnectedChannelInfoResponse = WebA
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ export type AdminConversationsGetCustomRetentionResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminConversationsRemoveCustomRetentionResponse = WebAPICallResult &
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type AdminConversationsSearchResponse = WebAPICallResult & {
provided?: string;
response_metadata?: ResponseMetadata;
total_count?: number;
warning?: string;
};

export interface Conversation {
Expand Down Expand Up @@ -84,7 +85,10 @@ export interface Properties {
at_channel_restricted?: boolean;
at_here_restricted?: boolean;
canvas?: PropertiesCanvas;
has_slack_connect_invite_created?: boolean;
huddles_restricted?: boolean;
is_dormant?: boolean;
meeting_notes?: MeetingNotes;
posting_restricted_to?: PostingRestrictedTo;
tabs?: Tab[];
tabz?: Tab[];
Expand All @@ -94,20 +98,33 @@ export interface Properties {
export interface PropertiesCanvas {
file_id?: string;
is_empty?: boolean;
is_migrated?: boolean;
quip_thread_id?: string;
}

export interface MeetingNotes {
file_id?: string;
}

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

export interface Tab {
data?: Data;
id?: string;
is_disabled?: boolean;
label?: string;
type?: string;
}

export interface Data {
file_id?: string;
folder_bookmark_id?: string;
shared_ts?: string;
}

export interface ThreadsRestrictedTo {
type?: string[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminConversationsSetCustomRetentionResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminEmojiAddAliasResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminEmojiAddResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminEmojiListResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface Emoji {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminEmojiRemoveResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminEmojiRenameResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminFunctionsListResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface Function {
Expand All @@ -31,6 +32,7 @@ export interface Function {
id?: string;
input_parameters?: PutParameter[];
output_parameters?: PutParameter[];
product_level_availability?: ProductLevelAvailability;
title?: string;
type?: string;
}
Expand All @@ -43,6 +45,11 @@ export interface PutParameter {
type?: string;
}

export interface ProductLevelAvailability {
available_to?: string;
is_available?: boolean;
}

export interface ResponseMetadata {
messages?: string[];
next_cursor?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ export type AdminFunctionsPermissionsLookupResponse = WebAPICallResult & {
permissions?: { [key: string]: Permission };
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export type Errors = {};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminFunctionsPermissionsSetResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminInviteRequestsApproveResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminInviteRequestsApprovedListResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ApprovedRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminInviteRequestsDeniedListResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface DeniedRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminInviteRequestsDenyResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminInviteRequestsListResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface InviteRequest {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type AdminRolesAddAssignmentsResponse = WebAPICallResult & {
ok?: boolean;
provided?: string;
rejected_users?: RejectedUser[];
warning?: string;
};

export interface RejectedUser {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ export type AdminRolesListAssignmentsResponse = WebAPICallResult & {
provided?: string;
response_metadata?: ResponseMetadata;
role_assignments?: RoleAssignment[];
warning?: string;
};

export interface ResponseMetadata {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@ export type AdminRolesRemoveAssignmentsResponse = WebAPICallResult & {
needed?: string;
ok?: boolean;
provided?: string;
warning?: string;
};
Loading