-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make webhook types fired from convoy available
- Loading branch information
1 parent
5b0ac7b
commit a951eaa
Showing
3 changed files
with
86 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./webhooks" |
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,84 @@ | ||
import { Cast, User } from "../api"; | ||
|
||
interface UserDehydrated { | ||
fid: number; | ||
object: "user_dehydrated"; | ||
username: string; | ||
} | ||
|
||
interface CastDehydrated { | ||
hash: string; | ||
author: UserDehydrated; | ||
object: "cast_dehydrated"; | ||
} | ||
|
||
export interface WebhookFollowCreated { | ||
data: { | ||
event_timestamp: string; | ||
user: UserDehydrated; | ||
object: "follow"; | ||
timestamp: string; | ||
target_user: UserDehydrated; | ||
}; | ||
type: "follow.created"; | ||
created_at: number; | ||
} | ||
|
||
export interface WebhookFollowDeleted { | ||
data: { | ||
event_timestamp: string; | ||
user: UserDehydrated; | ||
object: "unfollow"; | ||
timestamp: string; | ||
target_user: UserDehydrated; | ||
}; | ||
type: "follow.deleted"; | ||
created_at: number; | ||
} | ||
|
||
export interface WebhookReactionCreated { | ||
data: { | ||
cast: CastDehydrated; | ||
event_timestamp: string; | ||
user: UserDehydrated; | ||
object: "reaction"; | ||
timestamp: string; | ||
reaction_type: 1 | 2; | ||
}; | ||
type: "reaction.created"; | ||
created_at: number; | ||
} | ||
|
||
export interface WebhookReactionDeleted { | ||
data: { | ||
cast: CastDehydrated; | ||
event_timestamp: string; | ||
user: UserDehydrated; | ||
object: "reaction"; | ||
timestamp: string; | ||
reaction_type: 1 | 2; | ||
}; | ||
type: "reaction.deleted"; | ||
created_at: number; | ||
} | ||
|
||
export interface WebhookCastCreated { | ||
data: Cast; | ||
type: "cast.created"; | ||
created_at: number; | ||
event_timestamp: string; | ||
} | ||
|
||
export interface WebhookUserCreated { | ||
data: User; | ||
type: "user.created"; | ||
created_at: number; | ||
event_timestamp: string; | ||
} | ||
|
||
export interface WebhookUserUpdated { | ||
data: User; | ||
type: "user.updated"; | ||
created_at: number; | ||
event_timestamp: string; | ||
} |