1
0
Fork 0
mirror of https://github.com/shlinkio/shlink.git synced 2025-05-09 08:43:10 +03:00

Added support to publish orphan visits in mercure

This commit is contained in:
Alejandro Celaya 2021-02-11 22:12:38 +01:00
parent cc42f037c7
commit 7d6d8e3a68
9 changed files with 187 additions and 28 deletions
docs/async-api

View file

@ -58,6 +58,23 @@
}
}
}
},
"http://shlink.io/new-orphan-visit": {
"subscribe": {
"summary": "Receive information about any new orphan visit.",
"operationId": "newOrphanVisit",
"message": {
"payload": {
"type": "object",
"additionalProperties": false,
"properties": {
"visit": {
"$ref": "#/components/schemas/OrphanVisit"
}
}
}
}
}
}
},
"components": {
@ -179,6 +196,46 @@
}
}
},
"OrphanVisit": {
"allOf": [
{"$ref": "#/components/schemas/Visit"},
{
"type": "object",
"properties": {
"visitedUrl": {
"type": "string",
"nullable": true,
"description": "The originally visited URL that triggered the tracking of this visit"
},
"type": {
"type": "string",
"enum": [
"invalid_short_url",
"base_url",
"regular_404"
],
"description": "Tells the type of orphan visit"
}
}
}
],
"example": {
"referer": "https://t.co",
"date": "2015-08-20T05:05:03+04:00",
"userAgent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36",
"visitLocation": {
"cityName": "Cupertino",
"countryCode": "US",
"countryName": "United States",
"latitude": 37.3042,
"longitude": -122.0946,
"regionName": "California",
"timezone": "America/Los_Angeles"
},
"visitedUrl": "https://doma.in",
"type": "base_url"
}
},
"VisitLocation": {
"type": "object",
"properties": {