Documentacion con Bruno, los eventos se redirigen

This commit is contained in:
2025-12-26 13:51:51 +01:00
parent a2c017d67f
commit ed5590a239
8 changed files with 93 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
meta {
name: Health
type: http
seq: 1
}
get {
url: {{host}}:3300/health
body: none
auth: inherit
}
settings {
encodeUrl: true
timeout: 0
}

View File

@@ -0,0 +1,23 @@
meta {
name: Launch Order
type: http
seq: 2
}
post {
url: {{host}}:{{port}}/webhooks/shopify/orders
body: json
auth: inherit
}
body:json {
{
"topic":"orders/create",
"id":"1234"
}
}
settings {
encodeUrl: true
timeout: 0
}

View File

@@ -0,0 +1,26 @@
meta {
name: Subscribe To
type: http
seq: 1
}
post {
url: {{host}}:{{port}}/webhooks/subto
body: json
auth: inherit
}
body:json {
{
"host": "http://localhost",
"port": "3000",
"endpoint": "/test2",
"method": "POST",
"topic": "orders/create"
}
}
settings {
encodeUrl: true
timeout: 0
}

View File

@@ -0,0 +1,8 @@
meta {
name: Webhooks
seq: 2
}
auth {
mode: inherit
}

View File

@@ -0,0 +1,15 @@
{
"version": "1",
"name": "API-MOCK-SHOPIFY",
"type": "collection",
"ignore": [
"node_modules",
".git"
],
"size": 0,
"filesCount": 0,
"presets": {
"requestType": "http",
"requestUrl": "localhost:3300"
}
}

View File

View File

@@ -0,0 +1,4 @@
vars {
host: http://localhost
port: 3300
}

View File

@@ -118,6 +118,7 @@ export class SubscriptionManager {
request.on("error", () => console.error) request.on("error", () => console.error)
request.end() request.end()
console.debug("Enviado evento a ", sub.host, ":", sub.port, sub.endpoint)
} }
} }
} }