Skip to content

Commit

Permalink
feat: OpenApi Parse v2 webhook payload parsing (#1985)
Browse files Browse the repository at this point in the history
  • Loading branch information
RohinBhargava authored Jan 10, 2025
1 parent 1508add commit 7d782c0
Show file tree
Hide file tree
Showing 23 changed files with 397 additions and 405 deletions.
2 changes: 1 addition & 1 deletion fern/apis/fdr/definition/api/latest/webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ types:
method: WebhookHttpMethod
path: list<string>
headers: optional<list<type.ObjectProperty>>
payload: optional<WebhookPayload>
payloads: optional<list<WebhookPayload>>
examples: optional<list<v1Read.ExampleWebhookPayload>>

WebhookPayload:
Expand Down
144 changes: 81 additions & 63 deletions packages/fdr-sdk/src/__test__/output/beehiiv/apiDefinitions.json
Original file line number Diff line number Diff line change
Expand Up @@ -22603,15 +22603,17 @@
"operationId": "sent",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_post:Post"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_post:Post"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22652,15 +22654,17 @@
"operationId": "created",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22698,15 +22702,17 @@
"operationId": "confirmed",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22744,15 +22750,17 @@
"operationId": "deleted",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22790,15 +22798,17 @@
"operationId": "upgraded",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22836,15 +22846,17 @@
"operationId": "downgraded",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22882,15 +22894,17 @@
"operationId": "tier-added",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22926,15 +22940,17 @@
"operationId": "tier-deleted",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_subscription:Subscription"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down Expand Up @@ -22968,15 +22984,17 @@
"operationId": "submitted",
"method": "POST",
"path": [],
"payload": {
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_survey:SurveyResponse"
"payloads": [
{
"shape": {
"type": "alias",
"value": {
"type": "id",
"id": "type_survey:SurveyResponse"
}
}
}
},
],
"examples": [
{
"payload": {
Expand Down
Loading

0 comments on commit 7d782c0

Please sign in to comment.