Skip to content

Commit

Permalink
Merge pull request #148 from liteflow-labs/docs/webhook-auction-expired
Browse files Browse the repository at this point in the history
Add new auction expired webhook
  • Loading branch information
NicolasMahe authored Apr 3, 2023
2 parents 92321b7 + ca89021 commit 1203bf7
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 10 deletions.
53 changes: 53 additions & 0 deletions docs/pages/webhook/events/AUCTION_EXPIRED.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: 'AUCTION_EXPIRED'
---

# AUCTION_EXPIRED

Whenever an auction expires

## Definition

```ts
type Uint256 = string
type IsoDate = string
type ChainId = number
type Address = string

type AUCTION_EXPIRED = {
id: string
createdAt: IsoDate
creator: {
address: Address
username: string | null
email: string | null
}
endAt: IsoDate
asset: {
id: string
name: string
collection: {
chainId: ChainId
address: Address
name: string
}
}
reserveAmount: Uint256
currency: {
symbol: string
decimals: number
}
}
```
## Usage
```ts
import { Events, parseAndVerifyRequest } from '@nft/webhook'

const { data, type } = await parseAndVerifyRequest<'AUCTION_EXPIRED'>(
req,
process.env.LITEFLOW_WEBHOOK_SECRET,
)
// data is type Events['AUCTION_EXPIRED']
```
21 changes: 11 additions & 10 deletions docs/pages/webhook/events/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,14 @@ title: 'Events'

# List of events

| Event | Triggered | Detail |
| :-------------------- | :-------------------------------------- | :-------------------------------------------- |
| `AUCTION_BID_CREATED` | Whenever a bid on an auction is created | [detail](/webhook/events/AUCTION_BID_CREATED) |
| `BID_CREATED` | Whenever an open bid is created | [detail](/webhook/events/BID_CREATED) |
| `OFFER_CREATED` | Whenever a new listing is created | [detail](/webhook/events/OFFER_CREATED) |
| `BID_EXPIRED` | Whenever an open bid is expired | [detail](/webhook/events/BID_EXPIRED) |
| `OFFER_EXPIRED` | Whenever a listing is expired | [detail](/webhook/events/OFFER_EXPIRED) |
| `AUCTION_BID_EXPIRED` | Whenever a bid on an auction is expired | [detail](/webhook/events/AUCTION_BID_EXPIRED) |
| `TRADE_CREATED` | Whenever a trade is executed | [detail](/webhook/events/TRADE_CREATED) |
| `AUCTION_ENDED` | Whenever an auction ends | [detail](/webhook/events/AUCTION_ENDED) |
| Event | Triggered | Detail |
| :-------------------- | :--------------------------------------- | :-------------------------------------------- |
| `AUCTION_BID_CREATED` | Whenever a bid on an auction is created | [detail](/webhook/events/AUCTION_BID_CREATED) |
| `BID_CREATED` | Whenever an open bid is created | [detail](/webhook/events/BID_CREATED) |
| `OFFER_CREATED` | Whenever a new listing is created | [detail](/webhook/events/OFFER_CREATED) |
| `BID_EXPIRED` | Whenever an open bid is expired | [detail](/webhook/events/BID_EXPIRED) |
| `OFFER_EXPIRED` | Whenever a listing is expired | [detail](/webhook/events/OFFER_EXPIRED) |
| `AUCTION_BID_EXPIRED` | Whenever a bid on an auction is expired | [detail](/webhook/events/AUCTION_BID_EXPIRED) |
| `TRADE_CREATED` | Whenever a trade is executed | [detail](/webhook/events/TRADE_CREATED) |
| `AUCTION_ENDED` | Whenever an auction ends | [detail](/webhook/events/AUCTION_ENDED) |
| `AUCTION_EXPIRED` | Whenever an auction expires | [detail](/webhook/events/AUCTION_EXPIRED) |

0 comments on commit 1203bf7

Please sign in to comment.