feat: add presence-gated session leases (#7)
quality-gate / quality (push) Successful in 55s

Closes #7
This commit is contained in:
KyuubiYoru
2026-07-16 05:58:47 +02:00
parent 02ca502a76
commit 49564c7e7e
25 changed files with 2069 additions and 46 deletions
+247 -14
View File
@@ -75,8 +75,68 @@
}
}
},
"501": {
"description": "Not Implemented",
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"410": {
"description": "Gone",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"429": {
"description": "Too Many Requests",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
@@ -85,7 +145,12 @@
}
}
}
}
},
"security": [
{
"PublisherBearer": [ ]
}
]
},
"get": {
"tags": [
@@ -211,8 +276,68 @@
}
}
},
"501": {
"description": "Not Implemented",
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"409": {
"description": "Conflict",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"410": {
"description": "Gone",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
@@ -221,7 +346,12 @@
}
}
}
}
},
"security": [
{
"PublisherBearer": [ ]
}
]
}
},
"/v1/sessions/{listingId}": {
@@ -254,8 +384,48 @@
"204": {
"description": "No Content"
},
"501": {
"description": "Not Implemented",
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"404": {
"description": "Not Found",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
@@ -264,7 +434,12 @@
}
}
}
}
},
"security": [
{
"PublisherBearer": [ ]
}
]
},
"delete": {
"tags": [
@@ -295,8 +470,38 @@
"204": {
"description": "No Content"
},
"501": {
"description": "Not Implemented",
"400": {
"description": "Bad Request",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"401": {
"description": "Unauthorized",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"403": {
"description": "Forbidden",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ApiError"
}
}
}
},
"503": {
"description": "Service Unavailable",
"content": {
"application/json": {
"schema": {
@@ -305,7 +510,12 @@
}
}
}
}
},
"security": [
{
"PublisherBearer": [ ]
}
]
},
"get": {
"tags": [
@@ -875,7 +1085,9 @@
"leaseToken",
"hostPresenceHandle",
"hostPresenceCapability",
"expiresAt"
"expiresAt",
"leaseRenewAfterSeconds",
"hostPresenceRefreshAfterSeconds"
],
"type": "object",
"properties": {
@@ -901,6 +1113,14 @@
"expiresAt": {
"type": "string",
"format": "date-time"
},
"leaseRenewAfterSeconds": {
"type": "integer",
"format": "int32"
},
"hostPresenceRefreshAfterSeconds": {
"type": "integer",
"format": "int32"
}
}
},
@@ -942,7 +1162,8 @@
"RenewLeaseResponse": {
"required": [
"contractVersion",
"expiresAt"
"expiresAt",
"renewAfterSeconds"
],
"type": "object",
"properties": {
@@ -953,6 +1174,10 @@
"expiresAt": {
"type": "string",
"format": "date-time"
},
"renewAfterSeconds": {
"type": "integer",
"format": "int32"
}
}
},
@@ -1115,6 +1340,14 @@
}
}
}
},
"securitySchemes": {
"PublisherBearer": {
"type": "http",
"description": "Tenant-scoped publisher credential issued during game provisioning.",
"scheme": "bearer",
"bearerFormat": "rv1 publisher credential"
}
}
},
"tags": [