Skip to content
Open
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
10 changes: 10 additions & 0 deletions packages/web-api/src/methods.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ import type {
AdminUsergroupsListChannelsArguments,
AdminUsergroupsRemoveChannelsArguments,
AdminUsersAssignArguments,
AdminUsersGetExpirationArguments,
AdminUsersInviteArguments,
AdminUsersListArguments,
AdminUsersRemoveArguments,
Expand Down Expand Up @@ -350,6 +351,7 @@ import type {
AdminUsergroupsListChannelsResponse,
AdminUsergroupsRemoveChannelsResponse,
AdminUsersAssignResponse,
AdminUsersGetExpirationResponse,
AdminUsersInviteResponse,
AdminUsersListResponse,
AdminUsersRemoveResponse,
Expand Down Expand Up @@ -1210,6 +1212,14 @@ export abstract class Methods extends EventEmitter<WebClientEvent> {
* @see {@link https://docs.slack.dev/reference/methods/admin.users.assign `admin.users.assign` API reference}.
*/
assign: bindApiCall<AdminUsersAssignArguments, AdminUsersAssignResponse>(this, 'admin.users.assign'),
/**
* @description Fetches the expiration timestamp for a guest.
* @see {@link https://docs.slack.dev/reference/methods/admin.users.getExpiration `admin.users.getExpiration` API reference}.
*/
getExpiration: bindApiCall<AdminUsersGetExpirationArguments, AdminUsersGetExpirationResponse>(
this,
'admin.users.getExpiration',
),
/**
* @description Invite a user to a workspace.
* @see {@link https://docs.slack.dev/reference/methods/admin.users.invite `admin.users.invite` API reference}.
Expand Down
10 changes: 10 additions & 0 deletions packages/web-api/src/types/request/admin/users.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,16 @@ export interface AdminUsersAssignArguments
IsUltraRestricted,
TokenOverridable {}

// https://docs.slack.dev/reference/methods/admin.users.getExpiration
export interface AdminUsersGetExpirationArguments extends TokenOverridable {
/** @description The ID of the guest user to get the expiration for. */
user_id?: string;
/**
* @description If an org token is passed in and this team is on the org, it will operate on the workspace level
* on the specified team. Otherwise it will operate on the org or team in context. */
target_team?: string;
}

// https://docs.slack.dev/reference/methods/admin.users.invite
export interface AdminUsersInviteArguments
extends ChannelIDs,
Expand Down
1 change: 1 addition & 0 deletions packages/web-api/src/types/request/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ export type {
} from './admin/usergroups';
export type {
AdminUsersAssignArguments,
AdminUsersGetExpirationArguments,
AdminUsersInviteArguments,
AdminUsersListArguments,
AdminUsersRemoveArguments,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ 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;
Expand All @@ -51,6 +53,7 @@ export interface Payload {
inputs?: Inputs;
is_billing_excluded?: boolean;
log?: string;
outputs?: Outputs;
request_type?: string;
team_id?: string;
total_steps?: number;
Expand All @@ -62,6 +65,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 @@ -85,6 +85,8 @@ export interface Properties {
at_here_restricted?: boolean;
canvas?: PropertiesCanvas;
huddles_restricted?: boolean;
is_dormant?: boolean;
meeting_notes?: MeetingNotes;
posting_restricted_to?: PostingRestrictedTo;
tabs?: Tab[];
tabz?: Tab[];
Expand All @@ -94,20 +96,32 @@ 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;
shared_ts?: string;
}

export interface ThreadsRestrictedTo {
type?: string[];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ export interface Function {
id?: string;
input_parameters?: PutParameter[];
output_parameters?: PutParameter[];
product_level_availability?: ProductLevelAvailability;
title?: string;
type?: string;
}
Expand All @@ -43,6 +44,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
@@ -0,0 +1,25 @@
/////////////////////////////////////////////////////////////////////////////////////////
// //
// !!! DO NOT EDIT THIS FILE !!! //
// //
// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. //
// Please refer to the script code to learn how to update the source data. //
// //
/////////////////////////////////////////////////////////////////////////////////////////

import type { WebAPICallResult } from '../../WebClient';
export type AdminUsersGetExpirationResponse = WebAPICallResult & {
error?: string;
needed?: string;
ok?: boolean;
provided?: string;
user?: User;
};

export interface User {
email?: string;
expiration_ts?: number;
id?: string;
is_restricted?: boolean;
is_ultra_restricted?: boolean;
}
1 change: 1 addition & 0 deletions packages/web-api/src/types/response/AuthTestResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export type AuthTestResponse = WebAPICallResult & {
app_id?: string;
app_name?: string;
bot_id?: string;
context?: string;
enterprise_id?: string;
error?: string;
expires_in?: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/////////////////////////////////////////////////////////////////////////////////////////
// //
// !!! DO NOT EDIT THIS FILE !!! //
// //
// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. //
// Please refer to the script code to learn how to update the source data. //
// //
/////////////////////////////////////////////////////////////////////////////////////////

import type { WebAPICallResult } from '../../WebClient';
export type ChatAppendStreamResponse = WebAPICallResult & {
channel?: string;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -990,6 +990,7 @@ export interface BotProfile {
name?: string;
team_id?: string;
updated?: number;
user_id?: string;
}

export interface BotProfileIcons {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
/////////////////////////////////////////////////////////////////////////////////////////
// //
// !!! DO NOT EDIT THIS FILE !!! //
// //
// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. //
// Please refer to the script code to learn how to update the source data. //
// //
/////////////////////////////////////////////////////////////////////////////////////////

import type { WebAPICallResult } from '../../WebClient';
export type ChatStartStreamResponse = WebAPICallResult & {
channel?: string;
Expand Down
26 changes: 9 additions & 17 deletions packages/web-api/src/types/response/ChatStopStreamResponse.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,16 @@
import type { Block, KnownBlock } from '@slack/types';
/////////////////////////////////////////////////////////////////////////////////////////
// //
// !!! DO NOT EDIT THIS FILE !!! //
// //
// This file is auto-generated by scripts/generate-web-api-types.sh in the repository. //
// Please refer to the script code to learn how to update the source data. //
// //
/////////////////////////////////////////////////////////////////////////////////////////

import type { WebAPICallResult } from '../../WebClient';
export type ChatStopStreamResponse = WebAPICallResult & {
channel?: string;
error?: string;
needed?: string;
ok?: boolean;
provided?: string;
ts?: string;
message?: ChatStopStreamResponseMessage;
Copy link
Member

Choose a reason for hiding this comment

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

🪓 issue(non-blocking): This should be included in the Java generated logs but I'm finding tests aren't covering this for me. Let's keep note to follow up on this - I think using generated types is correct while "message" is optional.

👁️‍🗨️ ramble: But I wouldn't be opposed to reverting changes of this file if that seems uncertain?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@zimeg Why would this suddenly go missing?

};

export interface ChatStopStreamResponseMessage {
subtype?: string;
text?: string;
user?: string;
streaming_state?: string;
type?: string;
ts?: string;
bot_id?: string;
thread_ts?: string;
parent_user_id?: string;
blocks?: (Block | KnownBlock)[];
}
8 changes: 8 additions & 0 deletions packages/web-api/src/types/response/ChatUnfurlResponse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@

import type { WebAPICallResult } from '../../WebClient';
export type ChatUnfurlResponse = WebAPICallResult & {
callstack?: string;
error?: string;
needed?: string;
ok?: boolean;
provided?: string;
response_metadata?: ResponseMetadata;
warning?: string;
};

export interface ResponseMetadata {
messages?: string[];
warnings?: string[];
}
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,30 @@ export interface Channel {
pending_connected_team_ids?: string[];
pending_shared?: string[];
previous_names?: string[];
properties?: Properties;
purpose?: Purpose;
shared_team_ids?: string[];
topic?: Purpose;
unlinked?: number;
updated?: number;
}

export interface Properties {
is_dormant?: boolean;
tabs?: Tab[];
tabz?: Tabz[];
}

export interface Tab {
id?: string;
label?: string;
type?: string;
}

export interface Tabz {
type?: string;
}

export interface Purpose {
creator?: string;
last_set?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,22 +55,36 @@ export interface Channel {

export interface Properties {
canvas?: Canvas;
meeting_notes?: MeetingNotes;
tabs?: Tab[];
tabz?: Tab[];
use_case?: string;
}

export interface Canvas {
file_id?: string;
is_empty?: boolean;
is_migrated?: boolean;
quip_thread_id?: string;
}

export interface MeetingNotes {
file_id?: string;
}

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

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

export interface Purpose {
creator?: string;
last_set?: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@

import type { WebAPICallResult } from '../../WebClient';
export type ConversationsListResponse = WebAPICallResult & {
arg?: string;
callstack?: string;
channels?: Channel[];
error?: string;
needed?: string;
Expand Down Expand Up @@ -59,29 +61,51 @@ export interface Channel {

export interface Properties {
canvas?: Canvas;
channel_workflows?: ChannelWorkflow[];
is_dormant?: boolean;
meeting_notes?: MeetingNotes;
posting_restricted_to?: RestrictedTo;
tabs?: Tab[];
tabz?: Tab[];
threads_restricted_to?: RestrictedTo;
use_case?: string;
}

export interface Canvas {
file_id?: string;
is_empty?: boolean;
is_migrated?: boolean;
quip_thread_id?: string;
}

export interface ChannelWorkflow {
title?: string;
workflow_trigger_id?: string;
}

export interface MeetingNotes {
file_id?: string;
}

export interface RestrictedTo {
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 Purpose {
creator?: string;
last_set?: number;
Expand Down
Loading