Skip to content
Merged
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
24 changes: 21 additions & 3 deletions src/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1057,7 +1057,9 @@ export enum ComponentType {
/** A container component. */
CONTAINER = 17,
/** A label component. */
LABEL = 18
LABEL = 18,
/** A file upload component. */
FILE_UPLOAD = 19
}

/** The types of component button styles. */
Expand Down Expand Up @@ -1204,7 +1206,7 @@ export interface LabelComponent {
type: ComponentType.LABEL;
label: string;
description?: string;
component: AnySelectComponent | Omit<ComponentTextInput, 'label'>;
component: AnySelectComponent | ComponentFileUpload | Omit<ComponentTextInput, 'label'>;
}

/** Any component. */
Expand All @@ -1219,7 +1221,8 @@ export type AnyComponent =
| SeparatorComponent
| FileComponent
| ContainerComponent
| LabelComponent;
| LabelComponent
| ComponentFileUpload;

/** A row of components. */
export interface ComponentActionRow {
Expand Down Expand Up @@ -1404,6 +1407,21 @@ export interface ComponentTextInput {
placeholder?: string;
}

export interface ComponentFileUpload {
/** The type of component to use. */
type: ComponentType.FILE_UPLOAD;
/** Optional component identifier */
id?: number;
/** The identifier of the of the input. */
custom_id: string;
/** The minimum files that should be uploaded. */
min_values?: number;
/** The maximum files that should be uploaded. */
max_values?: number;
/** Whether this component is required to be filled. */
required?: boolean;
}

/** @hidden */
export interface ComponentSelectResponse {
type:
Expand Down
Loading