Skip to content

Commit 9daac44

Browse files
authored
feat: deauthorised webhook events (#1253)
1 parent 72b8c83 commit 9daac44

File tree

4 files changed

+80
-0
lines changed

4 files changed

+80
-0
lines changed

deno/payloads/v10/webhook.ts

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

deno/payloads/v9/webhook.ts

Lines changed: 20 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

payloads/v10/webhook.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export type APIWebhookEventBody =
8686
ApplicationWebhookEventType.ApplicationAuthorized,
8787
APIWebhookEventApplicationAuthorizedData
8888
>
89+
| APIWebhookEventEventBase<
90+
ApplicationWebhookEventType.ApplicationDeauthorized,
91+
APIWebhookEventApplicationDeauthorizedData
92+
>
8993
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
9094
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
9195

@@ -108,6 +112,16 @@ export interface APIWebhookEventApplicationAuthorizedData {
108112
guild?: APIGuild;
109113
}
110114

115+
/**
116+
* @unstable
117+
*/
118+
export interface APIWebhookEventApplicationDeauthorizedData {
119+
/**
120+
* User who deauthorized the app
121+
*/
122+
user: APIUser;
123+
}
124+
111125
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
112126

113127
export type APIWebhookEventQuestUserEnrollmentData = never;
@@ -168,6 +182,12 @@ export enum ApplicationWebhookEventType {
168182
* Sent when an app was authorized by a user to a server or their account
169183
*/
170184
ApplicationAuthorized = 'APPLICATION_AUTHORIZED',
185+
/**
186+
* Sent when an app was deauthorized by a user
187+
*
188+
* @unstable
189+
*/
190+
ApplicationDeauthorized = 'APPLICATION_DEAUTHORIZED',
171191
/**
172192
* Entitlement was created
173193
*/

payloads/v9/webhook.ts

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ export type APIWebhookEventBody =
8686
ApplicationWebhookEventType.ApplicationAuthorized,
8787
APIWebhookEventApplicationAuthorizedData
8888
>
89+
| APIWebhookEventEventBase<
90+
ApplicationWebhookEventType.ApplicationDeauthorized,
91+
APIWebhookEventApplicationDeauthorizedData
92+
>
8993
| APIWebhookEventEventBase<ApplicationWebhookEventType.EntitlementCreate, APIWebhookEventEntitlementCreateData>
9094
| APIWebhookEventEventBase<ApplicationWebhookEventType.QuestUserEnrollment, APIWebhookEventQuestUserEnrollmentData>;
9195

@@ -108,6 +112,16 @@ export interface APIWebhookEventApplicationAuthorizedData {
108112
guild?: APIGuild;
109113
}
110114

115+
/**
116+
* @unstable
117+
*/
118+
export interface APIWebhookEventApplicationDeauthorizedData {
119+
/**
120+
* User who deauthorized the app
121+
*/
122+
user: APIUser;
123+
}
124+
111125
export type APIWebhookEventEntitlementCreateData = APIEntitlement;
112126

113127
export type APIWebhookEventQuestUserEnrollmentData = never;
@@ -168,6 +182,12 @@ export enum ApplicationWebhookEventType {
168182
* Sent when an app was authorized by a user to a server or their account
169183
*/
170184
ApplicationAuthorized = 'APPLICATION_AUTHORIZED',
185+
/**
186+
* Sent when an app was deauthorized by a user
187+
*
188+
* @unstable
189+
*/
190+
ApplicationDeauthorized = 'APPLICATION_DEAUTHORIZED',
171191
/**
172192
* Entitlement was created
173193
*/

0 commit comments

Comments
 (0)