-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add fileUploadV2 method to BaseSlackAPIClient
and add new tests to api_test.ts.
- Loading branch information
1 parent
5ab4181
commit b735fec
Showing
6 changed files
with
311 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ export { | |
assertExists, | ||
assertInstanceOf, | ||
assertRejects, | ||
fail, | ||
} from "https://deno.land/[email protected]/testing/asserts.ts"; | ||
export * as mf from "https://deno.land/x/[email protected]/mod.ts"; | ||
export { isHttpError } from "https://deno.land/[email protected]/http/http_errors.ts"; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import { BaseResponse } from "../types.ts"; | ||
|
||
export type FileUploadV2 = { | ||
/** @description Description of image for screen-reader. */ | ||
alt_text?: string; | ||
/** @description Syntax type of the snippet being uploaded. */ | ||
snippet_type?: string; | ||
/** @description The message text introducing the file in specified channels. */ | ||
channel_id?: string; | ||
/** @description Provide another message's ts value to upload this file as a reply. Never use a reply's ts value; use its parent instead. */ | ||
thread_ts?: string; | ||
/** @description The message text introducing the file in specified channels. */ | ||
initial_comment?: string; | ||
/** @description Title of the file being uploaded */ | ||
title?: string; | ||
|
||
/** @description Size in bytes of the file being uploaded. */ | ||
length: string; | ||
/** @description Name of the file being uploaded. */ | ||
filename: string; | ||
/** @description Filetype of the file being uploaded. */ | ||
file: Blob | ReadableStream<Uint8Array> | string | ArrayBuffer; | ||
}; | ||
|
||
export type FileUploadV2Args = { | ||
file_uploads: FileUploadV2[]; | ||
}; | ||
|
||
export type GetUploadURLExternalResponse = BaseResponse & { | ||
file_id: string; | ||
upload_url: string; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters