-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
18 changed files
with
81 additions
and
72 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -44,7 +44,7 @@ import { | |
import { | ||
ResponseUrlSender, | ||
SlackAPIClient, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { | ||
builtBaseContext, | ||
SlackAppContext, | ||
|
@@ -55,7 +55,7 @@ import { Middleware, PreAuthorizeMiddleware } from "./middleware/middleware.ts"; | |
import { | ||
isDebugLogEnabled, | ||
prettyPrint, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { Authorize } from "./authorization/authorize.ts"; | ||
import { AuthorizeResult } from "./authorization/authorize-result.ts"; | ||
import { | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ import { | |
AuthTestResponse, | ||
SlackAPIClient, | ||
SlackAPIError, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { Authorize } from "./authorize.ts"; | ||
|
||
export const singleTeamAuthorize: Authorize = async (req) => { | ||
|
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,7 +4,7 @@ import { | |
ChatPostMessageResponse, | ||
SlackAPIClient, | ||
WebhookParams, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export interface PreAuthorizeSlackAppContext { | ||
isEnterpriseinstall?: boolean; | ||
|
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 |
---|---|---|
|
@@ -2,7 +2,7 @@ export * from "./app.ts"; | |
export * from "./app-env.ts"; | ||
export * from "./execution-context.ts"; | ||
|
||
export * from "https://deno.land/x/[email protected].0/mod.ts"; | ||
export * from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export * from "./errors.ts"; | ||
export * from "./oauth/error-codes.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 |
---|---|---|
|
@@ -9,7 +9,7 @@ import { | |
OAuthV2AccessResponse, | ||
OpenIDConnectTokenResponse, | ||
SlackAPIClient, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { toInstallation } from "./oauth/installation.ts"; | ||
import { | ||
AfterInstallation, | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { OAuthV2AccessResponse } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { OAuthV2AccessResponse } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { InvalidStateParameter, OAuthErrorCode } from "./error-codes.ts"; | ||
import { Installation } from "./installation.ts"; | ||
import { | ||
|
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { OAuthV2AccessResponse } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { OAuthV2AccessResponse } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export interface Installation { | ||
app_id: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,8 +2,8 @@ import { SlackLoggingLevel } from "../app-env.ts"; | |
import { | ||
OpenIDConnectTokenResponse, | ||
SlackAPIClient, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { prettyPrint } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { prettyPrint } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export interface OpenIDConnectCallbackArgs { | ||
env: SlackLoggingLevel; | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { | ||
OpenIDConnectTokenResponse, | ||
OpenIDConnectUserInfoResponse, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export interface Login { | ||
enterprise_id?: 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ import { | |
MessageAttachment, | ||
MessageMetadata, | ||
PlainTextField, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { DataSubmissionView, ViewStateValue } from "./view-objects.ts"; | ||
import { BotProfile } from "./event.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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
import { AnyOption } from "https://deno.land/x/[email protected].0/mod.ts"; | ||
import { AnyOption } from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { DataSubmissionView } from "./view-objects.ts"; | ||
|
||
export interface BlockSuggestion { | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ import { | |
HomeTabView, | ||
MessageAttachment, | ||
MessageMetadata, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export type AnySlackEvent = | ||
| AppRequestedEvent | ||
|
@@ -202,15 +202,19 @@ export interface AppHomeOpenedEvent extends SlackEvent<"app_home_opened"> { | |
|
||
export interface AppMentionEvent extends SlackEvent<"app_mention"> { | ||
type: "app_mention"; | ||
client_msg_id?: string; | ||
subtype?: string; | ||
bot_id?: string; | ||
bot_profile?: BotProfile; | ||
username: string; | ||
username?: string; | ||
team?: string; | ||
user?: string; | ||
text: string; | ||
attachments?: MessageAttachment[]; | ||
blocks?: AnyMessageBlock[]; | ||
files?: FileElement[]; | ||
upload?: boolean; | ||
display_as_bot?: boolean; | ||
edited?: { | ||
user: string; | ||
ts: string; | ||
|
@@ -1816,44 +1820,44 @@ export interface FileItem { | |
subtype?: string; | ||
thumb_1024?: string; | ||
thumb_1024_gif?: string; | ||
thumb_1024_h?: string; | ||
thumb_1024_w?: string; | ||
thumb_1024_h?: number; | ||
thumb_1024_w?: number; | ||
thumb_160?: string; | ||
thumb_160_gif?: string; | ||
thumb_160_h?: string; | ||
thumb_160_w?: string; | ||
thumb_160_h?: number; | ||
thumb_160_w?: number; | ||
thumb_360?: string; | ||
thumb_360_gif?: string; | ||
thumb_360_h?: string; | ||
thumb_360_w?: string; | ||
thumb_360_h?: number; | ||
thumb_360_w?: number; | ||
thumb_480?: string; | ||
thumb_480_gif?: string; | ||
thumb_480_h?: string; | ||
thumb_480_w?: string; | ||
thumb_480_h?: number; | ||
thumb_480_w?: number; | ||
thumb_64?: string; | ||
thumb_64_gif?: string; | ||
thumb_64_h?: string; | ||
thumb_64_w?: string; | ||
thumb_64_h?: number; | ||
thumb_64_w?: number; | ||
thumb_720?: string; | ||
thumb_720_gif?: string; | ||
thumb_720_h?: string; | ||
thumb_720_w?: string; | ||
thumb_720_h?: number; | ||
thumb_720_w?: number; | ||
thumb_80?: string; | ||
thumb_800?: string; | ||
thumb_800_gif?: string; | ||
thumb_800_h?: string; | ||
thumb_800_w?: string; | ||
thumb_800_h?: number; | ||
thumb_800_w?: number; | ||
thumb_80_gif?: string; | ||
thumb_80_h?: string; | ||
thumb_80_w?: string; | ||
thumb_80_h?: number; | ||
thumb_80_w?: number; | ||
thumb_960?: string; | ||
thumb_960_gif?: string; | ||
thumb_960_h?: string; | ||
thumb_960_w?: string; | ||
thumb_960_h?: number; | ||
thumb_960_w?: number; | ||
thumb_gif?: string; | ||
thumb_pdf?: string; | ||
thumb_pdf_h?: string; | ||
thumb_pdf_w?: string; | ||
thumb_pdf_h?: number; | ||
thumb_pdf_w?: number; | ||
thumb_tiny?: string; | ||
thumb_video?: string; | ||
thumb_video_h?: number; | ||
|
@@ -2029,44 +2033,44 @@ export interface FileElement { | |
subtype?: string; | ||
thumb_1024?: string; | ||
thumb_1024_gif?: string; | ||
thumb_1024_h?: string; | ||
thumb_1024_w?: string; | ||
thumb_1024_h?: number; | ||
thumb_1024_w?: number; | ||
thumb_160?: string; | ||
thumb_160_gif?: string; | ||
thumb_160_h?: string; | ||
thumb_160_w?: string; | ||
thumb_160_h?: number; | ||
thumb_160_w?: number; | ||
thumb_360?: string; | ||
thumb_360_gif?: string; | ||
thumb_360_h?: string; | ||
thumb_360_w?: string; | ||
thumb_360_h?: number; | ||
thumb_360_w?: number; | ||
thumb_480?: string; | ||
thumb_480_gif?: string; | ||
thumb_480_h?: string; | ||
thumb_480_w?: string; | ||
thumb_480_h?: number; | ||
thumb_480_w?: number; | ||
thumb_64?: string; | ||
thumb_64_gif?: string; | ||
thumb_64_h?: string; | ||
thumb_64_w?: string; | ||
thumb_64_h?: number; | ||
thumb_64_w?: number; | ||
thumb_720?: string; | ||
thumb_720_gif?: string; | ||
thumb_720_h?: string; | ||
thumb_720_w?: string; | ||
thumb_720_h?: number; | ||
thumb_720_w?: number; | ||
thumb_80?: string; | ||
thumb_800?: string; | ||
thumb_800_gif?: string; | ||
thumb_800_h?: string; | ||
thumb_800_w?: string; | ||
thumb_800_h?: number; | ||
thumb_800_w?: number; | ||
thumb_80_gif?: string; | ||
thumb_80_h?: string; | ||
thumb_80_w?: string; | ||
thumb_80_h?: number; | ||
thumb_80_w?: number; | ||
thumb_960?: string; | ||
thumb_960_gif?: string; | ||
thumb_960_h?: string; | ||
thumb_960_w?: string; | ||
thumb_960_h?: number; | ||
thumb_960_w?: number; | ||
thumb_gif?: string; | ||
thumb_pdf?: string; | ||
thumb_pdf_h?: string; | ||
thumb_pdf_w?: string; | ||
thumb_pdf_h?: number; | ||
thumb_pdf_w?: number; | ||
thumb_tiny?: string; | ||
thumb_video?: string; | ||
thumb_video_h?: number; | ||
|
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 |
---|---|---|
|
@@ -3,7 +3,7 @@ import { | |
AnyModalBlock, | ||
PlainTextField, | ||
RichTextBlock, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export interface ViewStateSelectedOption { | ||
text: PlainTextField; | ||
|
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,7 +4,7 @@ import { | |
MessageAttachment, | ||
MessageMetadata, | ||
ModalView, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
|
||
export interface MessageResponse { | ||
response_type?: "ephemeral" | "in_channel"; | ||
|
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
import { | ||
isDebugLogEnabled, | ||
SlackAPIClient, | ||
} from "https://deno.land/x/[email protected].0/mod.ts"; | ||
} from "https://deno.land/x/[email protected].1/mod.ts"; | ||
import { SlackApp } from "../app.ts"; | ||
import { ConfigError, SocketModeError } from "../errors.ts"; | ||
import { SlackSocketModeAppEnv } from "../app-env.ts"; | ||
|
@@ -101,14 +101,16 @@ export class SocketModeClient { | |
} | ||
return; | ||
} | ||
const response = await app.run( | ||
fromSocketModeToRequest({ | ||
url: ws.url, | ||
body: data.payload, | ||
retryNum: data.retry_attempt, | ||
retryReason: data.retry_reason, | ||
}), | ||
); | ||
const request = fromSocketModeToRequest({ | ||
url: ws.url, | ||
body: data.payload, | ||
retryNum: data.retry_attempt, | ||
retryReason: data.retry_reason, | ||
}); | ||
if (!request) { | ||
return; | ||
} | ||
const response = await app.run(request); | ||
const message: Record<string, unknown> = { | ||
envelope_id: data.envelope_id, | ||
}; | ||
|