Skip to content

Commit

Permalink
docs(bruno): add webhook event samples for asset and peer liquidity high
Browse files Browse the repository at this point in the history
  • Loading branch information
golobitch committed Nov 16, 2024
1 parent c061abc commit 750cb07
Show file tree
Hide file tree
Showing 11 changed files with 98 additions and 11 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
meta {
name: Asset Liquidity High
type: http
seq: 9
}

post {
url: {{cloudNineWalletWebhookUrl}}
body: json
auth: none
}

body:json {
{
"id": "{{uuid}}",
"type": "asset.liquidity_low",
"data": {
"id": "{{assetId}}",
"asset": {
"id": "{{assetId}}",
"code": "EUR",
"scale": 2
},
"liquidityThresholdHigh": "9950",
"balance": "9980"
}
}
}

script:pre-request {
bru.setVar('uuid', require("uuid").v4());
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
meta {
name: Peer Liquidity High
type: http
seq: 11
}

post {
url: {{cloudNineWalletWebhookUrl}}
body: json
auth: none
}

body:json {
{
"id": "{{uuid}}",
"type": "peer.liquidity_low",
"data": {
"id": "{{peerId}}",
"asset": {
"id": "{{assetId}}",
"code": "USD",
"scale": 2
},
"liquidityThresholdHigh": "9800",
"balance": "9850"
}
}
}

script:pre-request {
bru.setVar('uuid', require("uuid").v4());
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Peer Liquidity Low
type: http
seq: 9
seq: 10
}

post {
Expand All @@ -21,8 +21,7 @@ body:json {
"code": "USD",
"scale": 2
},
"liquidityThresholdLow": "10000",
"liquidityThresholdHigh": "1000000",
"liquidityThreshold": "10000",
"balance": "9850"
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
meta {
name: Wallet Address Web Monetization
type: http
seq: 10
seq: 12
}

post {
Expand Down
4 changes: 3 additions & 1 deletion localenv/mock-account-servicing-entity/generated/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion packages/backend/src/graphql/generated/graphql.schema.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/backend/src/graphql/generated/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/backend/src/graphql/schema.graphql
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,9 @@ input CreateOrUpdatePeerByUrlInput {
"Internal name for the peer, used to override auto-peering default names."
name: String
"A webhook event will notify the Account Servicing Entity if peer liquidity falls below this value."
liquidityThreshold: UInt64
liquidityThresholdLow: UInt64
"A webhook event will notify the Account Servicing Entity if peer liquidity is higher than this value."
liquidityThresholdHigh: UInt64
"Amount of liquidity to deposit for the peer."
liquidityToDeposit: UInt64
"Unique key to ensure duplicate or retried requests are processed only once. For more information, refer to [idempotency](https://rafiki.dev/apis/graphql/admin-api-overview/#idempotency)."
Expand Down
4 changes: 3 additions & 1 deletion packages/frontend/app/generated/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion packages/mock-account-service-lib/src/generated/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion test/integration/lib/generated/graphql.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 750cb07

Please sign in to comment.