@windingtree/wt-search-api
Version:
NodeJS app that enables quick search over data from Winding Tree platform
113 lines • 2.85 kB
JSON
{
"type": "object",
"description": "A single update notification.",
"required": [
"wtIndex",
"resourceType",
"resourceAddress",
"scope"
],
"properties": {
"wtIndex": {
"description": "Helps to uniquely identify the resource in question.",
"type": "string"
},
"resourceType": {
"description": "Specifies the type of resource (hotel, airline) to be followed.",
"type": "string",
"enum": [
"hotel",
"airline"
]
},
"resourceAddress": {
"description": "Limit subscription to a specific resource (e.g. a specific hotel).",
"type": "string"
},
"scope": {
"description": "Denote the scope of the notification.",
"oneOf": [
{
"type": "object",
"description": "Resource creation scope.",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"create"
]
}
}
},
{
"type": "object",
"description": "Resource deletion scope.",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"delete"
]
}
}
},
{
"type": "object",
"description": "Resource update scope.",
"required": [
"action"
],
"properties": {
"action": {
"type": "string",
"enum": [
"update"
]
},
"subjects": {
"description": "A list of updated resouce properties.",
"oneOf": [
{
"type": "array",
"items": {
"type": "string",
"enum": [
"ratePlans",
"availability",
"description",
"dataIndex",
"onChain",
"notifications",
"booking"
]
}
},
{
"type": "array",
"items": {
"type": "string",
"enum": [
"flights",
"description",
"dataIndex",
"onChain",
"notifications",
"booking"
]
}
}
]
}
}
}
]
}
},
"$schema": "http://json-schema.org/draft-04/schema#"
}