Skip to content

Commit

Permalink
add webhook request body
Browse files Browse the repository at this point in the history
  • Loading branch information
suhailkakar committed Apr 30, 2024
1 parent 65975d3 commit ffba83c
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
26 changes: 26 additions & 0 deletions packages/api/src/schema/api-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@ components:
- VP8
- VP9
example: H.264
webhook-payload:
type: object
additionalProperties: false
properties:
name:
$ref: "#/components/schemas/webhook/properties/name"
url:
$ref: "#/components/schemas/webhook/properties/url"
events:
$ref: "#/components/schemas/webhook/properties/events"
sharedSecret:
$ref: "#/components/schemas/webhook/properties/sharedSecret"
streamId:
$ref: "#/components/schemas/webhook/properties/streamId"
webhook:
type: object
required:
Expand Down Expand Up @@ -3054,6 +3068,12 @@ paths:
To create a new webhook, you need to make an API call with the events
you want to listen for and the URL that will be called when those events
occur.
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/webhook-payload"
responses:
"200":
description: Success
Expand Down Expand Up @@ -3107,6 +3127,12 @@ paths:
operationId: updateWebhook
tags:
- webhook
requestBody:
required: true
content:
application/json:
schema:
$ref: "#/components/schemas/webhook-payload"
responses:
"200":
description: Success
Expand Down
14 changes: 0 additions & 14 deletions packages/api/src/schema/db-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1066,20 +1066,6 @@ components:
type: number
description: Timestamp (in milliseconds) at which the stream started.
example: 1587667174725
webhook-patch-payload:
type: object
additionalProperties: false
properties:
name:
$ref: "#/components/schemas/webhook/properties/name"
url:
$ref: "#/components/schemas/webhook/properties/url"
events:
$ref: "#/components/schemas/webhook/properties/events"
sharedSecret:
$ref: "#/components/schemas/webhook/properties/sharedSecret"
streamId:
$ref: "#/components/schemas/webhook/properties/streamId"
ipfs-file-info:
properties:
cid:
Expand Down

0 comments on commit ffba83c

Please sign in to comment.