feat(browser): stream bounded live session updates (#26)
This commit is contained in:
+233
-1
@@ -1177,6 +1177,159 @@
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/sessions/stream": {
|
||||
"get": {
|
||||
"tags": [
|
||||
"Sessions"
|
||||
],
|
||||
"operationId": "StreamSessions",
|
||||
"parameters": [
|
||||
{
|
||||
"name": "contractVersion",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "gameId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "environmentId",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "protocolVersion",
|
||||
"in": "query",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "uint32"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "regionId",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "excludeFull",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "boolean"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "streamCursor",
|
||||
"in": "query",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "Last-Event-ID",
|
||||
"in": "header",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
],
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "OK",
|
||||
"headers": {
|
||||
"X-Rendezvous-Correlation-ID": {
|
||||
"description": "Safe request correlation identifier generated by the service.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"text/event-stream": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/SessionStreamEvent"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"400": {
|
||||
"description": "Bad Request",
|
||||
"headers": {
|
||||
"X-Rendezvous-Correlation-ID": {
|
||||
"description": "Safe request correlation identifier generated by the service.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"429": {
|
||||
"description": "Too Many Requests",
|
||||
"headers": {
|
||||
"X-Rendezvous-Correlation-ID": {
|
||||
"description": "Safe request correlation identifier generated by the service.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
},
|
||||
"Retry-After": {
|
||||
"description": "Whole seconds before the caller should retry (1-60).",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
}
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiError"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"503": {
|
||||
"description": "Service Unavailable",
|
||||
"headers": {
|
||||
"X-Rendezvous-Correlation-ID": {
|
||||
"description": "Safe request correlation identifier generated by the service.",
|
||||
"schema": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"$ref": "#/components/schemas/ApiError"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"/v1/sessions/{listingId}/join-attempts": {
|
||||
"get": {
|
||||
"tags": [
|
||||
@@ -2657,7 +2810,8 @@
|
||||
"BrowseSessionsResponse": {
|
||||
"required": [
|
||||
"contractVersion",
|
||||
"items"
|
||||
"items",
|
||||
"streamCursor"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2676,6 +2830,9 @@
|
||||
"null",
|
||||
"string"
|
||||
]
|
||||
},
|
||||
"streamCursor": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -3545,6 +3702,54 @@
|
||||
"type": "string",
|
||||
"format": "uuid"
|
||||
},
|
||||
"SessionStreamEvent": {
|
||||
"required": [
|
||||
"contractVersion",
|
||||
"kind",
|
||||
"cursor"
|
||||
],
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"contractVersion": {
|
||||
"type": "integer",
|
||||
"format": "int32"
|
||||
},
|
||||
"kind": {
|
||||
"$ref": "#/components/schemas/SessionStreamEventKind"
|
||||
},
|
||||
"cursor": {
|
||||
"type": "string"
|
||||
},
|
||||
"session": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SessionListing"
|
||||
}
|
||||
]
|
||||
},
|
||||
"listingId": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/SessionListingId"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
},
|
||||
"SessionStreamEventKind": {
|
||||
"enum": [
|
||||
"sessionUpsert",
|
||||
"sessionRemove",
|
||||
"reset",
|
||||
"keepalive"
|
||||
]
|
||||
},
|
||||
"UpdateSessionRequest": {
|
||||
"required": [
|
||||
"contractVersion",
|
||||
@@ -3563,6 +3768,33 @@
|
||||
"leaseToken": {
|
||||
"type": "string"
|
||||
},
|
||||
"regionId": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/RegionId"
|
||||
}
|
||||
]
|
||||
},
|
||||
"protocolVersion": {
|
||||
"type": [
|
||||
"null",
|
||||
"integer"
|
||||
],
|
||||
"format": "uint32"
|
||||
},
|
||||
"visibility": {
|
||||
"oneOf": [
|
||||
{
|
||||
"type": "null"
|
||||
},
|
||||
{
|
||||
"$ref": "#/components/schemas/ListingVisibility"
|
||||
}
|
||||
]
|
||||
},
|
||||
"buildVersion": {
|
||||
"type": "string"
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user